Browse Source

修改bug

chenrui 2 năm trước cách đây
mục cha
commit
e412ce5431

+ 14 - 11
src/views/numsGoodsShelves/recallManagement/addRecallBillModal.vue

@@ -274,19 +274,22 @@ export default {
         this.$message.warning('请先选择产品')
         return
       }
+      const flag = this.rowSelectionInfo.selectedRows.some(con => !con.confirmQty && con.confirmQty != 0)
+      if (flag) {
+        this.$message.warning('调回数量能为空!')
+        return
+      }
       const arr = []
       this.rowSelectionInfo.selectedRows.forEach((item, index) => {
-        if (item.confirmQty) {
-          arr.push({
-            shelfSn: item.shelfSn,
-            shelfPlaceSn: item.shelfPlaceSn,
-            shelfPlaceCode: item.shelfPlaceCode,
-            productSn: item.productSn,
-            productCode: item.productCode,
-            productName: item.productName,
-            qty: item.confirmQty
-          })
-        }
+        arr.push({
+          shelfSn: item.shelfSn,
+          shelfPlaceSn: item.shelfPlaceSn,
+          shelfPlaceCode: item.shelfPlaceCode,
+          productSn: item.productSn,
+          productCode: item.productCode,
+          productName: item.productName,
+          qty: item.confirmQty
+        })
       })
       _this.spinning = true
       const params = {

+ 6 - 1
src/views/numsGoodsShelves/recallManagement/recallModal.vue

@@ -102,7 +102,12 @@ export default {
     // 保存
     handleSave () {
       const _this = this
-      this.$confirm({
+      const flag = _this.list.some(con => !con.confirmQty && con.confirmQty != 0)
+      if (flag) {
+        _this.$message.warning('实退数量不能为空!')
+        return
+      }
+      _this.$confirm({
         title: '提示',
         content: '此操作将会扣减数字货架的库存,确认退库吗?',
         centered: true,