|
|
@ -38,8 +38,10 @@ |
|
|
|
:Options="editOptions" |
|
|
|
:Handle="editHandle" |
|
|
|
:Rules="formReveal ? editRules.cerateRule : editRules.editRule" |
|
|
|
@FormSubmit="FormSubmit" |
|
|
|
@FormSubmit="FormSubmitHandle" |
|
|
|
@close="FormClose" |
|
|
|
@push="push" |
|
|
|
@clear="clear" |
|
|
|
@goBack="goBack" |
|
|
|
></newAndEdiDialog> |
|
|
|
<!-- 搜索按钮——窗体组件 --> |
|
|
@ -57,7 +59,8 @@ |
|
|
|
@handleSelectionChange="prepareFormData" |
|
|
|
@SizeChange="searchAlterResultCount($event, searchPageListParams)" |
|
|
|
@CurrentChange="searchAlertoldSkipCount($event, searchPageListParams)" |
|
|
|
@tableButtonClick="searchSubmit(arguments)" |
|
|
|
@tableButtonClick="searchSubmit(arguments,searchColumns)" |
|
|
|
:isMoreSelectTable="true" |
|
|
|
></searchPage> |
|
|
|
<!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用--> |
|
|
|
<!-- methodValue 导入方式默认选项 是否局部导入 默认选项 --> |
|
|
@ -80,7 +83,7 @@ |
|
|
|
:propsData="propsData" |
|
|
|
:tabsDesTions="tabsDesTions" |
|
|
|
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
|
|
|
@drawerbutton="drawerbutton" |
|
|
|
@drawerbutton="drawerbuttonHandle" |
|
|
|
@handleCommand="drawerHandle" |
|
|
|
@close-value="closeValue" |
|
|
|
></curren-Drawer> |
|
|
@ -127,9 +130,17 @@ export default { |
|
|
|
], |
|
|
|
//新增 |
|
|
|
CreateFormData: { |
|
|
|
remark: "", |
|
|
|
prodLineCode: "", |
|
|
|
itemCode: "", |
|
|
|
prodLineCode:null, |
|
|
|
itemCode:null, |
|
|
|
itemName:null, |
|
|
|
itemDesc1:null, |
|
|
|
itemDesc2:null, |
|
|
|
productLocationCodeListJson:null, |
|
|
|
productLocationCodeListJson_show:[], |
|
|
|
rawLocationCodeListJson:null, |
|
|
|
rawLocationCodeListJson_show:[], |
|
|
|
wipLocationCodeListJson:null, |
|
|
|
wipLocationCodeListJson_show:[], |
|
|
|
// bomId: "", |
|
|
|
// routingId: "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// enabled: true, |
|
|
@ -137,32 +148,78 @@ export default { |
|
|
|
// company: "", |
|
|
|
// prodLineId: "", |
|
|
|
// itemId: "" |
|
|
|
remark: "", |
|
|
|
}, |
|
|
|
//编辑 |
|
|
|
editFormData: { |
|
|
|
prodLineCode:null, |
|
|
|
itemCode:null, |
|
|
|
itemName:null, |
|
|
|
itemDesc1:null, |
|
|
|
itemDesc2:null, |
|
|
|
productLocationCodeListJson:null, |
|
|
|
productLocationCodeListJson_show:[], |
|
|
|
rawLocationCodeListJson:null, |
|
|
|
rawLocationCodeListJson_show:[], |
|
|
|
wipLocationCodeListJson:null, |
|
|
|
wipLocationCodeListJson_show:[], |
|
|
|
remark: "", |
|
|
|
itemCode: "", |
|
|
|
prodLineCode: "", |
|
|
|
}, |
|
|
|
editOptions: { |
|
|
|
type: [] |
|
|
|
}, |
|
|
|
CreateForm: [ |
|
|
|
{ type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code", |
|
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")}, |
|
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物品选择', this.CreateFormData) }, colSpan: 12 }, |
|
|
|
{ type: "filterSelect", label: "生产线代码", prop: "prodLineCode", optionsLabel: "name", optionsValue: "code", |
|
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/productionLine")}, |
|
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/productionLine', 'ProductionLine', '生产线选择', this.CreateFormData) }, colSpan: 12 }, |
|
|
|
{ type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code", |
|
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")}, |
|
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物品选择', this.CreateFormData) }, colSpan: 12 }, |
|
|
|
{ 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"}] |
|
|
|
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:"2"}] |
|
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData)}, //,[{logic:"And",column:"type",action:"==",value:"2"}] |
|
|
|
colSpan: 12,multiple:true |
|
|
|
}, |
|
|
|
{ type: "input", label: "备注", prop: 'remark', colSpan: 12 }, |
|
|
|
], |
|
|
|
editForm: [ |
|
|
|
{ type: "filterSelect", label: "生产线代码",disabled:true, prop: "prodLineCode", optionsLabel: "name", optionsValue: "code", |
|
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/productionLine")}, |
|
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/productionLine', 'ProductionLine', '生产线选择', this.editFormData) }, colSpan: 12 }, |
|
|
|
{ type: "filterSelect", label: "物品代码",disabled:true, prop: "itemCode", optionsLabel: "name", optionsValue: "code", |
|
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")}, |
|
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物品选择', this.editFormData) }, colSpan: 12 }, |
|
|
|
{ type: "filterSelect", label: "生产线代码", prop: "prodLineCode", optionsLabel: "name", optionsValue: "code", |
|
|
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/productionLine")}, |
|
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/productionLine', 'ProductionLine', '生产线选择', this.editFormData) }, colSpan: 12 }, |
|
|
|
{ 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"}] |
|
|
|
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:"2"}] |
|
|
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.editFormData)}, //,[{logic:"And",column:"type",action:"==",value:"2"}] |
|
|
|
colSpan: 12,multiple:true |
|
|
|
}, |
|
|
|
{ type: "input", label: "备注", prop: 'remark', colSpan: 12 }, |
|
|
|
], |
|
|
|
editRules: { |
|
|
@ -180,6 +237,44 @@ export default { |
|
|
|
mounted () { |
|
|
|
this.paging(); |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
// 多选数据库位转义处理 |
|
|
|
drawerbuttonHandle(val){ |
|
|
|
if(val == "edit"){ |
|
|
|
this.propsData.productLocationCodeListJson_show = JSON.parse(this.propsData.productLocationCodeListJson) |
|
|
|
this.propsData.rawLocationCodeListJson_show = JSON.parse(this.propsData.rawLocationCodeListJson) |
|
|
|
this.propsData.wipLocationCodeListJson_show = JSON.parse(this.propsData.wipLocationCodeListJson) |
|
|
|
} |
|
|
|
this.drawerbutton(val) |
|
|
|
}, |
|
|
|
push(data){ |
|
|
|
if(data[1].prop == "itemCode" && this.formReveal){ |
|
|
|
this.CreateFormData.itemName = data[0].name |
|
|
|
this.CreateFormData.itemDesc1 = data[0].desc1 |
|
|
|
this.CreateFormData.itemDesc2 = data[0].desc2 |
|
|
|
} |
|
|
|
}, |
|
|
|
clear(data){ |
|
|
|
if(data[0].prop == "itemCode" && this.formReveal){ |
|
|
|
this.CreateFormData.itemName = null |
|
|
|
this.CreateFormData.itemDesc1 = null |
|
|
|
this.CreateFormData.itemDesc2 = null |
|
|
|
} |
|
|
|
}, |
|
|
|
// 提交库位处理 |
|
|
|
FormSubmitHandle(val){ |
|
|
|
if(this.formReveal){ |
|
|
|
this.CreateFormData.productLocationCodeListJson = JSON.stringify(this.CreateFormData.productLocationCodeListJson_show) |
|
|
|
this.CreateFormData.rawLocationCodeListJson = JSON.stringify(this.CreateFormData.rawLocationCodeListJson_show) |
|
|
|
this.CreateFormData.wipLocationCodeListJson = JSON.stringify(this.CreateFormData.wipLocationCodeListJson_show) |
|
|
|
}else{ |
|
|
|
this.editFormData.productLocationCodeListJson = JSON.stringify(this.editFormData.productLocationCodeListJson_show) |
|
|
|
this.editFormData.rawLocationCodeListJson = JSON.stringify(this.editFormData.rawLocationCodeListJson_show) |
|
|
|
this.editFormData.wipLocationCodeListJson = JSON.stringify(this.editFormData.wipLocationCodeListJson_show) |
|
|
|
} |
|
|
|
this.FormSubmit(val) |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|