refactor(wms/coil): 过滤不必要的请求参数后调用更新接口

在三个钢卷相关的页面中,提取请求载荷时排除status、exclusiveStatus、dataType字段,仅传递有效参数给更新接口
This commit is contained in:
2026-05-13 14:01:13 +08:00
parent 067fd7c9fb
commit 05bd620811
3 changed files with 12 additions and 3 deletions

View File

@@ -832,7 +832,10 @@ export default {
this.buttonLoading = true; this.buttonLoading = true;
if (this.form.coilId) { if (this.form.coilId) {
// 更新 // 更新
updateMaterialCoilSimple(this.form).then(_ => { const { status, exclusiveStatus, dataType, ...payload} = {
...this.form,
}
updateMaterialCoilSimple(payload).then(_ => {
this.$modal.msgSuccess("修正成功"); this.$modal.msgSuccess("修正成功");
this.correctVisible = false; this.correctVisible = false;
this.getMaterialCoil(); this.getMaterialCoil();

View File

@@ -812,7 +812,10 @@ export default {
} }
this.buttonLoading = true; this.buttonLoading = true;
// 更新钢卷信息 // 更新钢卷信息
updateMaterialCoilSimple(this.form).then(_ => { const { status, exclusiveStatus, dataType, ...payload} = {
...this.form,
}
updateMaterialCoilSimple(payload).then(_ => {
this.$modal.msgSuccess("修正成功"); this.$modal.msgSuccess("修正成功");
this.correctVisible = false; this.correctVisible = false;
this.getMaterialCoil(); this.getMaterialCoil();

View File

@@ -2061,7 +2061,10 @@ export default {
if (valid) { if (valid) {
this.buttonLoading = true; this.buttonLoading = true;
if (this.form.coilId != null) { if (this.form.coilId != null) {
updateMaterialCoilSimple(this.form).then(_ => { const { status, exclusiveStatus, dataType, ...payload} = {
...this.form,
}
updateMaterialCoilSimple(payload).then(_ => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();