You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
278 lines
9.4 KiB
278 lines
9.4 KiB
12 months ago
|
<template>
|
||
12 months ago
|
<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"
|
||
12 months ago
|
@topbutton="topbuttonHandle"
|
||
12 months ago
|
@inlineDialog="inlineDialog"
|
||
|
@sortChange="sortChange"
|
||
|
@alertoldSkipCount="alertoldSkipCount"
|
||
|
@alterResultCount="alterResultCount"
|
||
|
@handleSelectionChange="handleSelectionChange"
|
||
|
:currentPageProps="oldSkipCount"
|
||
|
:quicklySearchOption="quicklySearchOption"
|
||
|
@quicklySearchClick="quicklySearchClick"
|
||
|
@quicklySearchClear="quicklySearchClear"
|
||
|
:primarySearchOption="primarySearchOption"
|
||
|
@overallSearchFormClick="overallSearchFormClick"
|
||
|
:httpOverallSearchData="httpOverallSearchData"
|
||
|
:setUTableHeight="140"
|
||
|
>
|
||
|
</tablePagination>
|
||
|
<!-- 新导入 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"
|
||
|
:DrawerLoading="Loading.DrawerLoading"
|
||
|
:drawer="displayDialog.detailsDialog"
|
||
|
:propsData="propsData"
|
||
|
:tabsDesTions="tabsDesTions"
|
||
|
:Butttondata="DrawerButtonData"
|
||
|
@drawerbutton="drawerbutton"
|
||
|
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
|
||
|
@handleCommand="drawerHandle"
|
||
|
@close-value="closeValue"
|
||
|
:tableColumns="detailsTableColumns"
|
||
|
:totalCount="totalCountDetails"
|
||
|
:MaxResultCount="MaxResultCountDetails"
|
||
|
@alterResultCountDetails="alterResultCountDetails"
|
||
|
@alertoldSkipCountDetails="alertoldSkipCountDetails"
|
||
|
></curren-Drawer>
|
||
|
<!-- 新增与编辑 -->
|
||
|
<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="FormSubmitHandle"
|
||
12 months ago
|
@close="FormCloseHandle"
|
||
12 months ago
|
@goBack="goBack"
|
||
|
>
|
||
|
<template>
|
||
|
<curren-descriptions
|
||
|
v-if="this.displayDialog.newDialog"
|
||
|
:border="true"
|
||
|
:column="3"
|
||
|
:direction="'horizontal'"
|
||
|
:colon="false"
|
||
|
:tabsDesTions="detailsTableColumns"
|
||
|
:propsData="propsData.details[0]"
|
||
|
class="drawerDescriptionsFirst"
|
||
|
style="width:100%;padding-top:20px"
|
||
|
>
|
||
|
</curren-descriptions>
|
||
|
</template>
|
||
|
</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>
|
||
|
</div>
|
||
|
</template>
|
||
|
<script>
|
||
|
import { tableMixins } from "@/mixins/TableMixins";
|
||
|
import { LoadingMixins } from "@/mixins/LoadingMixins";
|
||
|
import { drawerMixins } from "@/mixins/drawerMixins";
|
||
|
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins";
|
||
|
import { mixins } from "@/mixins/mixins";
|
||
|
import { newAndEdiDialogMixins } from "@/mixins/newAndEdiDialogMixins"
|
||
|
import { filterSelectMixins } from '@/mixins/filter-Select'
|
||
|
import { transferLibJobHandel } from '@/api/wms-job'
|
||
12 months ago
|
import { getInventoryByPackingCode,getDetailed } from '@/api/wms-api'
|
||
12 months ago
|
import currenDescriptions from "@/components/currenDescriptions"
|
||
|
export default {
|
||
12 months ago
|
name: "isPadForTransferLibJob",
|
||
12 months ago
|
components: {
|
||
|
currenDescriptions,
|
||
|
},
|
||
|
mixins: [
|
||
|
tableMixins,
|
||
|
LoadingMixins,
|
||
|
drawerMixins,
|
||
|
TableHeaderMixins,
|
||
|
mixins,
|
||
|
filterSelectMixins,
|
||
|
newAndEdiDialogMixins
|
||
|
],
|
||
|
computed: {
|
||
|
editDialog: {
|
||
|
get: function () {
|
||
|
return this.displayDialog.newDialog || this.displayDialog.editDialog;
|
||
|
},
|
||
12 months ago
|
},
|
||
12 months ago
|
//按钮显示
|
||
|
hideButton: function () {
|
||
|
return function (val) {
|
||
|
let data = true
|
||
|
val.forEach(key => {
|
||
|
if (this.propsData.jobStatus == key) {
|
||
|
data = false
|
||
|
}
|
||
|
})
|
||
|
return data
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
data() {
|
||
|
return {
|
||
|
URL: "wms/store/transfer-lib-job",
|
||
|
//常用按钮数据
|
||
|
currenButtonData: [
|
||
|
// this.defaultImportBtn(),//导入
|
||
12 months ago
|
{
|
||
|
type: 'warning',
|
||
|
label: '查看待执行数据',
|
||
|
name: "showCanHandle",
|
||
|
size: 'mini'
|
||
|
},
|
||
|
{
|
||
|
type: 'success',
|
||
|
label: '查看所有数据',
|
||
|
name: "showAllData",
|
||
|
size: 'mini'
|
||
|
},
|
||
12 months ago
|
this.defaultFieldSettingBtn(),//字段设置
|
||
|
this.defaultFreshBtn(),//刷新
|
||
|
this.defaultFilterBtn(),//筛选
|
||
|
],
|
||
|
DrawerButtonData:[
|
||
|
{
|
||
|
type:'success',
|
||
|
label: '完成库移',
|
||
|
name: "handle",
|
||
|
hide: () => { return this.hideButton([1,2,4]) },
|
||
|
size:"mini"
|
||
|
},
|
||
|
],
|
||
|
CreateFormData: {
|
||
|
packingCode:"",
|
||
|
fromLocationCode:"",
|
||
|
toLocationCode:"",
|
||
|
},
|
||
|
CreateForm: [
|
||
|
{ type: "input", label: "箱码", prop: 'packingCode', colSpan: 12, },
|
||
|
{ type: "input", label: "来源库位", prop: 'fromLocationCode', colSpan: 12, },
|
||
|
{ type: "input", label: "目标库位", prop: 'toLocationCode', colSpan: 12, },
|
||
|
],
|
||
|
editRules: {
|
||
|
cerateRule: {
|
||
|
packingCode: [{ required: true, trigger: "blur", message: "不可为空" }],
|
||
|
fromLocationCode: [{ required: true, trigger: "blur", message: "不可为空" }],
|
||
|
toLocationCode: [{ required: true, trigger: "blur", message: "不可为空" }],
|
||
|
},
|
||
|
},
|
||
|
};
|
||
|
},
|
||
|
mounted() {
|
||
|
this.paging();
|
||
|
},
|
||
|
methods:{
|
||
12 months ago
|
topbuttonHandle(val,item){
|
||
|
if(val == 'showCanHandle'){
|
||
|
this.PageListParams.condition.filters.push({
|
||
|
logic:"And",
|
||
|
column:"jobStatus",
|
||
|
action:"In",
|
||
|
value: JSON.stringify([1,2,4,30])
|
||
|
})
|
||
|
this.paging();
|
||
|
}
|
||
|
else if(val == 'showAllData'){
|
||
|
this.PageListParams.condition.filters = this.PageListParams.condition.filters.filter(obj => obj.column != 'jobStatus');
|
||
|
this.paging();
|
||
|
}
|
||
|
else{
|
||
|
this.topbutton(val,item)
|
||
|
}
|
||
|
},
|
||
12 months ago
|
drawerbutton(val){
|
||
|
// 完成库移
|
||
|
if(val == "handle"){
|
||
|
this.formTitle = "完成库移";
|
||
|
this.formReveal = true
|
||
|
this.theEvent = "newly"
|
||
|
this.displayDialog.newDialog = true;
|
||
|
}
|
||
12 months ago
|
},
|
||
12 months ago
|
FormSubmitHandle(val){
|
||
|
this.Loading.newAndEdiLoading = true
|
||
|
// 先获取库存余额进行部分项赋值
|
||
|
getInventoryByPackingCode(this.CreateFormData.packingCode).then(inventory => {
|
||
|
// 目前定的需求为:details中只有一条明细,所以按钮写在最外层,默认赋值第一位
|
||
|
let _data = this.propsData
|
||
|
_data.details[0].handledFromPackingCode = this.CreateFormData.packingCode
|
||
|
_data.details[0].handledToPackingCode = this.CreateFormData.packingCode
|
||
|
_data.details[0].handledFromLocationCode = this.CreateFormData.fromLocationCode
|
||
|
_data.details[0].handledToLocationCode = this.CreateFormData.toLocationCode
|
||
|
_data.details[0].handledToLot = inventory.lot
|
||
|
_data.details[0].handledFromLot = inventory.lot
|
||
|
_data.details[0].handledFromSupplierBatch = inventory.supplierBatch
|
||
|
_data.details[0].handledToSupplierBatch = inventory.supplierBatch
|
||
|
_data.details[0].handledFromQty = inventory.qty
|
||
|
_data.details[0].handledToQty = inventory.qty
|
||
|
transferLibJobHandel(this.propsData.id, _data).then(res => {
|
||
|
this.Loading.newAndEdiLoading = false
|
||
|
this.FormResult("success")
|
||
|
}).catch(err => {
|
||
|
this.Loading.newAndEdiLoading = false
|
||
|
this.FormResult("error")
|
||
|
})
|
||
|
}).catch(err => {
|
||
|
this.Loading.newAndEdiLoading = false
|
||
|
})
|
||
12 months ago
|
},
|
||
|
FormCloseHandle(val){
|
||
|
this.FormClose(val)
|
||
|
this.Loading.appMainLoading = true
|
||
|
getDetailed(this.propsData.id, this.URL)
|
||
|
.then(res => {
|
||
|
this.propsData = res
|
||
|
this.Loading.appMainLoading = false
|
||
|
})
|
||
|
.catch(err=>{
|
||
|
this.Loading.appMainLoading = false
|
||
|
})
|
||
12 months ago
|
}
|
||
|
}
|
||
|
};
|
||
|
</script>
|
||
|
<style lang="scss" scoped>
|
||
|
@import "@/styles/mainbasicData.scss";
|
||
|
</style>
|