chenrui il y a 3 ans
Parent
commit
0966b286b7

+ 16 - 4
src/views/inventoryManagement/satelliteWarehouseInventory/addModal.vue

@@ -49,7 +49,7 @@
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button type="link" @click="handleRemove(record)" id="satelliteWarehouseInventoryList-remove-btn">移除</a-button>
+            <a-button type="link" @click="handleConfirm(record)" id="satelliteWarehouseInventoryList-remove-btn">移除</a-button>
           </template>
         </s-table>
         <div class="btn-cont">
@@ -136,7 +136,7 @@ export default {
         if (res.status == 200) {
           this.$router.push({ name: 'salesEdit', params: { id: res.data.id, sn: res.data.salesBillSn, priceType: res.data.priceType } })
           this.spinning = false
-        }else{
+        } else {
           this.spinning = false
         }
       })
@@ -156,11 +156,23 @@ export default {
         if (res.status == 200) {
           this.$refs.table.refresh(true)
           this.spinning = false
-        }else{
+        } else {
           this.spinning = false
         }
       })
     },
+    //  弹框确认
+    handleConfirm (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '移除后不可恢复,确定要进行移除吗?',
+        centered: true,
+        onOk () {
+          _this.handleRemove(row)
+        }
+      })
+    },
     //  补货数量  change
     onChange (val, row) {
       val > 0 ? this.handleQty(val, row) : this.handleRemove(row)
@@ -176,7 +188,7 @@ export default {
         if (res.status == 200) {
           this.$refs.table.refresh(true)
           this.spinning = false
-        }else{
+        } else {
           this.spinning = false
         }
       })