@gct-paas/excel 0.1.28-beta.2 → 0.1.28-beta.21
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.
- package/dist/{VueVideoPlayer-B6X1JmEL.js → VueVideoPlayer-DCU2I_H7.js} +2 -2
- package/dist/{agg-design-DZpDRz0Y.js → agg-design-RbW6fgNa.js} +1 -1
- package/dist/{agg-props-ockP_cAM.js → agg-props-CfoEBrRu.js} +1 -1
- package/dist/{agg-style-C7nWM2if.js → agg-style-CgbQAKr0.js} +1 -1
- package/dist/{align-editor-DpWvsI_x.js → align-editor-B80IEr3w.js} +1 -1
- package/dist/{attach-fields-editor-BbWYEXfG.js → attach-fields-editor-BIiVvohl.js} +2 -2
- package/dist/{barcode-design-D1hSeWVJ.js → barcode-design-DOLYhwbG.js} +2 -2
- package/dist/base/index.es.js +886 -703
- package/dist/{base-font-editor-DFHc_3JJ.js → base-font-editor-e9sd4IkJ.js} +2 -2
- package/dist/{boolean-design-UO0nUx1k.js → boolean-design-Dlu6lW8d.js} +8 -7
- package/dist/{boolean-props--l1hf_NI.js → boolean-props-s96hsuRe.js} +3 -3
- package/dist/{boolean-style-Dqwd3N4b.js → boolean-style-f5mMhRME.js} +4 -4
- package/dist/{cell-upload-PkWTiWYW.js → cell-upload-DYgGT9In.js} +8 -11
- package/dist/{date-range-editor-CVQsTg3G.js → date-range-editor-BUGosnLi.js} +2 -2
- package/dist/{date-time-design-DmeUPsi-.js → date-time-design-BdZ_d-PG.js} +25 -6
- package/dist/{date-time-props-DqAAdD7L.js → date-time-props-tlQ_cWpv.js} +3 -3
- package/dist/{date-time-style-BTtKVpV4.js → date-time-style--7vBwDaL.js} +1 -1
- package/dist/{decimal-design-DQ-61MMF.js → decimal-design-C0K5wkAw.js} +1 -1
- package/dist/{decimal-display-mode-CPL-jNCK.js → decimal-display-mode-C3qGt4Zt.js} +2 -2
- package/dist/{decimal-props-DUeC4_o5.js → decimal-props-PGR7K6rT.js} +4 -4
- package/dist/{decimal-style-B-0QILJa.js → decimal-style-D2u4XTHf.js} +1 -1
- 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-BWpYVxPc.js} +2 -2
- package/dist/{diagonal-design-Cx7RTy6_.js → diagonal-design-BrGfDqGb.js} +2 -2
- package/dist/{double-design-Bpuy9Ss3.js → double-design-B1Uiy26Z.js} +1 -1
- package/dist/{double-props-BLp5rMS0.js → double-props-yH1fU0x4.js} +6 -4
- package/dist/{double-style-BQT4UDRo.js → double-style-BVx9woku.js} +1 -1
- package/dist/{dynamic-table-action-CT_aYOca.js → dynamic-table-action-Bg2X8eeh.js} +586 -380
- 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-B-KhKgs2.js} +700 -332
- package/dist/{edit.utils-CXmmCnxE-CrBcZqbG.js → edit.utils-CXmmCnxE-C46O9P-0.js} +1 -1
- package/dist/{enum-design-DTh9UhHf.js → enum-design-D7-yLeJb.js} +11 -4
- package/dist/{enum-props-J-3PLabW.js → enum-props-COQQfulB.js} +68 -47
- package/dist/{enum-style-h5lmzZD_.js → enum-style-CcebnktY.js} +3 -3
- package/dist/excel.css +1373 -722
- package/dist/{exceljs.min-mW_Nqru2.js → exceljs.min-Muu74e_A.js} +2 -2
- package/dist/{expression-design-Cbi_6pnX.js → expression-design-DIJRzVab.js} +1 -1
- package/dist/{expression-props-DuvdDUWt.js → expression-props-Dd1_kGVD.js} +1 -1
- package/dist/{expression-style-CcdTrGye.js → expression-style-Bp-2sfOx.js} +1 -1
- package/dist/{file-design-Cix4ztNq.js → file-design-DLIY-29d.js} +1 -1
- package/dist/{file-props-DvZgFCjv.js → file-props-QGxoOGHI.js} +5 -4
- package/dist/{file-style-DTXliETB.js → file-style-CQZsWmvF.js} +1 -1
- package/dist/{font-editor-D_4CECiK.js → font-editor-DyrF1wB8.js} +3 -3
- package/dist/{image-design-BxFQTm4-.js → image-design-4odCIiI7.js} +3 -2
- package/dist/{image-design-IaQbw4Bv.js → image-design-eVwFd3tD.js} +1 -1
- package/dist/{image-props-BmLfiJIb.js → image-props-cT1RL-gD.js} +1 -1
- package/dist/{image-style-BuGQiWh9.js → image-style-MnNoeDW2.js} +1 -1
- package/dist/{index-hkXYQoCV.js → index-2I_EN7Yx.js} +6 -6
- package/dist/{index-DnxIXenr.js → index-2gNIJ0-V.js} +2 -2
- package/dist/{index-Dl48Dmuf.js → index-3JgiYInP.js} +1 -1
- package/dist/{index-CvefH3Ld.js → index-BBnBDqub.js} +1 -1
- package/dist/{index-V3KPtSlA.js → index-BC-6IALL.js} +1 -1
- package/dist/{index-DIHeOfRf.js → index-BEKNxaNo.js} +1 -1
- package/dist/{index-T_P3hv-X.js → index-BITMorpM.js} +2 -2
- package/dist/{index-DuELqbrc.js → index-BcLaruk3.js} +1 -1
- package/dist/{index-C7XazAkv.js → index-BeFplGKa.js} +121 -455
- package/dist/{index-CO1Iw_97.js → index-BhgnUKpp.js} +1 -1
- package/dist/{index-VU8yct3A.js → index-BidsDLhX.js} +1 -1
- package/dist/{index-5E89tzgQ.js → index-Bn9kqGy7.js} +1 -1
- package/dist/{index-PgmRu5Zh.js → index-C-e2nOug.js} +1 -1
- package/dist/{index-CYc23F99.js → index-CBIz0i4u.js} +1 -1
- package/dist/{index-1kSDRqJL.js → index-CEa50csS.js} +1 -1
- package/dist/{index-CSGDQQxf.js → index-CLKf0Gla.js} +6 -6
- package/dist/{index-HHW_GvS9.js → index-CMN7FUpJ.js} +1 -1
- package/dist/{index-aZhb-M_v.js → index-CO1k5u4I.js} +1 -1
- package/dist/{index-BKQgEYOt.js → index-CRbhhL-C.js} +1 -1
- package/dist/{index-CmfE-VkX.js → index-CaNmok7V.js} +1 -1
- package/dist/{index-BCFgHqQ4.js → index-Cjfws4Sx.js} +1 -1
- package/dist/{index-BuucdbMD.js → index-CnH58RKA.js} +1 -1
- package/dist/{index-BSWx0ysi.js → index-DCucm9qw.js} +1 -1
- package/dist/{index-DJsySg7Z.js → index-DJRgFTjP.js} +1 -1
- package/dist/{index-CdoJjtvt.js → index-DS3Z0wlu.js} +2 -2
- package/dist/{index-BRifPJNN.js → index-DW9FL8UO.js} +2 -2
- package/dist/{index-DG8SGSHV.js → index-DlGnj7bK.js} +1 -1
- package/dist/{index-hcp9zj3F.js → index-QFP7aiss.js} +7621 -3448
- package/dist/{index-uIR6j0YE.js → index-bk4bX2Xm.js} +1 -1
- package/dist/{index-DAVndG-D.js → index-islXi0nD.js} +2 -2
- package/dist/{index-DayP0trN.js → index-kCtDgCx3.js} +1 -1
- package/dist/{index-6AnvwL1T.js → index-oabZhVuL.js} +1 -1
- package/dist/{index-BUEsJ6db.js → index-tWQfSOrQ.js} +1 -1
- package/dist/index.es.js +45 -45
- package/dist/{integer-design-B48BapfF.js → integer-design-BD-LDEV_.js} +1 -1
- package/dist/{integer-props-G5n3P-Vt.js → integer-props-DZvJ_bdU.js} +4 -4
- package/dist/{integer-style-yziEYd90.js → integer-style-CxTdmZsN.js} +1 -1
- package/dist/{mb-render-DiWQ5hOn.js → mb-render-B9PVK2lM.js} +2 -1
- package/dist/{number-input-ex-6e_-B7y7.js → number-input-ex-BpIoI25j.js} +1 -1
- package/dist/{org-design-DEibx7uD.js → org-design-DWZI8xev.js} +1 -1
- package/dist/{org-props-uZzEnRfn.js → org-props-D0D94kmP.js} +2 -2
- package/dist/{org-style-CtYMw9ob.js → org-style-B_7Bhmgz.js} +1 -1
- package/dist/{pagination-design-CdnyxoR4.js → pagination-design-CWNP4U9A.js} +2 -2
- package/dist/paper-widget-design-CMzzcWw8.js +4 -0
- package/dist/{qrcode-design-Bh_lT1Yn.js → qrcode-design-DeCNb5kH.js} +1 -1
- package/dist/quick-search.util-DbpUfahg.js +77 -0
- package/dist/{ref-autofill-editor-99WrBySm.js → ref-autofill-editor-DQnrKJfB.js} +152 -115
- package/dist/{ref-design-C7LbDVQz.js → ref-design-BQ8o1gKm.js} +1 -1
- package/dist/{ref-props-BGzOHDvi.js → ref-props-BnrWZt61.js} +22 -13
- package/dist/{ref-style-C1-VGUt9.js → ref-style-BHBHe1mo.js} +1 -1
- package/dist/{regex-editor-BAjvqlvo.js → regex-editor-ChABNYS9.js} +94 -67
- package/dist/{revo-grid.entry-Cg-4cMIo.js → revo-grid.entry-DIdL7jYD.js} +1 -1
- package/dist/{revogr-attribution_7.entry-DzamtFvo.js → revogr-attribution_7.entry-DBPjWGup.js} +3 -3
- package/dist/{revogr-clipboard_3.entry-CIxDfW07.js → revogr-clipboard_3.entry-MYdZD9tl.js} +2 -2
- package/dist/{revogr-data_4.entry-BNENcgpR.js → revogr-data_4.entry-C4rrqPT4.js} +2 -2
- package/dist/{revogr-filter-panel.entry-BrYsomo0.js → revogr-filter-panel.entry-BAU18Dos.js} +1 -1
- 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-D_WfbMb1.js} +2 -2
- package/dist/{serialnumber-design-BsAogg1u.js → serialnumber-design-CckdQzWc.js} +1 -1
- package/dist/shared/index.es.js +22 -22
- package/dist/{signature-design-sSyiIxFB.js → signature-design-TKvCOON-.js} +1 -1
- package/dist/{signature-props-CYmd9GVl.js → signature-props-D1pC6hm4.js} +3 -3
- package/dist/{signature-style-wLJo19Kd.js → signature-style-BLrwnz_M.js} +1 -1
- package/dist/{single-field-drop-CilJB5DX.js → single-field-drop-C-PadB1d.js} +2 -2
- package/dist/{size-editor-DnyvSWUn.js → size-editor-szo7icZ-.js} +1 -1
- package/dist/src/adapter/adapter.d.ts +10 -0
- package/dist/src/adapter/setup.d.ts +11 -0
- package/dist/src/domain/table/business/warehouse/warehouse-inventory/profile/field-keys.d.ts +0 -2
- package/dist/src/index.d.ts +1 -2
- package/dist/src/nocode-base/src/core/sub-table/allocate-table-core.d.ts +3 -4
- package/dist/src/nocode-base/src/core/sub-table/index.d.ts +2 -0
- package/dist/src/nocode-base/src/core/sub-table/pretreatment-list-table-core.d.ts +3 -12
- package/dist/src/nocode-base/src/core/sub-table/profile-driven-sub-table-core.d.ts +19 -17
- package/dist/src/nocode-base/src/core/sub-table/sterilize-batch-table-core.d.ts +3 -14
- package/dist/src/nocode-base/src/core/sub-table/stocktake-table-core.d.ts +6 -5
- package/dist/src/nocode-base/src/core/sub-table/sub-table-core.d.ts +11 -0
- package/dist/src/nocode-base/src/core/sub-table/utils/scan/index.d.ts +3 -0
- package/dist/src/nocode-base/src/core/sub-table/utils/scan/inventory-scan-api.d.ts +9 -0
- package/dist/src/nocode-base/src/core/sub-table/utils/scan/production-identification-scan-api.d.ts +9 -0
- package/dist/src/nocode-base/src/core/sub-table/utils/scan/scan-helpers.d.ts +38 -0
- package/dist/src/nocode-base/src/core/sub-table/utils/stocktake/stocktake-calc.d.ts +6 -59
- package/dist/src/nocode-base/src/core/sub-table/warehouse-in-table-core.d.ts +11 -0
- package/dist/src/nocode-base/src/core/sub-table/warehouse-out-table-core.d.ts +21 -0
- package/dist/src/nocode-base/src/hooks/index.d.ts +1 -1
- package/dist/src/nocode-base/src/hooks/label-parse-rule/type.d.ts +6 -0
- package/dist/src/nocode-base/src/hooks/material-consume/bom-validator.d.ts +15 -74
- package/dist/src/nocode-base/src/hooks/material-consume/material-consume-table-controller.d.ts +32 -19
- package/dist/src/nocode-base/src/hooks/material-consume/tmpl-bom-controller.d.ts +4 -4
- package/dist/src/nocode-base/src/hooks/material-consume/types.d.ts +15 -0
- package/dist/src/nocode-base/src/hooks/material-consume-object/bom-validator.d.ts +38 -0
- package/dist/src/nocode-base/src/hooks/material-consume-object/index.d.ts +2 -0
- package/dist/src/nocode-base/src/hooks/material-consume-object/use-tmpl-bom.d.ts +13 -0
- package/dist/src/nocode-base/src/hooks/material-date/material-date.d.ts +14 -0
- package/dist/src/nocode-base/src/hooks/useRenderPageFactory.d.ts +6 -0
- package/dist/src/nocode-base/src/hooks/validation/useFormValidator.d.ts +2 -0
- package/dist/src/nocode-base/src/interface/device-query.d.ts +31 -0
- package/dist/src/nocode-base/src/interface/index.d.ts +1 -0
- package/dist/src/nocode-base/src/interface/render.d.ts +1 -0
- package/dist/src/nocode-base/src/interface/transform.d.ts +1 -1
- package/dist/src/nocode-base/src/types/business/index.d.ts +11 -1
- package/dist/src/nocode-base/src/types/business/pretreatment-list.d.ts +3 -1
- package/dist/src/nocode-base/src/types/business/sterilize-batch.d.ts +3 -1
- package/dist/src/nocode-base/src/types/business/stocktake.d.ts +3 -1
- package/dist/src/nocode-base/src/types/common/base.d.ts +4 -0
- package/dist/src/nocode-base/src/types/render/sub-table-render.d.ts +7 -0
- package/dist/src/nocode-web-render/src/render/parse-rule/add-rule-btn.vue.d.ts +2 -0
- package/dist/src/nocode-web-render/src/render/parse-rule/parse-rule-modal.vue.d.ts +1 -0
- package/dist/src/nocode-web-render/src/render/sub-table/common/scan-modal.vue.d.ts +0 -1
- package/dist/src/nocode-web-render/src/render/sub-table/common/sub-table-render.d.ts +2 -1
- package/dist/src/nocode-web-render/src/render/sub-table/stocktake/index.d.ts +0 -1
- package/dist/src/nocode-web-render/src/render/sub-table/stocktake/stocktake-web-render.d.ts +11 -1
- package/dist/src/online-form/src/views/__cell_widgets__/cell-widget-dependency.vue.d.ts +1 -0
- package/dist/src/online-form/src/views/__cell_widgets__/common/display-fields-editor/display-fields-editor.vue.d.ts +3 -3
- package/dist/src/online-form/src/views/__cell_widgets__/common/display-fields-editor/display-fields.util.d.ts +6 -0
- package/dist/src/online-form/src/views/__cell_widgets__/common/quick-search-editor/quick-search.util.d.ts +11 -3
- package/dist/src/online-form/src/views/designer/constants/index.d.ts +2 -4
- package/dist/src/online-form/src/views/designer/hooks/useAllSpreadSheets.d.ts +473 -0
- package/dist/src/online-form/src/views/designer/hooks/useModelFields.d.ts +7 -0
- package/dist/src/online-form/src/views/designer/hooks/useSpreadSheet.d.ts +622 -2
- package/dist/src/online-form/src/views/designer/modules/modals/add-dependency-modal/add-dependency-modal.vue.d.ts +5 -1
- package/dist/src/online-form/src/views/designer/modules/panel/comps/signature-config/config-modal.vue.d.ts +2 -0
- package/dist/src/online-form/src/views/designer/modules/panel/comps/signature-config/field-tree-select.vue.d.ts +1 -0
- package/dist/src/online-form/src/views/designer/modules/panel/comps/signature-config/index.d.ts +1 -1
- package/dist/src/online-form/src/views/designer/modules/panel/material-consumption/policy-items/consume-item.vue.d.ts +20 -0
- package/dist/src/online-form/src/views/designer/modules/panel/material-consumption/policy-items/qty-item/bom-formula-editor.vue.d.ts +18 -0
- package/dist/src/online-form/src/views/designer/modules/panel/material-consumption/policy-items/qty-item/qty-item.vue.d.ts +15 -0
- package/dist/src/online-form/src/views/designer/modules/panel/material-consumption/policy-items/substitute-item.vue.d.ts +23 -0
- package/dist/src/online-form/src/views/designer/modules/panel/panel-data-init-config/object-init/hooks/useObjectInit.d.ts +62 -0
- package/dist/src/online-form/src/views/designer/modules/panel/panel-data-init-config/object-init/index.d.ts +0 -1
- package/dist/src/online-form/src/views/designer/modules/panel/sub-table/comps/use-dynamic-sub-table-panel.d.ts +292 -0
- package/dist/src/online-form/src/views/designer/modules/panel/sub-table/material-consumption/bom-modal.vue.d.ts +1 -1
- package/dist/src/online-form/src/views/designer/modules/panel/sub-table/material-consumption/edit-parse-rule.vue.d.ts +1 -0
- package/dist/src/online-form/src/views/designer/types/index.d.ts +5 -15
- package/dist/src/online-form/src/views/designer/utils/design-readonly-modal.d.ts +3 -0
- package/dist/src/online-form/src/views/inline-cell/use-inline-icon-catalog.d.ts +2 -3
- package/dist/src/online-form/src/views/render/__components__/_field_/trace/composables/assoc-filter.d.ts +5 -4
- package/dist/src/online-form/src/views/render/__components__/_field_/trace/utils/columns.d.ts +2 -1
- package/dist/src/shared/components/Signature/card-signer.vue.d.ts +14 -0
- package/dist/src/shared/components/Signature/logic/index.d.ts +1 -0
- package/dist/src/shared/components/Signature/security-config.d.ts +6 -0
- package/dist/src/shared/components/Signature/ui/password-signer.vue.d.ts +1 -0
- package/dist/src/shared/components/Signature/ui/sign-switcher-modal.vue.d.ts +8 -5
- package/dist/src/shared/components/Signature/ui/sign-switcher.vue.d.ts +1 -0
- package/dist/src/shared/components/field-transfer/components/field-transfer-modal.vue.d.ts +2 -0
- package/dist/src/shared/components/field-transfer/components/modal-wrapper.vue.d.ts +2 -0
- package/dist/src/shared/components/field-transfer/useFieldTransfer.d.ts +2 -0
- package/dist/src/shared/components/rdo-tree-select/rdo-tree-select.vue.d.ts +1 -0
- package/dist/src/shared/enum/field-type.d.ts +12 -0
- package/dist/src/shared/utils/lot2sn.d.ts +22 -0
- package/dist/{text-design-7Cct8yh2.js → text-design-C8gY_Ud0.js} +5 -5
- package/dist/{text-design-DKPFi1Rh.js → text-design-DUOCvsW-.js} +2 -2
- package/dist/{text-props-a-16iwJu.js → text-props-D-KBRHkK.js} +5 -5
- package/dist/{text-style-CRqOGAZr.js → text-style-D75O3cAI.js} +1 -1
- package/dist/{throttle-Cpk1LoGk-BYyz4gtI.js → throttle-Cpk1LoGk-D40m8Nov.js} +1 -1
- package/dist/{timediff-design-JHt1-ug6.js → timediff-design-Brg2Aoo2.js} +1 -1
- package/dist/{trace-design-DAHDTG5n.js → trace-design-Bphl0RjB.js} +33 -9
- package/dist/{trace-props-B5FBtpNR.js → trace-props-DkH0QJYT.js} +63 -35
- package/dist/{trace-style-CgdePCcv.js → trace-style-DZx1slRE.js} +1 -1
- package/dist/{user-design-BRIV937X.js → user-design-fMF_h4IG.js} +4 -4
- package/dist/{user-props-BJVjolL7.js → user-props-u0p3vKkm.js} +2 -2
- package/dist/{user-style-D17ZPHqU.js → user-style-dhqwLgPW.js} +1 -1
- package/dist/{value-editor.vue_vue_type_style_index_0_lang-J3MR2K39.js → value-editor.vue_vue_type_style_index_0_lang-C1Y-__ux.js} +2 -2
- package/dist/{version-select-Bw8yzDaH.js → version-select-Cx1oBH6h.js} +1 -1
- package/dist/web-render/index.es.js +397 -24
- package/dist/{widget-barcode-IbgHM5xo.js → widget-barcode-D8F4NNVm.js} +4 -4
- package/dist/{widget-diagonal-juPAlqEe.js → widget-diagonal-DxWX94Uz.js} +3 -3
- package/dist/{widget-image-Dnaej-nk.js → widget-image-BZQOltF7.js} +6 -5
- package/dist/{widget-line-DL9jw_oY.js → widget-line-DrYIib_u.js} +4 -4
- package/dist/{widget-pagination-BlRJo3n4.js → widget-pagination-M80nEc3Z.js} +5 -5
- package/dist/{widget-power-CIC6itUt.js → widget-power-D7jJhsVT.js} +3 -3
- package/dist/{widget-qrcode-BWEOVEZg.js → widget-qrcode-CY6qnSPs.js} +3 -3
- package/dist/{widget-rangelimit-C4KG56d-.js → widget-rangelimit-CZ6cWnwZ.js} +3 -3
- package/dist/{widget-serialnumber-DnfRRyBY.js → widget-serialnumber-DHmkrctf.js} +1 -1
- package/dist/{widget-text-C7d0ZrX3.js → widget-text-C4e7Ec_2.js} +5 -5
- package/dist/{widget-timediff-FAvqRtXk.js → widget-timediff-B4JkGADo.js} +2 -2
- package/package.json +12 -1
- package/dist/paper-widget-design-gmMHiQFV.js +0 -4
- package/dist/src/nocode-base/src/hooks/material-stocktake/index.d.ts +0 -1
- package/dist/src/nocode-base/src/hooks/material-stocktake/useMaterialStocktake.d.ts +0 -8
- package/dist/src/online-form/src/views/designer/modules/panel/panel-data-init-config/object-init/object-init-modal.vue.d.ts +0 -26
package/dist/base/index.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { M as MaterialConsumptionPatternEnum,
|
|
4
|
-
import { B as B2,
|
|
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, aC as renderUtils, by as closeValidatorPopovers, bz as baseDataUtils, bA as getRawFormRuleMeta, bB as enrichFormChangeRowDetails, bC as settleAfterModeSwitch, bD as calcUtils, ao as CheckDsTypeEnum, 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-B-KhKgs2.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-B-KhKgs2.js";
|
|
3
|
+
import { M as MaterialConsumptionPatternEnum, f as MaterialConsumeTableController, h as SubTableCore, i as SubTableActionMenuTypeEnum, j as getMenuByAction, k as SubTableActionEnum, l as getInsertSubMenu, r as resolveScanAdjustType, m as resolveScanQty, t as toDateOnly, n as getCopySubMenu, o as resolveScanParsedValue, p as resolveScanFillData, q as useMaterialBalance, s as validate, w as validateObjectBomQtyOnSubmit } from "../dynamic-table-action-Bg2X8eeh.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-Bg2X8eeh.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
|
|
8
|
-
import { B as B3, F as F2, M, a as
|
|
7
|
+
import "dayjs";
|
|
8
|
+
import { B as B3, F as F2, M, a as a8, u as u3 } from "../mb-render-B9PVK2lM.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.
|
|
194
|
+
const results = await Promise.all(
|
|
192
195
|
Object.values(this.tableControllers).map((c10) => c10.submitValidate())
|
|
193
196
|
);
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
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
|
|
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
|
-
|
|
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$
|
|
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
|
-
|
|
412
|
+
function isBlank$2(value) {
|
|
413
|
+
return value === void 0 || value === null || value === "";
|
|
336
414
|
}
|
|
337
|
-
|
|
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
|
-
|
|
340
|
-
|
|
341
|
-
|
|
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$
|
|
417
|
-
[F$
|
|
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$
|
|
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
|
|
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
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
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
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
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$
|
|
630
|
-
if (!Object.values(F$
|
|
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$
|
|
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$
|
|
688
|
+
if (field === F$4.location && rowData[F$4.inventoryLocationIds]) {
|
|
645
689
|
return {
|
|
646
|
-
"id_.in": rowData[F$
|
|
690
|
+
"id_.in": rowData[F$4.inventoryLocationIds]
|
|
647
691
|
};
|
|
648
692
|
}
|
|
649
|
-
if (field === F$
|
|
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$
|
|
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
|
},
|
|
@@ -684,6 +727,7 @@ class StocktakeTableCore extends ProfileDrivenSubTableCore {
|
|
|
684
727
|
label: $t("sys.edhr.editRow")
|
|
685
728
|
},
|
|
686
729
|
getMenuByAction(SubTableActionEnum.Insert1RowAfter),
|
|
730
|
+
getInsertSubMenu(),
|
|
687
731
|
...params.showDelBtn ? [
|
|
688
732
|
{
|
|
689
733
|
type: SubTableActionMenuTypeEnum.DIVIDER
|
|
@@ -694,17 +738,18 @@ class StocktakeTableCore extends ProfileDrivenSubTableCore {
|
|
|
694
738
|
return menus;
|
|
695
739
|
};
|
|
696
740
|
async init() {
|
|
697
|
-
const
|
|
741
|
+
const config = this.bizTableConfig || {};
|
|
742
|
+
const { autoLoadStock, barcodeParsingRules } = config;
|
|
698
743
|
if (barcodeParsingRules) {
|
|
699
|
-
this.scanRuleProps =
|
|
744
|
+
this.scanRuleProps = barcodeParsingRules;
|
|
700
745
|
this.scanRuleInfo = await getParseRuleInfo({ id: this.scanRuleProps.parsingRuleId });
|
|
701
746
|
}
|
|
702
747
|
if (this.isDataProcessed || !autoLoadStock || !this.paramsWarehouseId) return;
|
|
703
748
|
const res = await getStockData({ warehouse_id_: this.paramsWarehouseId });
|
|
704
|
-
this.initData = groupInventoryToStocktakeRows(res, this.isGroupByWarehouse).map((
|
|
705
|
-
calcRowData(
|
|
706
|
-
|
|
707
|
-
return
|
|
749
|
+
this.initData = groupInventoryToStocktakeRows(res, this.isGroupByWarehouse).map((e2) => {
|
|
750
|
+
calcRowData(e2);
|
|
751
|
+
e2.row_source_ = "auto";
|
|
752
|
+
return e2;
|
|
708
753
|
});
|
|
709
754
|
}
|
|
710
755
|
handleInitializeFormState(_params) {
|
|
@@ -713,203 +758,96 @@ class StocktakeTableCore extends ProfileDrivenSubTableCore {
|
|
|
713
758
|
handleChange(params) {
|
|
714
759
|
super.handleChange(params);
|
|
715
760
|
const { field, value, option, rowData } = params;
|
|
716
|
-
if (field === F$
|
|
717
|
-
for (const { optionField, toField } of FILL_FROM_INVENTORY_OPTION$
|
|
761
|
+
if (field === F$4.product && option && value !== void 0 && value !== null && value !== "") {
|
|
762
|
+
for (const { optionField, toField } of FILL_FROM_INVENTORY_OPTION$3) {
|
|
718
763
|
rowData[toField] = option[optionField];
|
|
719
764
|
}
|
|
720
765
|
calcRowData(rowData);
|
|
721
766
|
}
|
|
722
767
|
}
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
768
|
+
/**
|
|
769
|
+
* 盘点扫码弹窗回传 { barcode, type };在此解析并走库存扫码接口
|
|
770
|
+
*/
|
|
771
|
+
async onScan(input) {
|
|
772
|
+
const parsed = resolveScanParsedFromInput(input, this.scanRuleInfo?.rules_);
|
|
773
|
+
if (!parsed || !hasLotOrUniqueCode(parsed)) {
|
|
774
|
+
this.error({ content: SCAN_LOT_OR_UNIQUE_REQUIRED_MSG });
|
|
727
775
|
return;
|
|
728
776
|
}
|
|
729
|
-
const
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
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
|
-
}
|
|
777
|
+
const records = await matchInventoryScanRecords(parsed, this.paramsWarehouseId);
|
|
778
|
+
if (!records.length) {
|
|
779
|
+
this.error({ content: SCAN_NOT_FOUND_MSG$2 });
|
|
780
|
+
return;
|
|
773
781
|
}
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
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,
|
|
782
|
+
const selected = await this.pickScanRecord(records);
|
|
783
|
+
if (!selected) return;
|
|
784
|
+
const scanAdjustType = resolveScanAdjustType(input);
|
|
785
|
+
const scanQty = resolveScanQty(parsed.qty, selected.qty_);
|
|
786
|
+
const fillData = this.scanRuleProps?.fillMapArr?.length && parsed ? calcFillData(parsed, this.scanRuleProps.fillMapArr) : {};
|
|
787
|
+
const visibleRows = this.showTableData;
|
|
788
|
+
const deletedRows = this.tableData.filter((e2) => e2.deleted_);
|
|
789
|
+
const existIndex = visibleRows.findIndex(
|
|
790
|
+
(row2) => isSameStocktakeIdentity(row2, selected, this.isGroupByWarehouse)
|
|
791
|
+
);
|
|
792
|
+
if (existIndex >= 0) {
|
|
793
|
+
const existRow = visibleRows[existIndex];
|
|
794
|
+
const blockReason = getScanQtyDeductionBlockReason(
|
|
795
|
+
existRow[F$4.stocktake],
|
|
801
796
|
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
797
|
scanAdjustType
|
|
811
798
|
);
|
|
812
|
-
if (
|
|
813
|
-
|
|
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);
|
|
799
|
+
if (blockReason) {
|
|
800
|
+
this.error({ content: blockReason });
|
|
801
|
+
return;
|
|
822
802
|
}
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
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
|
|
803
|
+
existRow[F$4.stocktake] = applyScanQtyToStocktake(
|
|
804
|
+
existRow[F$4.stocktake],
|
|
805
|
+
scanQty,
|
|
806
|
+
scanAdjustType
|
|
807
|
+
);
|
|
808
|
+
calcRowData(existRow);
|
|
809
|
+
this.tableData = [...visibleRows, ...deletedRows];
|
|
810
|
+
return;
|
|
877
811
|
}
|
|
812
|
+
const stocktakeQty = applyScanQtyToStocktake(void 0, scanQty, scanAdjustType);
|
|
813
|
+
const row = buildInventoryScanRow(selected, parsed, fillData, stocktakeQty);
|
|
814
|
+
calcRowData(row);
|
|
815
|
+
this.appendOrFillScanRow(row);
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
function resolveScanParsedFromInput(input, rules) {
|
|
819
|
+
if (input.parsedValue && typeof input.parsedValue === "object") {
|
|
820
|
+
return input.parsedValue;
|
|
821
|
+
}
|
|
822
|
+
const raw = input.barcode ?? input.str;
|
|
823
|
+
if (!raw || !rules) return void 0;
|
|
824
|
+
return getParseRuleValue(raw, rules);
|
|
825
|
+
}
|
|
826
|
+
function buildAllocateScanRow(record, parsed, fillData) {
|
|
827
|
+
const row = {
|
|
828
|
+
[F$5.inventory]: record.id_,
|
|
829
|
+
[F$5.product]: record.product_id_,
|
|
830
|
+
[F$5.productName]: record.product_id_name_,
|
|
831
|
+
[F$5.productCode]: record.product_id_code_,
|
|
832
|
+
[F$5.productSpec]: record.product_id_spec_,
|
|
833
|
+
[F$5.batch]: record.production_identification_id_,
|
|
834
|
+
[F$5.originLocation]: record.location_id_,
|
|
835
|
+
[F$5.originWarehouse]: record.warehouse_id_,
|
|
836
|
+
[F$5.stock]: record.stock_num_,
|
|
837
|
+
[F$5.mfgOrder]: record.mfg_order_id_,
|
|
838
|
+
[F$5.lotSn]: record.lot_sn_id_,
|
|
839
|
+
[F$5.uniqueCode]: record.unique_code_,
|
|
840
|
+
[F$5.reInspectionDate]: record.re_inspection_date_,
|
|
841
|
+
[F$5.allocateNum]: resolveScanQty(parsed.qty, record.qty_),
|
|
842
|
+
...fillData
|
|
878
843
|
};
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
[F$
|
|
884
|
-
};
|
|
885
|
-
if (assignScanQty && scanQty != null && scanQty !== "") {
|
|
886
|
-
rowData[F$2.stocktake] = applyScanQtyToStocktake(void 0, scanQty, scanAdjustType);
|
|
844
|
+
const validityFromRecord = record.validate_ ?? record.validity_;
|
|
845
|
+
if (parsed.expiration) {
|
|
846
|
+
row[F$5.validity] = toDateOnly(parsed.expiration);
|
|
847
|
+
} else if (validityFromRecord != null) {
|
|
848
|
+
row[F$5.validity] = toDateOnly(validityFromRecord);
|
|
887
849
|
}
|
|
888
|
-
return
|
|
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 || [];
|
|
850
|
+
return row;
|
|
913
851
|
}
|
|
914
852
|
class AllocateTableCore extends ProfileDrivenSubTableCore {
|
|
915
853
|
/** 绘制UI相关工具 */
|
|
@@ -926,7 +864,7 @@ class AllocateTableCore extends ProfileDrivenSubTableCore {
|
|
|
926
864
|
}
|
|
927
865
|
handleFieldTd = (params) => {
|
|
928
866
|
const { field, tdHandler } = params;
|
|
929
|
-
if (field === F$
|
|
867
|
+
if (field === F$5.product) {
|
|
930
868
|
tdHandler.mergeTd({
|
|
931
869
|
cellWidget: {
|
|
932
870
|
props: {
|
|
@@ -942,17 +880,17 @@ class AllocateTableCore extends ProfileDrivenSubTableCore {
|
|
|
942
880
|
};
|
|
943
881
|
calcFieldQuery = (params) => {
|
|
944
882
|
const { field, rowData } = params;
|
|
945
|
-
if (field === F$
|
|
883
|
+
if (field === F$5.location) {
|
|
946
884
|
return {
|
|
947
|
-
"warehouse_id_.eq": rowData[F$
|
|
885
|
+
"warehouse_id_.eq": rowData[F$5.warehouse]
|
|
948
886
|
};
|
|
949
887
|
}
|
|
950
|
-
if (field === F$
|
|
888
|
+
if (field === F$5.originLocation) {
|
|
951
889
|
return {
|
|
952
|
-
"warehouse_id_.eq": rowData[F$
|
|
890
|
+
"warehouse_id_.eq": rowData[F$5.originWarehouse]
|
|
953
891
|
};
|
|
954
892
|
}
|
|
955
|
-
if (field === F$
|
|
893
|
+
if (field === F$5.product) {
|
|
956
894
|
return {
|
|
957
895
|
warehouse_id_: this.warehouseId
|
|
958
896
|
};
|
|
@@ -960,7 +898,19 @@ class AllocateTableCore extends ProfileDrivenSubTableCore {
|
|
|
960
898
|
};
|
|
961
899
|
calcSubTableActionMenu = (params) => {
|
|
962
900
|
const { showDelBtn } = params;
|
|
963
|
-
|
|
901
|
+
return [
|
|
902
|
+
{
|
|
903
|
+
type: SubTableActionMenuTypeEnum.SUBTITLE,
|
|
904
|
+
label: $t("sys.edhr.bizOperation")
|
|
905
|
+
},
|
|
906
|
+
getMenuByAction(SubTableActionEnum.SCAN),
|
|
907
|
+
{
|
|
908
|
+
type: SubTableActionMenuTypeEnum.DIVIDER
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
type: SubTableActionMenuTypeEnum.SUBTITLE,
|
|
912
|
+
label: $t("sys.edhr.editRow")
|
|
913
|
+
},
|
|
964
914
|
getMenuByAction(SubTableActionEnum.Insert1RowAfter),
|
|
965
915
|
getCopySubMenu(),
|
|
966
916
|
getInsertSubMenu(),
|
|
@@ -971,55 +921,32 @@ class AllocateTableCore extends ProfileDrivenSubTableCore {
|
|
|
971
921
|
getMenuByAction(SubTableActionEnum.DeleteRowCurrent)
|
|
972
922
|
] : []
|
|
973
923
|
].filter(Boolean);
|
|
974
|
-
return menus;
|
|
975
924
|
};
|
|
976
925
|
handleChange(params) {
|
|
977
926
|
super.handleChange(params);
|
|
978
927
|
const { field, value, option, rowData } = params;
|
|
979
|
-
if (field !== F$
|
|
928
|
+
if (field !== F$5.product || !option || value === void 0 || value === null || value === "") {
|
|
980
929
|
return;
|
|
981
930
|
}
|
|
982
|
-
for (const { optionField, toField } of FILL_FROM_INVENTORY_OPTION$
|
|
931
|
+
for (const { optionField, toField } of FILL_FROM_INVENTORY_OPTION$4) {
|
|
983
932
|
rowData[toField] = option[optionField];
|
|
984
933
|
}
|
|
985
934
|
}
|
|
986
|
-
async onScan(
|
|
987
|
-
const
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
warehouse_id_: this.warehouseId,
|
|
991
|
-
product_code_: data.materialCode
|
|
992
|
-
});
|
|
993
|
-
if (!arr?.length) {
|
|
994
|
-
this.error({ content: "扫描的物料不存在" });
|
|
935
|
+
async onScan(input) {
|
|
936
|
+
const parsed = resolveScanParsedValue(input);
|
|
937
|
+
if (!parsed || !hasLotOrUniqueCode(parsed)) {
|
|
938
|
+
this.error({ content: SCAN_LOT_OR_UNIQUE_REQUIRED_MSG });
|
|
995
939
|
return;
|
|
996
940
|
}
|
|
997
|
-
const
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
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);
|
|
941
|
+
const records = await matchInventoryScanRecords(parsed, this.warehouseId);
|
|
942
|
+
if (!records.length) {
|
|
943
|
+
this.error({ content: SCAN_NOT_FOUND_MSG$2 });
|
|
944
|
+
return;
|
|
1021
945
|
}
|
|
1022
|
-
|
|
946
|
+
const selected = await this.pickScanRecord(records);
|
|
947
|
+
if (!selected) return;
|
|
948
|
+
const row = buildAllocateScanRow(selected, parsed, resolveScanFillData(input));
|
|
949
|
+
this.appendOrFillScanRow(row);
|
|
1023
950
|
}
|
|
1024
951
|
beforeBtnClick = async (params) => {
|
|
1025
952
|
const { btn } = params;
|
|
@@ -1119,49 +1046,40 @@ const fillFromOption = [
|
|
|
1119
1046
|
toField: F3.qty
|
|
1120
1047
|
}
|
|
1121
1048
|
];
|
|
1122
|
-
function applyFillFromOption(
|
|
1123
|
-
const writableA =
|
|
1049
|
+
function applyFillFromOption(A2, B4) {
|
|
1050
|
+
const writableA = A2;
|
|
1124
1051
|
fillFromOption.forEach(({ optionField, toField }) => {
|
|
1125
1052
|
if (has(B4, optionField)) {
|
|
1126
1053
|
writableA[toField] = B4[optionField];
|
|
1127
1054
|
}
|
|
1128
1055
|
});
|
|
1129
|
-
return
|
|
1056
|
+
return A2;
|
|
1130
1057
|
}
|
|
1131
1058
|
function mapContainerRowsToOptions(data = []) {
|
|
1132
1059
|
return data.map((item) => ({
|
|
1133
|
-
label: item
|
|
1060
|
+
label: resolveLotDisplayLabel(item, item.name_),
|
|
1134
1061
|
value: item.id_ || item.id,
|
|
1135
1062
|
disabled: !!item.deleted_,
|
|
1136
1063
|
_item: item
|
|
1137
1064
|
}));
|
|
1138
1065
|
}
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
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;
|
|
1066
|
+
const SCAN_NOT_FOUND_MSG$1 = "扫描的物料批次不存在";
|
|
1067
|
+
function buildEntrustScanRow(record, parsed, fillData) {
|
|
1068
|
+
return {
|
|
1069
|
+
[F3.productionContainer]: record.lot_sn_id_ ?? record.production_container_id_,
|
|
1070
|
+
[F3.product]: record.product_id_,
|
|
1071
|
+
[F3.productName]: record.product_id_name_,
|
|
1072
|
+
[F3.productCode]: record.product_id_code_,
|
|
1073
|
+
[F3.productSpec]: record.product_id_spec_,
|
|
1074
|
+
[F3.mfgOrderCode]: record.mfg_order_code_,
|
|
1075
|
+
[F3.mfgOrder]: record.mfg_order_id_,
|
|
1076
|
+
[F3.qty]: parsed.qty ?? record.qty_,
|
|
1077
|
+
[F3.productionDate]: toDateOnly(record.production_date_),
|
|
1078
|
+
...fillData
|
|
1079
|
+
};
|
|
1160
1080
|
}
|
|
1161
1081
|
class SterilizeBatchTableCore extends SubTableCore {
|
|
1162
|
-
/**
|
|
1163
|
-
scanTargetRow;
|
|
1164
|
-
/** 绘制UI相关工具,一期复用调拨表扫码弹窗 */
|
|
1082
|
+
/** 绘制UI相关工具,复用调拨表扫码弹窗 */
|
|
1165
1083
|
get render() {
|
|
1166
1084
|
return window.NocodeAdapter.allocateRender;
|
|
1167
1085
|
}
|
|
@@ -1179,16 +1097,14 @@ class SterilizeBatchTableCore extends SubTableCore {
|
|
|
1179
1097
|
calcSubTableActionMenu = (params) => {
|
|
1180
1098
|
const { showDelBtn } = params;
|
|
1181
1099
|
return [
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
// type: SubTableActionMenuTypeEnum.DIVIDER,
|
|
1191
|
-
// },
|
|
1100
|
+
{
|
|
1101
|
+
type: SubTableActionMenuTypeEnum.SUBTITLE,
|
|
1102
|
+
label: $t("sys.edhr.bizOperation")
|
|
1103
|
+
},
|
|
1104
|
+
getMenuByAction(SubTableActionEnum.SCAN),
|
|
1105
|
+
{
|
|
1106
|
+
type: SubTableActionMenuTypeEnum.DIVIDER
|
|
1107
|
+
},
|
|
1192
1108
|
{
|
|
1193
1109
|
type: SubTableActionMenuTypeEnum.SUBTITLE,
|
|
1194
1110
|
label: $t("sys.edhr.editRow")
|
|
@@ -1203,17 +1119,6 @@ class SterilizeBatchTableCore extends SubTableCore {
|
|
|
1203
1119
|
] : []
|
|
1204
1120
|
].filter(Boolean);
|
|
1205
1121
|
};
|
|
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
1122
|
handleFieldTd = (params) => {
|
|
1218
1123
|
const { field, tdHandler } = params;
|
|
1219
1124
|
if (field === F3.productionContainer) {
|
|
@@ -1222,7 +1127,6 @@ class SterilizeBatchTableCore extends SubTableCore {
|
|
|
1222
1127
|
props: {
|
|
1223
1128
|
newSpecificConfig: {
|
|
1224
1129
|
newOptions: []
|
|
1225
|
-
// 禁用初始选项,数据源完全由 customLoader 提供
|
|
1226
1130
|
}
|
|
1227
1131
|
}
|
|
1228
1132
|
}
|
|
@@ -1241,18 +1145,28 @@ class SterilizeBatchTableCore extends SubTableCore {
|
|
|
1241
1145
|
const { field } = params;
|
|
1242
1146
|
if (field !== F3.productionContainer) return;
|
|
1243
1147
|
const loader = async (loaderParams) => {
|
|
1244
|
-
const { mode, queryData = {}, pageNo = 1, pageSize = 100, ids = [] } = loaderParams;
|
|
1148
|
+
const { mode, queryData = {}, exp, pageNo = 1, pageSize = 100, ids = [] } = loaderParams;
|
|
1149
|
+
let resolvedExp = exp;
|
|
1245
1150
|
const query = {
|
|
1246
1151
|
...queryData,
|
|
1247
1152
|
is_rework_: 0,
|
|
1248
|
-
"production_identification_type_.in": ["LOT", "SN"]
|
|
1153
|
+
"production_identification_type_.in": ["LOT", "SN"],
|
|
1154
|
+
"container_role_.ne": LOT_CONTAINER_ROLE.RELATED_PARENT
|
|
1249
1155
|
};
|
|
1250
1156
|
if (mode === "byIds" && ids.length) {
|
|
1251
1157
|
query["id_.in"] = ids;
|
|
1252
1158
|
} else {
|
|
1253
1159
|
const keyword = extractKeywordFromQueryData(queryData);
|
|
1254
|
-
if (keyword
|
|
1255
|
-
query["name_.like"]
|
|
1160
|
+
if (keyword) {
|
|
1161
|
+
if (!query["name_.like"] && !query["name_.iLike"]) {
|
|
1162
|
+
query["name_.like"] = keyword;
|
|
1163
|
+
}
|
|
1164
|
+
if (!query["related_parent_name_.like"] && !query["related_parent_name_.iLike"]) {
|
|
1165
|
+
query["related_parent_name_.like"] = keyword;
|
|
1166
|
+
}
|
|
1167
|
+
if (!resolvedExp && (query["name_.like"] || query["name_.iLike"]) && (query["related_parent_name_.like"] || query["related_parent_name_.iLike"])) {
|
|
1168
|
+
resolvedExp = "OR(name_.like,related_parent_name_.like)";
|
|
1169
|
+
}
|
|
1256
1170
|
}
|
|
1257
1171
|
}
|
|
1258
1172
|
const res = await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
|
|
@@ -1263,6 +1177,7 @@ class SterilizeBatchTableCore extends SubTableCore {
|
|
|
1263
1177
|
},
|
|
1264
1178
|
{},
|
|
1265
1179
|
{
|
|
1180
|
+
exp: resolvedExp,
|
|
1266
1181
|
query,
|
|
1267
1182
|
pageNo,
|
|
1268
1183
|
pageSize,
|
|
@@ -1270,11 +1185,14 @@ class SterilizeBatchTableCore extends SubTableCore {
|
|
|
1270
1185
|
}
|
|
1271
1186
|
);
|
|
1272
1187
|
const data = res?.data || [];
|
|
1188
|
+
const dict = res?.dict;
|
|
1273
1189
|
const totalCount = Number(res?.totalCount ?? data.length);
|
|
1274
1190
|
const totalPage = Number(res?.totalPage ?? Math.max(1, Math.ceil(totalCount / pageSize)));
|
|
1275
1191
|
const options = mapContainerRowsToOptions(data);
|
|
1276
1192
|
if (mode === "byIds") {
|
|
1277
1193
|
return {
|
|
1194
|
+
data,
|
|
1195
|
+
dict,
|
|
1278
1196
|
options,
|
|
1279
1197
|
finished: true,
|
|
1280
1198
|
totalCount
|
|
@@ -1282,6 +1200,7 @@ class SterilizeBatchTableCore extends SubTableCore {
|
|
|
1282
1200
|
}
|
|
1283
1201
|
return {
|
|
1284
1202
|
data,
|
|
1203
|
+
dict,
|
|
1285
1204
|
options,
|
|
1286
1205
|
finished: pageNo >= totalPage,
|
|
1287
1206
|
totalCount,
|
|
@@ -1294,7 +1213,6 @@ class SterilizeBatchTableCore extends SubTableCore {
|
|
|
1294
1213
|
const { field, option, value, rowData } = params;
|
|
1295
1214
|
if (field !== F3.productionContainer) return;
|
|
1296
1215
|
if (option) {
|
|
1297
|
-
console.log(option);
|
|
1298
1216
|
applyFillFromOption(rowData, option);
|
|
1299
1217
|
return;
|
|
1300
1218
|
}
|
|
@@ -1304,36 +1222,26 @@ class SterilizeBatchTableCore extends SubTableCore {
|
|
|
1304
1222
|
});
|
|
1305
1223
|
}
|
|
1306
1224
|
};
|
|
1307
|
-
async onScan(
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
}
|
|
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: "查询生产批次失败" });
|
|
1225
|
+
async onScan(input) {
|
|
1226
|
+
const parsed = resolveScanParsedValue(input);
|
|
1227
|
+
if (!parsed || !hasProductionIdentificationScanKey(parsed)) {
|
|
1228
|
+
this.error({ content: PRODUCTION_IDENTIFICATION_SCAN_LOT_OR_UNIQUE_REQUIRED_MSG });
|
|
1324
1229
|
return;
|
|
1325
1230
|
}
|
|
1326
|
-
|
|
1327
|
-
|
|
1231
|
+
const records = await matchProductionIdentificationScanRecords(parsed);
|
|
1232
|
+
if (!records.length) {
|
|
1233
|
+
this.error({ content: SCAN_NOT_FOUND_MSG$1 });
|
|
1328
1234
|
return;
|
|
1329
1235
|
}
|
|
1330
|
-
const
|
|
1331
|
-
|
|
1236
|
+
const selected = await this.pickScanRecord(records);
|
|
1237
|
+
if (!selected) return;
|
|
1238
|
+
const row = buildEntrustScanRow(selected, parsed, resolveScanFillData(input));
|
|
1239
|
+
this.appendOrFillScanRow(row);
|
|
1332
1240
|
}
|
|
1333
1241
|
}
|
|
1334
|
-
function mapRefRowsToOptions(data = [], labelKey = "name_") {
|
|
1242
|
+
function mapRefRowsToOptions(data = [], labelKey = "name_", displayRelatedParent = false) {
|
|
1335
1243
|
return data.map((item) => ({
|
|
1336
|
-
label: item.__LABEL__ ?? item[labelKey] ?? String(item.id_ ?? item.id ?? ""),
|
|
1244
|
+
label: displayRelatedParent ? resolveLotDisplayLabel(item, item[labelKey]) : item.__LABEL__ ?? item[labelKey] ?? String(item.id_ ?? item.id ?? ""),
|
|
1337
1245
|
value: item.id_ || item.id,
|
|
1338
1246
|
disabled: !!item.deleted_,
|
|
1339
1247
|
_item: item
|
|
@@ -1341,18 +1249,28 @@ function mapRefRowsToOptions(data = [], labelKey = "name_") {
|
|
|
1341
1249
|
}
|
|
1342
1250
|
function createProductionContainerLoader() {
|
|
1343
1251
|
return async (loaderParams) => {
|
|
1344
|
-
const { mode, queryData = {}, pageNo = 1, pageSize = 100, ids = [] } = loaderParams;
|
|
1252
|
+
const { mode, queryData = {}, exp, pageNo = 1, pageSize = 100, ids = [] } = loaderParams;
|
|
1253
|
+
let resolvedExp = exp;
|
|
1345
1254
|
const query = {
|
|
1346
1255
|
...queryData,
|
|
1347
1256
|
is_rework_: 0,
|
|
1348
|
-
"production_identification_type_.in": ["LOT", "SN"]
|
|
1257
|
+
"production_identification_type_.in": ["LOT", "SN"],
|
|
1258
|
+
"container_role_.ne": LOT_CONTAINER_ROLE.RELATED_PARENT
|
|
1349
1259
|
};
|
|
1350
1260
|
if (mode === "byIds" && ids.length) {
|
|
1351
1261
|
query["id_.in"] = ids;
|
|
1352
1262
|
} else {
|
|
1353
1263
|
const keyword = extractKeywordFromQueryData(queryData);
|
|
1354
|
-
if (keyword
|
|
1355
|
-
query["name_.like"]
|
|
1264
|
+
if (keyword) {
|
|
1265
|
+
if (!query["name_.like"] && !query["name_.iLike"]) {
|
|
1266
|
+
query["name_.like"] = keyword;
|
|
1267
|
+
}
|
|
1268
|
+
if (!query["related_parent_name_.like"] && !query["related_parent_name_.iLike"]) {
|
|
1269
|
+
query["related_parent_name_.like"] = keyword;
|
|
1270
|
+
}
|
|
1271
|
+
if (!resolvedExp && (query["name_.like"] || query["name_.iLike"]) && (query["related_parent_name_.like"] || query["related_parent_name_.iLike"])) {
|
|
1272
|
+
resolvedExp = "OR(name_.like,related_parent_name_.like)";
|
|
1273
|
+
}
|
|
1356
1274
|
}
|
|
1357
1275
|
}
|
|
1358
1276
|
const res = await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
|
|
@@ -1363,6 +1281,7 @@ function createProductionContainerLoader() {
|
|
|
1363
1281
|
},
|
|
1364
1282
|
{},
|
|
1365
1283
|
{
|
|
1284
|
+
exp: resolvedExp,
|
|
1366
1285
|
query,
|
|
1367
1286
|
pageNo,
|
|
1368
1287
|
pageSize,
|
|
@@ -1370,11 +1289,14 @@ function createProductionContainerLoader() {
|
|
|
1370
1289
|
}
|
|
1371
1290
|
);
|
|
1372
1291
|
const data = res?.data || [];
|
|
1292
|
+
const dict = res?.dict;
|
|
1373
1293
|
const totalCount = Number(res?.totalCount ?? data.length);
|
|
1374
1294
|
const totalPage = Number(res?.totalPage ?? Math.max(1, Math.ceil(totalCount / pageSize)));
|
|
1375
|
-
const options = mapRefRowsToOptions(data);
|
|
1295
|
+
const options = mapRefRowsToOptions(data, "name_", true);
|
|
1376
1296
|
if (mode === "byIds") {
|
|
1377
1297
|
return {
|
|
1298
|
+
data,
|
|
1299
|
+
dict,
|
|
1378
1300
|
options,
|
|
1379
1301
|
finished: true,
|
|
1380
1302
|
totalCount
|
|
@@ -1382,6 +1304,7 @@ function createProductionContainerLoader() {
|
|
|
1382
1304
|
}
|
|
1383
1305
|
return {
|
|
1384
1306
|
data,
|
|
1307
|
+
dict,
|
|
1385
1308
|
options,
|
|
1386
1309
|
finished: pageNo >= totalPage,
|
|
1387
1310
|
totalCount,
|
|
@@ -1488,35 +1411,47 @@ function createMaterialContainerLoader() {
|
|
|
1488
1411
|
};
|
|
1489
1412
|
};
|
|
1490
1413
|
}
|
|
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
1414
|
function isBlank(value) {
|
|
1514
1415
|
return value === void 0 || value === null || value === "";
|
|
1515
1416
|
}
|
|
1417
|
+
const SCAN_NOT_FOUND_MSG = "扫描的批次/物料不存在";
|
|
1418
|
+
function isProductionLotOrSn(record) {
|
|
1419
|
+
const type = record.production_identification_type_;
|
|
1420
|
+
return type === "LOT" || type === "SN";
|
|
1421
|
+
}
|
|
1422
|
+
function buildProductionContainerRow(record, parsed, fillData) {
|
|
1423
|
+
return {
|
|
1424
|
+
[F$6.productionContainer]: record.lot_sn_id_ ?? record.production_container_id_,
|
|
1425
|
+
[F$6.product]: record.product_id_,
|
|
1426
|
+
[F$6.productName]: record.product_id_name_,
|
|
1427
|
+
[F$6.productCode]: record.product_id_code_,
|
|
1428
|
+
[F$6.productSpec]: record.product_id_spec_,
|
|
1429
|
+
[F$6.mfgOrderCode]: record.mfg_order_code_,
|
|
1430
|
+
[F$6.qty]: parsed.qty ?? record.qty_,
|
|
1431
|
+
[F$6.productionDate]: toDateOnly(record.production_date_),
|
|
1432
|
+
[F$6.materialContainerNo]: void 0,
|
|
1433
|
+
[MATERIAL_CONTAINER_ID]: void 0,
|
|
1434
|
+
[F$6.mfgOrder]: void 0,
|
|
1435
|
+
...fillData
|
|
1436
|
+
};
|
|
1437
|
+
}
|
|
1438
|
+
function buildMaterialContainerRow(record, parsed, fillData) {
|
|
1439
|
+
return {
|
|
1440
|
+
[F$6.materialContainerNo]: record.material_no_,
|
|
1441
|
+
[MATERIAL_CONTAINER_ID]: record.production_identification_id_,
|
|
1442
|
+
[F$6.product]: record.product_id_,
|
|
1443
|
+
[F$6.productName]: record.product_id_name_,
|
|
1444
|
+
[F$6.productCode]: record.product_id_code_,
|
|
1445
|
+
[F$6.productSpec]: record.product_id_spec_,
|
|
1446
|
+
[F$6.mfgOrderCode]: record.mfg_order_code_,
|
|
1447
|
+
[F$6.mfgOrder]: record.mfg_order_id_,
|
|
1448
|
+
[F$6.qty]: parsed.qty ?? record.qty_,
|
|
1449
|
+
[F$6.productionContainer]: void 0,
|
|
1450
|
+
...fillData
|
|
1451
|
+
};
|
|
1452
|
+
}
|
|
1516
1453
|
class PretreatmentListTableCore extends ProfileDrivenSubTableCore {
|
|
1517
|
-
/**
|
|
1518
|
-
scanTargetRow;
|
|
1519
|
-
/** 绘制UI相关工具,一期复用调拨表扫码弹窗 */
|
|
1454
|
+
/** 绘制UI相关工具,复用调拨表扫码弹窗 */
|
|
1520
1455
|
get render() {
|
|
1521
1456
|
return window.NocodeAdapter.allocateRender;
|
|
1522
1457
|
}
|
|
@@ -1534,6 +1469,14 @@ class PretreatmentListTableCore extends ProfileDrivenSubTableCore {
|
|
|
1534
1469
|
calcSubTableActionMenu = (params) => {
|
|
1535
1470
|
const { showDelBtn } = params;
|
|
1536
1471
|
return [
|
|
1472
|
+
{
|
|
1473
|
+
type: SubTableActionMenuTypeEnum.SUBTITLE,
|
|
1474
|
+
label: $t("sys.edhr.bizOperation")
|
|
1475
|
+
},
|
|
1476
|
+
getMenuByAction(SubTableActionEnum.SCAN),
|
|
1477
|
+
{
|
|
1478
|
+
type: SubTableActionMenuTypeEnum.DIVIDER
|
|
1479
|
+
},
|
|
1537
1480
|
{
|
|
1538
1481
|
type: SubTableActionMenuTypeEnum.SUBTITLE,
|
|
1539
1482
|
label: $t("sys.edhr.editRow")
|
|
@@ -1548,79 +1491,246 @@ class PretreatmentListTableCore extends ProfileDrivenSubTableCore {
|
|
|
1548
1491
|
] : []
|
|
1549
1492
|
].filter(Boolean);
|
|
1550
1493
|
};
|
|
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
1494
|
calcFieldStatus(params) {
|
|
1563
1495
|
const result = super.calcFieldStatus(params);
|
|
1564
1496
|
const { field, rowData } = params;
|
|
1565
|
-
if (field === F$
|
|
1497
|
+
if (field === F$6.product) {
|
|
1566
1498
|
result.disabled = !isProductManuallyEditable(rowData);
|
|
1567
1499
|
}
|
|
1568
1500
|
return result;
|
|
1569
1501
|
}
|
|
1570
1502
|
calcFieldDataSource = (params) => {
|
|
1571
1503
|
const { field } = params;
|
|
1572
|
-
if (field === F$
|
|
1573
|
-
if (field === F$
|
|
1574
|
-
if (field === F$
|
|
1504
|
+
if (field === F$6.productionContainer) return createProductionContainerLoader();
|
|
1505
|
+
if (field === F$6.mfgOrder) return createMfgOrderLoader();
|
|
1506
|
+
if (field === F$6.materialContainerNo) return createMaterialContainerLoader();
|
|
1575
1507
|
};
|
|
1576
1508
|
handleChange(params) {
|
|
1577
1509
|
super.handleChange(params);
|
|
1578
1510
|
const { field, option, value, rowData } = params;
|
|
1579
1511
|
if (!option || isBlank(value)) return;
|
|
1580
1512
|
const source = option._item ?? option;
|
|
1581
|
-
if (field === F$
|
|
1513
|
+
if (field === F$6.mfgOrder) {
|
|
1582
1514
|
applyFillFromMfgOrderOption(rowData, source);
|
|
1583
1515
|
return;
|
|
1584
1516
|
}
|
|
1585
|
-
if (field === F$
|
|
1517
|
+
if (field === F$6.productionContainer || field === F$6.materialContainerNo) {
|
|
1586
1518
|
applyFillFromOption$1(rowData, source);
|
|
1587
1519
|
return;
|
|
1588
1520
|
}
|
|
1589
|
-
if (field === F$
|
|
1521
|
+
if (field === F$6.product) {
|
|
1590
1522
|
applyFillFromProductOption(rowData, source);
|
|
1591
1523
|
}
|
|
1592
1524
|
}
|
|
1593
|
-
async onScan(
|
|
1594
|
-
|
|
1595
|
-
|
|
1525
|
+
async onScan(input) {
|
|
1526
|
+
const parsed = resolveScanParsedValue(input);
|
|
1527
|
+
if (!parsed || !hasProductionIdentificationScanKey(parsed)) {
|
|
1528
|
+
this.error({ content: PRODUCTION_IDENTIFICATION_SCAN_LOT_OR_UNIQUE_REQUIRED_MSG });
|
|
1596
1529
|
return;
|
|
1597
1530
|
}
|
|
1598
|
-
const
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
this.warning({ content: "条码中未解析到批次号/SN" });
|
|
1531
|
+
const records = await matchProductionIdentificationScanRecords(parsed);
|
|
1532
|
+
if (!records.length) {
|
|
1533
|
+
this.error({ content: SCAN_NOT_FOUND_MSG });
|
|
1602
1534
|
return;
|
|
1603
1535
|
}
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1536
|
+
const selected = await this.pickScanRecord(records);
|
|
1537
|
+
if (!selected) return;
|
|
1538
|
+
const fillData = resolveScanFillData(input);
|
|
1539
|
+
const row = isProductionLotOrSn(selected) ? buildProductionContainerRow(selected, parsed, fillData) : buildMaterialContainerRow(selected, parsed, fillData);
|
|
1540
|
+
this.appendOrFillScanRow(row);
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
function buildWarehouseInScanRow(record, parsed, fillData) {
|
|
1544
|
+
const row = {
|
|
1545
|
+
[F$7.product]: record.product_id_,
|
|
1546
|
+
[F$7.productName]: record.product_id_name_,
|
|
1547
|
+
[F$7.productCode]: record.product_id_code_,
|
|
1548
|
+
[F$7.productSpec]: record.product_id_spec_,
|
|
1549
|
+
[F$7.materialNo]: record.material_no_,
|
|
1550
|
+
[F$7.materialNoId]: record.production_identification_id_,
|
|
1551
|
+
[F$7.mfgOrder]: record.mfg_order_id_,
|
|
1552
|
+
[F$7.lotSn]: record.lot_sn_id_,
|
|
1553
|
+
[F$7.uniqueCode]: record.unique_code_,
|
|
1554
|
+
[F$7.reInspectionDate]: record.re_inspection_date_,
|
|
1555
|
+
[F$7.qty]: resolveScanQty(parsed.qty, record.qty_),
|
|
1556
|
+
...fillData
|
|
1557
|
+
};
|
|
1558
|
+
const validityFromRecord = record.validity_;
|
|
1559
|
+
if (parsed.expiration && row[F$7.validity] == null) {
|
|
1560
|
+
row[F$7.validity] = toDateOnly(parsed.expiration);
|
|
1561
|
+
} else if (validityFromRecord != null && row[F$7.validity] == null) {
|
|
1562
|
+
row[F$7.validity] = toDateOnly(validityFromRecord);
|
|
1563
|
+
}
|
|
1564
|
+
return row;
|
|
1565
|
+
}
|
|
1566
|
+
class WarehouseInTableCore extends ProfileDrivenSubTableCore {
|
|
1567
|
+
calcSubTableActionMenu = (params) => {
|
|
1568
|
+
const { showDelBtn } = params;
|
|
1569
|
+
return [
|
|
1570
|
+
{
|
|
1571
|
+
type: SubTableActionMenuTypeEnum.SUBTITLE,
|
|
1572
|
+
label: $t("sys.edhr.bizOperation")
|
|
1573
|
+
},
|
|
1574
|
+
getMenuByAction(SubTableActionEnum.SCAN),
|
|
1575
|
+
{
|
|
1576
|
+
type: SubTableActionMenuTypeEnum.DIVIDER
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
type: SubTableActionMenuTypeEnum.SUBTITLE,
|
|
1580
|
+
label: $t("sys.edhr.editRow")
|
|
1581
|
+
},
|
|
1582
|
+
getMenuByAction(SubTableActionEnum.Insert1RowAfter),
|
|
1583
|
+
getCopySubMenu(),
|
|
1584
|
+
getInsertSubMenu(),
|
|
1585
|
+
...showDelBtn ? [
|
|
1586
|
+
{
|
|
1587
|
+
type: SubTableActionMenuTypeEnum.DIVIDER
|
|
1588
|
+
},
|
|
1589
|
+
getMenuByAction(SubTableActionEnum.DeleteRowCurrent)
|
|
1590
|
+
] : []
|
|
1591
|
+
].filter(Boolean);
|
|
1592
|
+
};
|
|
1593
|
+
async onScan(input) {
|
|
1594
|
+
const parsed = resolveScanParsedValue(input);
|
|
1595
|
+
if (!parsed || !hasProductionIdentificationScanKey(parsed)) {
|
|
1596
|
+
this.error({ content: PRODUCTION_IDENTIFICATION_SCAN_LOT_OR_UNIQUE_REQUIRED_MSG });
|
|
1609
1597
|
return;
|
|
1610
1598
|
}
|
|
1611
|
-
|
|
1612
|
-
|
|
1599
|
+
const records = await matchProductionIdentificationScanRecords(parsed);
|
|
1600
|
+
if (!records.length) {
|
|
1601
|
+
this.error({ content: PRODUCTION_IDENTIFICATION_SCAN_NOT_FOUND_MSG });
|
|
1613
1602
|
return;
|
|
1614
1603
|
}
|
|
1615
|
-
const
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1604
|
+
const selected = await this.pickScanRecord(records);
|
|
1605
|
+
if (!selected) return;
|
|
1606
|
+
const row = buildWarehouseInScanRow(selected, parsed, resolveScanFillData(input));
|
|
1607
|
+
this.appendOrFillScanRow(row);
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
function isSameMaterialBatch(row, record) {
|
|
1611
|
+
if (row[F$8.product] !== record.product_id_) return false;
|
|
1612
|
+
const rowBatchId = row[F$8.materialNoId];
|
|
1613
|
+
const recordBatchId = record.production_identification_id_;
|
|
1614
|
+
if (rowBatchId && recordBatchId) return rowBatchId === recordBatchId;
|
|
1615
|
+
const rowBatchNo = row[F$8.materialNo];
|
|
1616
|
+
const recordBatchNo = record.material_no_ ?? record.name_;
|
|
1617
|
+
return Boolean(rowBatchNo && recordBatchNo && rowBatchNo === recordBatchNo);
|
|
1618
|
+
}
|
|
1619
|
+
function buildWarehouseOutScanRow(record, parsed, fillData, qty) {
|
|
1620
|
+
const row = {
|
|
1621
|
+
[F$8.inventory]: record.id_,
|
|
1622
|
+
[F$8.product]: record.product_id_,
|
|
1623
|
+
[F$8.productName]: record.product_id_name_,
|
|
1624
|
+
[F$8.productCode]: record.product_id_code_,
|
|
1625
|
+
[F$8.productSpec]: record.product_id_spec_,
|
|
1626
|
+
[F$8.materialNo]: record.material_no_,
|
|
1627
|
+
[F$8.materialNoId]: record.production_identification_id_,
|
|
1628
|
+
[F$8.warehouse]: record.warehouse_id_,
|
|
1629
|
+
[F$8.location]: record.location_id_,
|
|
1630
|
+
[F$8.mfgOrder]: record.mfg_order_id_,
|
|
1631
|
+
[F$8.lotSn]: record.lot_sn_id_,
|
|
1632
|
+
[F$8.uniqueCode]: record.unique_code_,
|
|
1633
|
+
[F$8.reInspectionDate]: record.re_inspection_date_,
|
|
1634
|
+
[F$8.qty]: qty,
|
|
1635
|
+
...fillData
|
|
1636
|
+
};
|
|
1637
|
+
const validityFromRecord = record.validate_ ?? record.validity_;
|
|
1638
|
+
if (parsed.expiration) {
|
|
1639
|
+
row[F$8.validity] = toDateOnly(parsed.expiration);
|
|
1640
|
+
} else if (validityFromRecord != null) {
|
|
1641
|
+
row[F$8.validity] = toDateOnly(validityFromRecord);
|
|
1642
|
+
}
|
|
1643
|
+
return row;
|
|
1644
|
+
}
|
|
1645
|
+
class WarehouseOutTableCore extends ProfileDrivenSubTableCore {
|
|
1646
|
+
get warehouseId() {
|
|
1647
|
+
return this.factory.ctx.paramsConfig?.warehouseId;
|
|
1648
|
+
}
|
|
1649
|
+
handleFieldTd = (params) => {
|
|
1650
|
+
const { field, tdHandler } = params;
|
|
1651
|
+
if (field === F$8.product) {
|
|
1652
|
+
tdHandler.mergeTd({
|
|
1653
|
+
cellWidget: {
|
|
1654
|
+
props: {
|
|
1655
|
+
customRenderTag: "allocateProduct",
|
|
1656
|
+
newSpecificConfig: {
|
|
1657
|
+
newOptions: []
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1620
1661
|
});
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1662
|
+
}
|
|
1663
|
+
super.handleFieldTd(params);
|
|
1664
|
+
};
|
|
1665
|
+
calcFieldQuery = (params) => {
|
|
1666
|
+
const { field } = params;
|
|
1667
|
+
if (field === F$8.product) {
|
|
1668
|
+
return {
|
|
1669
|
+
warehouse_id_: this.warehouseId
|
|
1670
|
+
};
|
|
1671
|
+
}
|
|
1672
|
+
};
|
|
1673
|
+
calcSubTableActionMenu = (params) => {
|
|
1674
|
+
const { showDelBtn } = params;
|
|
1675
|
+
return [
|
|
1676
|
+
{
|
|
1677
|
+
type: SubTableActionMenuTypeEnum.SUBTITLE,
|
|
1678
|
+
label: $t("sys.edhr.bizOperation")
|
|
1679
|
+
},
|
|
1680
|
+
getMenuByAction(SubTableActionEnum.SCAN),
|
|
1681
|
+
{
|
|
1682
|
+
type: SubTableActionMenuTypeEnum.DIVIDER
|
|
1683
|
+
},
|
|
1684
|
+
{
|
|
1685
|
+
type: SubTableActionMenuTypeEnum.SUBTITLE,
|
|
1686
|
+
label: $t("sys.edhr.editRow")
|
|
1687
|
+
},
|
|
1688
|
+
getMenuByAction(SubTableActionEnum.Insert1RowAfter),
|
|
1689
|
+
getCopySubMenu(),
|
|
1690
|
+
getInsertSubMenu(),
|
|
1691
|
+
...showDelBtn ? [
|
|
1692
|
+
{
|
|
1693
|
+
type: SubTableActionMenuTypeEnum.DIVIDER
|
|
1694
|
+
},
|
|
1695
|
+
getMenuByAction(SubTableActionEnum.DeleteRowCurrent)
|
|
1696
|
+
] : []
|
|
1697
|
+
].filter(Boolean);
|
|
1698
|
+
};
|
|
1699
|
+
handleChange(params) {
|
|
1700
|
+
super.handleChange(params);
|
|
1701
|
+
const { field, value, option, rowData } = params;
|
|
1702
|
+
if (field !== F$8.product || !option || value === void 0 || value === null || value === "") {
|
|
1703
|
+
return;
|
|
1704
|
+
}
|
|
1705
|
+
for (const { optionField, toField } of FILL_FROM_INVENTORY_OPTION$5) {
|
|
1706
|
+
rowData[toField] = option[optionField];
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
async onScan(input) {
|
|
1710
|
+
const parsed = resolveScanParsedValue(input);
|
|
1711
|
+
if (!parsed || !hasLotOrUniqueCode(parsed)) {
|
|
1712
|
+
this.error({ content: SCAN_LOT_OR_UNIQUE_REQUIRED_MSG });
|
|
1713
|
+
return;
|
|
1714
|
+
}
|
|
1715
|
+
const records = await matchInventoryScanRecords(parsed, this.warehouseId);
|
|
1716
|
+
if (!records.length) {
|
|
1717
|
+
this.error({ content: SCAN_NOT_FOUND_MSG$2 });
|
|
1718
|
+
return;
|
|
1719
|
+
}
|
|
1720
|
+
const selected = await this.pickScanRecord(records);
|
|
1721
|
+
if (!selected) return;
|
|
1722
|
+
const scanQty = resolveScanQty(parsed.qty, selected.qty_);
|
|
1723
|
+
const fillData = resolveScanFillData(input);
|
|
1724
|
+
const visibleRows = this.showTableData;
|
|
1725
|
+
const existIndex = visibleRows.findIndex((row2) => isSameMaterialBatch(row2, selected));
|
|
1726
|
+
if (existIndex >= 0) {
|
|
1727
|
+
const existRow = visibleRows[existIndex];
|
|
1728
|
+
existRow[F$8.qty] = Number(existRow[F$8.qty] ?? 0) + scanQty;
|
|
1729
|
+
this.tableData = [...visibleRows];
|
|
1730
|
+
return;
|
|
1731
|
+
}
|
|
1732
|
+
const row = buildWarehouseOutScanRow(selected, parsed, fillData, scanQty);
|
|
1733
|
+
this.appendOrFillScanRow(row);
|
|
1624
1734
|
}
|
|
1625
1735
|
}
|
|
1626
1736
|
function getClassByType(type) {
|
|
@@ -1767,6 +1877,7 @@ function useRenderPageFactory(props, payload) {
|
|
|
1767
1877
|
const { getConsumeData } = useMaterialBalance();
|
|
1768
1878
|
const validationSyncStops = /* @__PURE__ */ new Map();
|
|
1769
1879
|
const validationSuppressUntil = /* @__PURE__ */ new Map();
|
|
1880
|
+
const mcRuntimeStops = /* @__PURE__ */ new Map();
|
|
1770
1881
|
function unbindFormValidationSync(uniqueId) {
|
|
1771
1882
|
validationSyncStops.get(uniqueId)?.forEach((stop) => stop());
|
|
1772
1883
|
validationSyncStops.delete(uniqueId);
|
|
@@ -1793,6 +1904,55 @@ function useRenderPageFactory(props, payload) {
|
|
|
1793
1904
|
);
|
|
1794
1905
|
validationSyncStops.set(uniqueId, stops);
|
|
1795
1906
|
}
|
|
1907
|
+
function unbindMcRuntime(uniqueId) {
|
|
1908
|
+
const stops = mcRuntimeStops.get(uniqueId);
|
|
1909
|
+
if (!stops) return;
|
|
1910
|
+
stops.forEach((stop) => stop());
|
|
1911
|
+
mcRuntimeStops.delete(uniqueId);
|
|
1912
|
+
MaterialConsumeTableController.render?.destroyAllModals();
|
|
1913
|
+
}
|
|
1914
|
+
function bindMcRuntime(uniqueId, dataStatus) {
|
|
1915
|
+
unbindMcRuntime(uniqueId);
|
|
1916
|
+
const paper = dataCenterMap.value[uniqueId]?.[ComponentTypeEnum.PAPER];
|
|
1917
|
+
const mcList = paper?.props?.materialConsumeTableList ?? [];
|
|
1918
|
+
if (!mcList.length) return;
|
|
1919
|
+
const tmplBomC = tmplBomCMap.value[uniqueId];
|
|
1920
|
+
if (!tmplBomC) return;
|
|
1921
|
+
const stops = [];
|
|
1922
|
+
for (const item of mcList) {
|
|
1923
|
+
const controller = tmplBomC.tableControllers[item.tableKey];
|
|
1924
|
+
if (!controller) continue;
|
|
1925
|
+
const field = item.masterSubField;
|
|
1926
|
+
controller.bindRuntime({
|
|
1927
|
+
tableDataRef: computed({
|
|
1928
|
+
get: () => formStateMap.value[uniqueId]?.[field] ?? [],
|
|
1929
|
+
set: (val) => {
|
|
1930
|
+
if (formStateMap.value[uniqueId]) {
|
|
1931
|
+
formStateMap.value[uniqueId][field] = val;
|
|
1932
|
+
}
|
|
1933
|
+
updatePageData(uniqueId);
|
|
1934
|
+
}
|
|
1935
|
+
}),
|
|
1936
|
+
mainFormState: computed(() => formStateMap.value[uniqueId] ?? {}),
|
|
1937
|
+
dataStatus,
|
|
1938
|
+
defaultRowData: renderUtils.getDefaultValueInfo({
|
|
1939
|
+
defaultDataMap: defaultDataMap.value[uniqueId],
|
|
1940
|
+
key: field
|
|
1941
|
+
})
|
|
1942
|
+
});
|
|
1943
|
+
stops.push(
|
|
1944
|
+
watch(
|
|
1945
|
+
() => controller.materialNoNum,
|
|
1946
|
+
() => {
|
|
1947
|
+
if (controller.dataStatus === "SUBMIT") return;
|
|
1948
|
+
controller.syncQtyRequiredFromBom();
|
|
1949
|
+
},
|
|
1950
|
+
{ immediate: true }
|
|
1951
|
+
)
|
|
1952
|
+
);
|
|
1953
|
+
}
|
|
1954
|
+
if (stops.length) mcRuntimeStops.set(uniqueId, stops);
|
|
1955
|
+
}
|
|
1796
1956
|
const callbackName = {
|
|
1797
1957
|
template: requestTemplateInfo,
|
|
1798
1958
|
instance: requestSelfInfo,
|
|
@@ -1834,6 +1994,7 @@ function useRenderPageFactory(props, payload) {
|
|
|
1834
1994
|
selfInfoList.value.push(res.selfInfo);
|
|
1835
1995
|
registerFormValidationContext(res.basicInfo.uniqueId);
|
|
1836
1996
|
bindFormValidationSync(res.basicInfo.uniqueId);
|
|
1997
|
+
bindMcRuntime(res.basicInfo.uniqueId, res.selfInfo?.dataStatus);
|
|
1837
1998
|
}
|
|
1838
1999
|
});
|
|
1839
2000
|
console.log(
|
|
@@ -2107,7 +2268,9 @@ function useRenderPageFactory(props, payload) {
|
|
|
2107
2268
|
await tmplBomC.init({
|
|
2108
2269
|
formInstBom: selfInfo.formInstBom,
|
|
2109
2270
|
operationId: paramsConfig?.routingOperationId,
|
|
2110
|
-
materialNo
|
|
2271
|
+
materialNo,
|
|
2272
|
+
productQty: paramsConfig?.productQty
|
|
2273
|
+
// 接收数量
|
|
2111
2274
|
// relatedLotNo: paramsConfig?.relatedLotNo,
|
|
2112
2275
|
});
|
|
2113
2276
|
const materialConsumeData = tmplBomC.calcFormState(paper);
|
|
@@ -2227,8 +2390,8 @@ function useRenderPageFactory(props, payload) {
|
|
|
2227
2390
|
paramsConfig,
|
|
2228
2391
|
instanceId: id,
|
|
2229
2392
|
subTableInfo
|
|
2230
|
-
}).catch((
|
|
2231
|
-
console.error("Error in requestCustomSourceData:",
|
|
2393
|
+
}).catch((e2) => {
|
|
2394
|
+
console.error("Error in requestCustomSourceData:", e2);
|
|
2232
2395
|
return null;
|
|
2233
2396
|
}),
|
|
2234
2397
|
transformUtils.getEventInitDataLoad({
|
|
@@ -2243,8 +2406,8 @@ function useRenderPageFactory(props, payload) {
|
|
|
2243
2406
|
findBasicInsInfo,
|
|
2244
2407
|
findFormInsInfo
|
|
2245
2408
|
}
|
|
2246
|
-
}).catch((
|
|
2247
|
-
console.error("Error in getEventInitDataLoad:",
|
|
2409
|
+
}).catch((e2) => {
|
|
2410
|
+
console.error("Error in getEventInitDataLoad:", e2);
|
|
2248
2411
|
return null;
|
|
2249
2412
|
})
|
|
2250
2413
|
]);
|
|
@@ -2324,6 +2487,8 @@ function useRenderPageFactory(props, payload) {
|
|
|
2324
2487
|
annRowDetails: [],
|
|
2325
2488
|
validatorLocationList: [],
|
|
2326
2489
|
validatorMessageMap: {},
|
|
2490
|
+
mcValidatorLocationList: [],
|
|
2491
|
+
mcValidatorMessageMap: {},
|
|
2327
2492
|
mobileTdIdGroups: fieldInfoMap.tdIdGroups,
|
|
2328
2493
|
mobileSelectTdId: void 0,
|
|
2329
2494
|
contentHighlight: paramsConfig?._gct_nocode_of_instance_id_ === props.selfId ? {
|
|
@@ -2342,6 +2507,7 @@ function useRenderPageFactory(props, payload) {
|
|
|
2342
2507
|
foreignFields: fieldInfoMap.foreignFields,
|
|
2343
2508
|
subModelFields: fieldInfoMap.subModelFields,
|
|
2344
2509
|
appendixFields: fieldInfoMap.useAppendixFields,
|
|
2510
|
+
signatureFields: fieldInfoMap.useSignatureFields,
|
|
2345
2511
|
subTableInfo
|
|
2346
2512
|
}
|
|
2347
2513
|
}
|
|
@@ -2351,6 +2517,7 @@ function useRenderPageFactory(props, payload) {
|
|
|
2351
2517
|
function clear() {
|
|
2352
2518
|
basicInfoList.value.forEach((info) => {
|
|
2353
2519
|
unbindFormValidationSync(info.uniqueId);
|
|
2520
|
+
unbindMcRuntime(info.uniqueId);
|
|
2354
2521
|
unregisterValidationContext(info.uniqueId);
|
|
2355
2522
|
});
|
|
2356
2523
|
clearFormRules();
|
|
@@ -2374,9 +2541,9 @@ function useRenderPageFactory(props, payload) {
|
|
|
2374
2541
|
const prevMap = info.validatorMessageMap ?? {};
|
|
2375
2542
|
const sameLocations = prevLocations.length === nextLocations.length && nextLocations.every((k, i) => k === prevLocations[i]);
|
|
2376
2543
|
const sameMessages = sameLocations && nextLocations.every((k) => {
|
|
2377
|
-
const
|
|
2544
|
+
const a10 = prevMap[k];
|
|
2378
2545
|
const b2 = map[k];
|
|
2379
|
-
return JSON.stringify(
|
|
2546
|
+
return JSON.stringify(a10) === JSON.stringify(b2);
|
|
2380
2547
|
});
|
|
2381
2548
|
if (sameMessages) return;
|
|
2382
2549
|
closeValidatorPopovers();
|
|
@@ -2384,9 +2551,29 @@ function useRenderPageFactory(props, payload) {
|
|
|
2384
2551
|
info.validatorMessageMap = map;
|
|
2385
2552
|
});
|
|
2386
2553
|
}
|
|
2554
|
+
function applyMcValidatorComments(uniqueId, comments) {
|
|
2555
|
+
const map = comments && Object.keys(comments).length ? comments : {};
|
|
2556
|
+
const nextLocations = Object.keys(map);
|
|
2557
|
+
basicInfoList.value.forEach((info) => {
|
|
2558
|
+
if (info.uniqueId !== uniqueId) return;
|
|
2559
|
+
const prevLocations = info.mcValidatorLocationList ?? [];
|
|
2560
|
+
const prevMap = info.mcValidatorMessageMap ?? {};
|
|
2561
|
+
const sameLocations = prevLocations.length === nextLocations.length && nextLocations.every((k, i) => k === prevLocations[i]);
|
|
2562
|
+
const sameMessages = sameLocations && nextLocations.every((k) => {
|
|
2563
|
+
const a10 = prevMap[k];
|
|
2564
|
+
const b2 = map[k];
|
|
2565
|
+
return JSON.stringify(a10) === JSON.stringify(b2);
|
|
2566
|
+
});
|
|
2567
|
+
if (sameMessages) return;
|
|
2568
|
+
closeValidatorPopovers();
|
|
2569
|
+
info.mcValidatorLocationList = nextLocations;
|
|
2570
|
+
info.mcValidatorMessageMap = map;
|
|
2571
|
+
});
|
|
2572
|
+
}
|
|
2387
2573
|
function registerFormValidationContext(uniqueId) {
|
|
2388
2574
|
registerValidationContext({
|
|
2389
2575
|
uniqueId,
|
|
2576
|
+
platformType: payload.platformType,
|
|
2390
2577
|
getFormData: () => formStateMap.value?.[uniqueId] ?? {},
|
|
2391
2578
|
getPaper: () => dataCenterMap.value?.[uniqueId]?.[ComponentTypeEnum.PAPER],
|
|
2392
2579
|
getKeepExceptionHighlight: () => {
|
|
@@ -2441,12 +2628,27 @@ function useRenderPageFactory(props, payload) {
|
|
|
2441
2628
|
const res = await validate(formState, dataCenter[ComponentTypeEnum.PAPER], uniqueId);
|
|
2442
2629
|
if (bomC) {
|
|
2443
2630
|
const bomRes = await bomC.submitValidate();
|
|
2631
|
+
applyMcValidatorComments(uniqueId, bomRes.fields ?? null);
|
|
2444
2632
|
if (!bomRes.isValid) {
|
|
2445
2633
|
merge(res, bomRes);
|
|
2634
|
+
return res;
|
|
2635
|
+
}
|
|
2636
|
+
const paper = dataCenter?.[ComponentTypeEnum.PAPER];
|
|
2637
|
+
const objErr = await validateObjectBomQtyOnSubmit({
|
|
2638
|
+
formState,
|
|
2639
|
+
objectFieldList: paper?.props?.objectFieldList,
|
|
2640
|
+
formInstBom: bomC.formInstBom
|
|
2641
|
+
});
|
|
2642
|
+
if (objErr) {
|
|
2643
|
+
const objectBomRes = {
|
|
2644
|
+
isValid: false,
|
|
2645
|
+
fields: { [objErr.field]: [objErr] }
|
|
2646
|
+
};
|
|
2647
|
+
merge(res, objectBomRes);
|
|
2446
2648
|
const info = basicInfoList.value.find((item) => item.uniqueId === uniqueId);
|
|
2447
2649
|
const current = {
|
|
2448
2650
|
...info?.validatorMessageMap ?? {},
|
|
2449
|
-
...
|
|
2651
|
+
...objectBomRes.fields ?? {}
|
|
2450
2652
|
};
|
|
2451
2653
|
applyValidatorComments(uniqueId, Object.keys(current).length ? current : null);
|
|
2452
2654
|
return res;
|
|
@@ -2493,6 +2695,8 @@ function useRenderPageFactory(props, payload) {
|
|
|
2493
2695
|
if (status) {
|
|
2494
2696
|
info.validatorLocationList = [];
|
|
2495
2697
|
info.validatorMessageMap = {};
|
|
2698
|
+
info.mcValidatorLocationList = [];
|
|
2699
|
+
info.mcValidatorMessageMap = {};
|
|
2496
2700
|
closeValidatorPopovers();
|
|
2497
2701
|
}
|
|
2498
2702
|
}
|
|
@@ -2566,7 +2770,10 @@ function useRenderPageFactory(props, payload) {
|
|
|
2566
2770
|
viewMode: RenderModeEnum.ViewMode,
|
|
2567
2771
|
dataStatus: selfInfo.dataStatus
|
|
2568
2772
|
});
|
|
2569
|
-
const
|
|
2773
|
+
const signatureKeys = (currentSelfInfo.newBackupInfo.signatureFields || []).map(
|
|
2774
|
+
(item) => item.fieldId
|
|
2775
|
+
);
|
|
2776
|
+
const idsFormState = transformUtils.getFormDataIdsMap(newFormState, signatureKeys);
|
|
2570
2777
|
merge(formStateMap.value?.[uniqueId], idsFormState);
|
|
2571
2778
|
if (payload.afterProcessData && typeof payload.afterProcessData === "function") {
|
|
2572
2779
|
payload.afterProcessData(formStateMap.value?.[uniqueId]);
|
|
@@ -3122,27 +3329,27 @@ function useFormulaExpWatcher(options) {
|
|
|
3122
3329
|
let calcReqId = 0;
|
|
3123
3330
|
async function computeMinMaxOnce() {
|
|
3124
3331
|
const myId = ++calcReqId;
|
|
3125
|
-
const getValue = (
|
|
3332
|
+
const getValue = (v2) => {
|
|
3126
3333
|
if (returnType === "number") {
|
|
3127
|
-
const parsed =
|
|
3334
|
+
const parsed = v2 == null ? null : parseFloat(String(v2));
|
|
3128
3335
|
return Number.isFinite(parsed) ? parsed : null;
|
|
3129
3336
|
}
|
|
3130
|
-
return
|
|
3337
|
+
return v2;
|
|
3131
3338
|
};
|
|
3132
3339
|
if (needMinValidateCalc) {
|
|
3133
3340
|
try {
|
|
3134
|
-
const
|
|
3341
|
+
const v2 = await onCalculateFormula("min");
|
|
3135
3342
|
if (myId !== calcReqId) return;
|
|
3136
|
-
onMinComputed?.(getValue(
|
|
3137
|
-
} catch (
|
|
3343
|
+
onMinComputed?.(getValue(v2));
|
|
3344
|
+
} catch (e2) {
|
|
3138
3345
|
}
|
|
3139
3346
|
}
|
|
3140
3347
|
if (needMaxValidateCalc) {
|
|
3141
3348
|
try {
|
|
3142
|
-
const
|
|
3349
|
+
const v2 = await onCalculateFormula("max");
|
|
3143
3350
|
if (myId !== calcReqId) return;
|
|
3144
|
-
onMaxComputed?.(getValue(
|
|
3145
|
-
} catch (
|
|
3351
|
+
onMaxComputed?.(getValue(v2));
|
|
3352
|
+
} catch (e2) {
|
|
3146
3353
|
}
|
|
3147
3354
|
}
|
|
3148
3355
|
}
|
|
@@ -3154,14 +3361,14 @@ function useFormulaExpWatcher(options) {
|
|
|
3154
3361
|
const s = topStops.shift();
|
|
3155
3362
|
try {
|
|
3156
3363
|
s && s();
|
|
3157
|
-
} catch (
|
|
3364
|
+
} catch (e2) {
|
|
3158
3365
|
}
|
|
3159
3366
|
}
|
|
3160
3367
|
for (const [, rowMap] of hashRowStops) {
|
|
3161
3368
|
for (const stop2 of rowMap.values()) {
|
|
3162
3369
|
try {
|
|
3163
3370
|
stop2 && stop2();
|
|
3164
|
-
} catch (
|
|
3371
|
+
} catch (e2) {
|
|
3165
3372
|
}
|
|
3166
3373
|
}
|
|
3167
3374
|
}
|
|
@@ -3175,8 +3382,8 @@ function useFormulaExpWatcher(options) {
|
|
|
3175
3382
|
debouncedCompute();
|
|
3176
3383
|
return;
|
|
3177
3384
|
}
|
|
3178
|
-
for (const
|
|
3179
|
-
const { type, processed, hashValue } =
|
|
3385
|
+
for (const p of parseInfos) {
|
|
3386
|
+
const { type, processed, hashValue } = p;
|
|
3180
3387
|
if (type === "plain") {
|
|
3181
3388
|
const stop2 = watch(
|
|
3182
3389
|
() => currentPageFormState.value?.[processed],
|
|
@@ -3355,9 +3562,9 @@ class FormAnnotationController {
|
|
|
3355
3562
|
const items = this.normalizeAllResponse(res);
|
|
3356
3563
|
this.applyAnnotationItems(items, () => true);
|
|
3357
3564
|
return items;
|
|
3358
|
-
} catch (
|
|
3359
|
-
console.error("加载所有批注信息 error",
|
|
3360
|
-
throw
|
|
3565
|
+
} catch (e2) {
|
|
3566
|
+
console.error("加载所有批注信息 error", e2);
|
|
3567
|
+
throw e2;
|
|
3361
3568
|
}
|
|
3362
3569
|
};
|
|
3363
3570
|
handleOpenAnnotation = async () => {
|
|
@@ -3403,219 +3610,195 @@ function filterAnnotationItemsUpToCurrent(items) {
|
|
|
3403
3610
|
return ts <= currentTs;
|
|
3404
3611
|
});
|
|
3405
3612
|
}
|
|
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
3613
|
export {
|
|
3437
|
-
|
|
3614
|
+
ar as AITooltips,
|
|
3438
3615
|
AllocateTableCore,
|
|
3439
3616
|
B3 as BaseFormModelFetcher,
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3617
|
+
at as BinarizeMethodOptions,
|
|
3618
|
+
aD as BindCmpStyleEnum,
|
|
3619
|
+
T as BooleanShowMode,
|
|
3443
3620
|
B2 as BorderTD,
|
|
3444
3621
|
BpmnNodeTypeEnum,
|
|
3445
|
-
|
|
3446
|
-
|
|
3622
|
+
bN as BpmnSignatureTypeEnum,
|
|
3623
|
+
bO as ButtonTypeEnum,
|
|
3447
3624
|
B as BwipCodeType,
|
|
3448
|
-
|
|
3625
|
+
bP as CHECK_TABLE_MEDPRO_PROTOCOL_KEY,
|
|
3449
3626
|
t as CellType,
|
|
3450
|
-
|
|
3627
|
+
a1 as CellWidgetViewState,
|
|
3451
3628
|
CheckDsTypeEnum,
|
|
3452
|
-
|
|
3629
|
+
bQ as CodeRunner,
|
|
3453
3630
|
ComponentTypeEnum,
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3631
|
+
bR as Config_Fields,
|
|
3632
|
+
bS as ControlStatusEnum,
|
|
3633
|
+
aB as DateFormat,
|
|
3634
|
+
aE as DecimalDisplayMode,
|
|
3635
|
+
as as DenoiseMethodOptions,
|
|
3636
|
+
x as DeviceConnector,
|
|
3637
|
+
ap as DeviceLink,
|
|
3461
3638
|
D as DeviceLinkTmplUtil,
|
|
3462
|
-
|
|
3639
|
+
aq as DeviceParamsTypeTitle,
|
|
3463
3640
|
DevicePartConsumeTableCore,
|
|
3464
|
-
|
|
3465
|
-
|
|
3641
|
+
bT as DeviceStatus,
|
|
3642
|
+
a2 as DiagonalDirection,
|
|
3643
|
+
a6 as DiagonalVertex,
|
|
3466
3644
|
_ as DocumentLayout,
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3645
|
+
y as DocumentLoading,
|
|
3646
|
+
d as DocumentPaper,
|
|
3647
|
+
z as DynamicQuickFillModal,
|
|
3648
|
+
e as DynamicTableAction,
|
|
3649
|
+
bU as EBR_PROVIDE_ENUM,
|
|
3650
|
+
bV as EFieldBizTypeEnum,
|
|
3651
|
+
af as EmptySymbol,
|
|
3652
|
+
bW as FieldSysVarDefaultValueEnum,
|
|
3475
3653
|
FillingTypeEnum,
|
|
3476
3654
|
F as FixedQuickFillModal,
|
|
3477
3655
|
FormAnnotationController,
|
|
3478
3656
|
F2 as FormModelController,
|
|
3479
3657
|
FormTmplBomController,
|
|
3480
|
-
|
|
3658
|
+
A as FormTmplConfigController,
|
|
3481
3659
|
FormTypeEnum,
|
|
3482
|
-
|
|
3660
|
+
al as ImageDisplayModeEnum,
|
|
3483
3661
|
I as InstanceStatusValues,
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3662
|
+
av as JoinModelTypeEum,
|
|
3663
|
+
R as LabelPosition,
|
|
3664
|
+
a4 as LineDirection,
|
|
3487
3665
|
L as LineType,
|
|
3488
3666
|
M as MBRender,
|
|
3489
|
-
|
|
3490
|
-
|
|
3667
|
+
C as MCDataUtil,
|
|
3668
|
+
a8 as MCRender,
|
|
3491
3669
|
MaterialConsumeTableController,
|
|
3492
3670
|
MaterialConsumptionPatternEnum,
|
|
3493
3671
|
MaterialRequisitionTableCore,
|
|
3494
3672
|
MaterialStatusEnum,
|
|
3495
|
-
|
|
3673
|
+
bX as MobileFillTypeEnum,
|
|
3496
3674
|
NCB_PROVIDE,
|
|
3497
3675
|
O2 as OCR_MODEL_PRECISION_ENUM_KEY,
|
|
3498
|
-
|
|
3676
|
+
bY as OfficeTypeEnum,
|
|
3499
3677
|
O as Orientation,
|
|
3500
3678
|
j as PageSizeEnum,
|
|
3501
3679
|
P as PaginationFormat,
|
|
3502
|
-
|
|
3680
|
+
Z as PaperSizeMap,
|
|
3503
3681
|
h as PaperWidgeType,
|
|
3504
3682
|
G as PaperWidgeValueType,
|
|
3505
|
-
|
|
3683
|
+
au as ParamModelTypeEnum,
|
|
3506
3684
|
PartStocktakeTableCore,
|
|
3507
3685
|
PlatformEnum,
|
|
3508
|
-
|
|
3686
|
+
bZ as PosEnum,
|
|
3509
3687
|
PretreatmentListTableCore,
|
|
3510
3688
|
ProfileDrivenSubTableCore,
|
|
3511
|
-
|
|
3512
|
-
|
|
3689
|
+
b_ as RangeCompareOp,
|
|
3690
|
+
aR as RangeValidateMode,
|
|
3513
3691
|
RenderModeEnum,
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3692
|
+
X as SignShowTypeEnum,
|
|
3693
|
+
V as SignatureNumberTypeEnum,
|
|
3694
|
+
W as SignatureTimeTypeEnum,
|
|
3695
|
+
Y as SignatureTypeEnum,
|
|
3518
3696
|
SterilizeBatchTableCore,
|
|
3519
3697
|
StocktakeTableCore,
|
|
3520
3698
|
SubTableCore,
|
|
3521
3699
|
SubTableCoreFactory,
|
|
3522
3700
|
SubTableType,
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3701
|
+
b$ as SummaryApproveHisTypeEnum,
|
|
3702
|
+
a5 as TimeDiffFormat,
|
|
3703
|
+
a9 as ViewTypeEnum,
|
|
3526
3704
|
WarehouseInTableCore,
|
|
3527
3705
|
WarehouseInboundTableCore,
|
|
3528
3706
|
WarehouseOutTableCore,
|
|
3529
3707
|
WarehouseOutboundTableCore,
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3708
|
+
a3 as WidgetImageSizeMode,
|
|
3709
|
+
c0 as applyCheckDsDataToRuntime,
|
|
3710
|
+
c1 as applyMedProCheckDsDataToRuntime,
|
|
3533
3711
|
baseDataUtils,
|
|
3534
|
-
|
|
3535
|
-
|
|
3712
|
+
c2 as buildDeviceBaseQuery,
|
|
3713
|
+
aQ as buildDeviceFilterQuery,
|
|
3714
|
+
c3 as buildFormChangeDisplayRows,
|
|
3715
|
+
c4 as buildStableFieldLocation,
|
|
3536
3716
|
calcFillData,
|
|
3537
3717
|
calcUtils,
|
|
3538
3718
|
clearFormRules,
|
|
3539
3719
|
collectAnnotationItemsByLocation,
|
|
3540
3720
|
collectFormChangeFieldLocations,
|
|
3541
3721
|
commonUtils,
|
|
3542
|
-
|
|
3543
|
-
|
|
3722
|
+
c5 as deleteSubtableRow,
|
|
3723
|
+
c6 as detailsHaveFormChangeRowOps,
|
|
3544
3724
|
enrichFormChangeRowDetails,
|
|
3545
|
-
|
|
3725
|
+
c7 as extractFormChangeRowDetails,
|
|
3546
3726
|
extractKeywordFromQueryData,
|
|
3547
|
-
|
|
3548
|
-
|
|
3727
|
+
c8 as fetchCheckDsDataForTable,
|
|
3728
|
+
c9 as fetchCustomCheckDsData,
|
|
3549
3729
|
fetchHistoryConsume,
|
|
3550
|
-
|
|
3730
|
+
ca as fetchMedProCheckDsData,
|
|
3551
3731
|
filterAnnotationItemsUpToCurrent,
|
|
3552
3732
|
getAppInfo,
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3733
|
+
cb as getCheckTableSnapshotKey,
|
|
3734
|
+
cc as getFormChangeRowKey,
|
|
3735
|
+
cd as getFormChangeRowOp,
|
|
3736
|
+
aP as getLotLockedReason,
|
|
3737
|
+
g as getObjectBomMaterialLotQuery,
|
|
3738
|
+
ce as getParseRuleConfig,
|
|
3558
3739
|
getParseRuleInfo,
|
|
3559
3740
|
getParseRuleValue,
|
|
3560
|
-
|
|
3741
|
+
cf as getSubTableQuickFillInfo,
|
|
3561
3742
|
getSuiteKey,
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3743
|
+
cg as handleOldConfig,
|
|
3744
|
+
ch as hasAnyCheckTableSnapshot,
|
|
3745
|
+
ci as hasByTableCheckTableSnapshot,
|
|
3746
|
+
cj as hasSharedCheckTableSnapshot,
|
|
3747
|
+
ck as insertSubtableRows,
|
|
3748
|
+
cl as isAnnLocationSelected,
|
|
3568
3749
|
isBomGranted,
|
|
3569
3750
|
isEdhrSuite,
|
|
3570
3751
|
isEqmSuite,
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3752
|
+
cm as isFormChangeGhostRow,
|
|
3753
|
+
cn as isMedProSuite,
|
|
3754
|
+
co as isRowAddedInCurrentFormChange,
|
|
3755
|
+
cp as jsonSchemaUtils,
|
|
3756
|
+
cq as judgeUnique,
|
|
3757
|
+
aO as materialCheck,
|
|
3758
|
+
cr as migrateDiagonalDirectionToVertex,
|
|
3578
3759
|
nextFormChangeRowViewHistoryId,
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3760
|
+
aG as normalizeRefLoaderResult,
|
|
3761
|
+
cs as parseFrontConfig,
|
|
3762
|
+
ct as recordSubtableRowAdd,
|
|
3763
|
+
cu as recordSubtableRowDelete,
|
|
3764
|
+
aI as refUtils,
|
|
3584
3765
|
registerValidationContext,
|
|
3585
|
-
|
|
3766
|
+
cv as relocateDeletedRowsToEnd,
|
|
3586
3767
|
renderUtils,
|
|
3587
3768
|
requestDisplayValidation,
|
|
3588
3769
|
requestFullValidation,
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3770
|
+
cw as requestMedProCheckDsData,
|
|
3771
|
+
cx as requestNonMedProCheckDsData,
|
|
3772
|
+
cy as resolveAnnotationFieldLocation,
|
|
3773
|
+
a7 as resolveDiagonalVertex,
|
|
3774
|
+
cz as resolveFormChangeRowUi,
|
|
3775
|
+
cA as resolveRowFormChangeMark,
|
|
3776
|
+
az as setSelectAnnotationId,
|
|
3777
|
+
cB as setSelectMobileTdId,
|
|
3778
|
+
ay as setSelectValidatorId,
|
|
3598
3779
|
settleAndValidateDisplay,
|
|
3599
|
-
|
|
3600
|
-
|
|
3780
|
+
aw as sqlUtils,
|
|
3781
|
+
cC as stockCheck,
|
|
3601
3782
|
transformUtils,
|
|
3602
3783
|
unregisterValidationContext,
|
|
3603
3784
|
H as useCalculateFormula,
|
|
3604
|
-
|
|
3605
|
-
|
|
3785
|
+
aN as useCurrentPageFormState,
|
|
3786
|
+
aT as useDependency,
|
|
3606
3787
|
useEbrWikiFactoryV2,
|
|
3607
3788
|
u3 as useFormModel,
|
|
3608
3789
|
u2 as useFormTmplConfig,
|
|
3609
3790
|
useFormulaExpWatcher,
|
|
3610
3791
|
useMaterialBalance,
|
|
3611
|
-
useMaterialStocktake,
|
|
3612
3792
|
useNocodeEmitter,
|
|
3613
|
-
|
|
3614
|
-
|
|
3793
|
+
aA as useNocodeFormWidget,
|
|
3794
|
+
cD as useOnlineFormActionButton,
|
|
3615
3795
|
u as useOnlineFormTransformField2Component,
|
|
3616
3796
|
useRenderPageFactory,
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3797
|
+
b as useStyles,
|
|
3798
|
+
a as useTmplBom,
|
|
3799
|
+
c as useValidator,
|
|
3800
|
+
ax as useWidgetStaticAttrs,
|
|
3801
|
+
validate,
|
|
3802
|
+
v as validateObjectBomForScan,
|
|
3803
|
+
validateObjectBomQtyOnSubmit
|
|
3621
3804
|
};
|