Commit 2688258a authored by renjintao's avatar renjintao

产品管理process

parent 5548c7e2
......@@ -736,7 +736,73 @@ export default {
easy: true,
high: true
},
],
columns6: [{
title: this.l6("name"),
key: "name",
align: "left",
},
{
key: "mmcode",
title: this.l6("mmcode"),
align: "center",
high: true,
},
{
key: "levelTitle",
title: this.l6("levelTitle"),
align: "left",
high: true,
},
{
key: "levelId",
title: this.l6("levelId"),
align: "left",
high: true,
hide: true,
import: true,
},
{
key: "drawingNo",
title: this.l6("drawingNo"),
align: "right",
high: true,
},
{
key: "madeCompanyTitle",
title: this.l6("madeCompanyTitle"),
align: "center",
width: 260,
high: true,
},
{
key: "madeCompany",
title: this.l6("madeCompany"),
align: "center",
width: 260,
high: true,
hide: true,
import: true,
},
{
key: "version",
title: this.l6("version"),
align: "center",
width: 260,
high: true,
hide: true,
import: true,
},
{
key: "materialId",
title: this.l6("materialId"),
align: "center",
width: 260,
high: true,
hide: true,
import: true,
},
],
tdHeightExcel: "",
excelData: [],
......@@ -1086,6 +1152,9 @@ export default {
case 5:
this.loadColum(this.columns5);
break;
case 6:
this.loadColum(this.columns6);
break;
default:
this.loadColum(this.columns0);
}
......@@ -1121,6 +1190,9 @@ export default {
case 5:
this.importRountingBom();
break;
case 6:
this.importProductMix();
break;
default:
//this.loadColum(this.columns1);
}
......@@ -1459,7 +1531,50 @@ export default {
return routingHeaderId
},
//插入工艺规程 及工艺相关end
//插入产品管理
importProductMix() {
let tempData = this.$u.clone(this.dataIm);
let tempList = [];
tempData.forEach((ele) => {
let obj = {
mmcode: ele.mmcode ? ele.mmcode : '',
drawingNo: ele.drawingNo ? ele.drawingNo : '',
name: ele.name ? ele.name : '',
type: ele.type ? ele.type : 1,
madeCompany: ele.madeCompany ? ele.madeCompany : null,
madeCompanyTitle: ele.madeCompanyTitle ? ele.madeCompanyTitle : "",
version: ele.version ? ele.version : 0,
productUrl: "",
productUrlList: "",
levelId: ele.levelId ? ele.levelId : null,
levelTitle: ele.levelTitle ? ele.levelTitle : "",
materialId: ele.materialId ? ele.materialId : "",
};
if (ele.name && ele.name != '') {
tempList.push(obj);
}
});
if (tempList.length == 0) {
this.$Message.error("所有导入的数据均不合法!");
} else {
let parms = {
list: tempList,
};
let url = `${technologyUrl}productinfoimportservice/import`;
this.$api.post(url, parms).then((r) => {
if (r.success) {
this.$Message.success("成功批量导入产品管理模块 " + tempList.length + " 条数据");
this.imBtn = false;
this.cancelExcel();
} else {
this.$Message.error("批量导入失败")
}
}).catch(err => {
this.$Message.error("数据异常!");
});
}
},
//切换列表和excel按钮
changeExcel(val) {
if (val == 1) {
......@@ -1495,6 +1610,10 @@ export default {
key = "routingsupporting" + "." + key;
return this.$t(key);
},
l6(key) {
key = "product_info" + "." + key;
return this.$t(key);
},
},
watch: {
eid(v) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment