Browse Source

生产收料

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

16
api/request2.js

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

74
pages/productionReceipt/job/productionReceiptDetail.vue

@ -95,7 +95,6 @@
managementList: [],
fromLocationCode: "",
toLocationCode: "",
toLocationInfo: {},
tolocationTypeList: [],
};
},
@ -103,15 +102,14 @@
this.id = option.id;
if (this.id != undefined) {
//
// if (option.status == "JOB_PENDING") {
// this.receive((callback => {
// this.received = true;
// this.getDetail();
// }));
// } else {
// this.getDetail();
// }
if (option.status == "1") {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
this.getDetail();
}
}
},
//
@ -173,7 +171,6 @@
that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getLocationTypeArray(that.jobContent.toLocationTypes)
that.detailSource = getDataSource(that.subList)
that.getLocationInfo(that.toLocationCode);
updateTitle(this.jobContent.number);
} else {
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(this.detailSource);
this.continueScan()
@ -247,6 +234,7 @@
getScanResult(result) {
try {
var supplierCode =result.package.supplierCode
var packingNumber = result.balance.packingNumber;
var batch = result.balance.batch;
var qty = result.balance.qty;
@ -278,7 +266,14 @@
']不一致,是否继续上架?', res => {
if (res) {
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();
} else {
this.scanPopupGetFocus();
@ -286,7 +281,14 @@
});
} else {
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();
}
}
@ -376,23 +378,24 @@
var params = this.setParams()
console.log("提交参数",JSON.stringify(params));
// productionReceiptJobSubmit(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)
// })
productionReceiptJobSubmit(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);
}
});
},
setParams() {
var subList = []
var creator = this.$store.state.user.id
@ -402,8 +405,11 @@
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
detail.toPackingNumber =info.packingNumber;
detail.toPackingNumber = info.packingNumber;
detail.toBatch =info.batch;
detail.toContainerNumber = "";
detail.toLocationCode =this.toLocationCode;
subList.push(detail)
}
})

4
pages/purchaseReturn/job/returnDetail.vue

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

29
pages/repleinsh/job/repleinshDetail.vue

@ -91,7 +91,6 @@
managementList: [],
fromLocationCode: "",
toLocationCode: "",
toLocationInfo: {},
tolocationTypeList: [],
};
},
@ -99,15 +98,14 @@
this.id = option.id;
if (this.id != undefined) {
//
// if (option.status == "JOB_PENDING") {
// this.receive((callback => {
// this.received = true;
// this.getDetail();
// }));
// } else {
// this.getDetail();
// }
if (option.status == "1") {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
this.getDetail();
}
}
},
//
@ -174,7 +172,6 @@
that.fromLocationCode = that.subList[0].fromLocationCode
that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
that.getLocationInfo(that.toLocationCode);
} else {
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) {
let items = this.subList.filter(r => {
if (r.scaned) {
@ -286,6 +273,7 @@
itemDetail.scaned = true;
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
@ -299,6 +287,7 @@
itemDetail.scaned = true;
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

Loading…
Cancel
Save