|
@@ -611,16 +611,34 @@
|
|
|
</div>
|
|
</div>
|
|
|
<li v-for="item in formData.parts" v-show="false" :key="item.id"></li>
|
|
<li v-for="item in formData.parts" v-show="false" :key="item.id"></li>
|
|
|
<!-- 相似产品弹窗 -->
|
|
<!-- 相似产品弹窗 -->
|
|
|
- <Modal
|
|
|
|
|
|
|
+ <el-dialog
|
|
|
title="选择相似产品"
|
|
title="选择相似产品"
|
|
|
- v-model="showSimilarProductModal"
|
|
|
|
|
- :mask-closable="false"
|
|
|
|
|
|
|
+ :visible="showSimilarProductModal"
|
|
|
|
|
+ :close-on-click-modal="false"
|
|
|
|
|
+ :close-on-press-escape="false"
|
|
|
class="similarProductModal"
|
|
class="similarProductModal"
|
|
|
- :width="1000"
|
|
|
|
|
|
|
+ width="1000px"
|
|
|
>
|
|
>
|
|
|
<Form :label-width="100" :model="similarProductData">
|
|
<Form :label-width="100" :model="similarProductData">
|
|
|
<FormItem label="产品分类">
|
|
<FormItem label="产品分类">
|
|
|
- <Select
|
|
|
|
|
|
|
+ <el-cascader
|
|
|
|
|
+ clearable
|
|
|
|
|
+ v-model="similarProductData.type_name"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ style="width: 120px"
|
|
|
|
|
+ :show-all-levels="false"
|
|
|
|
|
+ :options="PDTTypeList"
|
|
|
|
|
+ :props="{
|
|
|
|
|
+ expandTrigger: 'hover',
|
|
|
|
|
+ children: 'child',
|
|
|
|
|
+ value: 'title',
|
|
|
|
|
+ label: 'title',
|
|
|
|
|
+ checkStrictly: true,
|
|
|
|
|
+ emitPath: false,
|
|
|
|
|
+ }"
|
|
|
|
|
+ @change="(e) => hanndleAddPDTTypeChange(similarProductData, e)"
|
|
|
|
|
+ ></el-cascader>
|
|
|
|
|
+ <!-- <Select
|
|
|
v-model="similarProductData.type_name"
|
|
v-model="similarProductData.type_name"
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
style="width: 120px"
|
|
style="width: 120px"
|
|
@@ -632,12 +650,13 @@
|
|
|
:key="item.title"
|
|
:key="item.title"
|
|
|
:label="item.title"
|
|
:label="item.title"
|
|
|
></Option>
|
|
></Option>
|
|
|
- </Select>
|
|
|
|
|
|
|
+ </Select> -->
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
<FormItem label="产品名称:">
|
|
<FormItem label="产品名称:">
|
|
|
<Input
|
|
<Input
|
|
|
type="text"
|
|
type="text"
|
|
|
size="small"
|
|
size="small"
|
|
|
|
|
+ clearable
|
|
|
v-model="similarProductData.title"
|
|
v-model="similarProductData.title"
|
|
|
style="width: 120px"
|
|
style="width: 120px"
|
|
|
/>
|
|
/>
|
|
@@ -646,6 +665,7 @@
|
|
|
<Input
|
|
<Input
|
|
|
type="text"
|
|
type="text"
|
|
|
size="small"
|
|
size="small"
|
|
|
|
|
+ clearable
|
|
|
v-model="similarProductData.model"
|
|
v-model="similarProductData.model"
|
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
|
style="width: 120px"
|
|
style="width: 120px"
|
|
@@ -655,6 +675,7 @@
|
|
|
<Input
|
|
<Input
|
|
|
type="text"
|
|
type="text"
|
|
|
size="small"
|
|
size="small"
|
|
|
|
|
+ clearable
|
|
|
v-model="similarProductData.url_number"
|
|
v-model="similarProductData.url_number"
|
|
|
style="width: 120px"
|
|
style="width: 120px"
|
|
|
/>
|
|
/>
|
|
@@ -687,14 +708,18 @@
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="modal-footer" slot="footer">
|
|
<div class="modal-footer" slot="footer">
|
|
|
- <Button @click="showSimilarProductModal = false">取消</Button>
|
|
|
|
|
|
|
+ <Button
|
|
|
|
|
+ style="margin-right:10px"
|
|
|
|
|
+ @click="showSimilarProductModal = false"
|
|
|
|
|
+ >取消</Button
|
|
|
|
|
+ >
|
|
|
<Button
|
|
<Button
|
|
|
type="primary"
|
|
type="primary"
|
|
|
@click="handleSimilarProductConfirm(tempSimilarProductData.id)"
|
|
@click="handleSimilarProductConfirm(tempSimilarProductData.id)"
|
|
|
>确认</Button
|
|
>确认</Button
|
|
|
>
|
|
>
|
|
|
</div>
|
|
</div>
|
|
|
- </Modal>
|
|
|
|
|
|
|
+ </el-dialog>
|
|
|
<!-- 选择工艺路线弹窗 -->
|
|
<!-- 选择工艺路线弹窗 -->
|
|
|
<Modal
|
|
<Modal
|
|
|
class-name="vertical-center-modal"
|
|
class-name="vertical-center-modal"
|
|
@@ -1389,133 +1414,69 @@ export default {
|
|
|
order_no,
|
|
order_no,
|
|
|
orders_area_product_detail_id,
|
|
orders_area_product_detail_id,
|
|
|
},
|
|
},
|
|
|
- })
|
|
|
|
|
- .then((res) => {
|
|
|
|
|
- this.formData = res.data;
|
|
|
|
|
- // this.formData.basic_product_id = 8;
|
|
|
|
|
- // 获取产品分类、测量字段
|
|
|
|
|
- this.handleMatchBP(this.productTypes, this.formData.basic_product_id);
|
|
|
|
|
- this.handleClick(JSON.stringify(this.nowSelectObj));
|
|
|
|
|
- if (this.formData.parts.length == 0) {
|
|
|
|
|
- this.formData.parts = [
|
|
|
|
|
- {
|
|
|
|
|
- isAddPart: true, //是否为新增部件
|
|
|
|
|
- isAddProcessRoute: true, //是否为新增工艺组合
|
|
|
|
|
- long: "",
|
|
|
|
|
- width: "",
|
|
|
|
|
- thick: "",
|
|
|
|
|
- parts_type: "", //部件分类名称
|
|
|
|
|
- pay_state: "", //标签
|
|
|
|
|
- part_id: "", //部件名称
|
|
|
|
|
- company: "", //单位
|
|
|
|
|
- processCombination: "", //工艺组合名称
|
|
|
|
|
- process_price: "", //工艺价格
|
|
|
|
|
- proportion: "", //产值比例
|
|
|
|
|
- properties: [], //工艺属性
|
|
|
|
|
- ProcessAttrList: JSON.parse(
|
|
|
|
|
- JSON.stringify(this.tempProcessAttrList)
|
|
|
|
|
- ), //工艺属性列表
|
|
|
|
|
- partsProcessLineTableData: [], //工艺路线表格
|
|
|
|
|
- partsWoodTableData: [
|
|
|
|
|
- {
|
|
|
|
|
- title: "",
|
|
|
|
|
- spare_parts: "",
|
|
|
|
|
- number: "",
|
|
|
|
|
- company: "",
|
|
|
|
|
- long: "",
|
|
|
|
|
- wide: "",
|
|
|
|
|
- thick: "",
|
|
|
|
|
- technological_requirement_id: "",
|
|
|
|
|
- sub_num: "",
|
|
|
|
|
- veneer_id: "",
|
|
|
|
|
- paint_id: "",
|
|
|
|
|
- label: "",
|
|
|
|
|
- print_num: "",
|
|
|
|
|
- },
|
|
|
|
|
- ], //木板表格
|
|
|
|
|
- partsMetalseData: [
|
|
|
|
|
- {
|
|
|
|
|
- spare_parts: "",
|
|
|
|
|
- number: "",
|
|
|
|
|
- company: "",
|
|
|
|
|
- price: "",
|
|
|
|
|
- total_price: "",
|
|
|
|
|
- },
|
|
|
|
|
- ], //五金表格
|
|
|
|
|
- partsNameList: [{ id: "", title: "" }], //部件名称列表
|
|
|
|
|
- partsProcessRouteList: [{ id: "", title: "" }], //工艺组合名称列表
|
|
|
|
|
- checkBox: [],
|
|
|
|
|
- },
|
|
|
|
|
- ];
|
|
|
|
|
- } else {
|
|
|
|
|
- this.handleSimilarProductConfirm(
|
|
|
|
|
- res.data.product_id,
|
|
|
|
|
- this.formData
|
|
|
|
|
- );
|
|
|
|
|
- // this.formData.parts.map((element) => {
|
|
|
|
|
- // console.log('element :>> ', element);
|
|
|
|
|
- // element.partsProcessLineTableData = [];
|
|
|
|
|
- // element.wide = element.formula_w;
|
|
|
|
|
- // element.proportion = element.ratio;
|
|
|
|
|
- // element.thick = element.formula_h;
|
|
|
|
|
- // element.long = element.formula_l;
|
|
|
|
|
- // (element.ProcessAttrList = this.tempProcessAttrList), //工艺属性列表
|
|
|
|
|
- // this.axios("/api/parts_detail", {
|
|
|
|
|
- // params: { id: element.part_id },
|
|
|
|
|
- // })
|
|
|
|
|
- // .then((re) => {
|
|
|
|
|
- // // element.company = re.data.company
|
|
|
|
|
- // element.isAddPart = true;
|
|
|
|
|
- // element.isAddProcessRoute = true;
|
|
|
|
|
- // element.parts_type = re.data.p_id;
|
|
|
|
|
- // // element.part_id = re.data.title
|
|
|
|
|
- // this.axios({
|
|
|
|
|
- // method: "get",
|
|
|
|
|
- // url: "/api/parts_index",
|
|
|
|
|
- // params: {
|
|
|
|
|
- // bp_id: element.parts_type,
|
|
|
|
|
- // },
|
|
|
|
|
- // })
|
|
|
|
|
- // .then((r) => {
|
|
|
|
|
- // element.partsNameList = r.data.data;
|
|
|
|
|
- // if (isEditItem) {
|
|
|
|
|
- // let item = isEditItem;
|
|
|
|
|
- // // let item = JSON.parse(JSON.stringify(isEditItem));
|
|
|
|
|
- // item.parts.forEach((element) => {
|
|
|
|
|
- // element.processCombination = element.route_id;
|
|
|
|
|
- // let obj = { value: element.route_id, label: "" };
|
|
|
|
|
- // this.handleProcessRouteSelect(element, obj);
|
|
|
|
|
- // });
|
|
|
|
|
- // isEditItem = item;
|
|
|
|
|
- // }
|
|
|
|
|
- // this.$forceUpdate()
|
|
|
|
|
- // })
|
|
|
|
|
- // .catch((err) => { });
|
|
|
|
|
- // element.company = re.data.company;
|
|
|
|
|
- // // element.partsNameList = [{ id: re.data.id, title: re.data.title }]
|
|
|
|
|
- // element.pay_state = re.data.label;
|
|
|
|
|
- // // element.partsWoodTableData = re.data.detail;
|
|
|
|
|
- // this.showSimilarProductModal = false;
|
|
|
|
|
- // })
|
|
|
|
|
- // .catch((err) => { });
|
|
|
|
|
- // let obj = { value: element.part_id };
|
|
|
|
|
- // this.handlePartsNameSelect(element, obj);
|
|
|
|
|
- // });
|
|
|
|
|
-
|
|
|
|
|
- this.formData.parts.map((element) => {
|
|
|
|
|
- // element.properties = element.process_ids;
|
|
|
|
|
- // 1 木板 2 木皮 3 实木 4 辅料 5 五金 6 油漆
|
|
|
|
|
- // if (element.type_id == 0 || element.type_id == 1) {
|
|
|
|
|
- // this.tableData.push(element)
|
|
|
|
|
- // } else if (element.type_id == 5) {
|
|
|
|
|
- // this.metalsTableData.push(element)
|
|
|
|
|
- // }
|
|
|
|
|
- // process_ids: "1,3"
|
|
|
|
|
- // route_id: 10
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- .catch((err) => {});
|
|
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ this.formData = res.data;
|
|
|
|
|
+ // this.formData.basic_product_id = 8;
|
|
|
|
|
+ // 获取产品分类、测量字段
|
|
|
|
|
+ this.handleMatchBP(this.productTypes, this.formData.basic_product_id);
|
|
|
|
|
+ this.handleClick(JSON.stringify(this.nowSelectObj));
|
|
|
|
|
+ if (this.formData.parts.length == 0) {
|
|
|
|
|
+ this.formData.parts = [
|
|
|
|
|
+ {
|
|
|
|
|
+ isAddPart: true, //是否为新增部件
|
|
|
|
|
+ isAddProcessRoute: true, //是否为新增工艺组合
|
|
|
|
|
+ long: "",
|
|
|
|
|
+ width: "",
|
|
|
|
|
+ thick: "",
|
|
|
|
|
+ parts_type: "", //部件分类名称
|
|
|
|
|
+ pay_state: "", //标签
|
|
|
|
|
+ part_id: "", //部件名称
|
|
|
|
|
+ company: "", //单位
|
|
|
|
|
+ processCombination: "", //工艺组合名称
|
|
|
|
|
+ process_price: "", //工艺价格
|
|
|
|
|
+ proportion: "", //产值比例
|
|
|
|
|
+ properties: [], //工艺属性
|
|
|
|
|
+ ProcessAttrList: JSON.parse(
|
|
|
|
|
+ JSON.stringify(this.tempProcessAttrList)
|
|
|
|
|
+ ), //工艺属性列表
|
|
|
|
|
+ partsProcessLineTableData: [], //工艺路线表格
|
|
|
|
|
+ partsWoodTableData: [
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "",
|
|
|
|
|
+ spare_parts: "",
|
|
|
|
|
+ number: "",
|
|
|
|
|
+ company: "",
|
|
|
|
|
+ long: "",
|
|
|
|
|
+ wide: "",
|
|
|
|
|
+ thick: "",
|
|
|
|
|
+ technological_requirement_id: "",
|
|
|
|
|
+ sub_num: "",
|
|
|
|
|
+ veneer_id: "",
|
|
|
|
|
+ paint_id: "",
|
|
|
|
|
+ label: "",
|
|
|
|
|
+ print_num: "",
|
|
|
|
|
+ },
|
|
|
|
|
+ ], //木板表格
|
|
|
|
|
+ partsMetalseData: [
|
|
|
|
|
+ {
|
|
|
|
|
+ spare_parts: "",
|
|
|
|
|
+ number: "",
|
|
|
|
|
+ company: "",
|
|
|
|
|
+ price: "",
|
|
|
|
|
+ total_price: "",
|
|
|
|
|
+ },
|
|
|
|
|
+ ], //五金表格
|
|
|
|
|
+ partsNameList: [{ id: "", title: "" }], //部件名称列表
|
|
|
|
|
+ partsProcessRouteList: [{ id: "", title: "" }], //工艺组合名称列表
|
|
|
|
|
+ checkBox: [],
|
|
|
|
|
+ },
|
|
|
|
|
+ ];
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.formData.parts.map(v=>{
|
|
|
|
|
+ this.handleSimilarProductConfirm(res.data.product_id, v);
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
handleMatchBP(array, id) {
|
|
handleMatchBP(array, id) {
|
|
|
array.forEach((element, index) => {
|
|
array.forEach((element, index) => {
|
|
@@ -1680,8 +1641,8 @@ export default {
|
|
|
// }
|
|
// }
|
|
|
this.formData.parts.map((element) => {
|
|
this.formData.parts.map((element) => {
|
|
|
element.partsProcessLineTableData = [];
|
|
element.partsProcessLineTableData = [];
|
|
|
- element.wide = element.formula_w;
|
|
|
|
|
element.proportion = element.ratio;
|
|
element.proportion = element.ratio;
|
|
|
|
|
+ element.wide = element.formula_w;
|
|
|
element.thick = element.formula_h;
|
|
element.thick = element.formula_h;
|
|
|
element.long = element.formula_l;
|
|
element.long = element.formula_l;
|
|
|
element.ProcessAttrList = JSON.parse(
|
|
element.ProcessAttrList = JSON.parse(
|
|
@@ -1775,8 +1736,6 @@ export default {
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
- // 新增工艺组合,清空已选工艺路线
|
|
|
|
|
- item.partsProcessLineTableData = [];
|
|
|
|
|
if (!item.partsProcessRouteList) {
|
|
if (!item.partsProcessRouteList) {
|
|
|
item.partsProcessRouteList = [];
|
|
item.partsProcessRouteList = [];
|
|
|
}
|
|
}
|
|
@@ -1901,7 +1860,6 @@ export default {
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
item.isAddProcessRoute = true;
|
|
item.isAddProcessRoute = true;
|
|
|
- item.process_name = "";
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -2285,6 +2243,8 @@ export default {
|
|
|
});
|
|
});
|
|
|
element.route_id = res.data.id;
|
|
element.route_id = res.data.id;
|
|
|
element.part_id = result.data.id;
|
|
element.part_id = result.data.id;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ element.route_id = element.processCombination;
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
save_sucess = false;
|
|
save_sucess = false;
|
|
@@ -2327,6 +2287,8 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
save_sucess = false;
|
|
save_sucess = false;
|
|
|
}
|
|
}
|
|
|
|
|
+ } else {
|
|
|
|
|
+ element.route_id = element.processCombination;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -2719,4 +2681,8 @@ export default {
|
|
|
top: 0;
|
|
top: 0;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+/deep/.el-input--small .el-input__inner {
|
|
|
|
|
+ height: 24px;
|
|
|
|
|
+ line-height: 24px;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|