@gct-paas/excel 0.1.28-beta.2 → 0.1.28-beta.20

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 (223) hide show
  1. package/dist/{VueVideoPlayer-B6X1JmEL.js → VueVideoPlayer-DZMc-mPF.js} +2 -2
  2. package/dist/{agg-design-DZpDRz0Y.js → agg-design-BF07rc0r.js} +1 -1
  3. package/dist/{agg-props-ockP_cAM.js → agg-props-CW9i-JXU.js} +1 -1
  4. package/dist/{agg-style-C7nWM2if.js → agg-style-Cc4y47PR.js} +1 -1
  5. package/dist/{align-editor-DpWvsI_x.js → align-editor-xtw3ti5B.js} +1 -1
  6. package/dist/{attach-fields-editor-BbWYEXfG.js → attach-fields-editor-V1dKYpEo.js} +2 -2
  7. package/dist/{barcode-design-D1hSeWVJ.js → barcode-design-uEDi5mRk.js} +2 -2
  8. package/dist/base/index.es.js +833 -703
  9. package/dist/{base-font-editor-DFHc_3JJ.js → base-font-editor-Bfog0z-n.js} +2 -2
  10. package/dist/{boolean-design-UO0nUx1k.js → boolean-design-AX3XKm-o.js} +8 -7
  11. package/dist/{boolean-props--l1hf_NI.js → boolean-props-CGqe6Y3K.js} +3 -3
  12. package/dist/{boolean-style-Dqwd3N4b.js → boolean-style-zdRbx1hw.js} +4 -4
  13. package/dist/{cell-upload-PkWTiWYW.js → cell-upload-FPPE7ltj.js} +8 -11
  14. package/dist/{date-range-editor-CVQsTg3G.js → date-range-editor-C9cPV-_1.js} +2 -2
  15. package/dist/{date-time-design-DmeUPsi-.js → date-time-design-D0faAOx6.js} +25 -6
  16. package/dist/{date-time-props-DqAAdD7L.js → date-time-props-B9qnrxIn.js} +3 -3
  17. package/dist/{date-time-style-BTtKVpV4.js → date-time-style-Bd8ihC6s.js} +1 -1
  18. package/dist/{decimal-design-DQ-61MMF.js → decimal-design-Db0iC6iR.js} +1 -1
  19. package/dist/{decimal-display-mode-CPL-jNCK.js → decimal-display-mode-kil9kuTH.js} +2 -2
  20. package/dist/{decimal-props-DUeC4_o5.js → decimal-props-SPE2DE5q.js} +4 -4
  21. package/dist/{decimal-style-B-0QILJa.js → decimal-style-Bf4kAqQ1.js} +1 -1
  22. package/dist/{default-value-editor.vue_vue_type_script_setup_true_name_default-value-editor_lang-CeTlpjT4.js → default-value-editor.vue_vue_type_script_setup_true_name_default-value-editor_lang-CNNmLct8.js} +2 -2
  23. package/dist/{diagonal-design-Cx7RTy6_.js → diagonal-design-CW_twthc.js} +2 -2
  24. package/dist/{double-design-Bpuy9Ss3.js → double-design-BpVaYQqr.js} +1 -1
  25. package/dist/{double-props-BLp5rMS0.js → double-props-C3zAeh1H.js} +6 -4
  26. package/dist/{double-style-BQT4UDRo.js → double-style-DUA2z_gw.js} +1 -1
  27. package/dist/{dynamic-table-action-CT_aYOca.js → dynamic-table-action-DMqtzls4.js} +512 -351
  28. package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-SAa6KGYz.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-D4i-Gvff.js} +678 -331
  29. package/dist/{edit.utils-CXmmCnxE-CrBcZqbG.js → edit.utils-CXmmCnxE-G7fcGb1T.js} +1 -1
  30. package/dist/{enum-design-DTh9UhHf.js → enum-design-CF1dG0CC.js} +11 -4
  31. package/dist/{enum-props-J-3PLabW.js → enum-props-B-JCKn2M.js} +68 -47
  32. package/dist/{enum-style-h5lmzZD_.js → enum-style-CuDDmTxC.js} +3 -3
  33. package/dist/excel.css +1357 -722
  34. package/dist/{exceljs.min-mW_Nqru2.js → exceljs.min-ST54H_Ly.js} +2 -2
  35. package/dist/{expression-design-Cbi_6pnX.js → expression-design-LhErStD4.js} +1 -1
  36. package/dist/{expression-props-DuvdDUWt.js → expression-props-f6sUAXwi.js} +1 -1
  37. package/dist/{expression-style-CcdTrGye.js → expression-style-DKsW2Af8.js} +1 -1
  38. package/dist/{file-design-Cix4ztNq.js → file-design-ChOoqRR6.js} +1 -1
  39. package/dist/{file-props-DvZgFCjv.js → file-props-BWCzMimL.js} +5 -4
  40. package/dist/{file-style-DTXliETB.js → file-style-DMD0OfXL.js} +1 -1
  41. package/dist/{font-editor-D_4CECiK.js → font-editor-DrAPkGDv.js} +3 -3
  42. package/dist/{image-design-BxFQTm4-.js → image-design-DINHKI1E.js} +3 -2
  43. package/dist/{image-design-IaQbw4Bv.js → image-design-DuVASh_q.js} +1 -1
  44. package/dist/{image-props-BmLfiJIb.js → image-props-QFvfJZyP.js} +1 -1
  45. package/dist/{image-style-BuGQiWh9.js → image-style-NTPttGd7.js} +1 -1
  46. package/dist/{index-DuELqbrc.js → index-9J8XK2gi.js} +1 -1
  47. package/dist/{index-BuucdbMD.js → index-BPbdrBEI.js} +1 -1
  48. package/dist/{index-V3KPtSlA.js → index-BWXYxhit.js} +1 -1
  49. package/dist/{index-CSGDQQxf.js → index-BcIWp9bu.js} +6 -6
  50. package/dist/{index-BKQgEYOt.js → index-BeGb0xGr.js} +1 -1
  51. package/dist/{index-6AnvwL1T.js → index-BlcHlMyL.js} +1 -1
  52. package/dist/{index-BUEsJ6db.js → index-BqE7urvK.js} +1 -1
  53. package/dist/{index-Dl48Dmuf.js → index-BrzGtAZ2.js} +1 -1
  54. package/dist/{index-hcp9zj3F.js → index-BsU99Zea.js} +7582 -3443
  55. package/dist/{index-uIR6j0YE.js → index-BtNcA0Zz.js} +1 -1
  56. package/dist/{index-DJsySg7Z.js → index-C3i4U5cP.js} +1 -1
  57. package/dist/{index-hkXYQoCV.js → index-CE37hX3D.js} +6 -6
  58. package/dist/{index-T_P3hv-X.js → index-CEeMGkWk.js} +2 -2
  59. package/dist/{index-DnxIXenr.js → index-CJHVASP5.js} +2 -2
  60. package/dist/{index-C7XazAkv.js → index-CL2-zRQv.js} +120 -455
  61. package/dist/{index-HHW_GvS9.js → index-CYfxzEsK.js} +1 -1
  62. package/dist/{index-CO1Iw_97.js → index-Cgt_ujWq.js} +1 -1
  63. package/dist/{index-DAVndG-D.js → index-CwcFqCPj.js} +2 -2
  64. package/dist/{index-PgmRu5Zh.js → index-D3Mbh5BK.js} +1 -1
  65. package/dist/{index-CvefH3Ld.js → index-DAukffhx.js} +1 -1
  66. package/dist/{index-CYc23F99.js → index-DH7jiJpP.js} +1 -1
  67. package/dist/{index-DIHeOfRf.js → index-DiydeBn7.js} +1 -1
  68. package/dist/{index-VU8yct3A.js → index-DlKhewbe.js} +1 -1
  69. package/dist/{index-aZhb-M_v.js → index-Dt3Z7kxn.js} +1 -1
  70. package/dist/{index-DG8SGSHV.js → index-G__rsjxA.js} +1 -1
  71. package/dist/{index-CmfE-VkX.js → index-I2zvfc5P.js} +1 -1
  72. package/dist/{index-1kSDRqJL.js → index-NhBBPsPM.js} +1 -1
  73. package/dist/{index-BSWx0ysi.js → index-TkzoA0yX.js} +1 -1
  74. package/dist/{index-CdoJjtvt.js → index-g1tkFymd.js} +2 -2
  75. package/dist/{index-5E89tzgQ.js → index-qK90tVWt.js} +1 -1
  76. package/dist/{index-BRifPJNN.js → index-tgobVbg3.js} +2 -2
  77. package/dist/{index-DayP0trN.js → index-wintNIyC.js} +1 -1
  78. package/dist/{index-BCFgHqQ4.js → index-zfX9oalO.js} +1 -1
  79. package/dist/index.es.js +45 -45
  80. package/dist/{integer-design-B48BapfF.js → integer-design-DJWJDVmn.js} +1 -1
  81. package/dist/{integer-props-G5n3P-Vt.js → integer-props-BO4pvLTL.js} +4 -4
  82. package/dist/{integer-style-yziEYd90.js → integer-style-CeMZwvws.js} +1 -1
  83. package/dist/{mb-render-DiWQ5hOn.js → mb-render-QRW5YlWX.js} +2 -1
  84. package/dist/{number-input-ex-6e_-B7y7.js → number-input-ex-BFg5WxdS.js} +1 -1
  85. package/dist/{org-design-DEibx7uD.js → org-design-DWZI8xev.js} +1 -1
  86. package/dist/{org-props-uZzEnRfn.js → org-props-C9qYDIkL.js} +2 -2
  87. package/dist/{org-style-CtYMw9ob.js → org-style-DWl3yLe8.js} +1 -1
  88. package/dist/{pagination-design-CdnyxoR4.js → pagination-design-CKpb-_KK.js} +2 -2
  89. package/dist/paper-widget-design-nTTa52To.js +4 -0
  90. package/dist/{qrcode-design-Bh_lT1Yn.js → qrcode-design-0ZzsNRIM.js} +1 -1
  91. package/dist/quick-search.util-CNR1NbIV.js +77 -0
  92. package/dist/{ref-autofill-editor-99WrBySm.js → ref-autofill-editor-B86I06Tl.js} +149 -114
  93. package/dist/{ref-design-C7LbDVQz.js → ref-design-BQ8o1gKm.js} +1 -1
  94. package/dist/{ref-props-BGzOHDvi.js → ref-props-DiBTnQ3x.js} +22 -13
  95. package/dist/{ref-style-C1-VGUt9.js → ref-style-DzYqVgRY.js} +1 -1
  96. package/dist/{regex-editor-BAjvqlvo.js → regex-editor-PSuBMtjX.js} +94 -67
  97. package/dist/{revo-grid.entry-Cg-4cMIo.js → revo-grid.entry-D4Oq6MaX.js} +1 -1
  98. package/dist/{revogr-attribution_7.entry-DzamtFvo.js → revogr-attribution_7.entry-b6D-TJMW.js} +3 -3
  99. package/dist/{revogr-clipboard_3.entry-CIxDfW07.js → revogr-clipboard_3.entry-BMLpUsO2.js} +2 -2
  100. package/dist/{revogr-data_4.entry-BNENcgpR.js → revogr-data_4.entry-CUg0wBPs.js} +2 -2
  101. package/dist/{revogr-filter-panel.entry-BrYsomo0.js → revogr-filter-panel.entry-DCnskGKK.js} +1 -1
  102. package/dist/{select-render-type-editor.vue_vue_type_script_setup_true_lang-Dg2h8nwx.js → select-render-type-editor.vue_vue_type_script_setup_true_lang-BcD8GEgc.js} +2 -2
  103. package/dist/{serialnumber-design-BsAogg1u.js → serialnumber-design-Bpi1XMMc.js} +1 -1
  104. package/dist/shared/index.es.js +22 -22
  105. package/dist/{signature-design-sSyiIxFB.js → signature-design-CR5q4GWO.js} +1 -1
  106. package/dist/{signature-props-CYmd9GVl.js → signature-props-DMmiIZwZ.js} +3 -3
  107. package/dist/{signature-style-wLJo19Kd.js → signature-style-a8sR9cH3.js} +1 -1
  108. package/dist/{single-field-drop-CilJB5DX.js → single-field-drop-CzcsuxMW.js} +2 -2
  109. package/dist/{size-editor-DnyvSWUn.js → size-editor--5RKKWY7.js} +1 -1
  110. package/dist/src/adapter/adapter.d.ts +10 -0
  111. package/dist/src/adapter/setup.d.ts +11 -0
  112. package/dist/src/domain/table/business/warehouse/warehouse-inventory/profile/field-keys.d.ts +0 -2
  113. package/dist/src/index.d.ts +1 -2
  114. package/dist/src/nocode-base/src/core/sub-table/allocate-table-core.d.ts +3 -4
  115. package/dist/src/nocode-base/src/core/sub-table/index.d.ts +2 -0
  116. package/dist/src/nocode-base/src/core/sub-table/pretreatment-list-table-core.d.ts +3 -12
  117. package/dist/src/nocode-base/src/core/sub-table/profile-driven-sub-table-core.d.ts +19 -17
  118. package/dist/src/nocode-base/src/core/sub-table/sterilize-batch-table-core.d.ts +3 -14
  119. package/dist/src/nocode-base/src/core/sub-table/stocktake-table-core.d.ts +6 -5
  120. package/dist/src/nocode-base/src/core/sub-table/sub-table-core.d.ts +4 -0
  121. package/dist/src/nocode-base/src/core/sub-table/utils/scan/index.d.ts +3 -0
  122. package/dist/src/nocode-base/src/core/sub-table/utils/scan/inventory-scan-api.d.ts +9 -0
  123. package/dist/src/nocode-base/src/core/sub-table/utils/scan/production-identification-scan-api.d.ts +9 -0
  124. package/dist/src/nocode-base/src/core/sub-table/utils/scan/scan-helpers.d.ts +27 -0
  125. package/dist/src/nocode-base/src/core/sub-table/utils/stocktake/stocktake-calc.d.ts +6 -59
  126. package/dist/src/nocode-base/src/core/sub-table/warehouse-in-table-core.d.ts +11 -0
  127. package/dist/src/nocode-base/src/core/sub-table/warehouse-out-table-core.d.ts +21 -0
  128. package/dist/src/nocode-base/src/hooks/index.d.ts +1 -1
  129. package/dist/src/nocode-base/src/hooks/label-parse-rule/type.d.ts +6 -0
  130. package/dist/src/nocode-base/src/hooks/material-consume/bom-validator.d.ts +15 -74
  131. package/dist/src/nocode-base/src/hooks/material-consume/material-consume-table-controller.d.ts +16 -8
  132. package/dist/src/nocode-base/src/hooks/material-consume/tmpl-bom-controller.d.ts +4 -4
  133. package/dist/src/nocode-base/src/hooks/material-consume/types.d.ts +15 -0
  134. package/dist/src/nocode-base/src/hooks/material-consume-object/bom-validator.d.ts +38 -0
  135. package/dist/src/nocode-base/src/hooks/material-consume-object/index.d.ts +2 -0
  136. package/dist/src/nocode-base/src/hooks/material-consume-object/use-tmpl-bom.d.ts +13 -0
  137. package/dist/src/nocode-base/src/hooks/useRenderPageFactory.d.ts +6 -0
  138. package/dist/src/nocode-base/src/hooks/validation/useFormValidator.d.ts +2 -0
  139. package/dist/src/nocode-base/src/interface/device-query.d.ts +28 -0
  140. package/dist/src/nocode-base/src/interface/index.d.ts +1 -0
  141. package/dist/src/nocode-base/src/interface/render.d.ts +1 -0
  142. package/dist/src/nocode-base/src/interface/transform.d.ts +1 -1
  143. package/dist/src/nocode-base/src/types/business/index.d.ts +11 -1
  144. package/dist/src/nocode-base/src/types/business/pretreatment-list.d.ts +3 -1
  145. package/dist/src/nocode-base/src/types/business/sterilize-batch.d.ts +3 -1
  146. package/dist/src/nocode-base/src/types/business/stocktake.d.ts +3 -1
  147. package/dist/src/nocode-base/src/types/common/base.d.ts +4 -0
  148. package/dist/src/nocode-base/src/types/render/sub-table-render.d.ts +7 -0
  149. package/dist/src/nocode-web-render/src/render/parse-rule/add-rule-btn.vue.d.ts +2 -0
  150. package/dist/src/nocode-web-render/src/render/parse-rule/parse-rule-modal.vue.d.ts +1 -0
  151. package/dist/src/nocode-web-render/src/render/sub-table/common/scan-modal.vue.d.ts +0 -1
  152. package/dist/src/nocode-web-render/src/render/sub-table/common/sub-table-render.d.ts +2 -1
  153. package/dist/src/nocode-web-render/src/render/sub-table/stocktake/index.d.ts +0 -1
  154. package/dist/src/nocode-web-render/src/render/sub-table/stocktake/stocktake-web-render.d.ts +11 -1
  155. package/dist/src/online-form/src/views/__cell_widgets__/cell-widget-dependency.vue.d.ts +1 -0
  156. package/dist/src/online-form/src/views/__cell_widgets__/common/display-fields-editor/display-fields-editor.vue.d.ts +3 -3
  157. package/dist/src/online-form/src/views/__cell_widgets__/common/display-fields-editor/display-fields.util.d.ts +6 -0
  158. package/dist/src/online-form/src/views/__cell_widgets__/common/quick-search-editor/quick-search.util.d.ts +11 -3
  159. package/dist/src/online-form/src/views/designer/constants/index.d.ts +2 -4
  160. package/dist/src/online-form/src/views/designer/hooks/useAllSpreadSheets.d.ts +473 -0
  161. package/dist/src/online-form/src/views/designer/hooks/useModelFields.d.ts +7 -0
  162. package/dist/src/online-form/src/views/designer/hooks/useSpreadSheet.d.ts +622 -2
  163. package/dist/src/online-form/src/views/designer/modules/modals/add-dependency-modal/add-dependency-modal.vue.d.ts +5 -1
  164. package/dist/src/online-form/src/views/designer/modules/panel/comps/signature-config/config-modal.vue.d.ts +2 -0
  165. package/dist/src/online-form/src/views/designer/modules/panel/comps/signature-config/field-tree-select.vue.d.ts +1 -0
  166. package/dist/src/online-form/src/views/designer/modules/panel/comps/signature-config/index.d.ts +1 -1
  167. package/dist/src/online-form/src/views/designer/modules/panel/material-consumption/policy-items/consume-item.vue.d.ts +20 -0
  168. package/dist/src/online-form/src/views/designer/modules/panel/material-consumption/policy-items/qty-item/bom-formula-editor.vue.d.ts +18 -0
  169. package/dist/src/online-form/src/views/designer/modules/panel/material-consumption/policy-items/qty-item/qty-item.vue.d.ts +15 -0
  170. package/dist/src/online-form/src/views/designer/modules/panel/material-consumption/policy-items/substitute-item.vue.d.ts +23 -0
  171. package/dist/src/online-form/src/views/designer/modules/panel/panel-data-init-config/object-init/hooks/useObjectInit.d.ts +62 -0
  172. package/dist/src/online-form/src/views/designer/modules/panel/panel-data-init-config/object-init/index.d.ts +0 -1
  173. package/dist/src/online-form/src/views/designer/modules/panel/sub-table/comps/use-dynamic-sub-table-panel.d.ts +292 -0
  174. package/dist/src/online-form/src/views/designer/modules/panel/sub-table/material-consumption/bom-modal.vue.d.ts +1 -1
  175. package/dist/src/online-form/src/views/designer/modules/panel/sub-table/material-consumption/edit-parse-rule.vue.d.ts +1 -0
  176. package/dist/src/online-form/src/views/designer/types/index.d.ts +5 -15
  177. package/dist/src/online-form/src/views/designer/utils/design-readonly-modal.d.ts +3 -0
  178. package/dist/src/online-form/src/views/inline-cell/use-inline-icon-catalog.d.ts +2 -3
  179. package/dist/src/online-form/src/views/render/__components__/_field_/trace/composables/assoc-filter.d.ts +5 -4
  180. package/dist/src/online-form/src/views/render/__components__/_field_/trace/utils/columns.d.ts +2 -1
  181. package/dist/src/shared/components/Signature/card-signer.vue.d.ts +14 -0
  182. package/dist/src/shared/components/Signature/logic/index.d.ts +1 -0
  183. package/dist/src/shared/components/Signature/security-config.d.ts +6 -0
  184. package/dist/src/shared/components/Signature/ui/password-signer.vue.d.ts +1 -0
  185. package/dist/src/shared/components/Signature/ui/sign-switcher-modal.vue.d.ts +8 -5
  186. package/dist/src/shared/components/Signature/ui/sign-switcher.vue.d.ts +1 -0
  187. package/dist/src/shared/components/field-transfer/components/field-transfer-modal.vue.d.ts +2 -0
  188. package/dist/src/shared/components/field-transfer/components/modal-wrapper.vue.d.ts +2 -0
  189. package/dist/src/shared/components/field-transfer/useFieldTransfer.d.ts +2 -0
  190. package/dist/src/shared/components/rdo-tree-select/rdo-tree-select.vue.d.ts +1 -0
  191. package/dist/src/shared/enum/field-type.d.ts +12 -0
  192. package/dist/src/shared/utils/lot2sn.d.ts +22 -0
  193. package/dist/{text-design-7Cct8yh2.js → text-design-ZA8t-wHe.js} +5 -5
  194. package/dist/{text-design-DKPFi1Rh.js → text-design-ou0N3XAg.js} +2 -2
  195. package/dist/{text-props-a-16iwJu.js → text-props-MSIC8HJr.js} +5 -5
  196. package/dist/{text-style-CRqOGAZr.js → text-style-nSZDqCef.js} +1 -1
  197. package/dist/{throttle-Cpk1LoGk-BYyz4gtI.js → throttle-Cpk1LoGk-Bdg0kDBo.js} +1 -1
  198. package/dist/{timediff-design-JHt1-ug6.js → timediff-design-qcOv7QRc.js} +1 -1
  199. package/dist/{trace-design-DAHDTG5n.js → trace-design-BCp4VUtw.js} +33 -9
  200. package/dist/{trace-props-B5FBtpNR.js → trace-props-BUY2OLpA.js} +30 -31
  201. package/dist/{trace-style-CgdePCcv.js → trace-style-B-TTZgl6.js} +1 -1
  202. package/dist/{user-design-BRIV937X.js → user-design-fMF_h4IG.js} +4 -4
  203. package/dist/{user-props-BJVjolL7.js → user-props-B0J_Wix4.js} +2 -2
  204. package/dist/{user-style-D17ZPHqU.js → user-style-BExBE5WW.js} +1 -1
  205. package/dist/{value-editor.vue_vue_type_style_index_0_lang-J3MR2K39.js → value-editor.vue_vue_type_style_index_0_lang-DBuZyk0n.js} +2 -2
  206. package/dist/{version-select-Bw8yzDaH.js → version-select-CmFUZe2Z.js} +1 -1
  207. package/dist/web-render/index.es.js +397 -24
  208. package/dist/{widget-barcode-IbgHM5xo.js → widget-barcode-Bfhlr5Gm.js} +4 -4
  209. package/dist/{widget-diagonal-juPAlqEe.js → widget-diagonal-BShEIR9c.js} +3 -3
  210. package/dist/{widget-image-Dnaej-nk.js → widget-image-BtTsk3Bg.js} +6 -5
  211. package/dist/{widget-line-DL9jw_oY.js → widget-line-DM17jIVp.js} +4 -4
  212. package/dist/{widget-pagination-BlRJo3n4.js → widget-pagination-BuzuEcIC.js} +5 -5
  213. package/dist/{widget-power-CIC6itUt.js → widget-power-iyxCctMT.js} +3 -3
  214. package/dist/{widget-qrcode-BWEOVEZg.js → widget-qrcode-B_y5ru5o.js} +3 -3
  215. package/dist/{widget-rangelimit-C4KG56d-.js → widget-rangelimit-B2iPlpfB.js} +3 -3
  216. package/dist/{widget-serialnumber-DnfRRyBY.js → widget-serialnumber-B9yOCLws.js} +1 -1
  217. package/dist/{widget-text-C7d0ZrX3.js → widget-text-DAs5tB8i.js} +5 -5
  218. package/dist/{widget-timediff-FAvqRtXk.js → widget-timediff-CsJmxESH.js} +2 -2
  219. package/package.json +12 -1
  220. package/dist/paper-widget-design-gmMHiQFV.js +0 -4
  221. package/dist/src/nocode-base/src/hooks/material-stocktake/index.d.ts +0 -1
  222. package/dist/src/nocode-base/src/hooks/material-stocktake/useMaterialStocktake.d.ts +0 -8
  223. package/dist/src/online-form/src/views/designer/modules/panel/panel-data-init-config/object-init/object-init-modal.vue.d.ts +0 -26
