Browse Source

调拨出入库记录

wms3.0_pda
lijuncheng 11 months ago
parent
commit
4de47fa58c
  1. 2
      mycomponents/balance/purchaseLabel.vue
  2. 145
      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. 152
      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':''">
<balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack"
:isShowLocation="isShowLocation"></balance>
<purchase-info :dataContent="packageContent"></purchase-info>
<!-- <purchase-info :dataContent="packageContent"></purchase-info> -->
</view>
</template>

145
pages/transfer/coms/comTransferRecord.vue

@ -1,16 +1,15 @@
<template>
<view class="page-wraper">
<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 class="page-wraper" v-if="fromLocationCode!=''">
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
:isShowLocation="true" @removeItem="removeItem(index,item)" @updateData="updateData"
@removePack="removePack">
<record-com-detail-card :dataContent="item" :index="index" :isShowLocation="true"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</view>
<u-line />
@ -18,8 +17,6 @@
</scroll-view>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
@ -44,7 +41,6 @@
</template>
<script>
import {
transferIssueRecordSubmit,
transferReceiptRecordSubmit
@ -52,17 +48,17 @@
import {
getPrecisionStrategyList
} from '@/common/balance.js';
import {
goHome,
getPackingNumberAndBatchByList
} from '@/common/basic.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/directory.js';
import {
getBusinessType,
createItemInfo,
@ -78,7 +74,7 @@
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
export default {
components: {
winScanButton,
@ -99,40 +95,30 @@
data() {
return {
id: '',
receiptJob: {},
received: false,
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
subList: [], //subList
detailSource: [], //
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
fromLocationInfo: {},
fromLocationCode: "",
toLocationInfo: {},
toLocationCode: "",
isShowLocation: false,
fromlocationTypeList: [],
tolocationTypeList: [],
allowModifyLocation: false,
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {},
managementList:[],
dataContent: {}
managementList: [],
dataContent: {},
toWarehouseCode:''
};
},
mounted(option) {
var typeCode =""
if(this.transferType=="Transfer"){
typeCode = "Transfer"
}else if(this.transferType=="TransferReceipt"){
typeCode = "TransferReceipt"
var typeCode = ""
if (this.transferType == "TransferDeliver") {
typeCode = "TransferDeliver"
} else if (this.transferType == "TransferReceipt") {
typeCode = "TransferReceipt"
}
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
@ -140,7 +126,7 @@
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message );
this.showErrorMessage(res.message)
}
});
@ -254,11 +240,12 @@
},
commit() {
if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
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({
title: "提交中....",
@ -272,7 +259,7 @@
this.managementList = res.list;
var params = this.setParams()
console.log("提交" + JSON.stringify(params))
if(this.transferType=="Transfer"){
if (this.transferType == "TransferDeliver") {
transferIssueRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
@ -284,92 +271,97 @@
uni.hideLoading()
this.showErrorMessage(error)
})
}else if(this.transferType=="TransferReceipt"){
// transferReceiptRecordSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// this.showCommitSuccessMessage("<br><br>" + res.data)
// } else {
// this.showErrorMessage("[" + res.msg + "]")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
} else if (this.transferType == "TransferReceipt") {
transferReceiptRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成调拨入库记录<br>" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
}
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
})
}else {
} else {
this.showErrorMessage("没有要提交的数据,请先扫描")
}
},
setPrecisionStrategParams(){
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
&&res.locationCode == detail.locationCode) {
if (res.itemCode == item.itemCode &&
detail.toLocationCode == res.locationCode) {
return res
}
})
//
if(filterResult.length==0){
if (filterResult.length == 0) {
var result = {
itemCode: item.itemCode,
locationCode: detail.locationCode
locationCode: detail.toLocationCode
}
itemList.push(result)
}
}
})
})
return itemList;
},
setParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.locationCode, detail.batch);
detail.packingNumber, detail.toLocationCode, detail.batch);
detail.itemCode = detail.itemCode;
detail.inventoryStatus = detail.inventoryStatus;
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.fromBatch = info.batch;
detail.toBatch = info.batch;
detail.fromLocationCode = detail.locationCode;
detail.toLocationCode = detail.locationCode;
detail.toLocationCode = detail.toLocationCode;
subList.push(detail)
}
})
})
this.dataContent.subList =subList;
this.dataContent.creator =creator;
this.dataContent.subList = subList;
this.dataContent.creator = creator;
this.dataContent.fromWarehouseCode = this.detailSource[0].subList[0].warehouseCode;
this.dataContent.toWarehouseCode = this.toWarehouseCode;
return this.dataContent;
},
@ -402,11 +394,11 @@
this.getFromLocationCode(location, code)
},
getFromLocationCode(location, code) {
this.fromLocationInfo = location;
this.fromLocationCode = code;
this.openScanPopup();
},
getToLocationCode(location, code) {
this.toWarehouseCode =location.warehouseCode
// if (this.fromLocationCode == code) {
// uni.showToast({
// title: "[" + this.fromLocationCode + "][" + code + "]",
@ -420,6 +412,11 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.fromLocationCode = '';
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {}
this.toWarehouseCode = ""
})
},

2
pages/transfer/record/deliverRecord.vue

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

2
pages/unPlanned/coms/comReceiptRecord.vue

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

24
pages/unPlanned/record/issueRecord.vue

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

152
pages/unPlanned/record/receiptRecord.vue

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

2
static/config.json

@ -18,7 +18,7 @@
"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",
"chefang": "http://192.168.0.180:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api",

Loading…
Cancel
Save