From 111593a61ece96819c43b83e24fdbdd516b5cbeb Mon Sep 17 00:00:00 2001 From: wuteng <419274783@qq.com> Date: Fri, 4 Jul 2025 10:10:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E6=89=B9=E6=AC=A1=E8=A7=84=E5=88=99?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4=E5=A4=8D=E5=88=B6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../emisTransPlanRuleForm.vue | 30 +++++++++++++++---- src/views/emis/emisTransPlanRule/index.vue | 21 +++++++++++-- 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/src/views/emis/emisTransPlanRule/emisTransPlanRuleForm.vue b/src/views/emis/emisTransPlanRule/emisTransPlanRuleForm.vue index 7753a515..a3978189 100644 --- a/src/views/emis/emisTransPlanRule/emisTransPlanRuleForm.vue +++ b/src/views/emis/emisTransPlanRule/emisTransPlanRuleForm.vue @@ -93,6 +93,9 @@ export default { props:{ id:{ type:Number + }, + titleType:{ + type:String, } }, components: { @@ -146,7 +149,7 @@ export default { this.loading = false; }); }else{ - this.reset(); + this.reset(); } }, // 取消按钮 @@ -174,17 +177,34 @@ export default { submitForm() { this.$refs["form"].validate(valid => { if (valid) { - if (this.form.id != null) { + // if (this.form.id != null) { + if(this.titleType=="edit"){ updateEmisTransPlanRule(this.form).then(response => { this.$modal.msgSuccess("修改成功"); this.$emit("on-changed"); }); - } else { + } else if(this.titleType=="add"){ addEmisTransPlanRule(this.form).then(response => { this.$modal.msgSuccess("新增成功"); - this.$emit("on-changed"); + this.$emit("on-changed"); }); - } + } else if(this.titleType=="copy"){ + let newform ={ + endDate:this.form.endDate, + remark:this.form.remark, + lineCode:this.form.lineCode, + productType:this.form.productType, + startSiteCode:this.form.startSiteCode, + nextSiteCode:this.form.nextSiteCode, + manager:this.form.manager, + supplierCode:this.form.supplierCode, + startDate:this.form.startDate, + }; + addEmisTransPlanRule(newform).then(response => { + this.$modal.msgSuccess("复制成功"); + this.$emit("on-changed"); + }); + } } }); }, diff --git a/src/views/emis/emisTransPlanRule/index.vue b/src/views/emis/emisTransPlanRule/index.vue index ad4b28d6..742488db 100644 --- a/src/views/emis/emisTransPlanRule/index.vue +++ b/src/views/emis/emisTransPlanRule/index.vue @@ -133,6 +133,14 @@ v-hasPermi="['emis:emisTransPlanRule:edit']" >按线路重算 + + 复制规则 + @@ -157,7 +165,7 @@ - + @@ -229,7 +237,7 @@ export default { currentId:null, openForm: false, titleForm: "", - + titleType:'', // 弹出展示层 id:null, titleView:"", @@ -298,6 +306,7 @@ export default { this.currentId=null; this.openForm= true; this.titleForm = "新增规则"; + this.titleType="add" }, handleShowMoreInput(){ this.moreInputVisible = !this.moreInputVisible; @@ -320,6 +329,14 @@ export default { this.currentId= row.id||this.ids[0]; this.openForm = true; this.titleForm = "修改规则"; + this.titleType="edit"; + }, + /**复制按钮操作 */ + handleCopy(row){ + this.currentId= row.id||this.ids[0]; + this.openForm = true; + this.titleForm = "复制规则"; + this.titleType="copy"; }, handleView(row) { this.id=row.id;