From 6fb53f6d7bd652cd9f2e7ac7aae959556749d925 Mon Sep 17 00:00:00 2001
From: wuteng <419274783@qq.com>
Date: Wed, 22 Oct 2025 16:39:19 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81=E7=B1=BB=E5=9E=8B=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=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
---
.../emisTransProduct/emisTransProductForm.vue | 11 +++++--
src/views/emis/emisTransProduct/index.vue | 32 ++++++++++++++++---
2 files changed, 37 insertions(+), 6 deletions(-)
diff --git a/src/views/emis/emisTransProduct/emisTransProductForm.vue b/src/views/emis/emisTransProduct/emisTransProductForm.vue
index 524b345b..0e3cc28f 100644
--- a/src/views/emis/emisTransProduct/emisTransProductForm.vue
+++ b/src/views/emis/emisTransProduct/emisTransProductForm.vue
@@ -111,7 +111,11 @@ export default {
props:{
id:{
type:Number
- }
+ },
+ isCopy:{
+ type:Boolean,
+ default:false
+ },
},
components: { CountryPicker,EmisSiteSimplePicker,TransLinePicker },
dicts: [
@@ -318,12 +322,15 @@ export default {
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
- if (this.form.id != null) {
+ if (this.form.id != null && !this.isCopy) {
updateEmisTransProduct(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.$emit("on-changed");
});
} else {
+ if(this.isCopy){
+ this.form.id = null;
+ }
addEmisTransProduct(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.$emit("on-changed");
diff --git a/src/views/emis/emisTransProduct/index.vue b/src/views/emis/emisTransProduct/index.vue
index 9e565a44..b965d60b 100644
--- a/src/views/emis/emisTransProduct/index.vue
+++ b/src/views/emis/emisTransProduct/index.vue
@@ -134,6 +134,16 @@
v-hasPermi="['emis:emisTransProduct:export']"
>导出
+
+ 复制
+
@@ -193,7 +203,7 @@
-
+
@@ -266,6 +276,8 @@ export default {
daterangeCreateTime: [],
// 备注时间范围
daterangeUpdateTime: [],
+ current:null,
+ isCopy: false,
// 查询参数
queryParams: {
pageNum: 1,
@@ -388,12 +400,16 @@ export default {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
+ let [lastObj]=selection.slice(-1);
+ this.current=lastObj;
+
},
/** 新增按钮操作 */
handleAdd(row) {
this.currentId= null ;
- this.openForm = true;
- this.titleForm = "修改";
+ this.openForm = true;
+ this.titleForm = "新增";
+ this.isCopy = false;
},
handleShowMoreInput(){
this.moreInputVisible = !this.moreInputVisible;
@@ -404,7 +420,7 @@ export default {
this.currentId= row.id ;
this.openForm = true;
this.titleForm = "修改";
-
+ this.isCopy = false;
},
handleView(row) {
this.id=row.id;
@@ -488,6 +504,14 @@ export default {
dateTimeChange(value){
this.dateTimeRange=value;
},
+ handleCopy() {
+ // this.resetRefreshId="vipquote-"+this.getUUID();
+
+ this.currentId = this.current.id ;
+ this.openForm = true;
+ this.isCopy = true;
+ this.titleForm = "复制【"+this.current.prodName+"】";
+ },
}
};