Просмотр исходного кода

1.列表中column单据类型字典名称修改
2.新增时添加billTypeName字段
3.删除操作增加提示
4.物料携带字段禁用修改

002390 2 лет назад
Родитель
Сommit
fa40f68a1a

+ 62 - 28
src/views/purchase/purchase-order/add/column.js

@@ -408,41 +408,55 @@ export const TabColumns = [
         title: "物料编码",
         inputType: "Input",
         width: 180,
+        disabled:true,
+        readonly:true,
       },
       { //classifyIdName   classifyId
         key: "materialClassify",
         title: "物料分类", 
         inputType: "Input",
-        width: 180 
+        width: 180,
+        disabled:true,
+        readonly:true, 
       },
       { // manufacturersMaterialCode  manufacturersMaterialName
         key: "materialManufacturersCode",
          title: "厂家物料编码", 
          inputType: "Input",
-          width: 180
+          width: 180,
+          disabled:true,
+        readonly:true,
          },
       { //specification
         key: "specification",
-         title: "规格", 
-         inputType: "Input",
-          width: 180 
+        title: "规格", 
+        inputType: "Input",
+        width: 180 ,
+        disabled:true,
+        readonly:true,
         },
       { //model
         key: "model",
-         title: "型号", 
-         inputType: "Input",
-         },
+        title: "型号", 
+        inputType: "Input",
+        disabled:true,
+        readonly:true,
+      },
       { //isMedicine  isMedicineValue
         key: "isMedcine",
-         title: "医药物料", 
-         inputType: "Input", 
-         width: 180 
+        title: "医药物料", 
+        inputType: "Input", 
+        width: 180,
+        disabled:true,
+        readonly:true,
         },
       { // manufacturerId  manufacturerIdName
         key: "manufacturer",
         title: "生产厂家代理人",
         inputType: "Input",
-        width: 180 
+        width: 180,
+        disabled:true,
+        readonly:true,
       },
       { 
         key: "isDrug",
@@ -454,6 +468,8 @@ export const TabColumns = [
         key: "unit", 
         title: "单位", 
         inputType: "Input",
+        disabled:true,
+        readonly:true,
        },
       {
         key: "qty",
@@ -467,8 +483,8 @@ export const TabColumns = [
       { //materialRate  materialRateName
         key: "tax", 
         title: "税率",
-         inputType: "Input",
-         },
+        inputType: "Input",
+      },
       { key: "taxDeductMoneya", title: "折扣金额", inputType: "Input", },
       { key: "arrivalQty", title: "已到货数量", inputType: "Input", },
       { key: "unarrivedQty", title: "未到货数量", inputType: "Input", },
@@ -520,14 +536,18 @@ export const TabColumns = [
         title: "存储条件",
         inputType: "Select",
         referName: "sys_storage_condition", // 字典名
-        width: 180
+        width: 180,
+        disabled:true,
+        readonly:true,
       },
       { // transportationCondition  transportationConditionName
         key: "carriageCondition",
         title: "运输条件",
         inputType: "Select",
         referName: "sys_conditions_carriage", // 字典名
-        width: 180
+        width: 180,
+        disabled:true,
+        readonly:true,
       },
 
       { key: "isBatchLock", title: "批号锁定标识", inputType: "Checkbox", },
@@ -559,26 +579,34 @@ export const TabColumns = [
         key: "materialClassifyOneName", 
         title: "物料一级分类名称", 
         inputType: "Input",
-         width: 180 
-        },
+        width: 180,
+        disabled:true,
+        readonly:true, 
+      },
       { //twoClass
         key: "materialClassifyTwoName",
-         title: "物料二级分类名称", 
-         inputType: "Input",
-          width: 180
-         },
+        title: "物料二级分类名称", 
+        inputType: "Input",
+        width: 180,
+        disabled:true,
+        readonly:true, 
+      },
       { //threeClass
         key: "materialClassifyThreeName", 
         title: "物料三级分类名称", 
         inputType: "Input", 
-        width: 180 
+        width: 180,
+        disabled:true,
+        readonly:true,
       },
       { //fourClass
         key: "materialClassifyFourName", 
         title: "物料四级分类名称",
-         inputType: "Input", 
-         width: 180 
-        },
+        inputType: "Input", 
+        width: 180,
+        disabled:true,
+        readonly:true,
+      },
       { 
         key: "price",
         title: "无税单价",
@@ -590,7 +618,7 @@ export const TabColumns = [
     title: '执行结果',
     key: 'puOrderExecuteList',
     tableColumns: [
-      { key: "orderId", title: "采购订单ID", inputType: "Input", width: 180 },
+      // { key: "orderId", title: "采购订单ID", inputType: "Input", width: 180 },
       { key: "rowno", title: "行号", inputType: "Input", },
       {
         key: "materialName",
@@ -620,7 +648,13 @@ export const TabColumns = [
         queryParams: () => ({}),
         width: 180
       },
-      { key: "specification", title: "规格", inputType: "Input", },
+      { 
+        key: "specification",
+        title: "规格", 
+        inputType: "Input", 
+        disabled:true,
+        readonly:true, 
+      },
       {
         key: "qty",
         title: "数量",

+ 9 - 1
src/views/purchase/purchase-order/add/index.vue

@@ -199,7 +199,7 @@ export default {
     // 保存
     async handleSava() {
       // orderAddForm
-      console.log(this.params.sysFileRecordList, "params");
+      console.log(this.params, "params");
 
       // this.$refs['orderAddForm'].validate(async (valid) => {
       //   if (valid) {
@@ -285,6 +285,13 @@ export default {
       }
     },
 
+    // 下卡框选择改变
+    handleChangeSelect(val,typeName){
+      if(val === 'billType'){
+       this.params['billTypeName'] = this.dict.type[typeName].find(item => item.value == this.params[val]).label;
+      }
+    },
+
   },
   created() {
     console.log("ADD CREATED", this.params)
@@ -376,6 +383,7 @@ export default {
                 :clearable="column.clearable" 
                 :placeholder="column.placeholder" 
                 style="width: 100%"
+                @change="handleChangeSelect(column.key,column.referName)"
                 >
                 <el-option 
                   v-for="item in dict.type[column.referName]" 

+ 1 - 1
src/views/purchase/purchase-order/column.js

@@ -21,7 +21,7 @@ export const TableColumns = [
     title: "单据状态",
     inputType: "Select",
     width:80,
-    referName: "sys_status", // 字典名
+    referName: "documents_status", // 字典名
   },
   { key: "billDate", title: "订单日期" },
   // { key: "supplier", title: "供应商" },

+ 15 - 5
src/views/purchase/purchase-order/components/FileUploadCenter/index.vue

@@ -23,9 +23,11 @@
 
       <li :key="file.fileUrl" class="el-upload-list__item ele-upload-list__item-content"
         v-for="(file, index) in fileList">
-        <!-- <el-link :href="`${baseUrl}${file.fileUrl}`" :underline="false" target="_blank"> -->
-        <el-link :href="`${baseUrl}${file.fileUrl}`" :underline="false" target="_blank">
-          <!-- <span class="el-icon-document"> {{ getFileName(file.name) }} </span> -->
+        <el-link
+          :href="`${baseUrl}?id=${file.fileFastId}`"
+          :underline="false"
+          target="_blank"
+        >
           <span class="el-icon-document"> {{ file.fileName }} </span>
         </el-link>
         <div class="ele-upload-list__item-content-action">
@@ -75,8 +77,16 @@ export default {
     return {
       number: 0,
       uploadList: [],
-      baseUrl: '/sy-derom',
-      uploadFileUrl: "/sy-derom/document-center/fastdfs/upload", // 上传文件服务器地址
+      // baseUrl: '/sy-derom',
+      // uploadFileUrl: "/sy-derom/document-center/fastdfs/upload", // 上传文件服务器地址
+      baseUrl: "https://sy.derom.com/document-center/fastdfs/download",
+      uploadFileUrl:
+        process.env.NODE_ENV == "development"
+          ? "/drp-file/document-center/fastdfs/upload"
+          : "/document-center/fastdfs/upload",
+      headers: {
+        Authorization: "Bearer " + getToken(),
+      },
       fileList: [],
     };
   },

+ 26 - 7
src/views/purchase/purchase-order/index.vue

@@ -146,15 +146,34 @@ export default {
       }
     },
     // 删除操作
-    async handleDeleteList(row) {
+     handleDeleteList(row) {
       try {
         this.loading = true;
-        const { id } = row;
-        console.log(id, 'id');
-        const { code, msg } = await orderApi.remove(id);
-        if (code === 200) {
-          this.fetchList(this.params, this.page);
-        }
+
+        this.$confirm('此操作将删除该订单, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then( async() => {
+
+          const { id } = row;
+
+          const { code } = await orderApi.remove(id);
+          
+          if (code === 200) {
+
+            this.fetchList(this.params, this.page);
+
+          }
+
+        }).catch(() => {
+
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });          
+        });
+        
       } catch (err) {
         //
       } finally {