Browse Source

【NEV-PC】生产线对接

ag_report_nev
安虹睿 1 year ago
parent
commit
1c429bcddc
  1. 11
      fe/PC/src/components/commonTabel-drawer/index.vue
  2. 3
      fe/PC/src/components/commonTabel-drawer/style/index.scss
  3. 14
      fe/PC/src/utils/tableColumns/index.js
  4. 19
      fe/PC/src/utils/tabsDesTions/index.js
  5. 173
      fe/PC/src/views/basicData/WorkshopManage/ProdLineItem-mutiple.vue
  6. 187
      fe/PC/src/views/basicData/WorkshopManage/ProdLineItem-old.vue
  7. 130
      fe/PC/src/views/basicData/WorkshopManage/ProductionLine.vue

11
fe/PC/src/components/commonTabel-drawer/index.vue

@ -64,6 +64,7 @@
:colon="false"
:tabsDesTions="tabsDesTions"
:propsData="propsData"
class="drawerDescriptionsFirst"
>
</curren-descriptions>
<!-- currenTableDetails 组件 明细中带分页功能 -->
@ -551,4 +552,14 @@ export default {
<style lang="scss" scoped>
// el-drawer
@import "./style/index.scss";
.drawerDescriptionsFirst{
.el-descriptions-item__content{
&>span{
display:inline-block !important;
max-height:200px !important;
min-width:200px !important;
overflow:auto !important
}
}
}
</style>

3
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;
}

14
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 = [

19
fe/PC/src/utils/tabsDesTions/index.js

@ -545,23 +545,12 @@ export const Workshop = [
]
// 生产线信息 20230328
export const ProductionLine = [
{ label: "生产线代码", prop: "code" },
{ 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 = [

173
fe/PC/src/views/basicData/WorkshopManage/ProductionLine-old.vue → 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"
></newAndEdiDialog>
@ -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)
}
}
};
</script>
<style lang="scss" scoped>

187
fe/PC/src/views/basicData/WorkshopManage/ProdLineItem-old.vue

@ -0,0 +1,187 @@
<template>
<div class="page-box" v-loading="Loading.appMainLoading">
<tablePagination
:currenButtonData="currenButtonData"
:tableData="tableData"
:tableLoading="Loading.tableLoading"
:tableColumns="tableColumns"
@rowDrop="rowDrop"
:totalCount="totalCount"
:multipleSelection="multipleSelection"
:MaxResultCount="PageListParams.MaxResultCount"
@topbutton="topbutton"
@inlineDialog="inlineDialog"
@sortChange="sortChange"
@alertoldSkipCount="alertoldSkipCount"
@alterResultCount="alterResultCount"
@handleSelectionChange="handleSelectionChange"
@buttonOperationClick="buttonOperationClick"
:currentPageProps="oldSkipCount"
:quicklySearchOption="quicklySearchOption"
@quicklySearchClick="quicklySearchClick"
@quicklySearchClear="quicklySearchClear"
:primarySearchOption="primarySearchOption"
@overallSearchFormClick="overallSearchFormClick"
:httpOverallSearchData="httpOverallSearchData"
>
</tablePagination>
<!-- 新增与编辑 -->
<newAndEdiDialog
:loading="Loading.newAndEdiLoading"
:active="active"
:pageStatus="pageStatus"
:formReveal="formReveal"
:formTitle="formTitle"
:displayDialog="editDialog"
:FormData="formReveal ? CreateFormData : editFormData"
:Form="formReveal ? CreateForm : editForm"
:Options="editOptions"
:Handle="editHandle"
:Rules="formReveal ? editRules.cerateRule : editRules.editRule"
@FormSubmit="FormSubmit"
@close="FormClose"
@goBack="goBack"
></newAndEdiDialog>
<!-- 搜索按钮窗体组件 -->
<searchPage
ref="searchTable"
:tableLoading="Loading.autoTableLoading"
:advancedFilter="advancedFilter()"
:filterPageListParams="filterPageListParams"
:formTitle="searchTitle"
:displayDialog="displayDialog.AddNewDialog"
:searchTableData="searchData"
:searchTableColumns="searchColumns"
:searchTotalCount="searchTotalCount"
:supplierItemPage="searchPageListParams"
@handleSelectionChange="prepareFormData"
@SizeChange="searchAlterResultCount($event, searchPageListParams)"
@CurrentChange="searchAlertoldSkipCount($event, searchPageListParams)"
@tableButtonClick="searchSubmit(arguments)"
></searchPage>
<!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用-->
<!-- methodValue 导入方式默认选项 是否局部导入 默认选项 -->
<importFile
:loading="Loading.importLoading"
:show="displayDialog.importDialog"
:URL="URL"
:disabledMethod = {method1:false,method2:false,method3:false}
:disabledIsAllowPartImport = {isAllowPartImport1:false,isAllowPartImport2:false}
isAllowPartImportValue="1"
@importClick="postImportMergeClick(arguments)"
@postImportDown="importDown"
></importFile>
<curren-Drawer
:title="tableColumns"
:tableColumns="tableColumns"
:DrawerLoading="Loading.DrawerLoading"
:drawer="displayDialog.detailsDialog"
:dropdownData="dropdownData"
:propsData="propsData"
:tabsDesTions="tabsDesTions"
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
@drawerbutton="drawerbutton"
@handleCommand="drawerHandle"
@close-value="closeValue"
></curren-Drawer>
</div>
</template>
<script>
import { tableMixins } from "@/mixins/TableMixins"
import { LoadingMixins } from "@/mixins/LoadingMixins"
import { drawerMixins } from "@/mixins/drawerMixins"
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins"
import { newAndEdiDialogMixins } from "@/mixins/newAndEdiDialogMixins"
import { mixins } from "@/mixins/mixins"
import { filterSelectMixins } from '@/mixins/filter-Select'
export default {
name: "ProductionLineItem",
mixins: [
tableMixins,
LoadingMixins,
drawerMixins,
TableHeaderMixins,
mixins,
filterSelectMixins,
newAndEdiDialogMixins
],
computed: {
editDialog: {
get: function () {
return this.displayDialog.newDialog || this.displayDialog.editDialog;
},
},
},
data () {
return {
URL: 'basedata/Prod-Line-Item',
//
currenButtonData: [
this.defaultAddBtn(),//
this.defaultImportBtn(),//
this.defaultExportBtn(),//
this.defaultFieldSettingBtn(),//
this.defaultFreshBtn(),//
this.defaultFilterBtn(),//
],
//
CreateFormData: {
remark: "",
prodLineCode: "",
itemCode: "",
// bomId: "",
// routingId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// enabled: true,
// code: "",
// company: "",
// prodLineId: "",
// itemId: ""
},
//
editFormData: {
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: "input", label: "备注", prop: 'remark', colSpan: 12 },
],
editForm: [
{ 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 },
{ type: "input", label: "备注", prop: 'remark', colSpan: 12 },
],
editRules: {
cerateRule: {
itemCode: [{ required: true, trigger: "change", message: "不可为空" }],
prodLineCode: [{ required: true, trigger: "change", message: "不可为空" }],
},
editRule: {
itemCode: [{ required: true, trigger: "change", message: "不可为空" }],
prodLineCode: [{ required: true, trigger: "change", message: "不可为空" }],
}
},
};
},
mounted () {
this.paging();
},
};
</script>
<style lang="scss" scoped>
@import "../../../styles/basicData.scss";
</style>

130
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"
></newAndEdiDialog>
@ -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)
}
}
};
</script>

Loading…
Cancel
Save