Browse Source

修改库存转移类型

wms3.0_pda
lijuncheng 11 months ago
parent
commit
f877c7cfee
  1. 4
      api/request2.js
  2. 12
      pages/inventoryMove/coms/comMove.vue
  3. 10
      pages/inventoryMove/coms/comMoveJob.vue
  4. 2
      pages/inventoryMove/job/HoldToScrapMoveJob.vue
  5. 2
      pages/inventoryMove/job/OktoScrapMoveJob.vue
  6. 2
      pages/inventoryMove/job/holdToOkMoveJob.vue
  7. 2
      pages/inventoryMove/job/okToHoldMoveJob.vue
  8. 2
      pages/inventoryMove/record/holdToOkRecord.vue
  9. 2
      pages/inventoryMove/record/holdToScrapRecord.vue
  10. 2
      pages/inventoryMove/record/moveFreeRecord.vue
  11. 2
      pages/inventoryMove/record/okToHoldRecord.vue
  12. 2
      pages/inventoryMove/record/oktoScrapRecord.vue
  13. 2
      pages/inventoryMove/record/scrapToHoldRecord.vue
  14. 104
      pages/issue/record/issueRecord.vue
  15. 2
      pages/repleinsh/coms/comRepleinshRequestPopup.vue
  16. 175
      pages/repleinsh/record/repleinshRecord.vue
  17. 2
      static/config.json

4
api/request2.js

@ -2962,8 +2962,8 @@ export function repleinshRequestSubmit(params) {
*/ */
export function repleinshRecordSubmit(params) { export function repleinshRecordSubmit(params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/putaway/jobSubmit", url: baseApi + "/wms/repleinsh-record-main/create",
method: "put", method: "post",
data: params, data: params,
}); });
} }

12
pages/inventoryMove/coms/comMove.vue

