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. 185
      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) {
return request({
url: baseApi + "/magic-api/pda/job/putaway/jobSubmit",
method: "put",
url: baseApi + "/wms/repleinsh-record-main/create",
method: "post",
data: params,
});
}

12
pages/inventoryMove/coms/comMove.vue

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

10
pages/inventoryMove/coms/comMoveJob.vue

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

2
pages/inventoryMove/job/HoldToScrapMoveJob.vue

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

2
pages/inventoryMove/job/OktoScrapMoveJob.vue

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

2
pages/inventoryMove/job/holdToOkMoveJob.vue

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

2
pages/inventoryMove/job/okToHoldMoveJob.vue

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

2
pages/inventoryMove/record/holdToOkRecord.vue

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

2
pages/inventoryMove/record/holdToScrapRecord.vue

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

2
pages/inventoryMove/record/moveFreeRecord.vue

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

2
pages/inventoryMove/record/okToHoldRecord.vue

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

2
pages/inventoryMove/record/oktoScrapRecord.vue

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

2
pages/inventoryMove/record/scrapToHoldRecord.vue

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

104
pages/issue/record/issueRecord.vue

@ -48,6 +48,8 @@
updateTitle,
getRemoveOption,
getISODateTime,
getCurrDateTime,
getPackingNumberAndBatch
} from '@/common/basic.js';
import {
@ -56,6 +58,10 @@
import {
getBusinessType,
} from '@/common/record.js';
import {
getManagementPrecisions
} from '@/common/balance.js';
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import comIssueRequestPopup from '@/pages/issue/coms/comIssueRequestPopup.vue'
@ -92,6 +98,8 @@
fromInventoryStatuses: "",
toInventoryStatuses: "",
requestList: [],
dataContent:{},
managementList:[]
}
},
mounted() {
@ -246,40 +254,116 @@
},
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() {
uni.showLoading({
title: "提交中....",
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()
console.log("提交参数", JSON.stringify(params));
issueRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料记录" + res.data)
this.showCommitSuccessMessage("提交成功<br>生成发料记录<br>" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
this.showErrorMessage("提交失败:" + res.msg)
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
if (this.fromType == "requestType") {
uni.navigateTo({
url: './issueRequest'
})
}
this.clearData();
})
},
clearData(){
this.detailSource =[];
this.requestList=[];
this.dataContent ={}
this.managementList=[]
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {

2
pages/repleinsh/coms/comRepleinshRequestPopup.vue

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

185
pages/repleinsh/record/repleinshRecord.vue

@ -1,7 +1,7 @@
<template>
<view class="page-wraper">
<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 class="page-wraper" v-if="detailSource.length>0">
<view class="page-main">
@ -44,7 +44,6 @@
<script>
import {
repleinshRequestSubmit,
repleinshRecordSubmit,
getBalanceByBatchOffShelf
} from '@/api/request2.js';
@ -52,7 +51,7 @@
import {
goHome,
updateTitle,
getCurrDateTime
} from '@/common/basic.js';
import {
@ -77,6 +76,10 @@
getDataSource
} from '@/pages/issue/js/issue.js';
import {
getManagementPrecisions
} from '@/common/balance.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
@ -107,32 +110,22 @@
return {
id: '',
receiptJob: {},
received: false,
isShowPackingCode: true,
scanCount: 0,
dataContent: {}, //
subList: [], //subList
detailSource: [], //
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
fromLocationInfo: {},
fromLocationCode: "",
toLocationInfo: {},
toLocationCode: "",
isShowLocation: false,
fromlocationTypeList: [],
tolocationTypeList: [],
allowModifyLocation: false,
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {},
fromType: "",
requestList: [],
managementList: [],
dataContent: {}
};
},
onLoad(option) {
this.fromType = option.fromType
var typeCode = "Repleinment"
getBusinessType(typeCode, res => {
if (res.success) {
@ -282,7 +275,7 @@
// item.handleQty=itemHandleQty;
// this.closeScan();
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
@ -303,9 +296,6 @@
this.$forceUpdate();
},
removeItem(index, item) {
this.detailSource.splice(index, 1)
},
@ -346,91 +336,104 @@
this.toLocationCode = location;
},
commit() {
if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
return;
}
submit() {
uni.showLoading({
title: "提交中....",
mask: true
});
if (this.fromType == "requestType") {
var params = this.setRequestParams();
console.log("提交" + JSON.stringify(params))
// repleinshRequestSubmit(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 {
// repleinshRecordSubmit(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)
// })
}
//
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);
}
});
},
setParams() {
var subList = []
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
// var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
// detail.packingNumber, detail.batch);
// detail.toPackingNumber =info.packingNumber;
// detail.toBatch =info.batch;
subList.push(detail)
}
})
submitJob() {
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
repleinshRecordSubmit(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)
})
return subList;
},
setRequestParams() {
setParams() {
var subList = []
var supplierCode = ""
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
if (supplierCode == "") {
supplierCode = detail.package.supplierCode
}
subList.push(detail)
}
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.supplierCode = supplierCode
this.dataContent.businessType = "PurchasePutaway"
this.dataContent.departmentCode = "研发部门";
this.dataContent.status = 1;
this.dataContent.autoCommit = "FALSE";
this.dataContent.autoAgree = "FALSE";
this.dataContent.autoExecute = "FALSE";
this.dataContent.directCreateRecord = "FALSE";
this.dataContent.createTime = createTime;
this.dataContent.creator = creator;
return this.dataContent;
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {}
@ -459,7 +462,6 @@
this.getToLocationCode(location, code)
},
getFromLocationCode(location, code) {
this.fromLocationInfo = location;
this.fromLocationCode = code;
this.openScanPopup();
},
@ -477,12 +479,17 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.fromLocationCode = '';
this.clearData();
})
},
clearData() {
this.fromLocationCode = '';
this.detailSource = [];
this.requestList = [];
this.dataContent = {}
this.managementList = []
},
}
}
</script>

2
static/config.json

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

Loading…
Cancel
Save