Browse Source

修改库存转移任务

wms3.0_pda
lijuncheng 12 months ago
parent
commit
29834660b8
  1. 2
      api/request2.js
  2. 1
      common/basic.js
  3. 1
      mycomponents/balance/balance.vue
  4. 14
      pages/inventoryMove/coms/comInventoryJobCard.vue
  5. 68
      pages/inventoryMove/job/inventoryMoveDetail.vue
  6. 2
      static/config.json

2
api/request2.js

@ -1128,7 +1128,7 @@ export function cancleTakeInventoryMoveJob(id) {
*/ */
export function inventoryMoveSubmit(params) { export function inventoryMoveSubmit(params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit?id=" + id, url: baseApi + "/wms/inventorymove-job-main/execute",
method: "put", method: "put",
data: params, data: params,
}); });

1
common/basic.js

@ -640,6 +640,7 @@ export function getPackingNumberAndBatch(managementList, itemCode, packingNumber
packingNumber: "", packingNumber: "",
batch: "" batch: ""
} }
debugger
var manageType = queryManageModel(managementList, itemCode) var manageType = queryManageModel(managementList, itemCode)
if (manageType == "BY_QUANTITY") { if (manageType == "BY_QUANTITY") {

1
mycomponents/balance/balance.vue

@ -108,7 +108,6 @@
) )
}, },
isDevlement(){ isDevlement(){
return getApp().globalData.isDevelopment; return getApp().globalData.isDevelopment;
} }
} }

14
pages/inventoryMove/coms/comInventoryJobCard.vue

@ -3,19 +3,7 @@
<view class="task_item"> <view class="task_item">
<view class="task_text"> <view class="task_text">
<view class=""> <view class="">
物品代码 : {{dataContent.itemCode}} 申请单号 : {{dataContent.requestNumber}}
</view>
</view>
<view class="task_text">
<view class="">
来源库位 : {{dataContent.fromLocationCode}}
</view>
</view>
<view class="task_text">
<view class="">
目标库位 : {{dataContent.toLocationCode}}
</view> </view>
</view> </view>
</view> </view>

68
pages/inventoryMove/job/inventoryMoveDetail.vue

@ -1,5 +1,14 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class="page-header">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top>
</view>
<view class="header_item">
申请单号 : {{jobContent.requestNumber}}
</view>
<u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line>
</view>
<view class="page-main"> <view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
@ -63,7 +72,7 @@
import comMessage from '@/mycomponents/common/comMessage.vue' import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue' import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
export default { export default {
@ -75,7 +84,8 @@
requiredLocation, requiredLocation,
comMessage, comMessage,
winScanPackAndLocation, winScanPackAndLocation,
detailInfoPopup detailInfoPopup,
jobTop
}, },
data() { data() {
return { return {
@ -256,11 +266,11 @@
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) { if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
']不一致,是否继续上架?', res => { ']不一致,是否继续转移?', res => {
if (res) { if (res) {
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance itemDetail.handleQty = Number(result.balance.qty) ;
.qty) ? Number(result.balance.qty) : Number(result.label.qty); itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance; itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty; itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty itemDetail.balance.stdPackQty = result.package.stdPackQty
@ -272,8 +282,8 @@
}); });
} else { } else {
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance itemDetail.handleQty = Number(result.balance.qty) ;
.qty) ? Number(result.balance.qty) : Number(result.label.qty); itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance; itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty; itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty itemDetail.balance.stdPackQty = result.package.stdPackQty
@ -324,21 +334,35 @@
title: "提交中....", title: "提交中....",
mask: true mask: true
}); });
this.managementList = [];
//
// this.detailSource.forEach(item => {
// item.subList.forEach(detail => {
// if (detail.scaned) {
// getManagementPrecisions(item.itemCode,detail.toLocationCode,res=>{
// if (res.success) {
// this.managementList = this.managementList.concat(res.list)
// }
// })
// }
// })
// })
var params = this.setParams(); var params = this.setParams();
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
// inventoryMoveSubmit(params).then(res => { inventoryMoveSubmit(params).then(res => {
// uni.hideLoading() uni.hideLoading()
// if (res.data) { if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data) this.showCommitSuccessMessage("提交成功<br>生成库存转移记录<br>" + res.data)
// } else { } else {
// this.showErrorMessage("[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
// } }
// }).catch(error => { }).catch(error => {
// uni.hideLoading() uni.hideLoading()
// this.showErrorMessage(error) this.showErrorMessage(error)
// }) })
}, },
setParams() { setParams() {
@ -348,6 +372,13 @@
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
// var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
// detail.packingNumber, detail.batch);
detail.toPackingNumber = detail.packingNumber;
detail.toBatch = detail.batch;
detail.toContainerNumber = '';
detail.toLocationCode = detail.toLocationCode;
subList.push(detail) subList.push(detail)
} }
}) })
@ -420,6 +451,7 @@
}) })
}, },
} }
} }
</script> </script>

2
static/config.json

@ -35,7 +35,7 @@
"isDevelopment": { "isDevelopment": {
"name": "isDevelopment", "name": "isDevelopment",
"value": true, "value": true,
"desc": "是否是开发模式,true是开模式,false不是开发模式" "desc": "是否是开发模式,true是开模式,false不是开发模式"
} }

Loading…
Cancel
Save