|
@@ -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,71 +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
|
|
|
|
- );
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ }).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) => {
|
|
@@ -1713,8 +1736,6 @@ export default {
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
- // 新增工艺组合,清空已选工艺路线
|
|
|
|
- item.partsProcessLineTableData = [];
|
|
|
|
if (!item.partsProcessRouteList) {
|
|
if (!item.partsProcessRouteList) {
|
|
item.partsProcessRouteList = [];
|
|
item.partsProcessRouteList = [];
|
|
}
|
|
}
|
|
@@ -1839,7 +1860,6 @@ export default {
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
item.isAddProcessRoute = true;
|
|
item.isAddProcessRoute = true;
|
|
- item.process_name = "";
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -2223,7 +2243,7 @@ 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{
|
|
|
|
|
|
+ } else {
|
|
element.route_id = element.processCombination;
|
|
element.route_id = element.processCombination;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -2267,6 +2287,8 @@ export default {
|
|
} else {
|
|
} else {
|
|
save_sucess = false;
|
|
save_sucess = false;
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ element.route_id = element.processCombination;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2659,4 +2681,8 @@ export default {
|
|
top: 0;
|
|
top: 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+/deep/.el-input--small .el-input__inner {
|
|
|
|
+ height: 24px;
|
|
|
|
+ line-height: 24px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|