Explorar el Código

fix: 修复发货单块数计算未响应式更新的问题

liujt hace 4 meses
padre
commit
5832202b03

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

@@ -803,8 +803,7 @@
           //   slot: 'measuringUnit',
           //   align: 'center'
           // },
-          this.clientEnvironmentId == 4
-            ? {
+          this.clientEnvironmentId == 4 ? {
                 width: 150,
                 prop: 'blockCount',
                 label: '发货块数',
@@ -1282,8 +1281,15 @@
           let modeHight = modelArr[2].substr(0, modelArr[2].indexOf('cm')); // model规格高度
           modeHight = Number(modeHight);
           if (name === 'sum') {
-            row.blockCount = Math.floor(
-              row.totalCount / ((modelLong * modeWide * modeHight) / 1000000)
+            // row.blockCount = Math.floor(
+            //   row.totalCount / ((modelLong * modeWide * modeHight) / 1000000)
+            // );
+            this.$set(
+              this.form.datasource[index],
+              'blockCount',
+              Math.floor(
+                row.totalCount / ((modelLong * modeWide * modeHight) / 1000000)
+              )
             );
           } else if (name === 'blockCount') {
             row.totalCount =