@gct-paas/excel 0.1.49 → 0.1.51-beta.0

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 (207) hide show
  1. package/README.md +3 -4
  2. package/dist/{BaseComponent-BujOt502.js → BaseComponent-BShN-6c8.js} +4 -3
  3. package/dist/{VueVideoPlayer-B8GR2HPo.js → VueVideoPlayer-DH8pXh28.js} +2 -2
  4. package/dist/{align-editor--BUxJjPg.js → align-editor-DJ859WQZ.js} +1 -1
  5. package/dist/{barcode-design-DGX6Ol4t.js → barcode-design-Gq8_VO9l.js} +3 -2
  6. package/dist/base/index.es.js +517 -222
  7. package/dist/{diagonal-design-oiPfvxr7.js → diagonal-design-C2Ybg80S.js} +3 -2
  8. package/dist/{dynamic-table-action-Bhkrp7KE.js → dynamic-table-action-B3QEu1gT.js} +452 -322
  9. package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-CidYX2eX.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-BY59Q_d_.js} +2296 -593
  10. package/dist/{edit.utils-CXmmCnxE-BXlWf2Zf.js → edit.utils-CXmmCnxE-wWPJuGRP.js} +1 -1
  11. package/dist/excel.css +614 -723
  12. package/dist/{exceljs.min-Ta0dJQqu.js → exceljs.min-D9sk8ogV.js} +2 -2
  13. package/dist/{font-editor-Dmj2hu7T.js → font-editor-CRxKpZ5w.js} +3 -3
  14. package/dist/{image-design-C3yJcthI.js → image-design-D6Mh4gmF.js} +3 -8
  15. package/dist/{index-C4SreE7Q.js → index-B10CES7y.js} +3 -2
  16. package/dist/{index-wKwGHLnP.js → index-BHaAq-DQ.js} +2 -1
  17. package/dist/{index-DMAuxwlt.js → index-BIks4AlA.js} +2 -1
  18. package/dist/{index-CMN1t7G7.js → index-BItsxlLG.js} +4 -3
  19. package/dist/{index-1kD3Vcrg.js → index-BLwPDGyh.js} +3 -2
  20. package/dist/{index-KQqw3i9h.js → index-BMBgoKQJ.js} +3 -2
  21. package/dist/{index-DF8n1Gru.js → index-Ba7SenEy.js} +4 -3
  22. package/dist/{index-DRKCOV3w.js → index-BaQxoGFV.js} +2 -1
  23. package/dist/{index-BDr7t7vL.js → index-BbNwGIpN.js} +2 -1
  24. package/dist/{index-DdOpcuy6.js → index-BdkVqSGZ.js} +8995 -3731
  25. package/dist/{index-GIYmXP7h.js → index-BfGKeHIi.js} +3 -2
  26. package/dist/{index-B0Qf1-mt.js → index-BkCygM2H.js} +4 -3
  27. package/dist/{index-CEYSrHod.js → index-Bkx2ZZxc.js} +3 -2
  28. package/dist/{index-OwTnsnnd.js → index-BzHOWFfJ.js} +3 -2
  29. package/dist/{index-CaLRSpkL.js → index-BzTGz-yp.js} +3 -2
  30. package/dist/{index-L7CRRS4N.js → index-C9oFT3gk.js} +3 -2
  31. package/dist/{index-C6WDE2xc.js → index-CCXIoitH.js} +2 -1
  32. package/dist/{index-IOqBW_eS.js → index-CfMaU3Cq.js} +7 -3
  33. package/dist/{index-D9lmC_sX.js → index-CkYFepvp.js} +4 -3
  34. package/dist/{index-B2VHOqo4.js → index-CqZOsGgU.js} +3 -2
  35. package/dist/{index-BOMuRlHQ.js → index-D8Pv4_xg.js} +3 -2
  36. package/dist/{index-BtAlyN0W.js → index-D925vhPg.js} +3 -2
  37. package/dist/{index-BEEhGWk7.js → index-DECfc3al.js} +3 -2
  38. package/dist/{index-CUTV5Yr2.js → index-DS1bbdtf.js} +5 -4
  39. package/dist/{index-DBSvao2o.js → index-DVloZxGE.js} +2 -1
  40. package/dist/{index-BlCF32GJ.js → index-DpPtXY8I.js} +4 -3
  41. package/dist/{index-UnwowxL3.js → index-DpQIy9xD.js} +2 -1
  42. package/dist/{index-DLTES9Zq.js → index-IY_wwSl8.js} +3 -2
  43. package/dist/{index-BwuwoFQQ.js → index-MWQxnJy_.js} +3 -2
  44. package/dist/{index-B4ZpSIPH.js → index-caGeDRoA.js} +4 -3
  45. package/dist/{index-Bd15pfRH.js → index-eHOXhn3S.js} +2 -1
  46. package/dist/{index-DQC7zJRO.js → index-emsDlrTV.js} +2 -1
  47. package/dist/{index-B4hIBKZ6.js → index-vrDKB2Af.js} +3 -2
  48. package/dist/{index-CZo7qVZK.js → index-xTI_Fqhb.js} +2 -1
  49. package/dist/index.es.js +52 -46
  50. package/dist/{online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-219qzsVL.js → online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-BftaGVRR.js} +27 -3
  51. package/dist/{pagination-design-CNML3qGx.js → pagination-design-BO_7vrQd.js} +3 -2
  52. package/dist/paper-widget-design-18uum1H9.js +4 -0
  53. package/dist/{print-runtime-instance-DKR1MX8-.js → print-runtime-instance-B1Q_Xc8x.js} +1 -1
  54. package/dist/{print-snapshot-renderer-BIWDQkSC.js → print-snapshot-renderer-wEKNMo0m.js} +3 -3
  55. package/dist/{qrcode-design-CUQ4gaJ0.js → qrcode-design-CeNvj_74.js} +1 -1
  56. package/dist/{revo-grid.entry-Be5Mx_h7.js → revo-grid.entry-iJpKwgs4.js} +1 -1
  57. package/dist/{revogr-attribution_7.entry-DmJFrubR.js → revogr-attribution_7.entry-C-cdTXU8.js} +3 -3
  58. package/dist/{revogr-clipboard_3.entry-COcvqK0w.js → revogr-clipboard_3.entry-BHJgHR9f.js} +2 -2
  59. package/dist/{revogr-data_4.entry-Dc4luGHv.js → revogr-data_4.entry-R_-ZZIdp.js} +2 -2
  60. package/dist/{revogr-filter-panel.entry-B1l-ouo-.js → revogr-filter-panel.entry-RU6Tewnq.js} +1 -1
  61. package/dist/seal-design-BnQkmNDo.js +4 -0
  62. package/dist/{serialnumber-design-hcI8TwmS.js → serialnumber-design-b0I5H8lq.js} +1 -1
  63. package/dist/shared/index.es.js +29 -28
  64. package/dist/{single-field-drop-CnuMgeEW.js → single-field-drop-Bj73o6Jt.js} +2 -3
  65. package/dist/{size-editor-D4ZNlV-c.js → size-editor-Bps566OT.js} +1 -1
  66. package/dist/src/adapter/adapter.d.ts +1 -1
  67. package/dist/src/adapter/index.d.ts +2 -0
  68. package/dist/src/{nocode-web-render/src/render/sub-table/common → adapter/web}/inventory-scan-columns.d.ts +1 -1
  69. package/dist/src/{nocode-web-render/src/render/sub-table/material-balance/mb-web-render.d.ts → adapter/web/material-balance-render.d.ts} +1 -1
  70. package/dist/src/{nocode-web-render/src/render/sub-table/material-balance → adapter/web}/material-consume-modal.vue.d.ts +1 -1
  71. package/dist/src/adapter/web/material-consume-render.d.ts +25 -0
  72. package/dist/src/{nocode-web-render/src/render/common → adapter/web}/open-util.d.ts +1 -1
  73. package/dist/src/{nocode-web-render/src/render/sub-table/stocktake/stocktake-web-render.d.ts → adapter/web/stocktake-render.d.ts} +2 -2
  74. package/dist/src/{nocode-web-render/src/render/sub-table/common → adapter/web}/sub-table-render.d.ts +2 -5
  75. package/dist/src/domain/document-business/business/product-release/profile.d.ts +2 -0
  76. package/dist/src/domain/document-business/business/product-release/service.d.ts +2 -0
  77. package/dist/src/domain/document-business/index.d.ts +2 -0
  78. package/dist/src/domain/document-business/registry.d.ts +2 -0
  79. package/dist/src/domain/document-business/runtime/field-query-runtime.d.ts +4 -0
  80. package/dist/src/domain/document-business/types.d.ts +24 -0
  81. package/dist/src/domain/field/number/product-release-qty-manifest.d.ts +2 -0
  82. package/dist/src/domain/field/query-filter.d.ts +15 -0
  83. package/dist/src/domain/table/business/material/material-substitution/profile/field-keys.d.ts +37 -1
  84. package/dist/src/domain/table/business/material/material-substitution/runtime/row-change-handlers.d.ts +7 -0
  85. package/dist/src/domain/table/business/material/material-substitution/runtime/select-loaders.d.ts +12 -0
  86. package/dist/src/domain/table/business/sterilize/entrust-steril-batch-list/profile/field-keys.d.ts +2 -0
  87. package/dist/src/domain/table/business/warehouse/shared/autofill-source-labels.d.ts +19 -0
  88. package/dist/src/domain/table/design/autofill-expander.d.ts +2 -0
  89. package/dist/src/domain/table/design/hooks/on-field-attach.d.ts +6 -0
  90. package/dist/src/domain/table/index.d.ts +1 -1
  91. package/dist/src/domain/table/types.d.ts +2 -0
  92. package/dist/src/index.d.ts +8 -0
  93. package/dist/src/nocode-base/src/components/document-sub-table-action/dynamic-table-action.vue.d.ts +0 -2
  94. package/dist/src/nocode-base/src/components/document-sub-table-action/sub-table-action.vue.d.ts +0 -3
  95. package/dist/src/nocode-base/src/components/document-sub-table-action/type.d.ts +0 -4
  96. package/dist/src/nocode-base/src/components/material-consume/types.d.ts +1 -5
  97. package/dist/src/nocode-base/src/core/sub-table/profile-driven-sub-table-core.d.ts +4 -4
  98. package/dist/src/nocode-base/src/core/sub-table/sub-table-core.d.ts +1 -4
  99. package/dist/src/nocode-base/src/core/sub-table/utils/sterilize/field-keys.d.ts +1 -2
  100. package/dist/src/nocode-base/src/hooks/formula-params-cache.d.ts +15 -0
  101. package/dist/src/nocode-base/src/hooks/inspection-module-qty.d.ts +4 -0
  102. package/dist/src/nocode-base/src/hooks/material-consume/material-consume-table-controller.d.ts +0 -6
  103. package/dist/src/nocode-base/src/hooks/material-consume/mc-render.d.ts +1 -28
  104. package/dist/src/nocode-base/src/hooks/render-page/initial-value-data-sources.d.ts +3 -0
  105. package/dist/src/nocode-base/src/hooks/render-page/initialize-runtime.d.ts +9 -8
  106. package/dist/src/nocode-base/src/hooks/render-page/runtime-data-sources.d.ts +51 -0
  107. package/dist/src/nocode-base/src/hooks/render-page/sterilization-date.d.ts +3 -0
  108. package/dist/src/nocode-base/src/hooks/render-page/types.d.ts +7 -1
  109. package/dist/src/nocode-base/src/hooks/useCalcFunction.d.ts +8 -2
  110. package/dist/src/nocode-base/src/hooks/useRenderPageFactory.d.ts +55 -6
  111. package/dist/src/nocode-base/src/hooks/useRuntimeInstanceServices.d.ts +24 -0
  112. package/dist/src/nocode-base/src/interface/ref-loader.d.ts +12 -1
  113. package/dist/src/nocode-base/src/interface/render.d.ts +2 -1
  114. package/dist/src/nocode-base/src/interface/transform.d.ts +3 -0
  115. package/dist/src/nocode-base/src/runtime/conversions/v1-runtime.d.ts +1 -1
  116. package/dist/src/nocode-base/src/runtime/designer-default-values.d.ts +23 -0
  117. package/dist/src/nocode-base/src/runtime/runtime-default-value-validation.d.ts +23 -0
  118. package/dist/src/nocode-base/src/runtime/runtime-field-initializer.d.ts +1 -0
  119. package/dist/src/nocode-base/src/runtime/runtime-field-state.d.ts +5 -2
  120. package/dist/src/nocode-base/src/runtime/runtime-instance-registry.d.ts +8 -5
  121. package/dist/src/nocode-base/src/types/common/base.d.ts +8 -2
  122. package/dist/src/nocode-base/src/types/render/mc-render.d.ts +2 -15
  123. package/dist/src/nocode-base/src/types/render/sub-table-render.d.ts +0 -10
  124. package/dist/src/online-form/src/components/device/device-select.vue.d.ts +1 -1
  125. package/dist/src/online-form/src/views/__cell_widgets__/common/default-value-rdo-editor/base-vxe-table.vue.d.ts +1 -1
  126. package/dist/src/online-form/src/views/__cell_widgets__/common/default-value-rdo-editor/default-value-rdo-editor.vue.d.ts +4 -4
  127. package/dist/src/online-form/src/views/__cell_widgets__/common/default-value-rdo-editor/rdo-table-dropdown.vue.d.ts +3 -3
  128. package/dist/src/online-form/src/views/designer/constants/index.d.ts +1 -0
  129. package/dist/src/online-form/src/views/designer/hooks/useAllSpreadSheets.d.ts +144 -0
  130. package/dist/src/online-form/src/views/designer/hooks/useSpreadSheet.d.ts +87 -4
  131. package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/message-rule-config/rule-modal.vue.d.ts +32 -0
  132. package/dist/src/{nocode-web-render/src/render/parse-rule → online-form/src/views/designer/modules/panel/sub-table/comps}/add-rule-btn.vue.d.ts +1 -1
  133. package/dist/src/online-form/src/views/designer/modules/panel/sub-table/comps/use-dynamic-sub-table-panel.d.ts +6 -0
  134. package/dist/src/online-form/src/views/designer/modules/panel/sub-table/panel-check-table/select-check-ds-modal.vue.d.ts +3 -3
  135. package/dist/src/online-form/src/views/designer/types/index.d.ts +12 -1
  136. package/dist/src/online-form/src/views/designer/utils/placed-fields.d.ts +9 -0
  137. package/dist/src/online-form/src/views/designer/utils/template-placed-fields.d.ts +7 -0
  138. package/dist/src/online-form/src/views/render/__components__/_field_/_base_/cell/cell-auto-complete.vue.d.ts +2 -2
  139. package/dist/src/online-form/src/views/render/__components__/_field_/_base_/cell/cell-date-picker.vue.d.ts +2 -2
  140. package/dist/src/online-form/src/views/render/__components__/_field_/_base_/cell/cell-media.vue.d.ts +1 -1
  141. package/dist/src/online-form/src/views/render/__components__/_field_/_base_/cell/cell-text-input.vue.d.ts +2 -2
  142. package/dist/src/online-form/src/views/render/__components__/_field_/_base_/cell/cell-textarea.vue.d.ts +2 -2
  143. package/dist/src/online-form/src/views/render/__components__/_field_/seal/component/seal-floating-field.vue.d.ts +0 -1
  144. package/dist/src/online-form/src/views/render/__components__/_field_/seal/component/seal-runtime-layer.vue.d.ts +0 -1
  145. package/dist/src/online-form/src/views/render/__components__/_field_/seal/component/use-seal-stamp.d.ts +1 -4
  146. package/dist/src/online-form/src/views/render/__components__/_field_/seal/index.d.ts +1 -0
  147. package/dist/src/online-form/src/views/render/__components__/_field_/trace/common/base-vxe-table.vue.d.ts +1 -1
  148. package/dist/src/shared/components/ColorPicker/src/ColorPicker.vue.d.ts +1 -1
  149. package/dist/src/shared/components/DoubleInput/double-input.vue.d.ts +162 -2
  150. package/dist/src/shared/components/LimitedNumberInput/limited-number-input.vue.d.ts +41 -0
  151. package/dist/src/shared/components/LimitedNumberInput/number-input-rules.d.ts +16 -0
  152. package/dist/src/shared/components/Signature/logic/index.d.ts +14 -0
  153. package/dist/src/shared/enum/field-type.d.ts +8 -3
  154. package/dist/src/{nocode-web-render/src → shared}/hooks/useWebUpload.d.ts +1 -1
  155. package/dist/src/shared/index.d.ts +1 -0
  156. package/dist/src/shared/types/index.d.ts +1 -0
  157. package/dist/src/shared/types/upload.d.ts +11 -0
  158. package/dist/src/shared/utils/withRequestCache.d.ts +27 -0
  159. package/dist/{sub-table-factory-Df_Z-LYK.js → sub-table-factory-CykoFqnP.js} +276 -89
  160. package/dist/{text-design-gySXbKUQ.js → text-design-kWxwqj3H.js} +3 -2
  161. package/dist/{throttle-Cpk1LoGk-DEDsjc1B.js → throttle-Cpk1LoGk-B3zgXjle.js} +1 -1
  162. package/dist/{timediff-design-BHLUYM_L.js → timediff-design-sh7-fMvN.js} +2 -1
  163. package/dist/{trace-like-wrapper-CD0q7Bpg.js → trace-like-wrapper-ByePbRT3.js} +3 -2
  164. package/dist/{value-editor.vue_vue_type_style_index_0_lang-Dp_NLPcS.js → value-editor.vue_vue_type_style_index_0_lang-BuGHTPEo.js} +3 -2
  165. package/dist/{widget-barcode-Dho-QBc4.js → widget-barcode-BP0WV4jM.js} +5 -4
  166. package/dist/{widget-diagonal-LOzS5LGZ.js → widget-diagonal-Cwfunmde.js} +4 -4
  167. package/dist/{widget-image-CE9y7lzB.js → widget-image-3xm-HfRy.js} +5 -7
  168. package/dist/{widget-line-DK-tRBi0.js → widget-line-B2Q3DwW6.js} +3 -2
  169. package/dist/{widget-pagination-JLrTk_QY.js → widget-pagination-CV9ShZXH.js} +6 -5
  170. package/dist/{widget-power-B136JrJ6.js → widget-power-Bc0Fv3R6.js} +4 -4
  171. package/dist/{widget-qrcode-CQ79eZwR.js → widget-qrcode-D_LkgIb2.js} +4 -3
  172. package/dist/{widget-rangelimit-DORQgXtz.js → widget-rangelimit-Db1rsnwU.js} +3 -4
  173. package/dist/{widget-serialnumber-BvhwTK5N.js → widget-serialnumber-BqZ3zJst.js} +1 -1
  174. package/dist/{widget-text-D6au0tli.js → widget-text-IJbtzWxl.js} +5 -5
  175. package/dist/{widget-timediff-C3SAIS2-.js → widget-timediff-Bp8U1rzO.js} +3 -2
  176. package/package.json +2 -6
  177. package/dist/AntdIcon-DCIaV352.js +0 -1108
  178. package/dist/index-B6csmYLK.js +0 -4353
  179. package/dist/mb-render-CQlqaMrC.js +0 -276
  180. package/dist/paper-widget-design-B8WyX87-.js +0 -4
  181. package/dist/seal-design-Q8W8Umib.js +0 -4
  182. package/dist/src/nocode-web-render/src/components/print-fill-background-selector.vue.d.ts +0 -2
  183. package/dist/src/nocode-web-render/src/hooks/index.d.ts +0 -2
  184. package/dist/src/nocode-web-render/src/hooks/userFormPrint.d.ts +0 -15
  185. package/dist/src/nocode-web-render/src/index.d.ts +0 -6
  186. package/dist/src/nocode-web-render/src/logic/index.d.ts +0 -1
  187. package/dist/src/nocode-web-render/src/render/common/index.d.ts +0 -2
  188. package/dist/src/nocode-web-render/src/render/common/modal-manager.d.ts +0 -20
  189. package/dist/src/nocode-web-render/src/render/index.d.ts +0 -10
  190. package/dist/src/nocode-web-render/src/render/parse-rule/index.d.ts +0 -3
  191. package/dist/src/nocode-web-render/src/render/parse-rule/parse-rule-modal.vue.d.ts +0 -15
  192. package/dist/src/nocode-web-render/src/render/sub-table/allocate/allocate-web-render.d.ts +0 -4
  193. package/dist/src/nocode-web-render/src/render/sub-table/allocate/index.d.ts +0 -1
  194. package/dist/src/nocode-web-render/src/render/sub-table/common/multi-rows-modal.vue.d.ts +0 -15
  195. package/dist/src/nocode-web-render/src/render/sub-table/common/scan-modal.vue.d.ts +0 -19
  196. package/dist/src/nocode-web-render/src/render/sub-table/index.d.ts +0 -3
  197. package/dist/src/nocode-web-render/src/render/sub-table/material-balance/index.d.ts +0 -1
  198. package/dist/src/nocode-web-render/src/render/sub-table/material-consume/bom-modal.vue.d.ts +0 -11
  199. package/dist/src/nocode-web-render/src/render/sub-table/material-consume/index.d.ts +0 -4
  200. package/dist/src/nocode-web-render/src/render/sub-table/material-consume/mc-web-render.d.ts +0 -42
  201. package/dist/src/nocode-web-render/src/render/sub-table/stocktake/index.d.ts +0 -2
  202. package/dist/src/nocode-web-render/src/types/hooks/index.d.ts +0 -1
  203. package/dist/src/nocode-web-render/src/types/index.d.ts +0 -1
  204. package/dist/web-render/index.d.ts +0 -1
  205. package/dist/web-render/index.es.js +0 -595
  206. /package/dist/src/{nocode-web-render/src/adapter/index.d.ts → adapter/web/setup.d.ts} +0 -0
  207. /package/dist/src/{nocode-web-render/src/logic/utils.d.ts → adapter/web/upload.d.ts} +0 -0
