diff --git a/fe/PC/src/components/currenDescriptions/index.vue b/fe/PC/src/components/currenDescriptions/index.vue index ddaa22dc7..ecf2a7150 100644 --- a/fe/PC/src/components/currenDescriptions/index.vue +++ b/fe/PC/src/components/currenDescriptions/index.vue @@ -23,7 +23,10 @@ {{ propsData[item.prop]?propsData[item.prop][item.showProp]:"" | formatDate }} - + + {{ propsData[item.prop] ? JSON.parse(propsData[item.prop]).join(",") : '' }} + + {{ (propsData[item.prop]).toFixed(item.pointe || 2) }} @@ -163,6 +166,6 @@ export default { } } - } + }, } \ No newline at end of file diff --git a/fe/PC/src/components/filterSelect/index.vue b/fe/PC/src/components/filterSelect/index.vue index 5c11d3235..a1d677a53 100644 --- a/fe/PC/src/components/filterSelect/index.vue +++ b/fe/PC/src/components/filterSelect/index.vue @@ -95,13 +95,16 @@ export default { }, methods: { changeHandle(value){ - if(!value[0] || value[0].length <= 0)return let _options = JSON.parse(JSON.stringify(this.selectItem)) let _item = {} - let _prop = this.selectItem.optionsValue || this.selectItem.prop - this.options.forEach(item=>{ - if(item[_prop] == value[0])_item = item - }) + if(value[0] && value[0].length > 0){ + let _prop = this.selectItem.optionsValue || this.selectItem.prop + if(this.options){ + this.options.forEach(item=>{ + if(item[_prop] == value[0])_item = item + }) + } + } this.$emit("filterOptionSelectHandle",_item,_options,value[0]) }, isRemoteReset(){ diff --git a/fe/PC/src/components/umyTable/index.vue b/fe/PC/src/components/umyTable/index.vue index d23b43cf6..ac057dd4a 100644 --- a/fe/PC/src/components/umyTable/index.vue +++ b/fe/PC/src/components/umyTable/index.vue @@ -316,11 +316,13 @@ {{ scope.row[item.prop] ? scope.row[item.prop] + "" : scope.row[item.prop] }} + > + {{initShowDetailStr(scope,item,scope.row[item.prop])}} + @@ -57,7 +59,8 @@ @handleSelectionChange="prepareFormData" @SizeChange="searchAlterResultCount($event, searchPageListParams)" @CurrentChange="searchAlertoldSkipCount($event, searchPageListParams)" - @tableButtonClick="searchSubmit(arguments)" + @tableButtonClick="searchSubmit(arguments,searchColumns)" + :isMoreSelectTable="true" > @@ -80,7 +83,7 @@ :propsData="propsData" :tabsDesTions="tabsDesTions" @drawerShut="(val) => (displayDialog.detailsDialog = val)" - @drawerbutton="drawerbutton" + @drawerbutton="drawerbuttonHandle" @handleCommand="drawerHandle" @close-value="closeValue" > @@ -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) + } + } };