Browse Source

生产收料

wms3.0_pda
lijuncheng 10 months ago
parent
commit
5ad847beb9
  1. 16
      api/request2.js
  2. 76
      pages/productionReceipt/job/productionReceiptDetail.vue
  3. 4
      pages/purchaseReturn/job/returnDetail.vue
  4. 31
      pages/repleinsh/job/repleinshDetail.vue

16
api/request2.js

@ -609,7 +609,7 @@ export function getPurchaseReturnRequestDetail(id) {
} }
/** /**
* 采购退货 申请提交 * 采购退货申请 提交
* @param {*} params * @param {*} params
*/ */
export function purchaseReturnRequestSubmit(params) { export function purchaseReturnRequestSubmit(params) {
@ -929,7 +929,7 @@ export function getProductionReceiptJobDetail(id) {
*/ */
export function takeProductionReceiptJob(id) { export function takeProductionReceiptJob(id) {
return request({ return request({
url: baseApi + "/wms/purchasereceipt-job-main/accept?id=" + id, url: baseApi + "/wms/productionreceipt-job-main/accept?id=" + id,
method: "put", method: "put",
data: {}, data: {},
}); });
@ -942,7 +942,7 @@ export function takeProductionReceiptJob(id) {
*/ */
export function cancleTakeProductionReceiptJob(id) { export function cancleTakeProductionReceiptJob(id) {
return request({ return request({
url: baseApi + "/wms/purchasereceipt-job-main/abandon?id=" + id, url: baseApi + "/wms/productionreceipt-job-main/abandon?id=" + id,
method: "put", method: "put",
data: {}, data: {},
}); });
@ -955,7 +955,7 @@ export function cancleTakeProductionReceiptJob(id) {
*/ */
export function productionReceiptJobSubmit(params) { export function productionReceiptJobSubmit(params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/putaway/jobSubmit", url: baseApi + "/wms/productionreceipt-job-main/execute",
method: "put", method: "put",
data: params, data: params,
}); });
@ -2403,20 +2403,20 @@ export function getRepleinshJobDetail(id) {
*/ */
export function takeRepleinshJob(id) { export function takeRepleinshJob(id) {
return request({ return request({
url: baseApi + "/wms/purchasereceipt-job-main/accept?id=" + id, url: baseApi + "/wms/repleinsh-job-main/accept?id=" + id,
method: "put", method: "put",
data: {}, data: {},
}); });
} }
/** /**
* 补料 放弃承接 * 补料任务 放弃承接
* @param {*} id * @param {*} id
* *
*/ */
export function cancleTakeRepleinshJob(id) { export function cancleTakeRepleinshJob(id) {
return request({ return request({
url: baseApi + "/wms/purchasereceipt-job-main/abandon?id=" + id, url: baseApi + "/wms/repleinsh-job-main/abandon?id=" + id,
method: "put", method: "put",
data: {}, data: {},
}); });
@ -2428,7 +2428,7 @@ export function cancleTakeRepleinshJob(id) {
*/ */
export function repleinshJobSubmit(params) { export function repleinshJobSubmit(params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/putaway/jobSubmit", url: baseApi + "/wms/repleinsh-job-main/execute",
method: "put", method: "put",
data: params, data: params,
}); });

76
pages/productionReceipt/job/productionReceiptDetail.vue

@ -95,7 +95,6 @@
managementList: [], managementList: [],
fromLocationCode: "", fromLocationCode: "",
toLocationCode: "", toLocationCode: "",
toLocationInfo: {},
tolocationTypeList: [], tolocationTypeList: [],
}; };
}, },
@ -103,15 +102,14 @@
this.id = option.id; this.id = option.id;
if (this.id != undefined) { if (this.id != undefined) {
// //
// if (option.status == "JOB_PENDING") { if (option.status == "1") {
// this.receive((callback => { this.receive((callback => {
// this.received = true; this.received = true;
// this.getDetail(); this.getDetail();
// })); }));
// } else { } else {
// this.getDetail(); this.getDetail();
// } }
this.getDetail();
} }
}, },
// //
@ -173,7 +171,6 @@
that.toLocationCode = that.subList[0].toLocationCode that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getLocationTypeArray(that.jobContent.toLocationTypes) that.tolocationTypeList = getLocationTypeArray(that.jobContent.toLocationTypes)
that.detailSource = getDataSource(that.subList) that.detailSource = getDataSource(that.subList)
that.getLocationInfo(that.toLocationCode);
updateTitle(this.jobContent.number); updateTitle(this.jobContent.number);
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
@ -185,16 +182,6 @@
}) })
}, },
getLocationInfo(locationCode) {
if (locationCode != '') {
getBasicLocationByCode(locationCode).then(res => {
if (res.data.list.length > 0) {
this.toLocationInfo = res.data.list[0]
}
})
}
},
calcHandleQty() { calcHandleQty() {
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
this.continueScan() this.continueScan()
@ -247,6 +234,7 @@
getScanResult(result) { getScanResult(result) {
try { try {
var supplierCode =result.package.supplierCode
var packingNumber = result.balance.packingNumber; var packingNumber = result.balance.packingNumber;
var batch = result.balance.batch; var batch = result.balance.batch;
var qty = result.balance.qty; var qty = result.balance.qty;
@ -278,7 +266,14 @@
']不一致,是否继续上架?', res => { ']不一致,是否继续上架?', res => {
if (res) { if (res) {
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty); itemDetail.supplierCode =supplierCode
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance
.qty) ? Number(result.balance.qty) : Number(result.label.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty =result.package.stdPackQty
itemDetail.balance.stdPackUnit =result.package.stdPackUnit
this.calcHandleQty(); this.calcHandleQty();
} else { } else {
this.scanPopupGetFocus(); this.scanPopupGetFocus();
@ -286,7 +281,14 @@
}); });
} else { } else {
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty); itemDetail.supplierCode = supplierCode
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance
.qty) ? Number(result.balance.qty) : Number(result.label.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty
itemDetail.balance.stdPackUnit = result.package.stdPackUnit
this.calcHandleQty(); this.calcHandleQty();
} }
} }
@ -376,23 +378,24 @@
var params = this.setParams() var params = this.setParams()
console.log("提交参数",JSON.stringify(params)); console.log("提交参数",JSON.stringify(params));
// productionReceiptJobSubmit(params).then(res => { productionReceiptJobSubmit(params).then(res => {
// uni.hideLoading() uni.hideLoading()
// if (res.data) { if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data) this.showCommitSuccessMessage("提交成功<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);
} }
}); });
}, },
setParams() { setParams() {
var subList = [] var subList = []
var creator = this.$store.state.user.id var creator = this.$store.state.user.id
@ -402,8 +405,11 @@
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.toPackingNumber = info.packingNumber;
detail.toBatch =info.batch; detail.toBatch =info.batch;
detail.toContainerNumber = "";
detail.toLocationCode =this.toLocationCode;
subList.push(detail) subList.push(detail)
} }
}) })

