8 changed files with 345 additions and 48 deletions
@ -0,0 +1,249 @@ |
|||
<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)" |
|||
:isMoreSelectTable="true" |
|||
></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: "ProductionLine", |
|||
mixins: [ |
|||
tableMixins, |
|||
LoadingMixins, |
|||
drawerMixins, |
|||
TableHeaderMixins, |
|||
mixins, |
|||
filterSelectMixins, |
|||
newAndEdiDialogMixins |
|||
], |
|||
computed: { |
|||
editDialog: { |
|||
get: function () { |
|||
return this.displayDialog.newDialog || this.displayDialog.editDialog; |
|||
}, |
|||
}, |
|||
}, |
|||
data () { |
|||
return { |
|||
URL: 'basedata/productionline', |
|||
//常用按钮数据 |
|||
currenButtonData: [ |
|||
this.defaultAddBtn(),//新增 |
|||
this.defaultImportBtn(),//导入 |
|||
this.defaultExportBtn(),//导出 |
|||
this.defaultFieldSettingBtn(),//字段设置 |
|||
this.defaultFreshBtn(),//刷新 |
|||
this.defaultFilterBtn(),//筛选 |
|||
], |
|||
//新增 |
|||
CreateFormData: { |
|||
remark: null, |
|||
name: null, |
|||
description: null, |
|||
type: 1, |
|||
workshopCode: null, |
|||
rawLocationCode: null, |
|||
productLocationCode: null, |
|||
rawLocationGroupCode: null, |
|||
code: null, |
|||
// company: null, |
|||
}, |
|||
//编辑 |
|||
editFormData: { |
|||
code: null, |
|||
remark: null, |
|||
name: null, |
|||
description: null, |
|||
type: 1, |
|||
workshopCode: null, |
|||
rawLocationCode: null, |
|||
rawLocationGroupCode: null, |
|||
productLocationCode: null, |
|||
concurrencyStamp: null, |
|||
}, |
|||
editOptions: { |
|||
type: [] |
|||
}, |
|||
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", 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: "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: "生产线名称", 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: "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: "不可为空" }], |
|||
}, |
|||
editRule: { |
|||
workshopCode: [{ required: true, trigger: "change", message: "不可为空" }], |
|||
rawLocationCode: [{ required: true, trigger: "change", message: "不可为空" }], |
|||
productLocationCode: [{ required: true, trigger: "change", message: "不可为空" }], |
|||
} |
|||
}, |
|||
}; |
|||
}, |
|||
mounted () { |
|||
this.paging(); |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "../../../styles/basicData.scss"; |
|||
</style> |
Loading…
Reference in new issue