Ver código fonte

处理部分字段展示问题,处理修订与编辑状态下子表禁用问题

002390 2 anos atrás
pai
commit
8128f261b2

+ 1 - 0
package.json

@@ -51,6 +51,7 @@
     "js-beautify": "1.13.0",
     "js-cookie": "3.0.1",
     "jsencrypt": "3.0.0-rc.1",
+    "lodash": "^4.17.21",
     "nprogress": "0.2.0",
     "quill": "1.3.7",
     "screenfull": "5.0.2",

+ 26 - 25
src/views/purchase/purchase-order/add/column.js

@@ -381,24 +381,24 @@ export const Columns = [
   { key: "midOrderNo", title: "中台采购订单号", inputType: "Input", isShow:true, },
   { key: "marketingCode", title: "销售订单号", inputType: "Input", isShow:true, },
   { key: "isArrival", title: "到货超期", inputType: "Checkbox",  isShow:true,},
-  { key: "createByName", title: "创建人名称", inputType: "Input", isShow:false, },
-  { key: "updateByName", title: "更新人名称", inputType: "Input", isShow:false, },
-  // { key: "flowId", title: "OA流程ID", inputType: "Input", isShow:false, },
-  { key: "approver", title: "审批人", inputType: "Input", isShow:false, },
+  { key: "createByName", title: "创建人", inputType: "Input", isShow:false, },
   {
-    key: "approverFinishTime",
-    title: "审批时间",
+    key: "approveTime",
+    title: "提交时间",
     inputType: "DatePicker",
     valueFormat: "yyyy-MM-dd",
     isShow:false,
   },
+  { key: "approver", title: "审批人", inputType: "Input", isShow:false, },
   {
-    key: "approveTime",
-    title: "提交时间",
+    key: "approverFinishTime",
+    title: "审批时间",
     inputType: "DatePicker",
     valueFormat: "yyyy-MM-dd",
     isShow:false,
   },
+  { key: "updateByName", title: "更新人", inputType: "Input", isShow:false, },
+  // { key: "flowId", title: "OA流程ID", inputType: "Input", isShow:false, },
   {
     key: "sysFileRecordList",
     title: "附件",
@@ -444,7 +444,7 @@ export const TabColumns = [
           material: "id",
           materialName: "name",
           materialCode: "code",
-          materialClassify:'classifyIdName',
+          // materialClassify:'classifyIdName',
           materialManufacturersCode:'manufacturersMaterialCode',
           specification:'specification',
           model:'model',
@@ -474,14 +474,14 @@ export const TabColumns = [
         disabled:true,
         readonly:true,
       },
-      { //classifyIdName   classifyId
-        key: "materialClassify",
-        title: "物料分类", 
-        inputType: "Input",
-        width: 180,
-        disabled:true,
-        readonly:true, 
-      },
+      // { //classifyIdName   classifyId
+      //   key: "materialClassify",
+      //   title: "物料分类", 
+      //   inputType: "Input",
+      //   width: 180,
+      //   disabled:true,
+      //   readonly:true, 
+      // },
       { // manufacturersMaterialCode  manufacturersMaterialName
         key: "materialManufacturersCode",
          title: "厂家物料编码", 
@@ -665,7 +665,7 @@ export const TabColumns = [
 
       { key: "isBatchLock", title: "批号锁定标识", inputType: "Checkbox", },
       { key: "isReplenishment", title: "补单标识", inputType: "Checkbox", },
-      { key: "isUrgency", title: "紧急标识", inputType: "Input", },
+      { key: "isUrgency", title: "紧急标识", inputType: "Checkbox", },
       { key: "originalQty", title: "原始数量", inputType: "Input", disabled:true,},
       { key: "originalMoney", title: "原始金额", inputType: "Input", disabled:true,},
       { key: "directProductBatch", title: "直运产品批号", inputType: "Input", width: 180 },
@@ -692,11 +692,10 @@ export const TabColumns = [
         width: 180,
       },
       { key: "isDistributionPrice", title: "配送价", inputType: "Input", },
-      { key: "createByName", title: "创建人名称", inputType: "Input", },
-      { key: "updateByName", title: "更新人名称", inputType: "Input", },
+     
       { //threeClass
         key: "materialClassifyOneName", 
-        title: "物料一级分类名称", 
+        title: "物料一级分类", 
         inputType: "Input",
         width: 180,
         disabled:true,
@@ -704,7 +703,7 @@ export const TabColumns = [
       },
       { //twoClass
         key: "materialClassifyTwoName",
-        title: "物料二级分类名称", 
+        title: "物料二级分类", 
         inputType: "Input",
         width: 180,
         disabled:true,
@@ -712,7 +711,7 @@ export const TabColumns = [
       },
       { //threeClass
         key: "materialClassifyThreeName", 
-        title: "物料三级分类名称", 
+        title: "物料三级分类", 
         inputType: "Input", 
         width: 180,
         disabled:true,
@@ -720,12 +719,14 @@ export const TabColumns = [
       },
       { //fourClass
         key: "materialClassifyFourName", 
-        title: "物料四级分类名称",
+        title: "物料四级分类",
         inputType: "Input", 
         width: 180,
         disabled:true,
         readonly:true,
       },
+      { key: "createByName", title: "创建人", inputType: "Input", },
+      { key: "updateByName", title: "更新人", inputType: "Input", },
       
     ]
   },
@@ -752,7 +753,7 @@ export const TabColumns = [
           material: "id",
           materialName: "name",
           materialCode: "code",
-          materialClassify:'classifyIdName',
+          // materialClassify:'classifyIdName',
           materialManufacturersCode:'manufacturersMaterialCode',
           specification:'specification',
           model:'model',

+ 9 - 11
src/views/purchase/purchase-order/column.js

@@ -150,7 +150,7 @@ export const TabColumns = [
       { key: "material", title: "物料ID" },
       { key: "materialName", title: "物料名称", width: 180 },
       { key: "materialCode", title: "物料编码", width: 180 },
-      { key: "materialClassify", title: "物料分类", width: 180 },
+      // { key: "materialClassify", title: "物料分类", width: 180 },
       { key: "materialManufacturersCode", title: "厂家物料编码", width: 180 },
       { key: "specification", title: "规格", width: 180 },
       { key: "model", title: "型号", width: 180 },
@@ -242,7 +242,12 @@ export const TabColumns = [
         inputType: 'Checkbox',
         width:80,
       },
-      { key: "isUrgency", title: "紧急标识" },
+      { 
+        key: "isUrgency", 
+        title: "紧急标识" ,
+        inputType: 'Checkbox',
+        width:80,
+      },
       { key: "originalQty", title: "原始数量" },
       { key: "originalMoney", title: "原始金额" },
       { key: "directProductBatch", title: "直运产品批号", width: 180 },
@@ -267,19 +272,12 @@ export const TabColumns = [
         inputType: 'Checkbox',
         width:80,
        },
-      // { key: "tenantId", title: "租户号" },
-      // { key: "revision", title: "乐观锁" },
-      { key: "createByName", title: "创建人" },
-      { key: "updateByName", title: "更新人" },
-      // { key: "delFlag", title: "删除标记" },
-      // { key: "materialClassifyOne", title: "物料一级分类" },
       { key: "materialClassifyOneName", title: "物料一级分类", width: 180 },
-      // { key: "materialClassifyTwo", title: "物料二级分类" },
       { key: "materialClassifyTwoName", title: "物料二级分类", width: 180 },
-      // { key: "materialClassifyThree", title: "物料三级分类" },
       { key: "materialClassifyThreeName", title: "物料三级分类", width: 180 },
-      // { key: "materialClassifyFour", title: "物料四级分类" },
       { key: "materialClassifyFourName", title: "物料四级分类", width: 180 },
+      { key: "createByName", title: "创建人",width:100, },
+      { key: "updateByName", title: "更新人" ,width:100,},
       
     ]
   },

+ 9 - 4
src/views/purchase/purchase-order/edit/index.vue

@@ -25,6 +25,7 @@ export default {
 
       tabColumns: editTabColumns,
       tabName: "puOrderItemList",
+      count:1
     };
   },
   computed: {},
@@ -77,9 +78,12 @@ export default {
     // 判断属性是否禁用
    async handleIsForbidden(status) {
       console.log(status);
-      let { updateColumns, updateTabColumns } = await forbidden(status != '2');
-      this.columns = updateColumns;
-      this.tabColumns = updateTabColumns;
+        let { updateColumns, updateTabColumns } = await forbidden(status != '2');
+        this.columns = updateColumns;
+        this.tabColumns = updateTabColumns;
+        this.count++;
+        console.log(this.columns,'this.columns');
+        console.log(this.tabColumns,'this.tabColumns');
     },
     // 查询详细
     async fetchItem(prop) {
@@ -235,7 +239,7 @@ export default {
        this.params['billTypeName'] = this.dict.type[typeName].find(item => item.value == this.params[val]).label;
       
       }
-      
+
     },
 
      // 子表下拉框改变
@@ -306,6 +310,7 @@ export default {
     @close="$emit('close')"
     >
     <el-form 
+      :key="count"
       v-loading="loading" 
       :size="size" 
       ref="orderEditForm" 

+ 4 - 2
src/views/purchase/purchase-order/edit/initColumn.js

@@ -23,8 +23,10 @@ editTabColumns.forEach(column => {
 // 禁用项
 export const forbidden = (isEdit) => {
 
-  let updateColumns = deepCopy(editColumns);
-  let updateTabColumns = deepCopy(editTabColumns);
+  // let updateColumns = deepCopy(editColumns);
+  // let updateTabColumns = deepCopy(editTabColumns);
+  let updateColumns = _.cloneDeep(editColumns);
+  let updateTabColumns = _.cloneDeep(editTabColumns);
 
   console.log(isEdit, 'isEdit');
   

+ 1 - 0
src/views/purchase/purchase-order/index.vue

@@ -80,6 +80,7 @@ export default {
 
     // 刷新操作
     handleRefreshList() {
+      this.page = initPage();
       this.fetchList(this.params, this.page);
     },
     // 查询操作