Browse Source

添加接口

wms3.0_pda
lijuncheng 12 months ago
parent
commit
9f1ba0b1e9
  1. 567
      api/request2.js
  2. 10
      common/basic.js
  3. 16
      common/detail.js
  4. 6
      common/record.js
  5. 2
      mycomponents/detail/comDetailCard.vue
  6. 2
      mycomponents/detail/comRequestDetailCard.vue
  7. 2
      mycomponents/job/jobcomDetailCard.vue
  8. 7
      mycomponents/record/recordComDetailCard.vue
  9. 6
      pages/count/coms/comCountDetailCard.vue
  10. 64
      pages/count/job/countDetail.vue
  11. 47
      pages/count/record/countRecord.vue
  12. 6
      pages/customerReturn/coms/comReturnRecord.vue
  13. 31
      pages/customerReturn/job/returnDetail.vue
  14. 22
      pages/customerReturn/record/returnRecord.vue
  15. 7
      pages/customerReturn/request/customerReturnRequestDetail.vue
  16. 2
      pages/deliver/coms/comDeliverDetailCard.vue
  17. 27
      pages/deliver/job/deliverDetail.vue
  18. 906
      pages/deliver/record/deliverRecord.vue
  19. 2
      pages/deliver/request/deliverRequest.vue
  20. 9
      pages/deliver/request/deliverRequestDetail.vue
  21. 2
      pages/inspect/coms/comInspectDetailCard.vue
  22. 4
      pages/inspect/coms/inspectComDetailCard.vue
  23. 4
      pages/inspect/coms/inspectEdit.vue
  24. 100
      pages/inspect/job/inspectDetail.vue
  25. 15
      pages/inspect/job/inspectResult.vue
  26. 10
      pages/inspect/request/inspectRequestDetail.vue
  27. 2
      pages/inventoryMove/coms/comInventoryDetailCard.vue
  28. 12
      pages/inventoryMove/coms/comMove.vue
  29. 4
      pages/inventoryMove/coms/comMoveRecord.vue
  30. 52
      pages/inventoryMove/job/inventoryMoveDetail.vue
  31. 14
      pages/issue-按批次推荐/job/issueDetail.vue
  32. 10
      pages/issue/job/issueDetail.vue
  33. 6
      pages/issue/js/issue.js
  34. 14
      pages/issue/record/issueRecord.vue
  35. 4
      pages/issue/request/issueRequest.vue
  36. 9
      pages/issue/request/issueRequestDetail.vue
  37. 2
      pages/package/coms/comOverRecord.vue
  38. 2
      pages/package/coms/comPackageRecord.vue
  39. 20
      pages/package/record/mergePackageRecord.vue
  40. 21
      pages/package/record/mergePackageRecord.vue.b17252
  41. 17
      pages/package/record/mergePackageRecord.vue.y17252
  42. 18
      pages/package/record/overPackageRecord.vue
  43. 18
      pages/package/record/splitPackageRecord.vue
  44. 6
      pages/pallet/coms/comPalletRecord.vue
  45. 11
      pages/pallet/record/bindPalletRecord.vue
  46. 21
      pages/pallet/record/unBindPalletRecord.vue
  47. 2
      pages/productDismantle/coms/comProductDetailCard.vue
  48. 8
      pages/productDismantle/coms/comProductRecord.vue
  49. 33
      pages/productDismantle/job/productDismantleDetail.vue
  50. 103
      pages/productDismantle/record/productDismantleRecord.vue
  51. 2
      pages/productPutaway/coms/comProductDetailCard.vue
  52. 8
      pages/productPutaway/coms/comProductRecord.vue
  53. 35
      pages/productPutaway/job/productPutawayDetail.vue
  54. 125
      pages/productPutaway/record/productPutawayRecord.vue
  55. 3
      pages/productPutaway/request/putawayRequest.vue
  56. 7
      pages/productPutaway/request/putawayRequestDetail.vue
  57. 2
      pages/productReceipt/coms/comProductDetailCard.vue
  58. 6
      pages/productReceipt/coms/comProductRecord.vue
  59. 25
      pages/productReceipt/job/productReceiptDetail.vue
  60. 110
      pages/productReceipt/record/productReceiptRecord.vue
  61. 2
      pages/productionReceipt/coms/comProductionDetailCard.vue
  62. 8
      pages/productionReceipt/coms/comProductionRecord.vue
  63. 29
      pages/productionReceipt/job/productionReceiptDetail.vue
  64. 90
      pages/productionReceipt/record/productionReceiptRecord.vue
  65. 50
      pages/productionReturn/coms/comReturn.vue
  66. 36
      pages/productionReturn/job/returnDetail.vue
  67. 7
      pages/productionReturn/request/requestDetail.vue
  68. 2
      pages/productionReturn/request/returnToHoldRequest.vue
  69. 2
      pages/purchaseReceipt/coms/comReceiptDetailCard.vue
  70. 33
      pages/purchaseReceipt/job/receiptDetail.vue
  71. 27
      pages/purchaseReturn/job/returnDetail.vue
  72. 95
      pages/purchaseReturn/record/returnRecord.vue
  73. 3
      pages/purchaseReturn/request/returnRequest.vue
  74. 9
      pages/purchaseReturn/request/returnRequestDetail.vue
  75. 35
      pages/putaway/job/putawayDetail.vue
  76. 129
      pages/putaway/record/putawayRecord.vue
  77. 2
      pages/putaway/request/putawayRequest.vue
  78. 7
      pages/putaway/request/putawayRequestDetail.vue
  79. 32
      pages/repleinsh/job/repleinshDetail.vue
  80. 131
      pages/repleinsh/record/repleinshRecord.vue
  81. 66
      pages/repleinsh/request/repleinshRequest.vue
  82. 9
      pages/repleinsh/request/repleinshRequestDetail.vue
  83. 2
      pages/scrap/coms/comScrapDetailCard.vue
  84. 29
      pages/scrap/job/scrapJobDetail.vue
  85. 131
      pages/scrap/record/scrapRecord.vue
  86. 7
      pages/scrap/request/scrapRequestDetail.vue
  87. 81
      pages/scrap/request/scrapRrequest.vue
  88. 2
      pages/supplierDeliver/coms/comRecordDetailCard.vue
  89. 17
      pages/supplierDeliver/record/supplierDeliverRecordDetail.vue
  90. 139
      pages/transfer/coms/comTransferRecord.vue
  91. 38
      pages/transfer/job/issueDetail.vue
  92. 32
      pages/transfer/job/receiptDetail.vue
  93. 52
      pages/transfer/job/transferDetail.vue
  94. 2
      pages/unPlanned/coms/comIssueDetailCard.vue
  95. 2
      pages/unPlanned/coms/comReceiptDetailCard.vue
  96. 6
      pages/unPlanned/coms/comReceiptRecord.vue
  97. 35
      pages/unPlanned/job/issueJobDetail.vue
  98. 40
      pages/unPlanned/job/receiptJobDetail.vue
  99. 96
      pages/unPlanned/record/issueRecord.vue
  100. 49
      pages/unPlanned/record/receiptRecord.vue

567
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,
});
}

10
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;
}

16
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;
}

6
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)
}

2
mycomponents/detail/comDetailCard.vue

@ -7,7 +7,7 @@
</item-compare-qty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">

2
mycomponents/detail/comRequestDetailCard.vue

@ -10,7 +10,7 @@
</item-compare-qty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">

2
mycomponents/job/jobcomDetailCard.vue

@ -7,7 +7,7 @@
</item-compare-qty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">

7
mycomponents/record/recordComDetailCard.vue

@ -11,7 +11,7 @@
</uni-swipe-action>
</template>
<u-line />
<view class="" v-for="(detail,index) in dataContent.details">
<view class="" v-for="(detail,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,detail,index)"
:right-options="detail.scaned?scanOptions:detailOptions">
@ -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')
}
});

6
pages/count/coms/comCountDetailCard.vue

@ -10,7 +10,7 @@
</uni-swipe-action>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">
@ -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')

