|
|
@@ -524,7 +524,7 @@
|
|
|
transfer
|
|
|
filter-by-label
|
|
|
label-in-value
|
|
|
- v-model="scope.row.product_id"
|
|
|
+ v-model="scope.row.select_all_id"
|
|
|
@on-change="
|
|
|
handleSelectProductMetail(
|
|
|
scope.row,
|
|
|
@@ -537,7 +537,7 @@
|
|
|
<Option
|
|
|
v-for="item in product_metailList"
|
|
|
:tag="item.key"
|
|
|
- :value="item.id"
|
|
|
+ :value="item.key"
|
|
|
:label="item.title"
|
|
|
:key="item.key"
|
|
|
></Option>
|
|
|
@@ -565,15 +565,15 @@
|
|
|
<template #default="{ row }">{{
|
|
|
row.is_metal
|
|
|
? getSelectedLabel(
|
|
|
- row.product_id,
|
|
|
+ row.select_all_id,
|
|
|
product_metailList,
|
|
|
- "id",
|
|
|
+ "key",
|
|
|
"title"
|
|
|
)
|
|
|
: getSelectedLabel(
|
|
|
- row.product_id,
|
|
|
+ row.select_all_id,
|
|
|
product_metailList,
|
|
|
- "id",
|
|
|
+ "key",
|
|
|
"title"
|
|
|
)
|
|
|
}}</template>
|
|
|
@@ -2516,8 +2516,8 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
- getSelectedLabel(value, list, valueProp = "value", labelField = "label") {
|
|
|
- const item = list.find((item) => item[valueProp] === value);
|
|
|
+ getSelectedLabel(value, list, valueProp, labelField) {
|
|
|
+ const item = list.find((item) => item[valueProp] == value);
|
|
|
return item ? item[labelField] : null;
|
|
|
},
|
|
|
get_forms() {
|
|
|
@@ -2554,10 +2554,10 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
back() {
|
|
|
- this.$router.go(-1);
|
|
|
- // this.$router.push({
|
|
|
- // path: "/cms/ordermannage/businessorderlist/list",
|
|
|
- // });
|
|
|
+ // this.$router.go(-1);
|
|
|
+ this.$router.push({
|
|
|
+ path: "/cms/ordermannage/businessorderlist/list",
|
|
|
+ });
|
|
|
},
|
|
|
postForms(n) {
|
|
|
this.post_formSetTableData.forEach((element, index) => {
|
|
|
@@ -2668,6 +2668,7 @@ export default {
|
|
|
);
|
|
|
this.tableData.forEach((element) => {
|
|
|
//表格编辑用数据
|
|
|
+ element.select_all_id = element.product_id + "_1";
|
|
|
element.num_temp_save = element.num || 1;
|
|
|
if (element.ext.length > 0) {
|
|
|
element.ext.map((v, k) => {
|
|
|
@@ -2791,7 +2792,7 @@ export default {
|
|
|
v.is_metal = true;
|
|
|
v.material_id = v.ext_id;
|
|
|
v.product_id = v.ext_id;
|
|
|
-
|
|
|
+ v.select_all_id = v.ext_id + "_2";
|
|
|
this.tableData.push(v);
|
|
|
}
|
|
|
});
|
|
|
@@ -3680,6 +3681,8 @@ export default {
|
|
|
if (this.info.custom_id) {
|
|
|
this.currentTabIndex = "0";
|
|
|
let obj = {
|
|
|
+ select_all_id: "", //产品五金ID
|
|
|
+ product_id: "", //产品ID
|
|
|
type_name: "", //展示用产品名称
|
|
|
position: "", //位置
|
|
|
over_price: "", //超标单价
|
|
|
@@ -4065,7 +4068,7 @@ export default {
|
|
|
this.handleCalcCount();
|
|
|
},
|
|
|
changeEditMetal(row, rowIndex, $event, scope) {
|
|
|
- row.ext_id = $event.value;
|
|
|
+ row.ext_id = row.product_id;
|
|
|
row.title = this.metalList.filter((v) => v.id == $event.value)[0].title;
|
|
|
row.unit = this.metalList.filter((v) => v.id == $event.value)[0].unit;
|
|
|
},
|
|
|
@@ -4111,11 +4114,15 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
handleSelectProductMetail(row, rowIndex, $event, scope) {
|
|
|
+ console.log(`$event`, $event);
|
|
|
const arr = $event.tag.split("_");
|
|
|
let obj = {};
|
|
|
+ console.log(`arr[1]`, arr[1]);
|
|
|
// 分类 1产品 2五金
|
|
|
- if (arr[1] === "1") {
|
|
|
+ if (arr[1] == "1") {
|
|
|
obj = {
|
|
|
+ select_all_id: $event.value,
|
|
|
+ product_id: "",
|
|
|
type_name: "", //展示用产品名称
|
|
|
position: "", //位置
|
|
|
over_price: "", //超标单价
|
|
|
@@ -4156,7 +4163,9 @@ export default {
|
|
|
(v) => ((obj[v.id] = ""), (obj.procedure_properties[v.id] = ""))
|
|
|
);
|
|
|
} else {
|
|
|
+ console.log(`2`, 2);
|
|
|
obj = {
|
|
|
+ select_all_id: $event.value,
|
|
|
type: 1,
|
|
|
is_metal: true,
|
|
|
material_id: "",
|
|
|
@@ -4168,7 +4177,8 @@ export default {
|
|
|
unit: "",
|
|
|
};
|
|
|
}
|
|
|
- obj.product_id = $event.value;
|
|
|
+ console.log(`arr[0]`, arr[0]);
|
|
|
+ obj.product_id = arr[0];
|
|
|
this.tableData.splice(rowIndex, 1, obj);
|
|
|
if (arr[1] === "1") {
|
|
|
this.changeEditTableData(row, rowIndex, $event, scope);
|
|
|
@@ -4179,13 +4189,15 @@ export default {
|
|
|
},
|
|
|
changeEditTableData(row, rowIndex, $event, scope) {
|
|
|
if ($event) {
|
|
|
- let id = $event.value;
|
|
|
row.type_name = $event.label;
|
|
|
row.title = $event.label;
|
|
|
//被编辑过了 标记
|
|
|
row.isEdit = true;
|
|
|
this.axios("/api/order_get_product_detail_new", {
|
|
|
- params: { product_id: id, custom_id: this.info.custom_id },
|
|
|
+ params: {
|
|
|
+ product_id: row.product_id,
|
|
|
+ custom_id: this.info.custom_id,
|
|
|
+ },
|
|
|
}).then((res) => {
|
|
|
this.process_match_list = res.data.process.list;
|
|
|
this.process_all_list = res.data.process_list;
|