|
@@ -336,26 +336,30 @@ export default {
|
|
|
},
|
|
|
// 删除出库单
|
|
|
delStockOutList (row) {
|
|
|
- if(this.sendBillStockOutList&&this.sendBillStockOutList.length==1){
|
|
|
+ if (this.sendBillStockOutList && this.sendBillStockOutList.length == 1) {
|
|
|
this.$message.warning('发货单必须关联相关出库单号!')
|
|
|
- return
|
|
|
+ return
|
|
|
}
|
|
|
const ri = this.sendBillStockOutList.findIndex(item => row.stockOutSn == item.stockOutSn)
|
|
|
// 新加的
|
|
|
- if (row.id) {
|
|
|
+ if (ri > -1) {
|
|
|
this.sendBillStockOutList.splice(ri, 1)
|
|
|
this.getProductTotal()
|
|
|
- } else {
|
|
|
- // 删除后修改发货状态
|
|
|
- this.spinning = true
|
|
|
- deleteSendBillStockOut({ stockOutSn: row.stockOutSn, sendBillSn: this.form.sendBillSn }).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- this.sendBillStockOutList.splice(ri, 1)
|
|
|
- this.getProductTotal()
|
|
|
- }
|
|
|
- this.spinning = false
|
|
|
- })
|
|
|
}
|
|
|
+ // if (row.id) {
|
|
|
+ // this.sendBillStockOutList.splice(ri, 1)
|
|
|
+ // this.getProductTotal()
|
|
|
+ // } else {
|
|
|
+ // // 删除后修改发货状态
|
|
|
+ // this.spinning = true
|
|
|
+ // deleteSendBillStockOut({ stockOutSn: row.stockOutSn, sendBillSn: this.form.sendBillSn }).then(res => {
|
|
|
+ // if (res.status == 200) {
|
|
|
+ // this.sendBillStockOutList.splice(ri, 1)
|
|
|
+ // this.getProductTotal()
|
|
|
+ // }
|
|
|
+ // this.spinning = false
|
|
|
+ // })
|
|
|
+ // }
|
|
|
},
|
|
|
// 编辑
|
|
|
getDetail (data) {
|