Forráskód Böngészése

库存表格优化:调整发货块数显示逻辑及列初始化方式

yusheng 10 hónapja
szülő
commit
b8c33d20e3

+ 18 - 18
src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue

@@ -505,6 +505,7 @@
         columnsVersion: 1,
         isWarehouseId: 0,
         blockCountColumn: {},
+        columns: [],
         form: {
           datasource: []
         },
@@ -512,6 +513,7 @@
       };
     },
     created() {
+      this.getColumns();
       this.requestDict('产地');
       this.requestDict('生产类型');
       parameterGetByCode({
@@ -534,7 +536,7 @@
           this.blockCountColumn = {
             width: 150,
             prop: 'blockCount',
-            label: '发货数',
+            label: '发货数',
             slot: 'blockCount',
             headerSlot: 'headerBlockCount',
             align: 'center'
@@ -545,11 +547,22 @@
           };
         }
         return clientEnvironmentId;
+      }
+    },
+    methods: {
+      downloadFile(file) {
+        getFile({ objectName: file.storePath }, file.name);
       },
-      columns() {
-        let columnsVersion = this.columnsVersion;
-
-        return [
+      //发货明细选择
+      stockLedgerSelect(row, index) {
+        this.curIndex = index;
+        this.stockLedgerDialogFlag = true;
+        this.$nextTick(() => {
+          this.$refs.stockLedgerDialogRef.init(row.sendProductDetail, row);
+        });
+      },
+      getColumns() {
+        this.columns = [
           {
             width: 45,
             type: 'index',
@@ -922,19 +935,6 @@
             showOverflowTooltip: true
           }
         ];
-      }
-    },
-    methods: {
-      downloadFile(file) {
-        getFile({ objectName: file.storePath }, file.name);
-      },
-      //发货明细选择
-      stockLedgerSelect(row, index) {
-        this.curIndex = index;
-        this.stockLedgerDialogFlag = true;
-        this.$nextTick(() => {
-          this.$refs.stockLedgerDialogRef.init(row.sendProductDetail, row);
-        });
       },
       // changeCount1(row, index) {
       //   this.tableHandleKeyUp(row, index, 'sum');

+ 2 - 4
src/views/saleManage/saleOrder/invoice/components/inventoryTableDetails.vue

@@ -57,9 +57,7 @@
       this.requestDict('生产类型');
     },
     computed: {
-      clientEnvironmentId() {
-        return this.$store.state.user.info.clientEnvironmentId;
-      },
+
       columns() {
         let columnsVersion=this.columnsVersion
         return [
@@ -233,7 +231,7 @@
             label: '发货块数',
             slot: 'blockCount',
             align: 'center',
-            show: this.clientEnvironmentId == '4'
+            show: false
           },
           {
             width: 120,