@@ -0,0 +1,27 @@
1
+ type RequestFn<TParams, TResult> = (params: TParams) => Promise<TResult>;
2
+ interface CacheEntry<TResult> {
3
+ data: TResult;
4
+ expireAt: number;
5
+ }
6
+ export declare const withRequestCache: {
7
+ pendingMap: Map<string, Promise<any>>;
8
+ cacheMap: Map<string, CacheEntry<any>>;
9
+ defaultTTL: number;
10
+ /** 生成唯一 key */
11
+ getKey(url: string, params: any): string;
12
+ /**
13
+ * 处理带缓存与去重的请求
14
+ * @param url 唯一逻辑标识(非实际 API 地址)
15
+ * @param params 请求参数
16
+ * @param requestFn 实际请求函数
17
+ * @param ttl 可选,缓存有效期(毫秒)
18
+ */
19
+ handleRequest<TParams, TResult>(url: string, params: TParams, requestFn: RequestFn<TParams, TResult>, ttl?: number): Promise<TResult>;
20
+ /** 清空全部缓存 */
21
+ clearCache(): void;
22
+ /** 清空 pending 状态 */
23
+ clearPending(): void;
24
+ /** 定期清理过期缓存 */
25
+ cleanupExpiredCache(): void;
26
+ };
27
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { shallowReactive } from "vue";
2
- import { a_ as SubTableActionMenuTypeEnum, a$ as getMenuByAction, b0 as SubTableActionEnum, b1 as resolveScanFillData, aF as SubTableCore, b2 as buildDefaultMapFromProfile, b3 as buildFieldStatusFromProfile, b4 as getRowHandlersForFieldChange, b5 as getInsertSubMenu, b6 as resolveScanAdjustType, b7 as resolveScanQty, b8 as toDateOnly, b9 as hasSubtableBusinessData, ba as getCopySubMenu, bb as resolveScanParsedValue, bc as isProductBatchEmptyRow } from "./dynamic-table-action-Bhkrp7KE.js";
3
- import { E as api, cx as F$1, cy as SCAN_ROW_CONTENT_FIELDS, cz as F$2, cA as F$3, cB as runRowHandler, c as getProfileByTableType, b as isBusinessSubTableProfile, cC as F$4, cD as F$5, cE as FILL_FROM_SOURCE_PRODUCT_OPTION, cF as FILL_FROM_TARGET_MATERIAL_NO_OPTION, cG as FILL_FROM_INVENTORY_OPTION, cH as FILL_FROM_PART_OPTION, cI as FILL_FROM_INVENTORY_OPTION$1, cJ as TABLE_TYPE, cK as FILL_FROM_INVENTORY_OPTION$2, b4 as F$6, cL as INVENTORY_BASE_FIELDS, cM as resolveGroupByWarehouse, cN as AUTO_LOAD_READONLY_SELECT_FIELDS, b3 as STOCKTAKE_DIMENSION, b0 as getParseRuleInfo, cO as buildFillFromInventoryOption, bT as calcFillData, cP as resolveStocktakeInventoryApi, b1 as getParseRuleValue, cQ as F$7, cR as FILL_FROM_INVENTORY_OPTION$3, bZ as extractKeywordFromQueryData, cS as composeProductionLotListQuery, aI as resolveLotDisplayLabel, cT as F$8, cU as isProductManuallyEditable, cV as applyFillFromMfgOrderOption, cW as applyFillFromOption$1, cX as applyFillFromProductOption, a_ as ProductionIdentificationTypeEnum, cY as mergeQueryFilters, cZ as composeMaterialLotListQuery, aS as LOT_CONTAINER_ROLE, c_ as MATERIAL_CONTAINER_ID, c$ as F$9, d0 as PRODUCT_QUICK_SEARCH_FIELDS, d1 as PRODUCT_QUICK_SEARCH_EXP, d2 as isProductManuallyEditable$1, d3 as applyFillFromMaterialNoOption, d4 as applyFillFromProductOption$1, d5 as F$a, d6 as FILL_FROM_INVENTORY_OPTION$4, X as FormTypeEnum, d as getBusinessProfileByRefModelType, aD as transformUtils, f as SubTableType } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-CidYX2eX.js";
2
+ import { a$ as SubTableActionMenuTypeEnum, b0 as getMenuByAction, b1 as SubTableActionEnum, b2 as resolveScanFillData, b3 as resolveScanParsedValue, aG as SubTableCore, b4 as buildDefaultMapFromProfile, b5 as buildFieldStatusFromProfile, b6 as getRowHandlersForFieldChange, b7 as getInsertSubMenu, b8 as resolveScanAdjustType, b9 as resolveScanQty, ba as toDateOnly, bb as hasSubtableBusinessData, bc as getCopySubMenu, bd as isProductBatchEmptyRow } from "./dynamic-table-action-B3QEu1gT.js";
3
+ import { p as api, cO as F$1, aS as resolveLotDisplayLabel, cP as FILL_FROM_TARGET_PRODUCT_OPTION, b4 as resolveLotRecordByValue, b9 as ProductionIdentificationTypeEnum, b2 as buildLotSnListQuery, cQ as F$2, cR as SCAN_ROW_CONTENT_FIELDS, cS as F$3, cT as runRowHandler, c as getProfileByTableType, b as isBusinessSubTableProfile, cU as F$4, cV as F$5, cW as FILL_FROM_SOURCE_PRODUCT_OPTION, cX as FILL_FROM_TARGET_MATERIAL_NO_OPTION, cY as FILL_FROM_INVENTORY_OPTION, cZ as FILL_FROM_PART_OPTION, c_ as FILL_FROM_INVENTORY_OPTION$1, c$ as TABLE_TYPE, d0 as FILL_FROM_INVENTORY_OPTION$2, bf as F$6, d1 as INVENTORY_BASE_FIELDS, d2 as resolveGroupByWarehouse, d3 as AUTO_LOAD_READONLY_SELECT_FIELDS, be as STOCKTAKE_DIMENSION, bb as getParseRuleInfo, d4 as buildFillFromInventoryOption, c7 as calcFillData, d5 as resolveStocktakeInventoryApi, bc as getParseRuleValue, d6 as F$7, d7 as FILL_FROM_INVENTORY_OPTION$3, d8 as LOCKED_INPUT_FIELDS, cd as extractKeywordFromQueryData, d9 as composeProductionLotListQuery, da as F$8, db as isProductManuallyEditable, dc as applyFillFromMfgOrderOption, dd as applyFillFromOption$1, de as applyFillFromProductOption, df as mergeQueryFilters, dg as composeMaterialLotListQuery, b1 as LOT_CONTAINER_ROLE, dh as MATERIAL_CONTAINER_ID, di as F$9, dj as PRODUCT_QUICK_SEARCH_FIELDS, dk as PRODUCT_QUICK_SEARCH_EXP, dl as isProductManuallyEditable$1, dm as applyFillFromMaterialNoOption, dn as applyFillFromProductOption$1, dp as F$a, dq as FILL_FROM_INVENTORY_OPTION$4, a1 as FormTypeEnum, d as getBusinessProfileByRefModelType, aN as transformUtils, h as SubTableType } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-BY59Q_d_.js";
4
4
  import { has, merge } from "lodash-es";