@@ -1,11 +1,11 @@
1
- import { aW as fetchHistoryConsume, aX as isBomGranted, F as FIELD_TYPE, w as api, c as getProfileByTableType, b as isBusinessSubTableProfile, aY as runRowHandler, aZ as F$1, a_ as FILL_FROM_INVENTORY_OPTION, a$ as F$2, b0 as INVENTORY_BASE_FIELDS, b1 as WAREHOUSE_IDENTITY_GROUP_KEYS, b2 as SCAN_MERGE_GROUP_KEYS, b3 as AUTO_LOAD_READONLY_SELECT_FIELDS, aH as getParseRuleInfo, b4 as FILL_FROM_INVENTORY_OPTION$1, aI as getParseRuleValue, b5 as F$3, b6 as FILL_FROM_INVENTORY_OPTION$2, b7 as calcFillData, b8 as extractKeywordFromQueryData, b9 as F$4, ba as isProductManuallyEditable, bb as applyFillFromMfgOrderOption, bc as applyFillFromOption$1, bd as applyFillFromProductOption, be as CLEAR_ON_MATERIAL_CONTAINER_SELECT, M as FormTypeEnum, bf as transformUtils, d as SubTableType, aE as NCB_PROVIDE, bg as settleAndValidateDisplay, bh as unregisterValidationContext, bi as clearFormRules, bj as registerValidationContext, m as ComponentTypeEnum, aM as RenderModeEnum, bk as requestFullValidation, bl as requestDisplayValidation, bm as closeValidatorPopovers, bn as baseDataUtils, bo as getRawFormRuleMeta, bp as enrichFormChangeRowDetails, bq as settleAfterModeSwitch, br as calcUtils, an as CheckDsTypeEnum, aB as renderUtils, Y as PlatformEnum, bs as uuid2, bt as normalizeToArray, bu as safeParseArray, bv as BpmnNodeTypeEnum, bw as mergeByMultiKey, aV as useNocodeEmitter, bx as commonUtils, am as EntityModelCategoryEnum, by as getRowId, bz as collectFormChangeFieldLocations, bA as nextFormChangeRowViewHistoryId } from "../dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-SAa6KGYz.js";
2
- import { aq, as, aC, R, bB, bC, B, bD, t, a0, bE, bF, bG, aA, aD, ar, ao, ap, a1, a5, bH, aO, ae, bI, ak, au, Q, a3, L, bJ, bK, O, j, P, al, h, G, at, bL, bM, aL, W, T, V, X, bN, a4, a8, a2, bO, bP, bQ, bR, bS, bT, bU, bV, bW, bX, bY, bZ, b_, aK, b$, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, cd, aF, ce, cf, cg, aG, ch, ci, cj, ck, a6, cl, cm, ay, cn, ax, av, co, H, aJ, aN, az, cp, u, aw } from "../dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-SAa6KGYz.js";
3
- import { M as MaterialConsumptionPatternEnum, e as MaterialConsumeTableController, f as SubTableCore, g as SubTableActionMenuTypeEnum, h as getMenuByAction, i as SubTableActionEnum, j as getCopySubMenu, k as getInsertSubMenu, l as useMaterialBalance, v as validate } from "../dynamic-table-action-CT_aYOca.js";
4
- import { B as B2, m, D, _, n, c, o, d, F, p, I, q, O as O2, u as u2, a, b } from "../dynamic-table-action-CT_aYOca.js";
1
+ import { a$ as fetchHistoryConsume, b0 as isBomGranted, F as FIELD_TYPE, w as api, b1 as F$1, b2 as F$2, b3 as runRowHandler, c as getProfileByTableType, b as isBusinessSubTableProfile, b4 as F$3, b5 as FILL_FROM_INVENTORY_OPTION, b6 as FILL_FROM_INVENTORY_OPTION$1, b7 as TABLE_TYPE, b8 as FILL_FROM_INVENTORY_OPTION$2, b9 as F$4, ba as INVENTORY_BASE_FIELDS, bb as WAREHOUSE_IDENTITY_GROUP_KEYS, bc as AUTO_LOAD_READONLY_SELECT_FIELDS, aL as getParseRuleInfo, bd as FILL_FROM_INVENTORY_OPTION$3, be as calcFillData, aM as getParseRuleValue, bf as F$5, bg as FILL_FROM_INVENTORY_OPTION$4, bh as extractKeywordFromQueryData, aJ as LOT_CONTAINER_ROLE, an as resolveLotDisplayLabel, bi as F$6, bj as isProductManuallyEditable, bk as applyFillFromMfgOrderOption, bl as applyFillFromOption$1, bm as applyFillFromProductOption, bn as MATERIAL_CONTAINER_ID, bo as F$7, bp as F$8, bq as FILL_FROM_INVENTORY_OPTION$5, M as FormTypeEnum, br as transformUtils, d as SubTableType, aF as NCB_PROVIDE, bs as settleAndValidateDisplay, bt as unregisterValidationContext, bu as clearFormRules, bv as registerValidationContext, m as ComponentTypeEnum, aS as RenderModeEnum, bw as requestFullValidation, bx as requestDisplayValidation, by as closeValidatorPopovers, bz as baseDataUtils, bA as getRawFormRuleMeta, bB as enrichFormChangeRowDetails, bC as settleAfterModeSwitch, bD as calcUtils, ao as CheckDsTypeEnum, aC as renderUtils, Q as PlatformEnum, bE as uuid2, bF as normalizeToArray, bG as safeParseArray, bH as BpmnNodeTypeEnum, bI as mergeByMultiKey, a_ as useNocodeEmitter, bJ as commonUtils, am as EntityModelCategoryEnum, bK as getRowId, bL as collectFormChangeFieldLocations, bM as nextFormChangeRowViewHistoryId } from "../dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-D4i-Gvff.js";
2
+ import { ar, at, aD, T, bN, bO, B, bP, t, a1, bQ, bR, bS, aB, aE, as, ap, aq, bT, a2, a6, bU, bV, af, bW, al, av, R, a4, L, bX, bY, O, j, P, Z, h, G, au, bZ, b_, aR, X, V, W, Y, b$, a5, a9, a3, c0, c1, c2, aQ, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, cd, aP, ce, cf, cg, ch, ci, cj, ck, cl, cm, cn, co, cp, cq, aO, cr, aG, cs, ct, cu, aI, cv, cw, cx, cy, a7, cz, cA, az, cB, ay, aw, cC, H, aN, aT, aA, cD, u, ax } from "../dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-D4i-Gvff.js";
3
+ import { M as MaterialConsumptionPatternEnum, f as MaterialConsumeTableController, h as SubTableCore, i as SubTableActionMenuTypeEnum, j as getMenuByAction, k as SubTableActionEnum, r as resolveScanAdjustType, l as resolveScanQty, t as toDateOnly, m as getCopySubMenu, n as getInsertSubMenu, o as resolveScanParsedValue, p as resolveScanFillData, q as useMaterialBalance, s as validate, w as validateObjectBomQtyOnSubmit } from "../dynamic-table-action-DMqtzls4.js";
4
+ import { B as B2, x, D, _, y, d, z, e, F, A, I, C, O as O2, g, u as u2, b, a, c, v } from "../dynamic-table-action-DMqtzls4.js";
5
5
  import { ref, provide, watch, computed, onBeforeMount } from "vue";
6
6
  import { defaults, has, merge, isEmpty, cloneDeep, debounce } from "lodash-es";
