Commit c2f9f22d authored by 仇晓婷's avatar 仇晓婷

订单管理产品名称

parent 03ed499e
......@@ -3,15 +3,15 @@
<Form :model="orderSearchForm" :label-width="95" :rules="ruleValidate" ref="formValidate">
<Row>
<Col span="8">
<FormItem label="产品名称" style="width:100%" prop="productId">
<FormItem label="产品名称" style="width:100%" prop="bomId">
<Select
v-model="orderSearchForm.productId"
v-model="orderSearchForm.bomId"
:placeholder="placeholdeinfo"
style="width:240px;"
>
<Option
v-for="(item,index) in list"
:key="index"
:key="item.index"
:value="item.value"
style="display:none"
:label="item.label"
......@@ -142,10 +142,11 @@ export default {
remark: "", //备注
projectNumber: "", //项目号
batchNumber: "", //批次号
urgencyLevel: null //紧急程度
urgencyLevel: null, //紧急程度
bomId: null
},
ruleValidate: {
productId: [
bomId: [
{
required: true,
message: "请选择产品名称",
......@@ -209,6 +210,7 @@ export default {
return this.$t(key);
},
handleSelect(data) {
// console.log(data);
if (data.length > 0) {
this.selectdata = [];
this.selectdata = data;
......@@ -218,6 +220,7 @@ export default {
this.orderSearchForm.productName = data[0].title;
this.orderSearchForm.productId = data[0].productId;
this.orderSearchForm.drawnNumber = data[0].drawingNo;
this.orderSearchForm.bomId = data[0].bomId;
} else {
this.$Message.error("此节点不是产品,请选择产品节点!");
}
......@@ -256,15 +259,18 @@ export default {
},
renderContent(h, { root, node, data }) {
let type = "md-folder";
let title=data.title;
let title = data.title;
if (data.isProduct != 0) {
let version=this.$store.getters.dictionaryByCode("material.main.version",data.version)
let version = this.$store.getters.dictionaryByCode(
"material.main.version",
data.version
);
type = "ios-image";
if(version){
title=data.title+"("+data.mmcode+"/"+version.name+")"
}else{
title=data.title+"("+data.mmcode+")"
}
if (version) {
title = data.title + "(" + data.mmcode + "/" + version.name + ")";
} else {
title = data.title + "(" + data.mmcode + ")";
}
}
return h(
"span",
......
......@@ -5,9 +5,9 @@
<FormItem label="订单编号" style="width:100%">{{this.orderSearchForm.mesCode}}</FormItem>
</Col>
<Col span="8">
<FormItem :label="l('productName')" style="width:100%" prop="productId">
<FormItem :label="l('productName')" style="width:100%" prop="bomId">
<Select
v-model="orderSearchForm.productId"
v-model="orderSearchForm.bomId"
:placeholder="placeholdeinfo"
style="width:240px;"
>
......@@ -120,7 +120,7 @@ export default {
disabled: false,
orderSearchForm: {},
ruleValidate: {
productId: [
bomId: [
{
required: true,
message: "请选择产品名称",
......@@ -143,7 +143,7 @@ export default {
type: "number",
trigger: "change"
}
],
]
},
placeholdeinfo: "",
list: [],
......@@ -172,7 +172,7 @@ export default {
this.$refs.formValidate.validate(v => {
if (v) {
this.disabled = true;
this.orderSearchForm.status=1
this.orderSearchForm.status = 1;
Api.mesorderupdate(this.orderSearchForm)
.then(r => {
this.disabled = false;
......@@ -208,6 +208,7 @@ export default {
this.orderSearchForm.productName = data[0].title;
this.orderSearchForm.productId = data[0].productId;
this.orderSearchForm.drawnNumber = data[0].drawingNo;
this.orderSearchForm.bomId = data[0].bomId;
} else {
this.$Message.error("此节点不是产品,请选择产品节点!");
}
......@@ -226,7 +227,8 @@ export default {
remark: "", //备注
projectNumber: "", //项目号
batchNumber: "", //批次号
urgencyLevel: null //紧急程度
urgencyLevel: null, //紧急程度
bomId:'',
};
},
loadTree() {
......
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