Browse Source

调拨出入库记录

wms3.0_pda
lijuncheng 11 months ago
parent
commit
4de47fa58c
  1. 2
      mycomponents/balance/purchaseLabel.vue
  2. 103
      pages/transfer/coms/comTransferRecord.vue
  3. 2
      pages/transfer/record/deliverRecord.vue
  4. 2
      pages/unPlanned/coms/comReceiptRecord.vue
  5. 24
      pages/unPlanned/record/issueRecord.vue
  6. 120
      pages/unPlanned/record/receiptRecord.vue
  7. 2
      static/config.json

2
mycomponents/balance/purchaseLabel.vue

@ -2,7 +2,7 @@
<view :class="dataContent.scaned?'scan_view':''"> <view :class="dataContent.scaned?'scan_view':''">
<balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack" <balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack"
:isShowLocation="isShowLocation"></balance> :isShowLocation="isShowLocation"></balance>
<purchase-info :dataContent="packageContent"></purchase-info> <!-- <purchase-info :dataContent="packageContent"></purchase-info> -->
</view> </view>
</template> </template>

103
pages/transfer/coms/comTransferRecord.vue

@ -1,16 +1,15 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
<com-blank-view @goScan='getLocation' v-if="fromLocationCode==''"></com-blank-view> <com-blank-view @goScan='showFromLocationPopup' v-if="fromLocationCode==''"></com-blank-view>
</view> </view>
<view class="page-wraper" v-if="fromLocationCode!=''"> <view class="page-wraper" v-if="fromLocationCode!=''">
<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">
<view class=""> <view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="jobContent" <record-com-detail-card :dataContent="item" :index="index" :isShowLocation="true"
:isShowLocation="true" @removeItem="removeItem(index,item)" @updateData="updateData" @removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
@removePack="removePack">
</record-com-detail-card> </record-com-detail-card>
</view> </view>
<u-line /> <u-line />
@ -18,8 +17,6 @@
</scroll-view> </scroll-view>
</view> </view>
<view class="page-footer"> <view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10" <view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
@ -44,7 +41,6 @@
</template> </template>
<script> <script>
import { import {
transferIssueRecordSubmit, transferIssueRecordSubmit,
transferReceiptRecordSubmit transferReceiptRecordSubmit
@ -99,37 +95,27 @@
data() { data() {
return { return {
id: '', id: '',
receiptJob: {},
received: false,
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
locationTypeList: [], locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
fromLocationInfo: {},
fromLocationCode: "", fromLocationCode: "",
toLocationInfo: {},
toLocationCode: "", toLocationCode: "",
isShowLocation: false,
fromlocationTypeList: [], fromlocationTypeList: [],
tolocationTypeList: [], tolocationTypeList: [],
allowModifyLocation: false,
inInventoryStatus: "", // inInventoryStatus: "", //
outInventoryStatus: "", // outInventoryStatus: "", //
businessType: {}, businessType: {},
managementList:[], managementList: [],
dataContent: {} dataContent: {},
toWarehouseCode:''
}; };
}, },
mounted(option) { mounted(option) {
var typeCode ="" var typeCode = ""
if(this.transferType=="Transfer"){ if (this.transferType == "TransferDeliver") {
typeCode = "Transfer" typeCode = "TransferDeliver"
}else if(this.transferType=="TransferReceipt"){ } else if (this.transferType == "TransferReceipt") {
typeCode = "TransferReceipt" typeCode = "TransferReceipt"
} }
@ -140,7 +126,7 @@
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.$refs.comMessage.showBreakMessage(res.message ); this.showErrorMessage(res.message)
} }
}); });
@ -254,11 +240,12 @@
}, },
commit() { commit() {
if (this.toLocationCode == "") { if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位") this.showMessage("请先选择目标库位")
return; return;
} }
if(this.detailSource.length > 0 && this.detailSource[0].subList.length > 0){ if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
// //
uni.showLoading({ uni.showLoading({
title: "提交中....", title: "提交中....",
@ -272,7 +259,7 @@
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))
if(this.transferType=="Transfer"){ if (this.transferType == "TransferDeliver") {
transferIssueRecordSubmit(params).then(res => { transferIssueRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
@ -284,18 +271,18 @@
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><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 { } else {
@ -305,29 +292,30 @@
}) })
}else { } else {
this.showErrorMessage("没有要提交的数据,请先扫描") this.showErrorMessage("没有要提交的数据,请先扫描")
} }
}, },
setPrecisionStrategParams(){ setPrecisionStrategParams() {
var itemList = [] var itemList = []
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
detail.toLocationCode = this.toLocationCode;
var filterResult = itemList.filter(res => { var filterResult = itemList.filter(res => {
if (res.itemCode == item.itemCode if (res.itemCode == item.itemCode &&
&&res.locationCode == detail.locationCode) { detail.toLocationCode == res.locationCode) {
return res return res
} }
}) })
// //
if(filterResult.length==0){ if (filterResult.length == 0) {
var result = { var result = {
itemCode: item.itemCode, itemCode: item.itemCode,
locationCode: detail.locationCode locationCode: detail.toLocationCode
} }
itemList.push(result) itemList.push(result)
} }
@ -346,9 +334,12 @@
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode, var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.locationCode, detail.batch); detail.packingNumber, detail.toLocationCode, detail.batch);
detail.itemCode = detail.itemCode; detail.itemCode = detail.itemCode;
detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
detail.inventoryStatus = detail.inventoryStatus; detail.inventoryStatus = detail.inventoryStatus;
detail.fromPackingNumber = info.packingNumber; detail.fromPackingNumber = info.packingNumber;
@ -357,19 +348,20 @@
detail.fromContainerNumber = detail.containerNumber; detail.fromContainerNumber = detail.containerNumber;
detail.toContainerNumber = detail.containerNumber detail.toContainerNumber = detail.containerNumber
detail.fromBatch =info.batch; detail.fromBatch = info.batch;
detail.toBatch = info.batch; detail.toBatch = info.batch;
detail.fromLocationCode = detail.locationCode; detail.fromLocationCode = detail.locationCode;
detail.toLocationCode = detail.locationCode; detail.toLocationCode = detail.toLocationCode;
subList.push(detail) subList.push(detail)
} }
}) })
}) })
this.dataContent.subList =subList; this.dataContent.subList = subList;
this.dataContent.creator =creator; this.dataContent.creator = creator;
this.dataContent.fromWarehouseCode = this.detailSource[0].subList[0].warehouseCode;
this.dataContent.toWarehouseCode = this.toWarehouseCode;
return this.dataContent; return this.dataContent;
}, },
@ -402,11 +394,11 @@
this.getFromLocationCode(location, code) this.getFromLocationCode(location, code)
}, },
getFromLocationCode(location, code) { getFromLocationCode(location, code) {
this.fromLocationInfo = location;
this.fromLocationCode = code; this.fromLocationCode = code;
this.openScanPopup(); this.openScanPopup();
}, },
getToLocationCode(location, code) { getToLocationCode(location, code) {
this.toWarehouseCode =location.warehouseCode
// if (this.fromLocationCode == code) { // if (this.fromLocationCode == code) {
// uni.showToast({ // uni.showToast({
// title: "[" + this.fromLocationCode + "][" + code + "]", // title: "[" + this.fromLocationCode + "][" + code + "]",
@ -420,6 +412,11 @@
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.fromLocationCode = ''; this.fromLocationCode = '';
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {}
this.toWarehouseCode = ""
}) })
}, },