4
pages/purchaseReturn/job/returnDetail.vue

@ -249,6 +249,7 @@
if (res) { if (res) {
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(qty); itemDetail.handleQty = Number(qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance; itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty; itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty =result.package.stdPackQty itemDetail.balance.stdPackQty =result.package.stdPackQty
@ -262,6 +263,7 @@
} else { } else {
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(qty); itemDetail.handleQty = Number(qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance; itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty; itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty =result.package.stdPackQty itemDetail.balance.stdPackQty =result.package.stdPackQty
@ -338,7 +340,7 @@
detail.toPackingNumber = detail.packingNumber; detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber; detail.toContainerNumber = detail.containerNumber;
detail.toBatch = detail.batch; detail.toBatch = detail.batch;
detail.toInventoryStatus = detail.inventoryStatus;
detail.toLocationCode = detail.toLocationCode; detail.toLocationCode = detail.toLocationCode;
subList.push(detail) subList.push(detail)
} }

31
pages/repleinsh/job/repleinshDetail.vue

@ -91,7 +91,6 @@
managementList: [], managementList: [],
fromLocationCode: "", fromLocationCode: "",
toLocationCode: "", toLocationCode: "",
toLocationInfo: {},
tolocationTypeList: [], tolocationTypeList: [],
}; };
}, },
@ -99,15 +98,14 @@
this.id = option.id; this.id = option.id;
if (this.id != undefined) { if (this.id != undefined) {
// //
// if (option.status == "JOB_PENDING") { if (option.status == "1") {
// this.receive((callback => { this.receive((callback => {
// this.received = true; this.received = true;
// this.getDetail(); this.getDetail();
// })); }));
// } else { } else {
// this.getDetail(); this.getDetail();
// } }
this.getDetail();
} }
}, },
// //
@ -174,7 +172,6 @@
that.fromLocationCode = that.subList[0].fromLocationCode that.fromLocationCode = that.subList[0].fromLocationCode
that.toLocationCode = that.subList[0].toLocationCode that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
that.getLocationInfo(that.toLocationCode);
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
@ -186,16 +183,6 @@
}) })
}, },
getLocationInfo(locationCode) {
if (locationCode != '') {
getBasicLocationByCode(locationCode).then(res => {
if (res.data.list.length > 0) {
this.toLocationInfo = res.data.list[0]
}
})
}
},
calcScanCount(closeScan) { calcScanCount(closeScan) {
let items = this.subList.filter(r => { let items = this.subList.filter(r => {
if (r.scaned) { if (r.scaned) {
@ -286,6 +273,7 @@
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance itemDetail.handleQty = Number(result.label.qty) > Number(result.balance
.qty) ? Number(result.balance.qty) : Number(result.label.qty); .qty) ? Number(result.balance.qty) : Number(result.label.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance; itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty; itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty itemDetail.balance.stdPackQty = result.package.stdPackQty
@ -299,6 +287,7 @@
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance.qty) ? Number( itemDetail.handleQty = Number(result.label.qty) > Number(result.balance.qty) ? Number(
result.balance.qty) : Number(result.label.qty); result.balance.qty) : Number(result.label.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance; itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty; itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty itemDetail.balance.stdPackQty = result.package.stdPackQty

Loading…
Cancel
Save