@ -143,22 +143,22 @@
methods: { methods: {
updateTitle() { updateTitle() {
if(this.businessTypeCode=="InventoryMoveRecord"){ if(this.businessTypeCode=="InventoryMove"){
this.title = "库存转移记录"; this.title = "库存转移记录";
this.toInventoryStatus = "OK" this.toInventoryStatus = "OK"
}else if(this.businessTypeCode=="HoldToOkRecord"){ }else if(this.businessTypeCode=="HoldToOk"){
this.title = "隔离转合格记录"; this.title = "隔离转合格记录";
this.toInventoryStatus = "OK" this.toInventoryStatus = "OK"
}else if(this.businessTypeCode=="HoldToScrapRecord"){ }else if(this.businessTypeCode=="HoldToScrap"){
this.title = "隔离转报废记录"; this.title = "隔离转报废记录";
this.toInventoryStatus = "SCRAP" this.toInventoryStatus = "SCRAP"
}else if(this.businessTypeCode=="OkToHoldRecord"){ }else if(this.businessTypeCode=="OkToHold"){
this.title = "合格转隔离记录"; this.title = "合格转隔离记录";
this.toInventoryStatus ="HOLD" this.toInventoryStatus ="HOLD"
}else if(this.businessTypeCode=="OktoScrapRecord"){ }else if(this.businessTypeCode=="OktoScrap"){
this.title = "合格转报废记录"; this.title = "合格转报废记录";
this.toInventoryStatus ="SCRAP" this.toInventoryStatus ="SCRAP"
}else if(this.businessTypeCode=="ScrapToHoldRecord"){ }else if(this.businessTypeCode=="ScrapToHold"){
this.title = "报废转隔离记录"; this.title = "报废转隔离记录";
this.toInventoryStatus ="HOLD" this.toInventoryStatus ="HOLD"
} }

10
pages/inventoryMove/coms/comMoveJob.vue

@ -114,15 +114,15 @@
var name = "" var name = ""
if (this.businessTypeCode == "Move") { if (this.businessTypeCode == "Move") {
name = "库存转移"; name = "库存转移";
} else if (this.businessTypeCode == "HoldToOkJob") { } else if (this.businessTypeCode == "HoldToOk") {
name = "隔离转合格"; name = "隔离转合格";
} else if (this.businessTypeCode == "HoldToScrapJob") { } else if (this.businessTypeCode == "HoldToScrap") {
name = "隔离转报废"; name = "隔离转报废";
} else if (this.businessTypeCode == "OkToHoldJob") { } else if (this.businessTypeCode == "OkToHold") {
name = "合格转隔离"; name = "合格转隔离";
} else if (this.businessTypeCode == "OktoScrapJob") { } else if (this.businessTypeCode == "OktoScrap") {
name = "合格转报废"; name = "合格转报废";
} else if (this.businessTypeCode == "ScrapToHoldJob") { } else if (this.businessTypeCode == "ScrapToHold") {
name = "报废转隔离"; name = "报废转隔离";
} }

2
pages/inventoryMove/job/HoldToScrapMoveJob.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<comMoveJob ref="comMoveJob" businessTypeCode='HoldToScrapJob'> </comMoveJob> <comMoveJob ref="comMoveJob" businessTypeCode='HoldToScrap'> </comMoveJob>
</view> </view>
</template> </template>

2
pages/inventoryMove/job/OktoScrapMoveJob.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<comMoveJob ref="comMoveJob" businessTypeCode='OktoScrapJob'> </comMoveJob> <comMoveJob ref="comMoveJob" businessTypeCode='OktoScrap'> </comMoveJob>
</view> </view>
</template> </template>

2
pages/inventoryMove/job/holdToOkMoveJob.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<comMoveJob ref="comMoveJob" businessTypeCode='HoldToOkJob'> </comMoveJob> <comMoveJob ref="comMoveJob" businessTypeCode='HoldToOk'> </comMoveJob>
</view> </view>
</template> </template>

2
pages/inventoryMove/job/okToHoldMoveJob.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<comMoveJob ref="comMoveJob" businessTypeCode='OkToHoldJob'> </comMoveJob> <comMoveJob ref="comMoveJob" businessTypeCode='OkToHold'> </comMoveJob>
</view> </view>
</template> </template>

2
pages/inventoryMove/record/holdToOkRecord.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<comMove businessTypeCode='HoldToOkRecord' > </comMove> <comMove businessTypeCode='HoldToOk' > </comMove>
</view> </view>
</template> </template>

2
pages/inventoryMove/record/holdToScrapRecord.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<comMove businessTypeCode='HoldToScrapRecord'> </comMove> <comMove businessTypeCode='HoldToScrap'> </comMove>
</view> </view>
</template> </template>

2
pages/inventoryMove/record/moveFreeRecord.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<comMove :allowEditStatus="true" businessTypeCode='InventoryMoveRecord'> </comMove> <comMove :allowEditStatus="true" businessTypeCode='Move'> </comMove>
</view> </view>
</template> </template>

2
pages/inventoryMove/record/okToHoldRecord.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<comMove businessTypeCode='OkToHoldRecord' > </comMove> <comMove businessTypeCode='OkToHold' > </comMove>
</view> </view>
</template> </template>

2
pages/inventoryMove/record/oktoScrapRecord.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<comMove businessTypeCode='OktoScrapRecord' > </comMove> <comMove businessTypeCode='OktoScrap' > </comMove>
</view> </view>
</template> </template>

2
pages/inventoryMove/record/scrapToHoldRecord.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<comMove businessTypeCode='ScrapToHoldRecord'> </comMove> <comMove businessTypeCode='ScrapToHold'> </comMove>
</view> </view>
</template> </template>

104
pages/issue/record/issueRecord.vue

@ -48,6 +48,8 @@
updateTitle, updateTitle,
getRemoveOption, getRemoveOption,
getISODateTime, getISODateTime,
getCurrDateTime,
getPackingNumberAndBatch
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
@ -57,6 +59,10 @@
getBusinessType, getBusinessType,
} from '@/common/record.js'; } from '@/common/record.js';
import {
getManagementPrecisions
} from '@/common/balance.js';
import comBlankView from '@/mycomponents/common/comBlankView.vue' import comBlankView from '@/mycomponents/common/comBlankView.vue'
import comIssueRequestPopup from '@/pages/issue/coms/comIssueRequestPopup.vue' import comIssueRequestPopup from '@/pages/issue/coms/comIssueRequestPopup.vue'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
@ -92,6 +98,8 @@
fromInventoryStatuses: "", fromInventoryStatuses: "",
toInventoryStatuses: "", toInventoryStatuses: "",
requestList: [], requestList: [],
dataContent:{},
managementList:[]
} }
}, },
mounted() { mounted() {
@ -246,7 +254,57 @@
}, },
setParams() { setParams() {
return this.detailSource var subList = []
var createTime = getCurrDateTime();
var creator = this.$store.state.user.id
this.detailSource.forEach(toLocationCode => {
toLocationCode.Items.forEach(item => {
item.Locations.forEach(fromLocation => {
fromLocation.Batchs.forEach(batch => {
let subItem = batch.detail;
subItem.recordList = [];
if (batch.Records.length > 0) {
batch.Records.forEach(r => {
let record = {};
record.handleQty = r.qty;
record.fromPackingNumber = r
.packingNumber;
record.fromBatch = r.batch;
record.fromContainerNumber = r
.ContainerNumber;
record.toContainerNumber = r
.ContainerNumber;
record.toInventoryStatus = r
.inventoryStatus;
record.toLocationCode = subItem
.toLocationCode;
record.fromLocationCode = fromLocation.fromLocationCode
record.supplierCode = r.supplierCode;
//使
var info = getPackingNumberAndBatch(
this.managementList, r
.itemCode,
r.packingNumber, r
.batch);
record.toPackingNumber = info
.packingNumber;
record.toBatch = info.batch;
subItem.recordList.push(record);
})
subList.push(subItem);
}
})
})
})
})
this.dataContent.subList = subList
this.dataContent.createTime = createTime;
this.dataContent.creator = creator;
return this.dataContent;
}, },
submit() { submit() {
uni.showLoading({ uni.showLoading({
@ -254,32 +312,58 @@
mask: true mask: true
}); });
//
var itemCodes = []
let locationCode = this.detailSource[0].toLocationCode
this.detailSource.forEach(toLocation => {
toLocation.Items.forEach(item => {
itemCodes.push(item.itemCode)
})
})
//
getManagementPrecisions(itemCodes, locationCode, res => {
if (res.success) {
this.managementList = res.list;
this.submitJob();
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
});
},
submitJob() {
var params = this.setParams() var params = this.setParams()
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
issueRecordSubmit(params).then(res => { issueRecordSubmit(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)
}) })
}, },
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
if (this.fromType == "requestType") { this.clearData();
uni.navigateTo({
url: './issueRequest'
})
}
}) })
}, },
clearData(){
this.detailSource =[];
this.requestList=[];
this.dataContent ={}
this.managementList=[]
},
showMessage(message) { showMessage(message) {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) { if (res) {

2
pages/repleinsh/coms/comRepleinshRequestPopup.vue

@ -145,7 +145,7 @@
// } // }
this.$refs.popup.open('bottom'); this.$refs.popup.open('bottom');
this.showScanLocation(); // this.showScanLocation();
}, },
closeRequestPopup() { closeRequestPopup() {
this.$refs.popup.close() this.$refs.popup.close()

175
pages/repleinsh/record/repleinshRecord.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view> <com-blank-view @goScan='showRequestPopup' v-if="detailSource.length==0"></com-blank-view>
</view> </view>
<view class="page-wraper" v-if="detailSource.length>0"> <view class="page-wraper" v-if="detailSource.length>0">
<view class="page-main"> <view class="page-main">
@ -44,7 +44,6 @@
<script> <script>
import { import {
repleinshRequestSubmit,
repleinshRecordSubmit, repleinshRecordSubmit,
getBalanceByBatchOffShelf getBalanceByBatchOffShelf
} from '@/api/request2.js'; } from '@/api/request2.js';
@ -52,7 +51,7 @@
import { import {
goHome, goHome,
updateTitle, updateTitle,
getCurrDateTime
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
@ -77,6 +76,10 @@
getDataSource getDataSource
} from '@/pages/issue/js/issue.js'; } from '@/pages/issue/js/issue.js';
import {
getManagementPrecisions
} from '@/common/balance.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
@ -107,32 +110,22 @@
return { return {
id: '', id: '',
receiptJob: {}, receiptJob: {},
received: false,
isShowPackingCode: true,
scanCount: 0,
dataContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
locationTypeList: [], locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
fromLocationInfo: {},
fromLocationCode: "", fromLocationCode: "",
toLocationInfo: {},
toLocationCode: "", toLocationCode: "",
isShowLocation: false,
fromlocationTypeList: [], fromlocationTypeList: [],
tolocationTypeList: [], tolocationTypeList: [],
allowModifyLocation: false, allowModifyLocation: false,
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {}, businessType: {},
fromType: "",
requestList: [], requestList: [],
managementList: [],
dataContent: {}
}; };
}, },
onLoad(option) { onLoad(option) {
this.fromType = option.fromType
var typeCode = "Repleinment" var typeCode = "Repleinment"
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
@ -303,9 +296,6 @@
this.$forceUpdate(); this.$forceUpdate();
}, },
removeItem(index, item) { removeItem(index, item) {
this.detailSource.splice(index, 1) this.detailSource.splice(index, 1)
}, },
@ -346,91 +336,104 @@
this.toLocationCode = location; this.toLocationCode = location;
}, },
submit() {
commit() {
if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
return;
}
uni.showLoading({ uni.showLoading({
title: "提交中....", title: "提交中....",
mask: true mask: true
}); });
if (this.fromType == "requestType") { //
var params = this.setRequestParams(); var itemCodes = []
console.log("提交" + JSON.stringify(params)) let locationCode = this.detailSource[0].toLocationCode
this.detailSource.forEach(toLocation => {
toLocation.Items.forEach(item => {
itemCodes.push(item.itemCode)
})
})
// repleinshRequestSubmit(params).then(res => { //
// uni.hideLoading() getManagementPrecisions(itemCodes, locationCode, res => {
// if (res.data) { if (res.success) {
// this.showCommitSuccessMessage("<br>" + res.data, ) this.managementList = res.list;
// } else { this.submitJob();
// this.showErrorMessage("[" + res.msg + "]")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
} else { } else {
// repleinshRecordSubmit(params).then(res => { uni.hideLoading();
// uni.hideLoading() this.showErrorMessage(res.message);
// if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, )
// } else {
// this.showErrorMessage("[" + res.msg + "]")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
} }
});
}, },
setParams() { submitJob() {
var subList = [] var params = this.setParams()
this.detailSource.forEach(item => { console.log("提交参数", JSON.stringify(params));
item.subList.forEach(detail => {
if (detail.scaned) { repleinshRecordSubmit(params).then(res => {
// var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, uni.hideLoading()
// detail.packingNumber, detail.batch); if (res.data) {
// detail.toPackingNumber =info.packingNumber; this.showCommitSuccessMessage("提交成功<br>生成补料记录<br>" + res.data)
// detail.toBatch =info.batch; } else {
subList.push(detail) this.showErrorMessage("提交失败:" + res.msg)
} }
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
}) })
})
return subList;
}, },
setParams() {
setRequestParams() {
var subList = [] var subList = []
var supplierCode = "" var createTime = getCurrDateTime();
this.detailSource.forEach(item => { var creator = this.$store.state.user.id
item.subList.forEach(detail => { this.detailSource.forEach(toLocationCode => {
if (detail.scaned) { toLocationCode.Items.forEach(item => {
if (supplierCode == "") { item.Locations.forEach(fromLocation => {
supplierCode = detail.package.supplierCode fromLocation.Batchs.forEach(batch => {
} let subItem = batch.detail;
subList.push(detail) subItem.recordList = [];
if (batch.Records.length > 0) {
batch.Records.forEach(r => {
let record = {};
record.handleQty = r.qty;
record.fromPackingNumber = r
.packingNumber;
record.fromBatch = r.batch;
record.fromContainerNumber = r
.ContainerNumber;
record.toContainerNumber = r
.ContainerNumber;
record.toInventoryStatus = r
.inventoryStatus;
record.toLocationCode = subItem
.toLocationCode;
record.fromLocationCode = fromLocation.fromLocationCode
record.supplierCode = r.supplierCode;
var info = getPackingNumberAndBatch(
this.managementList, r
.itemCode,
r.packingNumber, r
.batch);
record.toPackingNumber = info
.packingNumber;
record.toBatch = info.batch;
subItem.recordList.push(record);
})
subList.push(subItem);
} }
}) })
}) })
})
})
this.dataContent.subList = subList this.dataContent.subList = subList
this.dataContent.supplierCode = supplierCode this.dataContent.createTime = createTime;
this.dataContent.businessType = "PurchasePutaway" this.dataContent.creator = creator;
this.dataContent.departmentCode = "研发部门";
this.dataContent.status = 1;
this.dataContent.autoCommit = "FALSE";
this.dataContent.autoAgree = "FALSE";
this.dataContent.autoExecute = "FALSE";
this.dataContent.directCreateRecord = "FALSE";
return this.dataContent; return this.dataContent;
}, },
showMessage(message) { showMessage(message) {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) {} if (res) {}
@ -459,7 +462,6 @@
this.getToLocationCode(location, code) this.getToLocationCode(location, code)
}, },
getFromLocationCode(location, code) { getFromLocationCode(location, code) {
this.fromLocationInfo = location;
this.fromLocationCode = code; this.fromLocationCode = code;
this.openScanPopup(); this.openScanPopup();
}, },
@ -477,11 +479,16 @@
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.fromLocationCode = ''; this.clearData();
}) })
}, },
clearData() {
this.fromLocationCode = '';
this.detailSource = [];
this.requestList = [];
this.dataContent = {}
this.managementList = []
},
} }
} }

2
static/config.json

@ -18,7 +18,7 @@
"request_url": { "request_url": {
"name": "request_url", "name": "request_url",
"value": "http://dev.ccwin-in.com:25100/api/admin-api", "value": "http://192.168.0.230: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