Browse Source

库存转移任务

wms3.0_pda
lijuncheng 12 months ago
parent
commit
7c1667420a
  1. 3
      pages/inventoryMove/job/inventoryMoveDetail.vue
  2. 132
      pages/transfer/coms/comTransferRecord.vue
  3. 2
      pages/transfer/record/deliverRecord.vue
  4. 2
      static/config.json

3
pages/inventoryMove/job/inventoryMoveDetail.vue

@ -351,6 +351,7 @@
getPrecisionStrategyList(precisionStrategParams, res => { getPrecisionStrategyList(precisionStrategParams, res => {
if (res.success) { if (res.success) {
this.managementList = res.list; this.managementList = 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 => {
@ -380,7 +381,7 @@
if (detail.scaned) { if (detail.scaned) {
var filterResult = itemList.filter(res => { var filterResult = itemList.filter(res => {
if (res.itemCode == item.itemCode if (res.itemCode == item.itemCode
&&res.locationCode == detail.locationCode) { &&res.locationCode == detail.toLocationCode) {
return res return res
} }
}) })

132
pages/transfer/coms/comTransferRecord.vue

@ -49,9 +49,13 @@
transferIssueRecordSubmit, transferIssueRecordSubmit,
transferReceiptRecordSubmit transferReceiptRecordSubmit
} from '@/api/request2.js'; } from '@/api/request2.js';
import {
getPrecisionStrategyList
} from '@/common/balance.js';
import { import {
goHome, goHome,
getPackingNumberAndBatchByList
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
@ -116,12 +120,15 @@
inInventoryStatus: "", // inInventoryStatus: "", //
outInventoryStatus: "", // outInventoryStatus: "", //
businessType: {}, businessType: {},
managementList:[],
dataContent: {}
}; };
}, },
mounted(option) { mounted(option) {
var typeCode ="" var typeCode =""
if(this.transferType=="TransferDeliver"){ if(this.transferType=="Transfer"){
typeCode = "TransferDeliver" typeCode = "Transfer"
}else if(this.transferType=="TransferReceipt"){ }else if(this.transferType=="TransferReceipt"){
typeCode = "TransferReceipt" typeCode = "TransferReceipt"
} }
@ -251,32 +258,37 @@
this.showMessage("请先选择目标库位") this.showMessage("请先选择目标库位")
return; return;
} }
// if(this.detailSource.length > 0 && this.detailSource[0].subList.length > 0){
//
uni.showLoading({ uni.showLoading({
title: "提交中....", title: "提交中....",
mask: true mask: true
}); });
this.managementList = [];
var precisionStrategParams = this.setPrecisionStrategParams()
var params = this.setParams(); getPrecisionStrategyList(precisionStrategParams, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
if(this.transferType=="transferIssue"){ if(this.transferType=="Transfer"){
// transferIssueRecordSubmit(params).then(res => { transferIssueRecordSubmit(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)
// }) })
}else if(this.transferType=="TransferReceipt"){
}else if(this.transferType=="transferReceipt"){
// transferReceiptRecordSubmit(params).then(res => { // transferReceiptRecordSubmit(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 + "]")
// } // }
@ -284,24 +296,81 @@
// uni.hideLoading() // uni.hideLoading()
// this.showErrorMessage(error) // this.showErrorMessage(error)
// }) // })
}
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
})
}else {
this.showErrorMessage("没有要提交的数据,请先扫描")
}
},
setPrecisionStrategParams(){
var itemList = []
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var filterResult = itemList.filter(res => {
if (res.itemCode == item.itemCode
&&res.locationCode == detail.locationCode) {
return res
} }
})
//
if(filterResult.length==0){
var result = {
itemCode: item.itemCode,
locationCode: detail.locationCode
}
itemList.push(result)
}
}
})
})
return itemList;
}, },
setParams() { setParams() {
var subList = [] var subList = []
var creator = this.$store.state.user.id
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, var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
// detail.packingNumber, detail.batch); detail.packingNumber, detail.locationCode, detail.batch);
// detail.toPackingNumber =info.packingNumber;
// detail.toBatch =info.batch; detail.itemCode = detail.itemCode;
detail.inventoryStatus = detail.inventoryStatus;
detail.fromPackingNumber = info.packingNumber;
detail.toPackingNumber = info.packingNumber;
detail.fromContainerNumber = detail.containerNumber;
detail.toContainerNumber = detail.containerNumber
detail.fromBatch =info.batch;
detail.toBatch = info.batch;
detail.fromLocationCode = detail.locationCode;
detail.toLocationCode = detail.locationCode;
subList.push(detail) subList.push(detail)
} }
}) })
}) })
return subList; this.dataContent.subList =subList;
this.dataContent.creator =creator;
return this.dataContent;
}, },
@ -338,14 +407,13 @@
this.openScanPopup(); this.openScanPopup();
}, },
getToLocationCode(location, code) { getToLocationCode(location, code) {
if (this.fromLocationCode == code) { // if (this.fromLocationCode == code) {
uni.showToast({ // uni.showToast({
title: "来源库位[" + this.fromLocationCode + "]不能与目标库位[" + code + "]一致", // title: "[" + this.fromLocationCode + "][" + code + "]",
duration: 2000 // duration: 2000
}) // })
return // return
} // }
this.ToLocationCodeInfo = location;
this.toLocationCode = code; this.toLocationCode = code;
}, },

2
pages/transfer/record/deliverRecord.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<comTransferRecord transferType="TransferDeliver"> </comTransferRecord> <comTransferRecord transferType="Transfer"> </comTransferRecord>
</view> </view>
</template> </template>

2
static/config.json

@ -18,7 +18,7 @@
"request_url": { "request_url": {
"name": "request_url", "name": "request_url",
"value": "http://192.168.0.159:12080/admin-api", "value": "http://192.168.0.180:12080/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api", "dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.180:12080/admin-api", "chefang": "http://192.168.0.180:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api", "chenxinming": "http://192.168.0.230:12080/admin-api",

Loading…
Cancel
Save