lilei 6 days ago
parent
commit
6ec62eeaca
1 changed files with 16 additions and 5 deletions
  1. 16 5
      src/views/salesManagement/waitDispatchNew/edit.vue

+ 16 - 5
src/views/salesManagement/waitDispatchNew/edit.vue

@@ -164,6 +164,7 @@ export default {
     },
     },
     // 批量转采购额
     // 批量转采购额
     convertPromoGifts (list) {
     convertPromoGifts (list) {
+      const _this = this
       this.$message.loading('正在批量转采购额...', 1)
       this.$message.loading('正在批量转采购额...', 1)
       this.isInster = true
       this.isInster = true
       this.spinning = true
       this.spinning = true
@@ -172,12 +173,22 @@ export default {
         salesBillSn: this.salesBillSn
         salesBillSn: this.salesBillSn
       }).then(res => {
       }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
-          this.getOrderDetail()
-          this.$message.success(res.message, 2.5)
-          this.spinning = false
-        } else {
-          this.spinning = false
+          if (res.data == 'OUTING_WAREHOUSE' || res.data == 'FINISH') {
+            _this.$info({
+              title: '提示',
+              content: '当前销售单已被更新为【' + (res.data == 'OUTING_WAREHOUSE' ? '出库中' : '已完结') + '】,将返回列表',
+              centered: true,
+              closable: false,
+              onOk () {
+                _this.handleBack()
+              }
+            })
+          } else {
+            _this.getOrderDetail()
+            _this.$message.success(res.message, 2.5)
+          }
         }
         }
+        this.spinning = false
         this.isInster = false
         this.isInster = false
       })
       })
     },
     },