@things-factory/operato-wms 4.3.272 → 4.3.276

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (441) hide show
  1. package/client/constants/vas.js +4 -0
  2. package/client/pages/bulk-operation/bulk-operation.js +18 -5
  3. package/client/pages/constants/order.js +2 -1
  4. package/client/pages/inventory/non-loaded-inventory.js +2 -1
  5. package/client/pages/inventory-check/inspecting-product.js +27 -8
  6. package/client/pages/master/tote-list.js +2 -1
  7. package/client/pages/order/draft-release-good/draft-release-good-list.js +22 -8
  8. package/client/pages/order/release-order/b2c/b2c-order-requests.js +1 -0
  9. package/client/pages/order/release-order/release-order-detail.js +5 -12
  10. package/client/pages/outbound/sorting-product.js +2 -1
  11. package/client/pages/outbound/worksheet-picking.js +3 -2
  12. package/client/pages/report/order-vas-report.js +577 -0
  13. package/client/pages/report/vas-report.js +52 -182
  14. package/client/pages/vas/print-product-label.js +19 -4
  15. package/client/pages/vas/vas-execution-page.js +3 -3
  16. package/client/route.js +4 -0
  17. package/dist-server/graphql/resolvers/reports/index.js +1 -1
  18. package/dist-server/graphql/resolvers/reports/index.js.map +1 -1
  19. package/dist-server/graphql/resolvers/reports/vas-report.js +166 -24
  20. package/dist-server/graphql/resolvers/reports/vas-report.js.map +1 -1
  21. package/dist-server/graphql/types/reports/index.js +4 -1
  22. package/dist-server/graphql/types/reports/index.js.map +1 -1
  23. package/dist-server/graphql/types/reports/vas-report-list.js +9 -3
  24. package/dist-server/graphql/types/reports/vas-report-list.js.map +1 -1
  25. package/dist-server/graphql/types/reports/vas-report.js +12 -2
  26. package/dist-server/graphql/types/reports/vas-report.js.map +1 -1
  27. package/helps/operato-wms/adjustment/transfer-inventory.en.md +20 -8
  28. package/helps/operato-wms/arrival-notice/create-arrival-notice.en.md +42 -13
  29. package/helps/operato-wms/arrival-notice/gan-detail.en.md +78 -18
  30. package/helps/operato-wms/arrival-notice/gan-list.md +6 -9
  31. package/helps/operato-wms/bulk-operation/bulk-operation.en.md +33 -0
  32. package/helps/operato-wms/goods-received-note/customer-grn-list.en.md +7 -6
  33. package/helps/operato-wms/goods-received-note/received-note-list.en.md +8 -6
  34. package/helps/operato-wms/images/arrival-notice-detail-add.png +0 -0
  35. package/helps/operato-wms/images/arrival-notice-detail-approval.png +0 -0
  36. package/helps/operato-wms/images/arrival-notice-detail-assign.png +0 -0
  37. package/helps/operato-wms/images/arrival-notice-detail-changes.png +0 -0
  38. package/helps/operato-wms/images/arrival-notice-detail-edit.png +0 -0
  39. package/helps/operato-wms/images/arrival-notice-detail-order.png +0 -0
  40. package/helps/operato-wms/images/arrival-notice-detail-page.png +0 -0
  41. package/helps/operato-wms/images/arrival-notice-detail-popup.png +0 -0
  42. package/helps/operato-wms/images/arrival-notice-detail-receive.png +0 -0
  43. package/helps/operato-wms/images/arrival-notice-detail-reject.png +0 -0
  44. package/helps/operato-wms/images/arrival-notice-detail-save.png +0 -0
  45. package/helps/operato-wms/images/arrival-notice-list-export.png +0 -0
  46. package/helps/operato-wms/images/arrival-notice-list-page.png +0 -0
  47. package/helps/operato-wms/images/arrival-notice-list-type.png +0 -0
  48. package/helps/operato-wms/images/assign-warehouse-popup.png +0 -0
  49. package/helps/operato-wms/images/assign-warehouse-section.png +0 -0
  50. package/helps/operato-wms/images/b2c-ro-export.png +0 -0
  51. package/helps/operato-wms/images/b2c-ro-page.png +0 -0
  52. package/helps/operato-wms/images/b2c-ro-type.png +0 -0
  53. package/helps/operato-wms/images/bulk-operation-click.png +0 -0
  54. package/helps/operato-wms/images/bulk-operation-excel.png +0 -0
  55. package/helps/operato-wms/images/bulk-operation-ganbutton.png +0 -0
  56. package/helps/operato-wms/images/bulk-operation-gancreate.png +0 -0
  57. package/helps/operato-wms/images/bulk-operation-openbutton.jpg +0 -0
  58. package/helps/operato-wms/images/bulk-operation-ro.png +0 -0
  59. package/helps/operato-wms/images/bulk-operation-robutton.png +0 -0
  60. package/helps/operato-wms/images/bulk-operation-select.png +0 -0
  61. package/helps/operato-wms/images/bulk-operation-upload.png +0 -0
  62. package/helps/operato-wms/images/bulk-operation-uploadbutton.png +0 -0
  63. package/helps/operato-wms/images/check-rto-click.png +0 -0
  64. package/helps/operato-wms/images/create-arrival-notice-page.png +0 -0
  65. package/helps/operato-wms/images/create-delivery-page.png +0 -0
  66. package/helps/operato-wms/images/create-gan-import.png +0 -0
  67. package/helps/operato-wms/images/create-gan-inventories.png +0 -0
  68. package/helps/operato-wms/images/create-gan-pic2.png +0 -0
  69. package/helps/operato-wms/images/create-gan-pic3.png +0 -0
  70. package/helps/operato-wms/images/create-rto-click.png +0 -0
  71. package/helps/operato-wms/images/create-rto-column.png +0 -0
  72. package/helps/operato-wms/images/createcc-caseexplain.png +0 -0
  73. package/helps/operato-wms/images/createcc-casepic.png +0 -0
  74. package/helps/operato-wms/images/createcc-column.png +0 -0
  75. package/helps/operato-wms/images/createcc-createbutton.png +0 -0
  76. package/helps/operato-wms/images/createcc-created.png +0 -0
  77. package/helps/operato-wms/images/createcc-detail.png +0 -0
  78. package/helps/operato-wms/images/createcc-fieldlable.png +0 -0
  79. package/helps/operato-wms/images/createcc-random.png +0 -0
  80. package/helps/operato-wms/images/customer-grn-page.png +0 -0
  81. package/helps/operato-wms/images/cyclecount-detail.png +0 -0
  82. package/helps/operato-wms/images/cyclecount-export.png +0 -0
  83. package/helps/operato-wms/images/cyclecount-exsucc.png +0 -0
  84. package/helps/operato-wms/images/cyclecount-inventory-inspec-check.png +0 -0
  85. package/helps/operato-wms/images/cyclecount-inventory-inspec-choose.png +0 -0
  86. package/helps/operato-wms/images/cyclecount-inventory-inspec-click.png +0 -0
  87. package/helps/operato-wms/images/cyclecount-inventory-inspec-completebutton.png +0 -0
  88. package/helps/operato-wms/images/cyclecount-inventory-inspec-completed.png +0 -0
  89. package/helps/operato-wms/images/cyclecount-inventory-inspec-label.png +0 -0
  90. package/helps/operato-wms/images/cyclecount-inventory-inspec-location.png +0 -0
  91. package/helps/operato-wms/images/cyclecount-inventory-inspec-page.png +0 -0
  92. package/helps/operato-wms/images/cyclecount-status.png +0 -0
  93. package/helps/operato-wms/images/cyclecount-type.png +0 -0
  94. package/helps/operato-wms/images/cyclecountreport-export.png +0 -0
  95. package/helps/operato-wms/images/cyclecountreport-page.png +0 -0
  96. package/helps/operato-wms/images/cyclecountreport-status.png +0 -0
  97. package/helps/operato-wms/images/cyclecountreport-type.png +0 -0
  98. package/helps/operato-wms/images/delivery-order-export.png +0 -0
  99. package/helps/operato-wms/images/delivery-order-page.png +0 -0
  100. package/helps/operato-wms/images/delivery-order-type.png +0 -0
  101. package/helps/operato-wms/images/do-list-export-icon.png +0 -0
  102. package/helps/operato-wms/images/do-list-type.png +0 -0
  103. package/helps/operato-wms/images/draft-order-export.png +0 -0
  104. package/helps/operato-wms/images/draft-order-page.png +0 -0
  105. package/helps/operato-wms/images/draft-order-type.png +0 -0
  106. package/helps/operato-wms/images/driver-case.png +0 -0
  107. package/helps/operato-wms/images/driver-column.png +0 -0
  108. package/helps/operato-wms/images/driver-create.png +0 -0
  109. package/helps/operato-wms/images/driver-delbutton.png +0 -0
  110. package/helps/operato-wms/images/driver-delete.png +0 -0
  111. package/helps/operato-wms/images/driver-delsucc.png +0 -0
  112. package/helps/operato-wms/images/driver-empty.png +0 -0
  113. package/helps/operato-wms/images/driver-excel.png +0 -0
  114. package/helps/operato-wms/images/driver-export.png +0 -0
  115. package/helps/operato-wms/images/driver-expsucc.png +0 -0
  116. package/helps/operato-wms/images/driver-importbutton.png +0 -0
  117. package/helps/operato-wms/images/driver-required.png +0 -0
  118. package/helps/operato-wms/images/driver-sabutton.png +0 -0
  119. package/helps/operato-wms/images/driver-savebutton.png +0 -0
  120. package/helps/operato-wms/images/driver-type.png +0 -0
  121. package/helps/operato-wms/images/driver-upload.png +0 -0
  122. package/helps/operato-wms/images/driver-upsuccess.png +0 -0
  123. package/helps/operato-wms/images/driver-usucc.png +0 -0
  124. package/helps/operato-wms/images/external-return-export.png +0 -0
  125. package/helps/operato-wms/images/external-return-page.png +0 -0
  126. package/helps/operato-wms/images/external-return-type.png +0 -0
  127. package/helps/operato-wms/images/grn-export.png +0 -0
  128. package/helps/operato-wms/images/grn-page.png +0 -0
  129. package/helps/operato-wms/images/grn-type.png +0 -0
  130. package/helps/operato-wms/images/inbound-details.png +0 -0
  131. package/helps/operato-wms/images/inbound-export-page.png +0 -0
  132. package/helps/operato-wms/images/inbound-export.png +0 -0
  133. package/helps/operato-wms/images/inbound-sn-detail.png +0 -0
  134. package/helps/operato-wms/images/inbound-sn-export.png +0 -0
  135. package/helps/operato-wms/images/inbound-type.png +0 -0
  136. package/helps/operato-wms/images/inv-sum-details.png +0 -0
  137. package/helps/operato-wms/images/inv-sum-export.png +0 -0
  138. package/helps/operato-wms/images/inventory-adjustment-changed.png +0 -0
  139. package/helps/operato-wms/images/inventory-adjustment-changes.png +0 -0
  140. package/helps/operato-wms/images/inventory-adjustment-check.png +0 -0
  141. package/helps/operato-wms/images/inventory-adjustment-missing-confirm.png +0 -0
  142. package/helps/operato-wms/images/inventory-adjustment-missing-stock.png +0 -0
  143. package/helps/operato-wms/images/inventory-adjustment-new-type.png +0 -0
  144. package/helps/operato-wms/images/inventory-adjustment-new.png +0 -0
  145. package/helps/operato-wms/images/inventory-adjustment-print.png +0 -0
  146. package/helps/operato-wms/images/inventory-adjustment-save-button.png +0 -0
  147. package/helps/operato-wms/images/inventory-adjustment-search-page.png +0 -0
  148. package/helps/operato-wms/images/inventory-adjustment-search.png +0 -0
  149. package/helps/operato-wms/images/inventory-adjustment-upload.png +0 -0
  150. package/helps/operato-wms/images/inventory-by-prduct-export.png +0 -0
  151. package/helps/operato-wms/images/inventory-by-prduct-file-type.png +0 -0
  152. package/helps/operato-wms/images/inventory-by-prduct-icon.png +0 -0
  153. package/helps/operato-wms/images/inventory-history-case-1.png +0 -0
  154. package/helps/operato-wms/images/inventory-history-export-icon.png +0 -0
  155. package/helps/operato-wms/images/inventory-history-file.png +0 -0
  156. package/helps/operato-wms/images/inventory-history-search-icon.png +0 -0
  157. package/helps/operato-wms/images/inventoryreport-detail.png +0 -0
  158. package/helps/operato-wms/images/inventoryreport-print.png +0 -0
  159. package/helps/operato-wms/images/inventoryreport-search.png +0 -0
  160. package/helps/operato-wms/images/loading-list.png +0 -0
  161. package/helps/operato-wms/images/loading-page.png +0 -0
  162. package/helps/operato-wms/images/location-delbutton.png +0 -0
  163. package/helps/operato-wms/images/location-delete.png +0 -0
  164. package/helps/operato-wms/images/location-delsuccess.png +0 -0
  165. package/helps/operato-wms/images/location-empty.png +0 -0
  166. package/helps/operato-wms/images/location-excel.png +0 -0
  167. package/helps/operato-wms/images/location-import.png +0 -0
  168. package/helps/operato-wms/images/location-savebutton.png +0 -0
  169. package/helps/operato-wms/images/location-update.png +0 -0
  170. package/helps/operato-wms/images/location-updsuccess.png +0 -0
  171. package/helps/operato-wms/images/location-upload.png +0 -0
  172. package/helps/operato-wms/images/location-upsuccess.png +0 -0
  173. package/helps/operato-wms/images/merged-order-worksheet-batch.png +0 -0
  174. package/helps/operato-wms/images/merged-order-worksheet-exicon.png +0 -0
  175. package/helps/operato-wms/images/merged-order-worksheet-filetype.png +0 -0
  176. package/helps/operato-wms/images/merged-order-worksheet-page.png +0 -0
  177. package/helps/operato-wms/images/onhand-inventory-export-icon.png +0 -0
  178. package/helps/operato-wms/images/onhand-inventory-search-icon.png +0 -0
  179. package/helps/operato-wms/images/onhand-inventory-type.png +0 -0
  180. package/helps/operato-wms/images/outbound-details.png +0 -0
  181. package/helps/operato-wms/images/outbound-export.png +0 -0
  182. package/helps/operato-wms/images/outbound-sn-detail.png +0 -0
  183. package/helps/operato-wms/images/outbound-sn-export.png +0 -0
  184. package/helps/operato-wms/images/packing-list.png +0 -0
  185. package/helps/operato-wms/images/packing-page.png +0 -0
  186. package/helps/operato-wms/images/packing-worksheet-export.png +0 -0
  187. package/helps/operato-wms/images/packing-worksheet-search.png +0 -0
  188. package/helps/operato-wms/images/packing-worksheet-type.png +0 -0
  189. package/helps/operato-wms/images/pallet-case.png +0 -0
  190. package/helps/operato-wms/images/pallet-create.png +0 -0
  191. package/helps/operato-wms/images/pallet-delbutton.png +0 -0
  192. package/helps/operato-wms/images/pallet-delete.png +0 -0
  193. package/helps/operato-wms/images/pallet-delsuccess.png +0 -0
  194. package/helps/operato-wms/images/pallet-empty.png +0 -0
  195. package/helps/operato-wms/images/pallet-exprt.png +0 -0
  196. package/helps/operato-wms/images/pallet-exsuccess.png +0 -0
  197. package/helps/operato-wms/images/pallet-importbutton.png +0 -0
  198. package/helps/operato-wms/images/pallet-masdata.png +0 -0
  199. package/helps/operato-wms/images/pallet-openbutton.png +0 -0
  200. package/helps/operato-wms/images/pallet-printbutton.png +0 -0
  201. package/helps/operato-wms/images/pallet-savebutton.png +0 -0
  202. package/helps/operato-wms/images/pallet-svbutton.png +0 -0
  203. package/helps/operato-wms/images/pallet-updatepallet.png +0 -0
  204. package/helps/operato-wms/images/pallet-updatesuccess.png +0 -0
  205. package/helps/operato-wms/images/pallet-upload.png +0 -0
  206. package/helps/operato-wms/images/pallet-uploadsuccess.png +0 -0
  207. package/helps/operato-wms/images/picking-product-page.png +0 -0
  208. package/helps/operato-wms/images/picking-product-worksheet-case2.png +0 -0
  209. package/helps/operato-wms/images/picking-product-worksheet-case3.png +0 -0
  210. package/helps/operato-wms/images/picking-product-worksheet-case4.png +0 -0
  211. package/helps/operato-wms/images/picking-product-worksheet-case5.png +0 -0
  212. package/helps/operato-wms/images/picking-product-worksheet-case6.png +0 -0
  213. package/helps/operato-wms/images/picking-product-worksheet-case7.png +0 -0
  214. package/helps/operato-wms/images/picking-product-worksheet-case8.png +0 -0
  215. package/helps/operato-wms/images/picking-product-worksheet-casescan.png +0 -0
  216. package/helps/operato-wms/images/picking-product-worksheet-check.png +0 -0
  217. package/helps/operato-wms/images/picking-product-worksheet-choose.png +0 -0
  218. package/helps/operato-wms/images/picking-product-worksheet-list.png +0 -0
  219. package/helps/operato-wms/images/picking-product-worksheet-multiple.png +0 -0
  220. package/helps/operato-wms/images/picking-product-worksheet-ro.png +0 -0
  221. package/helps/operato-wms/images/picking-product-worksheet-scan.png +0 -0
  222. package/helps/operato-wms/images/picking-product-worksheet-show.png +0 -0
  223. package/helps/operato-wms/images/po-app-detail-page.png +0 -0
  224. package/helps/operato-wms/images/po-approval-page.png +0 -0
  225. package/helps/operato-wms/images/po-approval-search.png +0 -0
  226. package/helps/operato-wms/images/po-detail-export.png +0 -0
  227. package/helps/operato-wms/images/po-detail-own-confirm-button.png +0 -0
  228. package/helps/operato-wms/images/po-detail-own-currency-field.png +0 -0
  229. package/helps/operato-wms/images/po-detail-own-transport.png +0 -0
  230. package/helps/operato-wms/images/po-detail-page.png +0 -0
  231. package/helps/operato-wms/images/po-detail-type.png +0 -0
  232. package/helps/operato-wms/images/po-detail-upload-bulk.png +0 -0
  233. package/helps/operato-wms/images/po-page.png +0 -0
  234. package/helps/operato-wms/images/prepick-detail.png +0 -0
  235. package/helps/operato-wms/images/prepick-export.png +0 -0
  236. package/helps/operato-wms/images/print-product-label-page.png +0 -0
  237. package/helps/operato-wms/images/print-product-label-search.png +0 -0
  238. package/helps/operato-wms/images/putaway-page.png +0 -0
  239. package/helps/operato-wms/images/putaway-pic2.png +0 -0
  240. package/helps/operato-wms/images/putaway-pic3.png +0 -0
  241. package/helps/operato-wms/images/putaway-pic4.png +0 -0
  242. package/helps/operato-wms/images/receive-rto-click.png +0 -0
  243. package/helps/operato-wms/images/rel-order-export.png +0 -0
  244. package/helps/operato-wms/images/rel-order-page.png +0 -0
  245. package/helps/operato-wms/images/rel-order-type.png +0 -0
  246. package/helps/operato-wms/images/release-order-excel.png +0 -0
  247. package/helps/operato-wms/images/release-order-page.png +0 -0
  248. package/helps/operato-wms/images/release-report-detail.png +0 -0
  249. package/helps/operato-wms/images/release-report-export.png +0 -0
  250. package/helps/operato-wms/images/release-report-page.png +0 -0
  251. package/helps/operato-wms/images/release-report-select.png +0 -0
  252. package/helps/operato-wms/images/return-detail-confirm.png +0 -0
  253. package/helps/operato-wms/images/return-order-click.png +0 -0
  254. package/helps/operato-wms/images/rto-arrived.png +0 -0
  255. package/helps/operato-wms/images/rto-cancel-order-kiv.png +0 -0
  256. package/helps/operato-wms/images/rto-done.png +0 -0
  257. package/helps/operato-wms/images/rto-exportdata.png +0 -0
  258. package/helps/operato-wms/images/rto-intransit.png +0 -0
  259. package/helps/operato-wms/images/rto-pending.png +0 -0
  260. package/helps/operato-wms/images/rto-pendingreceive.png +0 -0
  261. package/helps/operato-wms/images/rto-processing.png +0 -0
  262. package/helps/operato-wms/images/rto-putting-away.png +0 -0
  263. package/helps/operato-wms/images/rto-ready-unload.png +0 -0
  264. package/helps/operato-wms/images/rto-rejected.png +0 -0
  265. package/helps/operato-wms/images/rto-search-field.png +0 -0
  266. package/helps/operato-wms/images/single-order-worksheet-export-icon.png +0 -0
  267. package/helps/operato-wms/images/single-order-worksheet-file.png +0 -0
  268. package/helps/operato-wms/images/single-order-worksheet-page.png +0 -0
  269. package/helps/operato-wms/images/sorting-case1.png +0 -0
  270. package/helps/operato-wms/images/sorting-case2.png +0 -0
  271. package/helps/operato-wms/images/sorting-case3.png +0 -0
  272. package/helps/operato-wms/images/sorting-case4.png +0 -0
  273. package/helps/operato-wms/images/sorting-page.png +0 -0
  274. package/helps/operato-wms/images/sorting-release-order.png +0 -0
  275. package/helps/operato-wms/images/tote-clickup.png +0 -0
  276. package/helps/operato-wms/images/tote-column.png +0 -0
  277. package/helps/operato-wms/images/tote-create.png +0 -0
  278. package/helps/operato-wms/images/tote-delbutton.png +0 -0
  279. package/helps/operato-wms/images/tote-delete.png +0 -0
  280. package/helps/operato-wms/images/tote-delsucc.png +0 -0
  281. package/helps/operato-wms/images/tote-empty.png +0 -0
  282. package/helps/operato-wms/images/tote-excel.png +0 -0
  283. package/helps/operato-wms/images/tote-export.png +0 -0
  284. package/helps/operato-wms/images/tote-exsucc.png +0 -0
  285. package/helps/operato-wms/images/tote-extype.png +0 -0
  286. package/helps/operato-wms/images/tote-import.png +0 -0
  287. package/helps/operato-wms/images/tote-print.png +0 -0
  288. package/helps/operato-wms/images/tote-savebutton.png +0 -0
  289. package/helps/operato-wms/images/tote-sbutton.png +0 -0
  290. package/helps/operato-wms/images/tote-statusbuttonv.png +0 -0
  291. package/helps/operato-wms/images/tote-upcol.png +0 -0
  292. package/helps/operato-wms/images/tote-updatesucc.png +0 -0
  293. package/helps/operato-wms/images/tote-upload.png +0 -0
  294. package/helps/operato-wms/images/tote-upstatus.png +0 -0
  295. package/helps/operato-wms/images/tote-upsucc.png +0 -0
  296. package/helps/operato-wms/images/tote-upsuccess.png +0 -0
  297. package/helps/operato-wms/images/transfer-inventory-scanner.jpg +0 -0
  298. package/helps/operato-wms/images/transfer-inventory-type.png +0 -0
  299. package/helps/operato-wms/images/transfer-location-type.png +0 -0
  300. package/helps/operato-wms/images/transport-clicksave.png +0 -0
  301. package/helps/operato-wms/images/transport-create.png +0 -0
  302. package/helps/operato-wms/images/transport-delbutton.png +0 -0
  303. package/helps/operato-wms/images/transport-delete.png +0 -0
  304. package/helps/operato-wms/images/transport-delsuccess.png +0 -0
  305. package/helps/operato-wms/images/transport-empty.png +0 -0
  306. package/helps/operato-wms/images/transport-excel.png +0 -0
  307. package/helps/operato-wms/images/transport-export.png +0 -0
  308. package/helps/operato-wms/images/transport-exporticon.png +0 -0
  309. package/helps/operato-wms/images/transport-exprtsuccess.png +0 -0
  310. package/helps/operato-wms/images/transport-import.png +0 -0
  311. package/helps/operato-wms/images/transport-required.png +0 -0
  312. package/helps/operato-wms/images/transport-savebutton.png +0 -0
  313. package/helps/operato-wms/images/transport-savesuccess.png +0 -0
  314. package/helps/operato-wms/images/transport-update.png +0 -0
  315. package/helps/operato-wms/images/transport-upload.png +0 -0
  316. package/helps/operato-wms/images/transport-uploaded.png +0 -0
  317. package/helps/operato-wms/images/unloading-page.png +0 -0
  318. package/helps/operato-wms/images/unloading-pic10.png +0 -0
  319. package/helps/operato-wms/images/unloading-pic11.png +0 -0
  320. package/helps/operato-wms/images/unloading-pic12.png +0 -0
  321. package/helps/operato-wms/images/unloading-pic13.png +0 -0
  322. package/helps/operato-wms/images/unloading-pic2.png +0 -0
  323. package/helps/operato-wms/images/unloading-pic3.png +0 -0
  324. package/helps/operato-wms/images/unloading-pic4.png +0 -0
  325. package/helps/operato-wms/images/unloading-pic5.png +0 -0
  326. package/helps/operato-wms/images/unloading-pic6.png +0 -0
  327. package/helps/operato-wms/images/unloading-pic7.png +0 -0
  328. package/helps/operato-wms/images/unloading-pic8.png +0 -0
  329. package/helps/operato-wms/images/unloading-pic9.png +0 -0
  330. package/helps/operato-wms/images/warehouse-column.png +0 -0
  331. package/helps/operato-wms/images/warehouse-delbutton.png +0 -0
  332. package/helps/operato-wms/images/warehouse-delete.png +0 -0
  333. package/helps/operato-wms/images/warehouse-deleted.png +0 -0
  334. package/helps/operato-wms/images/warehouse-edit.png +0 -0
  335. package/helps/operato-wms/images/warehouse-excel.png +0 -0
  336. package/helps/operato-wms/images/warehouse-exprt.png +0 -0
  337. package/helps/operato-wms/images/warehouse-exsuccess.png +0 -0
  338. package/helps/operato-wms/images/warehouse-extype.png +0 -0
  339. package/helps/operato-wms/images/warehouse-import-button.png +0 -0
  340. package/helps/operato-wms/images/warehouse-import.png +0 -0
  341. package/helps/operato-wms/images/warehouse-imuploaded.png +0 -0
  342. package/helps/operato-wms/images/warehouse-save.png +0 -0
  343. package/helps/operato-wms/images/warehouse-upload.png +0 -0
  344. package/helps/operato-wms/images/warehouse-upsave.png +0 -0
  345. package/helps/operato-wms/images/worker-create.png +0 -0
  346. package/helps/operato-wms/images/worker-delbutton.png +0 -0
  347. package/helps/operato-wms/images/worker-delete.png +0 -0
  348. package/helps/operato-wms/images/worker-delsuccess.png +0 -0
  349. package/helps/operato-wms/images/worker-empty.png +0 -0
  350. package/helps/operato-wms/images/worker-excel.png +0 -0
  351. package/helps/operato-wms/images/worker-exprt.png +0 -0
  352. package/helps/operato-wms/images/worker-exsucc.png +0 -0
  353. package/helps/operato-wms/images/worker-extype.png +0 -0
  354. package/helps/operato-wms/images/worker-importbutton.png +0 -0
  355. package/helps/operato-wms/images/worker-imsuccess.png +0 -0
  356. package/helps/operato-wms/images/worker-required.png +0 -0
  357. package/helps/operato-wms/images/worker-savebutton.png +0 -0
  358. package/helps/operato-wms/images/worker-update.png +0 -0
  359. package/helps/operato-wms/images/worker-upload.png +0 -0
  360. package/helps/operato-wms/images/worker-upsave.png +0 -0
  361. package/helps/operato-wms/images/worker-upsucc.png +0 -0
  362. package/helps/operato-wms/images/worksheet-putaway-page.png +0 -0
  363. package/helps/operato-wms/images/worksheet-putaway-return-execute.png +0 -0
  364. package/helps/operato-wms/images/worksheet-unloading-active.png +0 -0
  365. package/helps/operato-wms/images/worksheet-unloading-executing.png +0 -0
  366. package/helps/operato-wms/images/worksheet-unloading-pic4.png +0 -0
  367. package/helps/operato-wms/images/worksheet-unloading-pic6.png +0 -0
  368. package/helps/operato-wms/images/worksheet-unloading-popup.png +0 -0
  369. package/helps/operato-wms/images/worksheet-unloading-print.png +0 -0
  370. package/helps/operato-wms/images/wur-page.png +0 -0
  371. package/helps/operato-wms/images/wur-print-page.png +0 -0
  372. package/helps/operato-wms/inbound/external-return-worksheet.md +11 -12
  373. package/helps/operato-wms/inbound/inbound-worksheet.en.md +7 -9
  374. package/helps/operato-wms/inbound/putaway-product.en.md +25 -12
  375. package/helps/operato-wms/inbound/unload-product.en.md +71 -30
  376. package/helps/operato-wms/inbound/worksheet-putaway-return.en.md +7 -6
  377. package/helps/operato-wms/inbound/worksheet-putaway.en.md +3 -3
  378. package/helps/operato-wms/inbound/worksheet-unloading-return.en.md +17 -7
  379. package/helps/operato-wms/inbound/worksheet-unloading.en.md +29 -10
  380. package/helps/operato-wms/inventory/inventory-adjustment-approval.en.md +49 -20
  381. package/helps/operato-wms/inventory/inventory-adjustment.en.md +42 -29
  382. package/helps/operato-wms/inventory/inventory-by-product.en.md +7 -6
  383. package/helps/operato-wms/inventory/inventory-history.en.md +34 -38
  384. package/helps/operato-wms/inventory/non-loaded-inventory.en.md +9 -0
  385. package/helps/operato-wms/inventory/onhand-inventory.en.md +14 -11
  386. package/helps/operato-wms/inventory-check/create-cycle-count.en.md +24 -5
  387. package/helps/operato-wms/inventory-check/cycle-count-report.en.md +17 -11
  388. package/helps/operato-wms/inventory-check/inspecting-product.en.md +29 -17
  389. package/helps/operato-wms/inventory-check/inventory-check-list.en.md +8 -18
  390. package/helps/operato-wms/inventory-check/worksheet-cycle-count.en.md +9 -9
  391. package/helps/operato-wms/master-data/driver.en.md +53 -32
  392. package/helps/operato-wms/master-data/location-list.en.md +30 -24
  393. package/helps/operato-wms/master-data/pallet.en.md +46 -38
  394. package/helps/operato-wms/master-data/tote.en.md +107 -0
  395. package/helps/operato-wms/master-data/vehicle.en.md +52 -30
  396. package/helps/operato-wms/master-data/warehouse.en.md +47 -18
  397. package/helps/operato-wms/master-data/worker.en.md +39 -19
  398. package/helps/operato-wms/outbound/loading-product.en.md +14 -11
  399. package/helps/operato-wms/outbound/merged-outbound-worksheet.en.md +17 -16
  400. package/helps/operato-wms/outbound/packing-product.en.md +16 -6
  401. package/helps/operato-wms/outbound/packing-worksheet-list.en.md +16 -13
  402. package/helps/operato-wms/outbound/picking-product.en.md +226 -13
  403. package/helps/operato-wms/outbound/single-outbound-worksheet.en.md +31 -17
  404. package/helps/operato-wms/outbound/sorting-product.en.md +95 -0
  405. package/helps/operato-wms/product-label/print-product-label.en.md +13 -0
  406. package/helps/operato-wms/purchase-order/po-approval-detail.en.md +10 -0
  407. package/helps/operato-wms/purchase-order/po-detail.en.md +65 -0
  408. package/helps/operato-wms/purchase-order/purchase-order-approval-list.en.md +15 -0
  409. package/helps/operato-wms/purchase-order/purchase-order-list.en.md +9 -0
  410. package/helps/operato-wms/release-order/b2c-order-requests.en.md +34 -0
  411. package/helps/operato-wms/release-order/create-ro.en.md +25 -28
  412. package/helps/operato-wms/release-order/draft-release-good-list.en.md +23 -0
  413. package/helps/operato-wms/release-order/ro-list.en.md +36 -31
  414. package/helps/operato-wms/report/inbound-order-details-report.en.md +11 -0
  415. package/helps/operato-wms/report/inbound-serial-number-report.en.md +14 -0
  416. package/helps/operato-wms/report/inventory-report.en.md +12 -19
  417. package/helps/operato-wms/report/inventory-summary-report.en.md +5 -10
  418. package/helps/operato-wms/report/outbound-order-details-report.en.md +11 -0
  419. package/helps/operato-wms/report/outbound-serial-number-report.en.md +14 -0
  420. package/helps/operato-wms/report/release-inventory-report.en.md +14 -0
  421. package/helps/operato-wms/report/volume-summary-report.en.md +1 -0
  422. package/helps/operato-wms/return-order/check-return-order.en.md +3 -2
  423. package/helps/operato-wms/return-order/create-return-order.en.md +10 -14
  424. package/helps/operato-wms/return-order/receive-return-order-requests.en.md +2 -3
  425. package/helps/operato-wms/return-order/return-order-assign-buffer-location.en.md +14 -13
  426. package/helps/operato-wms/return-order/return-order-detail.en.md +8 -3
  427. package/helps/operato-wms/return-order/return-order-list.en.md +5 -7
  428. package/helps/operato-wms/return-order/return-order-requests.en.md +32 -18
  429. package/helps/operato-wms/transport-order/create-delivery-order.en.md +42 -33
  430. package/helps/operato-wms/transport-order/delivery-order-list.en.md +16 -11
  431. package/package.json +8 -8
  432. package/server/graphql/resolvers/reports/index.ts +2 -1
  433. package/server/graphql/resolvers/reports/vas-report.ts +186 -23
  434. package/server/graphql/types/reports/index.ts +6 -3
  435. package/server/graphql/types/reports/vas-report-list.ts +8 -2
  436. package/server/graphql/types/reports/vas-report.ts +13 -2
  437. package/things-factory.config.js +4 -0
  438. package/translations/en.json +12 -2
  439. package/translations/ko.json +14 -3
  440. package/translations/ms.json +13 -3
  441. package/translations/zh.json +13 -3
