Parcourir la source

fix:5609【发货单审批】发替代料的去审批,界面物品清单产品跟替代料都会显示,提嗲了的发货数量没有显示出来

mlchen il y a 2 semaines
Parent
commit
e86b50091d

+ 10 - 2
src/views/bpm/handleTask/components/saleOrder/invoice/detailDialog.vue

@@ -406,9 +406,12 @@
             label: '发货数量',
             slot: 'saleCount',
             formatter: (row, column) => {
-              if (row.saleCount) {
+              if (row.saleCount && row.saleUnit) {
                 return row.saleCount + ' ' + row.saleUnit;
               }
+              if (row.orderProductType === 2 && row.totalCount != null) {
+                return row.totalCount + ' ' + row.measuringUnit;
+              }
             },
             headerSlot: 'headerTotalCount',
             align: 'center'
@@ -700,8 +703,13 @@
         }
       },
       getSummaries(param) {
+        const data = param.data.map((row) =>
+          row.orderProductType === 2 && (!row.saleCount || !row.saleUnit)
+            ? { ...row, saleCount: row.totalCount }
+            : row
+        );
         return getSummaries(
-          param,
+          { ...param, data },
           ['saleCount', 'blockCount', 'totalCount'],
           ' '
         );