|
|
@ -135,19 +135,12 @@ export default { |
|
|
|
itemName:null, |
|
|
|
itemDesc1:null, |
|
|
|
itemDesc2:null, |
|
|
|
// productLocationCodeListJson:null, |
|
|
|
// productLocationCodeListJson_show:[], |
|
|
|
productLocationCodeListJson:null, |
|
|
|
productLocationCodeListJson_show:[], |
|
|
|
rawLocationCodeListJson:null, |
|
|
|
rawLocationCodeListJson_show:[], |
|
|
|
wipLocationCodeListJson:null, |
|
|
|
wipLocationCodeListJson_show:[], |
|
|
|
// bomId: "", |
|
|
|
// routingId: "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// enabled: true, |
|
|
|
// code: "", |
|
|
|
// company: "", |
|
|
|
// prodLineId: "", |
|
|
|
// itemId: "" |
|
|
|
remark: "", |
|
|
|
}, |
|
|
|
//编辑 |
|
|
@ -157,8 +150,8 @@ export default { |
|
|
|
itemName:null, |
|
|
|
itemDesc1:null, |
|
|
|
itemDesc2:null, |
|
|
|
// productLocationCodeListJson:null, |
|
|
|
// productLocationCodeListJson_show:[], |
|
|
|
productLocationCodeListJson:null, |
|
|
|
productLocationCodeListJson_show:[], |
|
|
|
rawLocationCodeListJson:null, |
|
|
|
rawLocationCodeListJson_show:[], |
|
|
|
wipLocationCodeListJson:null, |
|
|
@ -178,19 +171,20 @@ export default { |
|
|
|
{ label: "物料名称", prop: 'itemName', type:"input", disabled:true, colSpan: 12 }, |
|
|
|
{ label: "物料描述1", prop: 'itemDesc1', type:"input", disabled:true, colSpan: 12 }, |
|
|
|
{ label: "物料描述2", prop: 'itemDesc2', type:"input", disabled:true, colSpan: 12 }, |
|
|
|
// { type: "filterSelect", label: "完工库位列表", prop: "productLocationCodeListJson_show", optionsLabel: "name", optionsValue: "code", |
|
|
|
// focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")},//,[{logic:"And",column:"type",action:"==",value:"2"}] |
|
|
|
// searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData)}, //,[{logic:"And",column:"type",action:"==",value:"2"}] |
|
|
|
// colSpan: 12,multiple:true |
|
|
|
// }, |
|
|
|
{ type: "filterSelect", label: "原材料来源库位列表", prop: "rawLocationCodeListJson_show", optionsLabel: "name", optionsValue: "code", |
|
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",[{logic:"And",column:"type",action:"==",value:"2"}])}, |
|
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData,[{logic:"And",column:"type",action:"==",value:"2"}])}, |
|
|
|
// 3,4,16 |
|
|
|
{ type: "filterSelect", label: "成品/半成品库位", prop: "productLocationCodeListJson_show", optionsLabel: "name", optionsValue: "code", |
|
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",this.locationFilter('product'))}, |
|
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData,this.locationFilter('product'))}, |
|
|
|
colSpan: 12,multiple:true |
|
|
|
}, |
|
|
|
{ type: "filterSelect", label: "半成品来源库位列表", prop: "wipLocationCodeListJson_show", optionsLabel: "name", optionsValue: "code", |
|
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",[{logic:"And",column:"type",action:"==",value:"3"}])}, |
|
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData,[{logic:"And",column:"type",action:"==",value:"3"}])}, |
|
|
|
{ type: "filterSelect", label: "原材料库位", prop: "rawLocationCodeListJson_show", optionsLabel: "name", optionsValue: "code", |
|
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",this.locationFilter('raw'))}, |
|
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData,this.locationFilter('raw'))}, |
|
|
|
colSpan: 12,multiple:true |
|
|
|
}, |
|
|
|
{ type: "filterSelect", label: "线边库位", prop: "wipLocationCodeListJson_show", optionsLabel: "name", optionsValue: "code", |
|
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",this.locationFilter('wip'))}, |
|
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData,this.locationFilter('wip'))}, |
|
|
|
colSpan: 12,multiple:true |
|
|
|
}, |
|
|
|
{ type: "input", label: "备注", prop: 'remark', colSpan: 12 }, |
|
|
@ -205,19 +199,19 @@ export default { |
|
|
|
{ label: "物料名称", prop: 'itemName', type:"input", disabled:true, colSpan: 12 }, |
|
|
|
{ label: "物料描述1", prop: 'itemDesc1', type:"input", disabled:true, colSpan: 12 }, |
|
|
|
{ label: "物料描述2", prop: 'itemDesc2', type:"input", disabled:true, colSpan: 12 }, |
|
|
|
// { type: "filterSelect", label: "完工库位列表", prop: "productLocationCodeListJson_show", optionsLabel: "name", optionsValue: "code", |
|
|
|
// focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")},//,[{logic:"And",column:"type",action:"==",value:"2"}] |
|
|
|
// searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.editFormData)}, //,[{logic:"And",column:"type",action:"==",value:"2"}] |
|
|
|
// colSpan: 12,multiple:true |
|
|
|
// }, |
|
|
|
{ type: "filterSelect", label: "原材料来源库位列表", prop: "rawLocationCodeListJson_show", optionsLabel: "name", optionsValue: "code", |
|
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",[{logic:"And",column:"type",action:"==",value:"2"}])}, |
|
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.editFormData,[{logic:"And",column:"type",action:"==",value:"2"}])}, |
|
|
|
{ type: "filterSelect", label: "成品/半成品库位", prop: "productLocationCodeListJson_show", optionsLabel: "name", optionsValue: "code", |
|
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",this.locationFilter('product'))}, |
|
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.editFormData,this.locationFilter('product'))}, |
|
|
|
colSpan: 12,multiple:true |
|
|
|
}, |
|
|
|
{ type: "filterSelect", label: "半成品来源库位列表", prop: "wipLocationCodeListJson_show", optionsLabel: "name", optionsValue: "code", |
|
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",[{logic:"And",column:"type",action:"==",value:"3"}])}, |
|
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.editFormData,[{logic:"And",column:"type",action:"==",value:"3"}])}, |
|
|
|
{ type: "filterSelect", label: "原材料来源库位", prop: "rawLocationCodeListJson_show", optionsLabel: "name", optionsValue: "code", |
|
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",this.locationFilter('raw'))}, |
|
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.editFormData,this.locationFilter('raw'))}, |
|
|
|
colSpan: 12,multiple:true |
|
|
|
}, |
|
|
|
{ type: "filterSelect", label: "线边库位", prop: "wipLocationCodeListJson_show", optionsLabel: "name", optionsValue: "code", |
|
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",this.locationFilter('wip'))}, |
|
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.editFormData,this.locationFilter('wip'))}, |
|
|
|
colSpan: 12,multiple:true |
|
|
|
}, |
|
|
|
{ type: "input", label: "备注", prop: 'remark', colSpan: 12 }, |
|
|
@ -238,6 +232,25 @@ export default { |
|
|
|
this.paging(); |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
locationFilter(type){ |
|
|
|
switch (type) { |
|
|
|
case "product": |
|
|
|
return [ |
|
|
|
{logic:"And",column:"type",action:"In",value:"[3,4,16]"}, |
|
|
|
] |
|
|
|
|
|
|
|
case "raw": |
|
|
|
return [{logic:"And",column:"type",action:"==",value:"2"}] |
|
|
|
|
|
|
|
case "wip": |
|
|
|
return [ |
|
|
|
{logic:"And",column:"type",action:"In",value:"[5,15]"}, |
|
|
|
] |
|
|
|
|
|
|
|
default: |
|
|
|
break; |
|
|
|
} |
|
|
|
}, |
|
|
|
initJson(str){ |
|
|
|
let json = str |
|
|
|
try { |
|
|
@ -257,7 +270,7 @@ export default { |
|
|
|
// 多选数据库位转义处理 |
|
|
|
drawerbuttonHandle(val){ |
|
|
|
if(val == "edit"){ |
|
|
|
// this.propsData.productLocationCodeListJson_show = this.initJson(this.propsData.productLocationCodeListJson) |
|
|
|
this.propsData.productLocationCodeListJson_show = this.initJson(this.propsData.productLocationCodeListJson) |
|
|
|
this.propsData.rawLocationCodeListJson_show = this.initJson(this.propsData.rawLocationCodeListJson) |
|
|
|
this.propsData.wipLocationCodeListJson_show = this.initJson(this.propsData.wipLocationCodeListJson) |
|
|
|
} |
|
|
@ -280,11 +293,11 @@ export default { |
|
|
|
// 提交库位处理 |
|
|
|
FormSubmitHandle(val){ |
|
|
|
if(this.formReveal){ |
|
|
|
// this.CreateFormData.productLocationCodeListJson = this.initStringify(this.CreateFormData.productLocationCodeListJson_show) |
|
|
|
this.CreateFormData.productLocationCodeListJson = this.initStringify(this.CreateFormData.productLocationCodeListJson_show) |
|
|
|
this.CreateFormData.rawLocationCodeListJson = this.initStringify(this.CreateFormData.rawLocationCodeListJson_show) |
|
|
|
this.CreateFormData.wipLocationCodeListJson = this.initStringify(this.CreateFormData.wipLocationCodeListJson_show) |
|
|
|
}else{ |
|
|
|
// this.editFormData.productLocationCodeListJson = this.initStringify(this.editFormData.productLocationCodeListJson_show) |
|
|
|
this.editFormData.productLocationCodeListJson = this.initStringify(this.editFormData.productLocationCodeListJson_show) |
|
|
|
this.editFormData.rawLocationCodeListJson = this.initStringify(this.editFormData.rawLocationCodeListJson_show) |
|
|
|
this.editFormData.wipLocationCodeListJson = this.initStringify(this.editFormData.wipLocationCodeListJson_show) |
|
|
|
} |
|
|
|