From 1c429bcddc3fd08bfd71c925951fe6012cbad603 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com> Date: Thu, 11 Apr 2024 10:12:24 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90NEV-PC=E3=80=91=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E7=BA=BF=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/commonTabel-drawer/index.vue | 11 ++ .../commonTabel-drawer/style/index.scss | 3 + fe/PC/src/utils/tableColumns/index.js | 14 +- fe/PC/src/utils/tabsDesTions/index.js | 21 +- ...nLine-old.vue => ProdLineItem-mutiple.vue} | 173 +++++++++------- .../WorkshopManage/ProdLineItem-old.vue | 187 ++++++++++++++++++ .../WorkshopManage/ProductionLine.vue | 130 ++---------- 7 files changed, 328 insertions(+), 211 deletions(-) rename fe/PC/src/views/basicData/WorkshopManage/{ProductionLine-old.vue => ProdLineItem-mutiple.vue} (57%) create mode 100644 fe/PC/src/views/basicData/WorkshopManage/ProdLineItem-old.vue diff --git a/fe/PC/src/components/commonTabel-drawer/index.vue b/fe/PC/src/components/commonTabel-drawer/index.vue index 4f81294e5..dac10c31f 100644 --- a/fe/PC/src/components/commonTabel-drawer/index.vue +++ b/fe/PC/src/components/commonTabel-drawer/index.vue @@ -64,6 +64,7 @@ :colon="false" :tabsDesTions="tabsDesTions" :propsData="propsData" + class="drawerDescriptionsFirst" > @@ -551,4 +552,14 @@ export default { \ No newline at end of file diff --git a/fe/PC/src/components/commonTabel-drawer/style/index.scss b/fe/PC/src/components/commonTabel-drawer/style/index.scss index 877fd49f9..c859157ea 100644 --- a/fe/PC/src/components/commonTabel-drawer/style/index.scss +++ b/fe/PC/src/components/commonTabel-drawer/style/index.scss @@ -120,3 +120,6 @@ ::v-deep .el-tabs__nav-wrap::after{ content: unset !important; } +::v-deep .el-descriptions--medium.is-bordered .el-descriptions-item__cell{ + min-width: 200px !important; +} \ No newline at end of file diff --git a/fe/PC/src/utils/tableColumns/index.js b/fe/PC/src/utils/tableColumns/index.js index 8a12309c9..1c597c836 100644 --- a/fe/PC/src/utils/tableColumns/index.js +++ b/fe/PC/src/utils/tableColumns/index.js @@ -735,22 +735,10 @@ export const Workshop = [ export const ProductionLine = [ { label: "生产线代码", prop: "code", fixed: "left", type: "name" }, { label: "生产线名称", prop: 'name' }, - { label: "类型", prop: "type", type: "filter", filters: "productionLineType"}, - { label: "车间代码", prop: "workshopCode" }, - { label: "原料库位", prop: "rawLocationCode" }, - { label: "成品库位", prop: "productLocationCode" }, - { label: "原料库位组", prop: "rawLocationGroupCode" }, + { label: "库位代码", prop: "locationCode" }, { label: "描述", prop: "description" }, - { label: "备注", prop: "remark" }, { label: "创建时间", prop: "creationTime", type: "dateTime" }, { label: "上次修改时间", prop: 'lastModificationTime', type: "dateTime" }, - // { - // label: "操作", - // type:"buttonOperation", - // buttonText:'编辑|删除', - // buttonName:'edit|delete', - // fixed: "right" - // }, ] // 生产线零件关系 20230328 export const ProductionLineItem = [ diff --git a/fe/PC/src/utils/tabsDesTions/index.js b/fe/PC/src/utils/tabsDesTions/index.js index caf7d9a23..e412159b2 100644 --- a/fe/PC/src/utils/tabsDesTions/index.js +++ b/fe/PC/src/utils/tabsDesTions/index.js @@ -544,24 +544,13 @@ export const Workshop = [ // ************** 确认隐藏 ************************ ] // 生产线信息 20230328 -export const ProductionLine = [ - { label: "生产线代码", prop: "code" }, +export const ProductionLine = [ + { label: "生产线代码", prop: "code", fixed: "left", type: "name" }, { label: "生产线名称", prop: 'name' }, - { label: "类型", prop: "type" }, - { label: "车间", prop: "workshopCode" }, - { label: "成品库位", prop: "productLocationCode" }, - { label: "原料库位", prop: "rawLocationCode" }, - { label: "原料库位组", prop: "rawLocationGroupCode" }, + { label: "库位代码", prop: "locationCode" }, { label: "描述", prop: "description" }, - { label: "备注", prop: 'remark' }, - { label: "事务ID", prop: "tenantId" }, - { label: "创建时间", prop: "creationTime", type:'dateTime' }, - { label: "创建者ID", prop: "creatorId" }, - { label: "上次修改时间", prop: "lastModificationTime", type:'dateTime' }, - { label: "上次修改者ID", prop: "lastModifierId" }, - // ************** 确认隐藏 ************************ - // { label: "ID", prop: 'id' }, - // ************** 确认隐藏 ************************ + { label: "创建时间", prop: "creationTime", type: "dateTime" }, + { label: "上次修改时间", prop: 'lastModificationTime', type: "dateTime" }, ] // 生产线零件关系 20230328 export const ProductionLineItem = [ diff --git a/fe/PC/src/views/basicData/WorkshopManage/ProductionLine-old.vue b/fe/PC/src/views/basicData/WorkshopManage/ProdLineItem-mutiple.vue similarity index 57% rename from fe/PC/src/views/basicData/WorkshopManage/ProductionLine-old.vue rename to fe/PC/src/views/basicData/WorkshopManage/ProdLineItem-mutiple.vue index 82eab83c7..e639c0bae 100644 --- a/fe/PC/src/views/basicData/WorkshopManage/ProductionLine-old.vue +++ b/fe/PC/src/views/basicData/WorkshopManage/ProdLineItem-mutiple.vue @@ -38,7 +38,7 @@ :Options="editOptions" :Handle="editHandle" :Rules="formReveal ? editRules.cerateRule : editRules.editRule" - @FormSubmit="FormSubmit" + @FormSubmit="FormSubmitHandle" @close="FormClose" @goBack="goBack" > @@ -130,11 +130,14 @@ export default { remark: null, name: null, description: null, - type: 1, - workshopCode: null, - rawLocationCode: null, - productLocationCode: null, - rawLocationGroupCode: null, + type: null, + // workshopCode: null, + rawLocationCode: [], + productLocationCode: [], + rawLocationGroupCode: [], + rawLocationCode_show: [], + rawLocationGroupCode_show: [], + productLocationCode_show: [], code: null, // company: null, }, @@ -144,11 +147,14 @@ export default { remark: null, name: null, description: null, - type: 1, - workshopCode: null, - rawLocationCode: null, - rawLocationGroupCode: null, - productLocationCode: null, + type: null, + // workshopCode: null, + rawLocationCode: [], + productLocationCode: [], + rawLocationGroupCode: [], + rawLocationCode_show: [], + rawLocationGroupCode_show: [], + productLocationCode_show: [], concurrencyStamp: null, }, editOptions: { @@ -158,33 +164,28 @@ export default { { type: "input", label: "生产线代码", prop: "code", validType:'numberLetter', colSpan: 12 }, { type: "input", label: "生产线名称", prop: 'name', colSpan: 12 }, { type: "select", label: "类型", prop: "type", options: "productionLineType", colSpan: 12 }, - { type: "filterSelect", label: "车间代码", prop: "workshopCode", optionsLabel: "name", optionsValue: "code", - focus: (type,val) => { return this.getFilterList(type, val, "basedata/workshop")}, - searchButton: (val) => { this.showSerarchPage(val, 'basedata/workshop', 'Workshop', '车间选择', this.CreateFormData) }, - colSpan: 12 - }, - { type: "filterSelect", label: "原料库位", prop: "rawLocationCode", 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"},]) }, + // { type: "filterSelect", label: "车间代码", prop: "workshopCode", optionsLabel: "name", optionsValue: "code", + // focus: (type,val) => { return this.getFilterList(type, val, "basedata/workshop")}, + // searchButton: (val) => { this.showSerarchPage(val, 'basedata/workshop', 'Workshop', '车间选择', this.CreateFormData) }, + // colSpan: 12 + // }, + { type: "filterSelect", label: "原料库位", prop: "rawLocationCode_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: "rawLocationGroupCode", optionsLabel: "name", optionsValue: "code", - focus: (type,val) => { return this.getFilterList(type, val, "basedata/location-group",[ - {logic:"And",column:"groupType",action:"==",value:"2"}, - ])}, - searchButton: (val) => { this.showSerarchPage(val, 'basedata/location-group', 'LocationGroup', '库位组选择', this.CreateFormData,[ - {logic:"And",column:"groupType",action:"==",value:"2"}, - ]) }, colSpan: 12 }, - - { type: "filterSelect", label: "成品库位", prop: "productLocationCode", optionsLabel: "name", optionsValue: "code", - focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",[ - {logic:"And",column:"type",action:"==",value:"4"}, - ])}, - searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData,[ - {logic:"And",column:"type",action:"==",value:"4"}, - ]) }, colSpan: 12 }, + { type: "filterSelect", label: "原料库位组", prop: "rawLocationGroupCode_show", optionsLabel: "name", optionsValue: "code", + focus: (type,val) => { return this.getFilterList(type, val, "basedata/location-group")},//,[ {logic:"And",column:"groupType",action:"==",value:"2"}] + searchButton: (val) => { this.showSerarchPage(val, 'basedata/location-group', 'LocationGroup', '库位组选择', this.CreateFormData) }, ////,[[{logic:"And",column:"groupType",action:"==",value:"2"}]{logic:"And",column:"groupType",action:"==",value:"2"}] + colSpan: 12,multiple:true + }, + { type: "filterSelect", label: "成品库位", prop: "productLocationCode_show", optionsLabel: "name", optionsValue: "code", + focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")},//,[{logic:"And",column:"type",action:"==",value:"4"}] + searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData) }, //,[{logic:"And",column:"type",action:"==",value:"4"}] + colSpan: 12,multiple:true + }, { type: "input", label: "描述", prop: "description", colSpan: 12 }, { type: "input", label: "备注", prop: 'remark', colSpan: 12 }, ], @@ -192,49 +193,42 @@ export default { { type: "input", label: "生产线代码", disabled:"true", prop: "code", validType:'numberLetter', colSpan: 12 }, { type: "input", label: "生产线名称", prop: 'name', colSpan: 12 }, { type: "select", label: "类型", prop: "type", options: "productionLineType", colSpan: 12 }, - - { type: "filterSelect", label: "车间代码", prop: "workshopCode", optionsLabel: "name", optionsValue: "code", - focus: (type,val) => { return this.getFilterList(type, val, "basedata/workshop")}, - searchButton: (val) => { this.showSerarchPage(val, 'basedata/workshop', 'Workshop', '车间选择', this.editFormData) }, colSpan: 12 }, - - { type: "filterSelect", label: "原料库位", prop: "rawLocationCode", 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 }, - - { type: "filterSelect", label: "原料库位组", prop: "rawLocationGroupCode", optionsLabel: "name", optionsValue: "code", - focus: (type,val) => { return this.getFilterList(type, val, "basedata/location-group",[ - {logic:"And",column:"groupType",action:"==",value:"2"}, - ])}, - searchButton: (val) => { this.showSerarchPage(val, 'basedata/location-group', 'LocationGroup', '库位组选择', this.editFormData,[ - {logic:"And",column:"groupType",action:"==",value:"2"}, - ]) }, colSpan: 12 }, - - { type: "filterSelect", label: "成品库位", prop: "productLocationCode", optionsLabel: "name", optionsValue: "code", - focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",[ - {logic:"And",column:"type",action:"==",value:"4"}, - ])}, - searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.editFormData,[ - {logic:"And",column:"type",action:"==",value:"4"}, - ]) }, colSpan: 12 }, - + // { type: "filterSelect", label: "车间代码", prop: "workshopCode", optionsLabel: "name", optionsValue: "code", + // focus: (type,val) => { return this.getFilterList(type, val, "basedata/workshop")}, + // searchButton: (val) => { this.showSerarchPage(val, 'basedata/workshop', 'Workshop', '车间选择', this.editFormData) }, colSpan: 12 }, + { type: "filterSelect", label: "原料库位", prop: "rawLocationCode_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: "rawLocationGroupCode_show", optionsLabel: "name", optionsValue: "code", + focus: (type,val) => { return this.getFilterList(type, val, "basedata/location-group")},//,[{logic:"And",column:"groupType",action:"==",value:"2"}] + searchButton: (val) => { this.showSerarchPage(val, 'basedata/location-group', 'LocationGroup', '库位组选择', this.editFormData) }, //,[{logic:"And",column:"groupType",action:"==",value:"2"}] + colSpan: 12,multiple:true + }, + { type: "filterSelect", label: "成品库位", prop: "productLocationCode_show", optionsLabel: "name", optionsValue: "code", + focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")},//,[{logic:"And",column:"type",action:"==",value:"4"}] + searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.editFormData) }, //,[{logic:"And",column:"type",action:"==",value:"4"}] + colSpan: 12,multiple:true + }, { type: "input", label: "描述", prop: "description", colSpan: 12 }, { type: "input", label: "备注", prop: 'remark', colSpan: 12 }, ], editRules: { cerateRule: { code: [{ required: true, trigger: "blur", message: "不可为空" }], - workshopCode: [{ required: true, trigger: "change", message: "不可为空" }], - rawLocationCode: [{ required: true, trigger: "change", message: "不可为空" }], - productLocationCode: [{ required: true, trigger: "change", message: "不可为空" }], + type: [{ required: true, trigger: "blur", message: "不可为空" }], + // workshopCode: [{ required: true, trigger: "change", message: "不可为空" }], + rawLocationCode_show: [{ required: true, trigger: "change", message: "不可为空" }], + rawLocationGroupCode_show: [{ required: true, trigger: "change", message: "不可为空" }], + productLocationCode_show: [{ required: true, trigger: "change", message: "不可为空" }], }, editRule: { - workshopCode: [{ required: true, trigger: "change", message: "不可为空" }], - rawLocationCode: [{ required: true, trigger: "change", message: "不可为空" }], - productLocationCode: [{ required: true, trigger: "change", message: "不可为空" }], + type: [{ required: true, trigger: "blur", message: "不可为空" }], + // workshopCode: [{ required: true, trigger: "change", message: "不可为空" }], + rawLocationCode_show: [{ required: true, trigger: "change", message: "不可为空" }], + rawLocationGroupCode_show: [{ required: true, trigger: "change", message: "不可为空" }], + productLocationCode_show: [{ required: true, trigger: "change", message: "不可为空" }], } }, }; @@ -242,6 +236,47 @@ export default { mounted () { this.paging(); }, + methods:{ + // 获取库位转义 + initMutipleLocationGet(data){ + if(!data || data.length <= 0)return data + let _arr = [] + if(typeof data == "string"){ + _arr=data.split(",") + }else{ + data.forEach(item=>{ _arr.push(item) }) + } + return _arr + }, + // 获取数据库位处理 + inlineDialogCallbackUser(){ + this.propsData.productLocationCode_show = this.initMutipleLocationGet(this.propsData.productLocationCode) + this.propsData.rawLocationCode_show = this.initMutipleLocationGet(this.propsData.rawLocationCode) + this.propsData.rawLocationGroupCode_show = this.initMutipleLocationGet(this.propsData.rawLocationGroupCode) + }, + // 提交库位转义 + initMutipleLocationSubmit(data){ + let _arr = [] + if(typeof data == "string"){data=data.split(",")} + data.forEach(item=>{ + _arr.push({locationCode:item}) + }) + return JSON.stringify(_arr) + }, + // 提交库位处理 + FormSubmitHandle(val){ + if(this.formReveal){ + this.CreateFormData.productLocationCode = this.initMutipleLocationSubmit(this.CreateFormData.productLocationCode_show) + this.CreateFormData.rawLocationCode = this.initMutipleLocationSubmit(this.CreateFormData.rawLocationCode_show) + this.CreateFormData.rawLocationGroupCode = this.initMutipleLocationSubmit(this.CreateFormData.rawLocationGroupCode_show) + }else{ + this.editFormData.productLocationCode = this.initMutipleLocationSubmit(this.editFormData.productLocationCode_show) + this.editFormData.rawLocationCode = this.initMutipleLocationSubmit(this.editFormData.rawLocationCode_show) + this.editFormData.rawLocationGroupCode = this.initMutipleLocationSubmit(this.editFormData.rawLocationGroupCode_show) + } + this.FormSubmit(val) + } + } }; \ No newline at end of file diff --git a/fe/PC/src/views/basicData/WorkshopManage/ProductionLine.vue b/fe/PC/src/views/basicData/WorkshopManage/ProductionLine.vue index e639c0bae..52bcfb8ce 100644 --- a/fe/PC/src/views/basicData/WorkshopManage/ProductionLine.vue +++ b/fe/PC/src/views/basicData/WorkshopManage/ProductionLine.vue @@ -38,7 +38,7 @@ :Options="editOptions" :Handle="editHandle" :Rules="formReveal ? editRules.cerateRule : editRules.editRule" - @FormSubmit="FormSubmitHandle" + @FormSubmit="FormSubmit" @close="FormClose" @goBack="goBack" > @@ -127,34 +127,17 @@ export default { ], //新增 CreateFormData: { - remark: null, + code: null, name: null, description: null, - type: null, - // workshopCode: null, - rawLocationCode: [], - productLocationCode: [], - rawLocationGroupCode: [], - rawLocationCode_show: [], - rawLocationGroupCode_show: [], - productLocationCode_show: [], - code: null, - // company: null, + locationCode: [], }, //编辑 editFormData: { code: null, - remark: null, name: null, description: null, - type: null, - // workshopCode: null, - rawLocationCode: [], - productLocationCode: [], - rawLocationGroupCode: [], - rawLocationCode_show: [], - rawLocationGroupCode_show: [], - productLocationCode_show: [], + locationCode: [], concurrencyStamp: null, }, editOptions: { @@ -163,72 +146,31 @@ export default { CreateForm: [ { type: "input", label: "生产线代码", prop: "code", validType:'numberLetter', colSpan: 12 }, { type: "input", label: "生产线名称", prop: 'name', colSpan: 12 }, - { type: "select", label: "类型", prop: "type", options: "productionLineType", colSpan: 12 }, - // { type: "filterSelect", label: "车间代码", prop: "workshopCode", optionsLabel: "name", optionsValue: "code", - // focus: (type,val) => { return this.getFilterList(type, val, "basedata/workshop")}, - // searchButton: (val) => { this.showSerarchPage(val, 'basedata/workshop', 'Workshop', '车间选择', this.CreateFormData) }, - // colSpan: 12 - // }, - { type: "filterSelect", label: "原料库位", prop: "rawLocationCode_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: "rawLocationGroupCode_show", optionsLabel: "name", optionsValue: "code", - focus: (type,val) => { return this.getFilterList(type, val, "basedata/location-group")},//,[ {logic:"And",column:"groupType",action:"==",value:"2"}] - searchButton: (val) => { this.showSerarchPage(val, 'basedata/location-group', 'LocationGroup', '库位组选择', this.CreateFormData) }, ////,[[{logic:"And",column:"groupType",action:"==",value:"2"}]{logic:"And",column:"groupType",action:"==",value:"2"}] - colSpan: 12,multiple:true - }, - - { type: "filterSelect", label: "成品库位", prop: "productLocationCode_show", optionsLabel: "name", optionsValue: "code", - focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")},//,[{logic:"And",column:"type",action:"==",value:"4"}] - searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData) }, //,[{logic:"And",column:"type",action:"==",value:"4"}] - colSpan: 12,multiple:true + { type: "filterSelect", label: "库位代码", prop: "locationCode", optionsLabel: "name", optionsValue: "code", + focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")}, + searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData) }, + colSpan: 12 }, { type: "input", label: "描述", prop: "description", colSpan: 12 }, - { type: "input", label: "备注", prop: 'remark', colSpan: 12 }, ], editForm: [ - { type: "input", label: "生产线代码", disabled:"true", prop: "code", validType:'numberLetter', colSpan: 12 }, + { type: "input", label: "生产线代码",disabled:true, prop: "code", validType:'numberLetter', colSpan: 12 }, { type: "input", label: "生产线名称", prop: 'name', colSpan: 12 }, - { type: "select", label: "类型", prop: "type", options: "productionLineType", colSpan: 12 }, - // { type: "filterSelect", label: "车间代码", prop: "workshopCode", optionsLabel: "name", optionsValue: "code", - // focus: (type,val) => { return this.getFilterList(type, val, "basedata/workshop")}, - // searchButton: (val) => { this.showSerarchPage(val, 'basedata/workshop', 'Workshop', '车间选择', this.editFormData) }, colSpan: 12 }, - { type: "filterSelect", label: "原料库位", prop: "rawLocationCode_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: "rawLocationGroupCode_show", optionsLabel: "name", optionsValue: "code", - focus: (type,val) => { return this.getFilterList(type, val, "basedata/location-group")},//,[{logic:"And",column:"groupType",action:"==",value:"2"}] - searchButton: (val) => { this.showSerarchPage(val, 'basedata/location-group', 'LocationGroup', '库位组选择', this.editFormData) }, //,[{logic:"And",column:"groupType",action:"==",value:"2"}] - colSpan: 12,multiple:true - }, - { type: "filterSelect", label: "成品库位", prop: "productLocationCode_show", optionsLabel: "name", optionsValue: "code", - focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")},//,[{logic:"And",column:"type",action:"==",value:"4"}] - searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.editFormData) }, //,[{logic:"And",column:"type",action:"==",value:"4"}] - colSpan: 12,multiple:true + { type: "filterSelect", label: "库位代码",disabled:true, prop: "locationCode", optionsLabel: "name", optionsValue: "code", + focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")}, + searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData) }, + colSpan: 12 }, { type: "input", label: "描述", prop: "description", colSpan: 12 }, - { type: "input", label: "备注", prop: 'remark', colSpan: 12 }, ], editRules: { cerateRule: { code: [{ required: true, trigger: "blur", message: "不可为空" }], - type: [{ required: true, trigger: "blur", message: "不可为空" }], - // workshopCode: [{ required: true, trigger: "change", message: "不可为空" }], - rawLocationCode_show: [{ required: true, trigger: "change", message: "不可为空" }], - rawLocationGroupCode_show: [{ required: true, trigger: "change", message: "不可为空" }], - productLocationCode_show: [{ required: true, trigger: "change", message: "不可为空" }], + name: [{ required: true, trigger: "blur", message: "不可为空" }], + locationCode: [{ required: true, trigger: "change", message: "不可为空" }], }, editRule: { - type: [{ required: true, trigger: "blur", message: "不可为空" }], - // workshopCode: [{ required: true, trigger: "change", message: "不可为空" }], - rawLocationCode_show: [{ required: true, trigger: "change", message: "不可为空" }], - rawLocationGroupCode_show: [{ required: true, trigger: "change", message: "不可为空" }], - productLocationCode_show: [{ required: true, trigger: "change", message: "不可为空" }], + name: [{ required: true, trigger: "blur", message: "不可为空" }], } }, }; @@ -237,45 +179,7 @@ export default { this.paging(); }, methods:{ - // 获取库位转义 - initMutipleLocationGet(data){ - if(!data || data.length <= 0)return data - let _arr = [] - if(typeof data == "string"){ - _arr=data.split(",") - }else{ - data.forEach(item=>{ _arr.push(item) }) - } - return _arr - }, - // 获取数据库位处理 - inlineDialogCallbackUser(){ - this.propsData.productLocationCode_show = this.initMutipleLocationGet(this.propsData.productLocationCode) - this.propsData.rawLocationCode_show = this.initMutipleLocationGet(this.propsData.rawLocationCode) - this.propsData.rawLocationGroupCode_show = this.initMutipleLocationGet(this.propsData.rawLocationGroupCode) - }, - // 提交库位转义 - initMutipleLocationSubmit(data){ - let _arr = [] - if(typeof data == "string"){data=data.split(",")} - data.forEach(item=>{ - _arr.push({locationCode:item}) - }) - return JSON.stringify(_arr) - }, - // 提交库位处理 - FormSubmitHandle(val){ - if(this.formReveal){ - this.CreateFormData.productLocationCode = this.initMutipleLocationSubmit(this.CreateFormData.productLocationCode_show) - this.CreateFormData.rawLocationCode = this.initMutipleLocationSubmit(this.CreateFormData.rawLocationCode_show) - this.CreateFormData.rawLocationGroupCode = this.initMutipleLocationSubmit(this.CreateFormData.rawLocationGroupCode_show) - }else{ - this.editFormData.productLocationCode = this.initMutipleLocationSubmit(this.editFormData.productLocationCode_show) - this.editFormData.rawLocationCode = this.initMutipleLocationSubmit(this.editFormData.rawLocationCode_show) - this.editFormData.rawLocationGroupCode = this.initMutipleLocationSubmit(this.editFormData.rawLocationGroupCode_show) - } - this.FormSubmit(val) - } + } };