diff --git a/api/request2.js b/api/request2.js index 115ebf07..8ce18769 100644 --- a/api/request2.js +++ b/api/request2.js @@ -1,8 +1,8 @@ import request from '@/api/httpRequest2.js' -const baseApi = "/api/admin-api" +// const baseApi = "/api/admin-api" //公司地址 // 本地地址 -// const baseApi = "/admin-api" +const baseApi = "/admin-api" /** * 获取验证码 * @param {*} @@ -552,10 +552,40 @@ export function purchaseReturnJobsubmit (params) { } /** - * 创建采购退货记录 + * 采购退货 申请列表 + * 任务状态 + * 开始日期 + * 结束日期 + * 获取日期任务列表 + * @param {*} + */ +export function getPurchaseReturnRequestList(params) { + return request({ + url: baseApi + "/wms/purchasereturn-request-main/senior", + method: "post", + data: params, + }); +} + +/** + * 采购退货 获取申请任务明细 + * @param {*} id 任务id + * + */ +export function getPurchaseReturnRequestDetail(id) { + return request({ + url: baseApi + "/wms/purchasereturn-request-main/getPurchasereturnRequestById?id=" + id, + method: "get", + data: {}, + }); +} + + +/** + * 采购退货 记录提交 * @param {*} params */ -export function createPurchaseReturnRecord(params) { +export function purchaseReturnRecordSubmit(params) { return request({ url: baseApi + "/magic-api/pda/job/purchasereturn/createRecord", method: "put", @@ -567,7 +597,7 @@ export function createPurchaseReturnRecord(params) { * 采购退货 申请提交 * @param {*} params */ -export function createPurchaseReturnRequest(params) { +export function purchaseReturnRequestSubmit(params) { return request({ url: baseApi + "/wms/purchasereturn-request-main/submit", method: "put", @@ -829,10 +859,22 @@ export function cancleTakeProductionReceiptJob(id) { * 生产收料 提交 * @param {*} params */ -export function productionReceiptJobSubmit(id, params) { +export function productionReceiptJobSubmit(params) { return request({ - url: baseApi + "/magic-api/pda/job/putaway/jobSubmit?id=" + id, - method: "post", + url: baseApi + "/magic-api/pda/job/putaway/jobSubmit", + method: "put", + data: params, + }); +} + +/** + * 生产收料记录 提交 + * @param {*} params + */ +export function productionReceiptRecordSubmit(params) { + return request({ + url: baseApi + "/magic-api/pda/job/putaway/jobSubmit", + method: "put", data: params, }); } @@ -1034,10 +1076,34 @@ export function cancleTakeUnPlannedReceiptJob(id) { } /** - * 计划外入库 提交 + * 计划外入库任务 提交 + * @param {*} params + */ +export function unPlannedReceiptJobSubmit(params) { + return request({ + url: baseApi + "/magic-api/pda/job/purchasereturn/jobSubmit", + method: "put", + data: params, + }); +} + +/** + * 计划外入库申请 提交 + * @param {*} params + */ +export function unPlannedReceiptRequestbSubmit(params) { + return request({ + url: baseApi + "/magic-api/pda/job/purchasereturn/jobSubmit", + method: "put", + data: params, + }); +} + +/** + * 计划外入库记录 提交 * @param {*} params */ -export function unPlannedReceiptJobSubmit(id, params) { +export function unPlannedReceiptRecordbSubmit(id, params) { return request({ url: baseApi + "/magic-api/pda/job/purchasereturn/jobSubmit?id=" + id, method: "post", @@ -1104,10 +1170,34 @@ export function cancleTakeUnPlannedIssueJob(id) { * 计划外出库 提交 * @param {*} params */ -export function unPlannedIssueJobSubmit(id, params) { +export function unPlannedIssueJobSubmit(params) { return request({ - url: baseApi + "/magic-api/pda/job/purchasereturn/jobSubmit?id=" + id, - method: "post", + url: baseApi + "/magic-api/pda/job/purchasereturn/jobSubmit", + method: "put", + data: params, + }); +} + +/** + * 计划外出库申请 提交 + * @param {*} params + */ +export function unPlannedIssueRequestSubmit(params) { + return request({ + url: baseApi + "/magic-api/pda/job/purchasereturn/jobSubmit", + method: "put", + data: params, + }); +} + +/** + * 计划外出库记录 提交 + * @param {*} params + */ +export function unPlannedIssueRecordSubmit(params) { + return request({ + url: baseApi + "/magic-api/pda/job/purchasereturn/jobSubmit", + method: "put", data: params, }); } @@ -1142,7 +1232,7 @@ export function getProductReceiptJobDetail(id) { } /** - * 制品上架 承接 + * 制品收货 承接 * @param {*} id * */ @@ -1155,7 +1245,7 @@ export function takeProductReceiptJob(id) { } /** - * 制品上架 放弃承接 + * 制品收货 放弃承接 * @param {*} id * */ @@ -1171,9 +1261,9 @@ export function cancleTakeProductReceiptJob(id) { * 制品收货 提交 * @param {*} params */ -export function productReceiptJobsubmit(id, params) { +export function productReceiptJobsubmit( params) { return request({ - url: baseApi + "/magic-api/pda/job/purchasereturn/jobSubmit?id=" + id, + url: baseApi + "/magic-api/pda/job/purchasereturn/jobSubmit", method: "put", data: params, }); @@ -1242,7 +1332,22 @@ export function cancleTakeProductPutawayJob(id) { */ export function productPutawayJobSubmit(params) { return request({ - url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit?id=" + id, + url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit", + method: "put", + data: params, + }); +} + + + +/** + * 制品上架记录 提交 + * @param {*} 任务id + * + */ +export function productPutawayRecordSubmit(params) { + return request({ + url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit", method: "put", data: params, }); @@ -1311,9 +1416,9 @@ export function cancleTakeProductDismantleJob(id) { */ export function productDismantleJobSubmit(params) { return request({ - url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit?id=" + id, + url: baseApi + "/wms/purchasereceipt-job-main/abandon", method: "put", - data: params, + data: {}, }); } @@ -1386,6 +1491,59 @@ export function deliverJobSubmit( params) { }); } +/** + * 制品发货申请 + * 任务状态 + * 开始日期 + * 结束日期 + * 获取日期任务列表 + * @param {*} + */ +export function getDeliverRequestList(params) { + return request({ + url: baseApi + "/wms/deliver-request-main/senior", + method: "post", + data: params, + }); +} + +/** + * 制品发货申请 获取任务明细 + * @param {*} id 任务id + * + */ +export function getDeliverRequestDetail(id) { + return request({ + url: baseApi + "/wms/deliver-request-main/getDeliverRequestById?id=" + id, + method: "get", + data: {}, + }); +} + +/** + * 制品发货申请 申请提交 + * @param {*} params + */ +export function deliverRequestSubmit(params) { + return request({ + url: baseApi + "/wms/purchasereturn-request-main/submit", + method: "put", + data: params, + }); +} + +/** + * 制品发货 记录提交 + * @param {*} params + */ +export function deliverRecordSubmit(params) { + return request({ + url: baseApi + "/wms/purchasereturn-request-main/submit", + method: "put", + data: params, + }); +} + /** * 客户退货 任务 * status 任务状态 @@ -1449,7 +1607,7 @@ export function cancleTakeCustomerReturnJob(id) { */ export function customerReturnJobSubmit(params) { return request({ - url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit?id=" + id, + url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit", method: "put", data: params, }); @@ -1486,6 +1644,31 @@ export function getCustomerReturnRequestDetail(id) { }); } + +/** + * 客户退货 申请提交 + * @param {*} params + */ +export function customerReturnRequestSubmit(params) { + return request({ + url: baseApi + "/wms/purchasereturn-request-main/submit", + method: "put", + data: params, + }); +} + +/** + * 客户退货 记录提交 + * @param {*} params + */ +export function customerReturnRecordSubmit(params) { + return request({ + url: baseApi + "/wms/purchasereturn-request-main/submit", + method: "put", + data: params, + }); +} + /** * 调拨入库 任务 * status 任务状态 @@ -1550,7 +1733,20 @@ export function cancleTakeTransferReceiptJob(id) { */ export function transferReceiptJobSubmit(params) { return request({ - url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit?id=" + id, + url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit", + method: "put", + data: params, + }); +} + +/** + * 调拨入库记录 提交 + * @param {*} id + * + */ +export function transferReceiptRecordSubmit(params) { + return request({ + url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit", method: "put", data: params, }); @@ -1586,7 +1782,7 @@ export function getTransferIssueJobDetail(id) { } /** - * 生产退料 承接 + * 调拨出库 承接 * @param {*} id * */ @@ -1599,7 +1795,7 @@ export function takeTransferIssueJob(id) { } /** - * 生产退料 放弃承接 + * 调拨出库 放弃承接 * @param {*} id * */ @@ -1624,6 +1820,19 @@ export function transferIssueJobSubmit( params) { }); } +/** + * 调拨出库记录 提交 + * @param {*} + * + */ +export function transferIssueRecordSubmit( params) { + return request({ + url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit", + method: "put", + data: params, + }); +} + /** * 制品上架申请 @@ -1654,6 +1863,18 @@ export function getProductPutawayRequestDetail(id) { }); } +/** + * 制品上架 申请提交 + * @param {*} params + */ +export function productPutawayRequestSubmit(params) { + return request({ + url: baseApi + "/wms/purchasereturn-request-main/submit", + method: "put", + data: params, + }); +} + /** * 发料申请列表 * @param {*} params @@ -1679,35 +1900,32 @@ export function getIssueRequestDetail(id) { } /** - * 采购退货 申请列表 - * 任务状态 - * 开始日期 - * 结束日期 - * 获取日期任务列表 - * @param {*} + * 发料申请 提交 + * @param {*} params */ -export function getPurchaseReturnRequestList(params) { +export function issueRequestSubmit(params) { return request({ - url: baseApi + "/wms/purchasereturn-request-main/senior", - method: "post", + url: baseApi + "/wms/purchasereturn-request-main/submit", + method: "put", data: params, }); } /** - * 采购退货 获取申请任务明细 - * @param {*} id 任务id - * + * 发料记录 提交 + * @param {*} params */ -export function getPurchaseReturnRequestDetail(id) { +export function issueRecordSubmit(params) { return request({ - url: baseApi + "/wms/purchasereturn-request-main/getPurchasereturnRequestById?id=" + id, - method: "get", - data: {}, + url: baseApi + "/wms/purchasereturn-request-main/submit", + method: "put", + data: params, }); } + + /** * 原料上架申请 获取任务列表 * 任务状态 @@ -1737,6 +1955,30 @@ export function getPutawayRequestDetail(id) { }); } +/** + * 原料上架申请 提交 + * @param {*} params + */ +export function putawayRequestSubmit(params) { + return request({ + url: baseApi + "/wms/purchasereturn-request-main/submit", + method: "put", + data: params, + }); +} + +/** + * 原料上架记录 提交 + * @param {*} params + */ +export function putawayRecordSubmit(params) { + return request({ + url: baseApi + "/wms/purchasereturn-request-main/submit", + method: "put", + data: params, + }); +} + /** * 生产退料 任务获取任务列表 * 任务状态 @@ -1768,7 +2010,7 @@ export function getProductionReturnJobDetail(id) { /** - * 生产退料 承接 + * 生产退料 承接任务 * @param {*} id * */ @@ -1793,6 +2035,19 @@ export function cancleTakeProductionReturnJob(id) { }); } +/** + * 生产退料 任务提交 + * @param {*} 任务id + * + */ +export function productionReturnJobSubmit( params) { + return request({ + url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit?id=" + id, + method: "put", + data: params, + }); +} + /** * 生产退料申请 获取任务列表 * status 任务状态 @@ -1809,10 +2064,9 @@ export function getProductionReturnRequestList(params) { }); } - /** - * 生产退料 获取任务明细 - * @param {*} number id 任务id + * 生产退料申请 获取申请明细 + * @param {*} id * */ export function getProductionReturnRequestDetail(id) { @@ -1823,21 +2077,29 @@ export function getProductionReturnRequestDetail(id) { }); } - /** - * 生产退料 任务提交 - * @param {*} 任务id - * + * 生产退料申请 提交 + * @param {*} params */ -export function productionReturnJobSubmit( params) { +export function productionReturnRequestSubmit(params) { return request({ - url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit?id=" + id, + url: baseApi + "/wms/purchasereturn-request-main/submit", method: "put", data: params, }); } - +/** + * 生产退料记录 提交 + * @param {*} params + */ +export function productionReturnRecordSubmit(params) { + return request({ + url: baseApi + "/wms/purchasereturn-request-main/submit", + method: "put", + data: params, + }); +} /** @@ -1869,8 +2131,6 @@ export function getUnPlannedIssueRequestDetail(id) { }); } - - /** * 计划外入库 申请 * status 任务状态 @@ -1901,63 +2161,19 @@ export function getUnPlannedReceiptRequestDetail(id) { } /** - * 报废出库 申请 - * status 任务状态 - * 开始日期 - * 结束日期 - * 获取任务列表 - * @param {*} + * 计划外入库 申请提交 + * @param {*} params */ -export function getScrapRequestList(params) { +export function unPlannedReceiptRequestSubmit(params) { return request({ - url: baseApi + "/wms/scrap-request-main/senior", - method: "post", + url: baseApi + "/wms/purchasereturn-request-main/submit", + method: "put", data: params, }); } -/** - * 报废出库申请 获取申请明细 - * @param {*} id 任务id - * - */ -export function getScrapRequestDetail(id) { - return request({ - url: baseApi + "/wms/scrap-request-main/getScrapRequestById?id=" + id, - method: "get", - data: {}, - }); -} - -/** - * 制品发货申请 - * 任务状态 - * 开始日期 - * 结束日期 - * 获取日期任务列表 - * @param {*} - */ -export function getDeliverRequestList(params) { - return request({ - url: baseApi + "/wms/deliver-request-main/senior", - method: "post", - data: params, - }); -} -/** - * 制品发货申请 获取任务明细 - * @param {*} id 任务id - * - */ -export function getDeliverRequestDetail(id) { - return request({ - url: baseApi + "/wms/deliver-request-main/getDeliverRequestById?id=" + id, - method: "get", - data: {}, - }); -} /** * 报废出库 任务 @@ -2025,6 +2241,61 @@ export function scrapJobSubmit( params) { }); } +/** + * 报废出库 申请 + * status 任务状态 + * 开始日期 + * 结束日期 + * 获取任务列表 + * @param {*} + */ +export function getScrapRequestList(params) { + return request({ + url: baseApi + "/wms/scrap-request-main/senior", + method: "post", + data: params, + }); +} + +/** + * 报废出库申请 获取申请明细 + * @param {*} id 任务id + * + */ +export function getScrapRequestDetail(id) { + return request({ + url: baseApi + "/wms/scrap-request-main/getScrapRequestById?id=" + id, + method: "get", + data: {}, + }); +} + +/** + * 报废出库申请 提交 + * @param {*} params + */ +export function scrapRequestSubmit(params) { + return request({ + url: baseApi + "/wms/purchasereturn-request-main/submit", + method: "put", + data: params, + }); +} + +/** + * 报废出库记录 提交 + * @param {*} params + */ +export function scrapRecordSubmit(params) { + return request({ + url: baseApi + "/wms/purchasereturn-request-main/submit", + method: "put", + data: params, + }); +} + + + /** * 补料任务 列表 * @@ -2083,13 +2354,97 @@ export function cancleTakeRepleinshJob(id) { } /** - * 补料 提交 + * 补料任务 提交 * @param {*} params */ -export function repleinshJobSubmit(id, params) { +export function repleinshJobSubmit(params) { return request({ - url: baseApi + "/magic-api/pda/job/putaway/jobSubmit?id=" + id, - method: "post", + url: baseApi + "/magic-api/pda/job/putaway/jobSubmit", + method: "put", + data: params, + }); +} + +/** + * 补料申请 提交 + * @param {*} params + */ +export function repleinshRequestSubmit(params) { + return request({ + url: baseApi + "/magic-api/pda/job/putaway/jobSubmit", + method: "put", + data: params, + }); +} + +/** + * 补料记录 提交 + * @param {*} params + */ +export function repleinshRecordSubmit(params) { + return request({ + url: baseApi + "/magic-api/pda/job/putaway/jobSubmit", + method: "put", + data: params, + }); +} + +/** + * 托盘绑定 提交 + * @param {*} params + */ +export function bindPalledtRecordSubmit(params) { + return request({ + url: baseApi + "/magic-api/pda/job/putaway/jobSubmit", + method: "put", + data: params, + }); +} + +/** + * 托盘解绑 提交 + * @param {*} params + */ +export function unbindPalledtRecordSubmit(params) { + return request({ + url: baseApi + "/magic-api/pda/job/putaway/jobSubmit", + method: "put", + data: params, + }); +} + +/** + * 拆包 提交 + * @param {*} params + */ +export function splitPackageRecordSubmit(params) { + return request({ + url: baseApi + "/magic-api/pda/job/putaway/jobSubmit", + method: "put", + data: params, + }); +} + +/** + * 合包 提交 + * @param {*} params + */ +export function mergePackageRecordSubmit(params) { + return request({ + url: baseApi + "/magic-api/pda/job/putaway/jobSubmit", + method: "put", + data: params, + }); +} + +/** + * 翻包 提交 + * @param {*} params + */ +export function overPackageRecordSubmit(params) { + return request({ + url: baseApi + "/magic-api/pda/job/putaway/jobSubmit", + method: "put", data: params, }); } diff --git a/common/basic.js b/common/basic.js index 4133ed10..4b5a46af 100644 --- a/common/basic.js +++ b/common/basic.js @@ -824,20 +824,20 @@ export function vibrate() { } -export function getDataSource(details) { +export function getDataSource(subList) { let items = []; - details.forEach(detail => { + subList.forEach(detail => { var item = items.find(r => r.itemCode == detail.itemCode) if (item == undefined) { item = createItemInfo(detail); let newDetail = createDetailInfo(detail); // - item.details.push(newDetail); + item.subList.push(newDetail); items.push(item) } else { item.qty += Number(detail.qty) let newDetail = createDetailInfo(detail); // - item.details.push(newDetail); + item.subList.push(newDetail); } }) return items; @@ -852,7 +852,7 @@ export function createItemInfo(res) { qty: Number(res.qty), handleQty: 0, uom: res.uom, - details: [] + subList: [] } return item; } diff --git a/common/detail.js b/common/detail.js index f2c5d88d..6cd99efc 100644 --- a/common/detail.js +++ b/common/detail.js @@ -1,17 +1,17 @@ -export function getDataSource(details) { +export function getDataSource(subList) { let items = []; - details.forEach(detail => { + subList.forEach(detail => { var item = items.find(r => r.itemCode == detail.itemCode) if (item == undefined) { item = createItemInfo(detail); let newDetail = createDetailInfo(detail); // - item.details.push(newDetail); + item.subList.push(newDetail); items.push(item) } else { item.qty += detail.qty let newDetail = createDetailInfo(detail); // - item.details.push(newDetail); + item.subList.push(newDetail); } }) return items; @@ -26,7 +26,7 @@ export function createItemInfo(detail) { qty: Number(detail.qty), handleQty: 0, uom: detail.uom, - details: [] + subList: [] } return item; } @@ -56,7 +56,7 @@ export function createRecordInfo(detail, balance) { export function calcHandleQty(detailSource) { for (let item of detailSource) { item.handleTotalQty = 0; - for (let detail of item.details) { + for (let detail of item.subList) { if (detail != undefined && detail.scaned) { item.handleTotalQty += Number(detail.handleQty) } @@ -65,8 +65,8 @@ export function calcHandleQty(detailSource) { } -export function getScanCount(detailList) { - let items = detailList.filter(r => { +export function getScanCount(subList) { + let items = subList.filter(r => { if (r.scaned) { return r; } diff --git a/common/record.js b/common/record.js index a8358538..5e8fe283 100644 --- a/common/record.js +++ b/common/record.js @@ -15,7 +15,7 @@ export function createItemInfo(balance, pack) { qty: Number(balance.qty), handleQty: 0, uom: pack.uom, - details: [] + subList: [] } return item; } @@ -25,6 +25,8 @@ export function createDetailInfo(data, pack) { let detail = {}; Object.assign(detail, data) detail.balanceQty = Number(detail.qty) + detail.stdPackQty = Number(pack.stdPackQty) + detail.stdPackUnit =pack.stdPackUnit detail.package = pack; return detail; } @@ -33,7 +35,7 @@ export function createDetailInfo(data, pack) { export function calcHandleQty(detailSource) { for (let item of detailSource) { item.qty = 0; - for (let detail of item.details) { + for (let detail of item.subList) { if (detail != undefined && detail.scaned) { item.qty = item.qty + Number(detail.qty) } diff --git a/mycomponents/detail/comDetailCard.vue b/mycomponents/detail/comDetailCard.vue index 8ebd7613..e0c4205a 100644 --- a/mycomponents/detail/comDetailCard.vue +++ b/mycomponents/detail/comDetailCard.vue @@ -7,7 +7,7 @@ - + diff --git a/mycomponents/detail/comRequestDetailCard.vue b/mycomponents/detail/comRequestDetailCard.vue index 24db4008..91587423 100644 --- a/mycomponents/detail/comRequestDetailCard.vue +++ b/mycomponents/detail/comRequestDetailCard.vue @@ -10,7 +10,7 @@ - + diff --git a/mycomponents/job/jobcomDetailCard.vue b/mycomponents/job/jobcomDetailCard.vue index 8e2b3b91..236935ff 100644 --- a/mycomponents/job/jobcomDetailCard.vue +++ b/mycomponents/job/jobcomDetailCard.vue @@ -7,7 +7,7 @@ - + diff --git a/mycomponents/record/recordComDetailCard.vue b/mycomponents/record/recordComDetailCard.vue index c4fe3498..9e6755fc 100644 --- a/mycomponents/record/recordComDetailCard.vue +++ b/mycomponents/record/recordComDetailCard.vue @@ -11,7 +11,7 @@ - + @@ -85,7 +85,7 @@ watch: { dataContent: { handler(newName, oldName) { - if (this.dataContent.details.length > 0) { + if (this.dataContent.subList.length > 0) { if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) { this.$nextTick(res => { this.$refs.collapse1.resize() @@ -141,6 +141,7 @@ edit(item) { this.editItem = item; + debugger this.$refs.balanceQtyEdit.openEditPopup(this.editItem, this.editItem.qty); }, @@ -154,7 +155,7 @@ this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?", res => { if (res) { - this.dataContent.details.splice(index, 1) + this.dataContent.subList.splice(index, 1) this.$emit('removePack') } }); diff --git a/pages/count/coms/comCountDetailCard.vue b/pages/count/coms/comCountDetailCard.vue index dc59f0a2..a2402c77 100644 --- a/pages/count/coms/comCountDetailCard.vue +++ b/pages/count/coms/comCountDetailCard.vue @@ -10,7 +10,7 @@ - + @@ -58,7 +58,7 @@ watch: { dataContent: { handler(newName, oldName) { - if (this.dataContent.details.length > 0) { + if (this.dataContent.subList.length > 0) { if (this.$refs.collapse1 != undefined) { this.$nextTick(res => { this.$refs.collapse1.resize() @@ -129,7 +129,7 @@ this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?", res => { if (res) { - // this.dataContent.details.splice(index, 1) + // this.dataContent.subList.splice(index, 1) item.scaned = false; item.record = null; this.$emit('removePack') diff --git a/pages/count/job/countDetail.vue b/pages/count/job/countDetail.vue index dd644cb2..80790ecc 100644 --- a/pages/count/job/countDetail.vue +++ b/pages/count/job/countDetail.vue @@ -1,4 +1,3 @@ - - + @@ -159,7 +159,7 @@ this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?", res => { if (res) { - this.dataContent.details.splice(index, 1) + this.dataContent.subList.splice(index, 1) this.$emit('removePack', item) } }); diff --git a/pages/inventoryMove/job/inventoryMoveDetail.vue b/pages/inventoryMove/job/inventoryMoveDetail.vue index 9766b7d1..9872a5ad 100644 --- a/pages/inventoryMove/job/inventoryMoveDetail.vue +++ b/pages/inventoryMove/job/inventoryMoveDetail.vue @@ -71,12 +71,8 @@ received: false, scanCount: 0, jobContent: {}, //任务内容 - detailList: [], //接口返回的任务details + subList: [], //接口返回的任务subList detailSource: [], //绑定在页面上的数据源 - scrollTop: 0, - old: { - scrollTop: 0 - }, toLocationInfo: {}, businessTypeInfo: {}, locationTypeList: [], @@ -164,8 +160,8 @@ } else { if (res.data.subList.length > 0) { that.jobContent = res.data; - that.detailList = res.data.subList; - that.detailSource = that.getDataSource(that.detailList) + that.subList = res.data.subList; + that.detailSource = that.getDataSource(that.subList) updateTitle(this.jobContent.number); } else { that.showMessage('列表数据为0'); @@ -178,20 +174,20 @@ }, - getDataSource(details) { + getDataSource(subList) { let items = []; - details.forEach(detail => { + subList.forEach(detail => { var item = items.find(r => r.itemCode == detail.itemCode) if (item == undefined) { item = this.createItemInfo(detail); let newDetail = this.createDetailInfo(detail); // - item.details.push(newDetail); + item.subList.push(newDetail); items.push(item) } else { item.qty += detail.qty let newDetail = this.createDetailInfo(detail); // - item.details.push(newDetail); + item.subList.push(newDetail); } }) return items; @@ -206,7 +202,7 @@ qty: res.qty, handleQty: 0, uom: res.uom, - details: [] + subList: [] } return item; }, @@ -219,13 +215,13 @@ }, calcScanCount(closeScan) { - let items = this.detailList.filter(r => { + let items = this.subList.filter(r => { if (r.scaned) { return r; } }) this.scanCount = items != null ? items.length : 0; - if (this.scanCount == this.detailList.length) { + if (this.scanCount == this.subList.length) { this.closeScanPopup(); } }, @@ -233,7 +229,7 @@ calcHandleQty() { for (let item of this.detailSource) { item.handleQty = 0; - for (let detail of item.details) { + for (let detail of item.subList) { if (detail.record != undefined) { item.handleQty += Number(detail.record.qty) } @@ -247,7 +243,7 @@ //继续扫描 continueScan() { this.scanCount = this.getScanCount(); - if (this.scanCount == this.detailList.length) { + if (this.scanCount == this.subList.length) { this.closeScanPopup(); } else { this.scanPopupGetFocus(); @@ -255,7 +251,7 @@ }, getScanCount(closeScan) { - let items = this.detailList.filter(r => { + let items = this.subList.filter(r => { if (r.scaned) { return r; } @@ -273,7 +269,7 @@ let fromlocationList = []; for (var i = 0; i < this.detailSource.length; i++) { let item = this.detailSource[i]; - item.details.forEach(l => { + item.subList.forEach(l => { //重复的库位不往里面插入 var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) if (location.length == 0) { @@ -301,7 +297,7 @@ if (detail == undefined) { this.showMessage("物料号【" + itemCode + "】不在列表中") } else { - var itemDetail = detail.details.find(r => { + var itemDetail = detail.subList.find(r => { return r.packingNumber == packingNumber && r.batch == batch }) @@ -354,9 +350,9 @@ async commit() { //允许部分提交 //扫描数量和任务数量相等,直接提交 - if (this.scanCount == this.detailList.length) { + if (this.scanCount == this.subList.length) { this.submitJob(); - } else if (this.scanCount < this.detailList.length) { + } else if (this.scanCount < this.subList.length) { //扫描数量小于任务数量,判断是否允许部分提交 if (this.jobContent.allowPartialComplete == "TRUE") { //提交 @@ -365,7 +361,7 @@ //不允许部分提交,提示 this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + "]箱总共[" + this - .detailList.length + "]箱", res => { + .subList.length + "]箱", res => { if (res) { this.openScanPopup(); } @@ -442,12 +438,12 @@ extraProperties: this.jobContent.extraProperties, siteId: this.jobContent.siteId, Code: "", - details: [], + subList: [], } this.detailSource.forEach(item => { - item.details.forEach(detail => { + item.subList.forEach(detail => { if (detail.scaned) { detail.record.fromPackingNumber = detail.record.packingNumber detail.record.toPackingNumber = detail.record.packingNumber @@ -469,7 +465,7 @@ detail.record.projectCode = "", detail.record.Code = "" detail.record.interfaceType = "jklxPURCHASE_RETURN" - params.details.push(detail.record) + params.subList.push(detail.record) } }) }) @@ -532,12 +528,6 @@ this.scanPopupGetFocus(); }, - - scroll: function(e) { - // console.log(e) - this.old.scrollTop = e.datacontent.scrollTop; - }, - closeCommitMessage() { setTimeout(() => { uni.navigateTo({ diff --git a/pages/issue-按批次推荐/job/issueDetail.vue b/pages/issue-按批次推荐/job/issueDetail.vue index 5201bb10..775791e2 100644 --- a/pages/issue-按批次推荐/job/issueDetail.vue +++ b/pages/issue-按批次推荐/job/issueDetail.vue @@ -91,7 +91,7 @@ currentData: {}, id: '', jobContent: {}, //任务内容 - detailList: [], //接口返回的任务details + subList: [], //接口返回的任务subList detailSource: [], //绑定在页面上的数据源 detailOptions: [], scanOptions: [] @@ -162,10 +162,10 @@ mask: true }); getIssueJobDetail(that.id).then(res => { - if (res.data[0].details.length > 0) { + if (res.data[0].subList.length > 0) { that.jobContent = res.data[0]; - that.detailList = res.data[0].details; - that.detailSource = that.getDataSource(that.detailList) + that.subList = res.data[0].subList; + that.detailSource = that.getDataSource(that.subList) that.resizeCollapse(); uni.hideLoading(); } else { @@ -177,11 +177,11 @@ }) }, - getDataSource(details) { + getDataSource(subList) { let list = []; let that = this; - for (var i = 0; i < details.length; i++) { - let detail = details[i]; + for (var i = 0; i < subList.length; i++) { + let detail = subList[i]; var location = list.find(r => r.toLocationCode == detail.toLocationCode) if (location == undefined) { diff --git a/pages/issue/job/issueDetail.vue b/pages/issue/job/issueDetail.vue index 55be5452..615c1767 100644 --- a/pages/issue/job/issueDetail.vue +++ b/pages/issue/job/issueDetail.vue @@ -63,7 +63,7 @@ return { id: '', jobContent: {}, //任务内容 - detailList: [], //接口返回的任务details + subList: [], //接口返回的任务subList detailSource: [], //绑定在页面上的数据源 detailOptions: [], scanOptions: [] @@ -141,10 +141,10 @@ } else { if (res.data.subList.length > 0) { that.jobContent = res.data; - that.detailList = res.data.subList; - that.detailSource = getDataSource(that.detailSource, that.detailList) - // that.fromLocationCode = that.detailList[0].FromLocationCode - // that.toLocationCode = that.detailList[0].toLocationCode + that.subList = res.data.subList; + that.detailSource = getDataSource(that.detailSource, that.subList) + // that.fromLocationCode = that.subList[0].FromLocationCode + // that.toLocationCode = that.subList[0].toLocationCode // that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) updateTitle(this.jobContent.number); that.resizeCollapse(); diff --git a/pages/issue/js/issue.js b/pages/issue/js/issue.js index 4e783152..55842f6a 100644 --- a/pages/issue/js/issue.js +++ b/pages/issue/js/issue.js @@ -1,6 +1,6 @@ -export function getDataSource(list,details) { - for (var i = 0; i < details.length; i++) { - let detail = details[i]; +export function getDataSource(list,subList) { + for (var i = 0; i < subList.length; i++) { + let detail = subList[i]; var location = list.find(r => r.toLocationCode == detail.toLocationCode) if (location == undefined) { diff --git a/pages/issue/record/issueRecord.vue b/pages/issue/record/issueRecord.vue index 54144848..2d024c2b 100644 --- a/pages/issue/record/issueRecord.vue +++ b/pages/issue/record/issueRecord.vue @@ -36,6 +36,12 @@ // import { // getIssueJobDetail, // } from '@/api/request.js'; + + import { + // getIssueJobDetail, + issueRequestSubmit, + issueRecordSubmit + } from '@/api/request2.js'; import { goHome, @@ -70,7 +76,7 @@ return { id: '1689889453461090304', jobContent: {}, //任务内容 - detailList: [], //接口返回的任务details + subList: [], //接口返回的任务subList detailSource: [], //绑定在页面上的数据源 detailOptions: [], scanOptions: [], @@ -103,8 +109,8 @@ mask: true }); getIssueJobDetail(this.id).then(res => { - if (res.data[0].details.length > 0) { - that.detailList = res.data[0].details; + if (res.data[0].subList.length > 0) { + that.subList = res.data[0].subList; if (action == 'update') //更新需求信息,将原来的零件节点删除 { let index = that.detailSource[0].Items.findIndex(r => r.itemCode == item.itemCode); @@ -112,7 +118,7 @@ that.detailSource[0].Items.splice(index, 1); } } - that.detailSource = getDataSource(that.detailSource, that.detailList) + that.detailSource = getDataSource(that.detailSource, that.subList) that.resizeCollapse(); } uni.hideLoading(); diff --git a/pages/issue/request/issueRequest.vue b/pages/issue/request/issueRequest.vue index a1e05769..701c02a5 100644 --- a/pages/issue/request/issueRequest.vue +++ b/pages/issue/request/issueRequest.vue @@ -14,10 +14,10 @@
- + -
+
diff --git a/pages/issue/request/issueRequestDetail.vue b/pages/issue/request/issueRequestDetail.vue index 54eed1ab..dce7a970 100644 --- a/pages/issue/request/issueRequestDetail.vue +++ b/pages/issue/request/issueRequestDetail.vue @@ -1,4 +1,3 @@ -