Browse Source

fix:3788【需求管理】采购订单选择来源需求采购需求,下发订单成功后,这里的已采数量跟待采数量需要获取到

mlchen 1 week ago
parent
commit
d8d5dcbe95

+ 4 - 2
src/views/purchasingManage/purchaseNeedManage/components/detailDialog.vue

@@ -285,7 +285,8 @@
             label: '已采数量',
             align: 'center',
             formatter: (row, column) => {
-              if (row.doneTotalCount) {
+              // 已采数量由后端下发(采购订单口径),0 也是有效值,不能当空值吞掉
+              if (row.doneTotalCount != null) {
                 return row.doneTotalCount + ' ' + (row.measuringUnit || '');
               }
             }
@@ -296,7 +297,8 @@
             label: '待采数量',
             align: 'center',
             formatter: (row, column) => {
-              if (row.waitTotalCount) {
+              // 待采数量为 0 表示已采足,需显示 0 而不是留空
+              if (row.waitTotalCount != null) {
                 return row.waitTotalCount + ' ' + (row.measuringUnit || '');
               }
             }