7
- import dayjs from "dayjs";
8
- import { B as B3, F as F2, M, a as a7, u as u3 } from "../mb-render-DiWQ5hOn.js";
7
+ import "dayjs";
8
+ import { B as B3, F as F2, M, a as a8, u as u3 } from "../mb-render-QRW5YlWX.js";
9
9
  var MaterialStatusEnum = /* @__PURE__ */ ((MaterialStatusEnum2) => {
10
10
  MaterialStatusEnum2["LOT"] = "LOT";
11
11
  MaterialStatusEnum2["SN"] = "SN";
@@ -56,6 +56,8 @@ class FormTmplBomController {
56
56
  operationId;
57
57
  /** 批次/sn */
58
58
  materialNo;
59
+ /** 接收数量 */
60
+ productQty;
59
61
  /** 历史填报数据 */
60
62
  historyData = [];
61
63
  /** 表单控制器(key是tableKey) */
@@ -96,7 +98,7 @@ class FormTmplBomController {
96
98
  * @readonly
97
99
  */
98
100
  get materialNoNum() {
99
- return this.formInstBom?.qty ?? 1;
101
+ return this.productQty ?? this.formInstBom?.qty ?? 1;
100
102
  }
101
103
  /**
102
104
  * bom模块配置关联过来的bom明细集合
@@ -126,6 +128,7 @@ class FormTmplBomController {
126
128
  this.operationId = data.operationId;
127
129
  this.materialNo = data.materialNo;
128
130
  this.formInstBom = data.formInstBom;
131
+ this.productQty = data.productQty ?? 0;
129
132
  this.historyData = await fetchHistoryConsume({
130
133
  production_identification_id_: this.formInstBom.productionIdentificationId,
131
134
  routing_operation_id_: this.operationId
@@ -188,23 +191,18 @@ class FormTmplBomController {
188
191
  });
189
192
  }
190
193
  async submitValidate() {
191
- const results = await Promise.allSettled(
194
+ const results = await Promise.all(
192
195
  Object.values(this.tableControllers).map((c10) => c10.submitValidate())
193
196
  );
194
- const successful = results.filter((result) => result.status === "fulfilled").map((result) => result.value);
195
- const fieldArr = successful.filter(Boolean);
196
- if (fieldArr.length) {
197
- const fields = fieldArr.reduce((acc, cur) => {
198
- acc[cur.field] = [cur];
199
- return acc;
200
- }, {});
201
- return {
202
- isValid: false,
203
- fields
204
- };
205
- }
197
+ const fields = {};
198
+ let isValid = true;
199
+ results.forEach((res) => {
200
+ if (!res?.isValid) isValid = false;
201
+ Object.assign(fields, res?.fields ?? {});
202
+ });
206
203
  return {
207
- isValid: true
204
+ isValid,
205
+ fields: Object.keys(fields).length ? fields : void 0
208
206
  };
209
207
  }
210
208
  }
@@ -242,7 +240,86 @@ async function getModelQueries(opts) {
242
240
  console.log("getModelQueries", res);
243
241
  return res;
244
242
  }
245
- function isBlank$2(value) {
243
+ const SCAN_NOT_FOUND_MSG$2 = "扫描的物料不存在";
244
+ const SCAN_LOT_OR_UNIQUE_REQUIRED_MSG = "条码中未解析到物料批号或唯一码";
245
+ function hasLotOrUniqueCode(parsed) {
246
+ return Boolean(String(parsed.lot ?? "").trim() || String(parsed.uniqueCode ?? "").trim());
247
+ }
248
+ function buildInventoryScanRequestBody(parsed, warehouseId) {
249
+ const body = {};
250
+ if (parsed.materialCode) body.product_code_ = parsed.materialCode;
251
+ if (parsed.lot) body.material_no_ = parsed.lot;
252
+ if (parsed.uniqueCode) body.unique_code_ = parsed.uniqueCode;
253
+ if (parsed.mfgOrderCode) body.mfg_order_code_ = parsed.mfgOrderCode;
254
+ if (warehouseId) body.warehouse_id_ = warehouseId;
255
+ return body;
256
+ }
257
+ function unwrapBizServiceList$1(result) {
258
+ if (!result) return [];
259
+ if (Array.isArray(result)) return result;
260
+ const data = result.data;
261
+ if (Array.isArray(data)) return data;
262
+ if (data && typeof data === "object") return [data];
263
+ return [];
264
+ }
265
+ async function matchInventoryScanRecords(parsed, warehouseId) {
266
+ const body = buildInventoryScanRequestBody(parsed, warehouseId);
267
+ if (!body.material_no_ && !body.unique_code_) return [];
268
+ const result = await api.apaas.modelComprehensive.postBizServiceGeneralModelCategoryModelKeyBsKey(
269
+ {
270
+ modelCategory: "entity",
271
+ modelKey: "em_inventory",
272
+ bsKey: "biz_inventory_production_identification_scan"
273
+ },
274
+ {},
275
+ body
276
+ );
277
+ return unwrapBizServiceList$1(result);
278
+ }
279
+ const PRODUCTION_IDENTIFICATION_SCAN_NOT_FOUND_MSG = "扫描的物料不存在";
280
+ const PRODUCTION_IDENTIFICATION_SCAN_LOT_OR_UNIQUE_REQUIRED_MSG = "条码中未解析到物料批号或唯一码";
281
+ function hasProductionIdentificationScanKey(parsed) {
282
+ return Boolean(String(parsed.lot ?? "").trim() || String(parsed.uniqueCode ?? "").trim());
283
+ }
284
+ function buildProductionIdentificationScanBody(parsed) {
285
+ const body = {};
286
+ if (parsed.materialCode) body.product_code_ = parsed.materialCode;
287
+ if (parsed.lot) body.material_no_ = parsed.lot;
288
+ if (parsed.qty != null) body.qty_ = parsed.qty;
289
+ if (parsed.expiration) body.vaildate_ = parsed.expiration;
290
+ if (parsed.deviceCode) body.device_code_ = parsed.deviceCode;
291
+ if (parsed.uniqueCode) body.unique_code = parsed.uniqueCode;
292
+ if (parsed.mfgOrderCode) body.mfg_order_code_ = parsed.mfgOrderCode;
293
+ if (parsed.sterilizationLot) body.sterilization_code_ = parsed.sterilizationLot;
294
+ const productionContainerName = parsed.productionContainerName ?? parsed.production_container_name_ ?? parsed.productionLot;
295
+ if (productionContainerName) {
296
+ body.production_container_name_ = productionContainerName;
297
+ }
298
+ return body;
299
+ }
300
+ function unwrapBizServiceList(result) {
301
+ if (!result) return [];
302
+ if (Array.isArray(result)) return result;
303
+ const data = result.data;
304
+ if (Array.isArray(data)) return data;
305
+ if (data && typeof data === "object") return [data];
306
+ return [];
307
+ }
308
+ async function matchProductionIdentificationScanRecords(parsed) {
309
+ const body = buildProductionIdentificationScanBody(parsed);
310
+ if (!body.material_no_ && !body.unique_code) return [];
311
+ const result = await api.apaas.modelComprehensive.postBizServiceGeneralModelCategoryModelKeyBsKey(
312
+ {
313
+ modelCategory: "entity",
314
+ modelKey: "em_production_identification",
315
+ bsKey: "biz_production_identification_scan"
316
+ },
317
+ {},
318
+ body
319
+ );
320
+ return unwrapBizServiceList(result);
321
+ }
322
+ function isBlank$3(value) {
246
323
  return value === void 0 || value === null || value === "";
247
324
  }
248
325
  function matchFieldKey(match, fieldKey) {
@@ -261,7 +338,7 @@ function buildDefaultMapFromProfile(profile, paramsConfig) {
261
338
  );
262
339
  for (const assignment of assignments) {
263
340
  const value = paramsConfig?.[assignment.paramKey];
264
- if (isBlank$2(value)) continue;
341
+ if (isBlank$3(value)) continue;
265
342
  result[assignment.fieldKey] = value;
266
343
  }
267
344
  return result;
@@ -332,54 +409,49 @@ class ProfileDrivenSubTableCore extends SubTableCore {
332
409
  super.handleChange(params);
333
410
  }
334
411
  }
335
- class WarehouseInTableCore extends ProfileDrivenSubTableCore {
412
+ function isBlank$2(value) {
413
+ return value === void 0 || value === null || value === "";
336
414
  }
337
- class WarehouseInboundTableCore extends ProfileDrivenSubTableCore {
415
+ function isPartInventoryOption(option) {
416
+ if (!option) return false;
417
+ return option.part_id_ != null || option.part_id_name_ != null || option.warehouse_id_ != null || option.stock_num_ != null;
338
418
  }
339
- class WarehouseOutTableCore extends ProfileDrivenSubTableCore {
340
- get warehouseId() {
341
- return this.factory.ctx.paramsConfig?.warehouseId;
342
- }
343
- handleFieldTd = (params) => {
344
- const { field, tdHandler } = params;
345
- if (field === F$1.product) {
346
- tdHandler.mergeTd({
347
- cellWidget: {
348
- props: {
349
- customRenderTag: "allocateProduct",
350
- newSpecificConfig: {
351
- newOptions: []
352
- }
353
- }
354
- }
355
- });
356
- }
357
- super.handleFieldTd(params);
358
- };
359
- calcFieldQuery = (params) => {
360
- const { field } = params;
361
- if (field === F$1.product) {
362
- return {
363
- warehouse_id_: this.warehouseId
364
- };
365
- }
366
- };
367
- handleChange(params) {
368
- super.handleChange(params);
369
- const { field, value, option, rowData } = params;
370
- if (field !== F$1.product || !option || value === void 0 || value === null || value === "") {
371
- return;
372
- }
373
- for (const { optionField, toField } of FILL_FROM_INVENTORY_OPTION) {
419
+ function applyInventoryFill(rowData, option, mappings) {
420
+ for (const { optionField, toField } of mappings) {
421
+ if (option[optionField] !== void 0) {
374
422
  rowData[toField] = option[optionField];
375
423
  }
376
424
  }
377
425
  }
426
+ class WarehouseInboundTableCore extends ProfileDrivenSubTableCore {
427
+ }
378
428
  class WarehouseOutboundTableCore extends ProfileDrivenSubTableCore {
429
+ handleChange(params) {
430
+ super.handleChange(params);
431
+ const { field, value, option, rowData } = params;
432
+ if (field !== F$3.part || isBlank$2(value) || !isPartInventoryOption(option)) return;
433
+ applyInventoryFill(rowData, option, FILL_FROM_INVENTORY_OPTION$1);
434
+ }
379
435
  }
380
436
  class PartStocktakeTableCore extends ProfileDrivenSubTableCore {
437
+ handleChange(params) {
438
+ super.handleChange(params);
439
+ const { field, value, option, rowData } = params;
440
+ if (field !== F$2.part || isBlank$2(value) || !isPartInventoryOption(option)) return;
441
+ applyInventoryFill(rowData, option, FILL_FROM_INVENTORY_OPTION);
442
+ runRowHandler(TABLE_TYPE, "stocktake-derived", {
443
+ rowData,
444
+ changedField: field
445
+ });
446
+ }
381
447
  }
382
448
  class DevicePartConsumeTableCore extends ProfileDrivenSubTableCore {
449
+ handleChange(params) {
450
+ super.handleChange(params);
451
+ const { field, value, option, rowData } = params;
452
+ if (field !== F$1.part || isBlank$2(value) || !isPartInventoryOption(option)) return;
453
+ applyInventoryFill(rowData, option, FILL_FROM_INVENTORY_OPTION$2);
454
+ }
383
455
  }
384
456
  class MaterialRequisitionTableCore extends ProfileDrivenSubTableCore {
385
457
  }
@@ -413,23 +485,20 @@ function pickInventoryBase(record) {
413
485
  function mapInventoryRecordToRow(record) {
414
486
  return {
415
487
  ...pickInventoryBase(record),
416
- [F$2.location]: record[F$2.location],
417
- [F$2.stock]: toNumber(record[F$2.stock])
488
+ [F$4.location]: record[F$4.location],
489
+ [F$4.stock]: toNumber(record[F$4.stock])
418
490
  };
419
491
  }
420
492
  function mergeInventoryByWarehouse(items) {
421
493
  const [first] = items;
422
494
  return {
423
495
  ...pickInventoryBase(first),
424
- [F$2.stock]: items.reduce((sum, item) => sum + toNumber(item[F$2.stock]), 0)
496
+ [F$4.stock]: items.reduce((sum, item) => sum + toNumber(item[F$4.stock]), 0)
425
497
  };
426
498
  }
427
499
  function buildWarehouseGroupKey(record) {
428
500
  return buildRowGroupKey(record, WAREHOUSE_IDENTITY_GROUP_KEYS);
429
501
  }
430
- function buildScanMergeKey(record) {
431
- return buildRowGroupKey(record, SCAN_MERGE_GROUP_KEYS);
432
- }
433
502
  function groupByWarehouseIdentity(records) {
434
503
  const groups = /* @__PURE__ */ new Map();
435
504
  for (const record of records) {
@@ -471,53 +540,7 @@ function buildStocktakeDerived(stocktakeNum, stockNum) {
471
540
  statusLabel: STOCKTAKE_STATUS[status]
472
541
  };
473
542
  }
474
- function groupRecordsByInventoryIdentity(records) {
475
- return Array.from(groupByWarehouseIdentity(records).values());
476
- }
477
- function dispositionScanRecord(record, visibleRows, groupByWarehouse) {
478
- if (groupByWarehouse) {
479
- const key = buildWarehouseGroupKey(record);
480
- const index = visibleRows.findIndex((row) => buildWarehouseGroupKey(row) === key);
481
- return index >= 0 ? { kind: "accumulate", index } : { kind: "unprocessed" };
482
- }
483
- const scanKey = buildScanMergeKey(record);
484
- const warehouseKey = buildWarehouseGroupKey(record);
485
- let hasWaitingRow = false;
486
- for (let i = 0; i < visibleRows.length; i++) {
487
- const row = visibleRows[i];
488
- if (buildScanMergeKey(row) === scanKey) {
489
- if (isBlank$1(row[F$2.location])) {
490
- return { kind: "skip-location-not-selected" };
491
- }
492
- return { kind: "accumulate", index: i };
493
- }
494
- if (!hasWaitingRow && buildWarehouseGroupKey(row) === warehouseKey && isBlank$1(row[F$2.location])) {
495
- hasWaitingRow = true;
496
- }
497
- }
498
- return hasWaitingRow ? { kind: "skip-location-not-selected" } : { kind: "unprocessed" };
499
- }
500
- function pickRecordsForNewScanRow(unprocessed, groupByWarehouse) {
501
- if (!unprocessed.length) {
502
- return {
503
- records: [],
504
- productGroupCount: 0
505
- };
506
- }
507
- const productGroups = groupRecordsByInventoryIdentity(unprocessed);
508
- const productRecords = productGroups[0] ?? [];
509
- if (!productRecords.length) {
510
- return {
511
- records: [],
512
- productGroupCount: productGroups.length
513
- };
514
- }
515
- return {
516
- records: groupByWarehouse || productRecords.length > 1 ? productRecords : [productRecords[0]],
517
- productGroupCount: productGroups.length
518
- };
519
- }
520
- function applyScanQtyToStocktake(current, scanQty, type) {
543
+ function applyScanQtyToStocktake(current, scanQty, type = "add") {
521
544
  if (isBlank$1(scanQty)) {
522
545
  return current;
523
546
  }
@@ -528,32 +551,20 @@ function applyScanQtyToStocktake(current, scanQty, type) {
528
551
  const base = isBlank$1(current) ? 0 : toNumber(current);
529
552
  return base + (type === "minus" ? -qtyNum : qtyNum);
530
553
  }
531
- function accumulateScanQtyOnRow(visibleRows, rowIndex, scanQty, type) {
532
- const nextRows = [...visibleRows];
533
- const caculateNum = applyScanQtyToStocktake(nextRows[rowIndex][F$2.stocktake], scanQty, type);
534
- if (toNumber(caculateNum) >= 0) {
535
- nextRows[rowIndex] = {
536
- ...nextRows[rowIndex],
537
- [F$2.stocktake]: caculateNum
538
- };
554
+ const MIN_STOCKTAKE_NUM = 0;
555
+ function getScanQtyDeductionBlockReason(current, scanQty, type = "add") {
556
+ if (type !== "minus" || isBlank$1(scanQty)) {
557
+ return void 0;
539
558
  }
540
- return {
541
- rows: nextRows,
542
- mergedIndex: rowIndex,
543
- shouldWarning: toNumber(caculateNum) < 0
544
- };
545
- }
546
- function appendScanRowFromResolve(visibleRows, rowData) {
547
- return {
548
- rows: [
549
- ...visibleRows,
550
- {
551
- ...rowData,
552
- [F$2.rowSource]: "scan"
553
- }
554
- ],
555
- mergedIndex: visibleRows.length
556
- };
559
+ const qtyNum = Number(scanQty);
560
+ if (Number.isNaN(qtyNum) || qtyNum <= 0) {
561
+ return void 0;
562
+ }
563
+ const base = isBlank$1(current) ? 0 : toNumber(current);
564
+ if (base - qtyNum >= MIN_STOCKTAKE_NUM) {
565
+ return void 0;
566
+ }
567
+ return "当前实盘数量小于本次条码扫码数量,无法扣减";
557
568
  }
558
569
  function groupInventoryToStocktakeRows(records, groupByWarehouse) {
559
570
  if (!groupByWarehouse) {
@@ -561,24 +572,6 @@ function groupInventoryToStocktakeRows(records, groupByWarehouse) {
561
572
  }
562
573
  return Array.from(groupByWarehouseIdentity(records).values()).map(mergeInventoryByWarehouse);
563
574
  }
564
- function shouldAssignScanQty(options) {
565
- const { assignScanQty, scanQty, rowIndex, qtyAssignedRowIndexes } = options;
566
- if (!assignScanQty || scanQty == null || scanQty === "") {
567
- return false;
568
- }
569
- return !qtyAssignedRowIndexes.has(rowIndex);
570
- }
571
- function resolveScanRecords(groupByWarehouse, records) {
572
- const row = { ...records[0] };
573
- if (!groupByWarehouse) {
574
- const allLocationIds = records.map((e) => e[F$2.location]);
575
- row[F$2.location] = allLocationIds.length > 1 ? void 0 : allLocationIds[0];
576
- row[F$2.inventoryLocationIds] = allLocationIds;
577
- } else {
578
- row[F$2.stock] = records.reduce((acc, cur) => acc + toNumber(cur[F$2.stock]), 0);
579
- }
580
- return row;
581
- }
582
575
  async function getStockData({
583
576
  warehouse_id_,
584
577
  material_no_,
@@ -603,6 +596,57 @@ async function getStockData({
603
596
  );
604
597
  return res || [];
605
598
  }
599
+ function isSameStocktakeIdentity(row, record, groupByWarehouse) {
600
+ if (row[F$4.product] !== record.product_id_) return false;
601
+ const rowBatch = row[F$4.batch];
602
+ const recordBatch = record.production_identification_id_;
603
+ if (rowBatch && recordBatch && rowBatch !== recordBatch) return false;
604
+ if (!rowBatch || !recordBatch) {
605
+ const rowNo = row[F$4.matno];
606
+ const recordNo = record.material_no_ ?? record.name_;
607
+ if (!(rowNo && recordNo && rowNo === recordNo)) return false;
608
+ }
609
+ if ((row[F$4.warehouse] ?? "") !== (record.warehouse_id_ ?? "")) return false;
610
+ if (!groupByWarehouse) {
611
+ if ((row[F$4.location] ?? "") !== (record.location_id_ ?? "")) return false;
612
+ }
613
+ return true;
614
+ }
615
+ function buildInventoryScanRow(record, parsed, fillData, stocktakeQty) {
616
+ const row = {
617
+ [F$4.inventory]: record.id_,
618
+ [F$4.batch]: record.production_identification_id_,
619
+ [F$4.product]: record.product_id_,
620
+ [F$4.productName]: record.product_id_name_,
621
+ [F$4.productCode]: record.product_id_code_ ?? record.product_code_,
622
+ [F$4.productSpec]: record.product_id_spec_,
623
+ [F$4.warehouse]: record.warehouse_id_,
624
+ [F$4.location]: record.location_id_,
625
+ [F$4.stock]: record.stock_num_,
626
+ [F$4.matno]: record.material_no_ ?? record.name_,
627
+ [F$4.reInspectionDate]: record.re_inspection_date_,
628
+ [F$4.stocktake]: stocktakeQty,
629
+ [F$4.rowSource]: "scan",
630
+ ...fillData
631
+ };
632
+ const validityFromRecord = record.validate_ ?? record.validity_;
633
+ if (parsed.expiration) {
634
+ row[F$4.validity] = toDateOnly(parsed.expiration);
635
+ } else if (validityFromRecord != null) {
636
+ row[F$4.validity] = toDateOnly(validityFromRecord);
637
+ }
638
+ return row;
639
+ }
640
+ function calcRowData(rowData, stocktakeNum) {
641
+ const { stock_num_, stocktake_num_ } = rowData;
642
+ const { diff, status, statusLabel } = buildStocktakeDerived(
643
+ stocktake_num_,
644
+ stock_num_
645
+ );
646
+ rowData.diff_num_ = diff;
647
+ rowData.stocktake_status_ = status;
648
+ rowData.stocktake_status__lb_ = $t(statusLabel);
649
+ }
606
650
  class StocktakeTableCore extends ProfileDrivenSubTableCore {
607
651
  initData = [];
608
652
  get isGroupByWarehouse() {
@@ -626,10 +670,10 @@ class StocktakeTableCore extends ProfileDrivenSubTableCore {
626
670
  const result = super.calcFieldStatus(params);
627
671
  const { field, rowData } = params;
628
672
  const { row_source_: source } = rowData;
629
- if (field === F$2.stocktake) return result;
630
- if (!Object.values(F$2).includes(field)) return result;
673
+ if (field === F$4.stocktake) return result;
674
+ if (!Object.values(F$4).includes(field)) return result;
631
675
  if (source === WarehouseInventoryRowSource.SCAN) {
632
- result.disabled = F$2.location !== field;
676
+ result.disabled = F$4.location !== field;
633
677
  } else if (source === WarehouseInventoryRowSource.AUTO) {
634
678
  result.disabled = true;
635
679
  } else if (!source || source === WarehouseInventoryRowSource.MANUAL) {
@@ -641,12 +685,12 @@ class StocktakeTableCore extends ProfileDrivenSubTableCore {
641
685
  }
642
686
  calcFieldQuery = (params) => {
643
687
  const { field, rowData } = params;
644
- if (field === F$2.location && rowData[F$2.inventoryLocationIds]) {
688
+ if (field === F$4.location && rowData[F$4.inventoryLocationIds]) {
645
689
  return {
646
- "id_.in": rowData[F$2.inventoryLocationIds]
690
+ "id_.in": rowData[F$4.inventoryLocationIds]
647
691
  };
648
692
  }
649
- if (field === F$2.product) {
693
+ if (field === F$4.product) {
650
694
  return {
651
695
  warehouse_id_: this.paramsWarehouseId
652
696
  };
@@ -654,7 +698,7 @@ class StocktakeTableCore extends ProfileDrivenSubTableCore {
654
698
  };
655
699
  handleFieldTd = (params) => {
656
700
  const { field, tdHandler } = params;
657
- if (field === F$2.product) {
701
+ if (field === F$4.product) {
658
702
  tdHandler.mergeTd({
659
703
  cellWidget: {
660
704
  props: {
@@ -675,7 +719,6 @@ class StocktakeTableCore extends ProfileDrivenSubTableCore {
675
719
  label: $t("sys.edhr.bizOperation")
676
720
  },
677
721
  getMenuByAction(SubTableActionEnum.SCAN),
678
- getMenuByAction(SubTableActionEnum.CHANGE_PARSE_RULE),
679
722
  {
680
723
  type: SubTableActionMenuTypeEnum.DIVIDER
681
724
  },
@@ -694,17 +737,18 @@ class StocktakeTableCore extends ProfileDrivenSubTableCore {
694
737
  return menus;
695
738
  };
696
739
  async init() {
697
- const { autoLoadStock, barcodeParsingRules } = this.bizTableConfig || {};
740
+ const config = this.bizTableConfig || {};
741
+ const { autoLoadStock, barcodeParsingRules } = config;
698
742
  if (barcodeParsingRules) {
699
- this.scanRuleProps = this.bizTableConfig.barcodeParsingRules;
743
+ this.scanRuleProps = barcodeParsingRules;
700
744
  this.scanRuleInfo = await getParseRuleInfo({ id: this.scanRuleProps.parsingRuleId });
701
745
  }
702
746
  if (this.isDataProcessed || !autoLoadStock || !this.paramsWarehouseId) return;
703
747
  const res = await getStockData({ warehouse_id_: this.paramsWarehouseId });
704
- this.initData = groupInventoryToStocktakeRows(res, this.isGroupByWarehouse).map((e) => {
705
- calcRowData(e);
706
- e.row_source_ = "auto";
707
- return e;
748
+ this.initData = groupInventoryToStocktakeRows(res, this.isGroupByWarehouse).map((e2) => {
749
+ calcRowData(e2);
750
+ e2.row_source_ = "auto";
751
+ return e2;
708
752
  });
709
753
  }
710
754
  handleInitializeFormState(_params) {
@@ -713,203 +757,96 @@ class StocktakeTableCore extends ProfileDrivenSubTableCore {
713
757
  handleChange(params) {
714
758
  super.handleChange(params);
715
759
  const { field, value, option, rowData } = params;
716
- if (field === F$2.product && option && value !== void 0 && value !== null && value !== "") {
717
- for (const { optionField, toField } of FILL_FROM_INVENTORY_OPTION$1) {
760
+ if (field === F$4.product && option && value !== void 0 && value !== null && value !== "") {
761
+ for (const { optionField, toField } of FILL_FROM_INVENTORY_OPTION$3) {
718
762
  rowData[toField] = option[optionField];
719
763
  }
720
764
  calcRowData(rowData);
721
765
  }
722
766
  }
723
- async onScan({ barcode, type }) {
724
- const { lot, materialCode, qty = 0 } = getParseRuleValue(barcode, this.scanRuleInfo.rules_);
725
- if (!lot) {
726
- this.warning({ content: "条码中未解析到批次号" });
767
+ /**
768
+ * 盘点扫码弹窗回传 { barcode, type };在此解析并走库存扫码接口
769
+ */
770
+ async onScan(input) {
771
+ const parsed = resolveScanParsedFromInput(input, this.scanRuleInfo?.rules_);
772
+ if (!parsed || !hasLotOrUniqueCode(parsed)) {
773
+ this.error({ content: SCAN_LOT_OR_UNIQUE_REQUIRED_MSG });
727
774
  return;
728
775
  }
729
- const res = await getStockData({
730
- material_no_: lot,
731
- product_code_: materialCode,
732
- warehouse_id_: this.paramsWarehouseId
733
- });
734
- if (res?.length) {
735
- const materialGroups = groupRecordsByInventoryIdentity(res);
736
- const assignScanQty = materialGroups.length === 1;
737
- const mergedIndexes = [];
738
- let totalSkippedForLocation = 0;
739
- const visibleRows = this.tableData.filter((e) => !e.deleted_);
740
- const deletedRows = this.tableData.filter((e) => e.deleted_);
741
- const warningList = [];
742
- for (let i = 0; i < materialGroups.length; i += 1) {
743
- const groupRecords = materialGroups[i];
744
- const result = processScanRecordGroup({
745
- groupRecords,
746
- visibleRows,
747
- groupByWarehouse: this.isGroupByWarehouse,
748
- scanQty: qty || 1,
749
- scanAdjustType: type,
750
- assignScanQty
751
- });
752
- this.tableData = [...result.rows, ...deletedRows];
753
- mergedIndexes.push(...result.mergedIndexes);
754
- totalSkippedForLocation += result.skippedForLocation;
755
- warningList.push(...result.messageList);
756
- }
757
- if (totalSkippedForLocation > 0) {
758
- this.warning({
759
- content: totalSkippedForLocation === 1 ? "相同物料行尚未选择库位,已忽略 1 条扫码数据" : `相同物料行尚未选择库位,已忽略 ${totalSkippedForLocation} 条扫码数据`
760
- });
761
- }
762
- if (warningList.length) {
763
- warningList.forEach((e) => {
764
- this.warning({ content: e });
765
- });
766
- }
767
- if (!mergedIndexes.length) {
768
- if (totalSkippedForLocation === 0) {
769
- this.error({ content: "扫描结果解析失败" });
770
- }
771
- return;
772
- }
776
+ const records = await matchInventoryScanRecords(parsed, this.paramsWarehouseId);
777
+ if (!records.length) {
778
+ this.error({ content: SCAN_NOT_FOUND_MSG$2 });
779
+ return;
773
780
  }
774
- }
775
- }
776
- function calcRowData(rowData, stocktakeNum) {
777
- const { stock_num_, stocktake_num_ } = rowData;
778
- const { diff, status, statusLabel } = buildStocktakeDerived(
779
- stocktake_num_,
780
- stock_num_
781
- );
782
- rowData.diff_num_ = diff;
783
- rowData.stocktake_status_ = status;
784
- rowData.stocktake_status__lb_ = $t(statusLabel);
785
- }
786
- function processScanRecordGroup(options) {
787
- const { groupRecords, groupByWarehouse, scanQty, scanAdjustType, assignScanQty } = options;
788
- let visibleRows = options.visibleRows;
789
- const mergedIndexes = [];
790
- const unprocessed = [];
791
- let skippedForLocation = 0;
792
- let accumulated = 0;
793
- const qtyAssignedRowIndexes = /* @__PURE__ */ new Set();
794
- const messageList = [];
795
- for (const record of groupRecords) {
796
- const disposition = dispositionScanRecord(record, visibleRows, groupByWarehouse);
797
- if (disposition.kind === "accumulate") {
798
- accumulated += 1;
799
- const qtyCheck = {
800
- assignScanQty,
781
+ const selected = await this.pickScanRecord(records);
782
+ if (!selected) return;
783
+ const scanAdjustType = resolveScanAdjustType(input);
784
+ const scanQty = resolveScanQty(parsed.qty, selected.qty_);
785
+ const fillData = this.scanRuleProps?.fillMapArr?.length && parsed ? calcFillData(parsed, this.scanRuleProps.fillMapArr) : {};
786
+ const visibleRows = this.showTableData;
787
+ const deletedRows = this.tableData.filter((e2) => e2.deleted_);
788
+ const existIndex = visibleRows.findIndex(
789
+ (row2) => isSameStocktakeIdentity(row2, selected, this.isGroupByWarehouse)
790
+ );
791
+ if (existIndex >= 0) {
792
+ const existRow = visibleRows[existIndex];
793
+ const blockReason = getScanQtyDeductionBlockReason(
794
+ existRow[F$4.stocktake],
801
795
  scanQty,
802
- rowIndex: disposition.index,
803
- qtyAssignedRowIndexes
804
- };
805
- const shouldAddQty = shouldAssignScanQty(qtyCheck);
806
- const result = accumulateScanQtyOnRow(
807
- visibleRows,
808
- disposition.index,
809
- shouldAddQty ? scanQty : void 0,
810
796
  scanAdjustType
811
797
  );
812
- if (result.shouldWarning) {
813
- messageList.push($t("sys.edhr.stocktakeScanWarning"));
814
- }
815
- if (shouldAddQty) {
816
- qtyAssignedRowIndexes.add(disposition.index);
817
- }
818
- calcRowData(result.rows[disposition.index]);
819
- visibleRows = result.rows;
820
- if (!mergedIndexes.includes(result.mergedIndex)) {
821
- mergedIndexes.push(result.mergedIndex);
798
+ if (blockReason) {
799
+ this.error({ content: blockReason });
800
+ return;
822
801
  }
823
- continue;
824
- }
825
- if (disposition.kind === "skip-location-not-selected") {
826
- skippedForLocation += 1;
827
- continue;
828
- }
829
- unprocessed.push(record);
830
- }
831
- const appended = appendUnresolvedScanRecords({
832
- unprocessed,
833
- visibleRows,
834
- groupByWarehouse,
835
- scanQty,
836
- scanAdjustType,
837
- assignScanQty: assignScanQty && mergedIndexes.length === 0
838
- });
839
- visibleRows = appended.rows;
840
- const appendedCount = appended.mergedIndex != null ? 1 : 0;
841
- if (appended.mergedIndex != null) {
842
- mergedIndexes.push(appended.mergedIndex);
843
- }
844
- const stats = {
845
- total: groupRecords.length,
846
- accumulated,
847
- skipped: skippedForLocation,
848
- unprocessed: unprocessed.length,
849
- appended: appendedCount
850
- };
851
- return { rows: visibleRows, mergedIndexes, skippedForLocation, stats, messageList };
852
- }
853
- function appendUnresolvedScanRecords(options) {
854
- const { unprocessed, visibleRows, groupByWarehouse, scanQty, scanAdjustType, assignScanQty } = options;
855
- if (!unprocessed.length) return { rows: visibleRows };
856
- const { records: recordsForNewRow, productGroupCount } = pickRecordsForNewScanRow(
857
- unprocessed,
858
- groupByWarehouse
859
- );
860
- if (!recordsForNewRow.length) return { rows: visibleRows };
861
- const rowData = buildRowFromResolve(
862
- resolveScanRecords(groupByWarehouse, recordsForNewRow),
863
- scanQty,
864
- assignScanQty,
865
- scanAdjustType
866
- );
867
- calcRowData(rowData);
868
- const appended = appendScanRowFromResolve(visibleRows, rowData);
869
- return {
870
- rows: appended.rows,
871
- mergedIndex: appended.mergedIndex,
872
- appendMeta: {
873
- unprocessedCount: unprocessed.length,
874
- productGroupCount,
875
- usedForNewRow: recordsForNewRow.length,
876
- multiLocationPending: !groupByWarehouse && recordsForNewRow.length > 1
802
+ existRow[F$4.stocktake] = applyScanQtyToStocktake(
803
+ existRow[F$4.stocktake],
804
+ scanQty,
805
+ scanAdjustType
806
+ );
807
+ calcRowData(existRow);
808
+ this.tableData = [...visibleRows, ...deletedRows];
809
+ return;
877
810
  }
811
+ const stocktakeQty = applyScanQtyToStocktake(void 0, scanQty, scanAdjustType);
812
+ const row = buildInventoryScanRow(selected, parsed, fillData, stocktakeQty);
813
+ calcRowData(row);
814
+ this.tableData = [...visibleRows, row, ...deletedRows];
815
+ }
816
+ }
817
+ function resolveScanParsedFromInput(input, rules) {
818
+ if (input.parsedValue && typeof input.parsedValue === "object") {
819
+ return input.parsedValue;
820
+ }
821
+ const raw = input.barcode ?? input.str;
822
+ if (!raw || !rules) return void 0;
823
+ return getParseRuleValue(raw, rules);
824
+ }
825
+ function buildAllocateScanRow(record, parsed, fillData) {
826
+ const row = {
827
+ [F$5.inventory]: record.id_,
828
+ [F$5.product]: record.product_id_,
829
+ [F$5.productName]: record.product_id_name_,
830
+ [F$5.productCode]: record.product_id_code_,
831
+ [F$5.productSpec]: record.product_id_spec_,
832
+ [F$5.batch]: record.production_identification_id_,
833
+ [F$5.originLocation]: record.location_id_,
834
+ [F$5.originWarehouse]: record.warehouse_id_,
835
+ [F$5.stock]: record.stock_num_,
836
+ [F$5.mfgOrder]: record.mfg_order_id_,
837
+ [F$5.lotSn]: record.lot_sn_id_,
838
+ [F$5.uniqueCode]: record.unique_code_,
839
+ [F$5.reInspectionDate]: record.re_inspection_date_,
840
+ [F$5.allocateNum]: resolveScanQty(parsed.qty, record.qty_),
841
+ ...fillData
878
842
  };
879
- }
880
- function buildRowFromResolve(row, scanQty, assignScanQty = false, scanAdjustType = "add") {
881
- const rowData = {
882
- ...row,
883
- [F$2.rowSource]: "scan"
884
- };
885
- if (assignScanQty && scanQty != null && scanQty !== "") {
886
- rowData[F$2.stocktake] = applyScanQtyToStocktake(void 0, scanQty, scanAdjustType);
843
+ const validityFromRecord = record.validate_ ?? record.validity_;
844
+ if (parsed.expiration) {
845
+ row[F$5.validity] = toDateOnly(parsed.expiration);
846
+ } else if (validityFromRecord != null) {
847
+ row[F$5.validity] = toDateOnly(validityFromRecord);
887
848
  }
888
- return rowData;
889
- }
890
- async function fetchInventoryInfo({
891
- warehouse_id_,
892
- material_no_,
893
- location_id_,
894
- product_code_,
895
- production_identification_id_
896
- }) {
897
- const res = await api.apaas.modelComprehensive.postBizServiceGeneralModelCategoryModelKeyBsKey(
898
- {
899
- modelCategory: "entity",
900
- bsKey: "biz_get_inventory_info",
901
- modelKey: "em_inventory"
902
- },
903
- {},
904
- {
905
- warehouse_id_,
906
- material_no_,
907
- location_id_,
908
- product_code_,
909
- production_identification_id_
910
- }
911
- );
912
- return res || [];
849
+ return row;
913
850
  }
914
851
  class AllocateTableCore extends ProfileDrivenSubTableCore {
915
852
  /** 绘制UI相关工具 */
@@ -926,7 +863,7 @@ class AllocateTableCore extends ProfileDrivenSubTableCore {
926
863
  }
927
864
  handleFieldTd = (params) => {
928
865
  const { field, tdHandler } = params;
929
- if (field === F$3.product) {
866
+ if (field === F$5.product) {
930
867
  tdHandler.mergeTd({
931
868
  cellWidget: {
932
869
  props: {
@@ -942,17 +879,17 @@ class AllocateTableCore extends ProfileDrivenSubTableCore {
942
879
  };
943
880
  calcFieldQuery = (params) => {
944
881
  const { field, rowData } = params;
945
- if (field === F$3.location) {
882
+ if (field === F$5.location) {
946
883
  return {
947
- "warehouse_id_.eq": rowData[F$3.warehouse]
884
+ "warehouse_id_.eq": rowData[F$5.warehouse]
948
885
  };
949
886
  }
950
- if (field === F$3.originLocation) {
887
+ if (field === F$5.originLocation) {
951
888
  return {
952
- "warehouse_id_.eq": rowData[F$3.originWarehouse]
889
+ "warehouse_id_.eq": rowData[F$5.originWarehouse]
953
890
  };
954
891
  }
955
- if (field === F$3.product) {
892
+ if (field === F$5.product) {
956
893
  return {
957
894
  warehouse_id_: this.warehouseId
958
895
  };
@@ -960,7 +897,19 @@ class AllocateTableCore extends ProfileDrivenSubTableCore {
960
897
  };
961
898
  calcSubTableActionMenu = (params) => {
962
899
  const { showDelBtn } = params;
963
- const menus = [
900
+ return [
901
+ {
902
+ type: SubTableActionMenuTypeEnum.SUBTITLE,
903
+ label: $t("sys.edhr.bizOperation")
904
+ },
905
+ getMenuByAction(SubTableActionEnum.SCAN),
906
+ {
907
+ type: SubTableActionMenuTypeEnum.DIVIDER
908
+ },
909
+ {
910
+ type: SubTableActionMenuTypeEnum.SUBTITLE,
911
+ label: $t("sys.edhr.editRow")
912
+ },
964
913
  getMenuByAction(SubTableActionEnum.Insert1RowAfter),
965
914
  getCopySubMenu(),
966
915
  getInsertSubMenu(),
@@ -971,55 +920,32 @@ class AllocateTableCore extends ProfileDrivenSubTableCore {
971
920
  getMenuByAction(SubTableActionEnum.DeleteRowCurrent)
972
921
  ] : []
973
922
  ].filter(Boolean);
974
- return menus;
975
923
  };
976
924
  handleChange(params) {
977
925
  super.handleChange(params);
978
926
  const { field, value, option, rowData } = params;
979
- if (field !== F$3.product || !option || value === void 0 || value === null || value === "") {
927
+ if (field !== F$5.product || !option || value === void 0 || value === null || value === "") {
980
928
  return;
981
929
  }
982
- for (const { optionField, toField } of FILL_FROM_INVENTORY_OPTION$2) {
930
+ for (const { optionField, toField } of FILL_FROM_INVENTORY_OPTION$4) {
983
931
  rowData[toField] = option[optionField];
984
932
  }
985
933
  }
986
- async onScan({ str }) {
987
- const data = getParseRuleValue(str, this.scanRuleInfo.rules_);
988
- console.log("parseScanStr", data);
989
- const arr = await fetchInventoryInfo({
990
- warehouse_id_: this.warehouseId,
991
- product_code_: data.materialCode
992
- });
993
- if (!arr?.length) {
994
- this.error({ content: "扫描的物料不存在" });
934
+ async onScan(input) {
935
+ const parsed = resolveScanParsedValue(input);
936
+ if (!parsed || !hasLotOrUniqueCode(parsed)) {
937
+ this.error({ content: SCAN_LOT_OR_UNIQUE_REQUIRED_MSG });
995
938
  return;
996
939
  }
997
- const info = arr[0];
998
- const row = {
999
- product_id_: info.product_id_,
1000
- product_id_name_: info.product_id_name_,
1001
- product_id_code_: info.product_id_code_,
1002
- product_id_spec_: info.product_id_spec_,
1003
- production_identification_id_: info.production_identification_id_,
1004
- origin_location_id_: info.location_id_,
1005
- origin_warehouse_id_: info.warehouse_id_,
1006
- stock_num_: info.stock_num_,
1007
- inventory_id_: info.id_,
1008
- mfg_order_id_: info.mfg_order_id_,
1009
- lot_sn_id_: info.lot_sn_id_,
1010
- re_inspection_date_: info.re_inspection_date_
1011
- };
1012
- if (data.expiration) {
1013
- row.validity_ = dayjs(data.expiration).format("YYYY-MM-DD");
1014
- } else if (info.validate_) {
1015
- row.validity_ = info.validate_;
1016
- }
1017
- if (this.scanRuleProps?.fillMapArr?.length) {
1018
- const fillData = calcFillData(data, this.scanRuleProps.fillMapArr);
1019
- console.log("fillData", fillData);
1020
- Object.assign(row, fillData);
940
+ const records = await matchInventoryScanRecords(parsed, this.warehouseId);
941
+ if (!records.length) {
942
+ this.error({ content: SCAN_NOT_FOUND_MSG$2 });
943
+ return;
1021
944
  }
1022
- this.tableData = [...this.tableData, row];
945
+ const selected = await this.pickScanRecord(records);
946
+ if (!selected) return;
947
+ const row = buildAllocateScanRow(selected, parsed, resolveScanFillData(input));
948
+ this.tableData = [...this.showTableData, row];
1023
949
  }
1024
950
  beforeBtnClick = async (params) => {
1025
951
  const { btn } = params;
@@ -1119,49 +1045,40 @@ const fillFromOption = [
1119
1045
  toField: F3.qty
1120
1046
  }
1121
1047
  ];
1122
- function applyFillFromOption(A, B4) {
1123
- const writableA = A;
1048
+ function applyFillFromOption(A2, B4) {
1049
+ const writableA = A2;
1124
1050
  fillFromOption.forEach(({ optionField, toField }) => {
1125
1051
  if (has(B4, optionField)) {
1126
1052
  writableA[toField] = B4[optionField];
1127
1053
  }
1128
1054
  });
1129
- return A;
1055
+ return A2;
1130
1056
  }
1131
1057
  function mapContainerRowsToOptions(data = []) {
1132
1058
  return data.map((item) => ({
1133
- label: item.__LABEL__ ?? item.name_ ?? String(item.id_ ?? item.id ?? ""),
1059
+ label: resolveLotDisplayLabel(item, item.name_),
1134
1060
  value: item.id_ || item.id,
1135
1061
  disabled: !!item.deleted_,
1136
1062
  _item: item
1137
1063
  }));
1138
1064
  }
1139
- async function fetchProductionContainerByName$1(name_) {
1140
- const res = await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
1141
- {
1142
- modelCategory: "entity",
1143
- modelKey: "em_production_identification",
1144
- bsKey: "biz_get_production_identification"
1145
- },
1146
- {},
1147
- {
1148
- query: { "production_identification_type_.in": ["LOT", "SN"], name_ },
1149
- exp: "AND(production_identification_type_.in,name_)"
1150
- }
1151
- );
1152
- return normalizeContainerResult$1(res);
1153
- }
1154
- function normalizeContainerResult$1(res) {
1155
- if (!res) return void 0;
1156
- const data = res?.data ?? res;
1157
- if (Array.isArray(data)) return data[0];
1158
- if (typeof data === "object") return data;
1159
- return void 0;
1065
+ const SCAN_NOT_FOUND_MSG$1 = "扫描的物料批次不存在";
1066
+ function buildEntrustScanRow(record, parsed, fillData) {
1067
+ return {
1068
+ [F3.productionContainer]: record.lot_sn_id_ ?? record.production_container_id_,
1069
+ [F3.product]: record.product_id_,
1070
+ [F3.productName]: record.product_id_name_,
1071
+ [F3.productCode]: record.product_id_code_,
1072
+ [F3.productSpec]: record.product_id_spec_,
1073
+ [F3.mfgOrderCode]: record.mfg_order_code_,
1074
+ [F3.mfgOrder]: record.mfg_order_id_,
1075
+ [F3.qty]: parsed.qty ?? record.qty_,
1076
+ [F3.productionDate]: toDateOnly(record.production_date_),
1077
+ ...fillData
1078
+ };
1160
1079
  }
1161
1080
  class SterilizeBatchTableCore extends SubTableCore {
1162
- /** 触发扫码时的目标行 */
1163
- scanTargetRow;
1164
- /** 绘制UI相关工具,一期复用调拨表扫码弹窗 */
1081
+ /** 绘制UI相关工具,复用调拨表扫码弹窗 */
1165
1082
  get render() {
1166
1083
  return window.NocodeAdapter.allocateRender;
1167
1084
  }
@@ -1179,16 +1096,14 @@ class SterilizeBatchTableCore extends SubTableCore {
1179
1096
  calcSubTableActionMenu = (params) => {
1180
1097
  const { showDelBtn } = params;
1181
1098
  return [
1182
- // 一期暂不支持扫码
1183
- // {
1184
- // type: SubTableActionMenuTypeEnum.SUBTITLE,
1185
- // label: $t('sys.edhr.bizOperation'),
1186
- // },
1187
- // getMenuByAction(SubTableActionEnum.SCAN),
1188
- // getMenuByAction(SubTableActionEnum.CHANGE_PARSE_RULE),
1189
- // {
1190
- // type: SubTableActionMenuTypeEnum.DIVIDER,
1191
- // },
1099
+ {
1100
+ type: SubTableActionMenuTypeEnum.SUBTITLE,
1101
+ label: $t("sys.edhr.bizOperation")
1102
+ },
1103
+ getMenuByAction(SubTableActionEnum.SCAN),
1104
+ {
1105
+ type: SubTableActionMenuTypeEnum.DIVIDER
1106
+ },
1192
1107
  {
1193
1108
  type: SubTableActionMenuTypeEnum.SUBTITLE,
1194
1109
  label: $t("sys.edhr.editRow")
@@ -1203,17 +1118,6 @@ class SterilizeBatchTableCore extends SubTableCore {
1203
1118
  ] : []
1204
1119
  ].filter(Boolean);
1205
1120
  };
1206
- handleMenuClick(params) {
1207
- const { actionKey, rowData } = params;
1208
- if (actionKey === SubTableActionEnum.SCAN) {
1209
- this.scanTargetRow = rowData;
1210
- this.openScanModal();
1211
- return;
1212
- }
1213
- if (actionKey === SubTableActionEnum.CHANGE_PARSE_RULE) {
1214
- this.changeScanRule();
1215
- }
1216
- }
1217
1121
  handleFieldTd = (params) => {
1218
1122
  const { field, tdHandler } = params;
1219
1123
  if (field === F3.productionContainer) {
@@ -1222,7 +1126,6 @@ class SterilizeBatchTableCore extends SubTableCore {
1222
1126
  props: {
1223
1127
  newSpecificConfig: {
1224
1128
  newOptions: []
1225
- // 禁用初始选项,数据源完全由 customLoader 提供
1226
1129
  }
1227
1130
  }
1228
1131
  }
@@ -1241,18 +1144,28 @@ class SterilizeBatchTableCore extends SubTableCore {
1241
1144
  const { field } = params;
1242
1145
  if (field !== F3.productionContainer) return;
1243
1146
  const loader = async (loaderParams) => {
1244
- const { mode, queryData = {}, pageNo = 1, pageSize = 100, ids = [] } = loaderParams;
1147
+ const { mode, queryData = {}, exp, pageNo = 1, pageSize = 100, ids = [] } = loaderParams;
1148
+ let resolvedExp = exp;
1245
1149
  const query = {
1246
1150
  ...queryData,
1247
1151
  is_rework_: 0,
1248
- "production_identification_type_.in": ["LOT", "SN"]
1152
+ "production_identification_type_.in": ["LOT", "SN"],
1153
+ "container_role_.ne": LOT_CONTAINER_ROLE.RELATED_PARENT
1249
1154
  };
1250
1155
  if (mode === "byIds" && ids.length) {
1251
1156
  query["id_.in"] = ids;
1252
1157
  } else {
1253
1158
  const keyword = extractKeywordFromQueryData(queryData);
1254
- if (keyword && !query["name_.like"] && !query["name_.iLike"]) {
1255
- query["name_.like"] = keyword;
1159
+ if (keyword) {
1160
+ if (!query["name_.like"] && !query["name_.iLike"]) {
1161
+ query["name_.like"] = keyword;
1162
+ }
1163
+ if (!query["related_parent_name_.like"] && !query["related_parent_name_.iLike"]) {
1164
+ query["related_parent_name_.like"] = keyword;
1165
+ }
1166
+ if (!resolvedExp && (query["name_.like"] || query["name_.iLike"]) && (query["related_parent_name_.like"] || query["related_parent_name_.iLike"])) {
1167
+ resolvedExp = "OR(name_.like,related_parent_name_.like)";
1168
+ }
1256
1169
  }
1257
1170
  }
1258
1171
  const res = await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
@@ -1263,6 +1176,7 @@ class SterilizeBatchTableCore extends SubTableCore {
1263
1176
  },
1264
1177
  {},
1265
1178
  {
1179
+ exp: resolvedExp,
1266
1180
  query,
1267
1181
  pageNo,
1268
1182
  pageSize,
@@ -1270,11 +1184,14 @@ class SterilizeBatchTableCore extends SubTableCore {
1270
1184
  }
1271
1185
  );
1272
1186
  const data = res?.data || [];
1187
+ const dict = res?.dict;
1273
1188
  const totalCount = Number(res?.totalCount ?? data.length);
1274
1189
  const totalPage = Number(res?.totalPage ?? Math.max(1, Math.ceil(totalCount / pageSize)));
1275
1190
  const options = mapContainerRowsToOptions(data);
1276
1191
  if (mode === "byIds") {
1277
1192
  return {
1193
+ data,
1194
+ dict,
1278
1195
  options,
1279
1196
  finished: true,
1280
1197
  totalCount
@@ -1282,6 +1199,7 @@ class SterilizeBatchTableCore extends SubTableCore {
1282
1199
  }
1283
1200
  return {
1284
1201
  data,
1202
+ dict,
1285
1203
  options,
1286
1204
  finished: pageNo >= totalPage,
1287
1205
  totalCount,
@@ -1294,7 +1212,6 @@ class SterilizeBatchTableCore extends SubTableCore {
1294
1212
  const { field, option, value, rowData } = params;
1295
1213
  if (field !== F3.productionContainer) return;
1296
1214
  if (option) {
1297
- console.log(option);
1298
1215
  applyFillFromOption(rowData, option);
1299
1216
  return;
1300
1217
  }
@@ -1304,36 +1221,26 @@ class SterilizeBatchTableCore extends SubTableCore {
1304
1221
  });
1305
1222
  }
1306
1223
  };
1307
- async onScan({ str }) {
1308
- if (!this.scanRuleInfo) {
1309
- this.error({ content: $t("sys.edhr.mcTable.scanRuleNotFound") });
1224
+ async onScan(input) {
1225
+ const parsed = resolveScanParsedValue(input);
1226
+ if (!parsed || !hasProductionIdentificationScanKey(parsed)) {
1227
+ this.error({ content: PRODUCTION_IDENTIFICATION_SCAN_LOT_OR_UNIQUE_REQUIRED_MSG });
1310
1228
  return;
1311
1229
  }
1312
- const data = getParseRuleValue(str, this.scanRuleInfo.rules_);
1313
- const name = data.lot;
1314
- if (!name) {
1315
- this.warning({ content: "条码中未解析到批次号/SN" });
1316
- return;
1317
- }
1318
- let containerInfo;
1319
- try {
1320
- containerInfo = await fetchProductionContainerByName$1(name);
1321
- console.log(this.scanTargetRo);
1322
- } catch {
1323
- this.error({ content: "查询生产批次失败" });
1230
+ const records = await matchProductionIdentificationScanRecords(parsed);
1231
+ if (!records.length) {
1232
+ this.error({ content: SCAN_NOT_FOUND_MSG$1 });
1324
1233
  return;
1325
1234
  }
1326
- if (!containerInfo) {
1327
- this.error({ content: "未查询到匹配的生产批次" });
1328
- return;
1329
- }
1330
- const merged = { ...data, ...containerInfo };
1331
- this.tableData = [...this.showTableData, applyFillFromOption({}, merged)];
1235
+ const selected = await this.pickScanRecord(records);
1236
+ if (!selected) return;
1237
+ const row = buildEntrustScanRow(selected, parsed, resolveScanFillData(input));
1238
+ this.tableData = [...this.showTableData, row];
1332
1239
  }
1333
1240
  }
1334
- function mapRefRowsToOptions(data = [], labelKey = "name_") {
1241
+ function mapRefRowsToOptions(data = [], labelKey = "name_", displayRelatedParent = false) {
1335
1242
  return data.map((item) => ({
1336
- label: item.__LABEL__ ?? item[labelKey] ?? String(item.id_ ?? item.id ?? ""),
1243
+ label: displayRelatedParent ? resolveLotDisplayLabel(item, item[labelKey]) : item.__LABEL__ ?? item[labelKey] ?? String(item.id_ ?? item.id ?? ""),
1337
1244
  value: item.id_ || item.id,
1338
1245
  disabled: !!item.deleted_,
1339
1246
  _item: item
@@ -1341,18 +1248,28 @@ function mapRefRowsToOptions(data = [], labelKey = "name_") {
1341
1248
  }
1342
1249
  function createProductionContainerLoader() {
1343
1250
  return async (loaderParams) => {
1344
- const { mode, queryData = {}, pageNo = 1, pageSize = 100, ids = [] } = loaderParams;
1251
+ const { mode, queryData = {}, exp, pageNo = 1, pageSize = 100, ids = [] } = loaderParams;
1252
+ let resolvedExp = exp;
1345
1253
  const query = {
1346
1254
  ...queryData,
1347
1255
  is_rework_: 0,
1348
- "production_identification_type_.in": ["LOT", "SN"]
1256
+ "production_identification_type_.in": ["LOT", "SN"],
1257
+ "container_role_.ne": LOT_CONTAINER_ROLE.RELATED_PARENT
1349
1258
  };
1350
1259
  if (mode === "byIds" && ids.length) {
1351
1260
  query["id_.in"] = ids;
1352
1261
  } else {
1353
1262
  const keyword = extractKeywordFromQueryData(queryData);
1354
- if (keyword && !query["name_.like"] && !query["name_.iLike"]) {
1355
- query["name_.like"] = keyword;
1263
+ if (keyword) {
1264
+ if (!query["name_.like"] && !query["name_.iLike"]) {
1265
+ query["name_.like"] = keyword;
1266
+ }
1267
+ if (!query["related_parent_name_.like"] && !query["related_parent_name_.iLike"]) {
1268
+ query["related_parent_name_.like"] = keyword;
1269
+ }
1270
+ if (!resolvedExp && (query["name_.like"] || query["name_.iLike"]) && (query["related_parent_name_.like"] || query["related_parent_name_.iLike"])) {
1271
+ resolvedExp = "OR(name_.like,related_parent_name_.like)";
1272
+ }
1356
1273
  }
1357
1274
  }
1358
1275
  const res = await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
@@ -1363,6 +1280,7 @@ function createProductionContainerLoader() {
1363
1280
  },
1364
1281
  {},
1365
1282
  {
1283
+ exp: resolvedExp,
1366
1284
  query,
1367
1285
  pageNo,
1368
1286
  pageSize,
@@ -1370,11 +1288,14 @@ function createProductionContainerLoader() {
1370
1288
  }
1371
1289
  );
1372
1290
  const data = res?.data || [];
1291
+ const dict = res?.dict;
1373
1292
  const totalCount = Number(res?.totalCount ?? data.length);
1374
1293
  const totalPage = Number(res?.totalPage ?? Math.max(1, Math.ceil(totalCount / pageSize)));
1375
- const options = mapRefRowsToOptions(data);
1294
+ const options = mapRefRowsToOptions(data, "name_", true);
1376
1295
  if (mode === "byIds") {
1377
1296
  return {
1297
+ data,
1298
+ dict,
1378
1299
  options,
1379
1300
  finished: true,
1380
1301
  totalCount
@@ -1382,6 +1303,7 @@ function createProductionContainerLoader() {
1382
1303
  }
1383
1304
  return {
1384
1305
  data,
1306
+ dict,
1385
1307
  options,
1386
1308
  finished: pageNo >= totalPage,
1387
1309
  totalCount,
@@ -1488,35 +1410,47 @@ function createMaterialContainerLoader() {
1488
1410
  };
1489
1411
  };
1490
1412
  }
1491
- async function fetchProductionContainerByName(name_) {
1492
- const res = await api.apaas.modelComprehensive.postBizServiceGeneralModelCategoryModelKeyBsKey(
1493
- {
1494
- modelCategory: "entity",
1495
- modelKey: "em_production_identification",
1496
- bsKey: "biz_get_production_identification"
1497
- },
1498
- {},
1499
- {
1500
- query: { "production_identification_type_.in": ["LOT", "SN"], name_ },
1501
- exp: "AND(production_identification_type_.in,name_)"
1502
- }
1503
- );
1504
- return normalizeContainerResult(res);
1505
- }
1506
- function normalizeContainerResult(res) {
1507
- if (!res) return void 0;
1508
- const data = res?.data ?? res;
1509
- if (Array.isArray(data)) return data[0];
1510
- if (typeof data === "object") return data;
1511
- return void 0;
1512
- }
1513
1413
  function isBlank(value) {
1514
1414
  return value === void 0 || value === null || value === "";
1515
1415
  }
1416
+ const SCAN_NOT_FOUND_MSG = "扫描的批次/物料不存在";
1417
+ function isProductionLotOrSn(record) {
1418
+ const type = record.production_identification_type_;
1419
+ return type === "LOT" || type === "SN";
1420
+ }
1421
+ function buildProductionContainerRow(record, parsed, fillData) {
1422
+ return {
1423
+ [F$6.productionContainer]: record.lot_sn_id_ ?? record.production_container_id_,
1424
+ [F$6.product]: record.product_id_,
1425
+ [F$6.productName]: record.product_id_name_,
1426
+ [F$6.productCode]: record.product_id_code_,
1427
+ [F$6.productSpec]: record.product_id_spec_,
1428
+ [F$6.mfgOrderCode]: record.mfg_order_code_,
1429
+ [F$6.qty]: parsed.qty ?? record.qty_,
1430
+ [F$6.productionDate]: toDateOnly(record.production_date_),
1431
+ [F$6.materialContainerNo]: void 0,
1432
+ [MATERIAL_CONTAINER_ID]: void 0,
1433
+ [F$6.mfgOrder]: void 0,
1434
+ ...fillData
1435
+ };
1436
+ }
1437
+ function buildMaterialContainerRow(record, parsed, fillData) {
1438
+ return {
1439
+ [F$6.materialContainerNo]: record.material_no_,
1440
+ [MATERIAL_CONTAINER_ID]: record.production_identification_id_,
1441
+ [F$6.product]: record.product_id_,
1442
+ [F$6.productName]: record.product_id_name_,
1443
+ [F$6.productCode]: record.product_id_code_,
1444
+ [F$6.productSpec]: record.product_id_spec_,
1445
+ [F$6.mfgOrderCode]: record.mfg_order_code_,
1446
+ [F$6.mfgOrder]: record.mfg_order_id_,
1447
+ [F$6.qty]: parsed.qty ?? record.qty_,
1448
+ [F$6.productionContainer]: void 0,
1449
+ ...fillData
1450
+ };
1451
+ }
1516
1452
  class PretreatmentListTableCore extends ProfileDrivenSubTableCore {
1517
- /** 触发扫码时的目标行 */
1518
- scanTargetRow;
1519
- /** 绘制UI相关工具,一期复用调拨表扫码弹窗 */
1453
+ /** 绘制UI相关工具,复用调拨表扫码弹窗 */
1520
1454
  get render() {
1521
1455
  return window.NocodeAdapter.allocateRender;
1522
1456
  }
@@ -1534,6 +1468,14 @@ class PretreatmentListTableCore extends ProfileDrivenSubTableCore {
1534
1468
  calcSubTableActionMenu = (params) => {
1535
1469
  const { showDelBtn } = params;
1536
1470
  return [
1471
+ {
1472
+ type: SubTableActionMenuTypeEnum.SUBTITLE,
1473
+ label: $t("sys.edhr.bizOperation")
1474
+ },
1475
+ getMenuByAction(SubTableActionEnum.SCAN),
1476
+ {
1477
+ type: SubTableActionMenuTypeEnum.DIVIDER
1478
+ },
1537
1479
  {
1538
1480
  type: SubTableActionMenuTypeEnum.SUBTITLE,
1539
1481
  label: $t("sys.edhr.editRow")
@@ -1548,79 +1490,246 @@ class PretreatmentListTableCore extends ProfileDrivenSubTableCore {
1548
1490
  ] : []
1549
1491
  ].filter(Boolean);
1550
1492
  };
1551
- handleMenuClick(params) {
1552
- const { actionKey, rowData } = params;
1553
- if (actionKey === SubTableActionEnum.SCAN) {
1554
- this.scanTargetRow = rowData;
1555
- this.openScanModal();
1556
- return;
1557
- }
1558
- if (actionKey === SubTableActionEnum.CHANGE_PARSE_RULE) {
1559
- this.changeScanRule();
1560
- }
1561
- }
1562
1493
  calcFieldStatus(params) {
1563
1494
  const result = super.calcFieldStatus(params);
1564
1495
  const { field, rowData } = params;
1565
- if (field === F$4.product) {
1496
+ if (field === F$6.product) {
1566
1497
  result.disabled = !isProductManuallyEditable(rowData);
1567
1498
  }
1568
1499
  return result;
1569
1500
  }
1570
1501
  calcFieldDataSource = (params) => {
1571
1502
  const { field } = params;
1572
- if (field === F$4.productionContainer) return createProductionContainerLoader();
1573
- if (field === F$4.mfgOrder) return createMfgOrderLoader();
1574
- if (field === F$4.materialContainerNo) return createMaterialContainerLoader();
1503
+ if (field === F$6.productionContainer) return createProductionContainerLoader();
1504
+ if (field === F$6.mfgOrder) return createMfgOrderLoader();
1505
+ if (field === F$6.materialContainerNo) return createMaterialContainerLoader();
1575
1506
  };
1576
1507
  handleChange(params) {
1577
1508
  super.handleChange(params);
1578
1509
  const { field, option, value, rowData } = params;
1579
1510
  if (!option || isBlank(value)) return;
1580
1511
  const source = option._item ?? option;
1581
- if (field === F$4.mfgOrder) {
1512
+ if (field === F$6.mfgOrder) {
1582
1513
  applyFillFromMfgOrderOption(rowData, source);
1583
1514
  return;
1584
1515
  }
1585
- if (field === F$4.productionContainer || field === F$4.materialContainerNo) {
1516
+ if (field === F$6.productionContainer || field === F$6.materialContainerNo) {
1586
1517
  applyFillFromOption$1(rowData, source);
1587
1518
  return;
1588
1519
  }
1589
- if (field === F$4.product) {
1520
+ if (field === F$6.product) {
1590
1521
  applyFillFromProductOption(rowData, source);
1591
1522
  }
1592
1523
  }
1593
- async onScan({ str }) {
1594
- if (!this.scanRuleInfo) {
1595
- this.error({ content: $t("sys.edhr.mcTable.scanRuleNotFound") });
1524
+ async onScan(input) {
1525
+ const parsed = resolveScanParsedValue(input);
1526
+ if (!parsed || !hasProductionIdentificationScanKey(parsed)) {
1527
+ this.error({ content: PRODUCTION_IDENTIFICATION_SCAN_LOT_OR_UNIQUE_REQUIRED_MSG });
1596
1528
  return;
1597
1529
  }
1598
- const data = getParseRuleValue(str, this.scanRuleInfo.rules_);
1599
- const name = data.lot;
1600
- if (!name) {
1601
- this.warning({ content: "条码中未解析到批次号/SN" });
1530
+ const records = await matchProductionIdentificationScanRecords(parsed);
1531
+ if (!records.length) {
1532
+ this.error({ content: SCAN_NOT_FOUND_MSG });
1602
1533
  return;
1603
1534
  }
1604
- let containerInfo;
1605
- try {
1606
- containerInfo = await fetchProductionContainerByName(name);
1607
- } catch {
1608
- this.error({ content: "查询生产批次失败" });
1535
+ const selected = await this.pickScanRecord(records);
1536
+ if (!selected) return;
1537
+ const fillData = resolveScanFillData(input);
1538
+ const row = isProductionLotOrSn(selected) ? buildProductionContainerRow(selected, parsed, fillData) : buildMaterialContainerRow(selected, parsed, fillData);
1539
+ this.tableData = [...this.showTableData, row];
1540
+ }
1541
+ }
1542
+ function buildWarehouseInScanRow(record, parsed, fillData) {
1543
+ const row = {
1544
+ [F$7.product]: record.product_id_,
1545
+ [F$7.productName]: record.product_id_name_,
1546
+ [F$7.productCode]: record.product_id_code_,
1547
+ [F$7.productSpec]: record.product_id_spec_,
1548
+ [F$7.materialNo]: record.material_no_,
1549
+ [F$7.materialNoId]: record.production_identification_id_,
1550
+ [F$7.mfgOrder]: record.mfg_order_id_,
1551
+ [F$7.lotSn]: record.lot_sn_id_,
1552
+ [F$7.uniqueCode]: record.unique_code_,
1553
+ [F$7.reInspectionDate]: record.re_inspection_date_,
1554
+ [F$7.qty]: resolveScanQty(parsed.qty, record.qty_),
1555
+ ...fillData
1556
+ };
1557
+ const validityFromRecord = record.validity_;
1558
+ if (parsed.expiration && row[F$7.validity] == null) {
1559
+ row[F$7.validity] = toDateOnly(parsed.expiration);
1560
+ } else if (validityFromRecord != null && row[F$7.validity] == null) {
1561
+ row[F$7.validity] = toDateOnly(validityFromRecord);
1562
+ }
1563
+ return row;
1564
+ }
1565
+ class WarehouseInTableCore extends ProfileDrivenSubTableCore {
1566
+ calcSubTableActionMenu = (params) => {
1567
+ const { showDelBtn } = params;
1568
+ return [
1569
+ {
1570
+ type: SubTableActionMenuTypeEnum.SUBTITLE,
1571
+ label: $t("sys.edhr.bizOperation")
1572
+ },
1573
+ getMenuByAction(SubTableActionEnum.SCAN),
1574
+ {
1575
+ type: SubTableActionMenuTypeEnum.DIVIDER
1576
+ },
1577
+ {
1578
+ type: SubTableActionMenuTypeEnum.SUBTITLE,
1579
+ label: $t("sys.edhr.editRow")
1580
+ },
1581
+ getMenuByAction(SubTableActionEnum.Insert1RowAfter),
1582
+ getCopySubMenu(),
1583
+ getInsertSubMenu(),
1584
+ ...showDelBtn ? [
1585
+ {
1586
+ type: SubTableActionMenuTypeEnum.DIVIDER
1587
+ },
1588
+ getMenuByAction(SubTableActionEnum.DeleteRowCurrent)
1589
+ ] : []
1590
+ ].filter(Boolean);
1591
+ };
1592
+ async onScan(input) {
1593
+ const parsed = resolveScanParsedValue(input);
1594
+ if (!parsed || !hasProductionIdentificationScanKey(parsed)) {
1595
+ this.error({ content: PRODUCTION_IDENTIFICATION_SCAN_LOT_OR_UNIQUE_REQUIRED_MSG });
1609
1596
  return;
1610
1597
  }
1611
- if (!containerInfo) {
1612
- this.error({ content: "未查询到匹配的生产批次" });
1598
+ const records = await matchProductionIdentificationScanRecords(parsed);
1599
+ if (!records.length) {
1600
+ this.error({ content: PRODUCTION_IDENTIFICATION_SCAN_NOT_FOUND_MSG });
1613
1601
  return;
1614
1602
  }
1615
- const merged = { ...data, ...containerInfo };
1616
- const applyScanFill = (row) => {
1617
- applyFillFromOption$1(row, merged);
1618
- CLEAR_ON_MATERIAL_CONTAINER_SELECT.forEach((key) => {
1619
- row[key] = void 0;
1603
+ const selected = await this.pickScanRecord(records);
1604
+ if (!selected) return;
1605
+ const row = buildWarehouseInScanRow(selected, parsed, resolveScanFillData(input));
1606
+ this.tableData = [...this.showTableData, row];
1607
+ }
1608
+ }
1609
+ function isSameMaterialBatch(row, record) {
1610
+ if (row[F$8.product] !== record.product_id_) return false;
1611
+ const rowBatchId = row[F$8.materialNoId];
1612
+ const recordBatchId = record.production_identification_id_;
1613
+ if (rowBatchId && recordBatchId) return rowBatchId === recordBatchId;
1614
+ const rowBatchNo = row[F$8.materialNo];
1615
+ const recordBatchNo = record.material_no_ ?? record.name_;
1616
+ return Boolean(rowBatchNo && recordBatchNo && rowBatchNo === recordBatchNo);
1617
+ }
1618
+ function buildWarehouseOutScanRow(record, parsed, fillData, qty) {
1619
+ const row = {
1620
+ [F$8.inventory]: record.id_,
1621
+ [F$8.product]: record.product_id_,
1622
+ [F$8.productName]: record.product_id_name_,
1623
+ [F$8.productCode]: record.product_id_code_,
1624
+ [F$8.productSpec]: record.product_id_spec_,
1625
+ [F$8.materialNo]: record.material_no_,
1626
+ [F$8.materialNoId]: record.production_identification_id_,
1627
+ [F$8.warehouse]: record.warehouse_id_,
1628
+ [F$8.location]: record.location_id_,
1629
+ [F$8.mfgOrder]: record.mfg_order_id_,
1630
+ [F$8.lotSn]: record.lot_sn_id_,
1631
+ [F$8.uniqueCode]: record.unique_code_,
1632
+ [F$8.reInspectionDate]: record.re_inspection_date_,
1633
+ [F$8.qty]: qty,
1634
+ ...fillData
1635
+ };
1636
+ const validityFromRecord = record.validate_ ?? record.validity_;
1637
+ if (parsed.expiration) {
1638
+ row[F$8.validity] = toDateOnly(parsed.expiration);
1639
+ } else if (validityFromRecord != null) {
1640
+ row[F$8.validity] = toDateOnly(validityFromRecord);
1641
+ }
1642
+ return row;
1643
+ }
1644
+ class WarehouseOutTableCore extends ProfileDrivenSubTableCore {
1645
+ get warehouseId() {
1646
+ return this.factory.ctx.paramsConfig?.warehouseId;
1647
+ }
1648
+ handleFieldTd = (params) => {
1649
+ const { field, tdHandler } = params;
1650
+ if (field === F$8.product) {
1651
+ tdHandler.mergeTd({
1652
+ cellWidget: {
1653
+ props: {
1654
+ customRenderTag: "allocateProduct",
1655
+ newSpecificConfig: {
1656
+ newOptions: []
1657
+ }
1658
+ }
1659
+ }
1620
1660
  });
1621
- return row;
1622
- };
1623
- this.tableData = [...this.showTableData, applyScanFill({})];
1661
+ }
1662
+ super.handleFieldTd(params);
1663
+ };
1664
+ calcFieldQuery = (params) => {
1665
+ const { field } = params;
1666
+ if (field === F$8.product) {
1667
+ return {
1668
+ warehouse_id_: this.warehouseId
1669
+ };
1670
+ }
1671
+ };
1672
+ calcSubTableActionMenu = (params) => {
1673
+ const { showDelBtn } = params;
1674
+ return [
1675
+ {
1676
+ type: SubTableActionMenuTypeEnum.SUBTITLE,
1677
+ label: $t("sys.edhr.bizOperation")
1678
+ },
1679
+ getMenuByAction(SubTableActionEnum.SCAN),
1680
+ {
1681
+ type: SubTableActionMenuTypeEnum.DIVIDER
1682
+ },
1683
+ {
1684
+ type: SubTableActionMenuTypeEnum.SUBTITLE,
1685
+ label: $t("sys.edhr.editRow")
1686
+ },
1687
+ getMenuByAction(SubTableActionEnum.Insert1RowAfter),
1688
+ getCopySubMenu(),
1689
+ getInsertSubMenu(),
1690
+ ...showDelBtn ? [
1691
+ {
1692
+ type: SubTableActionMenuTypeEnum.DIVIDER
1693
+ },
1694
+ getMenuByAction(SubTableActionEnum.DeleteRowCurrent)
1695
+ ] : []
1696
+ ].filter(Boolean);
1697
+ };
1698
+ handleChange(params) {
1699
+ super.handleChange(params);
1700
+ const { field, value, option, rowData } = params;
1701
+ if (field !== F$8.product || !option || value === void 0 || value === null || value === "") {
1702
+ return;
1703
+ }
1704
+ for (const { optionField, toField } of FILL_FROM_INVENTORY_OPTION$5) {
1705
+ rowData[toField] = option[optionField];
1706
+ }
1707
+ }
1708
+ async onScan(input) {
1709
+ const parsed = resolveScanParsedValue(input);
1710
+ if (!parsed || !hasLotOrUniqueCode(parsed)) {
1711
+ this.error({ content: SCAN_LOT_OR_UNIQUE_REQUIRED_MSG });
1712
+ return;
1713
+ }
1714
+ const records = await matchInventoryScanRecords(parsed, this.warehouseId);
1715
+ if (!records.length) {
1716
+ this.error({ content: SCAN_NOT_FOUND_MSG$2 });
1717
+ return;
1718
+ }
1719
+ const selected = await this.pickScanRecord(records);
1720
+ if (!selected) return;
1721
+ const scanQty = resolveScanQty(parsed.qty, selected.qty_);
1722
+ const fillData = resolveScanFillData(input);
1723
+ const visibleRows = this.showTableData;
1724
+ const existIndex = visibleRows.findIndex((row2) => isSameMaterialBatch(row2, selected));
1725
+ if (existIndex >= 0) {
1726
+ const existRow = visibleRows[existIndex];
1727
+ existRow[F$8.qty] = Number(existRow[F$8.qty] ?? 0) + scanQty;
1728
+ this.tableData = [...visibleRows];
1729
+ return;
1730
+ }
1731
+ const row = buildWarehouseOutScanRow(selected, parsed, fillData, scanQty);
1732
+ this.tableData = [...visibleRows, row];
1624
1733
  }
1625
1734
  }
1626
1735
  function getClassByType(type) {
@@ -2107,7 +2216,9 @@ function useRenderPageFactory(props, payload) {
2107
2216
  await tmplBomC.init({
2108
2217
  formInstBom: selfInfo.formInstBom,
2109
2218
  operationId: paramsConfig?.routingOperationId,
2110
- materialNo
2219
+ materialNo,
2220
+ productQty: paramsConfig?.productQty
2221
+ // 接收数量
2111
2222
  // relatedLotNo: paramsConfig?.relatedLotNo,
2112
2223
  });
2113
2224
  const materialConsumeData = tmplBomC.calcFormState(paper);
@@ -2227,8 +2338,8 @@ function useRenderPageFactory(props, payload) {
2227
2338
  paramsConfig,
2228
2339
  instanceId: id,
2229
2340
  subTableInfo
2230
- }).catch((e) => {
2231
- console.error("Error in requestCustomSourceData:", e);
2341
+ }).catch((e2) => {
2342
+ console.error("Error in requestCustomSourceData:", e2);
2232
2343
  return null;
2233
2344
  }),
2234
2345
  transformUtils.getEventInitDataLoad({
@@ -2243,8 +2354,8 @@ function useRenderPageFactory(props, payload) {
2243
2354
  findBasicInsInfo,
2244
2355
  findFormInsInfo
2245
2356
  }
2246
- }).catch((e) => {
2247
- console.error("Error in getEventInitDataLoad:", e);
2357
+ }).catch((e2) => {
2358
+ console.error("Error in getEventInitDataLoad:", e2);
2248
2359
  return null;
2249
2360
  })
2250
2361
  ]);
@@ -2324,6 +2435,8 @@ function useRenderPageFactory(props, payload) {
2324
2435
  annRowDetails: [],
2325
2436
  validatorLocationList: [],
2326
2437
  validatorMessageMap: {},
2438
+ mcValidatorLocationList: [],
2439
+ mcValidatorMessageMap: {},
2327
2440
  mobileTdIdGroups: fieldInfoMap.tdIdGroups,
2328
2441
  mobileSelectTdId: void 0,
2329
2442
  contentHighlight: paramsConfig?._gct_nocode_of_instance_id_ === props.selfId ? {
@@ -2342,6 +2455,7 @@ function useRenderPageFactory(props, payload) {
2342
2455
  foreignFields: fieldInfoMap.foreignFields,
2343
2456
  subModelFields: fieldInfoMap.subModelFields,
2344
2457
  appendixFields: fieldInfoMap.useAppendixFields,
2458
+ signatureFields: fieldInfoMap.useSignatureFields,
2345
2459
  subTableInfo
2346
2460
  }
2347
2461
  }
@@ -2374,9 +2488,9 @@ function useRenderPageFactory(props, payload) {
2374
2488
  const prevMap = info.validatorMessageMap ?? {};
2375
2489
  const sameLocations = prevLocations.length === nextLocations.length && nextLocations.every((k, i) => k === prevLocations[i]);
2376
2490
  const sameMessages = sameLocations && nextLocations.every((k) => {
2377
- const a9 = prevMap[k];
2491
+ const a10 = prevMap[k];
2378
2492
  const b2 = map[k];
2379
- return JSON.stringify(a9) === JSON.stringify(b2);
2493
+ return JSON.stringify(a10) === JSON.stringify(b2);
2380
2494
  });
2381
2495
  if (sameMessages) return;
2382
2496
  closeValidatorPopovers();
@@ -2384,9 +2498,29 @@ function useRenderPageFactory(props, payload) {
2384
2498
  info.validatorMessageMap = map;
2385
2499
  });
2386
2500
  }
2501
+ function applyMcValidatorComments(uniqueId, comments) {
2502
+ const map = comments && Object.keys(comments).length ? comments : {};
2503
+ const nextLocations = Object.keys(map);
2504
+ basicInfoList.value.forEach((info) => {
2505
+ if (info.uniqueId !== uniqueId) return;
2506
+ const prevLocations = info.mcValidatorLocationList ?? [];
2507
+ const prevMap = info.mcValidatorMessageMap ?? {};
2508
+ const sameLocations = prevLocations.length === nextLocations.length && nextLocations.every((k, i) => k === prevLocations[i]);
2509
+ const sameMessages = sameLocations && nextLocations.every((k) => {
2510
+ const a10 = prevMap[k];
2511
+ const b2 = map[k];
2512
+ return JSON.stringify(a10) === JSON.stringify(b2);
2513
+ });
2514
+ if (sameMessages) return;
2515
+ closeValidatorPopovers();
2516
+ info.mcValidatorLocationList = nextLocations;
2517
+ info.mcValidatorMessageMap = map;
2518
+ });
2519
+ }
2387
2520
  function registerFormValidationContext(uniqueId) {
2388
2521
  registerValidationContext({
2389
2522
  uniqueId,
2523
+ platformType: payload.platformType,
2390
2524
  getFormData: () => formStateMap.value?.[uniqueId] ?? {},
2391
2525
  getPaper: () => dataCenterMap.value?.[uniqueId]?.[ComponentTypeEnum.PAPER],
2392
2526
  getKeepExceptionHighlight: () => {
@@ -2441,12 +2575,27 @@ function useRenderPageFactory(props, payload) {
2441
2575
  const res = await validate(formState, dataCenter[ComponentTypeEnum.PAPER], uniqueId);
2442
2576
  if (bomC) {
2443
2577
  const bomRes = await bomC.submitValidate();
2578
+ applyMcValidatorComments(uniqueId, bomRes.fields ?? null);
2444
2579
  if (!bomRes.isValid) {
2445
2580
  merge(res, bomRes);
2581
+ return res;
2582
+ }
2583
+ const paper = dataCenter?.[ComponentTypeEnum.PAPER];
2584
+ const objErr = await validateObjectBomQtyOnSubmit({
2585
+ formState,
2586
+ objectFieldList: paper?.props?.objectFieldList,
2587
+ formInstBom: bomC.formInstBom
2588
+ });
2589
+ if (objErr) {
2590
+ const objectBomRes = {
2591
+ isValid: false,
2592
+ fields: { [objErr.field]: [objErr] }
2593
+ };
2594
+ merge(res, objectBomRes);
2446
2595
  const info = basicInfoList.value.find((item) => item.uniqueId === uniqueId);
2447
2596
  const current = {
2448
2597
  ...info?.validatorMessageMap ?? {},
2449
- ...bomRes.fields ?? {}
2598
+ ...objectBomRes.fields ?? {}
2450
2599
  };
2451
2600
  applyValidatorComments(uniqueId, Object.keys(current).length ? current : null);
2452
2601
  return res;
@@ -2493,6 +2642,8 @@ function useRenderPageFactory(props, payload) {
2493
2642
  if (status) {
2494
2643
  info.validatorLocationList = [];
2495
2644
  info.validatorMessageMap = {};
2645
+ info.mcValidatorLocationList = [];
2646
+ info.mcValidatorMessageMap = {};
2496
2647
  closeValidatorPopovers();
2497
2648
  }
2498
2649
  }
@@ -2566,7 +2717,10 @@ function useRenderPageFactory(props, payload) {
2566
2717
  viewMode: RenderModeEnum.ViewMode,
2567
2718
  dataStatus: selfInfo.dataStatus
2568
2719
  });
2569
- const idsFormState = transformUtils.getFormDataIdsMap(newFormState);
2720
+ const signatureKeys = (currentSelfInfo.newBackupInfo.signatureFields || []).map(
2721
+ (item) => item.fieldId
2722
+ );
2723
+ const idsFormState = transformUtils.getFormDataIdsMap(newFormState, signatureKeys);
2570
2724
  merge(formStateMap.value?.[uniqueId], idsFormState);
2571
2725
  if (payload.afterProcessData && typeof payload.afterProcessData === "function") {
2572
2726
  payload.afterProcessData(formStateMap.value?.[uniqueId]);
@@ -3122,27 +3276,27 @@ function useFormulaExpWatcher(options) {
3122
3276
  let calcReqId = 0;
3123
3277
  async function computeMinMaxOnce() {
3124
3278
  const myId = ++calcReqId;
3125
- const getValue = (v) => {
3279
+ const getValue = (v2) => {
3126
3280
  if (returnType === "number") {
3127
- const parsed = v == null ? null : parseFloat(String(v));
3281
+ const parsed = v2 == null ? null : parseFloat(String(v2));
3128
3282
  return Number.isFinite(parsed) ? parsed : null;
3129
3283
  }
3130
- return v;
3284
+ return v2;
3131
3285
  };
3132
3286
  if (needMinValidateCalc) {
3133
3287
  try {
3134
- const v = await onCalculateFormula("min");
3288
+ const v2 = await onCalculateFormula("min");
3135
3289
  if (myId !== calcReqId) return;
3136
- onMinComputed?.(getValue(v));
3137
- } catch (e) {
3290
+ onMinComputed?.(getValue(v2));
3291
+ } catch (e2) {
3138
3292
  }
3139
3293
  }
3140
3294
  if (needMaxValidateCalc) {
3141
3295
  try {
3142
- const v = await onCalculateFormula("max");
3296
+ const v2 = await onCalculateFormula("max");
3143
3297
  if (myId !== calcReqId) return;
3144
- onMaxComputed?.(getValue(v));
3145
- } catch (e) {
3298
+ onMaxComputed?.(getValue(v2));
3299
+ } catch (e2) {
3146
3300
  }
3147
3301
  }
3148
3302
  }
@@ -3154,14 +3308,14 @@ function useFormulaExpWatcher(options) {
3154
3308
  const s = topStops.shift();
3155
3309
  try {
3156
3310
  s && s();
3157
- } catch (e) {
3311
+ } catch (e2) {
3158
3312
  }
3159
3313
  }
3160
3314
  for (const [, rowMap] of hashRowStops) {
3161
3315
  for (const stop2 of rowMap.values()) {
3162
3316
  try {
3163
3317
  stop2 && stop2();
3164
- } catch (e) {
3318
+ } catch (e2) {
3165
3319
  }
3166
3320
  }
3167
3321
  }
@@ -3175,8 +3329,8 @@ function useFormulaExpWatcher(options) {
3175
3329
  debouncedCompute();
3176
3330
  return;
3177
3331
  }
3178
- for (const p2 of parseInfos) {
3179
- const { type, processed, hashValue } = p2;
3332
+ for (const p of parseInfos) {
3333
+ const { type, processed, hashValue } = p;
3180
3334
  if (type === "plain") {
3181
3335
  const stop2 = watch(
3182
3336
  () => currentPageFormState.value?.[processed],
@@ -3355,9 +3509,9 @@ class FormAnnotationController {
3355
3509
  const items = this.normalizeAllResponse(res);
3356
3510
  this.applyAnnotationItems(items, () => true);
3357
3511
  return items;
3358
- } catch (e) {
3359
- console.error("加载所有批注信息 error", e);
3360
- throw e;
3512
+ } catch (e2) {
3513
+ console.error("加载所有批注信息 error", e2);
3514
+ throw e2;
3361
3515
  }
3362
3516
  };
3363
3517
  handleOpenAnnotation = async () => {
@@ -3403,219 +3557,195 @@ function filterAnnotationItemsUpToCurrent(items) {
3403
3557
  return ts <= currentTs;
3404
3558
  });
3405
3559
  }
3406
- function useMaterialStocktake() {
3407
- async function getStockDataByWarehouse({ cloneRuntimeJson, warehouseId, locationId }) {
3408
- const stocktakeTables = cloneRuntimeJson?.paper?.props?.materialStocktakeList;
3409
- if (!stocktakeTables?.length || !warehouseId) return {};
3410
- const res = await api.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey(
3411
- {
3412
- modelCategory: "entity",
3413
- bsKey: "listAll",
3414
- modelKey: "em_inventory"
3415
- },
3416
- {
3417
- query: {
3418
- "warehouse_id_.eq": warehouseId,
3419
- "location_id_.eq": locationId
3420
- }
3421
- }
3422
- );
3423
- return stocktakeTables.reduce((obj, e) => {
3424
- obj[e.masterSubField] = res?.data;
3425
- return obj;
3426
- }, {});
3427
- }
3428
- async function openScanModal() {
3429
- console.log("materialStocktake openScanModal");
3430
- }
3431
- return {
3432
- getStockDataByWarehouse,
3433
- openScanModal
3434
- };
3435
- }
3436
3560
  export {
3437
- aq as AITooltips,
3561
+ ar as AITooltips,
3438
3562
  AllocateTableCore,
3439
3563
  B3 as BaseFormModelFetcher,
3440
- as as BinarizeMethodOptions,
3441
- aC as BindCmpStyleEnum,
3442
- R as BooleanShowMode,
3564
+ at as BinarizeMethodOptions,
3565
+ aD as BindCmpStyleEnum,
3566
+ T as BooleanShowMode,
3443
3567
  B2 as BorderTD,
3444
3568
  BpmnNodeTypeEnum,
3445
- bB as BpmnSignatureTypeEnum,
3446
- bC as ButtonTypeEnum,
3569
+ bN as BpmnSignatureTypeEnum,
3570
+ bO as ButtonTypeEnum,
3447
3571
  B as BwipCodeType,
3448
- bD as CHECK_TABLE_MEDPRO_PROTOCOL_KEY,
3572
+ bP as CHECK_TABLE_MEDPRO_PROTOCOL_KEY,
3449
3573
  t as CellType,
3450
- a0 as CellWidgetViewState,
3574
+ a1 as CellWidgetViewState,
3451
3575
  CheckDsTypeEnum,
3452
- bE as CodeRunner,
3576
+ bQ as CodeRunner,
3453
3577
  ComponentTypeEnum,
3454
- bF as Config_Fields,
3455
- bG as ControlStatusEnum,
3456
- aA as DateFormat,
3457
- aD as DecimalDisplayMode,
3458
- ar as DenoiseMethodOptions,
3459
- m as DeviceConnector,
3460
- ao as DeviceLink,
3578
+ bR as Config_Fields,
3579
+ bS as ControlStatusEnum,
3580
+ aB as DateFormat,
3581
+ aE as DecimalDisplayMode,
3582
+ as as DenoiseMethodOptions,
3583
+ x as DeviceConnector,
3584
+ ap as DeviceLink,
3461
3585
  D as DeviceLinkTmplUtil,
3462
- ap as DeviceParamsTypeTitle,
3586
+ aq as DeviceParamsTypeTitle,
3463
3587
  DevicePartConsumeTableCore,
3464
- a1 as DiagonalDirection,
3465
- a5 as DiagonalVertex,
3588
+ bT as DeviceStatus,
3589
+ a2 as DiagonalDirection,
3590
+ a6 as DiagonalVertex,
3466
3591
  _ as DocumentLayout,
3467
- n as DocumentLoading,
3468
- c as DocumentPaper,
3469
- o as DynamicQuickFillModal,
3470
- d as DynamicTableAction,
3471
- bH as EBR_PROVIDE_ENUM,
3472
- aO as EFieldBizTypeEnum,
3473
- ae as EmptySymbol,
3474
- bI as FieldSysVarDefaultValueEnum,
3592
+ y as DocumentLoading,
3593
+ d as DocumentPaper,
3594
+ z as DynamicQuickFillModal,
3595
+ e as DynamicTableAction,
3596
+ bU as EBR_PROVIDE_ENUM,
3597
+ bV as EFieldBizTypeEnum,
3598
+ af as EmptySymbol,
3599
+ bW as FieldSysVarDefaultValueEnum,
3475
3600
  FillingTypeEnum,
3476
3601
  F as FixedQuickFillModal,
3477
3602
  FormAnnotationController,
3478
3603
  F2 as FormModelController,
3479
3604
  FormTmplBomController,
3480
- p as FormTmplConfigController,
3605
+ A as FormTmplConfigController,
3481
3606
  FormTypeEnum,
3482
- ak as ImageDisplayModeEnum,
3607
+ al as ImageDisplayModeEnum,
3483
3608
  I as InstanceStatusValues,
3484
- au as JoinModelTypeEum,
3485
- Q as LabelPosition,
3486
- a3 as LineDirection,
3609
+ av as JoinModelTypeEum,
3610
+ R as LabelPosition,
3611
+ a4 as LineDirection,
3487
3612
  L as LineType,
3488
3613
  M as MBRender,
3489
- q as MCDataUtil,
3490
- a7 as MCRender,
3614
+ C as MCDataUtil,
3615
+ a8 as MCRender,
3491
3616
  MaterialConsumeTableController,
3492
3617
  MaterialConsumptionPatternEnum,
3493
3618
  MaterialRequisitionTableCore,
3494
3619
  MaterialStatusEnum,
3495
- bJ as MobileFillTypeEnum,
3620
+ bX as MobileFillTypeEnum,
3496
3621
  NCB_PROVIDE,
3497
3622
  O2 as OCR_MODEL_PRECISION_ENUM_KEY,
3498
- bK as OfficeTypeEnum,
3623
+ bY as OfficeTypeEnum,
3499
3624
  O as Orientation,
3500
3625
  j as PageSizeEnum,
3501
3626
  P as PaginationFormat,
3502
- al as PaperSizeMap,
3627
+ Z as PaperSizeMap,
3503
3628
  h as PaperWidgeType,
3504
3629
  G as PaperWidgeValueType,
3505
- at as ParamModelTypeEnum,
3630
+ au as ParamModelTypeEnum,
3506
3631
  PartStocktakeTableCore,
3507
3632
  PlatformEnum,
3508
- bL as PosEnum,
3633
+ bZ as PosEnum,
3509
3634
  PretreatmentListTableCore,
3510
3635
  ProfileDrivenSubTableCore,
3511
- bM as RangeCompareOp,
3512
- aL as RangeValidateMode,
3636
+ b_ as RangeCompareOp,
3637
+ aR as RangeValidateMode,
3513
3638
  RenderModeEnum,
3514
- W as SignShowTypeEnum,
3515
- T as SignatureNumberTypeEnum,
3516
- V as SignatureTimeTypeEnum,
3517
- X as SignatureTypeEnum,
3639
+ X as SignShowTypeEnum,
3640
+ V as SignatureNumberTypeEnum,
3641
+ W as SignatureTimeTypeEnum,
3642
+ Y as SignatureTypeEnum,
3518
3643
  SterilizeBatchTableCore,
3519
3644
  StocktakeTableCore,
3520
3645
  SubTableCore,
3521
3646
  SubTableCoreFactory,
3522
3647
  SubTableType,
3523
- bN as SummaryApproveHisTypeEnum,
3524
- a4 as TimeDiffFormat,
3525
- a8 as ViewTypeEnum,
3648
+ b$ as SummaryApproveHisTypeEnum,
3649
+ a5 as TimeDiffFormat,
3650
+ a9 as ViewTypeEnum,
3526
3651
  WarehouseInTableCore,
3527
3652
  WarehouseInboundTableCore,
3528
3653
  WarehouseOutTableCore,
3529
3654
  WarehouseOutboundTableCore,
3530
- a2 as WidgetImageSizeMode,
3531
- bO as applyCheckDsDataToRuntime,
3532
- bP as applyMedProCheckDsDataToRuntime,
3655
+ a3 as WidgetImageSizeMode,
3656
+ c0 as applyCheckDsDataToRuntime,
3657
+ c1 as applyMedProCheckDsDataToRuntime,
3533
3658
  baseDataUtils,
3534
- bQ as buildFormChangeDisplayRows,
3535
- bR as buildStableFieldLocation,
3659
+ c2 as buildDeviceBaseQuery,
3660
+ aQ as buildDeviceFilterQuery,
3661
+ c3 as buildFormChangeDisplayRows,
3662
+ c4 as buildStableFieldLocation,
3536
3663
  calcFillData,
3537
3664
  calcUtils,
3538
3665
  clearFormRules,
3539
3666
  collectAnnotationItemsByLocation,
3540
3667
  collectFormChangeFieldLocations,
3541
3668
  commonUtils,
3542
- bS as deleteSubtableRow,
3543
- bT as detailsHaveFormChangeRowOps,
3669
+ c5 as deleteSubtableRow,
3670
+ c6 as detailsHaveFormChangeRowOps,
3544
3671
  enrichFormChangeRowDetails,
3545
- bU as extractFormChangeRowDetails,
3672
+ c7 as extractFormChangeRowDetails,
3546
3673
  extractKeywordFromQueryData,
3547
- bV as fetchCheckDsDataForTable,
3548
- bW as fetchCustomCheckDsData,
3674
+ c8 as fetchCheckDsDataForTable,
3675
+ c9 as fetchCustomCheckDsData,
3549
3676
  fetchHistoryConsume,
3550
- bX as fetchMedProCheckDsData,
3677
+ ca as fetchMedProCheckDsData,
3551
3678
  filterAnnotationItemsUpToCurrent,
3552
3679
  getAppInfo,
3553
- bY as getCheckTableSnapshotKey,
3554
- bZ as getFormChangeRowKey,
3555
- b_ as getFormChangeRowOp,
3556
- aK as getLotLockedReason,
3557
- b$ as getParseRuleConfig,
3680
+ cb as getCheckTableSnapshotKey,
3681
+ cc as getFormChangeRowKey,
3682
+ cd as getFormChangeRowOp,
3683
+ aP as getLotLockedReason,
3684
+ g as getObjectBomMaterialLotQuery,
3685
+ ce as getParseRuleConfig,
3558
3686
  getParseRuleInfo,
3559
3687
  getParseRuleValue,
3560
- c0 as getSubTableQuickFillInfo,
3688
+ cf as getSubTableQuickFillInfo,
3561
3689
  getSuiteKey,
3562
- c1 as handleOldConfig,
3563
- c2 as hasAnyCheckTableSnapshot,
3564
- c3 as hasByTableCheckTableSnapshot,
3565
- c4 as hasSharedCheckTableSnapshot,
3566
- c5 as insertSubtableRows,
3567
- c6 as isAnnLocationSelected,
3690
+ cg as handleOldConfig,
3691
+ ch as hasAnyCheckTableSnapshot,
3692
+ ci as hasByTableCheckTableSnapshot,
3693
+ cj as hasSharedCheckTableSnapshot,
3694
+ ck as insertSubtableRows,
3695
+ cl as isAnnLocationSelected,
3568
3696
  isBomGranted,
3569
3697
  isEdhrSuite,
3570
3698
  isEqmSuite,
3571
- c7 as isFormChangeGhostRow,
3572
- c8 as isMedProSuite,
3573
- c9 as isRowAddedInCurrentFormChange,
3574
- ca as jsonSchemaUtils,
3575
- cb as judgeUnique,
3576
- cc as materialCheck,
3577
- cd as migrateDiagonalDirectionToVertex,
3699
+ cm as isFormChangeGhostRow,
3700
+ cn as isMedProSuite,
3701
+ co as isRowAddedInCurrentFormChange,
3702
+ cp as jsonSchemaUtils,
3703
+ cq as judgeUnique,
3704
+ aO as materialCheck,
3705
+ cr as migrateDiagonalDirectionToVertex,
3578
3706
  nextFormChangeRowViewHistoryId,
3579
- aF as normalizeRefLoaderResult,
3580
- ce as parseFrontConfig,
3581
- cf as recordSubtableRowAdd,
3582
- cg as recordSubtableRowDelete,
3583
- aG as refUtils,
3707
+ aG as normalizeRefLoaderResult,
3708
+ cs as parseFrontConfig,
3709
+ ct as recordSubtableRowAdd,
3710
+ cu as recordSubtableRowDelete,
3711
+ aI as refUtils,
3584
3712
  registerValidationContext,
3585
- ch as relocateDeletedRowsToEnd,
3713
+ cv as relocateDeletedRowsToEnd,
3586
3714
  renderUtils,
3587
3715
  requestDisplayValidation,
3588
3716
  requestFullValidation,
3589
- ci as requestMedProCheckDsData,
3590
- cj as requestNonMedProCheckDsData,
3591
- ck as resolveAnnotationFieldLocation,
3592
- a6 as resolveDiagonalVertex,
3593
- cl as resolveFormChangeRowUi,
3594
- cm as resolveRowFormChangeMark,
3595
- ay as setSelectAnnotationId,
3596
- cn as setSelectMobileTdId,
3597
- ax as setSelectValidatorId,
3717
+ cw as requestMedProCheckDsData,
3718
+ cx as requestNonMedProCheckDsData,
3719
+ cy as resolveAnnotationFieldLocation,
3720
+ a7 as resolveDiagonalVertex,
3721
+ cz as resolveFormChangeRowUi,
3722
+ cA as resolveRowFormChangeMark,
3723
+ az as setSelectAnnotationId,
3724
+ cB as setSelectMobileTdId,
3725
+ ay as setSelectValidatorId,
3598
3726
  settleAndValidateDisplay,
3599
- av as sqlUtils,
3600
- co as stockCheck,
3727
+ aw as sqlUtils,
3728
+ cC as stockCheck,
3601
3729
  transformUtils,
3602
3730
  unregisterValidationContext,
3603
3731
  H as useCalculateFormula,
3604
- aJ as useCurrentPageFormState,
3605
- aN as useDependency,
3732
+ aN as useCurrentPageFormState,
3733
+ aT as useDependency,
3606
3734
  useEbrWikiFactoryV2,
3607
3735
  u3 as useFormModel,
3608
3736
  u2 as useFormTmplConfig,
3609
3737
  useFormulaExpWatcher,
3610
3738
  useMaterialBalance,
3611
- useMaterialStocktake,
3612
3739
  useNocodeEmitter,
3613
- az as useNocodeFormWidget,
3614
- cp as useOnlineFormActionButton,
3740
+ aA as useNocodeFormWidget,
3741
+ cD as useOnlineFormActionButton,
3615
3742
  u as useOnlineFormTransformField2Component,
3616
3743
  useRenderPageFactory,
3617
- a as useStyles,
3618
- b as useValidator,
3619
- aw as useWidgetStaticAttrs,
3620
- validate
3744
+ b as useStyles,
3745
+ a as useTmplBom,
3746
+ c as useValidator,
3747
+ ax as useWidgetStaticAttrs,
3748
+ validate,
3749
+ v as validateObjectBomForScan,
3750
+ validateObjectBomQtyOnSubmit
3621
3751
  };