@@ -0,0 +1,577 @@
1
+ import '@things-factory/form-ui'
2
+ import '@things-factory/grist-ui'
3
+
4
+ import gql from 'graphql-tag'
5
+ import { css, html } from 'lit-element'
6
+ import { connect } from 'pwa-helpers/connect-mixin'
7
+
8
+ import { i18next, localize } from '@things-factory/i18n-base'
9
+ import { client, PageView, store } from '@things-factory/shell'
10
+ import { flattenObject } from '@things-factory/utils'
11
+
12
+ class OrderVasReport extends connect(store)(localize(i18next)(PageView)) {
13
+ static get styles() {
14
+ return css`
15
+ :host {
16
+ display: flex;
17
+ flex-direction: column;
18
+ width: 100%;
19
+ }
20
+
21
+ data-report {
22
+ flex: 1;
23
+ }
24
+ `
25
+ }
26
+
27
+ static get properties() {
28
+ return {
29
+ _searchFields: Object,
30
+ _config: Object,
31
+ _partners: Object,
32
+ _partnerId: String,
33
+ _partnerName: String,
34
+ data: Object
35
+ }
36
+ }
37
+
38
+ get context() {
39
+ return {
40
+ title: i18next.t('title.vas_order_report'),
41
+ printable: {
42
+ accept: ['preview'],
43
+ content: this
44
+ },
45
+ exportable: {
46
+ name: i18next.t('title.date_vas_order_report', {
47
+ state: {
48
+ text: (() => {
49
+ let date = new Date()
50
+ return date.getFullYear().toString() + (date.getMonth() + 1).toString() + date.getDate().toString()
51
+ })()
52
+ }
53
+ }),
54
+ data: this._exportableData.bind(this)
55
+ },
56
+ help: 'operato-wms/report/order-vas-report'
57
+ }
58
+ }
59
+
60
+ get report() {
61
+ return this.shadowRoot.querySelector('data-report')
62
+ }
63
+
64
+ get searchForm() {
65
+ return this.shadowRoot.querySelector('search-form')
66
+ }
67
+
68
+ get _bizplaceSelector() {
69
+ return this.searchForm.shadowRoot.querySelector('select[name=bizplace]')
70
+ }
71
+
72
+ get _fromDateInput() {
73
+ return this.searchForm.shadowRoot.querySelector('input[name=fromDate]')
74
+ }
75
+
76
+ get _toDateInput() {
77
+ return this.searchForm.shadowRoot.querySelector('input[name=toDate]')
78
+ }
79
+
80
+ render() {
81
+ return html`
82
+ <search-form id="search-form" .fields=${this._searchFields} @submit=${e => this.report.fetch()}></search-form>
83
+
84
+ <data-report .config=${this._config} .fetchHandler=${this.fetchHandler.bind(this)}></data-report>
85
+ `
86
+ }
87
+
88
+ get searchFields() {
89
+ return [
90
+ {
91
+ label: i18next.t('field.company'),
92
+ name: 'bizplace',
93
+ type: 'select',
94
+ options: [
95
+ { value: '' },
96
+ ...this._partners
97
+ .map(partner => {
98
+ return {
99
+ name: `${partner.name} ${partner.description ? `(${partner.description})` : ''}`,
100
+ value: partner.id
101
+ }
102
+ })
103
+ .sort(this._compareValues('name', 'asc'))
104
+ ],
105
+ props: { searchOper: 'eq' }
106
+ },
107
+ {
108
+ label: i18next.t('field.executed_at_from_date'),
109
+ name: 'fromDate',
110
+ type: 'date',
111
+ props: {
112
+ searchOper: 'eq',
113
+ max: new Date().toISOString().split('T')[0]
114
+ },
115
+ handlers: { change: this._modifyDateRange.bind(this) }
116
+ },
117
+ {
118
+ label: i18next.t('field.executed_at_to_date'),
119
+ name: 'toDate',
120
+ type: 'date',
121
+ props: {
122
+ searchOper: 'eq',
123
+ min: (() => {
124
+ let date = new Date()
125
+ date.setMonth(date.getMonth() - 1)
126
+ return date.toISOString().split('T')[0]
127
+ })(),
128
+ max: new Date().toISOString().split('T')[0]
129
+ }
130
+ },
131
+ {
132
+ label: i18next.t('field.product_info'),
133
+ name: 'productInfo',
134
+ type: 'string',
135
+ props: { searchOper: 'i_like' }
136
+ },
137
+ {
138
+ label: i18next.t('field.order_no'),
139
+ name: 'orderNo',
140
+ type: 'string',
141
+ props: { searchOper: 'i_like' }
142
+ }
143
+ ]
144
+ }
145
+
146
+ get reportConfig() {
147
+ return {
148
+ rows: {
149
+ selectable: false,
150
+ groups: [
151
+ { column: 'bizplaceName' },
152
+ // { column: 'ro' },
153
+ { column: 'ro', title: 'Sub Total' },
154
+ { column: 'refNo' },
155
+ { column: 'sku' },
156
+ { column: 'batchId' },
157
+ { column: 'packingType' },
158
+ { column: 'uom' },
159
+ { column: 'uomValue' },
160
+ { column: 'releaseQty' },
161
+ { column: 'orderVasName' },
162
+ { column: 'qty' },
163
+ { column: 'newSku' },
164
+ { column: 'newPackingType' },
165
+ { column: 'newUom' },
166
+ { column: 'newUomValue' },
167
+ { column: 'outputQty' }
168
+ ],
169
+ totals: ['vasQty']
170
+ },
171
+ columns: [
172
+ {
173
+ type: 'string',
174
+ name: 'bizplaceName',
175
+ header: i18next.t('field.company'),
176
+ sortable: false,
177
+ imex: { header: i18next.t('field.company'), key: 'bizplaceName', width: 30, type: 'string' },
178
+ width: 150
179
+ },
180
+ {
181
+ type: 'string',
182
+ name: 'ro',
183
+ header: i18next.t('field.order_no'),
184
+ sortable: false,
185
+ imex: { header: i18next.t('field.order_no'), key: 'ro', width: 25, type: 'string' },
186
+ width: 160
187
+ },
188
+ {
189
+ type: 'string',
190
+ name: 'refNo',
191
+ header: i18next.t('field.ref_no'),
192
+ sortable: false,
193
+ imex: { header: i18next.t('field.ref_no'), key: 'refNo', width: 25, type: 'string' },
194
+ width: 150
195
+ },
196
+ {
197
+ type: 'string',
198
+ name: 'sku',
199
+ header: i18next.t('field.sku'),
200
+ sortable: false,
201
+ imex: { header: i18next.t('field.sku'), key: 'sku', width: 20, type: 'string' },
202
+ width: 150
203
+ },
204
+ {
205
+ type: 'string',
206
+ name: 'batchId',
207
+ header: i18next.t('field.batch_no'),
208
+ sortable: false,
209
+ imex: { header: i18next.t('field.batch_no'), key: 'batchId', width: 20, type: 'string' },
210
+ width: 100
211
+ },
212
+ {
213
+ type: 'string',
214
+ name: 'packingType',
215
+ header: i18next.t('field.packing_type'),
216
+ sortable: false,
217
+ imex: { header: i18next.t('field.packing_type'), key: 'packingType', width: 20, type: 'string' },
218
+ width: 130
219
+ },
220
+ {
221
+ type: 'string',
222
+ name: 'uom',
223
+ header: i18next.t('field.uom'),
224
+ sortable: false,
225
+ imex: { header: i18next.t('field.uom'), key: 'uom', width: 5, type: 'string' },
226
+ width: 70
227
+ },
228
+ {
229
+ type: 'number',
230
+ name: 'uomValue',
231
+ header: i18next.t('field.unit_uom_value'),
232
+ sortable: false,
233
+ imex: { header: i18next.t('field.unit_uom_value'), key: 'uomValue', width: 10, type: 'string' },
234
+ width: 80
235
+ },
236
+ {
237
+ type: 'number',
238
+ name: 'releaseQty',
239
+ header: i18next.t('field.release_qty'),
240
+ sortable: false,
241
+ imex: { header: i18next.t('field.release_qty'), key: 'releaseQty', width: 10, type: 'number' },
242
+ width: 80
243
+ },
244
+ {
245
+ type: 'string',
246
+ name: 'orderVasName',
247
+ header: i18next.t('field.set'),
248
+ sortable: false,
249
+ imex: { header: i18next.t('field.set'), key: 'orderVasName', width: 10, type: 'string' },
250
+ width: 80
251
+ },
252
+ {
253
+ type: 'number',
254
+ name: 'qty',
255
+ header: i18next.t('field.qty'),
256
+ sortable: false,
257
+ imex: { header: i18next.t('field.qty'), key: 'qty', width: 10, type: 'number' },
258
+ width: 80
259
+ },
260
+ {
261
+ type: 'string',
262
+ name: 'newSku',
263
+ header: i18next.t('field.new_sku'),
264
+ sortable: false,
265
+ imex: { header: i18next.t('field.new_sku'), key: 'newSku', width: 20, type: 'string' },
266
+ width: 150
267
+ },
268
+ {
269
+ type: 'string',
270
+ name: 'newPackingType',
271
+ header: i18next.t('field.packing_type'),
272
+ sortable: false,
273
+ imex: { header: i18next.t('field.packing_type'), key: 'newPackingType', width: 10, type: 'string' },
274
+ width: 90
275
+ },
276
+ {
277
+ type: 'string',
278
+ name: 'newUom',
279
+ header: i18next.t('field.uom'),
280
+ sortable: false,
281
+ imex: { header: i18next.t('field.uom'), key: 'newUom', width: 5, type: 'string' },
282
+ width: 70
283
+ },
284
+ {
285
+ type: 'number',
286
+ name: 'newUomValue',
287
+ header: i18next.t('field.uom_value'),
288
+ sortable: false,
289
+ imex: { header: i18next.t('field.uom_value'), key: 'newUomValue', width: 10, type: 'string' },
290
+ width: 80
291
+ },
292
+ {
293
+ type: 'number',
294
+ name: 'outputQty',
295
+ header: i18next.t('field.output_qty'),
296
+ sortable: false,
297
+ imex: { header: i18next.t('field.output_qty'), key: 'outputQty', width: 10, type: 'string' },
298
+ width: 80
299
+ },
300
+ {
301
+ type: 'string',
302
+ name: 'vas',
303
+ header: i18next.t('field.vas'),
304
+ sortable: false,
305
+ imex: { header: i18next.t('field.vas'), key: 'vas', width: 15, type: 'string' },
306
+ width: 100
307
+ },
308
+ {
309
+ type: 'number',
310
+ name: 'vasQty',
311
+ header: i18next.t('field.vas_qty'),
312
+ sortable: false,
313
+ imex: { header: i18next.t('field.vas_qty'), key: 'vasQty', width: 10, type: 'string' },
314
+ width: 70
315
+ },
316
+ {
317
+ type: 'datetime',
318
+ name: 'executedAt',
319
+ header: i18next.t('field.executed_at'),
320
+ sortable: false,
321
+ imex: { header: i18next.t('field.executed_at'), key: 'executedAt', width: 20, type: 'string' },
322
+ width: 160
323
+ }
324
+ ]
325
+ }
326
+ }
327
+
328
+ async pageInitialized() {
329
+ this._releaseOrders = []
330
+ this._partners = [...(await this._fetchPartners())]
331
+ this._orderVass = []
332
+
333
+ this._searchFields = this.searchFields
334
+ this._config = this.reportConfig
335
+ }
336
+
337
+ pageUpdated(changes, lifecycle) {
338
+ if (this.active) {
339
+ this.report.fetch()
340
+ }
341
+ }
342
+
343
+ async fetchHandler({ page, limit, sorters = [] }) {
344
+ try {
345
+ this._validate()
346
+ const response = await client.query({
347
+ query: gql`
348
+ query orderVasReport($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
349
+ orderVasReport(filters: $filters, pagination: $pagination, sortings: $sortings) {
350
+ items {
351
+ bizplace {
352
+ name
353
+ description
354
+ }
355
+ releaseGood {
356
+ name
357
+ refNo
358
+ }
359
+ orderVas {
360
+ id
361
+ name
362
+ batchId
363
+ packingType
364
+ uom
365
+ uomValue
366
+ newPackingType
367
+ newUom
368
+ newUomValue
369
+ outputQty
370
+ qty
371
+ product {
372
+ sku
373
+ }
374
+ newProduct {
375
+ sku
376
+ }
377
+ }
378
+ orderVasItem {
379
+ vas {
380
+ name
381
+ description
382
+ }
383
+ vasQty
384
+ executedAt
385
+ }
386
+ orderInventory {
387
+ releaseQty
388
+ }
389
+ worksheet {
390
+ endedAt
391
+ }
392
+ }
393
+ }
394
+ }
395
+ `,
396
+ variables: {
397
+ filters: [
398
+ ...this.searchForm.queryFilters.map(filter => {
399
+ switch (filter.name) {
400
+ case 'fromDate':
401
+ let fromDt = new Date(filter.value)
402
+ fromDt.setHours(0)
403
+ filter.value = fromDt.toISOString()
404
+ break
405
+ case 'toDate':
406
+ let toDt = new Date(filter.value)
407
+ toDt.setHours(23, 59, 59)
408
+ filter.value = toDt.toISOString()
409
+ break
410
+ default:
411
+ break
412
+ }
413
+
414
+ return filter
415
+ })
416
+ ],
417
+ pagination: { page, limit },
418
+ sortings: sorters
419
+ }
420
+ })
421
+ return {
422
+ total: 0,
423
+ records: response.data.orderVasReport.items.map(item => {
424
+ return {
425
+ ...item,
426
+ orderVasId: item.orderVas.id,
427
+ orderVasName: item.orderVas.name,
428
+ bizplaceName: item.bizplace.name,
429
+ ro: item.releaseGood.name,
430
+ refNo: item.releaseGood.refNo,
431
+ sku: item.orderVas.product.sku,
432
+ batchId: item.orderVas.batchId,
433
+ qty: item.orderVas.qty,
434
+ packingType: item.orderVas.packingType,
435
+ uom: item.orderVas.uom,
436
+ uomValue: item.orderVas.uomValue,
437
+ releaseQty: item.orderInventory.releaseQty,
438
+ vas: `${item.orderVasItem.vas.name}(${item.orderVasItem.vas.description})`,
439
+ vasQty: item.orderVasItem.vasQty,
440
+ newSku: item.orderVas.newProduct.sku,
441
+ newPackingType: item.orderVas.newPackingType,
442
+ newUom: item.orderVas.newUom,
443
+ outputQty: item.orderVas.outputQty,
444
+ newUomValue: item.orderVas.newUomValue,
445
+ completionDate: item.worksheet.endedAt,
446
+ executedAt: item.orderVasItem.executedAt
447
+ }
448
+ })
449
+ }
450
+ } catch (e) {
451
+ this._showToast(e)
452
+ }
453
+ }
454
+
455
+ async _fetchPartners() {
456
+ const filters = []
457
+ const response = await client.query({
458
+ query: gql`
459
+ query partnersBizplaces($filters: [Filter!]) {
460
+ partnersBizplaces(filters: $filters) {
461
+ items {
462
+ id
463
+ name
464
+ description
465
+ }
466
+ }
467
+ }
468
+ `,
469
+ variables: { filters }
470
+ })
471
+
472
+ if (!response.errors) {
473
+ const partners = response.data.partnersBizplaces.items
474
+ if (partners.length == 1) {
475
+ this._partnerId = partners[0].id
476
+ this._partnerName = partners[0].name
477
+ } else {
478
+ this._partnerId = ''
479
+ this._partnerName = ''
480
+ }
481
+
482
+ return partners
483
+ }
484
+ }
485
+
486
+ _validate() {
487
+ if (!this.searchForm.shadowRoot.querySelector('form').checkValidity())
488
+ throw new Error(i18next.t('text.invalid_form_value'))
489
+ if (!this._bizplaceSelector.value) throw new Error(i18next.t('text.no_company_selected'))
490
+ // if (!this._fromDateInput.value) throw new Error(i18next.t('text.from_date_is_empty'))
491
+ // if (!this._toDateInput.value) throw new Error(i18next.t('text.to_date_is_empty'))
492
+ }
493
+
494
+ _modifyDateRange(e) {
495
+ const fromDate = e.currentTarget.value
496
+
497
+ if (this._toDateInput.value < fromDate) this._toDateInput.value = fromDate
498
+
499
+ let min = new Date(fromDate)
500
+ let today = new Date()
501
+ today.setHours(0, 0, 0, 0)
502
+
503
+ min = min.toISOString().split('T')[0]
504
+
505
+ this._toDateInput.min = min
506
+ }
507
+
508
+ _compareValues(key, order = 'asc') {
509
+ return function innerSort(a, b) {
510
+ if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {
511
+ return 0
512
+ }
513
+
514
+ const varA = typeof a[key] === 'string' ? a[key].toUpperCase() : a[key]
515
+ const varB = typeof b[key] === 'string' ? b[key].toUpperCase() : b[key]
516
+
517
+ let comparison = 0
518
+ if (varA > varB) {
519
+ comparison = 1
520
+ } else if (varA < varB) {
521
+ comparison = -1
522
+ }
523
+ return order === 'desc' ? comparison * -1 : comparison
524
+ }
525
+ }
526
+
527
+ _exportableData() {
528
+ try {
529
+ var headerSetting = [
530
+ ...this.report._config.columns
531
+ .filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
532
+ .map(column => {
533
+ return column.imex
534
+ })
535
+ ]
536
+
537
+ return {
538
+ header: headerSetting,
539
+ data: this.report.data.records.map(record => {
540
+ let date = new Date(parseInt(record.worksheet.endedAt))
541
+ return flattenObject({
542
+ ...record,
543
+ executedAt:
544
+ record.orderVasItem.executedAt !== null
545
+ ? date.getDate().toString() +
546
+ '/' +
547
+ (date.getMonth() + 1).toString() +
548
+ '/' +
549
+ date.getFullYear().toString() +
550
+ ' ' +
551
+ date.getHours().toString() +
552
+ ':' +
553
+ date.getMinutes().toString()
554
+ : ' '
555
+ })
556
+ }),
557
+ groups: this.report._config.rows.groups,
558
+ totals: this.report._config.rows.totals
559
+ }
560
+ } catch (e) {
561
+ this._showToast(e)
562
+ }
563
+ }
564
+
565
+ _showToast({ type, message }) {
566
+ document.dispatchEvent(
567
+ new CustomEvent('notify', {
568
+ detail: {
569
+ type,
570
+ message
571
+ }
572
+ })
573
+ )
574
+ }
575
+ }
576
+
577
+ window.customElements.define('order-vas-report', OrderVasReport)