|
@@ -944,13 +944,29 @@
|
|
|
</Select>
|
|
|
</FormItem>
|
|
|
<FormItem label="备注:">
|
|
|
- <Input
|
|
|
+ <Select
|
|
|
+ size="small"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ allow-create
|
|
|
+ @on-create="handleRemarkCreate"
|
|
|
+ style="width: 120px"
|
|
|
+ v-model="item.remark"
|
|
|
+ >
|
|
|
+ <Option
|
|
|
+ v-for="_remark of support_remark"
|
|
|
+ :key="_remark"
|
|
|
+ :value="_remark"
|
|
|
+ :label="_remark"
|
|
|
+ ></Option>
|
|
|
+ </Select>
|
|
|
+ <!-- <Input
|
|
|
size="small"
|
|
|
type="textarea"
|
|
|
v-model="item.remark"
|
|
|
style="width: 120px"
|
|
|
placeholder="请输入备注"
|
|
|
- />
|
|
|
+ /> -->
|
|
|
</FormItem>
|
|
|
<FormItem label="产品图:">
|
|
|
<!-- v-show="modalData.url && modalData.url.length > 0" -->
|
|
@@ -991,7 +1007,7 @@
|
|
|
@click.native.prevent="handleRadioClick(element)"
|
|
|
v-model="element.isChoosed"
|
|
|
></Radio>
|
|
|
- <span v-show="element.isBP">{{ element.part_title }} </span>
|
|
|
+ <!-- <span v-show="element.isBP">{{ element.part_title }} </span> -->
|
|
|
</FormItem>
|
|
|
<FormItem label="部件:" v-show="!element.is_metal">
|
|
|
<Select
|
|
@@ -1014,7 +1030,13 @@
|
|
|
></Option>
|
|
|
</Select>
|
|
|
</FormItem>
|
|
|
- <FormItem label="高:" v-show="!element.is_metal">
|
|
|
+ <FormItem
|
|
|
+ label="高:"
|
|
|
+ v-show="
|
|
|
+ !element.is_metal &&
|
|
|
+ !element.hide_measure.filter((v) => v == 'H').length > 0
|
|
|
+ "
|
|
|
+ >
|
|
|
<Input
|
|
|
size="small"
|
|
|
clearable
|
|
@@ -1023,7 +1045,13 @@
|
|
|
placeholder="请输入厚"
|
|
|
/>
|
|
|
</FormItem>
|
|
|
- <FormItem label="宽:" v-show="!element.is_metal">
|
|
|
+ <FormItem
|
|
|
+ label="宽:"
|
|
|
+ v-show="
|
|
|
+ !element.is_metal &&
|
|
|
+ !element.hide_measure.filter((v) => v == 'W').length > 0
|
|
|
+ "
|
|
|
+ >
|
|
|
<Input
|
|
|
size="small"
|
|
|
clearable
|
|
@@ -1032,7 +1060,13 @@
|
|
|
placeholder="请输入宽"
|
|
|
/>
|
|
|
</FormItem>
|
|
|
- <FormItem label="厚:" v-show="!element.is_metal">
|
|
|
+ <FormItem
|
|
|
+ label="厚:"
|
|
|
+ v-show="
|
|
|
+ !element.is_metal &&
|
|
|
+ !element.hide_measure.filter((v) => v == 'T').length > 0
|
|
|
+ "
|
|
|
+ >
|
|
|
<Input
|
|
|
size="small"
|
|
|
clearable
|
|
@@ -1045,7 +1079,12 @@
|
|
|
v-for="(process_detail, idx) in element.process"
|
|
|
:key="process_detail.name + '222' + element.part_id"
|
|
|
:label="process_detail.name + ':'"
|
|
|
- v-show="!element.is_metal"
|
|
|
+ v-show="
|
|
|
+ !element.is_metal &&
|
|
|
+ !element.hide_process.filter(
|
|
|
+ (v) => v == process_detail.process_id
|
|
|
+ ).length > 0
|
|
|
+ "
|
|
|
>
|
|
|
<Tooltip style="width: 120px" transfer>
|
|
|
<span slot="content">
|
|
@@ -1060,6 +1099,7 @@
|
|
|
style="width: 120px"
|
|
|
filterable
|
|
|
clearable
|
|
|
+ transfer
|
|
|
label-in-value
|
|
|
@on-change="
|
|
|
(e) => handlePartProcessChange(e, idx, element)
|
|
@@ -1099,14 +1139,14 @@
|
|
|
style="margin-right: 5px"
|
|
|
size="small"
|
|
|
>{{
|
|
|
- element.isShowPartDetail ? "收起" : "修改原材料"
|
|
|
+ !element.isShowPartDetail ? "收起" : "修改原材料"
|
|
|
}}</Button
|
|
|
>
|
|
|
</FormItem>
|
|
|
<div
|
|
|
:class="[
|
|
|
'part_detail_form',
|
|
|
- element.isShowPartDetail ? '' : 'hide_part_detail',
|
|
|
+ !element.isShowPartDetail ? '' : 'hide_part_detail',
|
|
|
]"
|
|
|
:data-index="idx"
|
|
|
>
|
|
@@ -1175,6 +1215,7 @@
|
|
|
style="width: 80px"
|
|
|
filterable
|
|
|
clearable
|
|
|
+ transfer
|
|
|
v-model="ele.material_detail_id"
|
|
|
@on-change="(e) => handleMaterialChange(e, ele)"
|
|
|
placeholder="请选择高"
|
|
@@ -1193,6 +1234,7 @@
|
|
|
style="width: 80px"
|
|
|
filterable
|
|
|
clearable
|
|
|
+ transfer
|
|
|
v-model="ele.material_detail_id"
|
|
|
placeholder="请选择宽"
|
|
|
size="small"
|
|
@@ -1210,6 +1252,7 @@
|
|
|
style="width: 80px"
|
|
|
filterable
|
|
|
clearable
|
|
|
+ transfer
|
|
|
v-model="ele.material_detail_id"
|
|
|
placeholder="请选择厚"
|
|
|
size="small"
|
|
@@ -1705,14 +1748,30 @@
|
|
|
</Select>
|
|
|
</FormItem>
|
|
|
<FormItem label="备注:">
|
|
|
- <Input
|
|
|
+ <Select
|
|
|
+ size="small"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ style="width: 120px"
|
|
|
+ allow-create
|
|
|
+ @on-create="handleRemarkCreate"
|
|
|
+ v-model="modalData.remark"
|
|
|
+ >
|
|
|
+ <Option
|
|
|
+ v-for="_remark of support_remark"
|
|
|
+ :key="_remark"
|
|
|
+ :value="_remark"
|
|
|
+ :label="_remark"
|
|
|
+ ></Option>
|
|
|
+ </Select>
|
|
|
+ <!-- <Input
|
|
|
size="small"
|
|
|
type="textarea"
|
|
|
:disabled="isCheck"
|
|
|
v-model="modalData.remark"
|
|
|
style="width: 120px"
|
|
|
placeholder="请输入备注"
|
|
|
- />
|
|
|
+ /> -->
|
|
|
</FormItem>
|
|
|
<FormItem label="产品图:">
|
|
|
<!-- v-show="modalData.url && modalData.url.length > 0" -->
|
|
@@ -1754,7 +1813,7 @@
|
|
|
@click.native.prevent="handleRadioClick(element)"
|
|
|
v-model="element.isChoosed"
|
|
|
></Radio>
|
|
|
- <span v-show="element.isBP">{{ element.part_title }} </span>
|
|
|
+ <!-- <span v-show="element.isBP">{{ element.part_title }} </span> -->
|
|
|
</FormItem>
|
|
|
<FormItem
|
|
|
label="部件:"
|
|
@@ -1785,7 +1844,13 @@
|
|
|
></Option>
|
|
|
</Select>
|
|
|
</FormItem>
|
|
|
- <FormItem label="高:" v-show="!element.is_metal">
|
|
|
+ <FormItem
|
|
|
+ label="高:"
|
|
|
+ v-show="
|
|
|
+ !element.is_metal &&
|
|
|
+ !element.hide_measure.filter((v) => v == 'H').length > 0
|
|
|
+ "
|
|
|
+ >
|
|
|
<Input
|
|
|
size="small"
|
|
|
clearable
|
|
@@ -1795,7 +1860,13 @@
|
|
|
placeholder="请输入厚"
|
|
|
/>
|
|
|
</FormItem>
|
|
|
- <FormItem label="宽:" v-show="!element.is_metal">
|
|
|
+ <FormItem
|
|
|
+ label="宽:"
|
|
|
+ v-show="
|
|
|
+ !element.is_metal &&
|
|
|
+ !element.hide_measure.filter((v) => v == 'W').length > 0
|
|
|
+ "
|
|
|
+ >
|
|
|
<Input
|
|
|
size="small"
|
|
|
clearable
|
|
@@ -1805,7 +1876,13 @@
|
|
|
placeholder="请输入宽"
|
|
|
/>
|
|
|
</FormItem>
|
|
|
- <FormItem label="厚:" v-show="!element.is_metal">
|
|
|
+ <FormItem
|
|
|
+ label="厚:"
|
|
|
+ v-show="
|
|
|
+ !element.is_metal &&
|
|
|
+ !element.hide_measure.filter((v) => v == 'T').length > 0
|
|
|
+ "
|
|
|
+ >
|
|
|
<Input
|
|
|
size="small"
|
|
|
clearable
|
|
@@ -1819,7 +1896,12 @@
|
|
|
v-for="(process_detail, idx) in element.process"
|
|
|
:key="idx + '555' + element.part_id"
|
|
|
:label="process_detail.name + ':'"
|
|
|
- v-show="!element.is_metal"
|
|
|
+ v-show="
|
|
|
+ !element.is_metal &&
|
|
|
+ !element.hide_process.filter(
|
|
|
+ (v) => v == process_detail.process_id
|
|
|
+ ).length > 0
|
|
|
+ "
|
|
|
>
|
|
|
<Tooltip style="width: 120px" transfer>
|
|
|
<span slot="content">
|
|
@@ -1834,6 +1916,7 @@
|
|
|
style="width: 120px"
|
|
|
filterable
|
|
|
clearable
|
|
|
+ transfer
|
|
|
label-in-value
|
|
|
:disabled="isCheck"
|
|
|
@on-change="
|
|
@@ -1876,7 +1959,7 @@
|
|
|
style="margin-right: 5px"
|
|
|
size="small"
|
|
|
>{{
|
|
|
- element.isShowPartDetail
|
|
|
+ !element.isShowPartDetail
|
|
|
? "收起"
|
|
|
: isCheck
|
|
|
? "查看"
|
|
@@ -1887,7 +1970,7 @@
|
|
|
<div
|
|
|
:class="[
|
|
|
'part_detail_form',
|
|
|
- element.isShowPartDetail ? '' : 'hide_part_detail',
|
|
|
+ !element.isShowPartDetail ? '' : 'hide_part_detail',
|
|
|
]"
|
|
|
:data-index="idx"
|
|
|
>
|
|
@@ -1976,6 +2059,7 @@
|
|
|
style="width: 80px"
|
|
|
filterable
|
|
|
clearable
|
|
|
+ transfer
|
|
|
:disabled="isCheck"
|
|
|
v-model="ele.material_detail_id"
|
|
|
placeholder="请选择宽"
|
|
@@ -1994,6 +2078,7 @@
|
|
|
style="width: 80px"
|
|
|
filterable
|
|
|
clearable
|
|
|
+ transfer
|
|
|
:disabled="isCheck"
|
|
|
v-model="ele.material_detail_id"
|
|
|
placeholder="请选择厚"
|
|
@@ -2589,6 +2674,7 @@ export default {
|
|
|
cus_list: [],
|
|
|
add_pre_bp_id: "",
|
|
|
edit_pre_bp_id: "",
|
|
|
+ support_remark: [],
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -2973,175 +3059,198 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handleAddProductSubmit() {
|
|
|
- this.modalArray.forEach((element) => {
|
|
|
- // 工艺属性
|
|
|
- if (!element.procedure_properties_str) {
|
|
|
- element.procedure_properties_str = [];
|
|
|
- }
|
|
|
- element.process.forEach((elem, index) => {
|
|
|
- const _temp = elem.processList.filter(
|
|
|
- (item) => item.id == elem.value
|
|
|
- );
|
|
|
- element.procedure_properties_str[index] =
|
|
|
- _temp.length > 0 ? _temp[0].title : "";
|
|
|
- });
|
|
|
- element.process_str = element.procedure_properties_str.join("/");
|
|
|
- // 尺寸
|
|
|
- if (!element.measurement) {
|
|
|
- element.measurement = "";
|
|
|
- }
|
|
|
- let tempStr = "";
|
|
|
- element.measure.forEach((elem) => {
|
|
|
- tempStr += elem.measureCalc + elem.value + "*";
|
|
|
- });
|
|
|
- element.measurement = tempStr.substring(0, tempStr.length - 1);
|
|
|
- // 五金、 附加项目
|
|
|
- element.ext = [...element.metalArray, ...element.extArray];
|
|
|
- //其他项
|
|
|
- element.other = element.customize;
|
|
|
- // 部件字段
|
|
|
- element.part.forEach((elem) => {
|
|
|
- if (!elem.is_metal) {
|
|
|
- elem.title ? "" : (elem.title = elem.part_title);
|
|
|
- // if (elem.procedure_properties_str && elem.procedure_properties_str != 0) {
|
|
|
- // elem.process_str = elem.procedure_properties_str.join('/')
|
|
|
- // } else {
|
|
|
- elem.procedure_properties_str = [];
|
|
|
- elem.process.forEach((item, index) => {
|
|
|
- const _temp = item.cld.filter(
|
|
|
- (_cld) => _cld.id == item.procedure_property
|
|
|
+ this.$Modal.confirm({
|
|
|
+ content: "请确认线条名称是否正确!",
|
|
|
+ onOk: () => {
|
|
|
+ this.modalArray.forEach((element) => {
|
|
|
+ // 工艺属性
|
|
|
+ if (!element.procedure_properties_str) {
|
|
|
+ element.procedure_properties_str = [];
|
|
|
+ }
|
|
|
+ element.process.forEach((elem, index) => {
|
|
|
+ const _temp = elem.processList.filter(
|
|
|
+ (item) => item.id == elem.value
|
|
|
);
|
|
|
- elem.procedure_properties_str[index] =
|
|
|
+ element.procedure_properties_str[index] =
|
|
|
_temp.length > 0 ? _temp[0].title : "";
|
|
|
});
|
|
|
- elem.process_str = elem.procedure_properties_str.join("/");
|
|
|
- // }
|
|
|
- }
|
|
|
- });
|
|
|
- element.ext &&
|
|
|
- element.ext.length > 0 &&
|
|
|
- (element.ext.map((elem) => {
|
|
|
- if (elem.type == 1) {
|
|
|
- elem.total_num = elem.num;
|
|
|
- elem.unit_price = elem.price;
|
|
|
- elem.ext_price = elem.num * elem.price;
|
|
|
- elem.is_metal = true;
|
|
|
- element.part.push(elem);
|
|
|
- } else {
|
|
|
- if (!element.extra) {
|
|
|
- element.extra = "";
|
|
|
- }
|
|
|
- element.extra += `${elem.title}/`;
|
|
|
+ element.process_str = element.procedure_properties_str.join("/");
|
|
|
+ // 尺寸
|
|
|
+ if (!element.measurement) {
|
|
|
+ element.measurement = "";
|
|
|
}
|
|
|
- }),
|
|
|
- (element.extra = element.extra.substring(
|
|
|
- 0,
|
|
|
- element.extra.length - 1
|
|
|
- )));
|
|
|
- // element.part.push({
|
|
|
- // title: "五金",
|
|
|
- // total_num: "",
|
|
|
- // unit_price: "",
|
|
|
- // });
|
|
|
- });
|
|
|
- this.modalArray.forEach((element) => {
|
|
|
- element.part.forEach((elem) => {
|
|
|
- if (!elem.is_metal) {
|
|
|
- elem.measurement = `${elem.long}*${elem.wide}*${elem.high}`;
|
|
|
- elem.title = elem.part_title;
|
|
|
- }
|
|
|
- });
|
|
|
+ let tempStr = "";
|
|
|
+ element.measure.forEach((elem) => {
|
|
|
+ tempStr += elem.measureCalc + elem.value + "*";
|
|
|
+ });
|
|
|
+ element.measurement = tempStr.substring(0, tempStr.length - 1);
|
|
|
+ // 五金、 附加项目
|
|
|
+ element.ext = [...element.metalArray, ...element.extArray];
|
|
|
+ //其他项
|
|
|
+ element.other = element.customize;
|
|
|
+ // 部件字段
|
|
|
+ element.part.forEach((elem) => {
|
|
|
+ if (!elem.is_metal) {
|
|
|
+ elem.title ? "" : (elem.title = elem.part_title);
|
|
|
+ // if (elem.procedure_properties_str && elem.procedure_properties_str != 0) {
|
|
|
+ // elem.process_str = elem.procedure_properties_str.join('/')
|
|
|
+ // } else {
|
|
|
+ elem.procedure_properties_str = [];
|
|
|
+ elem.process.forEach((item, index) => {
|
|
|
+ const _temp = item.cld.filter(
|
|
|
+ (_cld) => _cld.id == item.procedure_property
|
|
|
+ );
|
|
|
+ elem.procedure_properties_str[index] =
|
|
|
+ _temp.length > 0 ? _temp[0].title : "";
|
|
|
+ });
|
|
|
+ elem.process_str = elem.procedure_properties_str.join("/");
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ element.ext &&
|
|
|
+ element.ext.length > 0 &&
|
|
|
+ (element.ext.map((elem) => {
|
|
|
+ if (elem.type == 1) {
|
|
|
+ elem.total_num = elem.num;
|
|
|
+ elem.unit_price = elem.price;
|
|
|
+ elem.ext_price = elem.num * elem.price;
|
|
|
+ elem.is_metal = true;
|
|
|
+ element.part.push(elem);
|
|
|
+ } else {
|
|
|
+ if (!element.extra) {
|
|
|
+ element.extra = "";
|
|
|
+ }
|
|
|
+ element.extra += `${elem.title}/`;
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ (element.extra = element.extra.substring(
|
|
|
+ 0,
|
|
|
+ element.extra.length - 1
|
|
|
+ )));
|
|
|
+ // element.part.push({
|
|
|
+ // title: "五金",
|
|
|
+ // total_num: "",
|
|
|
+ // unit_price: "",
|
|
|
+ // });
|
|
|
+ });
|
|
|
+ this.modalArray.forEach((element) => {
|
|
|
+ element.part.forEach((elem) => {
|
|
|
+ if (!elem.is_metal) {
|
|
|
+ elem.measurement = `${elem.long}*${elem.wide}*${elem.high}`;
|
|
|
+ elem.title = elem.part_title;
|
|
|
+ elem.procedure_properties = [];
|
|
|
+ elem.process.map((item) => {
|
|
|
+ elem.procedure_properties.push(item.procedure_property);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.tableData = [...this.tableData, ...this.modalArray];
|
|
|
+ this.currencyIndex = null;
|
|
|
+ this.route_id_at_copy = "";
|
|
|
+ // 合计 、 线条 统计价格
|
|
|
+ this.handleCalcCount();
|
|
|
+ this.showAddProduct = false;
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
+ onCancel: () => {},
|
|
|
});
|
|
|
- this.tableData = [...this.tableData, ...this.modalArray];
|
|
|
- this.currencyIndex = null;
|
|
|
- this.route_id_at_copy = "";
|
|
|
- // 合计 、 线条 统计价格
|
|
|
- this.handleCalcCount();
|
|
|
- this.showAddProduct = false;
|
|
|
- this.$forceUpdate();
|
|
|
},
|
|
|
handleEditProductSubmit() {
|
|
|
- // 工艺属性
|
|
|
- if (!this.modalData.procedure_properties_str) {
|
|
|
- this.modalData.procedure_properties_str = [];
|
|
|
- }
|
|
|
- this.modalData.process.forEach((elem, index) => {
|
|
|
- const _temp = elem.processList.filter((item) => item.id == elem.value);
|
|
|
- this.modalData.procedure_properties_str[index] =
|
|
|
- _temp.length > 0 ? _temp[0].title : "";
|
|
|
- });
|
|
|
- this.modalData.process_str = this.modalData.procedure_properties_str.join(
|
|
|
- "/"
|
|
|
- );
|
|
|
- // 尺寸
|
|
|
- if (!this.modalData.measurement) {
|
|
|
- this.modalData.measurement = "";
|
|
|
- }
|
|
|
- let tempStr = "";
|
|
|
- this.modalData.measure.forEach((elem) => {
|
|
|
- tempStr += elem.measureCalc + elem.value + "*";
|
|
|
- });
|
|
|
- this.modalData.measurement = tempStr.substring(0, tempStr.length - 1);
|
|
|
- // 五金、 附加项目
|
|
|
- this.modalData.ext = [
|
|
|
- ...this.modalData.metalArray,
|
|
|
- ...this.modalData.extArray,
|
|
|
- ];
|
|
|
- //其他项
|
|
|
- this.modalData.other = this.modalData.customize;
|
|
|
- // 部件字段
|
|
|
- this.modalData.part.forEach((elem, idx) => {
|
|
|
- if (!elem.is_metal) {
|
|
|
- elem.title ? "" : (elem.title = elem.part_title);
|
|
|
- // if (elem.procedure_properties_str && elem.procedure_properties_str != 0) {
|
|
|
- // elem.process_str = elem.procedure_properties_str.join('/')
|
|
|
- // } else {
|
|
|
- elem.procedure_properties_str = [];
|
|
|
- elem.process.forEach((item, index) => {
|
|
|
- const _temp = item.cld.filter(
|
|
|
- (_cld) => _cld.id == item.procedure_property
|
|
|
+ this.$Modal.confirm({
|
|
|
+ content: "请确认线条名称是否正确!",
|
|
|
+ onOk: () => {
|
|
|
+ // 工艺属性
|
|
|
+ if (!this.modalData.procedure_properties_str) {
|
|
|
+ this.modalData.procedure_properties_str = [];
|
|
|
+ }
|
|
|
+ this.modalData.process.forEach((elem, index) => {
|
|
|
+ const _temp = elem.processList.filter(
|
|
|
+ (item) => item.id == elem.value
|
|
|
);
|
|
|
- elem.procedure_properties_str[index] =
|
|
|
+ this.modalData.procedure_properties_str[index] =
|
|
|
_temp.length > 0 ? _temp[0].title : "";
|
|
|
});
|
|
|
- elem.process_str = elem.procedure_properties_str.join("/");
|
|
|
- // }
|
|
|
- } else {
|
|
|
- this.modalData.part.splice(idx, 1);
|
|
|
- }
|
|
|
- });
|
|
|
- this.modalData.metalArray.map((item) => {
|
|
|
- const obj = {
|
|
|
- total_num: item.num,
|
|
|
- title: item.title,
|
|
|
- unit_price: item.price,
|
|
|
- ext_price: item.num * item.price,
|
|
|
- is_metal: true,
|
|
|
- };
|
|
|
- this.modalData.part.push(obj);
|
|
|
- });
|
|
|
- this.modalData.extra = "";
|
|
|
- this.modalData.extArray.map((item) => {
|
|
|
- const temp = this.extList.filter((it) => it.id == item.ext_id);
|
|
|
- temp && temp.length > 0 && (item.title = temp[0].title);
|
|
|
+ this.modalData.process_str = this.modalData.procedure_properties_str.join(
|
|
|
+ "/"
|
|
|
+ );
|
|
|
+ // 尺寸
|
|
|
+ if (!this.modalData.measurement) {
|
|
|
+ this.modalData.measurement = "";
|
|
|
+ }
|
|
|
+ let tempStr = "";
|
|
|
+ this.modalData.measure.forEach((elem) => {
|
|
|
+ tempStr += elem.measureCalc + elem.value + "*";
|
|
|
+ });
|
|
|
+ this.modalData.measurement = tempStr.substring(0, tempStr.length - 1);
|
|
|
+ // 五金、 附加项目
|
|
|
+ this.modalData.ext = [
|
|
|
+ ...this.modalData.metalArray,
|
|
|
+ ...this.modalData.extArray,
|
|
|
+ ];
|
|
|
+ //其他项
|
|
|
+ this.modalData.other = this.modalData.customize;
|
|
|
+ // 部件字段
|
|
|
+ this.modalData.part.forEach((elem, idx) => {
|
|
|
+ if (!elem.is_metal) {
|
|
|
+ elem.title ? "" : (elem.title = elem.part_title);
|
|
|
+ // if (elem.procedure_properties_str && elem.procedure_properties_str != 0) {
|
|
|
+ // elem.process_str = elem.procedure_properties_str.join('/')
|
|
|
+ // } else {
|
|
|
+ elem.procedure_properties_str = [];
|
|
|
+ elem.process.forEach((item, index) => {
|
|
|
+ const _temp = item.cld.filter(
|
|
|
+ (_cld) => _cld.id == item.procedure_property
|
|
|
+ );
|
|
|
+ elem.procedure_properties_str[index] =
|
|
|
+ _temp.length > 0 ? _temp[0].title : "";
|
|
|
+ });
|
|
|
+ elem.process_str = elem.procedure_properties_str.join("/");
|
|
|
+ elem.procedure_properties = [];
|
|
|
+ elem.process.map((item) => {
|
|
|
+ elem.procedure_properties.push(item.procedure_property);
|
|
|
+ });
|
|
|
+
|
|
|
+ // }
|
|
|
+ } else {
|
|
|
+ this.modalData.part.splice(idx, 1);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.modalData.metalArray.map((item) => {
|
|
|
+ const obj = {
|
|
|
+ total_num: item.num,
|
|
|
+ title: item.title,
|
|
|
+ unit_price: item.price,
|
|
|
+ ext_price: item.num * item.price,
|
|
|
+ is_metal: true,
|
|
|
+ };
|
|
|
+ this.modalData.part.push(obj);
|
|
|
+ });
|
|
|
+ this.modalData.extra = "";
|
|
|
+ this.modalData.extArray.map((item) => {
|
|
|
+ const temp = this.extList.filter((it) => it.id == item.ext_id);
|
|
|
+ temp && temp.length > 0 && (item.title = temp[0].title);
|
|
|
+ });
|
|
|
+ this.modalData.extra = this.modalData.extArray.reduce((pre, cur) => {
|
|
|
+ return pre + `${cur.title}/`;
|
|
|
+ }, "");
|
|
|
+ this.modalData.extra = this.modalData.extra.substring(
|
|
|
+ 0,
|
|
|
+ this.modalData.extra.length - 1
|
|
|
+ );
|
|
|
+ const _temp = this.productList.filter(
|
|
|
+ (item) => item.id == this.modalData.product_id
|
|
|
+ );
|
|
|
+ this.modalData.title = _temp[0].title;
|
|
|
+ this.tableData.splice(this.currencyIndex, 1, this.modalData);
|
|
|
+ this.route_id_at_copy = "";
|
|
|
+ // 合计 、 线条 统计价格
|
|
|
+ this.handleCalcCount();
|
|
|
+ this.showEditProduct = false;
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
+ onCancel: () => {},
|
|
|
});
|
|
|
- this.modalData.extra = this.modalData.extArray.reduce((pre, cur) => {
|
|
|
- return pre + `${cur.title}/`;
|
|
|
- }, "");
|
|
|
- this.modalData.extra = this.modalData.extra.substring(
|
|
|
- 0,
|
|
|
- this.modalData.extra.length - 1
|
|
|
- );
|
|
|
- const _temp = this.productList.filter(
|
|
|
- (item) => item.id == this.modalData.product_id
|
|
|
- );
|
|
|
- this.modalData.title = _temp[0].title;
|
|
|
- this.tableData.splice(this.currencyIndex, 1, this.modalData);
|
|
|
- this.route_id_at_copy = "";
|
|
|
- // 合计 、 线条 统计价格
|
|
|
- this.handleCalcCount();
|
|
|
- this.showEditProduct = false;
|
|
|
- this.$forceUpdate();
|
|
|
},
|
|
|
// 合计 、 线条 统计价格
|
|
|
handleCalcCount() {
|
|
@@ -3339,6 +3448,9 @@ export default {
|
|
|
this.coumstList = res.data;
|
|
|
});
|
|
|
},
|
|
|
+ handleRemarkCreate(val){
|
|
|
+ this.support_remark.push(val)
|
|
|
+ },
|
|
|
getLockList() {
|
|
|
this.axios("/api/lock_list").then((res) => (this.lock_list = res.data));
|
|
|
},
|
|
@@ -3524,7 +3636,7 @@ export default {
|
|
|
getEditData(modalData, curData) {
|
|
|
// console.log("modalData :>> ", modalData);
|
|
|
// console.log("curData :>> ", curData);
|
|
|
- /////
|
|
|
+ ///// org_part_id
|
|
|
modalData.ext_price = curData.ext_price * 1 || 0;
|
|
|
modalData.model = curData.model;
|
|
|
modalData.num = curData.num || 1;
|
|
@@ -3642,6 +3754,9 @@ export default {
|
|
|
curData.part.forEach((element, index) => {
|
|
|
if (!element.is_metal) {
|
|
|
modalData.part[index].change_id = element.change_id;
|
|
|
+ modalData.part[index].org_part_id = JSON.parse(
|
|
|
+ JSON.stringify(modalData.part[index].part_id)
|
|
|
+ );
|
|
|
// 部件测量字段
|
|
|
if (element.measure && element.measure.length > 0) {
|
|
|
const part_measure_detail = element.measure.split("*");
|
|
@@ -3931,6 +4046,7 @@ export default {
|
|
|
console.log("this.pre_process_obj :>> ", this.pre_process_obj);
|
|
|
}
|
|
|
let modalData = this.modalArray[n];
|
|
|
+ this.support_remark = res.data.support_remark;
|
|
|
modalData.route_id = res.data.process.list[0].id;
|
|
|
modalData.url = res.data.url;
|
|
|
modalData.total_num = res.data.total_num || 1;
|
|
@@ -4015,6 +4131,12 @@ export default {
|
|
|
(item) => item.id == this.route_id_at_copy
|
|
|
);
|
|
|
if (compare_copy && compare_copy.length > 0) {
|
|
|
+ if (!modalData.procedure_properties) {
|
|
|
+ modalData.procedure_properties = [];
|
|
|
+ }
|
|
|
+ modalData.procedure_properties[
|
|
|
+ modalData.process.lenngth
|
|
|
+ ] = compare_copy[0].detail[key] * 1;
|
|
|
modalData.process.push({
|
|
|
key: key,
|
|
|
title: ele,
|
|
@@ -4034,6 +4156,12 @@ export default {
|
|
|
(item) => item.detail[key] == this.pre_process_obj[key]
|
|
|
);
|
|
|
if (compare.length > 0) {
|
|
|
+ if (!modalData.procedure_properties) {
|
|
|
+ modalData.procedure_properties = [];
|
|
|
+ }
|
|
|
+ modalData.procedure_properties[
|
|
|
+ modalData.process.lenngth
|
|
|
+ ] = this.pre_process_obj[key] * 1;
|
|
|
modalData.process.push({
|
|
|
key: key,
|
|
|
title: ele,
|
|
@@ -4061,6 +4189,7 @@ export default {
|
|
|
const ele = res.data.process.title[key];
|
|
|
if (elem.name == ele) {
|
|
|
elem.procedure_property = this.pre_process_obj[key] * 1;
|
|
|
+ elem.process_id = key;
|
|
|
if (!element.procedure_properties) {
|
|
|
element.procedure_properties = [];
|
|
|
}
|
|
@@ -4107,6 +4236,7 @@ export default {
|
|
|
}).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.process_match_list = res.data.process.list;
|
|
|
+ this.support_remark = res.data.support_remark;
|
|
|
// 赋值默认工艺路线
|
|
|
let _temp_obj = {};
|
|
|
if (res.data.process.list.length > 1) {
|
|
@@ -4216,6 +4346,9 @@ export default {
|
|
|
);
|
|
|
|
|
|
if (compare.length > 0) {
|
|
|
+ this.modalData.procedure_properties[
|
|
|
+ this.modalData.process.lenngth
|
|
|
+ ] = this.pre_process_obj[key] * 1;
|
|
|
this.modalData.process.push({
|
|
|
key: key,
|
|
|
title: ele,
|
|
@@ -4242,6 +4375,7 @@ export default {
|
|
|
const ele = res.data.process.title[key];
|
|
|
if (elem.name == ele) {
|
|
|
elem.procedure_property = this.pre_process_obj[key] * 1;
|
|
|
+ elem.process_id = key;
|
|
|
if (!element.procedure_properties) {
|
|
|
element.procedure_properties = [];
|
|
|
}
|
|
@@ -4295,6 +4429,7 @@ export default {
|
|
|
},
|
|
|
}).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
+ this.support_remark = res.data.support_remark;
|
|
|
this.process_match_list = res.data.process.list;
|
|
|
//获取产品
|
|
|
this.modalData.total_num = res.data.total_num || 1;
|
|
@@ -4399,11 +4534,11 @@ export default {
|
|
|
let cur = row.change.filter((item) => item.id == row.change_id);
|
|
|
row.org_part_id = JSON.parse(JSON.stringify(row.part_id));
|
|
|
row.part_id = cur[0].part_id;
|
|
|
- row.high = cur[0].high;
|
|
|
+ row.high = cur[0].high | 0;
|
|
|
row.highCalc = JSON.parse(JSON.stringify(row.high));
|
|
|
- row.long = cur[0].long;
|
|
|
+ row.long = cur[0].long | 0;
|
|
|
row.longCalc = JSON.parse(JSON.stringify(row.long));
|
|
|
- row.wide = cur[0].wide;
|
|
|
+ row.wide = cur[0].wide | 0;
|
|
|
row.wideCalc = JSON.parse(JSON.stringify(row.wide));
|
|
|
row.part_detail = cur[0].sub_part;
|
|
|
row.part_detail.forEach((elem) => {
|
|
@@ -4850,7 +4985,7 @@ export default {
|
|
|
row.material_detail_num = e.target.value;
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
- //修改材质/颜/工艺的disbled
|
|
|
+ //修改材质/颜色/工艺的 disabled
|
|
|
handleProductProcessChange(e, n, modelData, ele) {
|
|
|
if (e) {
|
|
|
this.pre_process_obj[n + 1] = e.value;
|
|
@@ -4893,12 +5028,15 @@ export default {
|
|
|
let target = _target.join(",");
|
|
|
_sorce.forEach((element) => {
|
|
|
if (element.new_detail == target) {
|
|
|
+ console.log("element.new_detail :>> ", element);
|
|
|
+ console.log("element.new_detail :>> ", element.new_detail);
|
|
|
modelData.route_id = element.id;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
// 产品 - 部件 工艺属性联动
|
|
|
modelData.part.forEach((element) => {
|
|
|
+ // 此处有错误,产品选择完工艺路线之后部件的展示跟着改了但是procedure_properties没有
|
|
|
if (!element.is_metal) {
|
|
|
element.process.forEach((elem) => {
|
|
|
if (elem.name == ele.title) {
|
|
@@ -5211,7 +5349,7 @@ export default {
|
|
|
}
|
|
|
/deep/ .ivu-form-item {
|
|
|
display: inline-block;
|
|
|
- min-width: 80px;
|
|
|
+ min-width: 30px;
|
|
|
}
|
|
|
}
|
|
|
.modal_extra {
|