|
|
@ -44,7 +44,8 @@ |
|
|
|
:drawer="displayDialog.detailsDialog" |
|
|
|
:propsData="propsData" |
|
|
|
:tabsDesTions="tabsDesTions" |
|
|
|
:Butttondata="[]" |
|
|
|
:Butttondata="DrawerButtonData" |
|
|
|
@drawerbutton="drawerbutton" |
|
|
|
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
|
|
|
@handleCommand="drawerHandle" |
|
|
|
@close-value="closeValue" |
|
|
@ -54,6 +55,55 @@ |
|
|
|
@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" |
|
|
|
@close="FormClose" |
|
|
|
@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> |
|
|
@ -62,18 +112,47 @@ |
|
|
|
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' |
|
|
|
import { getInventoryByPackingCode } from '@/api/wms-api' |
|
|
|
import currenDescriptions from "@/components/currenDescriptions" |
|
|
|
export default { |
|
|
|
name: "padTransferLibJob", |
|
|
|
components: { |
|
|
|
currenDescriptions, |
|
|
|
}, |
|
|
|
mixins: [ |
|
|
|
tableMixins, |
|
|
|
LoadingMixins, |
|
|
|
drawerMixins, |
|
|
|
TableHeaderMixins, |
|
|
|
mixins, |
|
|
|
filterSelectMixins, |
|
|
|
newAndEdiDialogMixins |
|
|
|
], |
|
|
|
computed: { |
|
|
|
editDialog: { |
|
|
|
get: function () { |
|
|
|
return this.displayDialog.newDialog || this.displayDialog.editDialog; |
|
|
|
}, |
|
|
|
}, |
|
|
|
//按钮显示 |
|
|
|
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/kitting-issue-request", |
|
|
|
URL: "wms/store/transfer-lib-job", |
|
|
|
//常用按钮数据 |
|
|
|
currenButtonData: [ |
|
|
|
// this.defaultImportBtn(),//导入 |
|
|
@ -81,11 +160,75 @@ |
|
|
|
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:{ |
|
|
|
drawerbutton(val){ |
|
|
|
// 完成库移 |
|
|
|
if(val == "handle"){ |
|
|
|
this.formTitle = "完成库移"; |
|
|
|
this.formReveal = true |
|
|
|
this.theEvent = "newly" |
|
|
|
this.displayDialog.newDialog = true; |
|
|
|
} |
|
|
|
}, |
|
|
|
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 |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|