2
pages/transfer/record/deliverRecord.vue

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

2
pages/unPlanned/coms/comReceiptRecord.vue

@ -21,7 +21,7 @@
</purchase-label> </purchase-label>
</uni-swipe-action-item> </uni-swipe-action-item>
</uni-swipe-action> </uni-swipe-action>
<u-line color="#D8D8D8"></u-line> <!-- <u-line color="#D8D8D8"></u-line> -->
</view> </view>
</uni-collapse-item> </uni-collapse-item>
</uni-collapse> </uni-collapse>

24
pages/unPlanned/record/issueRecord.vue

@ -93,7 +93,6 @@
data() { data() {
return { return {
fromLocationCode: "", fromLocationCode: "",
fromLocationInfo: {},
fromLocationTypeArray: [], fromLocationTypeArray: [],
fromInventoryStatus: [], fromInventoryStatus: [],
toInventoryStatus: [], toInventoryStatus: [],
@ -113,7 +112,7 @@
this.fromLocationTypeArray = res.fromlocationTypeList; this.fromLocationTypeArray = res.fromlocationTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.$refs.comMessage.showBreakMessage(res.message); this.showErrorMessage(res.message)
} }
}); });
}, },
@ -139,7 +138,6 @@
this.getfromLocationCode(location) this.getfromLocationCode(location)
}, },
getfromLocationCode(location) { getfromLocationCode(location) {
this.fromLocationInfo = location;
this.fromLocationCode = location.code; this.fromLocationCode = location.code;
this.openScanPopup(); this.openScanPopup();
}, },
@ -236,8 +234,24 @@
if (detail.scaned) { if (detail.scaned) {
// var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, // var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
// detail.packingNumber, detail.batch); // detail.packingNumber, detail.batch);
// detail.toPackingNumber =info.packingNumber; detail.itemCode = detail.itemCode;
// detail.toBatch =info.batch; detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
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.toLocationCode;
subList.push(detail) subList.push(detail)
} }
}) })