64
pages/count/job/countDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<requiredLocation title="盘点库位" :locationCode="fromLocationCode" :isShowEdit="jobContent.allowModifyLocation==1"
@ -78,9 +77,8 @@
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
@ -161,8 +159,8 @@
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.fromLocationCode = that.jobContent.locationCode;
that.detailList = res.data.subList;
that.detailSource = that.getDataSource(that.detailList)
that.subList = res.data.subList;
that.detailSource = that.getDataSource(that.subList)
} else {
that.showErrorMessage('列表数据为0');
}
@ -174,20 +172,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;
@ -202,7 +200,7 @@
qty: Number(res.qty),
handleQty: 0,
uom: res.uom,
details: []
subList: []
}
return item;
},
@ -218,13 +216,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();
}
},
@ -232,7 +230,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.scaned) {
if (detail.record != undefined) {
item.handleQty += Number(detail.record.qty)
@ -259,7 +257,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) {
@ -300,17 +298,17 @@
// var itemDetail;
// var index;
// for (var i = 0; i < detail.details.length; i++) {
// if (detail.details[i].packingNumber == packingNumber &&
// detail.details[i].batch == batch &&
// detail.details[i].inventoryStatus == inventoryStatus) {
// for (var i = 0; i < detail.subList.length; i++) {
// if (detail.subList[i].packingNumber == packingNumber &&
// detail.subList[i].batch == batch &&
// detail.subList[i].inventoryStatus == inventoryStatus) {
// index = i;
// itemDetail = detail.details[i]
// itemDetail = detail.subList[i]
// break
// }
// }
this.itemEditInfo = detail.details.find(item => {
this.itemEditInfo = detail.subList.find(item => {
if (item.packingNumber == packingNumber &&
item.batch == batch &&
item.inventoryStatus == inventoryStatus) {
@ -331,7 +329,7 @@
// this.$.refs["countDetail_" + index][0].edit(itemDetail)
if (res) {
this.$refs.CountQtyEdit.openEditPopup(this.itemEditInfo.record,
detail.details);
detail.subList);
} else {
this.scanPopupGetFocus();
}
@ -344,7 +342,7 @@
this.itemEditInfo.record.stdPackQty = result.package.stdPackQty;
this.itemEditInfo.record.stdPackUnit = result.package.stdPackUnit;
this.$refs.CountQtyEdit.openEditPopupShowSeconds(this.itemEditInfo.record, detail
.details);
.subList);
this.updateData()
}
}
@ -362,7 +360,7 @@
var item = this.createAddItemInfo(result.balance, result.package);
let newDetail = this.createAddDetailInfo(result.balance, result.package); //
newDetail.record = this.createRecordInfo(newDetail);
item.details.push(newDetail);
item.subList.push(newDetail);
this.detailSource.push(item)
this.updateData()
}
@ -378,7 +376,7 @@
detail.qty += Number(detail.qty)
let newDetail = this.createAddDetailInfo(result.balance, result.package); //
newDetail.record = this.createRecordInfo(newDetail);
detail.details.push(newDetail);
detail.subList.push(newDetail);
var test = this.detailSource;
this.updateData()
@ -395,7 +393,7 @@
qty: Number(balance.qty),
handleQty: 0,
uom: pack.uom,
details: []
subList: []
}
return item;
},
@ -451,9 +449,9 @@
},
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") {
//
@ -462,7 +460,7 @@
//
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this
.detailList.length + "]箱", res => {
.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
@ -515,7 +513,7 @@
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.details.forEach(detail => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
@ -559,12 +557,6 @@
this.scanPopupGetFocus();
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.receiptJob.scrollTop;
},
closeCommitMessage() {
setTimeout(() => {
uni.navigateTo({
@ -577,7 +569,7 @@
editItem(item) {
var detail = this.detailSource.find(r => r.itemCode == item.record.itemCode);
this.$refs.CountQtyEdit.openEditPopup(item.record,
detail.details);
detail.subList);
},
showCommitSuccessMessage(hint) {

47
pages/count/record/countRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
@ -96,12 +95,8 @@
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
@ -146,13 +141,13 @@
},
methods: {
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();
}
},
@ -160,7 +155,7 @@
calcHandleQty() {
for (let item of this.detailSource) {
item.handleQty = 0;
for (let detail of item.details) {
for (let detail of item.subList) {
if (item.scaned) {
item.handleQty += Number(detail.qty)
}
@ -203,8 +198,8 @@
inventoryStatus: []
};
balanceByLocation(param, res => {
this.detailList = res.Data;
this.detailSource = getDataSource(this.detailList);
this.subList = res.Data;
this.detailSource = getDataSource(this.subList);
});
},
@ -212,7 +207,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
@ -250,7 +245,7 @@
} else {
//
this.itemEditInfo = detail.details.find(item => {
this.itemEditInfo = detail.subList.find(item => {
if (item.packingNumber == packingNumber &&
item.batch == batch &&
item.inventoryStatus == inventoryStatus) {
@ -268,7 +263,7 @@
res => {
if (res) {
this.$refs.CountQtyEdit.openEditPopup(this.itemEditInfo,
detail.details);
detail.subList);
}
else
{
@ -293,7 +288,7 @@
addNewItemCodeToList(result) {
var item = this.createAddItemInfo(result.balance, result.package);
let newDetail = this.createAddDetailInfo(result.balance, result.package); //
item.details.push(newDetail);
item.subList.push(newDetail);
this.detailSource.push(item)
},
@ -311,7 +306,7 @@
addExistItemCodeToList(detail, result) {
detail.qty += detail.qty
let newDetail = this.createAddDetailInfo(result.balance, result.package); //
detail.details.push(newDetail);
detail.subList.push(newDetail);
},
createAddItemInfo(balance, pack) {
@ -323,7 +318,7 @@
qty: balance.qty,
handleQty: 0,
uom: pack.uom,
details: []
subList: []
}
return item;
},
@ -363,7 +358,7 @@
editItem(val) {
var detail = this.detailSource.find(r => r.itemCode == val.itemCode);
this.$refs.CountQtyEdit.openEditPopup(val,
detail.details);
detail.subList);
},
editConfirm() {
@ -406,8 +401,8 @@
// })
} else {
this.calcScanCount();
if (this.scanCount < this.detailList.length) {
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.detailList.length +
if (this.scanCount < this.subList.length) {
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList.length +
"]");
}
}
@ -446,13 +441,13 @@
extraProperties: this.jobContent.extraProperties,
siteld: this.jobContent.siteld,
code: "",
details: [
subList: [
],
}
this.detailSource.forEach(res => {
res.details.forEach(res1 => {
res.subList.forEach(res1 => {
if (res1.scaned) {
res1.FromLocationGroupCode = "";
res1.FromAreaCode = "";
@ -467,7 +462,7 @@
res1.Code = "";
res1.JobDetailID = res1.id;
res1.interfaceType = "jklxPURCHASE_RECEIPT";
params.details.push(res1)
params.subList.push(res1)
}
})
})
@ -502,12 +497,6 @@
this.scanPopupGetFocus();
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.receiptJob.scrollTop;
},
closeCommitMessage() {
setTimeout(() => {
uni.navigateTo({

6
pages/customerReturn/coms/comReturnRecord.vue

@ -12,7 +12,7 @@
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
@ -66,7 +66,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()
@ -157,7 +157,7 @@
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
this.dataContent.details.splice(index, 1)
this.dataContent.subList.splice(index, 1)
this.$emit('removePack')
}
});

31
pages/customerReturn/job/returnDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="page-main">
@ -86,12 +85,8 @@
received: false,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
managementList: [],
fromLocationCode: "",
toLocationCode: "",
@ -172,11 +167,11 @@
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.detailList = res.data.subList;
that.detailSource = getDataSource(that.detailList)
that.subList = res.data.subList;
that.detailSource = getDataSource(that.subList)
that.fromLocationCode = that.detailList[0].fromLocationCode
that.toLocationCode = that.detailList[0].toLocationCode
that.fromLocationCode = that.subList[0].fromLocationCode
that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
that.getLocationInfo(that.toLocationCode);
@ -209,7 +204,7 @@
//
continueScan() {
this.scanCount = this.getScanCount();
if (this.scanCount == this.detailList.length) {
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
@ -217,7 +212,7 @@
},
getScanCount(closeScan) {
let items = this.detailList.filter(r => {
let items = this.subList.filter(r => {
if (r.scaned) {
return r;
}
@ -239,7 +234,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) {
@ -273,7 +268,7 @@
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.details.find(r => {
var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber &&
r.batch == batch
})
@ -321,9 +316,9 @@
}
//
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") {
//
@ -331,7 +326,7 @@
} else {
//
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this.detailList.length + "]箱", res => {
"]箱总共[" + this.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
@ -382,7 +377,7 @@
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.details.forEach(detail => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);

22
pages/customerReturn/record/returnRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
@ -44,7 +43,9 @@
<script>
import {
getBasicCustomerList
getBasicCustomerList,
customerReturnRequestSubmit,
customerReturnRecordSubmit
} from '@/api/request2.js';
import {
getInventoryStatusDesc,
@ -93,9 +94,8 @@
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
locationTypeList: [],
toLocationInfo: {},
businessType: {},
@ -167,10 +167,10 @@
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.details.find(r => {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
@ -180,7 +180,7 @@
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -213,7 +213,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
@ -309,13 +309,13 @@
extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld,
Code: "",
details: [
subList: [
],
}
this.detailSource.forEach(res => {
res.details.forEach(res1 => {
res.subList.forEach(res1 => {
if (res1.scaned) {
res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = "";
@ -330,7 +330,7 @@
res1.record.Code = "";
res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT";
params.details.push(res1.record)
params.subList.push(res1.record)
}
})
})

7
pages/customerReturn/request/customerReturnRequestDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
@ -47,7 +46,7 @@
return {
id: '',
requestContent: {}, //
detailList: [], //details
subList: [], //details
detailSource: [], //
};
},
@ -85,8 +84,8 @@
} else {
if (res.data.subList.length > 0) {
that.requestContent = res.data;
that.detailList = res.data.subList;
that.detailSource = getDataSource(that.detailList);
that.subList = res.data.subList;
that.detailSource = getDataSource(that.subList);
} else {
that.showMessage('列表数据为0');
}

2
pages/deliver/coms/comDeliverDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">

27
pages/deliver/job/deliverDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="page-main">
@ -91,7 +90,7 @@
received: false,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
managementList: [],
fromLocationCode: "",
@ -173,11 +172,11 @@
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.detailList = res.data.subList;
that.fromLocationCode = that.detailList[0].fromLocationCode
that.toLocationCode = that.detailList[0].toLocationCode
that.subList = res.data.subList;
that.fromLocationCode = that.subList[0].fromLocationCode
that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getLocationTypeArray(that.jobContent.toLocationTypes)
that.detailSource = getDataSource(that.detailList)
that.detailSource = getDataSource(that.subList)
that.getLocationInfo(that.toLocationCode);
} else {
that.showMessage('列表数据为0');
@ -209,7 +208,7 @@
//
continueScan() {
this.scanCount = this.getScanCount();
if (this.scanCount == this.detailList.length) {
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
@ -217,7 +216,7 @@
},
getScanCount(closeScan) {
let items = this.detailList.filter(r => {
let items = this.subList.filter(r => {
if (r.scaned) {
return r;
}
@ -239,7 +238,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)
@ -274,7 +273,7 @@
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.details.find(r => {
var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber &&
r.batch == batch
})
@ -323,9 +322,9 @@
}
//
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") {
//
@ -333,7 +332,7 @@
} else {
//
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this.detailList.length + "]箱", res => {
"]箱总共[" + this.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
@ -383,7 +382,7 @@
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.details.forEach(detail => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);

906
pages/deliver/record/deliverRecord.vue

@ -1,450 +1,456 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
<com-blank-view @goScan='getLocation' v-if="detailSource.length==0"></com-blank-view>
</view>
<view class="page-wraper" v-if="detailSource.length>0">
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
:isShowLocation="true" @removeItem="removeItem(index,item)" @updateData="updateData"
@removePack="removePack">
</record-com-detail-card>
</view>
<u-line />
</view>
</scroll-view>
</view>
<view class="uni-flex uni-row u-col-center" style="width: 100%;">
<view class="" style=" text-align: center;font-size: 32rpx;font-weight: 700;margin-left: 10rpx;">
客户 :
</view>
<uni-data-picker v-if="detailSource.length>0" style="padding: 20rpx; background-color:#fff;"
class='uni-data-picker' placeholder="请选择客户" popup-title="选择客户" :localdata="customerList"
v-model="customer">
</uni-data-picker>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</view>
</view>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location>
<comMessage ref="comMessage"></comMessage>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location>
</view>
</template>
<script>
import {
getBasicCustomerList
} from '@/api/request2.js';
import {
goHome,
updateTitle,
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/basic.js';
import {
getBusinessType,
createItemInfo,
createDetailInfo,
calcHandleQty
} from '@/common/record.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
export default {
components: {
winScanButton,
winScanPack,
requiredLocation,
comBlankView,
winScanLocation,
comMessage,
winScanPackAndLocation,
recordComDetailCard
},
data() {
return {
id: '',
receiptJob: {},
received: false,
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
detailSource: [], //
scrollTop: 0,
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
fromLocationInfo: {},
fromLocationCode: "",
toLocationInfo: {},
toLocationCode: "",
isShowLocation: false,
fromlocationTypeList: [],
tolocationTypeList: [],
allowModifyLocation: false,
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {},
customerList: [],
customer: "",
fromType:""
};
},
onLoad(option) {
this.fromType = option.fromType
if(this.fromType=="requestType"){ updateTitle("制品发货申请") }else { updateTitle("制品发货记录") }
var typeCode = "Deliver"
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message );
}
});
getBasicCustomerList().then(res => {
if (res.data.length > 0) {
var list = res.data;
list.forEach(item => {
item.text = item.name
item.value = item.code
})
this.customerList = list;
}
}).catch(error => {
this.showErrorMessage(error)
})
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}
},
//
onBackPress(e) {},
onPullDownRefresh() {},
mounted() {
},
methods: {
getScanResult(result) {
let balance = result.balance;
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) {
return res
}
})
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.details.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus) {
return r;
}
})
if (detail == undefined) {
let newDetail =createDetailInfo(balance, pack);
item.details.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
}
}
}
this.calcHandleQty();
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
calcHandleQty() {
calcHandleQty(this.detailSource);
this.$forceUpdate();
},
updateData() {
this.calcHandleQty();
},
removeItem(index, item) {
this.detailSource.splice(index, 1)
},
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
this.detailSource.splice(i, 1)
}
}
this.updateData();
},
openScanPopup() {
if (this.fromLocationCode == "") {
this.showFromLocationPopup();
return
}
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
},
showFromLocationPopup() {
this.$nextTick(() => {
this.$refs.scanLocationCode.openScanPopup();
})
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
},
scanLocationCode(location, code) {
this.toLocationCode = code
this.toLocationCode = location;
},
commit() {
if (this.customer == "") {
this.showMessage("请先选择客户")
return;
}
console.log("客户", this.customer)
if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
return;
}
//
uni.showLoading({
title: "提交中....",
mask: true
});
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
// (this.id, params).then(res => {
// uni.hideLoading()
// if (res.data) {
// var hint = res.data.Number;
// this.showCommitSuccessMessage("" + hint, )
// } else {
// this.showErrorMessage("")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
},
setParams() {
var params = {
requestNumber: this.jobContent.requestNumber,
jobNumber: "",
asnNumber: this.jobContent.asnNumber,
ppNumber: this.jobContent.ppNumber,
supplierCode: this.jobContent.supplierCode,
receiptDock: this.jobContent.receiptDock,
carrierCode: this.jobContent.carrierCode,
transferMode: this.jobContent.transferMode,
vehiclePlateNumber: this.jobContent.vehiclePlateNumber,
fromWarehouseCode: this.toLocationInfo.WarehouseCode,
toWarehouseCode: this.toLocationInfo.WarehouseCode,
OutTransaction: this.businessTypeInfo.OutTransactionType, //
InTransaction: this.businessTypeInfo.InTransactionType, //
executeTime: "2023-08-4 16:30:11", //
activeDate: "2023-08-4 16:30:11", //
available: "1", // 0,1
requestTime: this.jobContent.requestTime,
dueTime: "2023-08-4 16:30:11", //
departmentCode: this.jobContent.departmentCode,
UserPositionCode: "", //
interfaceType: "jklxPURCHASE_RECEIPT", //
Number: this.jobContent.Number,
businessType: this.jobContent.businessType,
remark: this.jobContent.remark,
creationTime: this.jobContent.creationTime,
Creatorld: this.jobContent.Creatorld,
creatorName: this.jobContent.creatorName,
extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld,
Code: "",
details: [
],
}
this.detailSource.forEach(res => {
res.details.forEach(res1 => {
if (res1.scaned) {
res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = "";
res1.record.ToLocationGroupCode = this.toLocationInfo.LocationGroupCode;
res1.record.ToAreaCode = this.toLocationInfo.AreaCode;
res1.record.VisualInspectResult = ""; //
res1.record.VisualInspectPhotos = ""; //
res1.record.FailedReason = ""; //
res1.record.MassDefect = ""; //
res1.record.SinglePrice = ""; //
res1.record.Amount = ""; //
res1.record.Code = "";
res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT";
params.details.push(res1.record)
}
})
})
return params;
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {}
});
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
afterCloseMessage() {
this.scanPopupGetFocus();
},
closeScanMessage() {
this.scanPopupGetFocus();
},
getLocation(location, code) {
this.getFromLocationCode(location, code)
},
getFromLocationCode(location, code) {
this.fromLocationInfo = location;
this.fromLocationCode = code;
this.openScanPopup();
},
getToLocationCode(location, code) {
if (this.fromLocationCode == code) {
uni.showToast({
title: "来源库位[" + this.fromLocationCode + "]不能与目标库位[" + code + "]一致",
duration: 2000
})
return
}
this.ToLocationCodeInfo = location;
this.toLocationCode = code;
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.fromLocationCode = '';
})
},
updateData() {
this.calcHandleQty();
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
if (item.qty == 0) {
this.detailSource.splice(i, 1)
}
}
}
}
}
</script>
<style scoped lang="scss">
page {
width: 100%;
height: 100%;
background-color: #fff;
}
.page-wraper {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}
.page-main {
flex: 1;
position: relative;
}
.page-main-scroll {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.page-main-list {
/* height: 80rpx;
line-height: 80rpx; */
text-align: center;
background: #e0e0e0;
}
</style>
<template>
<view class="page-wraper">
<view class="">
<com-blank-view @goScan='getLocation' v-if="detailSource.length==0"></com-blank-view>
</view>
<view class="page-wraper" v-if="detailSource.length>0">
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
:isShowLocation="true" @removeItem="removeItem(index,item)" @updateData="updateData"
@removePack="removePack">
</record-com-detail-card>
</view>
<u-line />
</view>
</scroll-view>
</view>
<view class="uni-flex uni-row u-col-center" style="width: 100%;">
<view class="" style=" text-align: center;font-size: 32rpx;font-weight: 700;margin-left: 10rpx;">
客户 :
</view>
<uni-data-picker v-if="detailSource.length>0" style="padding: 20rpx; background-color:#fff;"
class='uni-data-picker' placeholder="请选择客户" popup-title="选择客户" :localdata="customerList"
v-model="customer">
</uni-data-picker>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</view>
</view>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location>
<comMessage ref="comMessage"></comMessage>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location>
</view>
</template>
<script>
import {
getBasicCustomerList,
deliverRequestSubmit,
deliverRecordSubmit
} from '@/api/request2.js';
import {
goHome,
updateTitle
} from '@/common/basic.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/directory.js';
import {
getBusinessType,
createItemInfo,
createDetailInfo,
calcHandleQty
} from '@/common/record.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
export default {
components: {
winScanButton,
winScanPack,
requiredLocation,
comBlankView,
winScanLocation,
comMessage,
winScanPackAndLocation,
recordComDetailCard
},
data() {
return {
id: '',
receiptJob: {},
received: false,
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
subList: [], //subList
detailSource: [], //
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
fromLocationInfo: {},
fromLocationCode: "",
toLocationInfo: {},
toLocationCode: "",
isShowLocation: false,
fromlocationTypeList: [],
tolocationTypeList: [],
allowModifyLocation: false,
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {},
customerList: [],
customer: "",
fromType: ""
};
},
onLoad(option) {
this.fromType = option.fromType
if (this.fromType == "requestType") {
updateTitle("制品发货申请")
} else {
updateTitle("制品发货记录")
}
var typeCode = "Deliver"
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message);
}
});
getBasicCustomerList().then(res => {
if (res.data.length > 0) {
var list = res.data;
list.forEach(item => {
item.text = item.name
item.value = item.code
})
this.customerList = list;
}
}).catch(error => {
this.showErrorMessage(error)
})
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}
},
//
onBackPress(e) {},
onPullDownRefresh() {},
mounted() {},
methods: {
getScanResult(result) {
let balance = result.balance;
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) {
return res
}
})
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus) {
return r;
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
}
}
}
this.calcHandleQty();
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
calcHandleQty() {
calcHandleQty(this.detailSource);
this.$forceUpdate();
},
updateData() {
this.calcHandleQty();
},
removeItem(index, item) {
this.detailSource.splice(index, 1)
},
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
this.updateData();
},
openScanPopup() {
if (this.fromLocationCode == "") {
this.showFromLocationPopup();
return
}
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
},
showFromLocationPopup() {
this.$nextTick(() => {
this.$refs.scanLocationCode.openScanPopup();
})
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
},
scanLocationCode(location, code) {
this.toLocationCode = code
this.toLocationCode = location;
},
commit() {
if (this.customer == "") {
this.showMessage("请先选择客户")
return;
}
console.log("客户", this.customer)
if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
return;
}
//
uni.showLoading({
title: "提交中....",
mask: true
});
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
// (this.id, params).then(res => {
// uni.hideLoading()
// if (res.data) {
// var hint = res.data.Number;
// this.showCommitSuccessMessage("" + hint, )
// } else {
// this.showErrorMessage("")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
},
setParams() {
var params = {
requestNumber: this.jobContent.requestNumber,
jobNumber: "",
asnNumber: this.jobContent.asnNumber,
ppNumber: this.jobContent.ppNumber,
supplierCode: this.jobContent.supplierCode,
receiptDock: this.jobContent.receiptDock,
carrierCode: this.jobContent.carrierCode,
transferMode: this.jobContent.transferMode,
vehiclePlateNumber: this.jobContent.vehiclePlateNumber,
fromWarehouseCode: this.toLocationInfo.WarehouseCode,
toWarehouseCode: this.toLocationInfo.WarehouseCode,
OutTransaction: this.businessTypeInfo.OutTransactionType, //
InTransaction: this.businessTypeInfo.InTransactionType, //
executeTime: "2023-08-4 16:30:11", //
activeDate: "2023-08-4 16:30:11", //
available: "1", // 0,1
requestTime: this.jobContent.requestTime,
dueTime: "2023-08-4 16:30:11", //
departmentCode: this.jobContent.departmentCode,
UserPositionCode: "", //
interfaceType: "jklxPURCHASE_RECEIPT", //
Number: this.jobContent.Number,
businessType: this.jobContent.businessType,
remark: this.jobContent.remark,
creationTime: this.jobContent.creationTime,
Creatorld: this.jobContent.Creatorld,
creatorName: this.jobContent.creatorName,
extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld,
Code: "",
subList: [
],
}
this.detailSource.forEach(res => {
res.subList.forEach(res1 => {
if (res1.scaned) {
res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = "";
res1.record.ToLocationGroupCode = this.toLocationInfo.LocationGroupCode;
res1.record.ToAreaCode = this.toLocationInfo.AreaCode;
res1.record.VisualInspectResult = ""; //
res1.record.VisualInspectPhotos = ""; //
res1.record.FailedReason = ""; //
res1.record.MassDefect = ""; //
res1.record.SinglePrice = ""; //
res1.record.Amount = ""; //
res1.record.Code = "";
res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT";
params.subList.push(res1.record)
}
})
})
return params;
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {}
});
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
afterCloseMessage() {
this.scanPopupGetFocus();
},
closeScanMessage() {
this.scanPopupGetFocus();
},
getLocation(location, code) {
this.getFromLocationCode(location, code)
},
getFromLocationCode(location, code) {
this.fromLocationInfo = location;
this.fromLocationCode = code;
this.openScanPopup();
},
getToLocationCode(location, code) {
if (this.fromLocationCode == code) {
uni.showToast({
title: "来源库位[" + this.fromLocationCode + "]不能与目标库位[" + code + "]一致",
duration: 2000
})
return
}
this.ToLocationCodeInfo = location;
this.toLocationCode = code;
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.fromLocationCode = '';
})
},
updateData() {
this.calcHandleQty();
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
if (item.qty == 0) {
this.detailSource.splice(i, 1)
}
}
}
}
}
</script>
<style scoped lang="scss">
page {
width: 100%;
height: 100%;
background-color: #fff;
}
.page-wraper {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}
.page-main {
flex: 1;
position: relative;
}
.page-main-scroll {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.page-main-list {
/* height: 80rpx;
line-height: 80rpx; */
text-align: center;
background: #e0e0e0;
}
</style>

2
pages/deliver/request/deliverRequest.vue

@ -14,9 +14,9 @@
</view>
</uni-swipe-action>
<uni-load-more :status="loadingType" />
<requestButton @goScan='openScanDetailPopup'></requestButton>
<request-info-popup ref='requestInfoPopup'></request-info-popup>
</view>
<requestButton @goScan='openScanDetailPopup'></requestButton>
</view>
<comMessage ref="comMessage"></comMessage>
</template>

9
pages/deliver/request/deliverRequestDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
@ -46,7 +45,7 @@
return {
id: '',
requestContent: {}, //
detailList: [], //details
subList: [], //details
detailSource: [], //
};
},
@ -84,11 +83,11 @@
} else {
if (res.data.subList.length > 0) {
that.requestContent = res.data;
that.detailList = res.data.subList;
that.detailList.forEach(res => {
that.subList = res.data.subList;
that.subList.forEach(res => {
res.fromLocationCode = res.toLocationCode
})
that.detailSource = getDataSource(that.detailList);
that.detailSource = getDataSource(that.subList);
} else {
that.showMessage('列表数据为0');
}

2
pages/inspect/coms/comInspectDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item :right-options="item.scaned?scanOptions:detailOptions"
@click="swipeClick($event,item)">

4
pages/inspect/coms/inspectComDetailCard.vue

@ -10,7 +10,7 @@
</view>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
@ -159,7 +159,7 @@
this.$emit('updateData')
},
getInspectResult(result){
this.dataContent.details[this.editIndex]= result;
this.dataContent.subList[this.editIndex]= result;
if (this.$refs.collapse1 != undefined) {
this.$nextTick(res => {
this.$refs.collapse1.resize()

4
pages/inspect/coms/inspectEdit.vue

@ -80,10 +80,6 @@
id: '',
failedReasonIndex: 0,
failedReasonArray: [],
scrollTop: 0,
old: {
scrollTop: 0
},
dataContent: {},
failedReasonArray: []
}

100
pages/inspect/job/inspectDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="page-main">
@ -44,8 +43,10 @@
goHome,
getCurrDateTime,
getPackingNumberAndBatch,
getInventoryStatusName
} from '@/common/basic.js';
import {
getInventoryStatusName
} from '@/common/directory.js';
import {
getManagementPrecisions
@ -81,7 +82,7 @@
received: false,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
toLocationInfo: {},
businessTypeInfo: {},
@ -94,7 +95,7 @@
this.id = option.id;
if (this.id != undefined) {
// //
// if (option.status == "JOB_PENDING") {
// if (option.status == "1") {
// this.receive((callback => {
// this.received = true;
// this.getDetail();
@ -171,8 +172,8 @@
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.detailList = res.data.subList;
that.detailList.forEach(res => {
that.subList = res.data.subList;
that.subList.forEach(res => {
res.batch =that.jobContent.batch
res.goodQty = 0;
res.failedQty = 0;
@ -183,7 +184,7 @@
res.photos = ""
res.inspectResult =""
})
that.detailSource = getDataSource(that.detailList);
that.detailSource = getDataSource(that.subList);
} else {
that.showMessage('列表数据为0');
}
@ -197,13 +198,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();
}
},
@ -217,8 +218,8 @@
//
continueScan() {
this.scanCount = getScanCount(this.detailList);
if (this.scanCount == this.detailList.length) {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
@ -234,7 +235,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) {
@ -262,7 +263,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
@ -300,22 +301,24 @@
}
},
async commit() {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
commit() {
//
if (this.scanCount == this.subList.length) {
this.submitJob();
} else {
this.scanCount = getScanCount(this.detailList);
if (this.scanCount < this.detailList.length) {
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.submitJob();
} else {
//
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this
.detailList.length + "]箱", res => {
.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
});
} else {
this.submitJob();
}
}
},
@ -327,18 +330,18 @@
});
var params = this.setParams();
// submitInspectJob(this.id, params).then(res => {
// if (res.data) {
// var hint = res.data.Number;
// this.showCommitSuccessMessage(res.data.Number)
// uni.hideLoading();
// } else {
// this.showErrorMessage("");
// }
// }).catch(error => {
// uni.hideLoading();
// this.showErrorMessage(error);
// })
console.log("提交参数", params)
inspectJobSubmit(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);
})
},
@ -397,22 +400,10 @@
this.scanPopupGetFocus();
},
closeCommitMessage() {
setTimeout(() => {
uni.navigateTo({
url: './receipt'
})
})
//
uni.hideLoading();
},
setParams() {
var list = []
this.detailSource.forEach(res => {
res.details.forEach(detail => {
res.subList.forEach(detail => {
if (detail.scaned) {
detail.sampleQty = detail.qty;
detail.failedQty = detail.failedQty;
@ -439,20 +430,17 @@
})
})
this.jobContent.subList = list
var tttt = JSON.stringify(this.jobContent);
console.log("提交参数", tttt)
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
setTimeout(() => {
uni.navigateTo({
url: './inspectJob'
})
}, 3000)
})
setTimeout(() => {
uni.navigateTo({
url: './receiptJob'
})
}, 3000)
},
}

