|
|
|
@ -227,10 +227,13 @@ export default { |
|
|
|
|
this.billListMeth() |
|
|
|
|
// this.$set(this.billData.list,this.billData.index,this.billAddData) |
|
|
|
|
this.$message.success(res.msg) |
|
|
|
|
this.dialogDelivery = false |
|
|
|
|
this.dialogDelivery = false; |
|
|
|
|
console.log('更新前',this.billData) |
|
|
|
|
this.$emit('billOfLading', this.billData, 2); |
|
|
|
|
this.$forceUpdate() |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.$emit('billOfLading', this.billData, 2) |
|
|
|
|
}, |
|
|
|
|
billSubmit(e, index) { |
|
|
|
|
if (e.deliveryStatus == 'PLATENUM_SUCCESS') { |
|
|
|
@ -275,39 +278,41 @@ export default { |
|
|
|
|
this.dialogBillAdd = true |
|
|
|
|
}, |
|
|
|
|
//创建修改提货单 |
|
|
|
|
billAddSave(e, item) { |
|
|
|
|
async billAddSave(e, item) { |
|
|
|
|
if (!e) { |
|
|
|
|
this.$refs["form"].validate((valid) => { |
|
|
|
|
this.$refs["form"].validate( async (valid) => { |
|
|
|
|
if (valid) { |
|
|
|
|
this.billAddData.orderId = this.controlWindows.addInfo.id |
|
|
|
|
this.billAddData.productMeasurement = this.controlWindows.addInfo.productMeasurement |
|
|
|
|
order.billSave(this.billAddData).then(res => { |
|
|
|
|
await order.billSave(this.billAddData).then(res => { |
|
|
|
|
if (res.code == 20000) { |
|
|
|
|
this.billAddData.deliveryStatus = 'SUBMITED' |
|
|
|
|
this.billData.list.push(this.billAddData) |
|
|
|
|
this.billListMeth() |
|
|
|
|
this.$message.success(res.msg) |
|
|
|
|
this.dialogBillAdd = false; |
|
|
|
|
this.$emit('billOfLading', this.billData.orderInfo, 2) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
this.$confirm(`确定${e==1?'修改':'锁定'}提货单?`, '提示', { type: 'error' }).then(() => { |
|
|
|
|
this.$confirm(`确定${e == 1 ? '修改' : '锁定'}提货单?`, '提示', { type: 'error' }).then( async () => { |
|
|
|
|
// this.billAddData = item ? JSON.parse(JSON.stringify(item)) : {}; |
|
|
|
|
this.billAddData.deliveryStatus = e == 2 ? 'PLATENUM_LOCKED' : ''; |
|
|
|
|
console.log(this.billAddData, 'this.billAddData') |
|
|
|
|
order.update(this.billAddData).then(res => { |
|
|
|
|
await order.update(this.billAddData).then(res => { |
|
|
|
|
if (res.code == 20000) { |
|
|
|
|
this.billListMeth() |
|
|
|
|
this.$message.success(res.msg) |
|
|
|
|
this.dialogBillAdd = false; |
|
|
|
|
|
|
|
|
|
this.$emit('billOfLading', this.billData.orderInfo, 2) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
this.$emit('billOfLading', this.billData.orderInfo, 2) |
|
|
|
|
}; |
|
|
|
|
console.log('代码底部'); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//更新提货单数据 |
|
|
|
|
billListMeth() { |
|
|
|
|