Browse Source

【nev-pad】业务库移使用封装最终版

ag_report_nev
安虹睿 11 months ago
parent
commit
4eeedb3ca7
  1. 10
      fe/PC/src/router/index.js
  2. 4
      fe/PC/src/utils/detailsTableColumns/index.js
  3. 569
      fe/PC/src/views/padManage/isPadForTransferLibJob.vue
  4. 419
      fe/PC/src/views/padManage/isPadForTransferLibJob_new.vue
  5. 278
      fe/PC/src/views/padManage/isPadForTransferLibJob_pc.vue

10
fe/PC/src/router/index.js

@ -175,15 +175,15 @@ export const constantRoutes = [
{
path: '/',
component: Layout,
redirect: '/isPadForTransferLibJob_new',
redirect: '/isPadForTransferLibJob_pc',
hidden: true,
children: [{
path: 'isPadForTransferLibJob_new',
component: () => import('@/views/padManage/isPadForTransferLibJob_new'),
name: 'isPadForTransferLibJob_new',
path: 'isPadForTransferLibJob_pc',
component: () => import('@/views/padManage/isPadForTransferLibJob_pc'),
name: 'isPadForTransferLibJob_pc',
meta: {
keepAlive : true,
title: '业务库移',
title: '业务库移(pc版本)',
icon: '系统首页',
}
}]

4
fe/PC/src/utils/detailsTableColumns/index.js

@ -1089,8 +1089,8 @@ export const ScrapNote = [
{ label: "生产时间", prop: 'produceDate', type: "dateTime" },
{ label: "过期时间", prop: 'expireDate', type: "dateTime" },
{ label: "来源库位组", prop: 'fromLocationGroup' },
{ label: "目标库位组", prop: 'toLocationGroup' },
{ label: "目标库位", prop: 'toLocationCode' },
// { label: "目标库位组", prop: 'toLocationGroup' },
// { label: "目标库位", prop: 'toLocationCode' },
{ label: "来源库区", prop: 'fromLocationArea' },
{ label: "目标库区", prop: 'toLocationArea' },
{ label: "来源ERP库位", prop: 'fromLocationErpCode' },

569
fe/PC/src/views/padManage/isPadForTransferLibJob.vue

@ -1,148 +1,126 @@
<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="topbuttonHandle"
@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"
@close="FormCloseHandle"
@goBack="goBack"
>
<template>
<div class="padListPageOuter">
<padListPage
:listUrl="listUrl"
ref="padListPage_Ref"
:padListData="padListData"
:searchFormData="searchFormData"
:searchForm="searchForm"
:headerButton="headerButton"
:padMainColumn="padMainColumn"
:padDeatilColumn="padDeatilColumn"
:listRowButton="listRowButton"
:padListLoading="padListLoading"
:padListPager="padListPager"
:getPadList="getPadList"
:intSearchFilters="intSearchFilters"
:padListParams="padListParams"
:mainIsShowDetail="true"
@listRowButtonClick="listRowButtonClick"
@headerButtonClick="headerButtonClick"
@headerSearchHandle="headerSearchHandle"
@resetSearchHandle="resetSearchHandle"
:padMainStaColumn="[{prop:'number'},{prop:'jobStatus',filters:'jobStatus'}]"
></padListPage>
<!-- :mainIsShowDetail="true" -->
<!-- 完成库移弹窗 -->
<el-dialog
title="完成库移"
:visible="compeletHandleVisible"
v-loading="compeletLoading"
top="5vh"
width="90%">
<div style="height:calc(100vh - 280px);overflow:auto">
<currenForm
:labelWidth="'90px'"
ref="compeletHandleForm_Ref"
:style="'width:calc(100% - 100px)'"
size="medium"
:searchData="compeletFormData"
:searchForm="compeletForm"
:rules="compeletRule"
></currenForm>
<curren-descriptions
v-if="this.displayDialog.newDialog"
v-if="compeletHandleVisible"
:border="true"
:column="3"
:direction="'horizontal'"
:colon="false"
:tabsDesTions="detailsTableColumns"
:propsData="propsData.details[0]"
class="drawerDescriptionsFirst"
:tabsDesTions="padDeatilColumn"
:propsData="currentRowData.details[0]"
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>
></curren-descriptions>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="compeletHandleClose()"> </el-button>
<el-button type="primary" @click="compeletHandleSure()"> </el-button>
</span>
</el-dialog>
<!-- 查看余额 -->
<el-dialog
class="showInventoryPop"
title="查看余额"
:visible="showInventoryVisible"
top="5vh"
width="90%">
<div v-loading="showInventoryLoading" style="height:calc(100vh - 220px);overflow:auto">
<div
class="showInventoryRow"
v-for="(item,index) in inventoryTableData"
:key="index">
<div class="commonRowTitle">
<el-tag size="mini" effect="dark">{{index + 1}}</el-tag>
<div>{{item[inventoryColumn[6].prop]}}</div>
</div>
<curren-descriptions
:column="2"
:border="true"
:direction="'horizontal'"
:tabsDesTions="inventoryColumn"
:propsData="item"
style="width:100%;padding-top:20px"
:labelStyle="{'width':'200px'}"
></curren-descriptions>
</div>
<el-empty v-if="(!inventoryTableData || inventoryTableData.length <= 0) && !showInventoryLoading" description="暂无数据"></el-empty>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="inventoryCloseHandle()"> </el-button>
</span>
</el-dialog>
</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'
import { getInventoryByPackingCode,getDetailed } from '@/api/wms-api'
import { padListPageMixins } from "@/mixins/padListPageMixins"
import padListPage from "./components/padListPage/index"
import currenForm from "@/components/currenForm"
import currenDescriptions from "@/components/currenDescriptions"
import { getInventoryByPackingCode } from '@/api/wms-api'
import { transferLibJobHandel } from '@/api/wms-job'
import { inventoryBalanceRecommendList } from '@/api/wms-pad'
import { filterSelectMixins } from '@/mixins/filter-Select'
export default {
name: "isPadForTransferLibJob",
components: {
currenDescriptions,
},
name: 'isPadForTransferLibJob',
mixins: [
tableMixins,
LoadingMixins,
drawerMixins,
TableHeaderMixins,
mixins,
padListPageMixins,
filterSelectMixins,
newAndEdiDialogMixins
],
components: { padListPage,currenForm,currenDescriptions },
computed: {
editDialog: {
get: function () {
return this.displayDialog.newDialog || this.displayDialog.editDialog;
},
},
//
//
hideButton: function () {
return function (val) {
return this.showFilterSta == val
}
},
//
hideRowButton: function () {
return function (row,val) {
let data = true
val.forEach(key => {
if (this.propsData.jobStatus == key) {
if (row.jobStatus == key) {
data = false
}
})
@ -150,129 +128,292 @@ export default {
}
}
},
data() {
data () {
return {
URL: "wms/store/transfer-lib-job",
//
currenButtonData: [
// this.defaultImportBtn(),//
listUrl:'wms/store/transfer-lib-job',
searchFormData:{
number:"",
requestNumber:"",
},
searchForm:[
{label:'传入申请单号',prop:'callRequestNumber',type:'input',width:'140px'},
{label:'传入任务单号',prop:'callJobNumber',type:'input',width:'140px'},
],
showFilterSta:false,
headerButton:[
{
type: 'warning',
label: '查看待执行数据',
name: "showCanHandle",
size: 'mini'
hide: () => { return this.hideButton(true) },
},
{
type: 'success',
label: '查看所有数据',
type: 'danger',
label: '重置[待执行]数据',
name: "showAllData",
size: 'mini'
hide: () => { return this.hideButton(false) },
},
this.defaultFieldSettingBtn(),//
this.defaultFreshBtn(),//
this.defaultFilterBtn(),//
],
DrawerButtonData:[
padMainColumn:[
{ label:'任务单号',prop:'number'},
{ label:'申请单号',prop:'requestNumber'},
// { label: "", prop: "jobStatus",type: "tagFilter", filters: "jobStatus",titleBack:true },
{ label: "传入申请单号", prop: "callRequestNumber" },
{ label: "传入任务单号", prop: "callJobNumber" },
{ label: "任务描述", prop: 'jobDescription' },
{ label: "使用在途库", prop: 'useOnTheWayLocation', type: "filter", filters: "whetherOrNot" },
{ label: "已确认", prop: 'confirmed',type: "filter", filters: "whetherOrNot" },
{ label: "确认时间", prop: 'confirmTime' },
{ label: "备注", prop: "remark" },
{ label: "操作员", prop: "worker" },
{ label: "承接用户", prop: "acceptUserName" },
{ label: "承接时间", prop: 'acceptTime', type: "dateTime" },
{ label: "完成者用户名", prop: 'completeUserName' },
{ label: "完成时间", prop: "completeTime", type: "dateTime" },
{ label: "创建时间", prop: 'creationTime', type: "dateTime" },
// { label: "", prop: "lastModificationTime", type: "dateTime" },
// { label: "", prop: "callServerName" },
// { label: "", prop: "callBusinessType" },
],
padDeatilColumn:[
{ label: "物品代码", prop: "itemCode"},
{ label: "物品名称", prop: "itemName" },
{ label: "物品描述1", prop: "itemDesc1" },
{ label: "物品描述2", prop: "itemDesc2" },
{ label: "请求数量", prop: 'requestQty' },
{ label: "请求ERP库位", prop: 'requestLocationErpCode' },
{ label: "推荐来源数量", prop: 'recommendFromQty' },
{ label: "推荐目标数量", prop: 'recommendToQty' },
{ label: "推荐来源箱标签", prop: 'recommendFromPackingCode' },
{ label: "推荐目标箱标签", prop: 'recommendToPackingCode' },
{ label: "推荐来源库位", prop: 'recommendFromLocationCode' },
{ label: "推荐目标库位", prop: 'recommendToLocationCode' },
{ label: "推荐来源ERP库位", prop: 'recommendFromLocationErpCode' },
{ label: "推荐目标ERP库位", prop: 'recommendToLocationErpCode' },
{ label: "推荐来源批次", prop: 'recommendFromLot' },
{ label: "推荐目标批次", prop: 'recommendToLot' },
{ label: "推荐来源过期时间", prop: 'recommendFromExpireDate', type: "dateTime" },
{ label: "推荐目标过期时间", prop: 'recommendToExpireDate', type: "dateTime" },
{ label: "实际来源数量", prop: 'handledFromQty' },
{ label: "实际目标数量", prop: 'handledToQty' },
{ label: "实际来源箱标签", prop: 'handledFromPackingCode' },
{ label: "实际目标箱标签", prop: 'handledToPackingCode' },
{ label: "实际来源库位", prop: 'handledFromLocationCode' },
{ label: "实际目标库位", prop: 'handledToLocationCode' },
{ label: "实际来源ERP库位", prop: 'handledFromLocationErpCode' },
{ label: "实际目标ERP库位", prop: 'handledToLocationErpCode' },
{ label: "实际来源批次", prop: 'handledFromLot' },
{ label: "实际目标批次", prop: 'handledToLot' },
{ label: "实际来源过期时间", prop: 'handledFromExpireDate', type: "dateTime" },
{ label: "实际目标过期时间", prop: 'handledToExpireDate', type: "dateTime" },
{ label: "位置码", prop: 'positionCode' },
{ label: "生产线", prop: 'prodLine' },
{ label: "任务状态", prop: "jobStatus",type: "filter", filters: "jobStatus" },
{ label: "推荐类型", prop: 'recommendType' },
],
listRowButton:[
{
type:'success',
type: 'success',
label: '完成库移',
name: "handle",
hide: () => { return this.hideButton([1,2,4]) },
size:"mini"
name: "compelet",
hide: (row) => { return this.hideRowButton(row,[1,2,4]) },
},
{
type: 'primary',
label: '查看库存余额',
name: "showInventory",
},
],
CreateFormData: {
//
compeletHandleVisible:false,
compeletLoading:false,
compeletFormData: {
packingCode:"",
fromLocationCode:"",
toLocationCode:"",
},
CreateForm: [
compeletForm: [
{ type: "input", label: "箱码", prop: 'packingCode', colSpan: 12, },
{ type: "input", label: "来源库位", prop: 'fromLocationCode', colSpan: 12, },
{ type: "input", label: "目标库位", prop: 'toLocationCode', colSpan: 12, },
// filterSelect
// { type: "filterSelect", label: "", prop: "toLocationCode", optionsLabel: "name", optionsValue: "code",
// focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")},colSpan: 12
// },
],
editRules: {
cerateRule: {
packingCode: [{ required: true, trigger: "blur", message: "不可为空" }],
fromLocationCode: [{ required: true, trigger: "blur", message: "不可为空" }],
toLocationCode: [{ required: true, trigger: "blur", message: "不可为空" }],
},
compeletRule: {
packingCode: [{ required: true, trigger: "blur", message: "不可为空" }],
fromLocationCode: [{ required: true, trigger: "blur", message: "不可为空" }],
toLocationCode: [{ required: true, trigger: "blur", message: "不可为空" }],
},
};
//
currentRowData:null,
//
showInventoryVisible:false,
showInventoryLoading:false,
inventoryTableData:[],
inventoryColumn:[
{ label: "物品代码", prop: "itemCode" },
{ label: "物品名称", prop: "itemName" },
{ label: "物品描述1", prop: "itemDesc1" },
{ label: "物品描述2", prop: "itemDesc2" },
{ label: "计量单位", prop: "uom" },
{ label: '数量', prop: "qty" },
{ label: "箱码", prop: 'packingCode' },
{ label: "批次", prop: 'lot' },
{ label: "供应商批次", prop: "supplierBatch" },
{ label: "标包数量", prop: "stdPackQty" },
{ label: "库位", prop: 'locationCode' },
{ label: "ERP储位", prop: "locationErpCode" },
{ label: "库位组", prop: 'locationGroup' },
{ label: "标准成本单价", prop: "stdCostPrice" },
{ label: "标准成本金额", prop: "stdCost" },
{ label: "备注", prop: 'remark' },
{ label: "序号", prop: 'serialNumber' },
{ label: "状态", prop: "status", type: "filter", filters: "openToClose" },
{ label: "库区", prop: 'locationArea' },
{ label: "管理类型", prop: "manageType", type: "filter", filters: "manageType" },
{ label: "入库时间", prop: 'putInTime', type:"dateTime" },
{ label: "生产时间", prop: "produceDate", type: "dateTime" },
{ label: "到货时间", prop: "arriveDate", type: "dateTime" },
{ label: "过期时间", prop: "expireDate", type: "dateTime" },
{ label: "创建时间", prop: "creationTime", type: "dateTime" },
]
}
},
mounted() {
this.paging();
mounted(){
this.initPage()
},
methods:{
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();
methods: {
//
headerButtonClick(item,index){
if(item.name == 'showCanHandle'){
this.showCanHandleFunc()
}
else{
this.topbutton(val,item)
else if(item.name == 'showAllData'){
this.showFilterSta = false
document.getElementById("padListCard").scrollTop = 0
this.clearSearchHandle(true)
this.getPadList();
}
},
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
})
//
showCanHandleFunc(){
this.showFilterSta = true
let _filters = [{
logic:"And",
column:"jobStatus",
action:"In",
value: JSON.stringify([1,2,4,30])
}]
this.padListParams.condition.filters = _filters
document.getElementById("padListCard").scrollTop = 0
this.clearSearchHandle()
this.getPadList();
},
FormCloseHandle(val){
this.FormClose(val)
this.Loading.appMainLoading = true
getDetailed(this.propsData.id, this.URL)
.then(res => {
this.propsData = res
this.Loading.appMainLoading = false
//
listRowButtonClick(row,item){
if(item.name == "showInventory"){
this.currentRowData = row
this.showInventoryVisible = true
let _params = {
itemCode:row.details[0].itemCode,
qty:9999999999,
statuses:'OK',
locationTypes:'RAW'
}
this.showInventoryLoading = true
inventoryBalanceRecommendList(_params)
.then(res=>{
this.inventoryTableData = res
this.showInventoryLoading = false
})
.catch(err=>{
this.Loading.appMainLoading = false
this.showInventoryLoading = false
})
}
if(item.name == "compelet"){
this.currentRowData = row
this.compeletHandleVisible = true
}
},
headerSearchHandle(){
this.showFilterSta = false
},
resetSearchHandle(){
this.clearSearchHandle(true)
this.showFilterSta = false
},
// -
compeletHandleClose(){
this.compeletFormData = {
packingCode:"",
fromLocationCode:"",
toLocationCode:"",
}
if(this.$refs.compeletHandleForm_Ref)this.$refs.compeletHandleForm_Ref.clearValidate()
this.compeletHandleVisible = false
},
// -
compeletHandleSure(val){
let _form = this.$refs.compeletHandleForm_Ref.$refs.form
_form.validate((valid) => {
if (valid) {
this.compeletLoading = true
//
getInventoryByPackingCode(this.compeletFormData.packingCode).then(inventory => {
// details
let _data = this.currentRowData
_data.details[0].handledFromPackingCode = this.compeletFormData.packingCode
_data.details[0].handledToPackingCode = this.compeletFormData.packingCode
_data.details[0].handledFromLocationCode = this.compeletFormData.fromLocationCode
_data.details[0].handledToLocationCode = this.compeletFormData.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.currentRowData.id, _data).then(res => {
this.compeletLoading = false
this.$successMsg("完成库移成功!")
if(this.showFilterSta){
this.showCanHandleFunc()
}
else{
this.getPadList()
}
this.compeletHandleClose()
}).catch(err => {
this.compeletLoading = false
})
}).catch(err => {
this.compeletLoading = false
})
} else {
return false;
}
});
},
//
inventoryCloseHandle(){
this.showInventoryVisible = false
this.inventoryTableData = []
}
}
};
}
</script>
<style lang="scss" scoped>
@import "@/styles/mainbasicData.scss";
@import "@/styles/padMain.scss";
.showInventoryPop{
::v-deep .el-dialog__body{
padding:0 15px !important;
}
.showInventoryRow{
margin-bottom: 20px;
.el-descriptions{
padding: 0 !important;
}
}
}
</style>

419
fe/PC/src/views/padManage/isPadForTransferLibJob_new.vue

@ -1,419 +0,0 @@
<template>
<div class="padListPageOuter">
<padListPage
:listUrl="listUrl"
ref="padListPage_Ref"
:padListData="padListData"
:searchFormData="searchFormData"
:searchForm="searchForm"
:headerButton="headerButton"
:padMainColumn="padMainColumn"
:padDeatilColumn="padDeatilColumn"
:listRowButton="listRowButton"
:padListLoading="padListLoading"
:padListPager="padListPager"
:getPadList="getPadList"
:intSearchFilters="intSearchFilters"
:padListParams="padListParams"
:mainIsShowDetail="true"
@listRowButtonClick="listRowButtonClick"
@headerButtonClick="headerButtonClick"
@headerSearchHandle="headerSearchHandle"
@resetSearchHandle="resetSearchHandle"
:padMainStaColumn="[{prop:'number'},{prop:'jobStatus',filters:'jobStatus'}]"
></padListPage>
<!-- :mainIsShowDetail="true" -->
<!-- 完成库移弹窗 -->
<el-dialog
title="完成库移"
:visible="compeletHandleVisible"
v-loading="compeletLoading"
top="5vh"
width="90%">
<div style="height:calc(100vh - 280px);overflow:auto">
<currenForm
:labelWidth="'90px'"
ref="compeletHandleForm_Ref"
:style="'width:calc(100% - 100px)'"
size="medium"
:searchData="compeletFormData"
:searchForm="compeletForm"
:rules="compeletRule"
></currenForm>
<curren-descriptions
v-if="compeletHandleVisible"
:border="true"
:column="3"
:direction="'horizontal'"
:colon="false"
:tabsDesTions="padDeatilColumn"
:propsData="currentRowData.details[0]"
style="width:100%;padding-top:20px"
></curren-descriptions>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="compeletHandleClose()"> </el-button>
<el-button type="primary" @click="compeletHandleSure()"> </el-button>
</span>
</el-dialog>
<!-- 查看余额 -->
<el-dialog
class="showInventoryPop"
title="查看余额"
:visible="showInventoryVisible"
top="5vh"
width="90%">
<div v-loading="showInventoryLoading" style="height:calc(100vh - 220px);overflow:auto">
<div
class="showInventoryRow"
v-for="(item,index) in inventoryTableData"
:key="index">
<div class="commonRowTitle">
<el-tag size="mini" effect="dark">{{index + 1}}</el-tag>
<div>{{item[inventoryColumn[6].prop]}}</div>
</div>
<curren-descriptions
:column="2"
:border="true"
:direction="'horizontal'"
:tabsDesTions="inventoryColumn"
:propsData="item"
style="width:100%;padding-top:20px"
:labelStyle="{'width':'200px'}"
></curren-descriptions>
</div>
<el-empty v-if="(!inventoryTableData || inventoryTableData.length <= 0) && !showInventoryLoading" description="暂无数据"></el-empty>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="inventoryCloseHandle()"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { padListPageMixins } from "@/mixins/padListPageMixins"
import padListPage from "./components/padListPage/index"
import currenForm from "@/components/currenForm"
import currenDescriptions from "@/components/currenDescriptions"
import { getInventoryByPackingCode } from '@/api/wms-api'
import { transferLibJobHandel } from '@/api/wms-job'
import { inventoryBalanceRecommendList } from '@/api/wms-pad'
import { filterSelectMixins } from '@/mixins/filter-Select'
export default {
name: 'isPadForTransferLibJob',
mixins: [
padListPageMixins,
filterSelectMixins,
],
components: { padListPage,currenForm,currenDescriptions },
computed: {
//
hideButton: function () {
return function (val) {
return this.showFilterSta == val
}
},
//
hideRowButton: function () {
return function (row,val) {
let data = true
val.forEach(key => {
if (row.jobStatus == key) {
data = false
}
})
return data
}
}
},
data () {
return {
listUrl:'wms/store/transfer-lib-job',
searchFormData:{
number:"",
requestNumber:"",
},
searchForm:[
{label:'传入申请单号',prop:'callRequestNumber',type:'input',width:'140px'},
{label:'传入任务单号',prop:'callJobNumber',type:'input',width:'140px'},
],
showFilterSta:false,
headerButton:[
{
type: 'warning',
label: '查看待执行数据',
name: "showCanHandle",
hide: () => { return this.hideButton(true) },
},
{
type: 'danger',
label: '重置[待执行]数据',
name: "showAllData",
hide: () => { return this.hideButton(false) },
},
],
padMainColumn:[
{ label:'任务单号',prop:'number'},
{ label:'申请单号',prop:'requestNumber'},
// { label: "", prop: "jobStatus",type: "tagFilter", filters: "jobStatus",titleBack:true },
{ label: "传入申请单号", prop: "callRequestNumber" },
{ label: "传入任务单号", prop: "callJobNumber" },
{ label: "任务描述", prop: 'jobDescription' },
{ label: "使用在途库", prop: 'useOnTheWayLocation', type: "filter", filters: "whetherOrNot" },
{ label: "已确认", prop: 'confirmed',type: "filter", filters: "whetherOrNot" },
{ label: "确认时间", prop: 'confirmTime' },
{ label: "备注", prop: "remark" },
{ label: "操作员", prop: "worker" },
{ label: "承接用户", prop: "acceptUserName" },
{ label: "承接时间", prop: 'acceptTime', type: "dateTime" },
{ label: "完成者用户名", prop: 'completeUserName' },
{ label: "完成时间", prop: "completeTime", type: "dateTime" },
{ label: "创建时间", prop: 'creationTime', type: "dateTime" },
// { label: "", prop: "lastModificationTime", type: "dateTime" },
// { label: "", prop: "callServerName" },
// { label: "", prop: "callBusinessType" },
],
padDeatilColumn:[
{ label: "物品代码", prop: "itemCode"},
{ label: "物品名称", prop: "itemName" },
{ label: "物品描述1", prop: "itemDesc1" },
{ label: "物品描述2", prop: "itemDesc2" },
{ label: "请求数量", prop: 'requestQty' },
{ label: "请求ERP库位", prop: 'requestLocationErpCode' },
{ label: "推荐来源数量", prop: 'recommendFromQty' },
{ label: "推荐目标数量", prop: 'recommendToQty' },
{ label: "推荐来源箱标签", prop: 'recommendFromPackingCode' },
{ label: "推荐目标箱标签", prop: 'recommendToPackingCode' },
{ label: "推荐来源库位", prop: 'recommendFromLocationCode' },
{ label: "推荐目标库位", prop: 'recommendToLocationCode' },
{ label: "推荐来源ERP库位", prop: 'recommendFromLocationErpCode' },
{ label: "推荐目标ERP库位", prop: 'recommendToLocationErpCode' },
{ label: "推荐来源批次", prop: 'recommendFromLot' },
{ label: "推荐目标批次", prop: 'recommendToLot' },
{ label: "推荐来源过期时间", prop: 'recommendFromExpireDate', type: "dateTime" },
{ label: "推荐目标过期时间", prop: 'recommendToExpireDate', type: "dateTime" },
{ label: "实际来源数量", prop: 'handledFromQty' },
{ label: "实际目标数量", prop: 'handledToQty' },
{ label: "实际来源箱标签", prop: 'handledFromPackingCode' },
{ label: "实际目标箱标签", prop: 'handledToPackingCode' },
{ label: "实际来源库位", prop: 'handledFromLocationCode' },
{ label: "实际目标库位", prop: 'handledToLocationCode' },
{ label: "实际来源ERP库位", prop: 'handledFromLocationErpCode' },
{ label: "实际目标ERP库位", prop: 'handledToLocationErpCode' },
{ label: "实际来源批次", prop: 'handledFromLot' },
{ label: "实际目标批次", prop: 'handledToLot' },
{ label: "实际来源过期时间", prop: 'handledFromExpireDate', type: "dateTime" },
{ label: "实际目标过期时间", prop: 'handledToExpireDate', type: "dateTime" },
{ label: "位置码", prop: 'positionCode' },
{ label: "生产线", prop: 'prodLine' },
{ label: "任务状态", prop: "jobStatus",type: "filter", filters: "jobStatus" },
{ label: "推荐类型", prop: 'recommendType' },
],
listRowButton:[
{
type: 'success',
label: '完成库移',
name: "compelet",
hide: (row) => { return this.hideRowButton(row,[1,2,4]) },
},
{
type: 'primary',
label: '查看库存余额',
name: "showInventory",
},
],
//
compeletHandleVisible:false,
compeletLoading:false,
compeletFormData: {
packingCode:"",
fromLocationCode:"",
toLocationCode:"",
},
compeletForm: [
{ type: "input", label: "箱码", prop: 'packingCode', colSpan: 12, },
{ type: "input", label: "来源库位", prop: 'fromLocationCode', colSpan: 12, },
{ type: "input", label: "目标库位", prop: 'toLocationCode', colSpan: 12, },
// filterSelect
// { type: "filterSelect", label: "", prop: "toLocationCode", optionsLabel: "name", optionsValue: "code",
// focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")},colSpan: 12
// },
],
compeletRule: {
packingCode: [{ required: true, trigger: "blur", message: "不可为空" }],
fromLocationCode: [{ required: true, trigger: "blur", message: "不可为空" }],
toLocationCode: [{ required: true, trigger: "blur", message: "不可为空" }],
},
//
currentRowData:null,
//
showInventoryVisible:false,
showInventoryLoading:false,
inventoryTableData:[],
inventoryColumn:[
{ label: "物品代码", prop: "itemCode" },
{ label: "物品名称", prop: "itemName" },
{ label: "物品描述1", prop: "itemDesc1" },
{ label: "物品描述2", prop: "itemDesc2" },
{ label: "计量单位", prop: "uom" },
{ label: '数量', prop: "qty" },
{ label: "箱码", prop: 'packingCode' },
{ label: "批次", prop: 'lot' },
{ label: "供应商批次", prop: "supplierBatch" },
{ label: "标包数量", prop: "stdPackQty" },
{ label: "库位", prop: 'locationCode' },
{ label: "ERP储位", prop: "locationErpCode" },
{ label: "库位组", prop: 'locationGroup' },
{ label: "标准成本单价", prop: "stdCostPrice" },
{ label: "标准成本金额", prop: "stdCost" },
{ label: "备注", prop: 'remark' },
{ label: "序号", prop: 'serialNumber' },
{ label: "状态", prop: "status", type: "filter", filters: "openToClose" },
{ label: "库区", prop: 'locationArea' },
{ label: "管理类型", prop: "manageType", type: "filter", filters: "manageType" },
{ label: "入库时间", prop: 'putInTime', type:"dateTime" },
{ label: "生产时间", prop: "produceDate", type: "dateTime" },
{ label: "到货时间", prop: "arriveDate", type: "dateTime" },
{ label: "过期时间", prop: "expireDate", type: "dateTime" },
{ label: "创建时间", prop: "creationTime", type: "dateTime" },
]
}
},
mounted(){
this.initPage()
},
methods: {
//
headerButtonClick(item,index){
if(item.name == 'showCanHandle'){
this.showCanHandleFunc()
}
else if(item.name == 'showAllData'){
this.showFilterSta = false
document.getElementById("padListCard").scrollTop = 0
this.clearSearchHandle(true)
this.getPadList();
}
},
//
showCanHandleFunc(){
this.showFilterSta = true
let _filters = [{
logic:"And",
column:"jobStatus",
action:"In",
value: JSON.stringify([1,2,4,30])
}]
this.padListParams.condition.filters = _filters
document.getElementById("padListCard").scrollTop = 0
this.clearSearchHandle()
this.getPadList();
},
//
listRowButtonClick(row,item){
if(item.name == "showInventory"){
this.currentRowData = row
this.showInventoryVisible = true
let _params = {
itemCode:row.details[0].itemCode,
qty:9999999999,
statuses:'OK',
locationTypes:'RAW'
}
this.showInventoryLoading = true
inventoryBalanceRecommendList(_params)
.then(res=>{
this.inventoryTableData = res
this.showInventoryLoading = false
})
.catch(err=>{
this.showInventoryLoading = false
})
}
if(item.name == "compelet"){
this.currentRowData = row
this.compeletHandleVisible = true
}
},
headerSearchHandle(){
this.showFilterSta = false
},
resetSearchHandle(){
this.clearSearchHandle(true)
this.showFilterSta = false
},
// -
compeletHandleClose(){
this.compeletFormData = {
packingCode:"",
fromLocationCode:"",
toLocationCode:"",
}
if(this.$refs.compeletHandleForm_Ref)this.$refs.compeletHandleForm_Ref.clearValidate()
this.compeletHandleVisible = false
},
// -
compeletHandleSure(val){
let _form = this.$refs.compeletHandleForm_Ref.$refs.form
_form.validate((valid) => {
if (valid) {
this.compeletLoading = true
//
getInventoryByPackingCode(this.compeletFormData.packingCode).then(inventory => {
// details
let _data = this.currentRowData
_data.details[0].handledFromPackingCode = this.compeletFormData.packingCode
_data.details[0].handledToPackingCode = this.compeletFormData.packingCode
_data.details[0].handledFromLocationCode = this.compeletFormData.fromLocationCode
_data.details[0].handledToLocationCode = this.compeletFormData.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.currentRowData.id, _data).then(res => {
this.compeletLoading = false
this.$successMsg("完成库移成功!")
if(this.showFilterSta){
this.showCanHandleFunc()
}
else{
this.getPadList()
}
this.compeletHandleClose()
}).catch(err => {
this.compeletLoading = false
})
}).catch(err => {
this.compeletLoading = false
})
} else {
return false;
}
});
},
//
inventoryCloseHandle(){
this.showInventoryVisible = false
this.inventoryTableData = []
}
}
}
</script>
<style lang="scss" scoped>
@import "@/styles/padMain.scss";
.showInventoryPop{
::v-deep .el-dialog__body{
padding:0 15px !important;
}
.showInventoryRow{
margin-bottom: 20px;
.el-descriptions{
padding: 0 !important;
}
}
}
</style>

278
fe/PC/src/views/padManage/isPadForTransferLibJob_pc.vue

@ -0,0 +1,278 @@
<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="topbuttonHandle"
@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"
@close="FormCloseHandle"
@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'
import { getInventoryByPackingCode,getDetailed } from '@/api/wms-api'
import currenDescriptions from "@/components/currenDescriptions"
export default {
name: "isPadForTransferLibJob",
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/transfer-lib-job",
//
currenButtonData: [
// this.defaultImportBtn(),//
{
type: 'warning',
label: '查看待执行数据',
name: "showCanHandle",
size: 'mini'
},
{
type: 'success',
label: '查看所有数据',
name: "showAllData",
size: 'mini'
},
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:{
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)
}
},
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
})
},
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
})
}
}
};
</script>
<style lang="scss" scoped>
@import "@/styles/mainbasicData.scss";
</style>
Loading…
Cancel
Save