15
pages/inspect/job/inspectResult.vue

@ -110,7 +110,7 @@
<scroll-view scroll-y="true" class="scroll-detail">
<view class=""
style="font-size: 35rpx;display: flex;flex-direction: row;align-items: center;width: 100%;"
v-for="(item, index) in detailList" :key="item.id">
v-for="(item, index) in subList" :key="item.id">
<text style="font-size: 35rpx;margin-right: 20rpx;">{{index+1}}.</text>
<view class="">
@ -170,7 +170,7 @@
locations: [],
value: ['0'],
jobContent: {}, //
detailList: [], //details
subList: [], //details
detailSource: [], //
nextActionList: [],
nextAction: null,
@ -211,7 +211,7 @@
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.detailList = res.data.subList;
that.subList = res.data.subList;
that.inspectType =that.jobContent.inspectType;
that.jobContent.goodQty = null, //
that.jobContent.failedQty = null,//
@ -312,6 +312,9 @@
res.goodQty = this.jobContent.receiveQty;
res.fromInventory_status = res.inventoryStatus
res.toInventoryStatus = res.inventoryStatus
res.failedReason ="";
res.photos = ""
res.inspectResult =""
})
var tttt = JSON.stringify(this.jobContent);
console.log("提交参数", tttt)
@ -332,6 +335,9 @@
res.goodQty = 0;
res.from_inventory_status = res.inventoryStatus
res.toInventoryStatus = "NOK"
res.failedReason ="";
res.photos = ""
res.inspectResult =""
})
var tttt = JSON.stringify(this.jobContent);
console.log("提交参数", tttt)
@ -351,6 +357,9 @@
res.goodQty =this.jobContent.receiveQty;
res.fromInventory_status = res.inventoryStatus
res.toInventoryStatus = res.inventoryStatus
res.failedReason ="";
res.photos = ""
res.inspectResult =""
})
var tttt = JSON.stringify(this.jobContent);
console.log("提交参数", tttt)

10
pages/inspect/request/inspectRequestDetail.vue

@ -57,7 +57,7 @@
return {
id: '',
requestContent: {}, //
detailList: [], //details
subList: [], //details
detailSource: [], //
};
},
@ -94,10 +94,10 @@
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.detailList = res.data.subList;
that.detailSource = getDataSource(that.detailList)
// that.detailList = res.data[0];
// that.detailList.forEach(res=>{
that.subList = res.data.subList;
that.detailSource = getDataSource(that.subList)
// that.subList = res.data[0];
// that.subList.forEach(res=>{
// res.packingNumber =res.toPackingNumber
// res.batch =res.fromBatch
// })

2
pages/inventoryMove/coms/comInventoryDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item :right-options="item.scaned?scanOptions:detailOptions"
@click="swipeClick($event,item)">

12
pages/inventoryMove/coms/comMove.vue

@ -188,10 +188,10 @@
if (item == undefined) {
var itemp = this.createItemInfo(balance,pack);
let newDetail = this.createDetailInfo(balance, pack); //
itemp.details.push(newDetail);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.details.find(r => {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
@ -203,7 +203,7 @@
if (detail == undefined) {
let newDetail = this.createDetailInfo(balance, pack);
item.details.push(newDetail);
item.subList.push(newDetail);
} else {
this.showErrorMessage(balance.packingNumber + "已经在列表中")
}
@ -221,7 +221,7 @@
qty: balance.qty,
handleQty: 0,
uom: pack.uom,
details: []
subList: []
}
return item;
},
@ -239,7 +239,7 @@
calcHandleQty() {
for (let item of this.detailSource) {
item.qty = 0;
for (let detail of item.details) {
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += detail.qty
}
@ -262,7 +262,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}

4
pages/inventoryMove/coms/comMoveRecord.vue

@ -11,7 +11,7 @@
</uni-swipe-action>
</template>
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
@ -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)
}
});