120
pages/unPlanned/record/receiptRecord.vue

@ -22,12 +22,13 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation>
<view class="page-footer"> <view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10" <view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
<view class=""> <view class="">
<requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -66,11 +67,11 @@
import { import {
goHome, goHome,
updateTitle, updateTitle,
getPackingNumberAndBatch getPackingNumberAndBatchByList
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
getManagementPrecisions getPrecisionStrategyList
} from '@/common/balance.js'; } from '@/common/balance.js';
@ -99,7 +100,8 @@
reason: "", reason: "",
reasonList: [], reasonList: [],
showToLoaction:true, showToLoaction:true,
dataContent:{} dataContent:{},
managementList:[]
} }
}, },
@ -112,7 +114,7 @@
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.openScanPopup(); this.openScanPopup();
} else { } else {
this.$refs.comMessage.showBreakMessage(res.message); this.showErrorMessage(res.message)
} }
}); });
}, },
@ -125,7 +127,6 @@
this.$refs.scanPopup.openScanPopup(); this.$refs.scanPopup.openScanPopup();
}, },
getToLocationCode(location, code) { getToLocationCode(location, code) {
this.toLocationCodeInfo = location;
this.toLocationCode = code; this.toLocationCode = code;
}, },
getScanResult(result) { getScanResult(result) {
@ -188,6 +189,7 @@
label.inventoryStatus = "OK"; label.inventoryStatus = "OK";
detail.package = pack; detail.package = pack;
detail.label = label; detail.label = label;
detail.label.scaned = true
return detail; return detail;
}, },
@ -236,69 +238,111 @@
return; return;
} }
//
var itemCodes = [] if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
this.detailSource.forEach(item => { //
itemCodes.push(item.itemCode) uni.showLoading({
}) title: "提交中....",
// mask: true
getManagementPrecisions(itemCodes, this.toLocationCode, res => { });
this.managementList = [];
var precisionStrategParams = this.setPrecisionStrategParams()
getPrecisionStrategyList(precisionStrategParams, res => {
if (res.success) { if (res.success) {
this.managementList = res.list; this.managementList = res.list;
var params = this.setParams(true) var params = this.setParams()
console.log("提交参数", JSON.stringify(params)); debugger
console.log("提交" + JSON.stringify(params))
// unPlannedReceiptRecordbSubmit(params).then(res => { // unPlannedReceiptRecordbSubmit(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 { } else {
uni.hideLoading(); uni.hideLoading();
this.showErrorMessage(res.message); this.showErrorMessage(res.message);
} }
});
})
}else {
this.showErrorMessage("没有要提交的数据,请先扫描")
}
},
setPrecisionStrategParams() {
var itemList = []
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
detail.toLocationCode = this.toLocationCode;
var filterResult = itemList.filter(res => {
if (res.itemCode == item.itemCode &&
detail.toLocationCode == res.locationCode) {
return res
}
})
//
if (filterResult.length == 0) {
var result = {
itemCode: item.itemCode,
locationCode: detail.toLocationCode
}
itemList.push(result)
}
}
})
})
return itemList;
}, },
setParams(queryModel) { setParams() {
var subList = [] var subList = []
var creator = this.$store.state.user.id 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 subItem = {}; var info = getPackingNumberAndBatchByList(this.managementList, detail.label.itemCode,
// Object.assign(subItem, detail) detail.label.packingNumber, detail.toLocationCode, detail.label.batch);
if (queryModel) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, detail.itemCode = detail.package.itemCode;
detail.packingNumber, detail.batch); detail.itemName = detail.package.itemName;
detail.toPackingNumber = info.packingNumber;; detail.itemDesc1 = detail.package.itemDesc1;
detail.toContainerNumber = detail.containerNumber detail.itemDesc2 = detail.package.itemDesc2;
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.toBatch = info.batch;
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = this.toLocationCode detail.fromLocationCode = "";
} else { detail.toLocationCode = detail.toLocationCode;
detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber
detail.toBatch = detail.toBatch;
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = ""
}
subList.push(detail) subList.push(detail)
} }
}) })
}) })
this.dataContent.subList = subList this.dataContent.subList = subList;
this.dataContent.creator = creator; this.dataContent.creator = creator;
return this.dataContent; return this.dataContent;
}, },
} }
} }
</script> </script>

2
static/config.json

@ -18,7 +18,7 @@
"request_url": { "request_url": {
"name": "request_url", "name": "request_url",
"value": "http://192.168.0.180:12080/admin-api", "value": "http://192.168.0.106: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