|
@@ -31,6 +31,11 @@
|
|
|
</selectProduct>
|
|
</selectProduct>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ <el-col :span="6" v-if="tradefields">
|
|
|
|
|
+ <el-form-item :label="$t(`领域`)+':'" prop="sequence">
|
|
|
|
|
+ {{tradefields}}
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
<p class="normal-title normal-margin">
|
|
<p class="normal-title normal-margin">
|
|
|
{{$t(`添加产品`)}}
|
|
{{$t(`添加产品`)}}
|
|
@@ -191,7 +196,8 @@ export default {
|
|
|
tableSelectData:[],
|
|
tableSelectData:[],
|
|
|
productList: [],
|
|
productList: [],
|
|
|
total:0,
|
|
total:0,
|
|
|
- currentPage:0
|
|
|
|
|
|
|
+ currentPage:0,
|
|
|
|
|
+ tradefields:''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
inject:['brandList'],
|
|
inject:['brandList'],
|
|
@@ -245,7 +251,11 @@ export default {
|
|
|
this.tableData = this.tableData.filter((item) => !res.has(item['itemid']) && res.set(item['itemid'], 1));
|
|
this.tableData = this.tableData.filter((item) => !res.has(item['itemid']) && res.set(item['itemid'], 1));
|
|
|
this.form.itemno = this.tableData[0].itemno
|
|
this.form.itemno = this.tableData[0].itemno
|
|
|
this.form.itemid = this.tableData[0].itemid
|
|
this.form.itemid = this.tableData[0].itemid
|
|
|
- this.form.itemname = this.tableData[0].itemname
|
|
|
|
|
|
|
+ this.form.itemname = this.tableData[0].itemnam
|
|
|
|
|
+ const all = this.tableData.flatMap(item => item.tradefields);
|
|
|
|
|
+ // 去重 + 用中文逗号连接
|
|
|
|
|
+ this.tradefields = [...new Set(all)].join(',');
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
deleteProduct (row) {
|
|
deleteProduct (row) {
|
|
|
this.tableData = this.tableData.filter(e=>{
|
|
this.tableData = this.tableData.filter(e=>{
|
|
@@ -255,6 +265,9 @@ export default {
|
|
|
this.form.itemno = ''
|
|
this.form.itemno = ''
|
|
|
this.form.itemname = ''
|
|
this.form.itemname = ''
|
|
|
}
|
|
}
|
|
|
|
|
+ const all = this.tableData.flatMap(item => item.tradefields);
|
|
|
|
|
+ // 去重 + 用中文逗号连接
|
|
|
|
|
+ this.tradefields = [...new Set(all)].join(',');
|
|
|
},
|
|
},
|
|
|
async submit() {
|
|
async submit() {
|
|
|
if (this.tableData.length === 0)
|
|
if (this.tableData.length === 0)
|