Browse Source

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

yusheng 10 tháng trước cách đây
mục cha
commit
032e77f7a5

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

@@ -141,7 +141,7 @@
           <el-input v-model="row.productionCodes" v-no-chinese></el-input>
         </el-form-item>
       </template>
-      <template v-slot:blockCount="scope" v-if="clientEnvironmentId==4">
+      <template v-slot:blockCount="scope">
         <el-form-item
           :prop="'datasource.' + scope.$index + '.blockCount'"
           :rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
@@ -505,6 +505,7 @@
         columnsVersion: 1,
         isWarehouseId: 0,
         blockCountColumn: {},
+        clientEnvironmentId: '',
         columns: [],
         form: {
           datasource: []
@@ -527,12 +528,12 @@
     computed: {
       canHandl() {
         return this.form.datasource.length;
-      },
-
-      clientEnvironmentId() {
-        return this.$store.state.user.info.clientEnvironmentId;
       }
     },
+    mounted() {
+      this.clientEnvironmentId =
+        this.$store.state.user.info.clientEnvironmentId;
+    },
     methods: {
       downloadFile(file) {
         getFile({ objectName: file.storePath }, file.name);
@@ -707,14 +708,16 @@
             slot: 'measuringUnit',
             align: 'center'
           },
-          {
-            width: 150,
-            prop: 'blockCount',
-            label: '发货块数',
-            slot: 'blockCount',
-            align: 'center',
-            show: false
-          },
+          this.clientEnvironmentId == 3
+            ? {
+                width: 150,
+                prop: 'blockCount',
+                label: '发货块数',
+                slot: 'blockCount',
+                align: 'center',
+                show: false
+              }
+            : { width: 1 },
 
           {
             width: 120,