5
5
  class RuntimeInstanceController {
6
6
  context;
@@ -268,6 +268,9 @@ function unwrapBizServiceList(result) {
268
268
  const data = result.data;
269
269
  if (Array.isArray(data)) return data;
270
270
  if (data && typeof data === "object") return [data];
271
+ if (typeof result === "object" && "product_id_" in result) {
272
+ return [result];
273
+ }
271
274
  return [];
272
275
  }
273
276
  async function matchProductionIdentificationScanRecords(parsed) {
@@ -284,6 +287,196 @@ async function matchProductionIdentificationScanRecords(parsed) {
284
287
  );
285
288
  return unwrapBizServiceList(result);
286
289
  }
290
+ function isBlank$4(value) {
291
+ return value === void 0 || value === null || value === "";
292
+ }
293
+ function flattenMaterialConsumeRecord(item) {
294
+ const result = { ...item };
295
+ for (const field of ["product_id_.name_", "product_id_.code_", "product_id_.spec_"]) {
296
+ result[field] = item[field] ?? item._OPCT?.[field] ?? item.__FOREIGN__?.[field];
297
+ }
298
+ return result;
299
+ }
300
+ function normalizeMaterialSubstitutionRecord(item) {
301
+ const result = { ...item };
302
+ result.name_ = item.name_ ?? item.material_no_;
303
+ result.id_ = item.production_identification_id_ ?? item.id_;
304
+ for (const key of ["name_", "code_", "spec_"]) {
305
+ const field = `product_id_${key}`;
306
+ const foreignField = `product_id_.${key}`;
307
+ result[field] = item[field] ?? item[`product_${key}`] ?? item[foreignField] ?? item.__FOREIGN__?.[foreignField] ?? item._OPCT?.[foreignField];
308
+ }
309
+ return result;
310
+ }
311
+ const emptyResult = () => ({ data: [], options: [], finished: true, totalCount: 0, totalPage: 0 });
312
+ function buildSourceMaterialScanPatch(record) {
313
+ const material = normalizeMaterialSubstitutionRecord(record);
314
+ const label = resolveLotDisplayLabel(material);
315
+ return {
316
+ [F$1.sourceProduct]: material.product_id_,
317
+ [F$1.sourceProductLb]: material.product_id_name_ ? JSON.stringify([material.product_id_name_]) : void 0,
318
+ [F$1.sourceMaterialNo]: material.name_,
319
+ [F$1.sourceMaterialNoLb]: label ? JSON.stringify([label]) : void 0,
320
+ [F$1.sourceProductName]: material.product_id_name_,
321
+ [F$1.sourceProductCode]: material.product_id_code_,
322
+ [F$1.sourceProductSpec]: material.product_id_spec_
323
+ };
324
+ }
325
+ function buildTargetMaterialSelectionPatch(record) {
326
+ record = normalizeMaterialSubstitutionRecord(record);
327
+ const hasBatch = !isBlank$4(record.name_);
328
+ const label = hasBatch ? resolveLotDisplayLabel(record) : "";
329
+ return {
330
+ ...Object.fromEntries(
331
+ FILL_FROM_TARGET_PRODUCT_OPTION.map(({ optionField, toField }) => [
332
+ toField,
333
+ record[optionField]
334
+ ])
335
+ ),
336
+ [F$1.targetMaterialNoId]: hasBatch ? record.id_ : void 0,
337
+ [F$1.targetMaterialNoLb]: label ? JSON.stringify([label]) : void 0
338
+ };
339
+ }
340
+ function createMaterialConsumeHistoryLoader(rowData, fieldName = "SN") {
341
+ const beforeOpen = async () => {
342
+ const value = rowData[F$1.productionContainer];
343
+ if (isBlank$4(value)) {
344
+ return {
345
+ allowed: false,
346
+ message: window.$t("sys.pageDesigner.pleaseSelectFirstSth", { sth: fieldName })
347
+ };
348
+ }
349
+ const record = await resolveLotRecordByValue({ id: value });
350
+ if (rowData[F$1.productionContainer] !== value) return { allowed: false };
351
+ const type = record?.production_identification_type_;
352
+ const message = type === ProductionIdentificationTypeEnum.SN ? "" : type === ProductionIdentificationTypeEnum.LOT ? `${fieldName}选择的是 LOT 类型的批次,请选择 SN 类型的批次` : `无法确认${fieldName}的批次信息,请重新选择`;
353
+ return { allowed: !message, message };
354
+ };
355
+ const loader = async ({
356
+ mode,
357
+ queryData = {},
358
+ pageNo = 1,
359
+ pageSize = 20,
360
+ ids = []
361
+ }) => {
362
+ if (mode === "byIds" && ids.length === 1 && ids[0] === rowData[F$1.sourceProduct] && !isBlank$4(rowData[F$1.sourceProductName])) {
363
+ const item = {
364
+ product_id_: rowData[F$1.sourceProduct],
365
+ material_name_: rowData[F$1.sourceMaterialNo],
366
+ qty_consumed_: rowData[F$1.sourceQtyConsumed],
367
+ "product_id_.name_": rowData[F$1.sourceProductName],
368
+ "product_id_.code_": rowData[F$1.sourceProductCode],
369
+ "product_id_.spec_": rowData[F$1.sourceProductSpec]
370
+ };
371
+ return {
372
+ data: [item],
373
+ options: [{ label: item["product_id_.name_"], value: item.product_id_, _item: item }],
374
+ finished: true,
375
+ totalCount: 1,
376
+ totalPage: 1
377
+ };
378
+ }
379
+ const value = rowData[F$1.productionContainer];
380
+ const operation = rowData[F$1.routingOperation];
381
+ if (isBlank$4(value)) return emptyResult();
382
+ const validation = await beforeOpen();
383
+ const isCurrent = () => rowData[F$1.productionContainer] === value && rowData[F$1.routingOperation] === operation;
384
+ if (!validation.allowed || !isCurrent()) return emptyResult();
385
+ const query = Object.fromEntries(
386
+ Object.entries(queryData).filter(
387
+ ([, item]) => Array.isArray(item) ? item.length > 0 : !isBlank$4(item)
388
+ )
389
+ );
390
+ query["production_identification_id_.eq"] = value;
391
+ delete query["routing_operation_id_.eq"];
392
+ if (!isBlank$4(operation)) query["routing_operation_id_.eq"] = operation;
393
+ if (mode === "byIds" && ids.length) query["product_id_.in"] = ids;
394
+ const keys = Object.keys(query);
395
+ const res = await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
396
+ { modelCategory: "entity", modelKey: "em_material_consume", bsKey: "listByPage" },
397
+ {},
398
+ {
399
+ foreignFields: ["product_id_.spec_", "product_id_.code_", "product_id_.name_"],
400
+ query,
401
+ exp: keys.length > 1 ? `AND(${keys.join(",")})` : keys[0] ?? "",
402
+ pageNo,
403
+ pageSize
404
+ }
405
+ );
406
+ if (!isCurrent()) return emptyResult();
407
+ const rows = (Array.isArray(res) ? res : res?.data ?? []).map(flattenMaterialConsumeRecord);
408
+ const totalCount = Number(res?.totalCount ?? rows.length);
409
+ const totalPage = Number(res?.totalPage ?? Math.max(1, Math.ceil(totalCount / pageSize)));
410
+ return {
411
+ data: rows,
412
+ options: rows.map((item) => ({
413
+ label: item["product_id_.name_"] ?? item.material_name_ ?? String(item.product_id_ ?? ""),
414
+ value: item.product_id_,
415
+ disabled: !!item.deleted_,
416
+ _item: item
417
+ })),
418
+ finished: mode === "byIds" || pageNo >= totalPage,
419
+ totalCount,
420
+ totalPage
421
+ };
422
+ };
423
+ loader.beforeOpen = beforeOpen;
424
+ return loader;
425
+ }
426
+ function createTargetMaterialLoader(rowData) {
427
+ const loader = async ({
428
+ mode,
429
+ queryData = {},
430
+ pageNo = 1,
431
+ pageSize = 20,
432
+ ids = []
433
+ }) => {
434
+ const keyword = queryData["name_.iLike"] ?? queryData["name_.like"] ?? "";
435
+ const filters = Object.fromEntries(
436
+ Object.entries(queryData).filter(
437
+ ([key, value]) => !key.endsWith(".like") && !key.endsWith(".iLike") && !isBlank$4(value) && (!Array.isArray(value) || value.length > 0)
438
+ )
439
+ );
440
+ if (mode === "byIds" && ids.length) {
441
+ if (!isBlank$4(rowData[F$1.targetMaterialNoId])) {
442
+ filters["id_.eq"] = rowData[F$1.targetMaterialNoId];
443
+ } else {
444
+ filters["product_id_.in"] = ids;
445
+ }
446
+ }
447
+ const { queryData: query, exp } = buildLotSnListQuery(keyword, filters);
448
+ const res = await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
449
+ {
450
+ modelCategory: "entity",
451
+ modelKey: "em_production_identification",
452
+ bsKey: "biz_get_production_identification"
453
+ },
454
+ {},
455
+ { query, exp, pageNo, pageSize }
456
+ );
457
+ const rows = (Array.isArray(res) ? res : res?.data ?? []).map(
458
+ normalizeMaterialSubstitutionRecord
459
+ );
460
+ const totalCount = Number(res?.totalCount ?? rows.length);
461
+ const totalPage = Number(res?.totalPage ?? Math.max(1, Math.ceil(totalCount / pageSize)));
462
+ return {
463
+ data: rows,
464
+ options: rows.map((item) => ({
465
+ label: item.product_id_name_ ?? String(item.product_id_ ?? ""),
466
+ value: item.product_id_,
467
+ disabled: !!item.deleted_,
468
+ _item: item
469
+ })),
470
+ finished: mode === "byIds" || pageNo >= totalPage,
471
+ totalCount,
472
+ totalPage
473
+ };
474
+ };
475
+ loader.getSelectedKey = () => rowData[F$1.targetMaterialNoId];
476
+ loader.getOptionKey = (option) => option._item?.id_ ?? option.value;
477
+ loader.getSelectionPatch = buildTargetMaterialSelectionPatch;
478
+ return loader;
479
+ }
287
480
  class ProfileDrivenSubTableCore extends SubTableCore {
288
481
  get profile() {
289
482
  const profile = getProfileByTableType(this.ctx.widget.props.tableType);
@@ -345,64 +538,6 @@ const MATERIAL_CONSUME_HISTORY_DISPLAY_FIELDS = [
345
538
  { key: "material_name_", name: "物料批号" },
346
539
  { key: "qty_consumed_", name: "已消耗数量" }
347
540
  ];
348
- function getForeignProductValue(item, field) {
349
- return item[field] ?? item._OPCT?.[field] ?? item.__FOREIGN__?.[field];
350
- }
351
- function flattenMaterialConsumeRecord(item) {
352
- return {
353
- ...item,
354
- "product_id_.name_": getForeignProductValue(item, "product_id_.name_"),
355
- "product_id_.code_": getForeignProductValue(item, "product_id_.code_"),
356
- "product_id_.spec_": getForeignProductValue(item, "product_id_.spec_")
357
- };
358
- }
359
- function hasQueryValue(value) {
360
- if (Array.isArray(value)) return value.length > 0;
361
- return !isBlank$3(value);
362
- }
363
- function createMaterialConsumeHistoryLoader() {
364
- return async ({ mode, queryData = {}, pageNo = 1, pageSize = 20, ids = [] }) => {
365
- const query = Object.fromEntries(
366
- Object.entries(queryData).filter(([, value]) => hasQueryValue(value))
367
- );
368
- if (mode === "byIds" && ids.length) {
369
- query["product_id_.in"] = ids;
370
- }
371
- const queryKeys = Object.keys(query);
372
- const exp = queryKeys.length > 1 ? `AND(${queryKeys.join(",")})` : queryKeys.length === 1 ? queryKeys[0] : "";
373
- const res = await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
374
- {
375
- modelCategory: "entity",
376
- modelKey: "em_material_consume",
377
- bsKey: "listByPage"
378
- },
379
- {},
380
- {
381
- foreignFields: ["product_id_.spec_", "product_id_.code_", "product_id_.name_"],
382
- query,
383
- exp,
384
- pageNo,
385
- pageSize
386
- }
387
- );
388
- const rows = (Array.isArray(res) ? res : res?.data ?? []).map(flattenMaterialConsumeRecord);
389
- const totalCount = Number(res?.totalCount ?? rows.length);
390
- const totalPage = Number(res?.totalPage ?? Math.max(1, Math.ceil(totalCount / pageSize)));
391
- const options = rows.map((item) => ({
392
- label: getForeignProductValue(item, "product_id_.name_") ?? item.material_name_ ?? String(item.product_id_ ?? ""),
393
- value: item.product_id_,
394
- disabled: !!item.deleted_,
395
- _item: item
396
- }));
397
- return {
398
- data: rows,
399
- options,
400
- finished: mode === "byIds" || pageNo >= totalPage,
401
- totalCount,
402
- totalPage
403
- };
404
- };
405
- }
406
541
  function applyAllocatePartTd(params, partField, mode, inventoryBinding) {
407
542
  const { field, tdHandler } = params;
408
543
  if (field !== partField) return;
@@ -486,21 +621,21 @@ class DevicePartConsumeTableCore extends ProfileDrivenSubTableCore {
486
621
  return this.factory.ctx.paramsConfig?.warehouseId;
487
622
  }
488
623
  handleFieldTd = (params) => {
489
- applyAllocatePartTd(params, F$1.part, "inventory", {
490
- formField: F$1.inventory,
624
+ applyAllocatePartTd(params, F$2.part, "inventory", {
625
+ formField: F$2.inventory,
491
626
  optionField: "id_"
492
627
  });
493
628
  super.handleFieldTd(params);
494
629
  };
495
630
  calcFieldQuery = (params) => {
496
- if (params.field === F$1.part) {
631
+ if (params.field === F$2.part) {
497
632
  return { warehouse_id_: this.warehouseId };
498
633
  }
499
634
  };
500
635
  handleChange(params) {
501
636
  super.handleChange(params);
502
637
  const { field, value, option, rowData } = params;
503
- if (field !== F$1.part || isBlank$3(value) || !option) return;
638
+ if (field !== F$2.part || isBlank$3(value) || !option) return;
504
639
  applyOptionFill(rowData, option, FILL_FROM_INVENTORY_OPTION$2);
505
640
  }
506
641
  }
@@ -512,14 +647,38 @@ class MaterialSubstitutionTableCore extends ProfileDrivenSubTableCore {
512
647
  }
513
648
  handleFieldTd = (params) => {
514
649
  const { field, tdHandler } = params;
515
- if (field === F$2.sourceProduct) {
650
+ if (field === F$1.targetProduct) {
651
+ const rules = tdHandler.td.cellWidget.props.autofillRules;
652
+ if (rules) {
653
+ tdHandler.mergeTd({
654
+ cellWidget: {
655
+ props: {
656
+ autofillRules: rules.filter(
657
+ (rule) => rule.fromField !== "qty_consumed_" || rule.toField !== F$1.targetQtyConsumed
658
+ )
659
+ }
660
+ }
661
+ });
662
+ }
663
+ }
664
+ if (field === F$1.sourceProduct || field === F$1.targetProduct) {
516
665
  tdHandler.mergeTd({
517
666
  cellWidget: {
518
667
  props: {
519
- displayFields: MATERIAL_CONSUME_HISTORY_DISPLAY_FIELDS,
668
+ displayFields: field === F$1.sourceProduct ? MATERIAL_CONSUME_HISTORY_DISPLAY_FIELDS : [
669
+ { key: "name_", name: "LOT/SN" },
670
+ { key: "product_id_code_", name: "物料编码" },
671
+ { key: "product_id_name_", name: "物料名称" },
672
+ { key: "product_id_spec_", name: "物料规格" }
673
+ ],
520
674
  quickSearchable: true,
521
- quickSearchField: ["material_name_.like"],
522
- quickSearchExp: "OR(material_name_.like)",
675
+ quickSearchField: field === F$1.sourceProduct ? ["material_name_.iLike"] : [
676
+ "name_.iLike",
677
+ "related_parent_name_.iLike",
678
+ "product_id_code_.iLike",
679
+ "product_id_name_.iLike",
680
+ "spec_.iLike"
681
+ ],
523
682
  customRefTableMode: "flat",
524
683
  newSpecificConfig: { newOptions: [] }
525
684
  }
@@ -529,20 +688,22 @@ class MaterialSubstitutionTableCore extends ProfileDrivenSubTableCore {
529
688
  super.handleFieldTd(params);
530
689
  };
531
690
  calcFieldQuery = ({ field, rowData }) => {
532
- if (field !== F$2.sourceProduct) return;
691
+ if (field !== F$1.sourceProduct) return;
533
692
  const query = {};
534
- if (!isBlank$3(rowData[F$2.productionContainer])) {
535
- query["production_identification_id_.eq"] = rowData[F$2.productionContainer];
693
+ if (!isBlank$3(rowData[F$1.productionContainer])) {
694
+ query["production_identification_id_.eq"] = rowData[F$1.productionContainer];
536
695
  }
537
- if (!isBlank$3(rowData[F$2.routingOperation])) {
538
- query["routing_operation_id_.eq"] = rowData[F$2.routingOperation];
696
+ if (!isBlank$3(rowData[F$1.routingOperation])) {
697
+ query["routing_operation_id_.eq"] = rowData[F$1.routingOperation];
539
698
  }
540
699
  return query;
541
700
  };
542
- calcFieldDataSource = ({ field }) => {
543
- if (field === F$2.sourceProduct) {
544
- return createMaterialConsumeHistoryLoader();
701
+ calcFieldDataSource = ({ field, rowData }) => {
702
+ if (field === F$1.sourceProduct) {
703
+ const fieldName = this.formModelController?.getSubModelFields(this.subModelKey)?.find((item) => item.key === F$1.productionContainer)?.name;
704
+ return createMaterialConsumeHistoryLoader(rowData, fieldName);
545
705
  }
706
+ if (field === F$1.targetProduct) return createTargetMaterialLoader(rowData);
546
707
  };
547
708
  handleChange(params) {
548
709
  super.handleChange(params);
@@ -550,7 +711,7 @@ class MaterialSubstitutionTableCore extends ProfileDrivenSubTableCore {
550
711
  if (isBlank$3(value) || !option) return;
551
712
  const source = resolveOptionRecord$1(option);
552
713
  if (!source) return;
553
- if (field === F$2.sourceProduct) {
714
+ if (field === F$1.sourceProduct) {
554
715
  applyOptionFill(
555
716
  rowData,
556
717
  flattenMaterialConsumeRecord(source),
@@ -558,8 +719,16 @@ class MaterialSubstitutionTableCore extends ProfileDrivenSubTableCore {
558
719
  );
559
720
  return;
560
721
  }
561
- if (field === F$2.targetMaterialNo) {
562
- applyOptionFill(rowData, source, FILL_FROM_TARGET_MATERIAL_NO_OPTION);
722
+ if (field === F$1.targetProduct) {
723
+ Object.assign(rowData, buildTargetMaterialSelectionPatch(source));
724
+ return;
725
+ }
726
+ if (field === F$1.targetMaterialNo) {
727
+ applyOptionFill(
728
+ rowData,
729
+ normalizeMaterialSubstitutionRecord(source),
730
+ FILL_FROM_TARGET_MATERIAL_NO_OPTION
731
+ );
563
732
  }
564
733
  }
565
734
  calcSubTableActionMenu = ({ showDelBtn }) => [
@@ -584,11 +753,36 @@ class MaterialSubstitutionTableCore extends ProfileDrivenSubTableCore {
584
753
  ] : []
585
754
  ];
586
755
  async onScan(input) {
587
- const fillData = resolveScanFillData(input);
756
+ const fillData = { ...resolveScanFillData(input) };
588
757
  if (!Object.keys(fillData).length) {
589
758
  this.warning({ content: "未配置条码字段映射" });
590
759
  return;
591
760
  }
761
+ const parsed = resolveScanParsedValue(input);
762
+ if (!parsed || !hasProductionIdentificationScanKey(parsed)) {
763
+ this.error({ content: PRODUCTION_IDENTIFICATION_SCAN_LOT_OR_UNIQUE_REQUIRED_MSG });
764
+ return;
765
+ }
766
+ const records = await matchProductionIdentificationScanRecords(parsed);
767
+ if (!records.length) {
768
+ this.error({ content: PRODUCTION_IDENTIFICATION_SCAN_NOT_FOUND_MSG });
769
+ return;
770
+ }
771
+ const selected = await this.pickScanRecord(records.map(normalizeMaterialSubstitutionRecord));
772
+ if (!selected) return;
773
+ if (isBlank$3(selected.product_id_)) {
774
+ this.error({ content: PRODUCTION_IDENTIFICATION_SCAN_NOT_FOUND_MSG });
775
+ return;
776
+ }
777
+ if (F$1.sourceMaterialNo in fillData || F$1.sourceProduct in fillData) {
778
+ Object.assign(fillData, buildSourceMaterialScanPatch(selected));
779
+ }
780
+ if (F$1.targetMaterialNo in fillData || F$1.targetProduct in fillData) {
781
+ Object.assign(fillData, buildTargetMaterialSelectionPatch(selected), {
782
+ [F$1.targetProduct]: selected.product_id_,
783
+ [F$1.targetProductLb]: selected.product_id_name_ ? JSON.stringify([selected.product_id_name_]) : void 0
784
+ });
785
+ }
592
786
  this.appendOrFillScanRow(fillData);
593
787
  }
594
788
  }
@@ -1136,14 +1330,6 @@ const F = {
1136
1330
  /** 生产日期 */
1137
1331
  productionDate: "production_date_"
1138
1332
  };
1139
- const STERILIZE_ALWAYS_DISABLED_FIELDS = [
1140
- F.product,
1141
- F.productCode,
1142
- F.productSpec,
1143
- F.productName,
1144
- F.mfgOrderCode,
1145
- F.mfgOrder
1146
- ];
1147
1333
  const CLEAR_ON_PROD_CONTAINER_EMPTY = [
1148
1334
  F.product,
1149
1335
  F.productLb,
@@ -1278,8 +1464,9 @@ class SterilizeBatchTableCore extends SubTableCore {
1278
1464
  };
1279
1465
  calcFieldStatus(params) {
1280
1466
  const result = super.calcFieldStatus(params);
1281
- if (STERILIZE_ALWAYS_DISABLED_FIELDS.includes(params.field)) {
1467
+ if (LOCKED_INPUT_FIELDS.includes(params.field)) {
1282
1468
  result.disabled = true;
1469
+ result.required = true;
1283
1470
  }
1284
1471
  return result;
1285
1472
  }
@@ -1,9 +1,10 @@
1
1
  import { defineComponent, computed, openBlock, createElementBlock, normalizeStyle, normalizeClass, createCommentVNode, createElementVNode, toDisplayString } from "vue";
2
2
  import { pick } from "lodash-es";
3
- import { Q as PaperWidgeValueType, a7 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-CidYX2eX.js";
3
+ import { Y as PaperWidgeValueType, ae as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-BY59Q_d_.js";
4
4
  import "dayjs";
5
+ import "@gct-paas/form-base";
5
6
  import "ant-design-vue";
6
- import { u as useSpreadSheet, h as useModelFields } from "./index-DdOpcuy6.js";
7
+ import { u as useSpreadSheet, h as useModelFields } from "./index-BdkVqSGZ.js";
7
8
  const _hoisted_1 = { class: "ws-pre-wrap" };
8
9
  const _sfc_main = /* @__PURE__ */ defineComponent({
9
10
  __name: "text-design",
@@ -1,5 +1,5 @@
1
1
  import { g as getScrollDimension } from "./viewport.helpers-CoCAvmZs-D_JddDC6.js";
2
- import { e4 as isObject, du as debounce } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-CidYX2eX.js";
2
+ import { en as isObject, dN as debounce } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-BY59Q_d_.js";
3
3
  const initialParams = {
4
4
  contentSize: 0,
5
5
  clientSize: 0,
@@ -1,7 +1,8 @@
1
1
  import { defineComponent, openBlock, createElementBlock, toDisplayString, unref } from "vue";
2
- import { aj as TimeDiffFormat } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-CidYX2eX.js";
2
+ import { aq as TimeDiffFormat } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-BY59Q_d_.js";
3
3
  import "lodash-es";
4
4
  import "dayjs";
5
+ import "@gct-paas/form-base";
5
6
  import "ant-design-vue";
6
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
8
  __name: "timediff-design",
@@ -1,9 +1,10 @@
1
1
  import { get, pick } from "lodash-es";
2
- import { F as FIELD_TYPE, a$ as BindCmpStyleEnum } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-CidYX2eX.js";
2
+ import { F as FIELD_TYPE, ba as BindCmpStyleEnum } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-BY59Q_d_.js";
3
3
  import "vue";
4
4
  import "dayjs";
5
+ import "@gct-paas/form-base";
5
6
  import "ant-design-vue";
6
- import { i as isSterilizationLotField, a as getSterilizationLotDisplayFields, s as showDisplayAndSearchConfig, r as resolveQuickSearchConfig } from "./index-DdOpcuy6.js";
7
+ import { i as isSterilizationLotField, a as getSterilizationLotDisplayFields, s as showDisplayAndSearchConfig, r as resolveQuickSearchConfig } from "./index-BdkVqSGZ.js";
7
8
  function getTraceLikeSelectProps(data) {
8
9
  const isSubtableMfgOrder = !!data.info.subModelKey && (data.info.bizType === FIELD_TYPE.MFG_ORDER || data.info.fieldType === FIELD_TYPE.MFG_ORDER);
9
10
  const displayFields = (() => {
@@ -1,8 +1,9 @@
1
1
  import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, Fragment, renderList, createBlock, createTextVNode, toDisplayString, createElementVNode, unref, createCommentVNode } from "vue";
2
2
  import { pick } from "lodash-es";
3
- import { h as useModelFields, u as useSpreadSheet, m as useDrop, P as PanelType, T as TransferType, V as ValueEditorFieldDropBoxId, S as SingleDrop, o as getFieldIcon } from "./index-DdOpcuy6.js";
4
- import { Q as PaperWidgeValueType, aq as ExpressionModeEnum, as as ExpressionTabEnum } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-CidYX2eX.js";
3
+ import { h as useModelFields, u as useSpreadSheet, m as useDrop, P as PanelType, T as TransferType, V as ValueEditorFieldDropBoxId, S as SingleDrop, o as getFieldIcon } from "./index-BdkVqSGZ.js";
4
+ import { Y as PaperWidgeValueType, ax as ExpressionModeEnum, az as ExpressionTabEnum } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-BY59Q_d_.js";
5
5
  import "dayjs";
6
+ import "@gct-paas/form-base";
6
7
  import "ant-design-vue";
7
8
  const _hoisted_1 = { class: "mt-4px" };
8
9
  const _hoisted_2 = ["id"];
@@ -1,11 +1,12 @@
1
1
  import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, Fragment, createVNode, withCtx, renderList, createBlock, createTextVNode, toDisplayString, createElementVNode } from "vue";
2
- import { u as useSpreadSheet, B as BwipCodeTypeOptions, F as FormItem } from "./index-DdOpcuy6.js";
3
- import { _ as _sfc_main$1 } from "./value-editor.vue_vue_type_style_index_0_lang-Dp_NLPcS.js";
4
- import { o as PaperWidgeType } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-CidYX2eX.js";
2
+ import { u as useSpreadSheet, B as BwipCodeTypeOptions, F as FormItem } from "./index-BdkVqSGZ.js";
3
+ import { _ as _sfc_main$1 } from "./value-editor.vue_vue_type_style_index_0_lang-BuGHTPEo.js";
4
+ import { q as PaperWidgeType } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-BY59Q_d_.js";
5
5
  import "lodash-es";
6
6
  import "dayjs";
7
+ import "@gct-paas/form-base";
7
8
  import "ant-design-vue";
8
- import { A as AlignEditor } from "./align-editor--BUxJjPg.js";
9
+ import { A as AlignEditor } from "./align-editor-DJ859WQZ.js";
9
10
  const _hoisted_1 = { class: "pl-6px" };
10
11
  const _hoisted_2 = { class: "flex justify-end" };
11
12
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,11 +1,11 @@
1
1
  import { defineComponent, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, withCtx, createElementVNode, toDisplayString, createVNode, watch, createElementBlock, Fragment, createCommentVNode } from "vue";
2
- import { F as FormItem, q as SelectEx } from "./index-DdOpcuy6.js";
2
+ import { F as FormItem, q as SelectEx } from "./index-BdkVqSGZ.js";
3
3
  import { defaults } from "lodash-es";
4
- import { F as FIELD_TYPE, a7 as _export_sfc, ag as DiagonalDirection, ak as DiagonalVertex, ce as migrateDiagonalDirectionToVertex } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-CidYX2eX.js";
4
+ import { ad as useNamespace, F as FIELD_TYPE, ae as _export_sfc, an as DiagonalDirection, ar as DiagonalVertex, cu as migrateDiagonalDirectionToVertex } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-BY59Q_d_.js";
5
5
  import "dayjs";
6
+ import "@gct-paas/form-base";
6
7
  import { message } from "ant-design-vue";
7
- import { a as useNamespace } from "./AntdIcon-DCIaV352.js";
8
- import { S as SingleFieldDrop } from "./single-field-drop-CnuMgeEW.js";
8
+ import { S as SingleFieldDrop } from "./single-field-drop-Bj73o6Jt.js";
9
9
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
10
10
  __name: "diagonal-name-editor",
11
11
  props: {
@@ -1,14 +1,12 @@
1
1
  import { defineComponent, reactive, ref, computed, watchEffect, createVNode, unref, createTextVNode, render, resolveComponent, openBlock, createElementBlock, Fragment, withCtx, createElementVNode, withModifiers, createCommentVNode, toDisplayString, renderList, createBlock } from "vue";
2
- import { L as LeftOutlined, R as RightOutlined, t as isClient, u as useSpreadSheet, F as FormItem, v as ImgParser } from "./index-DdOpcuy6.js";
3
- import { S as SizeEditor } from "./size-editor-D4ZNlV-c.js";
2
+ import { L as LeftOutlined, R as RightOutlined, t as isClient, u as useSpreadSheet, F as FormItem, v as ImgParser } from "./index-BdkVqSGZ.js";
3
+ import { S as SizeEditor } from "./size-editor-Bps566OT.js";
4
4
  import { message } from "ant-design-vue";
5
- import { ah as WidgetImageSizeMode, a7 as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-CidYX2eX.js";
5
+ import { ao as WidgetImageSizeMode, ae as _export_sfc } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-BY59Q_d_.js";
6
6
  import "lodash-es";
7
7
  import "dayjs";
8
- import { u as useWebUpload } from "./index-B6csmYLK.js";
9
8
  import "@gct-paas/form-base";
10
- import "vxe-table";
11
- import { C as CloseOutlined } from "./online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-219qzsVL.js";
9
+ import { C as CloseOutlined, u as useWebUpload } from "./online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-BftaGVRR.js";
12
10
  const resumeSvg = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1595307154239'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7317'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='48'%20height='48'%3e%3cdefs%3e%3cstyle%20type='text/css'%3e%3c/style%3e%3c/defs%3e%3cpath%20d='M316%20672h60c4.4%200%208-3.6%208-8V360c0-4.4-3.6-8-8-8h-60c-4.4%200-8%203.6-8%208v304c0%204.4%203.6%208%208%208zM512%20622c22.1%200%2040-17.9%2040-39%200-23.1-17.9-41-40-41s-40%2017.9-40%2041c0%2021.1%2017.9%2039%2040%2039zM512%20482c22.1%200%2040-17.9%2040-39%200-23.1-17.9-41-40-41s-40%2017.9-40%2041c0%2021.1%2017.9%2039%2040%2039z'%20p-id='7318'%20fill='%23ffffff'%3e%3c/path%3e%3cpath%20d='M880%20112H144c-17.7%200-32%2014.3-32%2032v736c0%2017.7%2014.3%2032%2032%2032h736c17.7%200%2032-14.3%2032-32V144c0-17.7-14.3-32-32-32z%20m-40%20728H184V184h656v656z'%20p-id='7319'%20fill='%23ffffff'%3e%3c/path%3e%3cpath%20d='M648%20672h60c4.4%200%208-3.6%208-8V360c0-4.4-3.6-8-8-8h-60c-4.4%200-8%203.6-8%208v304c0%204.4%203.6%208%208%208z'%20p-id='7320'%20fill='%23ffffff'%3e%3c/path%3e%3c/svg%3e";
13
11
  const rotateSvg = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1595306944988'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1820'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='48'%20height='48'%3e%3cdefs%3e%3cstyle%20type='text/css'%3e%3c/style%3e%3c/defs%3e%3cpath%20d='M1464.3%20279.7'%20p-id='1821'%20fill='%23ffffff'%3e%3c/path%3e%3cpath%20d='M512%20960c-60.5%200-119.1-11.9-174.4-35.2-53.4-22.6-101.3-54.9-142.4-96s-73.4-89-96-142.4C75.9%20631.1%2064%20572.5%2064%20512s11.9-119.1%2035.2-174.4c22.6-53.4%2054.9-101.3%2096-142.4s89-73.4%20142.4-96C392.9%2075.9%20451.5%2064%20512%2064s119.1%2011.9%20174.4%2035.2c53.4%2022.6%20101.3%2054.9%20142.4%2096s73.4%2089%2096%20142.4C948.1%20392.9%20960%20451.5%20960%20512c0%2019.1-15.5%2034.6-34.6%2034.6s-34.6-15.5-34.6-34.6c0-51.2-10-100.8-29.8-147.4-19.1-45.1-46.4-85.6-81.2-120.4C745%20209.4%20704.5%20182%20659.4%20163c-46.7-19.7-96.3-29.8-147.4-29.8-51.2%200-100.8%2010-147.4%2029.8-45.1%2019.1-85.6%2046.4-120.4%2081.2S182%20319.5%20163%20364.6c-19.7%2046.7-29.8%2096.3-29.8%20147.4%200%2051.2%2010%20100.8%2029.8%20147.4%2019.1%2045.1%2046.4%2085.6%2081.2%20120.4C279%20814.6%20319.5%20842%20364.6%20861c46.7%2019.7%2096.3%2029.8%20147.4%2029.8%2064.6%200%20128.4-16.5%20184.4-47.8%2054.4-30.4%20100.9-74.1%20134.6-126.6%2010.3-16.1%2031.7-20.8%2047.8-10.4%2016.1%2010.3%2020.8%2031.7%2010.4%2047.8-39.8%2062-94.8%20113.7-159.1%20149.6-66.2%2037-141.7%2056.6-218.1%2056.6z'%20p-id='1822'%20fill='%23ffffff'%3e%3c/path%3e%3cpath%20d='M924%20552c-19.8%200-36-16.2-36-36V228c0-19.8%2016.2-36%2036-36s36%2016.2%2036%2036v288c0%2019.8-16.2%2036-36%2036zM275.4%20575.5c9.5-2.5%2019.1%202.9%2022.3%2012.2%203.5%2010.2%209.9%2017.7%2019.1%2022.6%207.1%203.9%2015.1%205.8%2024%205.8%2016.6%200%2030.8-6.9%2042.5-20.8%2011.7-13.8%2020-32.7%2024.9-75.1-7.7%2012.2-17.3%2020.8-28.7%2025.8-11.4%205-23.7%207.4-36.8%207.4-26.7%200-47.7-8.3-63.3-24.9-15.5-16.6-23.3-37.9-23.3-64.1%200-25.1%207.7-47.1%2023-66.2%2015.3-19%2037.9-28.6%2067.8-28.6%2040.3%200%2068.1%2018.1%2083.4%2054.4%208.5%2019.9%2012.7%2044.9%2012.7%2074.9%200%2033.8-5.1%2063.8-15.3%2089.9-16.9%2043.5-45.5%2065.2-85.8%2065.2-27%200-47.6-7.1-61.6-21.2-10-10.1-16.4-22-19.3-35.8-2-9.6%204-19.1%2013.5-21.6l0.9%200.1z%20m103-74.4c9.4-7.5%2014.1-20.6%2014.1-39.3%200-16.8-4.2-29.3-12.7-37.5S360.6%20412%20347.5%20412c-14%200-25.2%204.7-33.4%2014.1-8.2%209.4-12.4%2022-12.4%2037.7%200%2014.9%203.6%2026.7%2010.9%2035.5%207.2%208.8%2018.8%2013.1%2034.6%2013.1%2011.4%200%2021.8-3.8%2031.2-11.3zM646.6%20414.4c12.4%2022.8%2018.5%2054%2018.5%2093.7%200%2037.6-5.6%2068.7-16.8%2093.3-16.2%2035.3-42.8%2052.9-79.6%2052.9-33.2%200-57.9-14.4-74.2-43.3-13.5-24.1-20.3-56.4-20.3-97%200-31.4%204.1-58.4%2012.2-80.9%2015.2-42%2042.7-63%2082.5-63%2035.9%200%2061.8%2014.8%2077.7%2044.3z%20m-40.2%20173.3c9.4-13.9%2014-39.9%2014-78%200-27.4-3.4-50-10.1-67.7-6.8-17.7-19.9-26.6-39.4-26.6-17.9%200-31%208.4-39.3%2025.2-8.3%2016.8-12.4%2041.6-12.4%2074.3%200%2024.6%202.6%2044.4%207.9%2059.4%208.1%2022.8%2022%2034.3%2041.6%2034.3%2015.7%200%2028.3-7%2037.7-20.9zM803.3%20387.2c11.2%2011.3%2016.8%2025%2016.8%2041.2%200%2016.7-5.8%2030.7-17.5%2041.8C791%20481.4%20777.4%20487%20762%20487c-17.1%200-31.2-5.8-42.1-17.4-10.9-11.6-16.4-25.1-16.4-40.6%200-16.5%205.8-30.4%2017.3-41.7%2011.5-11.3%2025.3-17%2041.2-17%2016.3%200%2030.1%205.7%2041.3%2016.9zM739.5%20451c6.2%206.2%2013.7%209.3%2022.5%209.3%208.4%200%2015.8-3.1%2022.1-9.3%206.3-6.2%209.4-13.7%209.4-22.6%200-8.5-3.1-15.9-9.3-22.1-6.2-6.2-13.6-9.3-22.2-9.3s-16.1%203.1-22.4%209.3c-6.3%206.2-9.4%2013.7-9.4%2022.6-0.1%208.4%203%2015.8%209.3%2022.1z'%20p-id='1823'%20fill='%23ffffff'%3e%3c/path%3e%3c/svg%3e";
14
12
  const scaleSvg = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1595307195033'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='8116'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='48'%20height='48'%3e%3cdefs%3e%3cstyle%20type='text/css'%3e%3c/style%3e%3c/defs%3e%3cpath%20d='M887.081%20904.791a25.8%2025.8%200%200%201-18.376-7.619L705.618%20734.075l-4.163%203.369c-58.255%2047.18-131.522%2073.16-206.32%2073.16-181.07%200-328.377-147.308-328.377-328.367%200-181.068%20147.308-328.376%20328.377-328.376%20181.063%200%20328.376%20147.308%20328.376%20328.376%200%2077.072-27.412%20152.07-77.169%20211.17l-3.522%204.173%20162.719%20162.744a25.846%2025.846%200%200%201%207.639%2018.432%2026.081%2026.081%200%200%201-26.051%2026.045l-0.046-0.01zM495.13%20205.957c-152.336%200-276.27%20123.935-276.27%20276.27%200%20152.33%20123.934%20276.27%20276.27%20276.27%20152.34%200%20276.275-123.94%20276.275-276.27%200-152.335-123.935-276.27-276.275-276.27z'%20fill='%23ffffff'%20p-id='8117'%3e%3c/path%3e%3cpath%20d='M626.545%20508.355h-262.83a26.127%2026.127%200%200%201%200-52.255h262.83a26.127%2026.127%200%200%201%200%2052.255z'%20fill='%23ffffff'%20p-id='8118'%3e%3c/path%3e%3cpath%20d='M495.13%20639.77a26.127%2026.127%200%200%201-26.128-26.128v-262.83a26.127%2026.127%200%200%201%2052.255%200v262.835a26.127%2026.127%200%200%201-26.127%2026.123z'%20fill='%23ffffff'%20p-id='8119'%3e%3c/path%3e%3c/svg%3e";
@@ -529,7 +527,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
529
527
  };
530
528
  }
531
529
  });
532
- const widgetImage = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e1d708f2"]]);
530
+ const widgetImage = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f7f197c6"]]);
533
531
  export {
534
532
  widgetImage as default
535
533
  };