|
@@ -25,7 +25,9 @@
|
|
|
<div><span>数量:</span>{{ formData.num }}</div>
|
|
|
<!-- <div><span>价格:</span>{{ formData.price }}</div> -->
|
|
|
<div><span>规格:</span>{{ formData.measure }}</div>
|
|
|
- <div style="width:auto"><span>工艺属性:</span>{{ formData.process_property }}</div>
|
|
|
+ <div style="width:auto">
|
|
|
+ <span>工艺属性:</span>{{ formData.process_property }}
|
|
|
+ </div>
|
|
|
<div style="overflow:hidden;">
|
|
|
<span>图纸:</span>
|
|
|
<div>
|
|
@@ -370,7 +372,7 @@
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
ghost
|
|
|
- :disabled="!partsItem.isAddPart || type == 2"
|
|
|
+ :disabled="type == 2"
|
|
|
style="margin-right: 10px"
|
|
|
>新增木板</Button
|
|
|
>
|
|
@@ -384,7 +386,7 @@
|
|
|
<template slot-scope="{ index }" slot="partNameSet">
|
|
|
<Input
|
|
|
placeholder="名称"
|
|
|
- :disabled="!partsItem.isAddPart || type == 2"
|
|
|
+ :disabled="type == 2"
|
|
|
v-model="partsItem.partsWoodTableData[index].spare_parts"
|
|
|
/>
|
|
|
</template>
|
|
@@ -393,7 +395,7 @@
|
|
|
<Select
|
|
|
filterable
|
|
|
clearable
|
|
|
- :disabled="!partsItem.isAddPart || type == 2"
|
|
|
+ :disabled="type == 2"
|
|
|
label-in-value
|
|
|
@on-change="changeSe($event, index, partsIndex, row)"
|
|
|
v-model="partsItem.partsWoodTableData[index].material_id"
|
|
@@ -412,7 +414,7 @@
|
|
|
<template slot-scope="{ index }" slot="partNumberSet">
|
|
|
<Input
|
|
|
placeholder="数量"
|
|
|
- :disabled="!partsItem.isAddPart || type == 2"
|
|
|
+ :disabled="type == 2"
|
|
|
v-model="partsItem.partsWoodTableData[index].number"
|
|
|
/>
|
|
|
</template>
|
|
@@ -462,7 +464,7 @@
|
|
|
placeholder="工艺要求"
|
|
|
filterable
|
|
|
clearable
|
|
|
- :disabled="!partsItem.isAddPart || type == 2"
|
|
|
+ :disabled="type == 2"
|
|
|
v-model="
|
|
|
partsItem.partsWoodTableData[index]
|
|
|
.technological_requirement_id
|
|
@@ -481,7 +483,7 @@
|
|
|
placeholder="贴面数"
|
|
|
filterable
|
|
|
clearable
|
|
|
- :disabled="!partsItem.isAddPart || type == 2"
|
|
|
+ :disabled="type == 2"
|
|
|
v-model="partsItem.partsWoodTableData[index].sub_num"
|
|
|
>
|
|
|
<Option :value="0" label="0"></Option>
|
|
@@ -494,7 +496,7 @@
|
|
|
placeholder="贴木皮"
|
|
|
filterable
|
|
|
clearable
|
|
|
- :disabled="!partsItem.isAddPart || type == 2"
|
|
|
+ :disabled="type == 2"
|
|
|
v-model="partsItem.partsWoodTableData[index].veneer_id"
|
|
|
>
|
|
|
<Option
|
|
@@ -510,7 +512,7 @@
|
|
|
placeholder="油漆"
|
|
|
filterable
|
|
|
clearable
|
|
|
- :disabled="!partsItem.isAddPart || type == 2"
|
|
|
+ :disabled="type == 2"
|
|
|
v-model="partsItem.partsWoodTableData[index].paint_id"
|
|
|
>
|
|
|
<Option
|
|
@@ -526,7 +528,7 @@
|
|
|
placeholder="标签"
|
|
|
filterable
|
|
|
clearable
|
|
|
- :disabled="!partsItem.isAddPart || type == 2"
|
|
|
+ :disabled="type == 2"
|
|
|
v-model="partsItem.partsWoodTableData[index].label"
|
|
|
>
|
|
|
<Option :value="1" label="小芯片"></Option>
|
|
@@ -538,7 +540,7 @@
|
|
|
<template slot-scope="{ index }" slot="partPrint_numSet">
|
|
|
<Input
|
|
|
placeholder="打印数量"
|
|
|
- :disabled="!partsItem.isAddPart || type == 2"
|
|
|
+ :disabled="type == 2"
|
|
|
v-model="partsItem.partsWoodTableData[index].print_num"
|
|
|
/>
|
|
|
</template>
|
|
@@ -567,7 +569,7 @@
|
|
|
@click="handlePartMetalsAdd(partsIndex)"
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
- :disabled="!partsItem.isAddPart || type == 2"
|
|
|
+ :disabled="type == 2"
|
|
|
ghost
|
|
|
style="margin-right: 10px"
|
|
|
>新增五金</Button
|
|
@@ -583,7 +585,7 @@
|
|
|
<Select
|
|
|
filterable
|
|
|
clearable
|
|
|
- :disabled="!partsItem.isAddPart || type == 2"
|
|
|
+ :disabled="type == 2"
|
|
|
@on-change="changeMetal($event, index, partsIndex)"
|
|
|
label-in-value
|
|
|
placeholder="请选择"
|
|
@@ -601,14 +603,14 @@
|
|
|
<template slot-scope="{ index }" slot="metalNumberSet">
|
|
|
<Input
|
|
|
placeholder="数量"
|
|
|
- :disabled="!partsItem.isAddPart || type == 2"
|
|
|
+ :disabled="type == 2"
|
|
|
v-model="partsItem.partsMetalseData[index].number"
|
|
|
/>
|
|
|
</template>
|
|
|
<template slot-scope="{ index }" slot="metalPriceSet">
|
|
|
<Input
|
|
|
placeholder="单价"
|
|
|
- :disabled="!partsItem.isAddPart || type == 2"
|
|
|
+ :disabled="type == 2"
|
|
|
v-model="partsItem.partsMetalseData[index].price"
|
|
|
/>
|
|
|
</template>
|
|
@@ -1025,7 +1027,6 @@ export default {
|
|
|
//产品列表
|
|
|
{
|
|
|
isAddPart: true, //是否为新增部件
|
|
|
- isAddProcessRoute: true, //是否为新增工艺组合
|
|
|
long: "",
|
|
|
width: "",
|
|
|
thick: "",
|
|
@@ -1464,7 +1465,6 @@ export default {
|
|
|
this.formData.parts = [
|
|
|
{
|
|
|
isAddPart: true, //是否为新增部件
|
|
|
- isAddProcessRoute: true, //是否为新增工艺组合
|
|
|
long: "",
|
|
|
wide: "",
|
|
|
thick: "",
|
|
@@ -1749,7 +1749,6 @@ export default {
|
|
|
if (val && val.value) {
|
|
|
item.part_title = val.label;
|
|
|
if (val.label != val.value) {
|
|
|
- item.isAddPart = false;
|
|
|
this.axios({
|
|
|
method: "get",
|
|
|
url: "/api/parts_detail",
|
|
@@ -1776,19 +1775,17 @@ export default {
|
|
|
);
|
|
|
});
|
|
|
} else {
|
|
|
- item.isAddPart = true;
|
|
|
+ // item.isAddPart = true;
|
|
|
// item.ProcessAttrList = this.tempProcessAttrList;
|
|
|
// item.partsWoodTableData = [];
|
|
|
// item.partsMetalseData = [];
|
|
|
// item.process_name = "";
|
|
|
}
|
|
|
}
|
|
|
- console.log("item :>> ", item);
|
|
|
},
|
|
|
handlePartsNameSelect_test(item, val) {
|
|
|
if (val && val.value) {
|
|
|
if (val.label != val.value) {
|
|
|
- item.isAddPart = false;
|
|
|
this.axios({
|
|
|
method: "get",
|
|
|
url: "/api/parts_detail",
|
|
@@ -1820,8 +1817,6 @@ export default {
|
|
|
item.partsMetalseData = res.data.detail.filter(
|
|
|
(v) => v.type_id == 5
|
|
|
);
|
|
|
- item.isAddPart = true;
|
|
|
- item.isAddProcessRoute = true;
|
|
|
item.parts_type = res.data.p_id;
|
|
|
this.axios({
|
|
|
method: "get",
|
|
@@ -1841,7 +1836,7 @@ export default {
|
|
|
this.showSimilarProductModal = false;
|
|
|
});
|
|
|
} else {
|
|
|
- item.isAddPart = true;
|
|
|
+ // item.isAddPart = true;
|
|
|
// item.ProcessAttrList = this.tempProcessAttrList;
|
|
|
// item.partsWoodTableData = [];
|
|
|
// item.partsMetalseData = [];
|
|
@@ -1852,7 +1847,6 @@ export default {
|
|
|
// 选择工艺组合名称
|
|
|
handleProcessRouteSelect(item, val) {
|
|
|
if (val) {
|
|
|
- item.isAddProcessRoute = false;
|
|
|
this.axios({
|
|
|
method: "get",
|
|
|
url: "/api/process_route_detail",
|
|
@@ -1988,15 +1982,13 @@ export default {
|
|
|
},
|
|
|
setRadioChange(parent, child, index, parts, cld) {
|
|
|
if (this.type == 1) {
|
|
|
- if (parts.isAddProcessRoute) {
|
|
|
- cld.forEach((element) => {
|
|
|
- element.list.forEach((elem) => {
|
|
|
- elem.id != child.id && (elem.show = false);
|
|
|
- });
|
|
|
+ cld.forEach((element) => {
|
|
|
+ element.list.forEach((elem) => {
|
|
|
+ elem.id != child.id && (elem.show = false);
|
|
|
});
|
|
|
- child.show = !child.show;
|
|
|
- parts.properties[index] = child.id;
|
|
|
- }
|
|
|
+ });
|
|
|
+ child.show = !child.show;
|
|
|
+ parts.properties[index] = child.id;
|
|
|
}
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
@@ -2081,7 +2073,6 @@ export default {
|
|
|
handlePartAdd(item, index) {
|
|
|
let obj = {
|
|
|
isAddPart: true,
|
|
|
- isAddProcessRoute: true,
|
|
|
long: "",
|
|
|
width: "",
|
|
|
thick: "",
|
|
@@ -2167,23 +2158,22 @@ export default {
|
|
|
this.formData = formData;
|
|
|
},
|
|
|
handlePartWoodCopy(row, index, parentIndex) {
|
|
|
- this.$nextTick(() => {
|
|
|
- let obj = JSON.parse(
|
|
|
- JSON.stringify(
|
|
|
- this.formData.parts[parentIndex].partsWoodTableData[index]
|
|
|
- )
|
|
|
- );
|
|
|
- this.formData.parts[parentIndex].partsWoodTableData.splice(
|
|
|
- index + 1,
|
|
|
- 0,
|
|
|
- obj
|
|
|
- );
|
|
|
- // this.formData.parts[parentIndex].partsWoodTableData.push(obj)
|
|
|
- this.$forceUpdate();
|
|
|
- });
|
|
|
+ let obj = JSON.parse(
|
|
|
+ JSON.stringify(
|
|
|
+ this.formData.parts[parentIndex].partsWoodTableData[index]
|
|
|
+ )
|
|
|
+ );
|
|
|
+ this.formData.parts[parentIndex].partsWoodTableData.splice(
|
|
|
+ index + 1,
|
|
|
+ 0,
|
|
|
+ obj
|
|
|
+ );
|
|
|
+ // this.formData.parts[parentIndex].partsWoodTableData.push(obj)
|
|
|
+ this.formData.parts = JSON.parse(JSON.stringify(this.formData.parts));
|
|
|
},
|
|
|
handlePartWoodDele(row, index, parentIndex) {
|
|
|
this.formData.parts[parentIndex].partsWoodTableData.splice(index, 1);
|
|
|
+ this.formData.parts = JSON.parse(JSON.stringify(this.formData.parts));
|
|
|
},
|
|
|
handlePartMetalsAdd(index) {
|
|
|
let formData = JSON.parse(JSON.stringify(this.formData));
|
|
@@ -2207,12 +2197,14 @@ export default {
|
|
|
0,
|
|
|
obj
|
|
|
);
|
|
|
+ this.formData.parts = JSON.parse(JSON.stringify(this.formData.parts));
|
|
|
},
|
|
|
handleClose(done) {
|
|
|
done();
|
|
|
},
|
|
|
handlePartMetalsDele(row, index, parentIndex) {
|
|
|
this.formData.parts[parentIndex].partsMetalseData.splice(index, 1);
|
|
|
+ this.formData.parts = JSON.parse(JSON.stringify(this.formData.parts));
|
|
|
},
|
|
|
handleProcessLineSelected() {},
|
|
|
async postData() {
|
|
@@ -2404,16 +2396,18 @@ export default {
|
|
|
// })
|
|
|
},
|
|
|
changeSe(e, n, partsIndex, row) {
|
|
|
- let event = window.event;
|
|
|
- let unit = event.target.dataset.unit;
|
|
|
- // row.company = unit ? unit : ''
|
|
|
- // row.thick = e.tag
|
|
|
- // row.title = e.title
|
|
|
- this.formData.parts[partsIndex].partsWoodTableData[n].company = unit
|
|
|
- ? unit
|
|
|
- : "";
|
|
|
- this.formData.parts[partsIndex].partsWoodTableData[n].thick = e.tag;
|
|
|
- this.formData.parts[partsIndex].partsWoodTableData[n].title = e.title;
|
|
|
+ if (e) {
|
|
|
+ let event = window.event;
|
|
|
+ let unit = event.target.dataset.unit;
|
|
|
+ // row.company = unit ? unit : ''
|
|
|
+ // row.thick = e.tag
|
|
|
+ // row.title = e.title
|
|
|
+ this.formData.parts[partsIndex].partsWoodTableData[n].company = unit
|
|
|
+ ? unit
|
|
|
+ : "";
|
|
|
+ this.formData.parts[partsIndex].partsWoodTableData[n].thick = e.tag;
|
|
|
+ this.formData.parts[partsIndex].partsWoodTableData[n].title = e.title;
|
|
|
+ }
|
|
|
},
|
|
|
changeMetal(e, n, partsIndex) {
|
|
|
let event = window.event;
|