Browse Source

添加接口

wms3.0_pda
李俊城 2 years 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' 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 {*} * @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 * @param {*} params
*/ */
export function createPurchaseReturnRecord(params) { export function purchaseReturnRecordSubmit(params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/purchasereturn/createRecord", url: baseApi + "/magic-api/pda/job/purchasereturn/createRecord",
method: "put", method: "put",
@ -567,7 +597,7 @@ export function createPurchaseReturnRecord(params) {
* 采购退货 申请提交 * 采购退货 申请提交
* @param {*} params * @param {*} params
*/ */
export function createPurchaseReturnRequest(params) { export function purchaseReturnRequestSubmit(params) {
return request({ return request({
url: baseApi + "/wms/purchasereturn-request-main/submit", url: baseApi + "/wms/purchasereturn-request-main/submit",
method: "put", method: "put",
@ -829,10 +859,22 @@ export function cancleTakeProductionReceiptJob(id) {
* 生产收料 提交 * 生产收料 提交
* @param {*} params * @param {*} params
*/ */
export function productionReceiptJobSubmit(id, params) { export function productionReceiptJobSubmit(params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/putaway/jobSubmit?id=" + id, url: baseApi + "/magic-api/pda/job/putaway/jobSubmit",
method: "post", method: "put",
data: params,
});
}
/**
* 生产收料记录 提交
* @param {*} params
*/
export function productionReceiptRecordSubmit(params) {
return request({
url: baseApi + "/magic-api/pda/job/putaway/jobSubmit",
method: "put",
data: params, 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 * @param {*} params
*/ */
export function unPlannedReceiptJobSubmit(id, params) { export function unPlannedReceiptRecordbSubmit(id, params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/purchasereturn/jobSubmit?id=" + id, url: baseApi + "/magic-api/pda/job/purchasereturn/jobSubmit?id=" + id,
method: "post", method: "post",
@ -1104,10 +1170,34 @@ export function cancleTakeUnPlannedIssueJob(id) {
* 计划外出库 提交 * 计划外出库 提交
* @param {*} params * @param {*} params
*/ */
export function unPlannedIssueJobSubmit(id, params) { export function unPlannedIssueJobSubmit(params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/purchasereturn/jobSubmit?id=" + id, url: baseApi + "/magic-api/pda/job/purchasereturn/jobSubmit",
method: "post", 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, data: params,
}); });
} }
@ -1142,7 +1232,7 @@ export function getProductReceiptJobDetail(id) {
} }
/** /**
* 制品上架 承接 * 制品收货 承接
* @param {*} id * @param {*} id
* *
*/ */
@ -1155,7 +1245,7 @@ export function takeProductReceiptJob(id) {
} }
/** /**
* 制品上架 放弃承接 * 制品收货 放弃承接
* @param {*} id * @param {*} id
* *
*/ */
@ -1171,9 +1261,9 @@ export function cancleTakeProductReceiptJob(id) {
* 制品收货 提交 * 制品收货 提交
* @param {*} params * @param {*} params
*/ */
export function productReceiptJobsubmit(id, params) { export function productReceiptJobsubmit( params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/purchasereturn/jobSubmit?id=" + id, url: baseApi + "/magic-api/pda/job/purchasereturn/jobSubmit",
method: "put", method: "put",
data: params, data: params,
}); });
@ -1242,7 +1332,22 @@ export function cancleTakeProductPutawayJob(id) {
*/ */
export function productPutawayJobSubmit(params) { export function productPutawayJobSubmit(params) {
return request({ 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", method: "put",
data: params, data: params,
}); });
@ -1311,9 +1416,9 @@ export function cancleTakeProductDismantleJob(id) {
*/ */
export function productDismantleJobSubmit(params) { export function productDismantleJobSubmit(params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit?id=" + id, url: baseApi + "/wms/purchasereceipt-job-main/abandon",
method: "put", 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 任务状态 * status 任务状态
@ -1449,7 +1607,7 @@ export function cancleTakeCustomerReturnJob(id) {
*/ */
export function customerReturnJobSubmit(params) { export function customerReturnJobSubmit(params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit?id=" + id, url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit",
method: "put", method: "put",
data: params, 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 任务状态 * status 任务状态
@ -1550,7 +1733,20 @@ export function cancleTakeTransferReceiptJob(id) {
*/ */
export function transferReceiptJobSubmit(params) { export function transferReceiptJobSubmit(params) {
return request({ 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", method: "put",
data: params, data: params,
}); });
@ -1586,7 +1782,7 @@ export function getTransferIssueJobDetail(id) {
} }
/** /**
* 生产退料 承接 * 调拨出库 承接
* @param {*} id * @param {*} id
* *
*/ */
@ -1599,7 +1795,7 @@ export function takeTransferIssueJob(id) {
} }
/** /**
* 生产退料 放弃承接 * 调拨出库 放弃承接
* @param {*} 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 * @param {*} params
@ -1679,35 +1900,32 @@ export function getIssueRequestDetail(id) {
} }
/** /**
* 采购退货 申请列表 * 发料申请 提交
* 任务状态 * @param {*} params
* 开始日期
* 结束日期
* 获取日期任务列表
* @param {*}
*/ */
export function getPurchaseReturnRequestList(params) { export function issueRequestSubmit(params) {
return request({ return request({
url: baseApi + "/wms/purchasereturn-request-main/senior", url: baseApi + "/wms/purchasereturn-request-main/submit",
method: "post", method: "put",
data: params, data: params,
}); });
} }
/** /**
* 采购退货 获取申请任务明细 * 发料记录 提交
* @param {*} id 任务id * @param {*} params
*
*/ */
export function getPurchaseReturnRequestDetail(id) { export function issueRecordSubmit(params) {
return request({ return request({
url: baseApi + "/wms/purchasereturn-request-main/getPurchasereturnRequestById?id=" + id, url: baseApi + "/wms/purchasereturn-request-main/submit",
method: "get", method: "put",
data: {}, 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 * @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 任务状态 * status 任务状态
@ -1809,10 +2064,9 @@ export function getProductionReturnRequestList(params) {
}); });
} }
/** /**
* 生产退料 获取任务明细 * 生产退料申请 获取申请明细
* @param {*} number id 任务id * @param {*} id
* *
*/ */
export function getProductionReturnRequestDetail(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({ return request({
url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit?id=" + id, url: baseApi + "/wms/purchasereturn-request-main/submit",
method: "put", method: "put",
data: params, 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 任务状态 * status 任务状态
@ -1901,63 +2161,19 @@ export function getUnPlannedReceiptRequestDetail(id) {
} }
/** /**
* 报废出库 申请 * 计划外入库 申请提交
* status 任务状态 * @param {*} params
* 开始日期
* 结束日期
* 获取任务列表
* @param {*}
*/ */
export function getScrapRequestList(params) { export function unPlannedReceiptRequestSubmit(params) {
return request({ return request({
url: baseApi + "/wms/scrap-request-main/senior", url: baseApi + "/wms/purchasereturn-request-main/submit",
method: "post", method: "put",
data: params, 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 * @param {*} params
*/ */
export function repleinshJobSubmit(id, params) { export function repleinshJobSubmit(params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/putaway/jobSubmit?id=" + id, url: baseApi + "/magic-api/pda/job/putaway/jobSubmit",
method: "post", 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, data: params,
}); });
} }

10
common/basic.js

@ -824,20 +824,20 @@ export function vibrate() {
} }
export function getDataSource(details) { export function getDataSource(subList) {
let items = []; let items = [];
details.forEach(detail => { subList.forEach(detail => {
var item = items.find(r => var item = items.find(r =>
r.itemCode == detail.itemCode) r.itemCode == detail.itemCode)
if (item == undefined) { if (item == undefined) {
item = createItemInfo(detail); item = createItemInfo(detail);
let newDetail = createDetailInfo(detail); // let newDetail = createDetailInfo(detail); //
item.details.push(newDetail); item.subList.push(newDetail);
items.push(item) items.push(item)
} else { } else {
item.qty += Number(detail.qty) item.qty += Number(detail.qty)
let newDetail = createDetailInfo(detail); // let newDetail = createDetailInfo(detail); //
item.details.push(newDetail); item.subList.push(newDetail);
} }
}) })
return items; return items;
@ -852,7 +852,7 @@ export function createItemInfo(res) {
qty: Number(res.qty), qty: Number(res.qty),
handleQty: 0, handleQty: 0,
uom: res.uom, uom: res.uom,
details: [] subList: []
} }
return item; return item;
} }

16
common/detail.js

@ -1,17 +1,17 @@
export function getDataSource(details) { export function getDataSource(subList) {
let items = []; let items = [];
details.forEach(detail => { subList.forEach(detail => {
var item = items.find(r => var item = items.find(r =>
r.itemCode == detail.itemCode) r.itemCode == detail.itemCode)
if (item == undefined) { if (item == undefined) {
item = createItemInfo(detail); item = createItemInfo(detail);
let newDetail = createDetailInfo(detail); // let newDetail = createDetailInfo(detail); //
item.details.push(newDetail); item.subList.push(newDetail);
items.push(item) items.push(item)
} else { } else {
item.qty += detail.qty item.qty += detail.qty
let newDetail = createDetailInfo(detail); // let newDetail = createDetailInfo(detail); //
item.details.push(newDetail); item.subList.push(newDetail);
} }
}) })
return items; return items;
@ -26,7 +26,7 @@ export function createItemInfo(detail) {
qty: Number(detail.qty), qty: Number(detail.qty),
handleQty: 0, handleQty: 0,
uom: detail.uom, uom: detail.uom,
details: [] subList: []
} }
return item; return item;
} }
@ -56,7 +56,7 @@ export function createRecordInfo(detail, balance) {
export function calcHandleQty(detailSource) { export function calcHandleQty(detailSource) {
for (let item of detailSource) { for (let item of detailSource) {
item.handleTotalQty = 0; item.handleTotalQty = 0;
for (let detail of item.details) { for (let detail of item.subList) {
if (detail != undefined && detail.scaned) { if (detail != undefined && detail.scaned) {
item.handleTotalQty += Number(detail.handleQty) item.handleTotalQty += Number(detail.handleQty)
} }
@ -65,8 +65,8 @@ export function calcHandleQty(detailSource) {
} }
export function getScanCount(detailList) { export function getScanCount(subList) {
let items = detailList.filter(r => { let items = subList.filter(r => {
if (r.scaned) { if (r.scaned) {
return r; return r;
} }

6
common/record.js

@ -15,7 +15,7 @@ export function createItemInfo(balance, pack) {
qty: Number(balance.qty), qty: Number(balance.qty),
handleQty: 0, handleQty: 0,
uom: pack.uom, uom: pack.uom,
details: [] subList: []
} }
return item; return item;
} }
@ -25,6 +25,8 @@ export function createDetailInfo(data, pack) {
let detail = {}; let detail = {};
Object.assign(detail, data) Object.assign(detail, data)
detail.balanceQty = Number(detail.qty) detail.balanceQty = Number(detail.qty)
detail.stdPackQty = Number(pack.stdPackQty)
detail.stdPackUnit =pack.stdPackUnit
detail.package = pack; detail.package = pack;
return detail; return detail;
} }
@ -33,7 +35,7 @@ export function createDetailInfo(data, pack) {
export function calcHandleQty(detailSource) { export function calcHandleQty(detailSource) {
for (let item of detailSource) { for (let item of detailSource) {
item.qty = 0; item.qty = 0;
for (let detail of item.details) { for (let detail of item.subList) {
if (detail != undefined && detail.scaned) { if (detail != undefined && detail.scaned) {
item.qty = item.qty + Number(detail.qty) item.qty = item.qty + Number(detail.qty)
} }

2
mycomponents/detail/comDetailCard.vue

@ -7,7 +7,7 @@
</item-compare-qty> </item-compare-qty>
</template> </template>
<u-line /> <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 ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)" <uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions"> :right-options="item.scaned?scanOptions:detailOptions">

2
mycomponents/detail/comRequestDetailCard.vue

@ -10,7 +10,7 @@
</item-compare-qty> </item-compare-qty>
</template> </template>
<u-line /> <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 ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)" <uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions"> :right-options="item.scaned?scanOptions:detailOptions">

2
mycomponents/job/jobcomDetailCard.vue

@ -7,7 +7,7 @@
</item-compare-qty> </item-compare-qty>
</template> </template>
<u-line /> <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 ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)" <uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions"> :right-options="item.scaned?scanOptions:detailOptions">

7
mycomponents/record/recordComDetailCard.vue

@ -11,7 +11,7 @@
</uni-swipe-action> </uni-swipe-action>
</template> </template>
<u-line /> <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 ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,detail,index)" <uni-swipe-action-item @click="swipeClick($event,detail,index)"
:right-options="detail.scaned?scanOptions:detailOptions"> :right-options="detail.scaned?scanOptions:detailOptions">
@ -85,7 +85,7 @@
watch: { watch: {
dataContent: { dataContent: {
handler(newName, oldName) { handler(newName, oldName) {
if (this.dataContent.details.length > 0) { if (this.dataContent.subList.length > 0) {
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) { if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) {
this.$nextTick(res => { this.$nextTick(res => {
this.$refs.collapse1.resize() this.$refs.collapse1.resize()
@ -141,6 +141,7 @@
edit(item) { edit(item) {
this.editItem = item; this.editItem = item;
debugger
this.$refs.balanceQtyEdit.openEditPopup(this.editItem, this.editItem.qty); this.$refs.balanceQtyEdit.openEditPopup(this.editItem, this.editItem.qty);
}, },
@ -154,7 +155,7 @@
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?", this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => { res => {
if (res) { if (res) {
this.dataContent.details.splice(index, 1) this.dataContent.subList.splice(index, 1)
this.$emit('removePack') this.$emit('removePack')
} }
}); });

6
pages/count/coms/comCountDetailCard.vue

@ -10,7 +10,7 @@
</uni-swipe-action> </uni-swipe-action>
</template> </template>
<u-line /> <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 ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)" <uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions"> :right-options="item.scaned?scanOptions:detailOptions">
@ -58,7 +58,7 @@
watch: { watch: {
dataContent: { dataContent: {
handler(newName, oldName) { handler(newName, oldName) {
if (this.dataContent.details.length > 0) { if (this.dataContent.subList.length > 0) {
if (this.$refs.collapse1 != undefined) { if (this.$refs.collapse1 != undefined) {
this.$nextTick(res => { this.$nextTick(res => {
this.$refs.collapse1.resize() this.$refs.collapse1.resize()
@ -129,7 +129,7 @@
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?", this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => { res => {
if (res) { if (res) {
// this.dataContent.details.splice(index, 1) // this.dataContent.subList.splice(index, 1)
item.scaned = false; item.scaned = false;
item.record = null; item.record = null;
this.$emit('removePack') this.$emit('removePack')

64
pages/count/job/countDetail.vue

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

47
pages/count/record/countRecord.vue

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

6
pages/customerReturn/coms/comReturnRecord.vue

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

31
pages/customerReturn/job/returnDetail.vue

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

22
pages/customerReturn/record/returnRecord.vue

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

2
pages/deliver/coms/comDeliverDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty> <item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template> </template>
<u-line /> <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 ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)" <uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions"> :right-options="item.scaned?scanOptions:detailOptions">

27
pages/deliver/job/deliverDetail.vue

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

906
pages/deliver/record/deliverRecord.vue

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

2
pages/deliver/request/deliverRequest.vue

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

9
pages/deliver/request/deliverRequestDetail.vue

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

2
pages/inspect/coms/comInspectDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty> <item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template> </template>
<u-line /> <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 ref="swipeAction">
<uni-swipe-action-item :right-options="item.scaned?scanOptions:detailOptions" <uni-swipe-action-item :right-options="item.scaned?scanOptions:detailOptions"
@click="swipeClick($event,item)"> @click="swipeClick($event,item)">

4
pages/inspect/coms/inspectComDetailCard.vue

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

4
pages/inspect/coms/inspectEdit.vue

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

100
pages/inspect/job/inspectDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class="page-main"> <view class="page-main">
@ -44,8 +43,10 @@
goHome, goHome,
getCurrDateTime, getCurrDateTime,
getPackingNumberAndBatch, getPackingNumberAndBatch,
getInventoryStatusName
} from '@/common/basic.js'; } from '@/common/basic.js';
import {
getInventoryStatusName
} from '@/common/directory.js';
import { import {
getManagementPrecisions getManagementPrecisions
@ -81,7 +82,7 @@
received: false, received: false,
scanCount: 0, scanCount: 0,
jobContent: {}, // jobContent: {}, //
detailList: [], //details subList: [], //subList
detailSource: [], // detailSource: [], //
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
@ -94,7 +95,7 @@
this.id = option.id; this.id = option.id;
if (this.id != undefined) { if (this.id != undefined) {
// // // //
// if (option.status == "JOB_PENDING") { // if (option.status == "1") {
// this.receive((callback => { // this.receive((callback => {
// this.received = true; // this.received = true;
// this.getDetail(); // this.getDetail();
@ -171,8 +172,8 @@
} else { } else {
if (res.data.subList.length > 0) { if (res.data.subList.length > 0) {
that.jobContent = res.data; that.jobContent = res.data;
that.detailList = res.data.subList; that.subList = res.data.subList;
that.detailList.forEach(res => { that.subList.forEach(res => {
res.batch =that.jobContent.batch res.batch =that.jobContent.batch
res.goodQty = 0; res.goodQty = 0;
res.failedQty = 0; res.failedQty = 0;
@ -183,7 +184,7 @@
res.photos = "" res.photos = ""
res.inspectResult ="" res.inspectResult =""
}) })
that.detailSource = getDataSource(that.detailList); that.detailSource = getDataSource(that.subList);
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }
@ -197,13 +198,13 @@
calcScanCount(closeScan) { calcScanCount(closeScan) {
let items = this.detailList.filter(r => { let items = this.subList.filter(r => {
if (r.scaned) { if (r.scaned) {
return r; return r;
} }
}) })
this.scanCount = items != null ? items.length : 0; this.scanCount = items != null ? items.length : 0;
if (this.scanCount == this.detailList.length) { if (this.scanCount == this.subList.length) {
this.closeScanPopup(); this.closeScanPopup();
} }
}, },
@ -217,8 +218,8 @@
// //
continueScan() { continueScan() {
this.scanCount = getScanCount(this.detailList); this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.detailList.length) { if (this.scanCount == this.subList.length) {
this.closeScanPopup(); this.closeScanPopup();
} else { } else {
this.scanPopupGetFocus(); this.scanPopupGetFocus();
@ -234,7 +235,7 @@
let fromlocationList = []; let fromlocationList = [];
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i]; let item = this.detailSource[i];
item.details.forEach(l => { item.subList.forEach(l => {
// //
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode)
if (location.length == 0) { if (location.length == 0) {
@ -262,7 +263,7 @@
if (detail == undefined) { if (detail == undefined) {
this.showMessage("物料号【" + itemCode + "】不在列表中") this.showMessage("物料号【" + itemCode + "】不在列表中")
} else { } else {
var itemDetail = detail.details.find(r => { var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber return r.packingNumber == packingNumber
// && // &&
// r.batch == batch // r.batch == batch
@ -300,22 +301,24 @@
} }
}, },
async commit() { commit() {
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.scanCount == this.subList.length) {
this.submitJob(); this.submitJob();
} else { } else if (this.scanCount < this.subList.length) {
this.scanCount = getScanCount(this.detailList); //
if (this.scanCount < this.detailList.length) { if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.submitJob();
} else {
//
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this "]箱总共[" + this
.detailList.length + "]箱", res => { .subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }
}); });
} else {
this.submitJob();
} }
} }
}, },
@ -327,18 +330,18 @@
}); });
var params = this.setParams(); var params = this.setParams();
// submitInspectJob(this.id, params).then(res => { console.log("提交参数", params)
// if (res.data) { inspectJobSubmit(params).then(res => {
// var hint = res.data.Number; uni.hideLoading()
// this.showCommitSuccessMessage(res.data.Number) if (res.data) {
// uni.hideLoading(); this.showCommitSuccessMessage("提交成功<br>生成到货检验记录" + res.data, )
// } else { } else {
// this.showErrorMessage(""); this.showErrorMessage("提交失败"+res.msg)
// } }
// }).catch(error => { }).catch(error => {
// uni.hideLoading(); uni.hideLoading();
// this.showErrorMessage(error); this.showErrorMessage(error);
// }) })
}, },
@ -397,22 +400,10 @@
this.scanPopupGetFocus(); this.scanPopupGetFocus();
}, },
closeCommitMessage() {
setTimeout(() => {
uni.navigateTo({
url: './receipt'
})
})
//
uni.hideLoading();
},
setParams() { setParams() {
var list = [] var list = []
this.detailSource.forEach(res => { this.detailSource.forEach(res => {
res.details.forEach(detail => { res.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
detail.sampleQty = detail.qty; detail.sampleQty = detail.qty;
detail.failedQty = detail.failedQty; detail.failedQty = detail.failedQty;
@ -439,20 +430,17 @@
}) })
}) })
this.jobContent.subList = list this.jobContent.subList = list
var tttt = JSON.stringify(this.jobContent);
console.log("提交参数", tttt)
}, },
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { 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"> <scroll-view scroll-y="true" class="scroll-detail">
<view class="" <view class=""
style="font-size: 35rpx;display: flex;flex-direction: row;align-items: center;width: 100%;" 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> <text style="font-size: 35rpx;margin-right: 20rpx;">{{index+1}}.</text>
<view class=""> <view class="">
@ -170,7 +170,7 @@
locations: [], locations: [],
value: ['0'], value: ['0'],
jobContent: {}, // jobContent: {}, //
detailList: [], //details subList: [], //details
detailSource: [], // detailSource: [], //
nextActionList: [], nextActionList: [],
nextAction: null, nextAction: null,
@ -211,7 +211,7 @@
} else { } else {
if (res.data.subList.length > 0) { if (res.data.subList.length > 0) {
that.jobContent = res.data; that.jobContent = res.data;
that.detailList = res.data.subList; that.subList = res.data.subList;
that.inspectType =that.jobContent.inspectType; that.inspectType =that.jobContent.inspectType;
that.jobContent.goodQty = null, // that.jobContent.goodQty = null, //
that.jobContent.failedQty = null,// that.jobContent.failedQty = null,//
@ -312,6 +312,9 @@
res.goodQty = this.jobContent.receiveQty; res.goodQty = this.jobContent.receiveQty;
res.fromInventory_status = res.inventoryStatus res.fromInventory_status = res.inventoryStatus
res.toInventoryStatus = res.inventoryStatus res.toInventoryStatus = res.inventoryStatus
res.failedReason ="";
res.photos = ""
res.inspectResult =""
}) })
var tttt = JSON.stringify(this.jobContent); var tttt = JSON.stringify(this.jobContent);
console.log("提交参数", tttt) console.log("提交参数", tttt)
@ -332,6 +335,9 @@
res.goodQty = 0; res.goodQty = 0;
res.from_inventory_status = res.inventoryStatus res.from_inventory_status = res.inventoryStatus
res.toInventoryStatus = "NOK" res.toInventoryStatus = "NOK"
res.failedReason ="";
res.photos = ""
res.inspectResult =""
}) })
var tttt = JSON.stringify(this.jobContent); var tttt = JSON.stringify(this.jobContent);
console.log("提交参数", tttt) console.log("提交参数", tttt)
@ -351,6 +357,9 @@
res.goodQty =this.jobContent.receiveQty; res.goodQty =this.jobContent.receiveQty;
res.fromInventory_status = res.inventoryStatus res.fromInventory_status = res.inventoryStatus
res.toInventoryStatus = res.inventoryStatus res.toInventoryStatus = res.inventoryStatus
res.failedReason ="";
res.photos = ""
res.inspectResult =""
}) })
var tttt = JSON.stringify(this.jobContent); var tttt = JSON.stringify(this.jobContent);
console.log("提交参数", tttt) console.log("提交参数", tttt)

10
pages/inspect/request/inspectRequestDetail.vue

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

2
pages/inventoryMove/coms/comInventoryDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty> <item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template> </template>
<u-line /> <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 ref="swipeAction">
<uni-swipe-action-item :right-options="item.scaned?scanOptions:detailOptions" <uni-swipe-action-item :right-options="item.scaned?scanOptions:detailOptions"
@click="swipeClick($event,item)"> @click="swipeClick($event,item)">

12
pages/inventoryMove/coms/comMove.vue

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

4
pages/inventoryMove/coms/comMoveRecord.vue

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

52
pages/inventoryMove/job/inventoryMoveDetail.vue

@ -71,12 +71,8 @@
received: false, received: false,
scanCount: 0, scanCount: 0,
jobContent: {}, // jobContent: {}, //
detailList: [], //details subList: [], //subList
detailSource: [], // detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
locationTypeList: [], locationTypeList: [],
@ -164,8 +160,8 @@
} else { } else {
if (res.data.subList.length > 0) { if (res.data.subList.length > 0) {
that.jobContent = res.data; that.jobContent = res.data;
that.detailList = res.data.subList; that.subList = res.data.subList;
that.detailSource = that.getDataSource(that.detailList) that.detailSource = that.getDataSource(that.subList)
updateTitle(this.jobContent.number); updateTitle(this.jobContent.number);
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
@ -178,20 +174,20 @@
}, },
getDataSource(details) { getDataSource(subList) {
let items = []; let items = [];
details.forEach(detail => { subList.forEach(detail => {
var item = items.find(r => var item = items.find(r =>
r.itemCode == detail.itemCode) r.itemCode == detail.itemCode)
if (item == undefined) { if (item == undefined) {
item = this.createItemInfo(detail); item = this.createItemInfo(detail);
let newDetail = this.createDetailInfo(detail); // let newDetail = this.createDetailInfo(detail); //
item.details.push(newDetail); item.subList.push(newDetail);
items.push(item) items.push(item)
} else { } else {
item.qty += detail.qty item.qty += detail.qty
let newDetail = this.createDetailInfo(detail); // let newDetail = this.createDetailInfo(detail); //
item.details.push(newDetail); item.subList.push(newDetail);
} }
}) })
return items; return items;
@ -206,7 +202,7 @@
qty: res.qty, qty: res.qty,
handleQty: 0, handleQty: 0,
uom: res.uom, uom: res.uom,
details: [] subList: []
} }
return item; return item;
}, },
@ -219,13 +215,13 @@
}, },
calcScanCount(closeScan) { calcScanCount(closeScan) {
let items = this.detailList.filter(r => { let items = this.subList.filter(r => {
if (r.scaned) { if (r.scaned) {
return r; return r;
} }
}) })
this.scanCount = items != null ? items.length : 0; this.scanCount = items != null ? items.length : 0;
if (this.scanCount == this.detailList.length) { if (this.scanCount == this.subList.length) {
this.closeScanPopup(); this.closeScanPopup();
} }
}, },
@ -233,7 +229,7 @@
calcHandleQty() { calcHandleQty() {
for (let item of this.detailSource) { for (let item of this.detailSource) {
item.handleQty = 0; item.handleQty = 0;
for (let detail of item.details) { for (let detail of item.subList) {
if (detail.record != undefined) { if (detail.record != undefined) {
item.handleQty += Number(detail.record.qty) item.handleQty += Number(detail.record.qty)
} }
@ -247,7 +243,7 @@
// //
continueScan() { continueScan() {
this.scanCount = this.getScanCount(); this.scanCount = this.getScanCount();
if (this.scanCount == this.detailList.length) { if (this.scanCount == this.subList.length) {
this.closeScanPopup(); this.closeScanPopup();
} else { } else {
this.scanPopupGetFocus(); this.scanPopupGetFocus();
@ -255,7 +251,7 @@
}, },
getScanCount(closeScan) { getScanCount(closeScan) {
let items = this.detailList.filter(r => { let items = this.subList.filter(r => {
if (r.scaned) { if (r.scaned) {
return r; return r;
} }
@ -273,7 +269,7 @@
let fromlocationList = []; let fromlocationList = [];
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i]; let item = this.detailSource[i];
item.details.forEach(l => { item.subList.forEach(l => {
// //
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode)
if (location.length == 0) { if (location.length == 0) {
@ -301,7 +297,7 @@
if (detail == undefined) { if (detail == undefined) {
this.showMessage("物料号【" + itemCode + "】不在列表中") this.showMessage("物料号【" + itemCode + "】不在列表中")
} else { } else {
var itemDetail = detail.details.find(r => { var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber && return r.packingNumber == packingNumber &&
r.batch == batch r.batch == batch
}) })
@ -354,9 +350,9 @@
async commit() { async commit() {
// //
// //
if (this.scanCount == this.detailList.length) { if (this.scanCount == this.subList.length) {
this.submitJob(); this.submitJob();
} else if (this.scanCount < this.detailList.length) { } else if (this.scanCount < this.subList.length) {
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
@ -365,7 +361,7 @@
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this "]箱总共[" + this
.detailList.length + "]箱", res => { .subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }
@ -442,12 +438,12 @@
extraProperties: this.jobContent.extraProperties, extraProperties: this.jobContent.extraProperties,
siteId: this.jobContent.siteId, siteId: this.jobContent.siteId,
Code: "", Code: "",
details: [], subList: [],
} }
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.details.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
detail.record.fromPackingNumber = detail.record.packingNumber detail.record.fromPackingNumber = detail.record.packingNumber
detail.record.toPackingNumber = detail.record.packingNumber detail.record.toPackingNumber = detail.record.packingNumber
@ -469,7 +465,7 @@
detail.record.projectCode = "", detail.record.projectCode = "",
detail.record.Code = "" detail.record.Code = ""
detail.record.interfaceType = "jklxPURCHASE_RETURN" detail.record.interfaceType = "jklxPURCHASE_RETURN"
params.details.push(detail.record) params.subList.push(detail.record)
} }
}) })
}) })
@ -532,12 +528,6 @@
this.scanPopupGetFocus(); this.scanPopupGetFocus();
}, },
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.datacontent.scrollTop;
},
closeCommitMessage() { closeCommitMessage() {
setTimeout(() => { setTimeout(() => {
uni.navigateTo({ uni.navigateTo({

14
pages/issue-按批次推荐/job/issueDetail.vue

@ -91,7 +91,7 @@
currentData: {}, currentData: {},
id: '', id: '',
jobContent: {}, // jobContent: {}, //
detailList: [], //details subList: [], //subList
detailSource: [], // detailSource: [], //
detailOptions: [], detailOptions: [],
scanOptions: [] scanOptions: []
@ -162,10 +162,10 @@
mask: true mask: true
}); });
getIssueJobDetail(that.id).then(res => { 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.jobContent = res.data[0];
that.detailList = res.data[0].details; that.subList = res.data[0].subList;
that.detailSource = that.getDataSource(that.detailList) that.detailSource = that.getDataSource(that.subList)
that.resizeCollapse(); that.resizeCollapse();
uni.hideLoading(); uni.hideLoading();
} else { } else {
@ -177,11 +177,11 @@
}) })
}, },
getDataSource(details) { getDataSource(subList) {
let list = []; let list = [];
let that = this; let that = this;
for (var i = 0; i < details.length; i++) { for (var i = 0; i < subList.length; i++) {
let detail = details[i]; let detail = subList[i];
var location = list.find(r => var location = list.find(r =>
r.toLocationCode == detail.toLocationCode) r.toLocationCode == detail.toLocationCode)
if (location == undefined) { if (location == undefined) {

10
pages/issue/job/issueDetail.vue

@ -63,7 +63,7 @@
return { return {
id: '', id: '',
jobContent: {}, // jobContent: {}, //
detailList: [], //details subList: [], //subList
detailSource: [], // detailSource: [], //
detailOptions: [], detailOptions: [],
scanOptions: [] scanOptions: []
@ -141,10 +141,10 @@
} else { } else {
if (res.data.subList.length > 0) { if (res.data.subList.length > 0) {
that.jobContent = res.data; that.jobContent = res.data;
that.detailList = res.data.subList; that.subList = res.data.subList;
that.detailSource = getDataSource(that.detailSource, that.detailList) that.detailSource = getDataSource(that.detailSource, that.subList)
// that.fromLocationCode = that.detailList[0].FromLocationCode // that.fromLocationCode = that.subList[0].FromLocationCode
// that.toLocationCode = that.detailList[0].toLocationCode // that.toLocationCode = that.subList[0].toLocationCode
// that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) // that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
updateTitle(this.jobContent.number); updateTitle(this.jobContent.number);
that.resizeCollapse(); that.resizeCollapse();

6
pages/issue/js/issue.js

@ -1,6 +1,6 @@
export function getDataSource(list,details) { export function getDataSource(list,subList) {
for (var i = 0; i < details.length; i++) { for (var i = 0; i < subList.length; i++) {
let detail = details[i]; let detail = subList[i];
var location = list.find(r => var location = list.find(r =>
r.toLocationCode == detail.toLocationCode) r.toLocationCode == detail.toLocationCode)
if (location == undefined) { if (location == undefined) {

14
pages/issue/record/issueRecord.vue

@ -36,6 +36,12 @@
// import { // import {
// getIssueJobDetail, // getIssueJobDetail,
// } from '@/api/request.js'; // } from '@/api/request.js';
import {
// getIssueJobDetail,
issueRequestSubmit,
issueRecordSubmit
} from '@/api/request2.js';
import { import {
goHome, goHome,
@ -70,7 +76,7 @@
return { return {
id: '1689889453461090304', id: '1689889453461090304',
jobContent: {}, // jobContent: {}, //
detailList: [], //details subList: [], //subList
detailSource: [], // detailSource: [], //
detailOptions: [], detailOptions: [],
scanOptions: [], scanOptions: [],
@ -103,8 +109,8 @@
mask: true mask: true
}); });
getIssueJobDetail(this.id).then(res => { getIssueJobDetail(this.id).then(res => {
if (res.data[0].details.length > 0) { if (res.data[0].subList.length > 0) {
that.detailList = res.data[0].details; that.subList = res.data[0].subList;
if (action == 'update') //, if (action == 'update') //,
{ {
let index = that.detailSource[0].Items.findIndex(r => r.itemCode == item.itemCode); 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[0].Items.splice(index, 1);
} }
} }
that.detailSource = getDataSource(that.detailSource, that.detailList) that.detailSource = getDataSource(that.detailSource, that.subList)
that.resizeCollapse(); that.resizeCollapse();
} }
uni.hideLoading(); uni.hideLoading();

4
pages/issue/request/issueRequest.vue

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

9
pages/issue/request/issueRequestDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
@ -48,7 +47,7 @@
return { return {
id: '', id: '',
requestContent: {}, // requestContent: {}, //
detailList: [], //details subList: [], //
detailSource: [], // detailSource: [], //
}; };
}, },
@ -86,11 +85,11 @@
} else { } else {
if (res.data.subList.length > 0) { if (res.data.subList.length > 0) {
that.requestContent = res.data; that.requestContent = res.data;
that.detailList = res.data.subList; that.subList = res.data.subList;
that.detailList.forEach(res=>{ that.subList.forEach(res=>{
res.fromLocationCode = res.toLocationCode res.fromLocationCode = res.toLocationCode
}) })
that.detailSource = getDataSource(that.detailList); that.detailSource = getDataSource(that.subList);
updateTitle(this.requestContent.number); updateTitle(this.requestContent.number);
} else { } else {
that.showMessage('列表数据为0'); 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 :dataContent="dataContent" @removeItem="removeItem(index,dataContent)" :isShowItemQty='false'>
</record-com-detail-card> </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"> <view v-if="detail.Records!=undefined" style='margin-left: 20px;' v-for="(record,index) in detail.Records">
<uni-swipe-action ref=""> <uni-swipe-action ref="">
<uni-swipe-action-item @click="swipeClick($event,detail,record,index)" <uni-swipe-action-item @click="swipeClick($event,detail,record,index)"

2
pages/package/coms/comPackageRecord.vue

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

20
pages/package/record/mergePackageRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
@ -89,12 +88,7 @@
isShowPackingCode: true, isShowPackingCode: true,
scanCount: 0, scanCount: 0,
jobContent: {}, // jobContent: {}, //
detailList: [], //details
detailSource: [], // detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [], locationTypeList: [],
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
@ -155,10 +149,10 @@
if (item == undefined) { if (item == undefined) {
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
var detail = item.details.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber && if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch && r.batch == balance.batch &&
r.locationCode == balance.locationCode && r.locationCode == balance.locationCode &&
@ -168,7 +162,7 @@
}) })
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -201,7 +195,7 @@
removePack() { removePack() {
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i]; var item = this.detailSource[i];
if (item.details.length == 0) { if (item.subList.length == 0) {
this.detailSource.splice(i, 1) this.detailSource.splice(i, 1)
} }
} }
@ -296,13 +290,13 @@
extraProperties: this.jobContent.extraProperties, extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld, Siteld: this.jobContent.Siteld,
Code: "", Code: "",
details: [ subList: [
], ],
} }
this.detailSource.forEach(res => { this.detailSource.forEach(res => {
res.details.forEach(res1 => { res.subList.forEach(res1 => {
if (res1.scaned) { if (res1.scaned) {
res1.record.FromLocationGroupCode = ""; res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = ""; res1.record.FromAreaCode = "";
@ -317,7 +311,7 @@
res1.record.Code = ""; res1.record.Code = "";
res1.record.JobDetailID = res1.record.id; res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT"; 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> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
@ -89,12 +88,8 @@
isShowPackingCode: true, isShowPackingCode: true,
scanCount: 0, scanCount: 0,
jobContent: {}, //任务内容 jobContent: {}, //任务内容
detailList: [], //接口返回的任务details subList: [], //接口返回的任务subList
detailSource: [], //绑定在页面上的数据源 detailSource: [], //绑定在页面上的数据源
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [], locationTypeList: [],
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
@ -155,10 +150,10 @@
if (item == undefined) { if (item == undefined) {
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
var detail = item.details.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber && if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch && r.batch == balance.batch &&
r.locationCode == balance.locationCode && r.locationCode == balance.locationCode &&
@ -168,7 +163,7 @@
}) })
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -201,7 +196,7 @@
removePack() { removePack() {
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i]; var item = this.detailSource[i];
if (item.details.length == 0) { if (item.subList.length == 0) {
this.detailSource.splice(i, 1) this.detailSource.splice(i, 1)
} }
} }
@ -296,13 +291,13 @@
extraProperties: this.jobContent.extraProperties, extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld, Siteld: this.jobContent.Siteld,
Code: "", Code: "",
details: [ subList: [
], ],
} }
this.detailSource.forEach(res => { this.detailSource.forEach(res => {
res.details.forEach(res1 => { res.subList.forEach(res1 => {
if (res1.scaned) { if (res1.scaned) {
res1.record.FromLocationGroupCode = ""; res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = ""; res1.record.FromAreaCode = "";
@ -317,7 +312,7 @@
res1.record.Code = ""; res1.record.Code = "";
res1.record.JobDetailID = res1.record.id; res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT"; 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> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
@ -89,7 +88,7 @@
isShowPackingCode: true, isShowPackingCode: true,
scanCount: 0, scanCount: 0,
jobContent: {}, //任务内容 jobContent: {}, //任务内容
detailList: [], //接口返回的任务details subList: [], //接口返回的任务subList
detailSource: [], //绑定在页面上的数据源 detailSource: [], //绑定在页面上的数据源
scrollTop: 0, scrollTop: 0,
old: { old: {
@ -155,10 +154,10 @@
if (item == undefined) { if (item == undefined) {
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
var detail = item.details.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber && if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch && r.batch == balance.batch &&
r.locationCode == balance.locationCode && r.locationCode == balance.locationCode &&
@ -168,7 +167,7 @@
}) })
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -201,7 +200,7 @@
removePack() { removePack() {
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i]; var item = this.detailSource[i];
if (item.details.length == 0) { if (item.subList.length == 0) {
this.detailSource.splice(i, 1) this.detailSource.splice(i, 1)
} }
} }
@ -296,13 +295,13 @@
extraProperties: this.jobContent.extraProperties, extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld, Siteld: this.jobContent.Siteld,
Code: "", Code: "",
details: [ subList: [
], ],
} }
this.detailSource.forEach(res => { this.detailSource.forEach(res => {
res.details.forEach(res1 => { res.subList.forEach(res1 => {
if (res1.scaned) { if (res1.scaned) {
res1.record.FromLocationGroupCode = ""; res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = ""; res1.record.FromAreaCode = "";
@ -317,7 +316,7 @@
res1.record.Code = ""; res1.record.Code = "";
res1.record.JobDetailID = res1.record.id; res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT"; 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> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
@ -86,12 +85,7 @@
isShowPackingCode: true, isShowPackingCode: true,
scanCount: 0, scanCount: 0,
jobContent: {}, // jobContent: {}, //
detailList: [], //details
detailSource: [], // detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [], locationTypeList: [],
toLocationInfo: {}, toLocationInfo: {},
fromLocationInfo: {}, fromLocationInfo: {},
@ -154,7 +148,7 @@
newDetail.scaned = false; newDetail.scaned = false;
newDetail.Records = []; newDetail.Records = [];
newDetail.handleQty = 0 newDetail.handleQty = 0
itemp.details.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -184,23 +178,23 @@
uom: uom uom: uom
} }
var sumQty = 0; var sumQty = 0;
item.details[0].Records.forEach(function(item1, index) { item.subList[0].Records.forEach(function(item1, index) {
sumQty += item1.qty; 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 + "】+已添加数量【" + this.showErrorMessage("扫描数量总和【" + (Number(qty) + sumQty) + "】(当前输入数量【" + qty + "】+已添加数量【" +
sumQty + sumQty +
"】)已超过拆包箱码的数量【" + Number(item.details[0].qty) + "】!"); "】)已超过拆包箱码的数量【" + Number(item.subList[0].qty) + "】!");
return; return;
} }
item.details[0].Records.push(temp) item.subList[0].Records.push(temp)
this.$forceUpdate(); this.$forceUpdate();
} }
this.calcHandleQty(); this.calcHandleQty();
}, },
calcHandleQty() { calcHandleQty() {
for (let detail of this.detailSource[0].details) { for (let detail of this.detailSource[0].subList) {
let hQty = 0; let hQty = 0;
if (detail.Records.length > 0) { if (detail.Records.length > 0) {

18
pages/package/record/splitPackageRecord.vue

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

6
pages/pallet/coms/comPalletRecord.vue

@ -12,7 +12,7 @@
</template> </template>
<u-line /> <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 ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item,index)" <uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions"> :right-options="item.scaned?scanOptions:detailOptions">
@ -88,7 +88,7 @@
watch: { watch: {
dataContent: { dataContent: {
handler(newName, oldName) { handler(newName, oldName) {
if (this.dataContent.details.length > 0) { if (this.dataContent.subList.length > 0) {
if (this.$refs.collapse1 != undefined) { if (this.$refs.collapse1 != undefined) {
this.$nextTick(res => { this.$nextTick(res => {
this.$refs.collapse1.resize() this.$refs.collapse1.resize()
@ -158,7 +158,7 @@
res => { res => {
if (res) { if (res) {
item.scaned=false; item.scaned=false;
// this.dataContent.details.splice(index, 1) // this.dataContent.subList.splice(index, 1)
// this.$emit('removePack') // this.$emit('removePack')
} }
}); });

11
pages/pallet/record/bindPalletRecord.vue

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

21
pages/pallet/record/unBindPalletRecord.vue

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

2
pages/productDismantle/coms/comProductDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty> <item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template> </template>
<u-line /> <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 ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)" <uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions"> :right-options="item.scaned?scanOptions:detailOptions">

8
pages/productDismantle/coms/comProductRecord.vue

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

33
pages/productDismantle/job/productDismantleDetail.vue

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

103
pages/productDismantle/record/productDismantleRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
@ -43,15 +42,18 @@
</template> </template>
<script> <script>
import {
productDismantleRecordSubmit,
} from '@/api/request2.js';
import { import {
goHome, goHome,
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
getInventoryStatusDesc, getInventoryStatusDesc,
getDirectoryItemArray getDirectoryItemArray
} from '@/common/directory.js'; } from '@/common/directory.js';
import { import {
getBusinessType, getBusinessType,
createItemInfo, createItemInfo,
@ -68,8 +70,8 @@
import comMessage from '@/mycomponents/common/comMessage.vue' import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
export default { export default {
components: { components: {
winScanButton, winScanButton,
@ -90,12 +92,8 @@
isShowPackingCode: true, isShowPackingCode: true,
scanCount: 0, scanCount: 0,
jobContent: {}, // jobContent: {}, //
detailList: [], //details subList: [], //subList
detailSource: [], // detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [], locationTypeList: [],
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
@ -121,7 +119,7 @@
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.$refs.comMessage.showBreakMessage(res.message ); this.$refs.comMessage.showBreakMessage(res.message);
} }
}); });
}, },
@ -136,8 +134,7 @@
onPullDownRefresh() {}, onPullDownRefresh() {},
mounted() { mounted() {},
},
methods: { methods: {
getScanResult(result) { getScanResult(result) {
let balance = result.balance; let balance = result.balance;
@ -151,10 +148,10 @@
if (item == undefined) { if (item == undefined) {
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
var detail = item.details.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber && if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch && r.batch == balance.batch &&
r.locationCode == balance.locationCode && r.locationCode == balance.locationCode &&
@ -164,7 +161,7 @@
}) })
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -196,7 +193,7 @@
removePack() { removePack() {
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i]; var item = this.detailSource[i];
if (item.details.length == 0) { if (item.subList.length == 0) {
this.detailSource.splice(i, 1) this.detailSource.splice(i, 1)
} }
} }
@ -243,14 +240,12 @@
var params = this.setParams(); var params = this.setParams();
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
// (this.id, params).then(res => { // productDismantleRecordSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
// if (res.data) { // if (res.data) {
// var hint = res.data.Number; // this.showCommitSuccessMessage("<br>" + res.data, )
// this.showCommitSuccessMessage("" + hint, )
// } else { // } else {
// this.showErrorMessage("") // this.showErrorMessage(""+res.msg)
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()
@ -260,64 +255,20 @@
}, },
setParams() { setParams() {
var params = { var subList = []
requestNumber: this.jobContent.requestNumber, this.detailSource.forEach(item => {
jobNumber: "", item.subList.forEach(detail => {
asnNumber: this.jobContent.asnNumber, if (detail.scaned) {
ppNumber: this.jobContent.ppNumber, // var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
supplierCode: this.jobContent.supplierCode, // detail.packingNumber, detail.batch);
receiptDock: this.jobContent.receiptDock, // detail.toPackingNumber =info.packingNumber;
carrierCode: this.jobContent.carrierCode, // detail.toBatch =info.batch;
transferMode: this.jobContent.transferMode, subList.push(detail)
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 subList;
return params;
}, },
showMessage(message) { showMessage(message) {

2
pages/productPutaway/coms/comProductDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty> <item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template> </template>
<u-line /> <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 ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)" <uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions"> :right-options="item.scaned?scanOptions:detailOptions">

8
pages/productPutaway/coms/comProductRecord.vue

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

35
pages/productPutaway/job/productPutawayDetail.vue

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

125
pages/productPutaway/record/productPutawayRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
@ -43,11 +42,19 @@
</template> </template>
<script> <script>
import {
productPutawayRequestSubmit,
productPutawayRecordSubmit
} from '@/api/request2.js';
import { import {
goHome, goHome,
} from '@/common/basic.js';
import {
getInventoryStatusDesc, getInventoryStatusDesc,
getDirectoryItemArray getDirectoryItemArray
} from '@/common/basic.js'; } from '@/common/directory.js';
import { import {
getBusinessType, getBusinessType,
@ -87,12 +94,8 @@
isShowPackingCode: true, isShowPackingCode: true,
scanCount: 0, scanCount: 0,
jobContent: {}, // jobContent: {}, //
detailList: [], //details subList: [], //subList
detailSource: [], // detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [], locationTypeList: [],
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
@ -148,10 +151,10 @@
if (item == undefined) { if (item == undefined) {
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
var detail = item.details.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber && if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch && r.batch == balance.batch &&
r.locationCode == balance.locationCode && r.locationCode == balance.locationCode &&
@ -161,7 +164,7 @@
}) })
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -193,7 +196,7 @@
removePack() { removePack() {
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i]; var item = this.detailSource[i];
if (item.details.length == 0) { if (item.subList.length == 0) {
this.detailSource.splice(i, 1) this.detailSource.splice(i, 1)
} }
} }
@ -240,83 +243,37 @@
var params = this.setParams(); var params = this.setParams();
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
// (this.id, params).then(res => { if(this.fromType=="requestType"){
// uni.hideLoading() // productPutawayRequestSubmit(params).then(res => {
// if (res.data) { // uni.hideLoading()
// var hint = res.data.Number; // if (res.data) {
// this.showCommitSuccessMessage("" + hint, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else {
// } else { // this.showErrorMessage(""+res.msg)
// this.showErrorMessage("") // }
// } // }).catch(error => {
// }).catch(error => { // uni.hideLoading()
// uni.hideLoading() // this.showErrorMessage(error)
// this.showErrorMessage(error) // })
// }) }else {
}, // productPutawayRecordSubmit(params).then(res => {
// uni.hideLoading()
setParams() { // if (res.data) {
var params = { // this.showCommitSuccessMessage("<br>" + res.data, )
requestNumber: this.jobContent.requestNumber, // } else {
jobNumber: "", // this.showErrorMessage(""+res.msg)
asnNumber: this.jobContent.asnNumber, // }
ppNumber: this.jobContent.ppNumber, // }).catch(error => {
supplierCode: this.jobContent.supplierCode, // uni.hideLoading()
ReceiptDock: this.jobContent.ReceiptDock, // this.showErrorMessage(error)
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) { showMessage(message) {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) {} if (res) {}

3
pages/productPutaway/request/putawayRequest.vue

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

7
pages/productPutaway/request/putawayRequestDetail.vue

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

2
pages/productReceipt/coms/comProductDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty> <item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template> </template>
<u-line /> <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 ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)" <uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions"> :right-options="item.scaned?scanOptions:detailOptions">

6
pages/productReceipt/coms/comProductRecord.vue

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

25
pages/productReceipt/job/productReceiptDetail.vue

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

110
pages/productReceipt/record/productReceiptRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
@ -41,11 +40,18 @@
<script> <script>
import { import {
goHome, productionReceiptRecordSubmit
} from '@/api/request2.js';
import {
goHome
} from '@/common/basic.js';
import {
getInventoryStatusDesc, getInventoryStatusDesc,
getDirectoryItemArray getDirectoryItemArray
} from '@/common/basic.js'; } from '@/common/directory.js';
import { import {
getBusinessType, getBusinessType,
} from '@/common/record.js'; } from '@/common/record.js';
@ -70,10 +76,6 @@
return { return {
jobContent: {}, // jobContent: {}, //
detailSource: [], // detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
toLocationTypeList: [], toLocationTypeList: [],
toLocationInfo: {}, toLocationInfo: {},
toLocationCode: "", toLocationCode: "",
@ -92,7 +94,7 @@
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.openScanPopup(); this.openScanPopup();
} else { } else {
this.$refs.comMessage.showBreakMessage(res.message ); this.$refs.comMessage.showBreakMessage(res.message);
} }
}); });
}, },
@ -107,8 +109,7 @@
onPullDownRefresh() {}, onPullDownRefresh() {},
mounted() { mounted() {},
},
methods: { methods: {
getScanResult(result) { getScanResult(result) {
let label = result.label; let label = result.label;
@ -123,10 +124,10 @@
if (item == undefined) { if (item == undefined) {
var itemp = this.createItemInfo(label, pack); var itemp = this.createItemInfo(label, pack);
let newDetail = this.createDetailInfo(label, pack); let newDetail = this.createDetailInfo(label, pack);
itemp.details.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
var detail = item.details.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == label.packingNumber && if (r.packingNumber == label.packingNumber &&
r.batch == label.batch && r.batch == label.batch &&
r.locationCode == label.locationCode && r.locationCode == label.locationCode &&
@ -137,7 +138,7 @@
if (detail == undefined) { if (detail == undefined) {
let newDetail = this.createDetailInfo(label, pack); let newDetail = this.createDetailInfo(label, pack);
item.details.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + label.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + label.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -156,7 +157,7 @@
qty: Number(label.qty), qty: Number(label.qty),
handleQty: 0, handleQty: 0,
uom: pack.uom, uom: pack.uom,
details: [] subList: []
} }
return item; return item;
}, },
@ -178,7 +179,7 @@
calcHandleQty() { calcHandleQty() {
for (let item of this.detailSource) { for (let item of this.detailSource) {
item.qty = 0; item.qty = 0;
for (let detail of item.details) { for (let detail of item.subList) {
if (detail != undefined) { if (detail != undefined) {
item.qty += Number(detail.qty) item.qty += Number(detail.qty)
} }
@ -225,14 +226,12 @@
var params = this.setParams(); var params = this.setParams();
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
// (this.id, params).then(res => { // productionReceiptRecordSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
// if (res.data) { // if (res.data) {
// var hint = res.data.Number; // this.showCommitSuccessMessage("<br>" + res.data, )
// this.showCommitSuccessMessage("" + hint, )
// } else { // } else {
// this.showErrorMessage("") // this.showErrorMessage(""+res.msg)
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()
@ -240,68 +239,23 @@
// }) // })
}, },
setParams() { setParams() {
var params = { var subList = []
requestNumber: this.jobContent.requestNumber, this.detailSource.forEach(item => {
jobNumber: "", item.subList.forEach(detail => {
asnNumber: this.jobContent.asnNumber, if (detail.scaned) {
ppNumber: this.jobContent.ppNumber, // var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
supplierCode: this.jobContent.supplierCode, // detail.packingNumber, detail.batch);
ReceiptDock: this.jobContent.ReceiptDock, // detail.toPackingNumber =info.packingNumber;
carrierCode: this.jobContent.carrierCode, // detail.toBatch =info.batch;
transferMode: this.jobContent.transferMode, subList.push(detail)
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)
} }
}) })
}) })
return subList;
return params;
}, },
showMessage(message) { showMessage(message) {
setTimeout(r => { setTimeout(r => {
this.scanPopupLoseFocus(); this.scanPopupLoseFocus();
@ -377,7 +331,7 @@
removePack() { removePack() {
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i]; var item = this.detailSource[i];
if (item.details.length == 0) { if (item.subList.length == 0) {
this.detailSource.splice(i, 1) this.detailSource.splice(i, 1)
} }
} }

2
pages/productionReceipt/coms/comProductionDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty> <item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template> </template>
<u-line /> <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 ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)" <uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions"> :right-options="item.scaned?scanOptions:detailOptions">

8
pages/productionReceipt/coms/comProductionRecord.vue

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

29
pages/productionReceipt/job/productionReceiptDetail.vue

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

90
pages/productionReceipt/record/productionReceiptRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
@ -43,6 +42,9 @@
</template> </template>
<script> <script>
import {
productionReceiptRecordSubmit,
} from '@/api/request2.js';
import { import {
goHome, goHome,
} from '@/common/basic.js'; } from '@/common/basic.js';
@ -86,12 +88,7 @@
isShowPackingCode: true, isShowPackingCode: true,
scanCount: 0, scanCount: 0,
jobContent: {}, // jobContent: {}, //
detailList: [], //details
detailSource: [], // detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [], locationTypeList: [],
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
@ -148,10 +145,10 @@
if (item == undefined) { if (item == undefined) {
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
var detail = item.details.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber && if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch && r.batch == balance.batch &&
r.locationCode == balance.locationCode && r.locationCode == balance.locationCode &&
@ -161,7 +158,7 @@
}) })
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -189,7 +186,7 @@
removePack() { removePack() {
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i]; var item = this.detailSource[i];
if (item.details.length == 0) { if (item.subList.length == 0) {
this.detailSource.splice(i, 1) this.detailSource.splice(i, 1)
} }
} }
@ -236,14 +233,12 @@
var params = this.setParams(); var params = this.setParams();
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
// (this.id, params).then(res => { // productionReceiptRecordSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
// if (res.data) { // if (res.data) {
// var hint = res.data.Number; // this.showCommitSuccessMessage("<br>" + res.data, )
// this.showCommitSuccessMessage("" + hint, )
// } else { // } else {
// this.showErrorMessage("") // this.showErrorMessage(""+res.msg)
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()
@ -253,64 +248,19 @@
}, },
setParams() { setParams() {
var params = { var subList = []
requestNumber: this.jobContent.requestNumber, this.detailSource.forEach(item => {
jobNumber: "", item.subList.forEach(detail => {
asnNumber: this.jobContent.asnNumber, if (detail.scaned) {
ppNumber: this.jobContent.ppNumber, // var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
supplierCode: this.jobContent.supplierCode, // detail.packingNumber, detail.batch);
receiptDock: this.jobContent.receiptDock, // detail.toPackingNumber =info.packingNumber;
carrierCode: this.jobContent.carrierCode, // detail.toBatch =info.batch;
transferMode: this.jobContent.transferMode, subList.push(detail)
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 subList;
return params;
}, },
showMessage(message) { showMessage(message) {

50
pages/productionReturn/coms/comReturn.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
@ -44,10 +43,18 @@
<script> <script>
import { import {
goHome, productionReturnRequestSubmit,
getDirectoryItemArray productionReturnRecordSubmit
} from '@/api/request2.js';
import {
goHome
} from '@/common/basic.js'; } from '@/common/basic.js';
import {
getDirectoryItemArray
} from '@/common/directory.js';
import { import {
getBusinessType, getBusinessType,
createItemInfo, createItemInfo,
@ -84,26 +91,21 @@
businessTypeCode: { businessTypeCode: {
type: String, type: String,
default: "Move" default: "Move"
} ,// }, //
fromType: { fromType: {
type: String, type: String,
default: "" default: ""
}, },
}, },
data() { data() {
return { return {
id: '', id: '',
scanCount: 0, scanCount: 0,
jobContent: {}, // jobContent: {}, //
detailList: [], //details subList: [], //subList
detailSource: [], // detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
fromLocationInfo: {}, fromLocationInfo: {},
fromLocationCode: '', fromLocationCode: '',
fromLocationTypeList: [], fromLocationTypeList: [],
@ -111,7 +113,7 @@
toLocationCode: '', toLocationCode: '',
tolocationTypeList: [], tolocationTypeList: [],
businessType: {}, businessType: {},
}; };
}, },
onLoad() { onLoad() {
@ -130,7 +132,7 @@
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.$refs.comMessage.showBreakMessage(res.message ); this.$refs.comMessage.showBreakMessage(res.message);
} }
}); });
}, },
@ -172,7 +174,7 @@
let balance = result.balance; let balance = result.balance;
let label = result.label; let label = result.label;
let pack = result.package; let pack = result.package;
var item = this.detailSource.find(res => { var item = this.detailSource.find(res => {
if (res.itemCode == result.balance.itemCode) { if (res.itemCode == result.balance.itemCode) {
return res return res
@ -181,10 +183,10 @@
if (item == undefined) { if (item == undefined) {
var itemInfo = createItemInfo(balance, pack); var itemInfo = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
itemInfo.details.push(newDetail); itemInfo.subList.push(newDetail);
this.detailSource.push(itemInfo) this.detailSource.push(itemInfo)
} else { } else {
var detail = item.details.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == result.balance.packingNumber && if (r.packingNumber == result.balance.packingNumber &&
r.batch == result.balance.batch && r.batch == result.balance.batch &&
r.locationCode == result.balance.locationCode && r.locationCode == result.balance.locationCode &&
@ -195,7 +197,7 @@
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned) { if (detail.scaned) {
this.showErrorMessage(result.balance.packingNumber + "已经在列表中") this.showErrorMessage(result.balance.packingNumber + "已经在列表中")
@ -210,7 +212,7 @@
removePack() { removePack() {
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i]; var item = this.detailSource[i];
if (item.details.length == 0) { if (item.subList.length == 0) {
this.detailSource.splice(i, 1) this.detailSource.splice(i, 1)
} }
} }
@ -262,8 +264,8 @@
// }) // })
} else { } else {
this.calcScanCount(); this.calcScanCount();
if (this.scanCount < this.detailList.length) { if (this.scanCount < this.subList.length) {
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.detailList.length + this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList.length +
"]"); "]");
} }
} }
@ -302,13 +304,13 @@
extraProperties: this.jobContent.extraProperties, extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld, Siteld: this.jobContent.Siteld,
Code: "", Code: "",
details: [ subList: [
], ],
} }
this.detailSource.forEach(res => { this.detailSource.forEach(res => {
res.details.forEach(res1 => { res.subList.forEach(res1 => {
if (res1.scaned) { if (res1.scaned) {
res1.record.FromLocationGroupCode = ""; res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = ""; res1.record.FromAreaCode = "";
@ -323,7 +325,7 @@
res1.record.Code = ""; res1.record.Code = "";
res1.record.JobDetailID = res1.record.id; res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT"; 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> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class="page-main"> <view class="page-main">
@ -91,12 +90,8 @@
toLocationCode: '', toLocationCode: '',
scanCount: 0, scanCount: 0,
jobContent: {}, // jobContent: {}, //
detailList: [], //details subList: [], //subList
detailSource: [], // detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
fromLocationCode: '', fromLocationCode: '',
toLocationCode: '', toLocationCode: '',
tolocationTypeList: [], tolocationTypeList: [],
@ -177,11 +172,11 @@
} else { } else {
if (res.data.subList.length > 0) { if (res.data.subList.length > 0) {
that.jobContent = res.data; that.jobContent = res.data;
that.detailList = res.data.subList; that.subList = res.data.subList;
that.detailSource = getDataSource(that.detailList) that.detailSource = getDataSource(that.subList)
that.fromLocationCode = that.detailList[0].fromLocationCode that.fromLocationCode = that.subList[0].fromLocationCode
that.toLocationCode = that.detailList[0].toLocationCode that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
@ -203,8 +198,8 @@
// //
continueScan() { continueScan() {
this.scanCount = getScanCount(this.detailList); this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.detailList.length) { if (this.scanCount == this.subList.length) {
this.closeScanPopup(); this.closeScanPopup();
} else { } else {
this.scanPopupGetFocus(); this.scanPopupGetFocus();
@ -226,7 +221,7 @@
let fromlocationList = []; let fromlocationList = [];
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i]; let item = this.detailSource[i];
item.details.forEach(l => { item.subList.forEach(l => {
// //
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode)
if (location.length == 0) { if (location.length == 0) {
@ -254,7 +249,7 @@
if (detail == undefined) { if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中") this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else { } else {
var itemDetail = detail.details.find(r => { var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber && return r.packingNumber == packingNumber &&
r.batch == batch r.batch == batch
}) })
@ -305,11 +300,11 @@
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
this.submitJob(); this.submitJob();
} else { } else {
this.scanCount = getScanCount(this.detailList); this.scanCount = getScanCount(this.subList);
if (this.scanCount < this.detailList.length) { if (this.scanCount < this.subList.length) {
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this "]箱总共[" + this
.detailList.length + "]箱", res => { .subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }
@ -367,7 +362,7 @@
var creator = this.$store.state.user.id var creator = this.$store.state.user.id
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.details.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch); detail.packingNumber, detail.batch);
@ -421,11 +416,6 @@
scanPopupLoseFocus() { scanPopupLoseFocus() {
this.$refs.scanPopup.packLoseFocus(); this.$refs.scanPopup.packLoseFocus();
}, },
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.receiptJob.scrollTop;
},
showQuestionMessage(message, callback) { showQuestionMessage(message, callback) {
setTimeout(r => { setTimeout(r => {

7
pages/productionReturn/request/requestDetail.vue

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

2
pages/productionReturn/request/returnToHoldRequest.vue

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

2
pages/purchaseReceipt/coms/comReceiptDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty> <item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template> </template>
<u-line /> <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 ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)" <uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions"> :right-options="item.scaned?scanOptions:detailOptions">

33
pages/purchaseReceipt/job/receiptDetail.vue

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

27
pages/purchaseReturn/job/returnDetail.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class="page-header"> <view class="page-header">
@ -91,7 +90,7 @@
received: false, received: false,
scanCount: 0, scanCount: 0,
jobContent: {}, // jobContent: {}, //
detailList: [], //details subList: [], //subList
detailSource: [], // detailSource: [], //
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
@ -179,9 +178,9 @@
} else { } else {
if (res.data.subList.length > 0) { if (res.data.subList.length > 0) {
that.jobContent = res.data; that.jobContent = res.data;
that.detailList = res.data.subList; that.subList = res.data.subList;
that.toLocationCode = that.jobContent.toLocationCode that.toLocationCode = that.jobContent.toLocationCode
that.detailSource = getDataSource(that.detailList); that.detailSource = getDataSource(that.subList);
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }
@ -199,21 +198,21 @@
}, },
calcScanCount(closeScan) { calcScanCount(closeScan) {
let items = this.detailList.filter(r => { let items = this.subList.filter(r => {
if (r.scaned) { if (r.scaned) {
return r; return r;
} }
}) })
this.scanCount = items != null ? items.length : 0; this.scanCount = items != null ? items.length : 0;
if (this.scanCount == this.detailList.length) { if (this.scanCount == this.subList.length) {
this.closeScanPopup(); this.closeScanPopup();
} }
}, },
// //
continueScan() { continueScan() {
this.scanCount = getScanCount(this.detailList); this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.detailList.length) { if (this.scanCount == this.subList.length) {
this.closeScanPopup(); this.closeScanPopup();
} else { } else {
this.scanPopupGetFocus(); this.scanPopupGetFocus();
@ -234,7 +233,7 @@
if (detail == undefined) { if (detail == undefined) {
this.showMessage("物料号【" + itemCode + "】不在列表中") this.showMessage("物料号【" + itemCode + "】不在列表中")
} else { } else {
var itemDetail = detail.details.find(r => { var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber && return r.packingNumber == packingNumber &&
r.batch == batch r.batch == batch
}) })
@ -284,9 +283,9 @@
commit() { commit() {
// //
// //
if (this.scanCount == this.detailList.length) { if (this.scanCount == this.subList.length) {
this.submitJob(); this.submitJob();
} else if (this.scanCount < this.detailList.length) { } else if (this.scanCount < this.subList.length) {
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
@ -295,7 +294,7 @@
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this "]箱总共[" + this
.detailList.length + "]箱", res => { .subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }
@ -364,7 +363,7 @@
var creator = this.$store.state.user.id var creator = this.$store.state.user.id
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.details.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
if (queryModel) { if (queryModel) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
@ -397,7 +396,7 @@
let fromlocationList = []; let fromlocationList = [];
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i]; let item = this.detailSource[i];
item.details.forEach(l => { item.subList.forEach(l => {
// //
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode)
if (location.length == 0) { if (location.length == 0) {

95
pages/purchaseReturn/record/returnRecord.vue

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

3
pages/purchaseReturn/request/returnRequest.vue

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

9
pages/purchaseReturn/request/returnRequestDetail.vue

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

35
pages/putaway/job/putawayDetail.vue

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

129
pages/putaway/record/putawayRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
@ -41,6 +40,11 @@
</template> </template>
<script> <script>
import {
putawayRequestSubmit,
putawayRecordSubmit
} from '@/api/request2.js';
import { import {
goHome, goHome,
updateTitle updateTitle
@ -88,12 +92,9 @@
id: '', id: '',
receiptJob: {}, receiptJob: {},
received: false, received: false,
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, // jobContent: {}, //
detailList: [], //details subList: [], //subList
detailSource: [], // detailSource: [], //
scrollTop: 0,
locationTypeList: [], locationTypeList: [],
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
@ -104,7 +105,6 @@
isShowLocation: false, isShowLocation: false,
fromlocationTypeList: [], fromlocationTypeList: [],
tolocationTypeList: [], tolocationTypeList: [],
allowModifyLocation: false,
inInventoryStatus: "", // inInventoryStatus: "", //
outInventoryStatus: "", // outInventoryStatus: "", //
businessType: {}, businessType: {},
@ -113,7 +113,7 @@
}, },
onLoad(option) { onLoad(option) {
this.fromType = option.fromType this.fromType = option.fromType
if(this.fromType=="requestType"){ updateTitle("采购上架申请") }else { updateTitle("采购上架记录") } if(this.fromType=="requestType"){ updateTitle("原料上架申请") }else { updateTitle("原料上架记录") }
var typeCode = "PurchasePutaway" var typeCode = "PurchasePutaway"
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
@ -152,10 +152,10 @@
if (item == undefined) { if (item == undefined) {
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
var detail = item.details.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber && if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch && r.batch == balance.batch &&
r.locationCode == balance.locationCode && r.locationCode == balance.locationCode &&
@ -165,7 +165,7 @@
}) })
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -186,7 +186,7 @@
calcHandleQty() { calcHandleQty() {
for (let item of this.detailSource) { for (let item of this.detailSource) {
item.qty = 0; item.qty = 0;
for (let detail of item.details) { for (let detail of item.subList) {
if (detail != undefined) { if (detail != undefined) {
item.qty += Number(detail.qty) item.qty += Number(detail.qty)
} }
@ -206,7 +206,7 @@
removePack() { removePack() {
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i]; var item = this.detailSource[i];
if (item.details.length == 0) { if (item.subList.length == 0) {
this.detailSource.splice(i, 1) this.detailSource.splice(i, 1)
} }
} }
@ -254,87 +254,50 @@
var params = this.setParams(); var params = this.setParams();
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
if(this.fromType=="requestType"){ 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 { }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() { setParams() {
var params = { var subList = []
requestNumber: this.jobContent.requestNumber, this.detailSource.forEach(item => {
jobNumber: "", item.subList.forEach(detail => {
asnNumber: this.jobContent.asnNumber, if (detail.scaned) {
ppNumber: this.jobContent.ppNumber, // var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
supplierCode: this.jobContent.supplierCode, // detail.packingNumber, detail.batch);
ReceiptDock: this.jobContent.ReceiptDock, // detail.toPackingNumber =info.packingNumber;
carrierCode: this.jobContent.carrierCode, // detail.toBatch =info.batch;
transferMode: this.jobContent.transferMode, subList.push(detail)
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 subList;
return params;
}, },
showMessage(message) { showMessage(message) {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) {} if (res) {}

2
pages/putaway/request/putawayRequest.vue

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

7
pages/putaway/request/putawayRequestDetail.vue

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

32
pages/repleinsh/job/repleinshDetail.vue

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

131
pages/repleinsh/record/repleinshRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
@ -41,12 +40,23 @@
</template> </template>
<script> <script>
import {
repleinshRequestSubmit,
repleinshRecordSubmit
} from '@/api/request2.js';
import { import {
goHome, goHome,
updateTitle, updateTitle,
} from '@/common/basic.js';
import {
getInventoryStatusDesc, getInventoryStatusDesc,
getDirectoryItemArray getDirectoryItemArray
} from '@/common/basic.js'; } from '@/common/directory.js';
import { import {
getDetailOption, getDetailOption,
getDetailRemoveOption, getDetailRemoveOption,
@ -88,9 +98,8 @@
isShowPackingCode: true, isShowPackingCode: true,
scanCount: 0, scanCount: 0,
jobContent: {}, // jobContent: {}, //
detailList: [], //details subList: [], //subList
detailSource: [], // detailSource: [], //
scrollTop: 0,
locationTypeList: [], locationTypeList: [],
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
@ -149,10 +158,10 @@
if (item == undefined) { if (item == undefined) {
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
var detail = item.details.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber && if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch && r.batch == balance.batch &&
r.locationCode == balance.locationCode && r.locationCode == balance.locationCode &&
@ -162,7 +171,7 @@
}) })
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -183,7 +192,7 @@
calcHandleQty() { calcHandleQty() {
for (let item of this.detailSource) { for (let item of this.detailSource) {
item.qty = 0; item.qty = 0;
for (let detail of item.details) { for (let detail of item.subList) {
if (detail != undefined) { if (detail != undefined) {
item.qty += Number(detail.qty) item.qty += Number(detail.qty)
} }
@ -203,7 +212,7 @@
removePack() { removePack() {
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i]; var item = this.detailSource[i];
if (item.details.length == 0) { if (item.subList.length == 0) {
this.detailSource.splice(i, 1) this.detailSource.splice(i, 1)
} }
} }
@ -242,7 +251,6 @@
this.showMessage("请先选择目标库位") this.showMessage("请先选择目标库位")
return; return;
} }
//
uni.showLoading({ uni.showLoading({
title: "提交中....", title: "提交中....",
mask: true mask: true
@ -251,85 +259,48 @@
var params = this.setParams(); var params = this.setParams();
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
if(this.fromType=="requestType"){ 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 { }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() { setParams() {
var params = { var subList = []
requestNumber: this.jobContent.requestNumber, this.detailSource.forEach(item => {
jobNumber: "", item.subList.forEach(detail => {
asnNumber: this.jobContent.asnNumber, if (detail.scaned) {
ppNumber: this.jobContent.ppNumber, // var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
supplierCode: this.jobContent.supplierCode, // detail.packingNumber, detail.batch);
ReceiptDock: this.jobContent.ReceiptDock, // detail.toPackingNumber =info.packingNumber;
carrierCode: this.jobContent.carrierCode, // detail.toBatch =info.batch;
transferMode: this.jobContent.transferMode, subList.push(detail)
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 subList;
return params;
}, },
showMessage(message) { showMessage(message) {

66
pages/repleinsh/request/repleinshRequest.vue

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

2
pages/scrap/coms/comScrapDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty> <item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template> </template>
<u-line /> <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 ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)" <uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions"> :right-options="item.scaned?scanOptions:detailOptions">

29
pages/scrap/job/scrapJobDetail.vue

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

131
pages/scrap/record/scrapRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
@ -50,14 +49,22 @@
</template> </template>
<script> <script>
import {
scrapRequestSubmit,
scrapRecordSubmit
} from '@/api/request2.js';
import { import {
goHome, goHome,
updateTitle, updateTitle,
getInventoryStatusDesc,
getDirectoryItemArray,
getScarpReasonList getScarpReasonList
} from '@/common/basic.js'; } from '@/common/basic.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray,
} from '@/common/directory.js';
import { import {
getBusinessType, getBusinessType,
createItemInfo, createItemInfo,
@ -93,9 +100,8 @@
isShowPackingCode: true, isShowPackingCode: true,
scanCount: 0, scanCount: 0,
jobContent: {}, // jobContent: {}, //
detailList: [], //details subList: [], //subList
detailSource: [], // detailSource: [], //
scrollTop: 0,
locationTypeList: [], locationTypeList: [],
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
@ -157,10 +163,10 @@
if (item == undefined) { if (item == undefined) {
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
var detail = item.details.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber && if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch && r.batch == balance.batch &&
r.locationCode == balance.locationCode && r.locationCode == balance.locationCode &&
@ -170,7 +176,7 @@
}) })
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -190,7 +196,7 @@
qty: Number(balance.qty), qty: Number(balance.qty),
handleQty: 0, handleQty: 0,
uom: pack.uom, uom: pack.uom,
details: [] subList: []
} }
return item; return item;
}, },
@ -216,7 +222,7 @@
removePack() { removePack() {
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i]; var item = this.detailSource[i];
if (item.details.length == 0) { if (item.subList.length == 0) {
this.detailSource.splice(i, 1) this.detailSource.splice(i, 1)
} }
} }
@ -259,82 +265,51 @@
var params = this.setParams(); var params = this.setParams();
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
// (this.id, params).then(res => {
// uni.hideLoading() if(this.fromType=="requestType"){
// if (res.data) { // scrapRequestSubmit(params).then(res => {
// var hint = res.data.Number; // uni.hideLoading()
// this.showCommitSuccessMessage("" + hint, ) // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage("") // this.showErrorMessage(""+res.msg)
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()
// this.showErrorMessage(error) // 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() { setParams() {
var params = { var subList = []
requestNumber: this.jobContent.requestNumber, this.detailSource.forEach(item => {
jobNumber: "", item.subList.forEach(detail => {
asnNumber: this.jobContent.asnNumber, if (detail.scaned) {
ppNumber: this.jobContent.ppNumber, // var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
supplierCode: this.jobContent.supplierCode, // detail.packingNumber, detail.batch);
ReceiptDock: this.jobContent.ReceiptDock, // detail.toPackingNumber =info.packingNumber;
carrierCode: this.jobContent.carrierCode, // detail.toBatch =info.batch;
transferMode: this.jobContent.transferMode, subList.push(detail)
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 subList;
return params;
}, },
showMessage(message) { showMessage(message) {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {

7
pages/scrap/request/scrapRequestDetail.vue

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

81
pages/scrap/request/scrapRrequest.vue

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

2
pages/supplierDeliver/coms/comRecordDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty> <item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template> </template>
<u-line /> <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 ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)" <uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="detailOptions"> :right-options="detailOptions">

17
pages/supplierDeliver/record/supplierDeliverRecordDetail.vue

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

139
pages/transfer/coms/comTransferRecord.vue

@ -1,4 +1,3 @@
<!-- 收货任务详情 -->
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
@ -44,12 +43,20 @@
</template> </template>
<script> <script>
import {
transferIssueRecordSubmit,
transferReceiptRecordSubmit
} from '@/api/request2.js';
import { import {
goHome, goHome,
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/basic.js'; } from '@/common/basic.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/directory.js';
import { import {
getBusinessType, getBusinessType,
@ -92,12 +99,8 @@
isShowPackingCode: true, isShowPackingCode: true,
scanCount: 0, scanCount: 0,
jobContent: {}, // jobContent: {}, //
detailList: [], //details subList: [], //subList
detailSource: [], // detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
locationTypeList: [], locationTypeList: [],
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
@ -158,10 +161,10 @@
if (item == undefined) { if (item == undefined) {
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
itemp.details.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
var detail = item.details.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber && if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch && r.batch == balance.batch &&
r.locationCode == balance.locationCode && r.locationCode == balance.locationCode &&
@ -171,7 +174,7 @@
}) })
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
item.details.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
@ -179,10 +182,8 @@
} }
} }
this.calcHandleQty(); this.calcHandleQty();
}, },
showErrorMessage(message) { showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
@ -204,7 +205,7 @@
removePack() { removePack() {
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i]; var item = this.detailSource[i];
if (item.details.length == 0) { if (item.subList.length == 0) {
this.detailSource.splice(i, 1) this.detailSource.splice(i, 1)
} }
} }
@ -212,7 +213,6 @@
}, },
openScanPopup() { openScanPopup() {
if (this.fromLocationCode == "") { if (this.fromLocationCode == "") {
this.showFromLocationPopup(); this.showFromLocationPopup();
return return
@ -252,83 +252,52 @@
var params = this.setParams(); var params = this.setParams();
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
// (this.id, params).then(res => { if(this.transferType=="transferIssue"){
// uni.hideLoading() // transferIssueRecordSubmit(params).then(res => {
// if (res.data) { // uni.hideLoading()
// var hint = res.data.Number; // if (res.data) {
// this.showCommitSuccessMessage("" + hint, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else {
// } else { // this.showErrorMessage(""+res.msg)
// this.showErrorMessage("") // }
// } // }).catch(error => {
// }).catch(error => { // uni.hideLoading()
// uni.hideLoading() // this.showErrorMessage(error)
// 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() { setParams() {
var params = { var subList = []
requestNumber: this.jobContent.requestNumber, this.detailSource.forEach(item => {
jobNumber: "", item.subList.forEach(detail => {
asnNumber: this.jobContent.asnNumber, if (detail.scaned) {
ppNumber: this.jobContent.ppNumber, // var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
supplierCode: this.jobContent.supplierCode, // detail.packingNumber, detail.batch);
ReceiptDock: this.jobContent.ReceiptDock, // detail.toPackingNumber =info.packingNumber;
carrierCode: this.jobContent.carrierCode, // detail.toBatch =info.batch;
transferMode: this.jobContent.transferMode, subList.push(detail)
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 subList;
return params;
}, },
showMessage(message) { showMessage(message) {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) {} if (res) {}

38
pages/transfer/job/issueDetail.vue

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

32
pages/transfer/job/receiptDetail.vue

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

52
pages/transfer/job/transferDetail.vue

@ -74,12 +74,8 @@
received: false, received: false,
scanCount: 0, scanCount: 0,
jobContent: {}, // jobContent: {}, //
detailList: [], //details subList: [], //subList
detailSource: [], // detailSource: [], //
scrollTop: 0,
old: {
scrollTop: 0
},
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
locationTypeList: [], locationTypeList: [],
@ -161,10 +157,10 @@
getInventoryMoveJobDetail(that.id).then(res => { getInventoryMoveJobDetail(that.id).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.data[0].details.length > 0) { if (res.data[0].subList.length > 0) {
that.jobContent = res.data[0]; that.jobContent = res.data[0];
that.detailList = res.data[0].details; that.subList = res.data[0].subList;
that.detailSource = that.getDataSource(that.detailList) that.detailSource = that.getDataSource(that.subList)
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }
@ -175,20 +171,20 @@
}, },
getDataSource(details) { getDataSource(subList) {
let items = []; let items = [];
details.forEach(detail => { subList.forEach(detail => {
var item = items.find(r => var item = items.find(r =>
r.itemCode == detail.itemCode) r.itemCode == detail.itemCode)
if (item == undefined) { if (item == undefined) {
item = this.createItemInfo(detail); item = this.createItemInfo(detail);
let newDetail = this.createDetailInfo(detail); // let newDetail = this.createDetailInfo(detail); //
item.details.push(newDetail); item.subList.push(newDetail);
items.push(item) items.push(item)
} else { } else {
item.qty += detail.qty item.qty += detail.qty
let newDetail = this.createDetailInfo(detail); // let newDetail = this.createDetailInfo(detail); //
item.details.push(newDetail); item.subList.push(newDetail);
} }
}) })
return items; return items;
@ -203,7 +199,7 @@
qty: res.qty, qty: res.qty,
handleQty: 0, handleQty: 0,
uom: res.uom, uom: res.uom,
details: [] subList: []
} }
return item; return item;
}, },
@ -216,13 +212,13 @@
}, },
calcScanCount(closeScan) { calcScanCount(closeScan) {
let items = this.detailList.filter(r => { let items = this.subList.filter(r => {
if (r.scaned) { if (r.scaned) {
return r; return r;
} }
}) })
this.scanCount = items != null ? items.length : 0; this.scanCount = items != null ? items.length : 0;
if (this.scanCount == this.detailList.length) { if (this.scanCount == this.subList.length) {
this.closeScanPopup(); this.closeScanPopup();
} }
}, },
@ -230,7 +226,7 @@
calcHandleQty() { calcHandleQty() {
for (let item of this.detailSource) { for (let item of this.detailSource) {
item.handleQty = 0; item.handleQty = 0;
for (let detail of item.details) { for (let detail of item.subList) {
if (detail.record != undefined) { if (detail.record != undefined) {
item.handleQty += Number(detail.record.qty) item.handleQty += Number(detail.record.qty)
} }
@ -244,7 +240,7 @@
// //
continueScan() { continueScan() {
this.scanCount = this.getScanCount(); this.scanCount = this.getScanCount();
if (this.scanCount == this.detailList.length) { if (this.scanCount == this.subList.length) {
this.closeScanPopup(); this.closeScanPopup();
} else { } else {
this.scanPopupGetFocus(); this.scanPopupGetFocus();
@ -252,7 +248,7 @@
}, },
getScanCount(closeScan) { getScanCount(closeScan) {
let items = this.detailList.filter(r => { let items = this.subList.filter(r => {
if (r.scaned) { if (r.scaned) {
return r; return r;
} }
@ -270,7 +266,7 @@
let fromlocationList = []; let fromlocationList = [];
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i]; let item = this.detailSource[i];
item.details.forEach(l => { item.subList.forEach(l => {
// //
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode)
if (location.length == 0) { if (location.length == 0) {
@ -298,7 +294,7 @@
if (detail == undefined) { if (detail == undefined) {
this.showMessage("物料号【" + itemCode + "】不在列表中") this.showMessage("物料号【" + itemCode + "】不在列表中")
} else { } else {
var itemDetail = detail.details.find(r => { var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber && return r.packingNumber == packingNumber &&
r.batch == batch r.batch == batch
}) })
@ -354,10 +350,10 @@
this.submitJob(); this.submitJob();
} else { } else {
this.scanCount = this.getScanCount(); this.scanCount = this.getScanCount();
if (this.scanCount < this.detailList.length) { if (this.scanCount < this.subList.length) {
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this "]箱总共[" + this
.detailList.length + "]箱", res => { .subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }
@ -437,12 +433,12 @@
extraProperties: this.jobContent.extraProperties, extraProperties: this.jobContent.extraProperties,
siteId: this.jobContent.siteId, siteId: this.jobContent.siteId,
Code: "", Code: "",
details: [], subList: [],
} }
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.details.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
detail.record.fromPackingNumber = detail.record.packingNumber detail.record.fromPackingNumber = detail.record.packingNumber
detail.record.toPackingNumber = detail.record.packingNumber detail.record.toPackingNumber = detail.record.packingNumber
@ -464,7 +460,7 @@
detail.record.projectCode = "", detail.record.projectCode = "",
detail.record.Code = "" detail.record.Code = ""
detail.record.interfaceType = "jklxPURCHASE_RETURN" detail.record.interfaceType = "jklxPURCHASE_RETURN"
params.details.push(detail.record) params.subList.push(detail.record)
} }
}) })
}) })
@ -527,12 +523,6 @@
this.scanPopupGetFocus(); this.scanPopupGetFocus();
}, },
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.datacontent.scrollTop;
},
closeCommitMessage() { closeCommitMessage() {
setTimeout(() => { setTimeout(() => {
uni.navigateTo({ uni.navigateTo({

2
pages/unPlanned/coms/comIssueDetailCard.vue

@ -6,7 +6,7 @@
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty> <item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template> </template>
<u-line /> <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 ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)" <uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions"> :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> <item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</template> </template>
<u-line /> <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 ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)" <uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions"> :right-options="item.scaned?scanOptions:detailOptions">

6
pages/unPlanned/coms/comReceiptRecord.vue

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

35
pages/unPlanned/job/issueJobDetail.vue

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

40
pages/unPlanned/job/receiptJobDetail.vue

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

96
pages/unPlanned/record/issueRecord.vue

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

49
pages/unPlanned/record/receiptRecord.vue

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