5 changed files with 288 additions and 3 deletions
@ -0,0 +1,226 @@ |
|||
<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 { postCreate, postUpdate } from "@/api/wms-api" |
|||
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' |
|||
import zh from '@/lang/zh' |
|||
let _Names = zh.ColumsNames // 业务字段 |
|||
|
|||
export default { |
|||
name: "locationDelivery", |
|||
mixins: [ |
|||
tableMixins, |
|||
LoadingMixins, |
|||
drawerMixins, |
|||
TableHeaderMixins, |
|||
mixins, |
|||
filterSelectMixins, |
|||
newAndEdiDialogMixins |
|||
], |
|||
computed: { |
|||
editDialog: { |
|||
get: function () { |
|||
return this.displayDialog.newDialog || this.displayDialog.editDialog; |
|||
}, |
|||
}, |
|||
}, |
|||
data () { |
|||
return { |
|||
URL: 'basedata/location-delivery', |
|||
//常用按钮数据 |
|||
currenButtonData: [ |
|||
this.defaultAddBtn(),//新增 |
|||
this.defaultImportBtn(),//导入 |
|||
this.defaultExportBtn(),//导出 |
|||
this.defaultFieldSettingBtn(),//字段设置 |
|||
this.defaultFreshBtn(),//刷新 |
|||
this.defaultFilterBtn(),//筛选 |
|||
], |
|||
//新增 |
|||
CreateFormData: { |
|||
tenantId: null, |
|||
remark: "", |
|||
extraProperties: null, |
|||
warehouseCode: localStorage.getItem('warehouseCode'), |
|||
fromLocationCode:null, |
|||
toLocationCode: null, |
|||
enumLocationDeliveryType: 1, |
|||
}, |
|||
//编辑 |
|||
editFormData: { |
|||
tenantId: null, |
|||
remark: "", |
|||
extraProperties: null, |
|||
warehouseCode: localStorage.getItem('warehouseCode'), |
|||
fromLocationCode:null, |
|||
toLocationCode: null, |
|||
enumLocationDeliveryType: 1, |
|||
}, |
|||
editOptions: {}, |
|||
CreateForm: [ |
|||
{ type: "filterSelect", label: "来源库位", prop: "fromLocationCode", 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: "filterSelect", label: "目标库位", prop: "toLocationCode", 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: "select", label: "配送方式", prop: "enumLocationDeliveryType", options: "enumLocationDeliveryType", colSpan: 12 }, |
|||
{ type: "input", label: "备注", prop: 'remark', colSpan: 12 }, |
|||
], |
|||
editForm: [ |
|||
{ type: "filterSelect", label: "来源库位", prop: "fromLocationCode", optionsLabel: "name", optionsValue: "code", |
|||
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")}, |
|||
searchButton: (val) => { this.showSerarchPage(val, "basedata/location" , 'Location', '库位选择', this.editFormData) }, colSpan: 12 |
|||
}, |
|||
{ type: "filterSelect", label: "目标库位", prop: "toLocationCode", optionsLabel: "name", optionsValue: "code", |
|||
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")}, |
|||
searchButton: (val) => { this.showSerarchPage(val, "basedata/location" , 'Location', '库位选择', this.editFormData) }, colSpan: 12 |
|||
}, |
|||
{ type: "select", label: "配送方式", prop: "enumLocationDeliveryType", options: "enumLocationDeliveryType", colSpan: 12 }, |
|||
{ type: "input", label: "备注", prop: 'remark', colSpan: 12 }, |
|||
], |
|||
editRules: { |
|||
cerateRule: { |
|||
fromLocationCode: [{ required: true, trigger: "change", message: "不可为空" }], |
|||
toLocationCode: [{ required: true, trigger: "change", message: "不可为空" }], |
|||
enumLocationDeliveryType: [{ required: true, trigger: "change", message: "不可为空" }], |
|||
}, |
|||
editRule: { |
|||
fromLocationCode: [{ required: true, trigger: "change", message: "不可为空" }], |
|||
toLocationCode: [{ required: true, trigger: "change", message: "不可为空" }], |
|||
enumLocationDeliveryType: [{ required: true, trigger: "change", message: "不可为空" }], |
|||
} |
|||
}, |
|||
}; |
|||
}, |
|||
mounted () { |
|||
this.paging(); |
|||
}, |
|||
methods:{ |
|||
//提交表单(强制赋值warehouseCode) |
|||
FormSubmit(val) { |
|||
this.ref = val |
|||
this.Loading.newAndEdiLoading = true |
|||
switch (this.formReveal) { |
|||
case true: |
|||
postCreate(this.CreateFormData, this.URL).then(res => { |
|||
this.oldSkipCount = 1; |
|||
this.Loading.newAndEdiLoading = false |
|||
this.FormResult("success") |
|||
}).catch(err => { |
|||
this.Loading.newAndEdiLoading = false |
|||
this.FormResult("error") |
|||
}) |
|||
break; |
|||
case false: |
|||
this.editFormData.warehouseCode = localStorage.getItem('warehouseCode') |
|||
postUpdate(this.editFormData, this.propsData.id, this.URL).then(res => { |
|||
this.propsData = res |
|||
this.Loading.newAndEdiLoading = false |
|||
this.FormResult("success") |
|||
}).catch(err => { |
|||
this.Loading.newAndEdiLoading = false |
|||
this.FormResult("error") |
|||
}) |
|||
} |
|||
}, |
|||
} |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "../../../styles/basicData.scss"; |
|||
</style> |
Loading…
Reference in new issue