This commit is contained in:
linfso 2025-02-19 10:30:37 +08:00
parent 40ebe5f549
commit 485eb807d1

View File

@ -331,7 +331,7 @@
</XdTable>
<div style="text-align: center;margin-bottom: 10px;" v-if="!disabled">
<el-button type="primary" @click="submitAddCoPackForm">保存批次</el-button>
<el-button type="primary" :loading="isDoing" @click="submitAddCoPackForm">保存批次</el-button>
<el-button @click="handleCancelCo">取 消</el-button>
</div>
@ -347,7 +347,7 @@
</el-form>
<!-- :loading="isDoing" -->
<div slot="footer" class="dialog-footer" style="text-align:center">
<el-button type="primary" @click="submitFormBatch">确定</el-button>
<el-button type="primary" @click="submitFormBatch">确定</el-button>
<el-button @click="cancelBatch">取 消</el-button>
</div>
</el-dialog>
@ -1009,14 +1009,14 @@ export default {
return;
}
// this.form.etd = parseTime(this.form.carTime, '{y}-{m}-{d} {h}:{i}:{s}');
// 新增
if(this.coPackType == "add")
{
this.isDoing=true;
let response = await addEmisTmsSiteBatch(this.form);
if(!response || response.code != 200){
this.isDoing=false;
this.$modal.msgError(response && response.msg || '新增组批次失败')
return;
}
@ -1034,6 +1034,7 @@ export default {
let response = await addEmisTmsSiteBatchDtl(packDetail);
if(!response || response.code != 200){
this.isDoing=false;
this.$modal.msgError(response && response.msg || '组批次明细新增失败')
return;
}
@ -1055,15 +1056,24 @@ export default {
}
let resLD = await addEmisTmsSiteBatchLoading(batchLoadingData);
if(!resLD || resLD.code != 200){
this.isDoing=false;
this.$modal.msgError(resLD && resLD.msg || '组批次配载明细新增失败')
return;
}
}
}
this.isDoing=false;
}
else if(this.coPackType == "edit"){// 修改
else if(this.coPackType == "edit"){
// 修改
this.isDoing=true;
let res = await updateEmisTmsSiteBatch(this.form);
if(!res || res.code != 200){
this.isDoing=false;
this.$modal.msgError(res && res.msg || '未知错误')
return;
}
@ -1078,6 +1088,7 @@ export default {
}
let resLD = await updateEmisTmsSiteBatchLoading(batchLoadingData);
if(!resLD || resLD.code != 200){
this.isDoing=false;
this.$modal.msgError(resLD && resLD.msg || '组批次配载明细新增失败')
return;
}
@ -1085,6 +1096,7 @@ export default {
}
}
}
this.isDoing=false;
this.$modal.msgSuccess('操作成功!');
this.$emit("on-changed");
@ -1267,7 +1279,8 @@ export default {
afterList.push(this.tempExistCoPackWayBillList[ai]);
}
}
this.tempExistCoPackWayBillList = afterList;//this.tempExistCoPackWayBillList.filter(item => {idsArrTemp.indexOf(item.id) == -1})
this.tempExistCoPackWayBillList = afterList;
//this.tempExistCoPackWayBillList.filter(item => {idsArrTemp.indexOf(item.id) == -1})
this.computeTotal();
// 更新主表