52
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('请完成扫描后,再进行提交<br>' + "已经扫描[" + 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({

14
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) {

10
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();

6
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) {

14
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();

4
pages/issue/request/issueRequest.vue

@ -14,10 +14,10 @@
</view>
</uni-swipe-action>
<uni-load-more :status="loadingType" />
<requestButton @goScan='openScanDetailPopup'></requestButton>
<request-info-popup ref='requestInfoPopup'></request-info-popup>
</view>
<requestButton @goScan='openScanDetailPopup'></requestButton>
<comMessage ref="comMessage"></comMessage>
</view>
</template>

9
pages/issue/request/issueRequestDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
@ -48,7 +47,7 @@
return {
id: '',
requestContent: {}, //
detailList: [], //details
subList: [], //
detailSource: [], //
};
},
@ -86,11 +85,11 @@
} else {
if (res.data.subList.length > 0) {
that.requestContent = res.data;
that.detailList = res.data.subList;
that.detailList.forEach(res=>{
that.subList = res.data.subList;
that.subList.forEach(res=>{
res.fromLocationCode = res.toLocationCode
})
that.detailSource = getDataSource(that.detailList);
that.detailSource = getDataSource(that.subList);
updateTitle(this.requestContent.number);
} else {
that.showMessage('列表数据为0');

2
pages/package/coms/comOverRecord.vue

@ -3,7 +3,7 @@
<record-com-detail-card :dataContent="dataContent" @removeItem="removeItem(index,dataContent)" :isShowItemQty='false'>
</record-com-detail-card>
<view class="" v-for="(detail,index) in dataContent.details">
<view class="" v-for="(detail,index) in dataContent.subList">
<view v-if="detail.Records!=undefined" style='margin-left: 20px;' v-for="(record,index) in detail.Records">
<uni-swipe-action ref="">
<uni-swipe-action-item @click="swipeClick($event,detail,record,index)"

2
pages/package/coms/comPackageRecord.vue

@ -4,7 +4,7 @@
:isShowItemQty='false'>
</record-com-detail-card>
<view class="" v-for="(detail,index) in dataContent.details">
<view class="" v-for="(detail,index) in dataContent.subList">
<view v-if="detail.Records!=undefined" style='margin-left: 20px;' v-for="(record,index) in detail.Records">
<uni-swipe-action ref="">
<uni-swipe-action-item @click="swipeClick($event,detail,record,index)"

20
pages/package/record/mergePackageRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
@ -89,12 +88,7 @@
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
@ -155,10 +149,10 @@
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.details.find(r => {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
@ -168,7 +162,7 @@
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -201,7 +195,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
@ -296,13 +290,13 @@
extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld,
Code: "",
details: [
subList: [
],
}
this.detailSource.forEach(res => {
res.details.forEach(res1 => {
res.subList.forEach(res1 => {
if (res1.scaned) {
res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = "";
@ -317,7 +311,7 @@
res1.record.Code = "";
res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT";
params.details.push(res1.record)
params.subList.push(res1.record)
}
})
})

21
pages/package/record/mergePackageRecord.vue.b17252

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
@ -89,12 +88,8 @@
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //任务内容
detailList: [], //接口返回的任务details
subList: [], //接口返回的任务subList
detailSource: [], //绑定在页面上的数据源
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
@ -155,10 +150,10 @@
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.details.find(r => {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
@ -168,7 +163,7 @@
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -201,7 +196,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
@ -296,13 +291,13 @@
extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld,
Code: "",
details: [
subList: [
],
}
this.detailSource.forEach(res => {
res.details.forEach(res1 => {
res.subList.forEach(res1 => {
if (res1.scaned) {
res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = "";
@ -317,7 +312,7 @@
res1.record.Code = "";
res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT";
params.details.push(res1.record)
params.subList.push(res1.record)
}
})
})

17
pages/package/record/mergePackageRecord.vue.y17252

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
@ -89,7 +88,7 @@
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //任务内容
detailList: [], //接口返回的任务details
subList: [], //接口返回的任务subList
detailSource: [], //绑定在页面上的数据源
scrollTop: 0,
old: {
@ -155,10 +154,10 @@
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.details.find(r => {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
@ -168,7 +167,7 @@
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -201,7 +200,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
@ -296,13 +295,13 @@
extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld,
Code: "",
details: [
subList: [
],
}
this.detailSource.forEach(res => {
res.details.forEach(res1 => {
res.subList.forEach(res1 => {
if (res1.scaned) {
res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = "";
@ -317,7 +316,7 @@
res1.record.Code = "";
res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT";
params.details.push(res1.record)
params.subList.push(res1.record)
}
})
})

18
pages/package/record/overPackageRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
@ -86,12 +85,7 @@
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [],
toLocationInfo: {},
fromLocationInfo: {},
@ -154,7 +148,7 @@
newDetail.scaned = false;
newDetail.Records = [];
newDetail.handleQty = 0
itemp.details.push(newDetail);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -184,23 +178,23 @@
uom: uom
}
var sumQty = 0;
item.details[0].Records.forEach(function(item1, index) {
item.subList[0].Records.forEach(function(item1, index) {
sumQty += item1.qty;
});
if ((Number(qty) + sumQty) > item.details[0].qty) {
if ((Number(qty) + sumQty) > item.subList[0].qty) {
this.showErrorMessage("扫描数量总和【" + (Number(qty) + sumQty) + "】(当前输入数量【" + qty + "】+已添加数量【" +
sumQty +
"】)已超过拆包箱码的数量【" + Number(item.details[0].qty) + "】!");
"】)已超过拆包箱码的数量【" + Number(item.subList[0].qty) + "】!");
return;
}
item.details[0].Records.push(temp)
item.subList[0].Records.push(temp)
this.$forceUpdate();
}
this.calcHandleQty();
},
calcHandleQty() {
for (let detail of this.detailSource[0].details) {
for (let detail of this.detailSource[0].subList) {
let hQty = 0;
if (detail.Records.length > 0) {

18
pages/package/record/splitPackageRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
@ -85,12 +84,7 @@
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [],
toLocationInfo: {},
fromLocationInfo: {},
@ -153,7 +147,7 @@
newDetail.scaned = false;
newDetail.Records = [];
newDetail.handleQty = 0
itemp.details.push(newDetail);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -184,23 +178,23 @@
}
var sumQty = 0;
item.details[0].Records.forEach(function(item1, index) {
item.subList[0].Records.forEach(function(item1, index) {
sumQty += item1.qty;
});
if ((Number(qty) + sumQty) > item.details[0].qty) {
if ((Number(qty) + sumQty) > item.subList[0].qty) {
this.showErrorMessage("扫描数量总和【" + (Number(qty) + sumQty) + "】(当前输入数量【" + qty + "】+已添加数量【" +
sumQty +
"】)已超过拆包箱码的数量【" + Number(item.details[0].qty) + "】!");
"】)已超过拆包箱码的数量【" + Number(item.subList[0].qty) + "】!");
return;
}
item.details[0].Records.push(temp);
item.subList[0].Records.push(temp);
this.$forceUpdate();
}
this.calcHandleQty();
},
calcHandleQty() {
for (let detail of this.detailSource[0].details) {
for (let detail of this.detailSource[0].subList) {
let hQty = 0;
if (detail.Records.length > 0) {

6
pages/pallet/coms/comPalletRecord.vue

@ -12,7 +12,7 @@
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
@ -88,7 +88,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()
@ -158,7 +158,7 @@
res => {
if (res) {
item.scaned=false;
// this.dataContent.details.splice(index, 1)
// this.dataContent.subList.splice(index, 1)
// this.$emit('removePack')
}
});

11
pages/pallet/record/bindPalletRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
@ -78,7 +77,7 @@
id: '',
settingParam: {},
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
containerCode: "",
};
@ -115,17 +114,17 @@
if (item == undefined) {
var itemp = createItemInfo(result.label, pack);
let newDetail = createDetailInfo(result.label, pack); //
itemp.details.push(newDetail);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.details.find(r => {
var detail = item.subList.find(r => {
if (r.packingNumber == packingNumber) {
return r;
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(result.label, pack);
item.details.push(newDetail);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + packingNumber + "批次[" + batch + "]已经在列表中")
@ -158,7 +157,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}

21
pages/pallet/record/unBindPalletRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
@ -87,12 +86,8 @@
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
@ -136,7 +131,7 @@
if (detail == undefined) {
this.showMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.details.find(r => r.packingNumber == packingNumber && r.batch == batch);
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch);
if (itemDetail == undefined) {
this.showMessage("箱码【" + packingNumber + "】,批次【" + batch + "】不在列表中")
} else {
@ -172,20 +167,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;
@ -207,7 +202,7 @@
qty: res.qty,
handleQty: 0,
uom: res.uom,
details: []
subList: []
}
return item;
},
@ -223,7 +218,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}

2
pages/productDismantle/coms/comProductDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">

8
pages/productDismantle/coms/comProductRecord.vue

@ -12,7 +12,7 @@
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
@ -80,7 +80,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()
@ -143,7 +143,7 @@
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
this.dataContent.details.splice(index, 1)
this.dataContent.subList.splice(index, 1)
this.$emit('updateData')
}
});
@ -181,7 +181,7 @@
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
this.dataContent.details.splice(index, 1)
this.dataContent.subList.splice(index, 1)
this.$emit('removePack')
}
});

33
pages/productDismantle/job/productDismantleDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
@ -89,12 +88,8 @@
received: false,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
managementList: [],
fromLocationCode: "",
toLocationCode: "",
@ -172,11 +167,11 @@
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.detailList = res.data.subList;
that.fromLocationCode = that.detailList[0].fromLocationCode
that.toLocationCode = that.detailList[0].toLocationCode
that.subList = res.data.subList;
that.fromLocationCode = that.subList[0].fromLocationCode
that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getLocationTypeArray(that.jobContent.toLocationTypes)
that.detailSource = getDataSource(that.detailList)
that.detailSource = getDataSource(that.subList)
that.getLocationInfo(that.toLocationCode);
} else {
that.showMessage('列表数据为0');
@ -207,7 +202,7 @@
//
continueScan() {
this.scanCount = this.getScanCount();
if (this.scanCount == this.detailList.length) {
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
@ -215,7 +210,7 @@
},
getScanCount(closeScan) {
let items = this.detailList.filter(r => {
let items = this.subList.filter(r => {
if (r.scaned) {
return r;
}
@ -237,7 +232,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) {
@ -271,7 +266,7 @@
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.details.find(r => {
var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber &&
r.batch == batch &&
r.fromLocationCode == locationCode
@ -324,9 +319,9 @@
console.log("校验通过")
//
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") {
//
@ -335,7 +330,7 @@
//
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this
.detailList.length + "]箱", res => {
.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
@ -383,7 +378,7 @@
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.details.forEach(detail => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
@ -412,7 +407,7 @@
var isHaveNullLocation = false;
var nullLocationList = [];
this.detailSource.forEach(item => {
item.details.forEach(detail => {
item.subList.forEach(detail => {
if (detail.toLocationCode == null || detail.toLocationCode == "") {
nullLocationList.push(detail)
}

103
pages/productDismantle/record/productDismantleRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
@ -43,15 +42,18 @@
</template>
<script>
import {
productDismantleRecordSubmit,
} from '@/api/request2.js';
import {
goHome,
} from '@/common/basic.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/directory.js';
import {
getBusinessType,
createItemInfo,
@ -68,8 +70,8 @@
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
export default {
components: {
winScanButton,
@ -90,12 +92,8 @@
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
@ -121,7 +119,7 @@
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message );
this.$refs.comMessage.showBreakMessage(res.message);
}
});
},
@ -136,8 +134,7 @@
onPullDownRefresh() {},
mounted() {
},
mounted() {},
methods: {
getScanResult(result) {
let balance = result.balance;
@ -151,10 +148,10 @@
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.details.find(r => {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
@ -164,7 +161,7 @@
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -196,7 +193,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
@ -243,14 +240,12 @@
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
// (this.id, params).then(res => {
// productDismantleRecordSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// var hint = res.data.Number;
// this.showCommitSuccessMessage("" + hint, )
// this.showCommitSuccessMessage("<br>" + res.data, )
// } else {
// this.showErrorMessage("")
// this.showErrorMessage(""+res.msg)
// }
// }).catch(error => {
// uni.hideLoading()
@ -260,64 +255,20 @@
},
setParams() {
var params = {
requestNumber: this.jobContent.requestNumber,
jobNumber: "",
asnNumber: this.jobContent.asnNumber,
ppNumber: this.jobContent.ppNumber,
supplierCode: this.jobContent.supplierCode,
receiptDock: this.jobContent.receiptDock,
carrierCode: this.jobContent.carrierCode,
transferMode: this.jobContent.transferMode,
vehiclePlateNumber: this.jobContent.vehiclePlateNumber,
fromWarehouseCode: this.toLocationInfo.WarehouseCode,
toWarehouseCode: this.toLocationInfo.WarehouseCode,
OutTransaction: this.businessTypeInfo.OutTransactionType, //
InTransaction: this.businessTypeInfo.InTransactionType, //
executeTime: "2023-08-4 16:30:11", //
activeDate: "2023-08-4 16:30:11", //
available: "1", // 0,1
requestTime: this.jobContent.requestTime,
dueTime: "2023-08-4 16:30:11", //
departmentCode: this.jobContent.departmentCode,
UserPositionCode: "", //
interfaceType: "jklxPURCHASE_RECEIPT", //
Number: this.jobContent.Number,
businessType: this.jobContent.businessType,
remark: this.jobContent.remark,
creationTime: this.jobContent.creationTime,
Creatorld: this.jobContent.Creatorld,
creatorName: this.jobContent.creatorName,
extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld,
Code: "",
details: [
],
}
this.detailSource.forEach(res => {
res.details.forEach(res1 => {
if (res1.scaned) {
res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = "";
res1.record.ToLocationGroupCode = this.toLocationInfo.LocationGroupCode;
res1.record.ToAreaCode = this.toLocationInfo.AreaCode;
res1.record.VisualInspectResult = ""; //
res1.record.VisualInspectPhotos = ""; //
res1.record.FailedReason = ""; //
res1.record.MassDefect = ""; //
res1.record.SinglePrice = ""; //
res1.record.Amount = ""; //
res1.record.Code = "";
res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT";
params.details.push(res1.record)
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)
}
})
})
return subList;
return params;
},
showMessage(message) {

2
pages/productPutaway/coms/comProductDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">

8
pages/productPutaway/coms/comProductRecord.vue

@ -12,7 +12,7 @@
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
@ -80,7 +80,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()
@ -143,7 +143,7 @@
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
this.dataContent.details.splice(index, 1)
this.dataContent.subList.splice(index, 1)
this.$emit('updateData')
}
});
@ -181,7 +181,7 @@
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
this.dataContent.details.splice(index, 1)
this.dataContent.subList.splice(index, 1)
this.$emit('removePack')
}
});

35
pages/productPutaway/job/productPutawayDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
@ -90,12 +89,8 @@
received: false,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
managementList: [],
fromLocationCode: "",
toLocationCode: "",
@ -172,11 +167,11 @@
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.detailList = res.data.subList;
that.fromLocationCode = that.detailList[0].fromLocationCode
that.toLocationCode = that.detailList[0].toLocationCode
that.subList = res.data.subList;
that.fromLocationCode = that.subList[0].fromLocationCode
that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getLocationTypeArray(that.jobContent.toLocationTypes)
that.detailSource = getDataSource(that.detailList)
that.detailSource = getDataSource(that.subList)
that.getLocationInfo(that.toLocationCode);
} else {
that.showMessage('列表数据为0');
@ -207,7 +202,7 @@
qty: res.qty,
handleQty: 0,
uom: res.uom,
details: []
subList: []
}
return item;
},
@ -220,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();
}
},
@ -240,7 +235,7 @@
//
continueScan() {
this.scanCount = this.getScanCount();
if (this.scanCount == this.detailList.length) {
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
@ -248,7 +243,7 @@
},
getScanCount(closeScan) {
let items = this.detailList.filter(r => {
let items = this.subList.filter(r => {
if (r.scaned) {
return r;
}
@ -270,7 +265,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) {
@ -304,7 +299,7 @@
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.details.find(r => {
var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber &&
r.batch == batch &&
r.fromLocationCode == locationCode
@ -359,9 +354,9 @@
this.submitJob();
} else {
this.scanCount = this.getScanCount();
if (this.scanCount < this.detailList.length) {
if (this.scanCount < this.subList.length) {
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this.detailList.length + "]箱", res => {
"]箱总共[" + this.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
@ -414,7 +409,7 @@
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.details.forEach(detail => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);

125
pages/productPutaway/record/productPutawayRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
@ -43,11 +42,19 @@
</template>
<script>
import {
productPutawayRequestSubmit,
productPutawayRecordSubmit
} from '@/api/request2.js';
import {
goHome,
} from '@/common/basic.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/basic.js';
} from '@/common/directory.js';
import {
getBusinessType,
@ -87,12 +94,8 @@
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
@ -148,10 +151,10 @@
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.details.find(r => {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
@ -161,7 +164,7 @@
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -193,7 +196,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
@ -240,83 +243,37 @@
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
// (this.id, params).then(res => {
// uni.hideLoading()
// if (res.data) {
// var hint = res.data.Number;
// this.showCommitSuccessMessage("" + hint, )
// } else {
// this.showErrorMessage("")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
},
setParams() {
var params = {
requestNumber: this.jobContent.requestNumber,
jobNumber: "",
asnNumber: this.jobContent.asnNumber,
ppNumber: this.jobContent.ppNumber,
supplierCode: this.jobContent.supplierCode,
ReceiptDock: this.jobContent.ReceiptDock,
carrierCode: this.jobContent.carrierCode,
transferMode: this.jobContent.transferMode,
vehiclePlateNumber: this.jobContent.vehiclePlateNumber,
fromWarehouseCode: this.toLocationInfo.WarehouseCode,
toWarehouseCode: this.toLocationInfo.WarehouseCode,
OutTransaction: this.businessTypeInfo.OutTransactionType, //
InTransaction: this.businessTypeInfo.InTransactionType, //
executeTime: "2023-08-4 16:30:11", //
activeDate: "2023-08-4 16:30:11", //
available: "1", // 0,1
requestTime: this.jobContent.requestTime,
dueTime: "2023-08-4 16:30:11", //
departmentCode: this.jobContent.departmentCode,
UserPositionCode: "", //
interfaceType: "jklxPURCHASE_RECEIPT", //
Number: this.jobContent.Number,
businessType: this.jobContent.businessType,
remark: this.jobContent.remark,
creationTime: this.jobContent.creationTime,
Creatorld: this.jobContent.Creatorld,
creatorName: this.jobContent.creatorName,
extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld,
Code: "",
details: [
],
if(this.fromType=="requestType"){
// productPutawayRequestSubmit(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 {
// productPutawayRecordSubmit(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)
// })
}
this.detailSource.forEach(res => {
res.details.forEach(res1 => {
if (res1.scaned) {
res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = "";
res1.record.ToLocationGroupCode = this.toLocationInfo.LocationGroupCode;
res1.record.ToAreaCode = this.toLocationInfo.AreaCode;
res1.record.VisualInspectResult = ""; //
res1.record.VisualInspectPhotos = ""; //
res1.record.FailedReason = ""; //
res1.record.MassDefect = ""; //
res1.record.SinglePrice = ""; //
res1.record.Amount = ""; //
res1.record.Code = "";
res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT";
params.details.push(res1.record)
}
})
})
return params;
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {}

3
pages/productPutaway/request/putawayRequest.vue

@ -14,9 +14,10 @@
</view>
</uni-swipe-action>
<uni-load-more :status="loadingType" v-if="requestList.length>0" />
<requestButton @goScan='openScanDetailPopup'></requestButton>
<request-info-popup ref='requestInfoPopup'></request-info-popup>
</view>
<requestButton @goScan='openScanDetailPopup'></requestButton>
<comMessage ref="comMessage"></comMessage>
</view>

7
pages/productPutaway/request/putawayRequestDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
@ -46,7 +45,7 @@
return {
id: '',
requestContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
};
},
@ -84,8 +83,8 @@
} else {
if (res.data.subList.length > 0) {
that.requestContent = res.data;
that.detailList = res.data.subList;
that.detailSource = getDataSource(that.detailList);
that.subList = res.data.subList;
that.detailSource = getDataSource(that.subList);
} else {
that.showMessage('列表数据为0');
}

2
pages/productReceipt/coms/comProductDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">

6
pages/productReceipt/coms/comProductRecord.vue

@ -12,7 +12,7 @@
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
@ -81,7 +81,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()
@ -149,7 +149,7 @@
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
this.dataContent.details.splice(index, 1)
this.dataContent.subList.splice(index, 1)
this.$emit('removePack')
}
});

25
pages/productReceipt/job/productReceiptDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="page-main">
@ -91,7 +90,7 @@
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
fromLocationTypeList: [],
locationTypeList: [],
@ -176,10 +175,10 @@
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.detailList = res.data.subList;
that.subList = res.data.subList;
that.fromLocationTypeList = getDirectoryItemArray(that.jobContent.fromLocationTypes);
that.locationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
that.detailSource = getDataSource(that.detailList)
that.detailSource = getDataSource(that.subList)
} else {
that.showMessage('列表数据为0');
}
@ -199,7 +198,7 @@
qty: res.qty,
handleQty: 0,
uom: res.uom,
details: []
subList: []
}
return item;
},
@ -222,7 +221,7 @@
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.details.find(r =>
var itemDetail = detail.subList.find(r =>
r.packingNumber == packingNumber &&
r.batch == batch);
if (itemDetail == undefined) {
@ -248,8 +247,8 @@
//
continueScan() {
this.scanCount = getScanCount(this.detailList);
if (this.scanCount == this.detailList.length) {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
@ -257,7 +256,7 @@
},
getScanCount(closeScan) {
let items = this.detailList.filter(r => {
let items = this.subList.filter(r => {
if (r.scaned) {
return r;
}
@ -296,16 +295,16 @@
this.scanCount = this.getScanCount();
//
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"){
//
this.submitJob();
}else {
//
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.detailList
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList
.length +
"]");
}
@ -353,7 +352,7 @@
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.details.forEach(detail => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);

110
pages/productReceipt/record/productReceiptRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
@ -41,11 +40,18 @@
<script>
import {
goHome,
productionReceiptRecordSubmit
} from '@/api/request2.js';
import {
goHome
} from '@/common/basic.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/basic.js';
} from '@/common/directory.js';
import {
getBusinessType,
} from '@/common/record.js';
@ -70,10 +76,6 @@
return {
jobContent: {}, //
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
toLocationTypeList: [],
toLocationInfo: {},
toLocationCode: "",
@ -92,7 +94,7 @@
this.tolocationTypeList = res.tolocationTypeList;
this.openScanPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message );
this.$refs.comMessage.showBreakMessage(res.message);
}
});
},
@ -107,8 +109,7 @@
onPullDownRefresh() {},
mounted() {
},
mounted() {},
methods: {
getScanResult(result) {
let label = result.label;
@ -123,10 +124,10 @@
if (item == undefined) {
var itemp = this.createItemInfo(label, pack);
let newDetail = this.createDetailInfo(label, pack);
itemp.details.push(newDetail);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.details.find(r => {
var detail = item.subList.find(r => {
if (r.packingNumber == label.packingNumber &&
r.batch == label.batch &&
r.locationCode == label.locationCode &&
@ -137,7 +138,7 @@
if (detail == undefined) {
let newDetail = this.createDetailInfo(label, pack);
item.details.push(newDetail);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + label.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -156,7 +157,7 @@
qty: Number(label.qty),
handleQty: 0,
uom: pack.uom,
details: []
subList: []
}
return item;
},
@ -178,7 +179,7 @@
calcHandleQty() {
for (let item of this.detailSource) {
item.qty = 0;
for (let detail of item.details) {
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
}
@ -225,14 +226,12 @@
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
// (this.id, params).then(res => {
// productionReceiptRecordSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// var hint = res.data.Number;
// this.showCommitSuccessMessage("" + hint, )
// this.showCommitSuccessMessage("<br>" + res.data, )
// } else {
// this.showErrorMessage("")
// this.showErrorMessage(""+res.msg)
// }
// }).catch(error => {
// uni.hideLoading()
@ -240,68 +239,23 @@
// })
},
setParams() {
var params = {
requestNumber: this.jobContent.requestNumber,
jobNumber: "",
asnNumber: this.jobContent.asnNumber,
ppNumber: this.jobContent.ppNumber,
supplierCode: this.jobContent.supplierCode,
ReceiptDock: this.jobContent.ReceiptDock,
carrierCode: this.jobContent.carrierCode,
transferMode: this.jobContent.transferMode,
vehiclePlateNumber: this.jobContent.vehiclePlateNumber,
fromWarehouseCode: this.toLocationInfo.WarehouseCode,
toWarehouseCode: this.toLocationInfo.WarehouseCode,
OutTransaction: this.businessType.OutTransactionType, //
InTransaction: this.businessType.InTransactionType, //
executeTime: "2023-08-4 16:30:11", //
activeDate: "2023-08-4 16:30:11", //
available: "1", // 0,1
requestTime: this.jobContent.requestTime,
dueTime: "2023-08-4 16:30:11", //
departmentCode: this.jobContent.departmentCode,
UserPositionCode: "", //
interfaceType: "jklxPURCHASE_RECEIPT", //
Number: this.jobContent.Number,
businessType: this.jobContent.businessTypeInfo,
remark: this.jobContent.remark,
creationTime: this.jobContent.creationTime,
Creatorld: this.jobContent.Creatorld,
creatorName: this.jobContent.creatorName,
extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld,
Code: "",
details: [
],
}
this.detailSource.forEach(res => {
res.details.forEach(res1 => {
if (res1.scaned) {
res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = "";
res1.record.ToLocationGroupCode = this.toLocationInfo.LocationGroupCode;
res1.record.ToAreaCode = this.toLocationInfo.AreaCode;
res1.record.VisualInspectResult = ""; //
res1.record.VisualInspectPhotos = ""; //
res1.record.FailedReason = ""; //
res1.record.MassDefect = ""; //
res1.record.SinglePrice = ""; //
res1.record.Amount = ""; //
res1.record.Code = "";
res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT";
params.details.push(res1.record)
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)
}
})
})
return params;
return subList;
},
showMessage(message) {
setTimeout(r => {
this.scanPopupLoseFocus();
@ -377,7 +331,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}

2
pages/productionReceipt/coms/comProductionDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">

8
pages/productionReceipt/coms/comProductionRecord.vue

@ -12,7 +12,7 @@
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
@ -78,7 +78,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()
@ -141,7 +141,7 @@
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
this.dataContent.details.splice(index, 1)
this.dataContent.subList.splice(index, 1)
this.$emit('updateData')
}
});
@ -179,7 +179,7 @@
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
this.dataContent.details.splice(index, 1)
this.dataContent.subList.splice(index, 1)
this.$emit('removePack')
}
});

29
pages/productionReceipt/job/productionReceiptDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="page-main">
@ -89,12 +88,8 @@
received: false,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
managementList: [],
fromLocationCode: "",
toLocationCode: "",
@ -171,11 +166,11 @@
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.detailList = res.data.subList;
that.fromLocationCode = that.detailList[0].fromLocationCode
that.toLocationCode = that.detailList[0].toLocationCode
that.subList = res.data.subList;
that.fromLocationCode = that.subList[0].fromLocationCode
that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getLocationTypeArray(that.jobContent.toLocationTypes)
that.detailSource = getDataSource(that.detailList)
that.detailSource = getDataSource(that.subList)
that.getLocationInfo(that.toLocationCode);
updateTitle(this.jobContent.number);
} else {
@ -206,8 +201,8 @@
//
continueScan() {
this.scanCount = getScanCount(this.detailList);
if (this.scanCount == this.detailList.length) {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
@ -227,7 +222,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) {
@ -262,7 +257,7 @@
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.details.find(r => {
var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber &&
r.batch == batch &&
r.fromLocationCode == locationCode
@ -317,9 +312,9 @@
this.submitJob();
} else {
this.scanCount = this.getScanCount();
if (this.scanCount < this.detailList.length) {
if (this.scanCount < this.subList.length) {
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this.detailList.length + "]箱", res => {
"]箱总共[" + this.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
@ -371,7 +366,7 @@
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.details.forEach(detail => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);

90
pages/productionReceipt/record/productionReceiptRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
@ -43,6 +42,9 @@
</template>
<script>
import {
productionReceiptRecordSubmit,
} from '@/api/request2.js';
import {
goHome,
} from '@/common/basic.js';
@ -86,12 +88,7 @@
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
@ -148,10 +145,10 @@
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.details.find(r => {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
@ -161,7 +158,7 @@
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -189,7 +186,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
@ -236,14 +233,12 @@
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
// (this.id, params).then(res => {
// productionReceiptRecordSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// var hint = res.data.Number;
// this.showCommitSuccessMessage("" + hint, )
// this.showCommitSuccessMessage("<br>" + res.data, )
// } else {
// this.showErrorMessage("")
// this.showErrorMessage(""+res.msg)
// }
// }).catch(error => {
// uni.hideLoading()
@ -253,64 +248,19 @@
},
setParams() {
var params = {
requestNumber: this.jobContent.requestNumber,
jobNumber: "",
asnNumber: this.jobContent.asnNumber,
ppNumber: this.jobContent.ppNumber,
supplierCode: this.jobContent.supplierCode,
receiptDock: this.jobContent.receiptDock,
carrierCode: this.jobContent.carrierCode,
transferMode: this.jobContent.transferMode,
vehiclePlateNumber: this.jobContent.vehiclePlateNumber,
fromWarehouseCode: this.toLocationInfo.WarehouseCode,
toWarehouseCode: this.toLocationInfo.WarehouseCode,
OutTransaction: this.businessTypeInfo.OutTransactionType, //
InTransaction: this.businessTypeInfo.InTransactionType, //
executeTime: "2023-08-4 16:30:11", //
activeDate: "2023-08-4 16:30:11", //
available: "1", // 0,1
requestTime: this.jobContent.requestTime,
dueTime: "2023-08-4 16:30:11", //
departmentCode: this.jobContent.departmentCode,
UserPositionCode: "", //
interfaceType: "jklxPURCHASE_RECEIPT", //
Number: this.jobContent.Number,
businessType: this.jobContent.businessType,
remark: this.jobContent.remark,
creationTime: this.jobContent.creationTime,
Creatorld: this.jobContent.Creatorld,
creatorName: this.jobContent.creatorName,
extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld,
Code: "",
details: [
],
}
this.detailSource.forEach(res => {
res.details.forEach(res1 => {
if (res1.scaned) {
res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = "";
res1.record.ToLocationGroupCode = this.toLocationInfo.LocationGroupCode;
res1.record.ToAreaCode = this.toLocationInfo.AreaCode;
res1.record.VisualInspectResult = ""; //
res1.record.VisualInspectPhotos = ""; //
res1.record.FailedReason = ""; //
res1.record.MassDefect = ""; //
res1.record.SinglePrice = ""; //
res1.record.Amount = ""; //
res1.record.Code = "";
res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT";
params.details.push(res1.record)
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)
}
})
})
return params;
return subList;
},
showMessage(message) {

50
pages/productionReturn/coms/comReturn.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
@ -44,10 +43,18 @@
<script>
import {
goHome,
getDirectoryItemArray
productionReturnRequestSubmit,
productionReturnRecordSubmit
} from '@/api/request2.js';
import {
goHome
} from '@/common/basic.js';
import {
getDirectoryItemArray
} from '@/common/directory.js';
import {
getBusinessType,
createItemInfo,
@ -84,26 +91,21 @@
businessTypeCode: {
type: String,
default: "Move"
} ,//
}, //
fromType: {
type: String,
default: ""
},
},
data() {
return {
id: '',
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
fromLocationInfo: {},
fromLocationCode: '',
fromLocationTypeList: [],
@ -111,7 +113,7 @@
toLocationCode: '',
tolocationTypeList: [],
businessType: {},
};
},
onLoad() {
@ -130,7 +132,7 @@
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message );
this.$refs.comMessage.showBreakMessage(res.message);
}
});
},
@ -172,7 +174,7 @@
let balance = result.balance;
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == result.balance.itemCode) {
return res
@ -181,10 +183,10 @@
if (item == undefined) {
var itemInfo = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemInfo.details.push(newDetail);
itemInfo.subList.push(newDetail);
this.detailSource.push(itemInfo)
} else {
var detail = item.details.find(r => {
var detail = item.subList.find(r => {
if (r.packingNumber == result.balance.packingNumber &&
r.batch == result.balance.batch &&
r.locationCode == result.balance.locationCode &&
@ -195,7 +197,7 @@
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail);
item.subList.push(newDetail);
} else {
if (detail.scaned) {
this.showErrorMessage(result.balance.packingNumber + "已经在列表中")
@ -210,7 +212,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
@ -262,8 +264,8 @@
// })
} else {
this.calcScanCount();
if (this.scanCount < this.detailList.length) {
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.detailList.length +
if (this.scanCount < this.subList.length) {
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList.length +
"]");
}
}
@ -302,13 +304,13 @@
extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld,
Code: "",
details: [
subList: [
],
}
this.detailSource.forEach(res => {
res.details.forEach(res1 => {
res.subList.forEach(res1 => {
if (res1.scaned) {
res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = "";
@ -323,7 +325,7 @@
res1.record.Code = "";
res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT";
params.details.push(res1.record)
params.subList.push(res1.record)
}
})
})

36
pages/productionReturn/job/returnDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="page-main">
@ -91,12 +90,8 @@
toLocationCode: '',
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
fromLocationCode: '',
toLocationCode: '',
tolocationTypeList: [],
@ -177,11 +172,11 @@
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.detailList = res.data.subList;
that.detailSource = getDataSource(that.detailList)
that.subList = res.data.subList;
that.detailSource = getDataSource(that.subList)
that.fromLocationCode = that.detailList[0].fromLocationCode
that.toLocationCode = that.detailList[0].toLocationCode
that.fromLocationCode = that.subList[0].fromLocationCode
that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
} else {
that.showMessage('列表数据为0');
@ -203,8 +198,8 @@
//
continueScan() {
this.scanCount = getScanCount(this.detailList);
if (this.scanCount == this.detailList.length) {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
@ -226,7 +221,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) {
@ -254,7 +249,7 @@
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.details.find(r => {
var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber &&
r.batch == batch
})
@ -305,11 +300,11 @@
if (this.jobContent.allowPartialComplete == "TRUE") {
this.submitJob();
} else {
this.scanCount = getScanCount(this.detailList);
if (this.scanCount < this.detailList.length) {
this.scanCount = getScanCount(this.subList);
if (this.scanCount < this.subList.length) {
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this
.detailList.length + "]箱", res => {
.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
@ -367,7 +362,7 @@
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.details.forEach(detail => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
@ -421,11 +416,6 @@
scanPopupLoseFocus() {
this.$refs.scanPopup.packLoseFocus();
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.receiptJob.scrollTop;
},
showQuestionMessage(message, callback) {
setTimeout(r => {

7
pages/productionReturn/request/requestDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="page-main">
@ -45,7 +44,7 @@
return {
id: '',
requestContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
};
},
@ -83,8 +82,8 @@
} else {
if (res.data.subList.length > 0) {
that.requestContent = res.data;
that.detailList = res.data.subList;
that.detailSource = getDataSource(that.detailList);
that.subList = res.data.subList;
that.detailSource = getDataSource(that.subList);
} else {
that.showMessage('列表数据为0');
}

2
pages/productionReturn/request/returnToHoldRequest.vue

@ -14,9 +14,9 @@
</view>
</uni-swipe-action>
<uni-load-more :status="loadingType" />
<requestButton @goScan='openScanDetailPopup'></requestButton>
<request-info-popup ref='requestInfoPopup'></request-info-popup>
</view>
<requestButton @goScan='openScanDetailPopup'></requestButton>
</view>
<comMessage ref="comMessage"></comMessage>
</template>

2
pages/purchaseReceipt/coms/comReceiptDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">

33
pages/purchaseReceipt/job/receiptDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="page-main">
@ -85,12 +84,10 @@
id: '',
receiptJob: {},
received: false,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
locationTypeList: [],
toLocationCode: '',
toLocationInfo: {},
@ -177,9 +174,9 @@
that.jobContent = res.data;
that.locationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes);
// that.jobContent.locationTypeList = that.locationTypeList;
that.detailList = res.data.subList;
this.toLocationCode = that.detailList[0].toLocationCode
that.detailSource = getDataSource(that.detailList)
that.subList = res.data.subList;
this.toLocationCode = that.subList[0].toLocationCode
that.detailSource = getDataSource(that.subList)
} else {
that.showMessage('列表数据为0');
}
@ -201,7 +198,7 @@
if (detail == undefined) {
this.showMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.details.find(r => r.packingNumber == packingNumber && r.batch == batch);
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch);
if (itemDetail == undefined) {
this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中")
} else {
@ -227,7 +224,7 @@
//
continueScan() {
this.scanCount = this.getScanCount();
if (this.scanCount == this.detailList.length) {
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
@ -235,7 +232,7 @@
},
getScanCount(closeScan) {
let items = this.detailList.filter(r => {
let items = this.subList.filter(r => {
if (r.scaned) {
return r;
}
@ -262,9 +259,9 @@
console.log("校验通过")
//
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") {
//
@ -273,7 +270,7 @@
//
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this
.detailList.length + "]箱", res => {
.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
@ -283,7 +280,7 @@
},
async submitJob() {
submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
@ -300,13 +297,13 @@
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
purchaseReceiptJobSubmit( params).then(res => {
purchaseReceiptJobSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成采购收货记录" + res.data, )
} else {
this.showErrorMessage("提交失败"+res.msg)
}
uni.hideLoading()
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
@ -325,7 +322,7 @@
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.details.forEach(detail => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
@ -355,7 +352,7 @@
var isHaveNullLocation = false;
var nullLocationList = [];
this.detailSource.forEach(item => {
item.details.forEach(detail => {
item.subList.forEach(detail => {
if (detail.toLocationCode == null || detail.toLocationCode == "") {
nullLocationList.push(detail)
}

27
pages/purchaseReturn/job/returnDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="page-header">
@ -91,7 +90,7 @@
received: false,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
toLocationInfo: {},
businessTypeInfo: {},
@ -179,9 +178,9 @@
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.detailList = res.data.subList;
that.subList = res.data.subList;
that.toLocationCode = that.jobContent.toLocationCode
that.detailSource = getDataSource(that.detailList);
that.detailSource = getDataSource(that.subList);
} else {
that.showMessage('列表数据为0');
}
@ -199,21 +198,21 @@
},
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();
}
},
//
continueScan() {
this.scanCount = getScanCount(this.detailList);
if (this.scanCount == this.detailList.length) {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
@ -234,7 +233,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
})
@ -284,9 +283,9 @@
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") {
//
@ -295,7 +294,7 @@
//
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this
.detailList.length + "]箱", res => {
.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
@ -364,7 +363,7 @@
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.details.forEach(detail => {
item.subList.forEach(detail => {
if (detail.scaned) {
if (queryModel) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
@ -397,7 +396,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) {

95
pages/purchaseReturn/record/returnRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
@ -10,8 +9,8 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
<record-com-detail-card :dataContent="item" @removeItem="removeItem(index,item)"
@updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</view>
</view>
@ -40,8 +39,8 @@
<script>
import {
createPurchaseReturnRecord,
createPurchaseReturnRequest
purchaseReturnRecordSubmit,
purchaseReturnRequestSubmit
} from '@/api/request2.js';
import {
goHome,
@ -72,22 +71,19 @@
recordComDetailCard
},
data() {
return {
id: '',
jobContent: {}, //
detailList: [], //details
submitMainContent: {}, //
subList: [], //subList
detailSource: [], //
fromLocationCode: "",
fromLocationInfo: {},
fromlocationTypeList: [],
toLocationCode: "",
toLocationInfo: {},
tolocationTypeList: [],
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {}, //
@ -95,12 +91,12 @@
fromType: ""
};
},
onLoad(option) {
this.fromType = option.fromType
if(this.fromType=="requestType"){
if (this.fromType == "requestType") {
updateTitle("采购退货申请")
}else {
} else {
updateTitle("采购退货记录")
}
var typeCode = "PurchaseReturn"
@ -111,11 +107,11 @@
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message );
this.$refs.comMessage.showBreakMessage(res.message);
}
});
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
@ -169,11 +165,11 @@
})
if (item == undefined) {
var itemInfo = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemInfo.details.push(newDetail);
let newDetail = createDetailInfo(balance, pack);
itemInfo.subList.push(newDetail);
this.detailSource.push(itemInfo)
} else {
var detail = item.details.find(r => {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
@ -185,7 +181,7 @@
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail);
item.subList.push(newDetail);
} else {
this.showErrorMessage('箱码[' + balance.packingNumber + "]已经在列表中")
}
@ -206,7 +202,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
@ -222,49 +218,60 @@
title: "提交中....",
mask: true
});
if (this.detailSource.length > 0 && this.detailSource[0].details.length > 0) {
if(this.fromType=="requestType"){
// createPurchaseReturnRequest
}else {
var params = this.setParams();
console.log("提交参数",JSON.stringify(params));
// createPurchaseReturnRecord(params).then(res => {
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
var params = this.setParams();
console.log("提交参数", JSON.stringify(params));
if (this.fromType == "requestType") {
// purchaseReturnRequestSubmit(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 {
// purchaseReturnRecordSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// this.showCommitSuccessMessage("<br>退:" + res.data, )
// this.showCommitSuccessMessage("<br>" + res.data, )
// } else {
// this.showErrorMessage("")
// this.showErrorMessage(""+res.msg)
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
}
} else {
this.showErrorMessage("没有要提交的数据")
}
},
setParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.details.forEach(detail => {
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)
var subItem = {};
Object.assign(subItem, detail)
subItem.package =""
subList.push(subItem)
}
})
})
return subList;
this.submitMainContent.subList = subList
this.submitMainContent.creator = creator;
return this.submitMainContent;
},
showMessage(message) {
@ -314,7 +321,7 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
//
this.detailList = [];
this.subList = [];
this.detailSource = [];
this.toLocationInfo = {}
this.toLocationCode = ''

3
pages/purchaseReturn/request/returnRequest.vue

@ -14,10 +14,9 @@
</view>
</uni-swipe-action>
<uni-load-more :status="loadingType" />
<requestButton @goScan='openScanDetailPopup'></requestButton>
<request-info-popup ref='requestInfoPopup'></request-info-popup>
</view>
<requestButton @goScan='openScanDetailPopup'></requestButton>
<comMessage ref="comMessage"></comMessage>
</view>
</template>

9
pages/purchaseReturn/request/returnRequestDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="page-main">
@ -46,7 +45,7 @@
return {
id: '',
requestContent: {}, //
detailList: [], //details
subList: [], //details
detailSource: [], //
};
},
@ -84,11 +83,11 @@
} else {
if (res.data.subList.length > 0) {
that.requestContent = res.data;
that.detailList = res.data.subList;
that.detailList.forEach(res=>{
that.subList = res.data.subList;
that.subList.forEach(res=>{
res.fromLocationCode = res.toLocationCode
})
that.detailSource = getDataSource(that.detailList);
that.detailSource = getDataSource(that.subList);
} else {
that.showMessage('列表数据为0');
}

35
pages/putaway/job/putawayDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="page-main">
@ -88,12 +87,8 @@
received: false,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
managementList: [],
fromLocationCode: "",
toLocationCode: "",
@ -173,11 +168,11 @@
}else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.detailList = res.data.subList;
that.detailSource = getDataSource(that.detailList)
that.subList = res.data.subList;
that.detailSource = getDataSource(that.subList)
that.fromLocationCode = that.detailList[0].fromLocationCode
that.toLocationCode = that.detailList[0].toLocationCode
that.fromLocationCode = that.subList[0].fromLocationCode
that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
that.getLocationInfo(that.toLocationCode);
@ -202,13 +197,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();
}
},
@ -221,8 +216,8 @@
//
continueScan() {
this.scanCount = getScanCount(this.detailList);
if (this.scanCount == this.detailList.length) {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
@ -238,7 +233,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) {
@ -272,7 +267,7 @@
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.details.find(r => {
var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber &&
r.batch == batch
})
@ -327,10 +322,10 @@
if (this.jobContent.allowPartialComplete == "TRUE") {
this.submitJob();
} else {
this.scanCount = getScanCount(this.detailList);
if (this.scanCount < this.detailList.length) {
this.scanCount = getScanCount(this.subList);
if (this.scanCount < this.subList.length) {
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this.detailList.length + "]箱", res => {
"]箱总共[" + this.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
@ -389,7 +384,7 @@
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.details.forEach(detail => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);

129
pages/putaway/record/putawayRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
@ -41,6 +40,11 @@
</template>
<script>
import {
putawayRequestSubmit,
putawayRecordSubmit
} from '@/api/request2.js';
import {
goHome,
updateTitle
@ -88,12 +92,9 @@
id: '',
receiptJob: {},
received: false,
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
@ -104,7 +105,6 @@
isShowLocation: false,
fromlocationTypeList: [],
tolocationTypeList: [],
allowModifyLocation: false,
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {},
@ -113,7 +113,7 @@
},
onLoad(option) {
this.fromType = option.fromType
if(this.fromType=="requestType"){ updateTitle("采购上架申请") }else { updateTitle("采购上架记录") }
if(this.fromType=="requestType"){ updateTitle("原料上架申请") }else { updateTitle("原料上架记录") }
var typeCode = "PurchasePutaway"
getBusinessType(typeCode, res => {
if (res.success) {
@ -152,10 +152,10 @@
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.details.find(r => {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
@ -165,7 +165,7 @@
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -186,7 +186,7 @@
calcHandleQty() {
for (let item of this.detailSource) {
item.qty = 0;
for (let detail of item.details) {
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
}
@ -206,7 +206,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
@ -254,87 +254,50 @@
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
if(this.fromType=="requestType"){
// putawayRequestSubmit(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 {
// putawayRecordSubmit(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)
// })
}
// (this.id, params).then(res => {
// uni.hideLoading()
// if (res.data) {
// var hint = res.data.Number;
// this.showCommitSuccessMessage("" + hint, )
// } else {
// this.showErrorMessage("")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
},
setParams() {
var params = {
requestNumber: this.jobContent.requestNumber,
jobNumber: "",
asnNumber: this.jobContent.asnNumber,
ppNumber: this.jobContent.ppNumber,
supplierCode: this.jobContent.supplierCode,
ReceiptDock: this.jobContent.ReceiptDock,
carrierCode: this.jobContent.carrierCode,
transferMode: this.jobContent.transferMode,
vehiclePlateNumber: this.jobContent.vehiclePlateNumber,
fromWarehouseCode: this.toLocationInfo.WarehouseCode,
toWarehouseCode: this.toLocationInfo.WarehouseCode,
OutTransaction: this.businessTypeInfo.OutTransactionType, //
InTransaction: this.businessTypeInfo.InTransactionType, //
executeTime: "2023-08-4 16:30:11", //
activeDate: "2023-08-4 16:30:11", //
available: "1", // 0,1
requestTime: this.jobContent.requestTime,
dueTime: "2023-08-4 16:30:11", //
departmentCode: this.jobContent.departmentCode,
UserPositionCode: "", //
interfaceType: "jklxPURCHASE_RECEIPT", //
Number: this.jobContent.Number,
businessType: this.jobContent.businessType,
remark: this.jobContent.remark,
creationTime: this.jobContent.creationTime,
Creatorld: this.jobContent.Creatorld,
creatorName: this.jobContent.creatorName,
extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld,
Code: "",
details: [
],
}
this.detailSource.forEach(res => {
res.details.forEach(res1 => {
if (res1.scaned) {
res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = "";
res1.record.ToLocationGroupCode = this.toLocationInfo.LocationGroupCode;
res1.record.ToAreaCode = this.toLocationInfo.AreaCode;
res1.record.VisualInspectResult = ""; //
res1.record.VisualInspectPhotos = ""; //
res1.record.FailedReason = ""; //
res1.record.MassDefect = ""; //
res1.record.SinglePrice = ""; //
res1.record.Amount = ""; //
res1.record.Code = "";
res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT";
params.details.push(res1.record)
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)
}
})
})
return params;
return subList;
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {}

2
pages/putaway/request/putawayRequest.vue

@ -14,9 +14,9 @@
</view>
</uni-swipe-action>
<uni-load-more :status="loadingType" />
<requestButton @goScan='openScanDetailPopup'></requestButton>
<request-info-popup ref='requestInfoPopup'></request-info-popup>
</view>
<requestButton @goScan='openScanDetailPopup'></requestButton>
</view>
<comMessage ref="comMessage"></comMessage>
</template>

7
pages/putaway/request/putawayRequestDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
@ -47,7 +46,7 @@
return {
id: '',
requestContent: {}, //
detailList: [], //details
subList: [], //details
detailSource: [], //
};
},
@ -85,8 +84,8 @@
} else {
if (res.data.subList.length > 0) {
that.requestContent = res.data;
that.detailList = res.data.subList;
that.detailSource = getDataSource(that.detailList);
that.subList = res.data.subList;
that.detailSource = getDataSource(that.subList);
} else {
that.showMessage('列表数据为0');
}

32
pages/repleinsh/job/repleinshDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="page-main">
@ -88,9 +87,8 @@
received: false,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
managementList: [],
fromLocationCode: "",
toLocationCode: "",
@ -171,11 +169,11 @@
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.detailList = res.data.subList;
that.detailSource = getDataSource(that.detailList)
that.subList = res.data.subList;
that.detailSource = getDataSource(that.subList)
that.fromLocationCode = that.detailList[0].fromLocationCode
that.toLocationCode = that.detailList[0].toLocationCode
that.fromLocationCode = that.subList[0].fromLocationCode
that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
that.getLocationInfo(that.toLocationCode);
@ -200,13 +198,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();
}
},
@ -219,8 +217,8 @@
//
continueScan() {
this.scanCount = getScanCount(this.detailList);
if (this.scanCount == this.detailList.length) {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
@ -236,7 +234,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) {
@ -270,7 +268,7 @@
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.details.find(r => {
var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber &&
r.batch == batch
})
@ -325,10 +323,10 @@
if (this.jobContent.allowPartialComplete == "TRUE") {
this.submitJob();
} else {
this.scanCount = getScanCount(this.detailList);
if (this.scanCount < this.detailList.length) {
this.scanCount = getScanCount(this.subList);
if (this.scanCount < this.subList.length) {
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this.detailList.length + "]箱", res => {
"]箱总共[" + this.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
@ -381,7 +379,7 @@
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.details.forEach(detail => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);

131
pages/repleinsh/record/repleinshRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
@ -41,12 +40,23 @@
</template>
<script>
import {
repleinshRequestSubmit,
repleinshRecordSubmit
} from '@/api/request2.js';
import {
goHome,
updateTitle,
} from '@/common/basic.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/basic.js';
} from '@/common/directory.js';
import {
getDetailOption,
getDetailRemoveOption,
@ -88,9 +98,8 @@
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
@ -149,10 +158,10 @@
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.details.find(r => {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
@ -162,7 +171,7 @@
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -183,7 +192,7 @@
calcHandleQty() {
for (let item of this.detailSource) {
item.qty = 0;
for (let detail of item.details) {
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
}
@ -203,7 +212,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
@ -242,7 +251,6 @@
this.showMessage("请先选择目标库位")
return;
}
//
uni.showLoading({
title: "提交中....",
mask: true
@ -251,85 +259,48 @@
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
if(this.fromType=="requestType"){
// 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)
// })
}
// (this.id, params).then(res => {
// uni.hideLoading()
// if (res.data) {
// var hint = res.data.Number;
// this.showCommitSuccessMessage("" + hint, )
// } else {
// this.showErrorMessage("")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
},
setParams() {
var params = {
requestNumber: this.jobContent.requestNumber,
jobNumber: "",
asnNumber: this.jobContent.asnNumber,
ppNumber: this.jobContent.ppNumber,
supplierCode: this.jobContent.supplierCode,
ReceiptDock: this.jobContent.ReceiptDock,
carrierCode: this.jobContent.carrierCode,
transferMode: this.jobContent.transferMode,
vehiclePlateNumber: this.jobContent.vehiclePlateNumber,
fromWarehouseCode: this.toLocationInfo.WarehouseCode,
toWarehouseCode: this.toLocationInfo.WarehouseCode,
OutTransaction: this.businessTypeInfo.OutTransactionType, //
InTransaction: this.businessTypeInfo.InTransactionType, //
executeTime: "2023-08-4 16:30:11", //
activeDate: "2023-08-4 16:30:11", //
available: "1", // 0,1
requestTime: this.jobContent.requestTime,
dueTime: "2023-08-4 16:30:11", //
departmentCode: this.jobContent.departmentCode,
UserPositionCode: "", //
interfaceType: "jklxPURCHASE_RECEIPT", //
Number: this.jobContent.Number,
businessType: this.jobContent.businessType,
remark: this.jobContent.remark,
creationTime: this.jobContent.creationTime,
Creatorld: this.jobContent.Creatorld,
creatorName: this.jobContent.creatorName,
extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld,
Code: "",
details: [
],
}
this.detailSource.forEach(res => {
res.details.forEach(res1 => {
if (res1.scaned) {
res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = "";
res1.record.ToLocationGroupCode = this.toLocationInfo.LocationGroupCode;
res1.record.ToAreaCode = this.toLocationInfo.AreaCode;
res1.record.VisualInspectResult = ""; //
res1.record.VisualInspectPhotos = ""; //
res1.record.FailedReason = ""; //
res1.record.MassDefect = ""; //
res1.record.SinglePrice = ""; //
res1.record.Amount = ""; //
res1.record.Code = "";
res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT";
params.details.push(res1.record)
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)
}
})
})
return params;
return subList;
},
showMessage(message) {

66
pages/repleinsh/request/repleinshRequest.vue

@ -1,17 +1,19 @@
<template>
<view class="">
<view class="" v-if="jobList.length>0">
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in jobList" :key="index">
<uni-swipe-action-item :right-options="item.options" @click="swipeClick($event,item)">
<com-repleinsh-request-card :dataContent="item" @click='openRequestDetail(item)' ></com-repleinsh-request-card>
</uni-swipe-action-item>
</view>
</uni-swipe-action>
<uni-load-more :status="loadingType" />
<requestButton @goScan='openScanDetailPopup' ></requestButton>
<request-info-popup ref='requestInfoPopup'></request-info-popup>
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in jobList" :key="index">
<uni-swipe-action-item :right-options="item.options" @click="swipeClick($event,item)">
<com-repleinsh-request-card :dataContent="item" @click='openRequestDetail(item)'>
</com-repleinsh-request-card>
</uni-swipe-action-item>
</view>
</uni-swipe-action>
<uni-load-more :status="loadingType" />
<request-info-popup ref='requestInfoPopup'></request-info-popup>
</view>
<requestButton @goScan='openScanDetailPopup' ></requestButton>
</view>
<comMessage ref="comMessage"></comMessage>
</template>
@ -22,16 +24,16 @@
import comRepleinshRequestCard from '@/pages/repleinsh/coms/comRepleinshRequestCard.vue'
import requestInfoPopup from '@/pages/repleinsh/coms/requestInfoPopup.vue'
import requestButton from '@/mycomponents/button/requestButton.vue'
import {
getBusinessType,
} from '@/common/record.js';
import {
goHome,
updateTitle
} from '@/common/basic.js';
import {
getRepleinshRequestList,
} from '@/api/request2.js';
@ -70,7 +72,7 @@
detailAndHandleOption: [],
detailAndCloseOption: [],
showOptions: [],
fromType:"requestType",
fromType: "requestType",
loadingType: "nomore",
};
},
@ -78,7 +80,7 @@
this.detailOptions = getDetailOption();
this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
this.detailAndHandleOption = getDetailAndHandleOption()
this.detailAndHandleOption = getDetailAndHandleOption()
this.detailAndCloseOption = getDetailAndCloseOption()
},
@ -89,7 +91,7 @@
}
this.getList("more");
},
onPullDownRefresh() {
this.getList('refresh');
},
@ -123,30 +125,30 @@
},
getList(type) {
let that = this;
uni.showLoading({
title: "加载中­....",
mask: true
});
uni.showLoading({
title: "加载中­....",
mask: true
});
this.loadingType = "loading";
if (type === "refresh") {
this.pageNo = 1;
this.jobList = [];
}
var params = {
// filters: [{
// column: "status",
// action: "in",
// value: "1,2"
// }],
pageNo: this.pageNo,
pageSize: this.pageSize,
}
var params = {
// filters: [{
// column: "status",
// action: "in",
// value: "1,2"
// }],
pageNo: this.pageNo,
pageSize: this.pageSize,
}
getRepleinshRequestList(params).then(res => {
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
}
var list = res.data.list;
this.totalCount = res.data.total
this.loadingType = "loadmore";
@ -159,7 +161,7 @@
res.options = options;
})
this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++;
updateTitle("原料上架申请(" + this.totalCount + ")");
@ -190,7 +192,7 @@
openScanDetailPopup() {
uni.navigateTo({
url:"../record/repleinshRecord?fromType="+this.fromType
url: "../record/repleinshRecord?fromType=" + this.fromType
})
},

9
pages/repleinsh/request/repleinshRequestDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
@ -48,7 +47,7 @@
return {
id: '',
requestContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
};
},
@ -81,10 +80,10 @@
getPutawayRequestDetail(that.id).then(res => {
uni.hideLoading();
if (res.data[0].details.length > 0) {
if (res.data[0].subList.length > 0) {
that.requestContent = res.data[0];
that.detailList = res.data[0].details;
that.detailSource = getDataSource(that.detailList);
that.subList = res.data[0].subList;
that.detailSource = getDataSource(that.subList);
updateTitle(this.requestContent.Number);
} else {
that.showMessage('列表数据为0');

2
pages/scrap/coms/comScrapDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">

29
pages/scrap/job/scrapJobDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="page-main">
@ -80,15 +79,10 @@
id: '',
receiptJob: {},
received: false,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [],
toLocationCode: '',
toLocationInfo: {},
@ -175,8 +169,8 @@
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.locationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes);
that.detailList = res.data.subList;
that.detailSource = getDataSource(that.detailList)
that.subList = res.data.subList;
that.detailSource = getDataSource(that.subList)
} else {
that.showMessage('列表数据为0');
}
@ -198,7 +192,7 @@
if (detail == undefined) {
this.showMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.details.find(r => r.packingNumber == packingNumber && r.batch == batch);
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch);
if (itemDetail == undefined) {
this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中")
} else {
@ -233,7 +227,7 @@
//
continueScan() {
this.scanCount = this.getScanCount();
if (this.scanCount == this.detailList.length) {
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
@ -241,7 +235,7 @@
},
getScanCount(closeScan) {
let items = this.detailList.filter(r => {
let items = this.subList.filter(r => {
if (r.scaned) {
return r;
}
@ -273,10 +267,10 @@
this.submitJob();
} else {
this.scanCount = this.getScanCount();
if (this.scanCount < this.detailList.length) {
if (this.scanCount < this.subList.length) {
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this
.detailList.length + "]箱", res => {
.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
@ -326,7 +320,7 @@
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.details.forEach(detail => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
@ -382,11 +376,6 @@
this.$refs.scanPopup.losefocus();
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.datacontent.scrollTop;
},
closeCommitMessage() {
setTimeout(() => {
uni.navigateTo({

131
pages/scrap/record/scrapRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
@ -50,14 +49,22 @@
</template>
<script>
import {
scrapRequestSubmit,
scrapRecordSubmit
} from '@/api/request2.js';
import {
goHome,
updateTitle,
getInventoryStatusDesc,
getDirectoryItemArray,
getScarpReasonList
} from '@/common/basic.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray,
} from '@/common/directory.js';
import {
getBusinessType,
createItemInfo,
@ -93,9 +100,8 @@
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
@ -157,10 +163,10 @@
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.details.find(r => {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
@ -170,7 +176,7 @@
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -190,7 +196,7 @@
qty: Number(balance.qty),
handleQty: 0,
uom: pack.uom,
details: []
subList: []
}
return item;
},
@ -216,7 +222,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
@ -259,82 +265,51 @@
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
// (this.id, params).then(res => {
// uni.hideLoading()
// if (res.data) {
// var hint = res.data.Number;
// this.showCommitSuccessMessage("" + hint, )
// } else {
// this.showErrorMessage("")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
if(this.fromType=="requestType"){
// scrapRequestSubmit(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 {
// scrapRecordSubmit(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)
// })
}
},
setParams() {
var params = {
requestNumber: this.jobContent.requestNumber,
jobNumber: "",
asnNumber: this.jobContent.asnNumber,
ppNumber: this.jobContent.ppNumber,
supplierCode: this.jobContent.supplierCode,
ReceiptDock: this.jobContent.ReceiptDock,
carrierCode: this.jobContent.carrierCode,
transferMode: this.jobContent.transferMode,
vehiclePlateNumber: this.jobContent.vehiclePlateNumber,
fromWarehouseCode: this.toLocationInfo.WarehouseCode,
toWarehouseCode: this.toLocationInfo.WarehouseCode,
OutTransaction: this.businessTypeInfo.OutTransactionType, //
InTransaction: this.businessTypeInfo.InTransactionType, //
executeTime: "2023-08-4 16:30:11", //
activeDate: "2023-08-4 16:30:11", //
available: "1", // 0,1
requestTime: this.jobContent.requestTime,
dueTime: "2023-08-4 16:30:11", //
departmentCode: this.jobContent.departmentCode,
UserPositionCode: "", //
interfaceType: "jklxPURCHASE_RECEIPT", //
Number: this.jobContent.Number,
businessType: this.jobContent.businessType,
remark: this.jobContent.remark,
creationTime: this.jobContent.creationTime,
Creatorld: this.jobContent.Creatorld,
creatorName: this.jobContent.creatorName,
extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld,
Code: "",
details: [
],
}
this.detailSource.forEach(res => {
res.details.forEach(res1 => {
if (res1.scaned) {
res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = "";
res1.record.ToLocationGroupCode = this.toLocationInfo.LocationGroupCode;
res1.record.ToAreaCode = this.toLocationInfo.AreaCode;
res1.record.VisualInspectResult = ""; //
res1.record.VisualInspectPhotos = ""; //
res1.record.FailedReason = ""; //
res1.record.MassDefect = ""; //
res1.record.SinglePrice = ""; //
res1.record.Amount = ""; //
res1.record.Code = "";
res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT";
params.details.push(res1.record)
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)
}
})
})
return params;
return subList;
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {

7
pages/scrap/request/scrapRequestDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
@ -46,7 +45,7 @@
return {
id: '',
requestContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
};
},
@ -84,8 +83,8 @@
} else {
if (res.data.subList.length > 0) {
that.requestContent = res.data;
that.detailList = res.data.subList;
that.detailSource = getDataSource(that.detailList);
that.subList = res.data.subList;
that.detailSource = getDataSource(that.subList);
} else {
that.showMessage('列表数据为0');
}}

81
pages/scrap/request/scrapRrequest.vue

@ -1,21 +1,23 @@
<template>
<view >
<view>
<com-empty-view v-if="requestList.length==0"></com-empty-view>
<request-filter ref="filter" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber"
:checkedWaitTask="checkedWaitTask">
</request-filter>
<view v-if="requestList.length>0">
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in requestList" :key="index">
<uni-swipe-action-item :right-options="item.options" @click="swipeClick($event,item)">
<com-scrap-request-card :dataContent="item" @click='openRequestDetail(item)'></com-scrap-request-card>
</uni-swipe-action-item>
</view>
</uni-swipe-action>
<uni-load-more :status="loadingType" />
<requestButton @goScan='openScanDetailPopup' ></requestButton>
<request-info-popup ref='requestInfoPopup'></request-info-popup>
<view v-if="requestList.length>0">
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in requestList" :key="index">
<uni-swipe-action-item :right-options="item.options" @click="swipeClick($event,item)">
<com-scrap-request-card :dataContent="item" @click='openRequestDetail(item)'>
</com-scrap-request-card>
</uni-swipe-action-item>
</view>
</uni-swipe-action>
<uni-load-more :status="loadingType" />
<request-info-popup ref='requestInfoPopup'></request-info-popup>
</view>
<requestButton @goScan='openScanDetailPopup'></requestButton>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
@ -31,7 +33,7 @@
goHome,
updateTitle
} from '@/common/basic.js';
import {
getBusinessType,
} from '@/common/record.js';
@ -78,7 +80,7 @@
this.detailOptions = getDetailOption();
this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
this.detailAndHandleOption = getDetailAndHandleOption()
this.detailAndHandleOption = getDetailAndHandleOption()
this.detailAndCloseOption = getDetailAndCloseOption()
},
@ -89,7 +91,7 @@
}
this.getList("more");
},
onPullDownRefresh() {
this.getList('refresh');
},
@ -110,8 +112,7 @@
},
methods: {
requestConfirm(action, item) {
},
requestConfirm(action, item) {},
openRequestInfoPopup(item) {
this.$refs.requestInfoPopup.openPopup(item)
@ -123,34 +124,34 @@
},
getList(type) {
let that = this;
uni.showLoading({
title: "加载中­....",
mask: true
});
uni.showLoading({
title: "加载中­....",
mask: true
});
this.loadingType = "loading";
if (type === "refresh") {
this.pageNo = 1;
this.requestList = [];
}
var filters = []
if (this.checkedWaitTask) {
filters.push({
column: "status",
action: "==",
value: this.status
})
}
var params = {
filters: filters,
pageNo: this.pageNo,
pageSize: this.pageSize,
}
var filters = []
if (this.checkedWaitTask) {
filters.push({
column: "status",
action: "==",
value: this.status
})
}
var params = {
filters: filters,
pageNo: this.pageNo,
pageSize: this.pageSize,
}
getScrapRequestList(params).then(res => {
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
}
var list = res.data.list;
this.totalCount = res.data.total
this.loadingType = "loadmore";
@ -194,7 +195,7 @@
openScanDetailPopup() {
uni.navigateTo({
url:"../record/scrapRecord?fromType="+this.fromType
url: "../record/scrapRecord?fromType=" + this.fromType
})
},
@ -215,17 +216,17 @@
console.log("关闭")
}
},
switchChangeWait(state, jobStatus) {
this.checkedWaitTask = state;
this.status = jobStatus;
this.getList("refresh");
},
getScanNumber(code) {
this.getDataListByType(code)
},
getDataListByType(code) {
let that = this;
uni.showLoading({
@ -238,7 +239,7 @@
action: "==",
value: code
})
var params = {
filters: filters,
pageNo: 1,

2
pages/supplierDeliver/coms/comRecordDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="detailOptions">

17
pages/supplierDeliver/record/supplierDeliverRecordDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="page-main">
@ -84,12 +83,8 @@
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [],
toLocationCode: '',
toLocationInfo: {},
@ -127,12 +122,12 @@
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.detailList = res.data.subList;
that.detailList.forEach(res => {
that.subList = res.data.subList;
that.subList.forEach(res => {
res.packingNumber = res.toPackingNumber
res.batch = res.fromBatch
})
that.detailSource = getDataSource(that.detailList)
that.detailSource = getDataSource(that.subList)
} else {
that.showMessage('列表数据为0');
}
@ -154,7 +149,7 @@
if (detail == undefined) {
this.showMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.details.find(r => r.packingNumber == packingNumber && r.batch == batch);
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch);
if (itemDetail == undefined) {
this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中")
} else {
@ -185,7 +180,7 @@
},
getScanCount(closeScan) {
let items = this.detailList.filter(r => {
let items = this.subList.filter(r => {
if (r.scaned) {
return r;
}

139
pages/transfer/coms/comTransferRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="">
@ -44,12 +43,20 @@
</template>
<script>
import {
transferIssueRecordSubmit,
transferReceiptRecordSubmit
} from '@/api/request2.js';
import {
goHome,
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/basic.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/directory.js';
import {
getBusinessType,
@ -92,12 +99,8 @@
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
@ -158,10 +161,10 @@
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.details.find(r => {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
@ -171,7 +174,7 @@
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -179,10 +182,8 @@
}
}
this.calcHandleQty();
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
@ -204,7 +205,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
@ -212,7 +213,6 @@
},
openScanPopup() {
if (this.fromLocationCode == "") {
this.showFromLocationPopup();
return
@ -252,83 +252,52 @@
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
// (this.id, params).then(res => {
// uni.hideLoading()
// if (res.data) {
// var hint = res.data.Number;
// this.showCommitSuccessMessage("" + hint, )
// } else {
// this.showErrorMessage("")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
if(this.transferType=="transferIssue"){
// transferIssueRecordSubmit(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 if(this.transferType=="transferReceipt"){
// transferReceiptRecordSubmit(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)
// })
}
},
setParams() {
var params = {
requestNumber: this.jobContent.requestNumber,
jobNumber: "",
asnNumber: this.jobContent.asnNumber,
ppNumber: this.jobContent.ppNumber,
supplierCode: this.jobContent.supplierCode,
ReceiptDock: this.jobContent.ReceiptDock,
carrierCode: this.jobContent.carrierCode,
transferMode: this.jobContent.transferMode,
vehiclePlateNumber: this.jobContent.vehiclePlateNumber,
fromWarehouseCode: this.toLocationInfo.WarehouseCode,
toWarehouseCode: this.toLocationInfo.WarehouseCode,
OutTransaction: this.businessTypeInfo.OutTransactionType, //
InTransaction: this.businessTypeInfo.InTransactionType, //
executeTime: "2023-08-4 16:30:11", //
activeDate: "2023-08-4 16:30:11", //
available: "1", // 0,1
requestTime: this.jobContent.requestTime,
dueTime: "2023-08-4 16:30:11", //
departmentCode: this.jobContent.departmentCode,
UserPositionCode: "", //
interfaceType: "jklxPURCHASE_RECEIPT", //
Number: this.jobContent.Number,
businessType: this.jobContent.businessType,
remark: this.jobContent.remark,
creationTime: this.jobContent.creationTime,
Creatorld: this.jobContent.Creatorld,
creatorName: this.jobContent.creatorName,
extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld,
Code: "",
details: [
],
}
this.detailSource.forEach(res => {
res.details.forEach(res1 => {
if (res1.scaned) {
res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = "";
res1.record.ToLocationGroupCode = this.toLocationInfo.LocationGroupCode;
res1.record.ToAreaCode = this.toLocationInfo.AreaCode;
res1.record.VisualInspectResult = ""; //
res1.record.VisualInspectPhotos = ""; //
res1.record.FailedReason = ""; //
res1.record.MassDefect = ""; //
res1.record.SinglePrice = ""; //
res1.record.Amount = ""; //
res1.record.Code = "";
res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT";
params.details.push(res1.record)
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)
}
})
})
return params;
return subList;
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {}

38
pages/transfer/job/issueDetail.vue

@ -78,12 +78,8 @@
received: false,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
toLocationInfo: {},
businessTypeInfo: {},
locationTypeList: [],
@ -170,8 +166,8 @@
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.detailList = res.data.subList;
that.detailSource = getDataSource(that.detailList)
that.subList = res.data.subList;
that.detailSource = getDataSource(that.subList)
} else {
that.showMessage('列表数据为0');
}
@ -192,7 +188,7 @@
qty: res.qty,
handleQty: 0,
uom: res.uom,
details: []
subList: []
}
return item;
},
@ -205,13 +201,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();
}
},
@ -225,7 +221,7 @@
//
continueScan() {
this.scanCount = this.getScanCount();
if (this.scanCount == this.detailList.length) {
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
@ -233,7 +229,7 @@
},
getScanCount(closeScan) {
let items = this.detailList.filter(r => {
let items = this.subList.filter(r => {
if (r.scaned) {
return r;
}
@ -255,7 +251,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) {
@ -283,7 +279,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
})
@ -322,9 +318,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") {
//
@ -333,7 +329,7 @@
//
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this
.detailList.length + "]箱", res => {
.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
@ -388,7 +384,7 @@
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.details.forEach(detail => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
@ -460,12 +456,6 @@
this.scanPopupGetFocus();
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.datacontent.scrollTop;
},
closeCommitMessage() {
setTimeout(() => {
uni.navigateTo({

32
pages/transfer/job/receiptDetail.vue

@ -79,12 +79,8 @@
received: false,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
toLocationInfo: {},
businessTypeInfo: {},
locationTypeList: [],
@ -172,8 +168,8 @@
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.detailList = res.data.subList;
that.detailSource = getDataSource(that.detailList)
that.subList = res.data.subList;
that.detailSource = getDataSource(that.subList)
} else {
that.showMessage('列表数据为0');
}
@ -195,7 +191,7 @@
//
continueScan() {
this.scanCount = this.getScanCount();
if (this.scanCount == this.detailList.length) {
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
@ -203,7 +199,7 @@
},
getScanCount(closeScan) {
let items = this.detailList.filter(r => {
let items = this.subList.filter(r => {
if (r.scaned) {
return r;
}
@ -225,7 +221,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) {
@ -253,7 +249,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
})
@ -294,9 +290,9 @@
//
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") {
//
@ -305,7 +301,7 @@
//
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this
.detailList.length + "]箱", res => {
.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
@ -363,7 +359,7 @@
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.details.forEach(detail => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
@ -435,12 +431,6 @@
this.scanPopupGetFocus();
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.datacontent.scrollTop;
},
closeCommitMessage() {
setTimeout(() => {
uni.navigateTo({

52
pages/transfer/job/transferDetail.vue

@ -74,12 +74,8 @@
received: false,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
toLocationInfo: {},
businessTypeInfo: {},
locationTypeList: [],
@ -161,10 +157,10 @@
getInventoryMoveJobDetail(that.id).then(res => {
uni.hideLoading();
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)
} else {
that.showMessage('列表数据为0');
}
@ -175,20 +171,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;
@ -203,7 +199,7 @@
qty: res.qty,
handleQty: 0,
uom: res.uom,
details: []
subList: []
}
return item;
},
@ -216,13 +212,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();
}
},
@ -230,7 +226,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)
}
@ -244,7 +240,7 @@
//
continueScan() {
this.scanCount = this.getScanCount();
if (this.scanCount == this.detailList.length) {
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
@ -252,7 +248,7 @@
},
getScanCount(closeScan) {
let items = this.detailList.filter(r => {
let items = this.subList.filter(r => {
if (r.scaned) {
return r;
}
@ -270,7 +266,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) {
@ -298,7 +294,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,10 +350,10 @@
this.submitJob();
} else {
this.scanCount = this.getScanCount();
if (this.scanCount < this.detailList.length) {
if (this.scanCount < this.subList.length) {
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this
.detailList.length + "]箱", res => {
.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
@ -437,12 +433,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
@ -464,7 +460,7 @@
detail.record.projectCode = "",
detail.record.Code = ""
detail.record.interfaceType = "jklxPURCHASE_RETURN"
params.details.push(detail.record)
params.subList.push(detail.record)
}
})
})
@ -527,12 +523,6 @@
this.scanPopupGetFocus();
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.datacontent.scrollTop;
},
closeCommitMessage() {
setTimeout(() => {
uni.navigateTo({

2
pages/unPlanned/coms/comIssueDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">

2
pages/unPlanned/coms/comReceiptDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">

6
pages/unPlanned/coms/comReceiptRecord.vue

@ -12,7 +12,7 @@
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.details">
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
@ -90,7 +90,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()
@ -158,7 +158,7 @@
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
this.dataContent.details.splice(index, 1)
this.dataContent.subList.splice(index, 1)
this.$emit('removePack')
}
});

35
pages/unPlanned/job/issueJobDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="page-main">
@ -78,15 +77,10 @@
return {
id: '',
received: false,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [],
businessTypeInfo: {},
managementList: []
@ -165,8 +159,8 @@
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.locationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes);
that.detailList = res.data.subList;
that.detailSource = getDataSource(that.detailList)
that.subList = res.data.subList;
that.detailSource = getDataSource(that.subList)
} else {
that.showErrorMessage('列表数据为0');
@ -188,7 +182,7 @@
qty: res.qty,
handleQty: 0,
uom: res.uom,
details: []
subList: []
}
return item;
},
@ -202,8 +196,8 @@
//
continueScan() {
this.scanCount = getScanCount(this.detailList);
if (this.scanCount == this.detailList.length) {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
@ -234,7 +228,7 @@
if (detail == undefined) {
this.showMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.details.find(r => r.packingNumber == packingNumber);
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber);
if (itemDetail == undefined) {
this.showMessage("箱码【" + packingNumber + "】不在列表中")
} else {
@ -256,9 +250,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") {
//
@ -267,7 +261,7 @@
//
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this
.detailList.length + "]箱", res => {
.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
@ -316,7 +310,7 @@
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.details.forEach(detail => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
@ -364,7 +358,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) {
@ -394,11 +388,6 @@
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.datacontent.scrollTop;
},
closeCommitMessage() {
setTimeout(() => {
uni.navigateTo({

40
pages/unPlanned/job/receiptJobDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template>
<view class="page-wraper">
<view class="page-main">
@ -69,12 +68,10 @@
id: '',
receiptJob: {},
received: false,
scanCount: 0,
jobContent: {}, //
detailList: [], //details
subList: [], //subList
detailSource: [], //
scrollTop: 0,
locationTypeList: [],
toLocationCode: '',
toLocationInfo: {},
@ -152,8 +149,8 @@
that.jobContent = res.data;
// that.toLocationCode=that.jobContent.toLocationCode;
that.locationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes);
that.detailList = res.data.subList;
that.detailSource = that.getDataSource(that.detailList)
that.subList = res.data.subList;
that.detailSource = that.getDataSource(that.subList)
} else {
that.showErrorMessage('列表数据为0');
}
@ -164,20 +161,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;
@ -192,7 +189,7 @@
qty: res.qty,
handleQty: 0,
uom: res.uom,
details: []
subList: []
}
return item;
},
@ -205,7 +202,7 @@
},
getScanCount(closeScan) {
let items = this.detailList.filter(r => {
let items = this.subList.filter(r => {
if (r.scaned) {
return r;
}
@ -217,7 +214,7 @@
//
continueScan() {
this.scanCount = this.getScanCount();
if (this.scanCount == this.detailList.length) {
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
@ -227,7 +224,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)
}
@ -264,7 +261,7 @@
this.showMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.details.find(r => r.packingNumber == packingNumber && r.batch == batch);
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch);
if (itemDetail == undefined) {
this.showMessage("箱码【" + packingNumber + "】,批次【" + batch + "】不在列表中")
} else {
@ -291,9 +288,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") {
//
@ -302,7 +299,7 @@
//
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this
.detailList.length + "]箱", res => {
.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
@ -351,7 +348,7 @@
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.details.forEach(detail => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
@ -408,11 +405,6 @@
this.$refs.scanPopup.losefocus();
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.datacontent.scrollTop;
},
closeCommitMessage() {
setTimeout(() => {
uni.navigateTo({

96
pages/unPlanned/record/issueRecord.vue

@ -11,8 +11,9 @@
</uni-data-picker>
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index" @removeItem="removeItem(index,item)"
@updateData="updateData" :isShowLocation="true" @removePack="removePack">
<record-com-detail-card :dataContent="item" :index="index"
@removeItem="removeItem(index,item)" @updateData="updateData" :isShowLocation="true"
@removePack="removePack">
</record-com-detail-card>
</view>
<u-line />
@ -32,7 +33,8 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :title="'箱码'"></win-scan-pack-and-location>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :title="'箱码'">
</win-scan-pack-and-location>
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromLocationTypeArray"></win-scan-location>
<com-message ref="comMessage"></com-message>
@ -48,10 +50,15 @@
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import comMessage from '@/mycomponents/common/comMessage.vue'
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import {
unPlannedIssueRequestSubmit,
unPlannedIssueRecordSubmit
} from '@/api/request2.js';
import {
getBalanceByUniquecode,
} from '@/api/request.js';
import {
getBusinessType,
} from '@/common/record.js';
@ -60,13 +67,13 @@
getDirectoryItemArray,
getUnPlannedIssuseReasonList,
} from '@/common/directory.js';
import {
createItemInfo,
createDetailInfo,
calcHandleQty
} from '@/common/record.js';
import {
goHome,
updateTitle
@ -95,7 +102,7 @@
detailSource: [], //
reason: "",
reasonList: [],
fromType:""
fromType: ""
}
},
@ -107,18 +114,18 @@
this.fromLocationTypeArray = res.fromlocationTypeList;
this.showFromLocationPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message );
this.$refs.comMessage.showBreakMessage(res.message);
}
});
},
onLoad(option) {
this.fromType = option.fromType
if (this.fromType == "requestType") {
updateTitle("计划外出库申请")
} else {
updateTitle("计划外出库记录")
}
this.fromType = option.fromType
if (this.fromType == "requestType") {
updateTitle("计划外出库申请")
} else {
updateTitle("计划外出库记录")
}
},
methods: {
@ -157,12 +164,12 @@
}
})
if (item == undefined) {
var itemp = createItemInfo(balance,pack);
let newDetail = createDetailInfo(balance,pack); //
itemp.details.push(newDetail);
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.details.find(r => {
var detail = item.subList.find(r => {
if (r.packingNumber == result.packingNumber &&
r.batch == result.batch &&
r.locationCode == result.locationCode &&
@ -173,8 +180,8 @@
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance,pack);
item.details.push(newDetail);
let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail);
} else {
this.showErrorMessage(result.packingNumber + "已经在列表中")
}
@ -201,7 +208,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
@ -215,9 +222,50 @@
this.showErrorMessage("请选择出库原因")
return;
}
console.log("提交", this.reason)
}
var params = this.setParams();
console.log("提交参数",JSON.stringify(params));
if(this.fromType=="requestType"){
// unPlannedIssueRequestSubmit(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 {
// unPlannedIssueRecordSubmit(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)
// })
}
},
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)
}
})
})
return subList;
},
}
}
</script>

49
pages/unPlanned/record/receiptRecord.vue

@ -52,9 +52,10 @@
import comMessage from '@/mycomponents/common/comMessage.vue'
import {
getBalanceByUniquecode,
} from '@/api/request.js';
unPlannedReceiptRequestbSubmit,
unPlannedReceiptRecordbSubmit
} from '@/api/request2.js';
import {
getDirectoryItemArray,
getUnPlannedReceiptReasonList
@ -139,10 +140,10 @@
if (item == undefined) {
var itemp = this.createItemInfo(label, pack);
let newDetail = this.createDetailInfo(label, pack);
itemp.details.push(newDetail);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.details.find(r => {
var detail = item.subList.find(r => {
if (r.packingNumber == result.number &&
r.batch == result.batch) {
return r;
@ -151,7 +152,7 @@
if (detail == undefined) {
let newDetail = this.createDetailInfo(label, pack);
item.details.push(newDetail);
item.subList.push(newDetail);
} else {
if (detail.scaned) {
this.showErrorMessage("箱码[" + result.Number + "]批次[" + result.batch + "]已经扫描")
@ -172,7 +173,7 @@
qty: label.qty,
handleQty: 0,
uom: label.uom,
details: []
subList: []
}
return item;
},
@ -194,7 +195,7 @@
calcHandleQty() {
for (let item of this.detailSource) {
item.qty = 0;
for (let detail of item.details) {
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
}
@ -216,7 +217,7 @@
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.details.length == 0) {
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
@ -235,8 +236,34 @@
this.showErrorMessage("请选择入库原因")
return;
}
console.log("提交", this.reason)
if(this.fromType=="requestType"){
// unPlannedReceiptRequestbSubmit(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 {
// unPlannedReceiptRecordbSubmit(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)
// })
}
}
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save