@gct-paas/excel 0.1.26 → 0.1.28-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{VueVideoPlayer-0DuOfiQX.js → VueVideoPlayer-DoCV5anE.js} +2 -2
- package/dist/{agg-design-Bs7uvazc.js → agg-design-FWqhGZMN.js} +1 -1
- package/dist/{agg-props-Bp3BzB8p.js → agg-props-Demj2zwb.js} +1 -1
- package/dist/{agg-style-5rib-2BW.js → agg-style-0D2plP6P.js} +1 -1
- package/dist/{align-editor-DQ8dFN7Z.js → align-editor-BT_0oTzG.js} +1 -1
- package/dist/{attach-fields-editor-C96vYS5i.js → attach-fields-editor-Bh-SLSaJ.js} +5 -5
- package/dist/{barcode-design-GARKK2E6.js → barcode-design-B6DeTtec.js} +2 -2
- package/dist/base/index.es.js +437 -586
- package/dist/{base-font-editor-D1Yhc2dM.js → base-font-editor-rUy04_I5.js} +2 -2
- package/dist/{boolean-design-E8aTzvqE.js → boolean-design-s-0j811G.js} +2 -2
- package/dist/{boolean-props-DXxrp-m9.js → boolean-props-BKDCL1yv.js} +3 -3
- package/dist/{boolean-style-CL0DlbC0.js → boolean-style-z1WMMTXQ.js} +4 -4
- package/dist/{cell-upload-Mt9EhaFR.js → cell-upload-DIfLFlqF.js} +1 -1
- package/dist/{date-range-editor-CWD3tYMA.js → date-range-editor-Bl5qPmvu.js} +2 -2
- package/dist/{date-time-design-DxEvgEi8.js → date-time-design-BTNkgPAM.js} +1 -1
- package/dist/{date-time-props-B5Xtc7-X.js → date-time-props-DiVxg9n4.js} +3 -3
- package/dist/{date-time-style-CH-mslF5.js → date-time-style-yt5pO1dc.js} +1 -1
- package/dist/{decimal-design-DvIA4NX0.js → decimal-design-BW5UQRTH.js} +1 -1
- package/dist/{decimal-display-mode-DZwDd5fU.js → decimal-display-mode-BWR1rZ3-.js} +2 -2
- package/dist/{decimal-props-BKRzrJ-r.js → decimal-props-S3vHwaWf.js} +4 -4
- package/dist/{decimal-style-DMFs7IFs.js → decimal-style-6q9_KbIT.js} +1 -1
- package/dist/{default-value-editor.vue_vue_type_script_setup_true_name_default-value-editor_lang-BLCWBDOv.js → default-value-editor.vue_vue_type_script_setup_true_name_default-value-editor_lang-B51R6Kdt.js} +2 -2
- package/dist/{diagonal-design-COpzJE_o.js → diagonal-design-BKuv-KYn.js} +2 -2
- package/dist/{double-design-BTJtq1hk.js → double-design-CrnloQ6U.js} +1 -1
- package/dist/{double-props-Bq3vZziK.js → double-props-CIqRhF3C.js} +4 -4
- package/dist/{double-style-DiufxslF.js → double-style-BRXKv9Tt.js} +1 -1
- package/dist/{dynamic-table-action-Dqp3OJDg.js → dynamic-table-action-B3_wsebH.js} +1359 -1077
- package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-CvVlP70-.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-_s66osEc.js} +3396 -621
- package/dist/{edit.utils-CXmmCnxE-W27Whv1y.js → edit.utils-CXmmCnxE-C1IiqVhe.js} +1 -1
- package/dist/{enum-design-BcF4g87b.js → enum-design-4iAQqQWj.js} +2 -2
- package/dist/{enum-props-C7JjTMv4.js → enum-props-BTNED9Yi.js} +3 -3
- package/dist/{enum-style-CyAkQvzE.js → enum-style-BKunBcCU.js} +3 -3
- package/dist/excel.css +1120 -797
- package/dist/{exceljs.min-D-ILZl-Z.js → exceljs.min-DqUfJ7Zu.js} +2 -2
- package/dist/{expression-design-CjzPxio0.js → expression-design-Avbzm2SR.js} +1 -1
- package/dist/{expression-props-mAVBd5Lq.js → expression-props-BJ2AaS83.js} +1 -1
- package/dist/{expression-style-CrRd3CZN.js → expression-style-Cf0ZciKB.js} +1 -1
- package/dist/{file-design-BvSmEEHz.js → file-design-DXTNk70M.js} +1 -1
- package/dist/{file-props-CmbLCylK.js → file-props-GieYTgUG.js} +2 -2
- package/dist/{file-style-ouUREdJB.js → file-style-CLDdPXPd.js} +1 -1
- package/dist/{font-editor-5O8-WS9U.js → font-editor-DFkc4KNc.js} +3 -3
- package/dist/{image-design-DOdX4Ejf.js → image-design-DWY2Pn2m.js} +2 -2
- package/dist/{image-design-D5Avl99X.js → image-design-J45gqUS9.js} +1 -1
- package/dist/{image-props-DS7B2haQ.js → image-props-DZmoqEbT.js} +1 -1
- package/dist/{image-style-BdC16P3Z.js → image-style-C41-zdmF.js} +1 -1
- package/dist/{index-CqvvTfDm.js → index-5k7C2AD1.js} +1 -1
- package/dist/{index-CZB6MFo2.js → index-B-UBLtsV.js} +1 -1
- package/dist/{index-tVnYGnyM.js → index-B3D6zOat.js} +1 -1
- package/dist/{index-DZWPjTfD.js → index-B9nlN0jW.js} +1 -1
- package/dist/{index--x-rjhUN.js → index-BHIdTmFi.js} +3697 -3053
- package/dist/{index-Bg7RbNAd.js → index-BNn5fobS.js} +1 -1
- package/dist/{index-DjO3xXoL.js → index-BlnMSgZL.js} +2 -2
- package/dist/{index-7Z0q-sUY.js → index-BsOmgpN3.js} +1 -1
- package/dist/{index-u0UnKD61.js → index-Bs_2N-BE.js} +1 -1
- package/dist/{index-Ul5I5n2Y.js → index-BtUdO868.js} +1 -1
- package/dist/{index-DeHhItHR.js → index-C0K1pWGN.js} +1 -1
- package/dist/{index-COPdP22U.js → index-C4hw1NhV.js} +1 -1
- package/dist/{index-Bs5CmUJ6.js → index-C6-vGm0H.js} +1 -1
- package/dist/{index-BA1e8Zw5.js → index-CR7wxW9-.js} +1 -1
- package/dist/{index-Bgz9h2Ur.js → index-CYKuotDL.js} +217 -98
- package/dist/{index-BGwmxIrV.js → index-Cir8zmM7.js} +1 -1
- package/dist/{index-nDINH7fF.js → index-D-uEhZUx.js} +5 -3
- package/dist/{index-DWlCnH_H.js → index-DIknXBmB.js} +2 -2
- package/dist/{index-DPFhljcW.js → index-DRfeEqsi.js} +12 -1
- package/dist/{index-CF4GPHX_.js → index-DXZ9-91Q.js} +1 -1
- package/dist/{index-DAVr0Puy.js → index-Dlcg-_u1.js} +1 -1
- package/dist/{index-B6YwjnNP.js → index-DpPM2hsI.js} +1 -1
- package/dist/{index-POh3kOtN.js → index-DsVq6bop.js} +1 -1
- package/dist/{index-CUDme4M_.js → index-DxfrB4yU.js} +2 -2
- package/dist/{index-OD0V6QZx.js → index-DyTI4fVG.js} +4 -2
- package/dist/{index-upoyI1QX.js → index-FJf8yRGg.js} +1 -1
- package/dist/{index-CO9M5kpu.js → index-Iri9iQ7A.js} +1 -1
- package/dist/{index-B4uW2dJ0.js → index-Izpo3y-u.js} +1 -1
- package/dist/{index-CMM4w3Dw.js → index-Kc67z3Sn.js} +1 -1
- package/dist/{index-mEVrSKb2.js → index-O2psifaU.js} +5 -3
- package/dist/{index-B9bcnmUU.js → index-ZKvvKhlF.js} +1 -1
- package/dist/{index-BqzGUi2w.js → index-s5kgaRm2.js} +1 -1
- package/dist/{index-BP7lVop7.js → index-vDKWJHdv.js} +1 -1
- package/dist/index.es.js +3 -3
- package/dist/{integer-design-XoAOklHI.js → integer-design-oIq4PZgB.js} +1 -1
- package/dist/{integer-props-UG7rgL98.js → integer-props-Dv0CFbj2.js} +4 -4
- package/dist/{integer-style-BwF6P-1M.js → integer-style-CQsFEa78.js} +1 -1
- package/dist/mb-render-13-1F66x.js +263 -0
- package/dist/{number-input-ex-BUhgQIz_.js → number-input-ex-b3jwWBec.js} +1 -1
- package/dist/{org-props-BYIR1Qja.js → org-props-CP6UEZUk.js} +2 -2
- package/dist/{org-style-DXX3gSuh.js → org-style-CVX9tnGL.js} +1 -1
- package/dist/{pagination-design-BVFW-spw.js → pagination-design-CzI3BVnu.js} +2 -2
- package/dist/paper-widget-design-DMIGXtG2.js +4 -0
- package/dist/{qrcode-design-CoFoYXe2.js → qrcode-design-eO4Bd2-V.js} +1 -1
- package/dist/{ref-autofill-editor-8-T3_HNa.js → ref-autofill-editor-DXDYy7g2.js} +7 -6
- package/dist/{ref-props-CkbU8Sr5.js → ref-props-Aiwbx2BA.js} +3 -3
- package/dist/{ref-style-BUqCIl-S.js → ref-style-BYC5yPHt.js} +1 -1
- package/dist/{regex-editor-BAfv4Tt4.js → regex-editor-DWglxD2y.js} +2 -2
- package/dist/{revo-grid.entry-RWcWTs8I.js → revo-grid.entry-DxhjfysT.js} +1 -1
- package/dist/{revogr-attribution_7.entry-BCSuWj1U.js → revogr-attribution_7.entry-ChJzXX9c.js} +3 -3
- package/dist/{revogr-clipboard_3.entry-BTpzs_Rr.js → revogr-clipboard_3.entry-CTfO-vHs.js} +2 -2
- package/dist/{revogr-data_4.entry-DYkSdHom.js → revogr-data_4.entry-DpsZq5Vu.js} +2 -2
- package/dist/{revogr-filter-panel.entry-DOqtLQay.js → revogr-filter-panel.entry-CkNGH07B.js} +1 -1
- package/dist/{select-render-type-editor.vue_vue_type_script_setup_true_lang-D26X3WBX.js → select-render-type-editor.vue_vue_type_script_setup_true_lang-D36XgznF.js} +2 -2
- package/dist/{serialnumber-design-Bx6oAxgA.js → serialnumber-design-cvNqTdU4.js} +1 -1
- package/dist/shared/index.es.js +29 -29
- package/dist/{signature-design-BYwB_lgz.js → signature-design-CxYVBP9N.js} +1 -1
- package/dist/{signature-props-SNM8PS89.js → signature-props-Cs3PONrq.js} +3 -3
- package/dist/{signature-style-BqZ2DAS6.js → signature-style-CAa92-pw.js} +1 -1
- package/dist/{single-field-drop-BwCKh5bM.js → single-field-drop-BXX5wlj_.js} +2 -2
- package/dist/{size-editor-DUazmEj_.js → size-editor-B4aRo4sR.js} +1 -1
- package/dist/src/assets/svgs/table/index.d.ts +38 -0
- package/dist/src/domain/index.d.ts +1 -0
- package/dist/src/domain/suite/suite-features.d.ts +14 -0
- package/dist/src/domain/table/business/check/check-table/index.d.ts +1 -0
- package/dist/src/domain/table/business/check/check-table/profile/index.d.ts +3 -0
- package/dist/src/domain/table/business/material/material-balance/index.d.ts +1 -0
- package/dist/src/domain/table/business/material/material-balance/profile/index.d.ts +3 -0
- package/dist/src/domain/table/business/material/material-consume/index.d.ts +1 -0
- package/dist/src/domain/table/business/material/material-consume/profile/index.d.ts +3 -0
- package/dist/src/domain/table/business/preprocess/pretreatment-list/index.d.ts +2 -0
- package/dist/src/domain/table/business/preprocess/pretreatment-list/profile/field-keys.d.ts +187 -0
- package/dist/src/domain/table/business/preprocess/pretreatment-list/profile/fields.d.ts +2 -0
- package/dist/src/domain/table/business/preprocess/pretreatment-list/profile/index.d.ts +3 -0
- package/dist/src/domain/table/business/preprocess/pretreatment-list/runtime/register-handlers.d.ts +1 -0
- package/dist/src/domain/table/business/preprocess/pretreatment-list/runtime/row-change-handlers.d.ts +26 -0
- package/dist/src/domain/table/business/sterilize/entrust-steril-batch-list/index.d.ts +1 -0
- package/dist/src/domain/table/business/sterilize/entrust-steril-batch-list/profile/index.d.ts +3 -0
- package/dist/src/domain/table/business/warehouse/device-part-consume/index.d.ts +2 -0
- package/dist/src/domain/table/business/warehouse/device-part-consume/profile/field-keys.d.ts +65 -0
- package/dist/src/domain/table/business/warehouse/device-part-consume/profile/fields.d.ts +2 -0
- package/dist/src/domain/table/business/warehouse/device-part-consume/profile/index.d.ts +3 -0
- package/dist/src/domain/table/business/warehouse/device-part-consume/runtime/register-handlers.d.ts +1 -0
- package/dist/src/domain/table/business/warehouse/device-part-consume/runtime/row-change-handlers.d.ts +6 -0
- package/dist/src/domain/table/business/warehouse/part-stocktake/index.d.ts +2 -0
- package/dist/src/domain/table/business/warehouse/part-stocktake/profile/field-keys.d.ts +70 -0
- package/dist/src/domain/table/business/warehouse/part-stocktake/profile/fields.d.ts +2 -0
- package/dist/src/domain/table/business/warehouse/part-stocktake/profile/index.d.ts +3 -0
- package/dist/src/domain/table/business/warehouse/part-stocktake/runtime/register-handlers.d.ts +1 -0
- package/dist/src/domain/table/business/warehouse/part-stocktake/runtime/row-change-handlers.d.ts +10 -0
- package/dist/src/domain/table/business/warehouse/warehouse-allocate/index.d.ts +2 -0
- package/dist/src/domain/table/business/warehouse/warehouse-allocate/profile/field-keys.d.ts +87 -0
- package/dist/src/domain/table/business/warehouse/warehouse-allocate/profile/fields.d.ts +2 -0
- package/dist/src/domain/table/business/warehouse/warehouse-allocate/profile/index.d.ts +3 -0
- package/dist/src/domain/table/business/warehouse/warehouse-allocate/runtime/register-handlers.d.ts +1 -0
- package/dist/src/domain/table/business/warehouse/warehouse-allocate/runtime/row-change-handlers.d.ts +7 -0
- package/dist/src/domain/table/business/warehouse/warehouse-in/index.d.ts +2 -0
- package/dist/src/domain/table/business/warehouse/warehouse-in/profile/field-keys.d.ts +39 -0
- package/dist/src/domain/table/business/warehouse/warehouse-in/profile/fields.d.ts +2 -0
- package/dist/src/domain/table/business/warehouse/warehouse-in/profile/index.d.ts +3 -0
- package/dist/src/domain/table/business/warehouse/warehouse-in/runtime/register-handlers.d.ts +1 -0
- package/dist/src/domain/table/business/warehouse/warehouse-in/runtime/row-change-handlers.d.ts +6 -0
- package/dist/src/domain/table/business/warehouse/warehouse-in-out/index.d.ts +1 -0
- package/dist/src/domain/table/business/warehouse/warehouse-in-out/profile/index.d.ts +3 -0
- package/dist/src/domain/table/business/warehouse/warehouse-inbound/index.d.ts +2 -0
- package/dist/src/domain/table/business/warehouse/warehouse-inbound/profile/field-keys.d.ts +33 -0
- package/dist/src/domain/table/business/warehouse/warehouse-inbound/profile/fields.d.ts +2 -0
- package/dist/src/domain/table/business/warehouse/warehouse-inbound/profile/index.d.ts +3 -0
- package/dist/src/domain/table/business/warehouse/warehouse-inbound/runtime/register-handlers.d.ts +1 -0
- package/dist/src/domain/table/business/warehouse/warehouse-inbound/runtime/row-change-handlers.d.ts +6 -0
- package/dist/src/domain/table/business/warehouse/warehouse-inventory/index.d.ts +2 -0
- package/dist/src/domain/table/business/warehouse/warehouse-inventory/profile/field-keys.d.ts +114 -0
- package/dist/src/domain/table/business/warehouse/warehouse-inventory/profile/fields.d.ts +2 -0
- package/dist/src/domain/table/business/warehouse/warehouse-inventory/profile/index.d.ts +3 -0
- package/dist/src/domain/table/business/warehouse/warehouse-inventory/runtime/register-handlers.d.ts +1 -0
- package/dist/src/domain/table/business/warehouse/warehouse-inventory/runtime/row-change-handlers.d.ts +11 -0
- package/dist/src/domain/table/business/warehouse/warehouse-out/index.d.ts +2 -0
- package/dist/src/domain/table/business/warehouse/warehouse-out/profile/field-keys.d.ts +84 -0
- package/dist/src/domain/table/business/warehouse/warehouse-out/profile/fields.d.ts +2 -0
- package/dist/src/domain/table/business/warehouse/warehouse-out/profile/index.d.ts +3 -0
- package/dist/src/domain/table/business/warehouse/warehouse-out/runtime/register-handlers.d.ts +1 -0
- package/dist/src/domain/table/business/warehouse/warehouse-out/runtime/row-change-handlers.d.ts +6 -0
- package/dist/src/domain/table/business/warehouse/warehouse-outbound/index.d.ts +2 -0
- package/dist/src/domain/table/business/warehouse/warehouse-outbound/profile/field-keys.d.ts +64 -0
- package/dist/src/domain/table/business/warehouse/warehouse-outbound/profile/fields.d.ts +2 -0
- package/dist/src/domain/table/business/warehouse/warehouse-outbound/profile/index.d.ts +3 -0
- package/dist/src/domain/table/business/warehouse/warehouse-outbound/runtime/register-handlers.d.ts +1 -0
- package/dist/src/domain/table/business/warehouse/warehouse-outbound/runtime/row-change-handlers.d.ts +6 -0
- package/dist/src/domain/table/data/dynamic-table/index.d.ts +1 -0
- package/dist/src/domain/table/data/dynamic-table/profile/index.d.ts +3 -0
- package/dist/src/domain/table/data/fixed-table/index.d.ts +1 -0
- package/dist/src/domain/table/data/fixed-table/profile/index.d.ts +3 -0
- package/dist/src/domain/table/data/two-d-table/index.d.ts +1 -0
- package/dist/src/domain/table/data/two-d-table/profile/index.d.ts +3 -0
- package/dist/src/domain/table/design/autofill-expander.d.ts +19 -0
- package/dist/src/domain/table/design/create-subtable.d.ts +14 -0
- package/dist/src/domain/table/design/hooks/on-field-attach.d.ts +13 -0
- package/dist/src/domain/table/design/index.d.ts +6 -0
- package/dist/src/domain/table/design/label.d.ts +3 -0
- package/dist/src/domain/table/design/panel-features.d.ts +16 -0
- package/dist/src/domain/table/design/panel-type.d.ts +6 -0
- package/dist/src/domain/table/design/ribbon-options.d.ts +38 -0
- package/dist/src/domain/table/design/sub-model-matcher.d.ts +10 -0
- package/dist/src/domain/table/index.d.ts +12 -0
- package/dist/src/domain/table/registry.d.ts +27 -0
- package/dist/src/domain/table/runtime/apply-profile.d.ts +16 -0
- package/dist/src/domain/table/runtime/runtime-handlers.d.ts +9 -0
- package/dist/src/domain/table/types.d.ts +137 -0
- package/dist/src/index.d.ts +2 -2
- package/dist/src/nocode-base/src/components/document-quick-fill/quick-fill.util.d.ts +0 -1
- package/dist/src/nocode-base/src/components/document-sub-table-action/type.d.ts +3 -1
- package/dist/src/nocode-base/src/constant/index.d.ts +18 -2
- package/dist/src/nocode-base/src/core/sub-table/allocate-table-core.d.ts +12 -7
- package/dist/src/nocode-base/src/core/sub-table/index.d.ts +1 -0
- package/dist/src/nocode-base/src/core/sub-table/pretreatment-list-table-core.d.ts +12 -5
- package/dist/src/nocode-base/src/core/sub-table/profile-driven-sub-table-core.d.ts +58 -0
- package/dist/src/nocode-base/src/core/sub-table/stocktake-table-core.d.ts +17 -19
- package/dist/src/nocode-base/src/core/sub-table/utils/pretreatment/field-keys.d.ts +2 -117
- package/dist/src/nocode-base/src/core/sub-table/utils/stocktake/field-keys.d.ts +2 -60
- package/dist/src/nocode-base/src/hooks/app-info/index.d.ts +4 -0
- package/dist/src/nocode-base/src/hooks/device-link/controller.d.ts +6 -0
- package/dist/src/nocode-base/src/hooks/device-link/types.d.ts +10 -0
- package/dist/src/nocode-base/src/hooks/form-model/form-model-controller.d.ts +6 -1
- package/dist/src/nocode-base/src/hooks/form-model/types.d.ts +5 -0
- package/dist/src/nocode-base/src/hooks/form-tmpl-config/form-tmpl-config-controller.d.ts +16 -0
- package/dist/src/nocode-base/src/hooks/material-consume/bom-validator.d.ts +140 -18
- package/dist/src/nocode-base/src/hooks/material-consume/index.d.ts +1 -0
- package/dist/src/nocode-base/src/hooks/material-consume/material-consume-group-merge.d.ts +20 -0
- package/dist/src/nocode-base/src/hooks/material-consume/material-consume-table-controller.d.ts +50 -8
- package/dist/src/nocode-base/src/hooks/material-consume/mc-render.d.ts +8 -0
- package/dist/src/nocode-base/src/hooks/material-consume/product-id-query.d.ts +31 -0
- package/dist/src/nocode-base/src/hooks/material-consume/scan-fill.d.ts +10 -0
- package/dist/src/nocode-base/src/hooks/material-consume/scan-validator.d.ts +192 -0
- package/dist/src/nocode-base/src/hooks/material-consume/service.d.ts +2 -0
- package/dist/src/nocode-base/src/hooks/material-consume/types.d.ts +9 -0
- package/dist/src/nocode-base/src/hooks/material-date/material-date.d.ts +44 -0
- package/dist/src/nocode-base/src/hooks/material-date/service.d.ts +4 -0
- package/dist/src/nocode-base/src/hooks/material-date/use-material-date.d.ts +2 -0
- package/dist/src/nocode-base/src/hooks/useDependency.d.ts +2 -3
- package/dist/src/nocode-base/src/interface/render.d.ts +3 -1
- package/dist/src/nocode-base/src/types/business/allocate.d.ts +8 -0
- package/dist/src/nocode-base/src/types/fields/i-trace.d.ts +4 -0
- package/dist/src/nocode-base/src/types/render/mc-render.d.ts +8 -0
- package/dist/src/nocode-base/src/types/widgets/i-paper.d.ts +16 -0
- package/dist/src/nocode-base/src/types/widgets/i-serialnumber.d.ts +4 -0
- package/dist/src/nocode-web-render/src/render/index.d.ts +2 -1
- package/dist/src/nocode-web-render/src/render/sub-table/common/multi-rows-modal.vue.d.ts +15 -0
- package/dist/src/nocode-web-render/src/render/sub-table/common/scan-modal.vue.d.ts +2 -3
- package/dist/src/nocode-web-render/src/render/sub-table/material-consume/mc-web-render.d.ts +4 -0
- package/dist/src/online-form/src/components/device/device-select.vue.d.ts +1 -1
- package/dist/src/online-form/src/views/__cell_widgets__/common/assoc-filter-editor/assoc-filter.util.d.ts +1 -1
- package/dist/src/online-form/src/views/__cell_widgets__/common/input-prop-editor/input-prop-editor.vue.d.ts +2 -0
- package/dist/src/online-form/src/views/designer/constants/index.d.ts +2 -0
- package/dist/src/online-form/src/views/designer/enums/index.d.ts +8 -1
- package/dist/src/online-form/src/views/designer/hooks/useAllSpreadSheets.d.ts +48 -0
- package/dist/src/online-form/src/views/designer/hooks/useSpreadSheet.d.ts +66 -17
- package/dist/src/online-form/src/views/designer/modules/panel/panel-data-init-config/common/add-ipaas/parameter-struct/json-expression-editor.vue.d.ts +1 -1
- package/dist/src/online-form/src/views/designer/modules/panel/panel-tmpl-config/ai-tmpl/ai-tmpl-card.vue.d.ts +12 -0
- package/dist/src/online-form/src/views/designer/modules/panel/panel-tmpl-config/ai-tmpl/ai-tmpl-editor.vue.d.ts +19 -2
- package/dist/src/online-form/src/views/designer/modules/panel/panel-tmpl-config/ai-tmpl/identify-param-card.vue.d.ts +10 -0
- package/dist/src/online-form/src/views/designer/modules/panel/sub-table/comps/repeating-sub-table-config.vue.d.ts +2 -0
- package/dist/src/online-form/src/views/designer/modules/panel/sub-table/comps/sub-table-panel-shell.vue.d.ts +24 -0
- package/dist/src/online-form/src/views/designer/modules/panel/sub-table/comps/use-dynamic-sub-table-panel.d.ts +1533 -0
- package/dist/src/online-form/src/views/designer/modules/panel/{material-consumption → sub-table/material-consumption}/bom-entry-editor.vue.d.ts +1 -1
- package/dist/src/online-form/src/views/designer/modules/panel/{material-consumption → sub-table/material-consumption}/bom-modal.vue.d.ts +1 -1
- package/dist/src/online-form/src/views/designer/modules/panel/{panel-check-table → sub-table/panel-check-table}/select-check-ds-modal.vue.d.ts +1 -1
- package/dist/src/online-form/src/views/designer/modules/toolkit/model-field/add-field-btn.vue.d.ts +2 -0
- package/dist/src/online-form/src/views/inline-cell/use-inline-icon-catalog.d.ts +5 -1
- package/dist/src/shared/components/Scrollbar/src/Scrollbar.vue.d.ts +1 -1
- package/dist/src/shared/components/Signature/logic/index.d.ts +4 -0
- package/dist/src/shared/enum/field-type.d.ts +17 -5
- package/dist/src/shared/enum/index.d.ts +4 -2
- package/dist/src/shared/enum/online-form.d.ts +14 -2
- package/dist/{text-design-Wz4yRq1g.js → text-design-DbDDDCTT.js} +2 -2
- package/dist/{text-design-DN3i2RFW.js → text-design-vFgsAOs6.js} +2 -2
- package/dist/{text-props-B00HIRMS.js → text-props-LQ8JxfCA.js} +4 -5
- package/dist/{text-style-fu30umvT.js → text-style-CKBIm6Y6.js} +1 -1
- package/dist/{throttle-Cpk1LoGk-Fx3LWSEd.js → throttle-Cpk1LoGk-CJfuMBhT.js} +1 -1
- package/dist/{timediff-design-B-4vNIoK.js → timediff-design-C7qKjT0h.js} +1 -1
- package/dist/{trace-design-DtHxTSsv.js → trace-design-DdHPN-JX.js} +2 -2
- package/dist/{trace-props-Rg7mqGt_.js → trace-props-BSRELXnc.js} +60 -48
- package/dist/{trace-style-mCgCCGMz.js → trace-style-BOx3LU4R.js} +1 -1
- package/dist/{user-props-DonrdBsi.js → user-props-DCy_CVdE.js} +2 -2
- package/dist/{user-style-CumTeI-A.js → user-style-BbXij2Ui.js} +1 -1
- package/dist/{value-editor.vue_vue_type_style_index_0_lang-DRQFluA7.js → value-editor.vue_vue_type_style_index_0_lang-DqIfRgzS.js} +2 -2
- package/dist/{version-select-DZOffw2U.js → version-select--5mTgIzw.js} +1 -1
- package/dist/web-render/index.es.js +6 -5
- package/dist/{widget-barcode-Djaec1i2.js → widget-barcode-BYZx9koE.js} +4 -4
- package/dist/{widget-diagonal-Dw5Q9iRl.js → widget-diagonal-CbEoMTV6.js} +3 -3
- package/dist/{widget-image-Dq6zxwLm.js → widget-image-Bgb0W9tX.js} +5 -5
- package/dist/{widget-line-Csab5i9z.js → widget-line-xBvHpkdt.js} +2 -2
- package/dist/{widget-pagination-BmsUSsKm.js → widget-pagination-BjH75g8_.js} +5 -5
- package/dist/{widget-power-DtPCy7UV.js → widget-power-Bvr05ltd.js} +3 -3
- package/dist/{widget-qrcode-BAMbK-3b.js → widget-qrcode-Bj-ntq_n.js} +3 -3
- package/dist/{widget-rangelimit-Bx9qfojs.js → widget-rangelimit-BHa420t4.js} +3 -3
- package/dist/{widget-serialnumber-Bz6EQZR_.js → widget-serialnumber-BoYlmag6.js} +1 -1
- package/dist/{widget-text-CkXtxU3r.js → widget-text-_Q96wqKl.js} +5 -5
- package/dist/{widget-timediff-wqTd7OZs.js → widget-timediff-DtoWALwY.js} +2 -2
- package/package.json +8 -7
- package/dist/mb-render-CRA1gDau.js +0 -449
- package/dist/paper-widget-design-DFOElS47.js +0 -4
- package/dist/src/online-form/src/views/designer/modules/panel/panel-material-balance-table.vue.d.ts +0 -2
- package/dist/src/online-form/src/views/designer/modules/panel/panel-material-stocktake-table.vue.d.ts +0 -2
- package/dist/src/online-form/src/views/designer/modules/panel/panel-pretreatment-table.vue.d.ts +0 -2
- package/dist/src/online-form/src/views/designer/modules/panel/panel-sterilize-batch-table.vue.d.ts +0 -2
- package/dist/src/online-form/src/views/designer/modules/panel/panel-tmpl-config/common/add-tmpl-btn.vue.d.ts +0 -7
- /package/dist/src/online-form/src/views/designer/modules/panel/{material-consumption → sub-table/material-consumption}/edit-parse-rule.vue.d.ts +0 -0
- /package/dist/src/online-form/src/views/designer/modules/panel/{material-consumption → sub-table/material-consumption}/panel-material-consumption-table.vue.d.ts +0 -0
- /package/dist/src/online-form/src/views/designer/modules/panel/{material-consumption → sub-table/material-consumption}/translate-span.vue.d.ts +0 -0
- /package/dist/src/online-form/src/views/designer/modules/panel/{material-consumption → sub-table/material-consumption}/use-product-translate.d.ts +0 -0
- /package/dist/src/online-form/src/views/designer/modules/panel/{panel-check-table → sub-table/panel-check-table}/add-ds-btn.vue.d.ts +0 -0
- /package/dist/src/online-form/src/views/designer/modules/panel/{panel-check-table → sub-table/panel-check-table}/right-list.vue.d.ts +0 -0
- /package/dist/src/online-form/src/views/designer/modules/panel/{panel-check-table.vue.d.ts → sub-table/panel-check-table.vue.d.ts} +0 -0
- /package/dist/src/online-form/src/views/designer/modules/panel/{panel-data-group-2d.vue.d.ts → sub-table/panel-data-group-2d.vue.d.ts} +0 -0
- /package/dist/src/online-form/src/views/designer/modules/panel/{panel-data-group.vue.d.ts → sub-table/panel-data-group.vue.d.ts} +0 -0
- /package/dist/src/online-form/src/views/designer/modules/panel/{panel-fixed-table.vue.d.ts → sub-table/panel-fixed-table.vue.d.ts} +0 -0
- /package/dist/src/online-form/src/views/designer/modules/panel/{panel-dynamic-table.vue.d.ts → sub-table/panel-repeating-sub-table.vue.d.ts} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { computed, watch, toRaw, onUnmounted, markRaw, ref,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { u as useFormModel, w as watchDebounced } from "./mb-render-CRA1gDau.js";
|
|
1
|
+
import { computed, watch, toRaw, onUnmounted, markRaw, ref, reactive, inject, provide, defineComponent, openBlock, createElementBlock, mergeProps, unref, createElementVNode, normalizeClass, renderSlot, createCommentVNode, createVNode, toDisplayString, toRef, isVNode, h, onBeforeMount, resolveComponent, createBlock, withCtx, Fragment, renderList, createTextVNode, onMounted } from "vue";
|
|
2
|
+
import { isNil, cloneDeep, merge, pickBy, mergeWith, omit, last, pick } from "lodash-es";
|
|
3
|
+
import { aw as useWidgetStaticAttrs, m as ComponentTypeEnum, cq as assembleRules, cr as deleteFormRule, cs as setFormRule, bl as requestDisplayValidation, ct as isReferenceOptionActive, cu as validateAllFields, cv as runValidation, co as stockCheck, cw as ensureFrontRowKey, cx as FRONT_ROW_KEY, by as getRowId, aH as getParseRuleInfo, bf as transformUtils, cc as materialCheck, aK as getLotLockedReason, aP as FormulaRuleFieldKeyEnum, cb as judgeUnique, w as api, d as SubTableType, aI as getParseRuleValue, bs as uuid2, ao as DeviceLink, _ as _export_sfc, aE as NCB_PROVIDE, bQ as buildFormChangeDisplayRows, cm as resolveRowFormChangeMark, cl as resolveFormChangeRowUi, c6 as isAnnLocationSelected, cn as setSelectMobileTdId, c7 as isFormChangeGhostRow, t as CellType, ay as setSelectAnnotationId, cg as recordSubtableRowDelete, bS as deleteSubtableRow, ch as relocateDeletedRowsToEnd, c5 as insertSubtableRows, cf as recordSubtableRowAdd, aJ as useCurrentPageFormState, aB as renderUtils, y as useModal, cy as q, cz as groupFixedTableRows, cA as QUICK_FILL_ALLOWED_FIELDS, cB as processQuickFillRows, cC as getIsGroupEmpty, aM as RenderModeEnum, c0 as getSubTableQuickFillInfo } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-_s66osEc.js";
|
|
5
4
|
import dayjs from "dayjs";
|
|
6
5
|
import { u as useNamespace } from "./use-namespace-BxkK4ofX.js";
|
|
7
6
|
import { Modal, message } from "ant-design-vue";
|
|
7
|
+
import { u as useFormModel } from "./mb-render-13-1F66x.js";
|
|
8
8
|
const InstanceStatusValues = {
|
|
9
9
|
/** 作废状态 */
|
|
10
10
|
ABANDON: "ABANDON",
|
|
@@ -74,587 +74,6 @@ function useStyles(widget, isArea = false) {
|
|
|
74
74
|
});
|
|
75
75
|
return { otherClass };
|
|
76
76
|
}
|
|
77
|
-
const commonUtils = {
|
|
78
|
-
/** 列表转成树 */
|
|
79
|
-
listTransformTree: (list) => {
|
|
80
|
-
const cloneData = cloneDeep(list);
|
|
81
|
-
const result = [];
|
|
82
|
-
const map = /* @__PURE__ */ new Map();
|
|
83
|
-
cloneData.forEach((item) => {
|
|
84
|
-
map.set(item.id, { ...item, selectable: item.type === "DOC", children: [] });
|
|
85
|
-
});
|
|
86
|
-
cloneData.forEach((item) => {
|
|
87
|
-
const node = map.get(item.id);
|
|
88
|
-
if (item.rootNode) {
|
|
89
|
-
result.push(node);
|
|
90
|
-
} else {
|
|
91
|
-
const parent = map.get(item.parentId);
|
|
92
|
-
if (parent) {
|
|
93
|
-
parent.children.push(node);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
return result;
|
|
98
|
-
},
|
|
99
|
-
findFirstDoc: (tree, ofId) => {
|
|
100
|
-
const cloneTree = cloneDeep(tree);
|
|
101
|
-
const queue = [...cloneTree];
|
|
102
|
-
while (queue.length > 0) {
|
|
103
|
-
const node = queue.shift();
|
|
104
|
-
if (node.type === "DOC" || !node.type) {
|
|
105
|
-
if (ofId) {
|
|
106
|
-
if (node.id === ofId || node.tmplId === ofId) {
|
|
107
|
-
return node;
|
|
108
|
-
}
|
|
109
|
-
} else {
|
|
110
|
-
return node;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
if (node.children && node.children.length > 0) {
|
|
114
|
-
queue.push(...node.children);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return null;
|
|
118
|
-
},
|
|
119
|
-
uuid2: (len, radix) => {
|
|
120
|
-
const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
|
|
121
|
-
let uuid = [], i;
|
|
122
|
-
radix = radix || chars.length;
|
|
123
|
-
if (len) {
|
|
124
|
-
for (i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix];
|
|
125
|
-
} else {
|
|
126
|
-
let r;
|
|
127
|
-
uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
|
|
128
|
-
uuid[14] = "4";
|
|
129
|
-
for (i = 0; i < 36; i++) {
|
|
130
|
-
if (!uuid[i]) {
|
|
131
|
-
r = 0 | Math.random() * 16;
|
|
132
|
-
uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
return uuid.join("");
|
|
137
|
-
},
|
|
138
|
-
isEmptyValue: (value) => {
|
|
139
|
-
return value === void 0 || value === null || typeof value === "string" && value.trim() === "" || Array.isArray(value) && value.length === 0;
|
|
140
|
-
},
|
|
141
|
-
get gctInstanceStatusTheme() {
|
|
142
|
-
return {
|
|
143
|
-
"gct-nocode-instance-status--stash": {
|
|
144
|
-
textColor: "#F77E4A",
|
|
145
|
-
background: "rgba(247,126,74,0.1)",
|
|
146
|
-
iconBackground: "#FFC837",
|
|
147
|
-
placeholder: $t("sys.edhr.formInsStatusEnum.STASH")
|
|
148
|
-
},
|
|
149
|
-
"gct-nocode-instance-status--partial-submit": {
|
|
150
|
-
textColor: "#FFAA00",
|
|
151
|
-
background: "rgba(255,170,0,0.1)",
|
|
152
|
-
iconBackground: "#FFD666",
|
|
153
|
-
placeholder: $t("sys.appDesigner.approval.button.PartialSubmit")
|
|
154
|
-
},
|
|
155
|
-
"gct-nocode-instance-status--finish": {
|
|
156
|
-
textColor: "#309C41",
|
|
157
|
-
background: "rgba(48,156,65,0.1)",
|
|
158
|
-
iconBackground: "#76DA57",
|
|
159
|
-
placeholder: $t("sys.bpmn.flowNodeInstStatus.COMPLETED")
|
|
160
|
-
},
|
|
161
|
-
"gct-nocode-instance-status--abnormal": {
|
|
162
|
-
textColor: "#F54547",
|
|
163
|
-
background: " rgba(245,69,71,0.1)",
|
|
164
|
-
iconBackground: "#FF6776",
|
|
165
|
-
placeholder: $t("sys.bpmn.flowNodeInstStatus.EXCEPTION")
|
|
166
|
-
},
|
|
167
|
-
"gct-nocode-instance-status--not-filled": {
|
|
168
|
-
textColor: "#6D82B0",
|
|
169
|
-
background: "#E6EEFF",
|
|
170
|
-
iconBackground: "#B4C8F4",
|
|
171
|
-
placeholder: $t("sys.edhr.instanceStatus2DhrEnum.UNFILLED")
|
|
172
|
-
},
|
|
173
|
-
"gct-nocode-instance-status--running": {
|
|
174
|
-
textColor: "#13C2C2",
|
|
175
|
-
background: "rgba(19,194,194,0.1)",
|
|
176
|
-
iconBackground: "#13C2C2",
|
|
177
|
-
placeholder: $t("sys.bpmn.bizNodeInstStatus.running")
|
|
178
|
-
},
|
|
179
|
-
"gct-nocode-instance-status--already-filled": {
|
|
180
|
-
textColor: "#026AC8",
|
|
181
|
-
background: " rgba(2,106,200,0.1)",
|
|
182
|
-
iconBackground: "#026AC8",
|
|
183
|
-
placeholder: $t("sys.edhr.instanceStatus2DhrEnum.FILLED")
|
|
184
|
-
},
|
|
185
|
-
"gct-nocode-instance-status--invalid": {
|
|
186
|
-
textColor: "#737A87",
|
|
187
|
-
background: "#E5E5E5",
|
|
188
|
-
iconBackground: "#C3C3C3",
|
|
189
|
-
placeholder: $t("sys.edhr.dhrLogType.ABANDON")
|
|
190
|
-
},
|
|
191
|
-
"gct-nocode-instance-status--archived": {
|
|
192
|
-
textColor: "#dda200",
|
|
193
|
-
background: "#faf3df",
|
|
194
|
-
iconBackground: "#dda200",
|
|
195
|
-
placeholder: $t("sys.edhr.recordBook.archived")
|
|
196
|
-
},
|
|
197
|
-
"gct-nocode-instance-status--tmpl": {
|
|
198
|
-
textColor: "#742fb2",
|
|
199
|
-
background: "#f9f2ff",
|
|
200
|
-
iconBackground: "#742fb2",
|
|
201
|
-
placeholder: $t("sys.appDesigner.template")
|
|
202
|
-
},
|
|
203
|
-
"gct-nocode-instance-status--in-audit": {
|
|
204
|
-
textColor: "#FF52C5",
|
|
205
|
-
background: "rgba(255,82,197, 0.1)",
|
|
206
|
-
iconBackground: "#FF52C5",
|
|
207
|
-
placeholder: $t("sys.edhr.instanceStatus2FormEnum.IN_AUDIT")
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
function useOnlineFormActionButton() {
|
|
213
|
-
const baseBtn = [
|
|
214
|
-
{
|
|
215
|
-
type: "Cancel",
|
|
216
|
-
customTitle: $t("sys.cancelText"),
|
|
217
|
-
title: $t("sys.cancelText"),
|
|
218
|
-
enable: 1,
|
|
219
|
-
buttonType: "builtin",
|
|
220
|
-
isCustom: false
|
|
221
|
-
}
|
|
222
|
-
];
|
|
223
|
-
const processFormBtnGroup = [
|
|
224
|
-
{
|
|
225
|
-
type: ButtonTypeEnum.Return,
|
|
226
|
-
title: $t("sys.appDesigner.approval.button.Return"),
|
|
227
|
-
api: api.apaas.onlineForm.postProcessReturn
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
type: ButtonTypeEnum.Reassign,
|
|
231
|
-
title: $t("sys.appDesigner.approval.button.Reassign"),
|
|
232
|
-
style: {
|
|
233
|
-
type: "primary"
|
|
234
|
-
},
|
|
235
|
-
api: api.apaas.onlineForm.postProcessReassign
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
type: ButtonTypeEnum.Save,
|
|
239
|
-
title: $t("sys.saveText"),
|
|
240
|
-
style: {
|
|
241
|
-
type: "primary"
|
|
242
|
-
},
|
|
243
|
-
api: api.apaas.onlineForm.postProcessSave
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
type: ButtonTypeEnum.PartialSubmit,
|
|
247
|
-
title: $t("sys.appDesigner.approval.button.PartialSubmit"),
|
|
248
|
-
style: {
|
|
249
|
-
type: "primary"
|
|
250
|
-
},
|
|
251
|
-
api: api.apaas.onlineForm.postProcessPartialSubmit
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
type: ButtonTypeEnum.Submit,
|
|
255
|
-
title: $t("sys.submit"),
|
|
256
|
-
style: {
|
|
257
|
-
type: "primary"
|
|
258
|
-
},
|
|
259
|
-
api: api.apaas.onlineForm.postProcessSubmit
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
type: ButtonTypeEnum.Approve,
|
|
263
|
-
title: $t("sys.appDesigner.approval.button.Approve"),
|
|
264
|
-
style: {
|
|
265
|
-
type: "primary"
|
|
266
|
-
},
|
|
267
|
-
api: api.apaas.onlineForm.postProcessApprove
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
type: ButtonTypeEnum.Qualified,
|
|
271
|
-
title: $t("sys.appDesigner.approval.button.Qualified"),
|
|
272
|
-
api: api.apaas.onlineForm.postProcessApproveQualification
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
type: ButtonTypeEnum.Unqualified,
|
|
276
|
-
title: $t("sys.appDesigner.approval.button.Unqualified"),
|
|
277
|
-
api: api.apaas.onlineForm.postProcessApprove
|
|
278
|
-
}
|
|
279
|
-
];
|
|
280
|
-
const formChangeBtnGroup = [
|
|
281
|
-
{
|
|
282
|
-
type: ButtonTypeEnum.Return,
|
|
283
|
-
title: $t("sys.appDesigner.approval.button.Return"),
|
|
284
|
-
api: api.apaas.form.postChangeProcessReturn,
|
|
285
|
-
medproApi: window.NocodeAdapter.apis?.postMedproFormChangeProcessReturn
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
type: ButtonTypeEnum.Reassign,
|
|
289
|
-
title: $t("sys.appDesigner.approval.button.Reassign"),
|
|
290
|
-
style: {
|
|
291
|
-
type: "primary"
|
|
292
|
-
},
|
|
293
|
-
api: api.apaas.form.postChangeProcessReassign,
|
|
294
|
-
medproApi: window.NocodeAdapter.apis?.postMedproFormChangeProcessReassign
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
type: ButtonTypeEnum.Approve,
|
|
298
|
-
title: $t("sys.appDesigner.approval.button.Approve"),
|
|
299
|
-
style: {
|
|
300
|
-
type: "primary"
|
|
301
|
-
},
|
|
302
|
-
api: api.apaas.form.postChangeProcessApprove,
|
|
303
|
-
medproApi: window.NocodeAdapter.apis?.postMedproFormChangeProcessApprove
|
|
304
|
-
}
|
|
305
|
-
];
|
|
306
|
-
function renderActionButton(showButtons, buttonConfig, options) {
|
|
307
|
-
const { formType, inDrawer, isViewPage, isRecordFill, processOperation } = options || {};
|
|
308
|
-
const _baseBtn = inDrawer && !isViewPage ? baseBtn.slice() : [];
|
|
309
|
-
if (!formType || formType === FormTypeEnum.TEXT || formType === FormTypeEnum.VIEW) {
|
|
310
|
-
return [];
|
|
311
|
-
}
|
|
312
|
-
if (options.isFormChangeApprovalPage) {
|
|
313
|
-
const buttonMap = safeParseArray(buttonConfig).reduce((acc, current) => {
|
|
314
|
-
acc[current.type] = current;
|
|
315
|
-
return acc;
|
|
316
|
-
}, {});
|
|
317
|
-
return formChangeBtnGroup.filter((info) => showButtons.includes(info.type)).map((item) => {
|
|
318
|
-
const btn = buttonMap?.[item.type];
|
|
319
|
-
if (btn && btn.enable) {
|
|
320
|
-
return {
|
|
321
|
-
...btn,
|
|
322
|
-
style: {
|
|
323
|
-
...item.style,
|
|
324
|
-
...btn.style
|
|
325
|
-
},
|
|
326
|
-
buttonType: "builtin",
|
|
327
|
-
customTitle: btn.alias || item.title || $t("sys.pageDesigner.button"),
|
|
328
|
-
belongFormChangeApproval: true,
|
|
329
|
-
api: options.isMedPro ? item.medproApi : item.api
|
|
330
|
-
};
|
|
331
|
-
}
|
|
332
|
-
}).filter((i) => i);
|
|
333
|
-
}
|
|
334
|
-
if (formType === FormTypeEnum.BASE || formType === FormTypeEnum.FILE) {
|
|
335
|
-
if (options.modeType === RenderModeEnum.ViewMode) {
|
|
336
|
-
return [];
|
|
337
|
-
}
|
|
338
|
-
return _baseBtn.concat(
|
|
339
|
-
mergeByMultiKey(safeParseArray(buttonConfig), safeParseArray(processOperation), {
|
|
340
|
-
keyFields: ["type", "buttonType"]
|
|
341
|
-
}).filter((btn) => {
|
|
342
|
-
return Boolean(btn.enable) && (!isRecordFill || btn.buttonType === "builtin" && (btn.type === ButtonTypeEnum.Save || btn.type === ButtonTypeEnum.Submit));
|
|
343
|
-
}).map((btn) => {
|
|
344
|
-
const isSaveOrSubmit = btn.buttonType === "builtin" && [ButtonTypeEnum.Submit, ButtonTypeEnum.Save, ButtonTypeEnum.PartialSubmit].includes(
|
|
345
|
-
btn.type
|
|
346
|
-
);
|
|
347
|
-
return {
|
|
348
|
-
...btn,
|
|
349
|
-
...isSaveOrSubmit && {
|
|
350
|
-
style: {
|
|
351
|
-
type: "primary",
|
|
352
|
-
...btn.style
|
|
353
|
-
}
|
|
354
|
-
},
|
|
355
|
-
customTitle: btn.alias || btn.title || $t("sys.pageDesigner.button"),
|
|
356
|
-
signatureType: btn.signatureType || BpmnSignatureTypeEnum.None,
|
|
357
|
-
api: btn.type === ButtonTypeEnum.PartialSubmit ? api.apaas.onlineForm.postPartialSubmit : btn.type === ButtonTypeEnum.Save ? api.apaas.onlineForm.postStash : api.apaas.onlineForm.postBaseSubmit
|
|
358
|
-
};
|
|
359
|
-
}).sort((a, b) => a.buttonType === b.buttonType ? 0 : a.buttonType === "custom" ? 1 : -1)
|
|
360
|
-
);
|
|
361
|
-
}
|
|
362
|
-
if (formType === FormTypeEnum.PROCESS && options.bpmnType !== BpmnNodeTypeEnum.BpmnEnd) {
|
|
363
|
-
if (isViewPage || options.modeType === RenderModeEnum.ViewMode) {
|
|
364
|
-
return [];
|
|
365
|
-
}
|
|
366
|
-
const mergedBtns = mergeByMultiKey(
|
|
367
|
-
safeParseArray(buttonConfig),
|
|
368
|
-
safeParseArray(processOperation)
|
|
369
|
-
);
|
|
370
|
-
const custonBuiltinBtns = mergedBtns.filter((e) => e.isCustomBuiltin);
|
|
371
|
-
const buttonMap = mergedBtns.reduce((acc, current) => {
|
|
372
|
-
acc[current.type] = current;
|
|
373
|
-
return acc;
|
|
374
|
-
}, {});
|
|
375
|
-
const customButton = Object.values(buttonMap).filter(
|
|
376
|
-
(btn) => btn.enable && has(btn, "isCustom") && btn.isCustom && showButtons.includes(btn.type)
|
|
377
|
-
).map((item) => {
|
|
378
|
-
const btn = buttonMap?.[item.type];
|
|
379
|
-
return {
|
|
380
|
-
...btn,
|
|
381
|
-
buttonType: "custom",
|
|
382
|
-
customTitle: btn.alias || item.title || $t("sys.pageDesigner.button"),
|
|
383
|
-
api: api.apaas.onlineForm.postProcessJump
|
|
384
|
-
};
|
|
385
|
-
});
|
|
386
|
-
return _baseBtn.concat(customButton).concat(
|
|
387
|
-
// 流程表单内置按钮
|
|
388
|
-
processFormBtnGroup.filter((info) => showButtons.includes(info.type)).map((item) => {
|
|
389
|
-
const btn = buttonMap?.[item.type];
|
|
390
|
-
if (btn && btn.enable && !btn.isCustom) {
|
|
391
|
-
return {
|
|
392
|
-
...btn,
|
|
393
|
-
style: {
|
|
394
|
-
...item.style,
|
|
395
|
-
...btn.style
|
|
396
|
-
},
|
|
397
|
-
buttonType: "builtin",
|
|
398
|
-
customTitle: btn.alias || item.title || $t("sys.pageDesigner.button"),
|
|
399
|
-
api: item.api
|
|
400
|
-
};
|
|
401
|
-
}
|
|
402
|
-
}).filter((i) => i)
|
|
403
|
-
).concat(
|
|
404
|
-
custonBuiltinBtns.filter((e) => showButtons.includes(e.type)).map((e) => {
|
|
405
|
-
const btn = buttonMap?.[e.type];
|
|
406
|
-
const processBtn = processFormBtnGroup.find((f) => f.type === e.sourceType) || {};
|
|
407
|
-
if (btn && btn.enable && btn.isCustomBuiltin) {
|
|
408
|
-
return {
|
|
409
|
-
...btn,
|
|
410
|
-
style: {
|
|
411
|
-
...processBtn.style,
|
|
412
|
-
...btn.style
|
|
413
|
-
},
|
|
414
|
-
buttonType: "builtin",
|
|
415
|
-
cusBuiltinType: btn.type,
|
|
416
|
-
type: btn.sourceType,
|
|
417
|
-
customTitle: btn.alias || processBtn.title || $t("sys.pageDesigner.button"),
|
|
418
|
-
api: processBtn.api
|
|
419
|
-
};
|
|
420
|
-
}
|
|
421
|
-
}).filter((i) => i)
|
|
422
|
-
);
|
|
423
|
-
}
|
|
424
|
-
return _baseBtn;
|
|
425
|
-
}
|
|
426
|
-
const autoSaveButtonMap = {
|
|
427
|
-
[FormTypeEnum.BASE]: {
|
|
428
|
-
type: ButtonTypeEnum.Save,
|
|
429
|
-
title: $t("sys.saveText"),
|
|
430
|
-
customTitle: $t("sys.saveText"),
|
|
431
|
-
buttonType: "builtin",
|
|
432
|
-
api: api.apaas.onlineForm.postStash
|
|
433
|
-
},
|
|
434
|
-
[FormTypeEnum.PROCESS]: {
|
|
435
|
-
type: ButtonTypeEnum.Save,
|
|
436
|
-
title: $t("sys.saveText"),
|
|
437
|
-
customTitle: $t("sys.saveText"),
|
|
438
|
-
buttonType: "builtin",
|
|
439
|
-
api: api.apaas.onlineForm.postProcessSave
|
|
440
|
-
}
|
|
441
|
-
};
|
|
442
|
-
return {
|
|
443
|
-
renderActionButton,
|
|
444
|
-
autoSaveButtonMap
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
const useOnlineFormTransformField2Component = (fieldType) => {
|
|
448
|
-
return {
|
|
449
|
-
[FIELD_TYPE.TEXT]: {
|
|
450
|
-
cmpKey: ComponentTypeEnum.Input
|
|
451
|
-
},
|
|
452
|
-
[FIELD_TYPE.LONG_TEXT]: {
|
|
453
|
-
cmpKey: ComponentTypeEnum.Textarea
|
|
454
|
-
},
|
|
455
|
-
[FIELD_TYPE.INTEGER]: {
|
|
456
|
-
cmpKey: ComponentTypeEnum.Inputnumber
|
|
457
|
-
},
|
|
458
|
-
[FIELD_TYPE.LONG]: {
|
|
459
|
-
cmpKey: ComponentTypeEnum.Inputnumber
|
|
460
|
-
},
|
|
461
|
-
[FIELD_TYPE.DOUBLE]: {
|
|
462
|
-
cmpKey: ComponentTypeEnum.InputDouble
|
|
463
|
-
},
|
|
464
|
-
[FIELD_TYPE.DECIMAL]: {
|
|
465
|
-
cmpKey: ComponentTypeEnum.Inputnumber
|
|
466
|
-
},
|
|
467
|
-
[FIELD_TYPE.BOOLEAN]: {
|
|
468
|
-
cmpKey: ComponentTypeEnum.Switch
|
|
469
|
-
},
|
|
470
|
-
[FIELD_TYPE.SERIAL]: {
|
|
471
|
-
cmpKey: ComponentTypeEnum.Input
|
|
472
|
-
},
|
|
473
|
-
[FIELD_TYPE.IMAGE]: {
|
|
474
|
-
cmpKey: ComponentTypeEnum.UploadImage
|
|
475
|
-
},
|
|
476
|
-
[FIELD_TYPE.SIGNATURE]: {
|
|
477
|
-
cmpKey: ComponentTypeEnum.Sign
|
|
478
|
-
},
|
|
479
|
-
[FIELD_TYPE.ATTACHMENT]: {
|
|
480
|
-
cmpKey: ComponentTypeEnum.UploadFile
|
|
481
|
-
},
|
|
482
|
-
[FIELD_TYPE.USER]: {
|
|
483
|
-
cmpKey: ComponentTypeEnum.Userpicker
|
|
484
|
-
},
|
|
485
|
-
[FIELD_TYPE.USER_MULTI]: {
|
|
486
|
-
cmpKey: ComponentTypeEnum.Userpicker
|
|
487
|
-
},
|
|
488
|
-
[FIELD_TYPE.ORG]: {
|
|
489
|
-
cmpKey: ComponentTypeEnum.Department
|
|
490
|
-
},
|
|
491
|
-
[FIELD_TYPE.ORG_MULTI]: {
|
|
492
|
-
cmpKey: ComponentTypeEnum.Department
|
|
493
|
-
},
|
|
494
|
-
[FIELD_TYPE.ENUM]: {
|
|
495
|
-
cmpKey: ComponentTypeEnum.EnumSelect
|
|
496
|
-
},
|
|
497
|
-
[FIELD_TYPE.ENUM_MULTI]: {
|
|
498
|
-
cmpKey: ComponentTypeEnum.EnumSelect
|
|
499
|
-
},
|
|
500
|
-
[FIELD_TYPE.OPTION]: {
|
|
501
|
-
cmpKey: ComponentTypeEnum.EnumSelect
|
|
502
|
-
},
|
|
503
|
-
[FIELD_TYPE.OPTION_MULTI]: {
|
|
504
|
-
cmpKey: ComponentTypeEnum.EnumSelect
|
|
505
|
-
},
|
|
506
|
-
[FIELD_TYPE.REF]: {
|
|
507
|
-
cmpKey: ComponentTypeEnum.Select
|
|
508
|
-
},
|
|
509
|
-
[FIELD_TYPE.REF_MULTI]: {
|
|
510
|
-
cmpKey: ComponentTypeEnum.Select
|
|
511
|
-
},
|
|
512
|
-
[FIELD_TYPE.MODEL_RELATION]: {
|
|
513
|
-
cmpKey: ComponentTypeEnum.Select
|
|
514
|
-
},
|
|
515
|
-
[FIELD_TYPE.WAREHOUSE]: {
|
|
516
|
-
cmpKey: ComponentTypeEnum.Select
|
|
517
|
-
},
|
|
518
|
-
[FIELD_TYPE.LOCATION]: {
|
|
519
|
-
cmpKey: ComponentTypeEnum.Select
|
|
520
|
-
},
|
|
521
|
-
[FIELD_TYPE.DATE]: {
|
|
522
|
-
cmpKey: ComponentTypeEnum.Datepicker
|
|
523
|
-
},
|
|
524
|
-
[FIELD_TYPE.DATE_TIME]: {
|
|
525
|
-
cmpKey: ComponentTypeEnum.DateTimepicker
|
|
526
|
-
},
|
|
527
|
-
[FIELD_TYPE.TIME]: {
|
|
528
|
-
cmpKey: ComponentTypeEnum.Timepicker
|
|
529
|
-
},
|
|
530
|
-
[FIELD_TYPE.EXPRESSION]: {
|
|
531
|
-
cmpKey: ComponentTypeEnum.EXPRESSION
|
|
532
|
-
},
|
|
533
|
-
[FIELD_TYPE.AGG]: {
|
|
534
|
-
cmpKey: ComponentTypeEnum.AGG
|
|
535
|
-
},
|
|
536
|
-
[FIELD_TYPE.MATERIAL_NO]: {
|
|
537
|
-
cmpKey: ComponentTypeEnum.Trace
|
|
538
|
-
},
|
|
539
|
-
[FIELD_TYPE.STERILIZE_LOT]: {
|
|
540
|
-
cmpKey: ComponentTypeEnum.Trace
|
|
541
|
-
},
|
|
542
|
-
[FIELD_TYPE.MATERIAL_LOT]: {
|
|
543
|
-
cmpKey: ComponentTypeEnum.Trace
|
|
544
|
-
},
|
|
545
|
-
[FIELD_TYPE.RELATED_LOT_NO]: {
|
|
546
|
-
cmpKey: ComponentTypeEnum.Trace
|
|
547
|
-
},
|
|
548
|
-
[FIELD_TYPE.PRODUCT]: {
|
|
549
|
-
cmpKey: ComponentTypeEnum.Trace
|
|
550
|
-
},
|
|
551
|
-
[FIELD_TYPE.DEVICE]: {
|
|
552
|
-
cmpKey: ComponentTypeEnum.Trace
|
|
553
|
-
},
|
|
554
|
-
[FIELD_TYPE.MFG_ORDER]: {
|
|
555
|
-
cmpKey: ComponentTypeEnum.Trace
|
|
556
|
-
},
|
|
557
|
-
[FIELD_TYPE.RECORD_NO]: {
|
|
558
|
-
cmpKey: ComponentTypeEnum.Trace
|
|
559
|
-
},
|
|
560
|
-
[FIELD_TYPE.TRACE_DATE]: {
|
|
561
|
-
cmpKey: ComponentTypeEnum.Trace
|
|
562
|
-
},
|
|
563
|
-
[FIELD_TYPE.ORDER_NO]: {
|
|
564
|
-
cmpKey: ComponentTypeEnum.Trace
|
|
565
|
-
},
|
|
566
|
-
[FIELD_TYPE.EXTERNAL_REF_NO]: {
|
|
567
|
-
cmpKey: ComponentTypeEnum.Trace
|
|
568
|
-
},
|
|
569
|
-
[FIELD_TYPE.SHOPFLOOR]: {
|
|
570
|
-
cmpKey: ComponentTypeEnum.Trace
|
|
571
|
-
},
|
|
572
|
-
[FIELD_TYPE.ROUTING_OPERATION]: {
|
|
573
|
-
cmpKey: ComponentTypeEnum.Select
|
|
574
|
-
},
|
|
575
|
-
[FIELD_TYPE.GOOD_QTY]: {
|
|
576
|
-
cmpKey: ComponentTypeEnum.InputDouble
|
|
577
|
-
},
|
|
578
|
-
[FIELD_TYPE.NOT_GOOD_QTY]: {
|
|
579
|
-
cmpKey: ComponentTypeEnum.InputDouble
|
|
580
|
-
},
|
|
581
|
-
[FIELD_TYPE.REPORT_START_TIME]: {
|
|
582
|
-
cmpKey: ComponentTypeEnum.DateTimepicker
|
|
583
|
-
},
|
|
584
|
-
[FIELD_TYPE.REPORT_END_TIME]: {
|
|
585
|
-
cmpKey: ComponentTypeEnum.DateTimepicker
|
|
586
|
-
},
|
|
587
|
-
[FIELD_TYPE.WORK_HOURS]: {
|
|
588
|
-
cmpKey: ComponentTypeEnum.Inputnumber
|
|
589
|
-
},
|
|
590
|
-
[FIELD_TYPE.PRODUCTION_DATE]: {
|
|
591
|
-
cmpKey: ComponentTypeEnum.Datepicker
|
|
592
|
-
},
|
|
593
|
-
[FIELD_TYPE.REPORTER]: {
|
|
594
|
-
cmpKey: ComponentTypeEnum.Sign
|
|
595
|
-
},
|
|
596
|
-
[FIELD_TYPE.NOT_GOOD_REASON]: {
|
|
597
|
-
cmpKey: ComponentTypeEnum.Select
|
|
598
|
-
},
|
|
599
|
-
[FIELD_TYPE.NOT_GOOD_GROUP]: {
|
|
600
|
-
cmpKey: ComponentTypeEnum.Select
|
|
601
|
-
},
|
|
602
|
-
[FIELD_TYPE.SCRAP_REASON]: {
|
|
603
|
-
cmpKey: ComponentTypeEnum.Select
|
|
604
|
-
},
|
|
605
|
-
[FIELD_TYPE.SCRAP_GROUP]: {
|
|
606
|
-
cmpKey: ComponentTypeEnum.Select
|
|
607
|
-
},
|
|
608
|
-
[FIELD_TYPE.SCRAP_QTY]: {
|
|
609
|
-
cmpKey: ComponentTypeEnum.InputDouble
|
|
610
|
-
},
|
|
611
|
-
[FIELD_TYPE.SCRAP_MATERIAL]: {
|
|
612
|
-
cmpKey: ComponentTypeEnum.Trace
|
|
613
|
-
},
|
|
614
|
-
[FIELD_TYPE.SCRAP_MATERIAL_NO]: {
|
|
615
|
-
cmpKey: ComponentTypeEnum.Trace
|
|
616
|
-
},
|
|
617
|
-
[FIELD_TYPE.DESTRUCTIVE_TEST_QTY]: {
|
|
618
|
-
cmpKey: ComponentTypeEnum.InputDouble
|
|
619
|
-
},
|
|
620
|
-
[FIELD_TYPE.PRODUCT_CHECK_QTY]: {
|
|
621
|
-
cmpKey: ComponentTypeEnum.InputDouble
|
|
622
|
-
},
|
|
623
|
-
[FIELD_TYPE.MATERIAL_CHECK_QTY]: {
|
|
624
|
-
cmpKey: ComponentTypeEnum.InputDouble
|
|
625
|
-
},
|
|
626
|
-
[FIELD_TYPE.QTY_REQUIRED]: {
|
|
627
|
-
cmpKey: ComponentTypeEnum.InputDouble
|
|
628
|
-
},
|
|
629
|
-
[FIELD_TYPE.QTY_CONSUMED]: {
|
|
630
|
-
cmpKey: ComponentTypeEnum.InputDouble
|
|
631
|
-
},
|
|
632
|
-
[FIELD_TYPE.QTY]: {
|
|
633
|
-
cmpKey: ComponentTypeEnum.InputDouble
|
|
634
|
-
},
|
|
635
|
-
[FIELD_TYPE.DEVICE_REF]: {
|
|
636
|
-
cmpKey: ComponentTypeEnum.Select
|
|
637
|
-
},
|
|
638
|
-
[FIELD_TYPE.DEVICE_REF_MULTI]: {
|
|
639
|
-
cmpKey: ComponentTypeEnum.Select
|
|
640
|
-
},
|
|
641
|
-
[FIELD_TYPE.WAREHOUSE_RECEIPT_NO]: {
|
|
642
|
-
cmpKey: ComponentTypeEnum.Input
|
|
643
|
-
},
|
|
644
|
-
[FIELD_TYPE.WAREHOUSE_RECEIPT_DATE]: {
|
|
645
|
-
cmpKey: ComponentTypeEnum.Datepicker
|
|
646
|
-
},
|
|
647
|
-
[FIELD_TYPE.WAREHOUSE_MANAGER]: {
|
|
648
|
-
cmpKey: ComponentTypeEnum.Sign
|
|
649
|
-
},
|
|
650
|
-
[FIELD_TYPE.OF_INST_NUM]: {
|
|
651
|
-
cmpKey: ComponentTypeEnum.Inputnumber
|
|
652
|
-
},
|
|
653
|
-
[FIELD_TYPE.E_SOP]: {
|
|
654
|
-
cmpKey: ComponentTypeEnum.Trace
|
|
655
|
-
}
|
|
656
|
-
}[fieldType];
|
|
657
|
-
};
|
|
658
77
|
const constantRequiredStyles = {
|
|
659
78
|
"--required-border-color": "#ffb0ae",
|
|
660
79
|
"--required-border-hover-color": "rgb(255, 31, 31, 0.86)",
|
|
@@ -904,13 +323,13 @@ const validate = async (formData, paper, uniqueId) => {
|
|
|
904
323
|
};
|
|
905
324
|
};
|
|
906
325
|
class BomEntryValidator {
|
|
907
|
-
constructor(bomEntry, enableSequenceLoading,
|
|
326
|
+
constructor(bomEntry, enableSequenceLoading, getMaterialNoNum, historyData, mainMaterialNo, noBomMode) {
|
|
908
327
|
this.bomEntry = bomEntry;
|
|
909
328
|
this.enableSequenceLoading = enableSequenceLoading;
|
|
910
|
-
this.
|
|
329
|
+
this.getMaterialNoNum = getMaterialNoNum;
|
|
911
330
|
this.historyData = historyData;
|
|
912
331
|
this.mainMaterialNo = mainMaterialNo;
|
|
913
|
-
this.
|
|
332
|
+
this.noBomMode = noBomMode;
|
|
914
333
|
this.productIds.push(this.bomEntry.product_id_);
|
|
915
334
|
this.productCodes[this.bomEntry.product_id_] = this.bomEntry.product_code_;
|
|
916
335
|
if (this.bomEntry.substitute_material_enabled_ && this.bomEntry.substitute_material_entries_) {
|
|
@@ -920,26 +339,31 @@ class BomEntryValidator {
|
|
|
920
339
|
});
|
|
921
340
|
}
|
|
922
341
|
this.hasConsumed = this.calcQtyConsumed(this.historyData);
|
|
923
|
-
this.total = this.materialNoNum * this.bomEntry.qty_required_;
|
|
924
342
|
}
|
|
925
343
|
bomEntry;
|
|
926
344
|
enableSequenceLoading;
|
|
927
|
-
|
|
345
|
+
getMaterialNoNum;
|
|
928
346
|
historyData;
|
|
929
347
|
mainMaterialNo;
|
|
930
|
-
|
|
348
|
+
noBomMode;
|
|
931
349
|
/** 该明细使用到的产品的id集合 */
|
|
932
350
|
productIds = [];
|
|
933
351
|
/** 物料和code的映射 */
|
|
934
352
|
productCodes = {};
|
|
935
353
|
/** 历史数据中已经消耗的 */
|
|
936
354
|
hasConsumed = 0;
|
|
937
|
-
/** 需求总量 */
|
|
938
|
-
total = 0;
|
|
939
355
|
/** 剩于可消耗数量 */
|
|
940
356
|
get remainingNum() {
|
|
941
357
|
return this.total - this.hasConsumed;
|
|
942
358
|
}
|
|
359
|
+
/** 批次/生产数量(用时读取,避免构造快照过期) */
|
|
360
|
+
get materialNoNum() {
|
|
361
|
+
return Number(this.getMaterialNoNum()) || 0;
|
|
362
|
+
}
|
|
363
|
+
/** 需求总量 = 数量倍数 × BOM 单位用量 */
|
|
364
|
+
get total() {
|
|
365
|
+
return this.materialNoNum * this.bomEntry.qty_required_;
|
|
366
|
+
}
|
|
943
367
|
/**
|
|
944
368
|
* 翻译物料的code
|
|
945
369
|
* @param productId
|
|
@@ -956,6 +380,38 @@ class BomEntryValidator {
|
|
|
956
380
|
filterGroupData(arr) {
|
|
957
381
|
return arr.filter((i) => this.productIds.includes(i.product_id_));
|
|
958
382
|
}
|
|
383
|
+
/** 行是否属于本 BOM 组(优先 bom_entry_id_,避免跨组 product_id_ 误判) */
|
|
384
|
+
isRowInGroup(row) {
|
|
385
|
+
if (row.deleted_) return false;
|
|
386
|
+
if (row.bom_entry_id_) return row.bom_entry_id_ === this.bomEntry.id_;
|
|
387
|
+
if (row.product_id_) return this.productIds.includes(row.product_id_);
|
|
388
|
+
return false;
|
|
389
|
+
}
|
|
390
|
+
/** 组内已选中的物料(整批替代;不排除当前行) */
|
|
391
|
+
getGroupExistingProductId(tableData) {
|
|
392
|
+
for (const row of tableData) {
|
|
393
|
+
if (row.deleted_) continue;
|
|
394
|
+
if (!this.isRowInGroup(row)) continue;
|
|
395
|
+
if (row.product_id_) return row.product_id_;
|
|
396
|
+
}
|
|
397
|
+
return void 0;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* 本组 product_id_ 下拉可选范围
|
|
401
|
+
* - 未开替代料:仅主料
|
|
402
|
+
* - 整批替代:组内已有 → 锁定该物料;否则主料+替代料
|
|
403
|
+
* - 混用等:主料+替代料
|
|
404
|
+
*/
|
|
405
|
+
getSelectableProductIds(tableData) {
|
|
406
|
+
if (!this.bomEntry.substitute_material_enabled_) {
|
|
407
|
+
return [this.bomEntry.product_id_];
|
|
408
|
+
}
|
|
409
|
+
if (this.bomEntry.substitute_policy_ === "only_one") {
|
|
410
|
+
const existing = this.getGroupExistingProductId(tableData);
|
|
411
|
+
if (existing) return [existing];
|
|
412
|
+
}
|
|
413
|
+
return this.productIds;
|
|
414
|
+
}
|
|
959
415
|
validateSubstitute(arr) {
|
|
960
416
|
const groupData = this.filterGroupData(arr);
|
|
961
417
|
if (!this.bomEntry.substitute_material_enabled_) {
|
|
@@ -966,7 +422,7 @@ class BomEntryValidator {
|
|
|
966
422
|
} else if (this.bomEntry.substitute_policy_ === "only_one") {
|
|
967
423
|
const idSet = new Set(groupData.map((i) => i.product_id_));
|
|
968
424
|
if (idSet.size > 1) {
|
|
969
|
-
throw new Error($t("
|
|
425
|
+
throw new Error($t("整批替代,不允许混用"));
|
|
970
426
|
}
|
|
971
427
|
}
|
|
972
428
|
}
|
|
@@ -995,6 +451,64 @@ class BomEntryValidator {
|
|
|
995
451
|
throw new Error(errorMsg);
|
|
996
452
|
}
|
|
997
453
|
}
|
|
454
|
+
/**
|
|
455
|
+
* 通用校验 3(带即将写入的行):组内已有行 + row 的批次去重后,是否超过混批次数。
|
|
456
|
+
* - 非按批次 / 未开混批校验 / row 不属于本组 → 直接通过
|
|
457
|
+
* - 排除空物料;空批次不计入
|
|
458
|
+
*/
|
|
459
|
+
validateLotMixingWithRow(row, arr) {
|
|
460
|
+
if (this.bomEntry.type_ !== "by_lot") {
|
|
461
|
+
return;
|
|
462
|
+
}
|
|
463
|
+
if (!this.bomEntry.lot_mixing_enabled_) {
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
if (!row.product_id_ || !this.productIds.includes(row.product_id_)) {
|
|
467
|
+
return;
|
|
468
|
+
}
|
|
469
|
+
const lots = /* @__PURE__ */ new Set();
|
|
470
|
+
this.filterGroupData(arr).forEach((i) => {
|
|
471
|
+
if (i.product_id_ && i.material_no_) {
|
|
472
|
+
lots.add(i.material_no_);
|
|
473
|
+
}
|
|
474
|
+
});
|
|
475
|
+
if (row.material_no_) {
|
|
476
|
+
lots.add(row.material_no_);
|
|
477
|
+
}
|
|
478
|
+
const maxTimes = this.bomEntry.lot_mixing_times_;
|
|
479
|
+
if (lots.size > maxTimes) {
|
|
480
|
+
throw new Error(`超过允许的混批次数:${maxTimes}`);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
/** 指定物料批次:material_no_ 须在 specified_material_entries_ 的 name_ 范围内 */
|
|
484
|
+
validateSpecifiedMaterialNo(row) {
|
|
485
|
+
if (!this.bomEntry.specified_material_no_enabled_) {
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
if (this.bomEntry.type_ === "view") {
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
const lot = row.material_no_;
|
|
492
|
+
if (!lot) {
|
|
493
|
+
return;
|
|
494
|
+
}
|
|
495
|
+
const allowed = (this.bomEntry.specified_material_entries_ ?? []).map((e) => e.name_).filter(Boolean);
|
|
496
|
+
if (!allowed.includes(lot)) {
|
|
497
|
+
throw new Error(`${lot},不在指定物料批次范围内`);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
/** 整组指定批次校验:组内每一行有批次值的都检查 */
|
|
501
|
+
validateSpecifiedMaterialNoForGroup(arr) {
|
|
502
|
+
if (!this.bomEntry.specified_material_no_enabled_) {
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
arr.forEach((row) => {
|
|
506
|
+
if (row.deleted_ || !this.isRowInGroup(row) || !row.material_no_) {
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
509
|
+
this.validateSpecifiedMaterialNo(row);
|
|
510
|
+
});
|
|
511
|
+
}
|
|
998
512
|
/**
|
|
999
513
|
* 校验数量
|
|
1000
514
|
* @param arr
|
|
@@ -1073,6 +587,49 @@ class BomEntryValidator {
|
|
|
1073
587
|
const min = await getValue(this.bomEntry.min_value_);
|
|
1074
588
|
return { max, min };
|
|
1075
589
|
}
|
|
590
|
+
/**
|
|
591
|
+
* 通用校验 5:本组上料数量是否满足 qty_validation_rule_。
|
|
592
|
+
* 前置假设:必填、替代料、混批等已由调用方完成。
|
|
593
|
+
* @param sequential 是否按顺序上料;eq 规则在非顺序模式下允许少上
|
|
594
|
+
*/
|
|
595
|
+
async validateGroupQty(arr, sequential = this.enableSequenceLoading, groupNo) {
|
|
596
|
+
const entry = this.bomEntry;
|
|
597
|
+
if (!entry.qty_validation_enabled_ || entry.type_ === "view") {
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
const loaded = this.calcQtyConsumed(arr);
|
|
601
|
+
const required = this.remainingNum;
|
|
602
|
+
const diff = loaded - required;
|
|
603
|
+
const rule = entry.qty_validation_rule_;
|
|
604
|
+
const fail = (msg) => {
|
|
605
|
+
const prefix = groupNo != null && groupNo > 0 ? $t("sys.groupQtyErrorPrefix", { groupNo }) : "";
|
|
606
|
+
throw new Error(`${prefix}${msg}`);
|
|
607
|
+
};
|
|
608
|
+
switch (rule) {
|
|
609
|
+
case "eq":
|
|
610
|
+
if (sequential) {
|
|
611
|
+
if (diff !== 0) fail($t("sys.qtyValidationRule.eq"));
|
|
612
|
+
} else {
|
|
613
|
+
if (loaded > required) fail($t("sys.qtyValidationRule.lte"));
|
|
614
|
+
}
|
|
615
|
+
break;
|
|
616
|
+
case "gte":
|
|
617
|
+
if (diff < 0) fail($t("sys.qtyValidationRule.gte"));
|
|
618
|
+
break;
|
|
619
|
+
case "lte":
|
|
620
|
+
if (diff > 0) fail($t("sys.qtyValidationRule.lte"));
|
|
621
|
+
break;
|
|
622
|
+
case "bounds": {
|
|
623
|
+
const groupData = this.filterGroupData(arr);
|
|
624
|
+
const consumeSum = loaded + this.hasConsumed;
|
|
625
|
+
const { min, max } = await this.calcCustomNumberLimit(groupData[0]);
|
|
626
|
+
if (min !== void 0 && consumeSum < min || max !== void 0 && consumeSum > max) {
|
|
627
|
+
fail($t("sys.qtyValidationRule.bounds", { min, max }));
|
|
628
|
+
}
|
|
629
|
+
break;
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
}
|
|
1076
633
|
/**
|
|
1077
634
|
* 按顺序投料用
|
|
1078
635
|
* 检查数据中的当前明细的填报是否已经完成
|
|
@@ -1126,31 +683,35 @@ class BomEntryValidator {
|
|
|
1126
683
|
}
|
|
1127
684
|
}
|
|
1128
685
|
class BomEntriesValidator {
|
|
1129
|
-
constructor(entries, enableSequenceLoading,
|
|
686
|
+
constructor(entries, enableSequenceLoading, getMaterialNoNum, historyData, mainMaterialNo, noBomMode) {
|
|
1130
687
|
this.entries = entries;
|
|
1131
688
|
this.enableSequenceLoading = enableSequenceLoading;
|
|
1132
|
-
this.
|
|
689
|
+
this.getMaterialNoNum = getMaterialNoNum;
|
|
1133
690
|
this.historyData = historyData;
|
|
1134
691
|
this.mainMaterialNo = mainMaterialNo;
|
|
1135
|
-
this.
|
|
692
|
+
this.noBomMode = noBomMode;
|
|
1136
693
|
this.bomEntryValidators = entries.map(
|
|
1137
694
|
(i) => new BomEntryValidator(
|
|
1138
695
|
i,
|
|
1139
696
|
enableSequenceLoading,
|
|
1140
|
-
|
|
697
|
+
getMaterialNoNum,
|
|
1141
698
|
historyData,
|
|
1142
699
|
mainMaterialNo,
|
|
1143
|
-
|
|
700
|
+
noBomMode
|
|
1144
701
|
)
|
|
1145
702
|
);
|
|
1146
703
|
}
|
|
1147
704
|
entries;
|
|
1148
705
|
enableSequenceLoading;
|
|
1149
|
-
|
|
706
|
+
getMaterialNoNum;
|
|
1150
707
|
historyData;
|
|
1151
708
|
mainMaterialNo;
|
|
1152
|
-
|
|
709
|
+
noBomMode;
|
|
1153
710
|
bomEntryValidators;
|
|
711
|
+
/** 当前批次/生产数量 */
|
|
712
|
+
get materialNoNum() {
|
|
713
|
+
return Number(this.getMaterialNoNum()) || 0;
|
|
714
|
+
}
|
|
1154
715
|
/**
|
|
1155
716
|
* 翻译物料的code
|
|
1156
717
|
* @param productId
|
|
@@ -1173,6 +734,119 @@ class BomEntriesValidator {
|
|
|
1173
734
|
findUtilByProductId(productId) {
|
|
1174
735
|
return this.bomEntryValidators.find((i) => i.productIds.includes(productId));
|
|
1175
736
|
}
|
|
737
|
+
/** 编辑行所属组 id;空物料且无 bom_entry_id_ 时返回 null */
|
|
738
|
+
getRowGroupId(row) {
|
|
739
|
+
if (row.bom_entry_id_) return row.bom_entry_id_;
|
|
740
|
+
if (row.product_id_) {
|
|
741
|
+
const util = this.findUtilByProductId(row.product_id_);
|
|
742
|
+
return util?.bomEntry.id_ ?? null;
|
|
743
|
+
}
|
|
744
|
+
return null;
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* 是否有正在编辑的组。
|
|
748
|
+
* 一组可多行同时 !is_confirmed_;正常应只有一组。
|
|
749
|
+
* @returns 有编辑行且只落在一组 → true;无编辑行 → false;跨多组编辑 → 抛错
|
|
750
|
+
*/
|
|
751
|
+
hasEditingGroup(arr) {
|
|
752
|
+
const editRows = arr.filter((i) => !i.is_confirmed_ && !i.deleted_);
|
|
753
|
+
if (!editRows.length) return false;
|
|
754
|
+
const groupIds = /* @__PURE__ */ new Set();
|
|
755
|
+
for (const row of editRows) {
|
|
756
|
+
const id = this.getRowGroupId(row);
|
|
757
|
+
if (id) groupIds.add(id);
|
|
758
|
+
}
|
|
759
|
+
if (groupIds.size === 0) return true;
|
|
760
|
+
if (groupIds.size > 1) {
|
|
761
|
+
throw new Error("同时只能有一组处于编辑态");
|
|
762
|
+
}
|
|
763
|
+
return true;
|
|
764
|
+
}
|
|
765
|
+
/** 取当前唯一编辑组的 BOM 明细 id;没有则 undefined */
|
|
766
|
+
getEditingGroupId(arr) {
|
|
767
|
+
if (!this.hasEditingGroup(arr)) return;
|
|
768
|
+
const editRows = arr.filter((i) => !i.is_confirmed_ && !i.deleted_);
|
|
769
|
+
for (const row of editRows) {
|
|
770
|
+
const id = this.getRowGroupId(row);
|
|
771
|
+
if (id) return id;
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* 行 → BOM 明细在 bomEntryValidators 中的下标,找不到返回 -1
|
|
776
|
+
*/
|
|
777
|
+
resolveEntryIndex(row) {
|
|
778
|
+
if (row.product_id_) {
|
|
779
|
+
const i = this.bomEntryValidators.findIndex((v) => v.productIds.includes(row.product_id_));
|
|
780
|
+
if (i >= 0) return i;
|
|
781
|
+
}
|
|
782
|
+
return row.bom_entry_id_ ? this.bomEntryValidators.findIndex((v) => v.bomEntry.id_ === row.bom_entry_id_) : -1;
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* 行所属组在序号列中的 groupOrderIndex(0-based;-1 未绑 BOM 组)
|
|
786
|
+
* 与 material-consume-table 序号列逻辑一致
|
|
787
|
+
*/
|
|
788
|
+
resolveGroupOrderIndex(row, arr) {
|
|
789
|
+
const entryIdx = this.resolveEntryIndex(row);
|
|
790
|
+
if (this.enableSequenceLoading) {
|
|
791
|
+
return entryIdx;
|
|
792
|
+
}
|
|
793
|
+
if (entryIdx < 0) {
|
|
794
|
+
return -1;
|
|
795
|
+
}
|
|
796
|
+
return this.resolveEntryOrderInTable(entryIdx, arr);
|
|
797
|
+
}
|
|
798
|
+
/** 已知 BomEntryValidator 时算 groupOrderIndex */
|
|
799
|
+
resolveGroupOrderIndexByUtil(util, arr) {
|
|
800
|
+
return this.resolveGroupOrderIndex(
|
|
801
|
+
{ bom_entry_id_: util.bomEntry.id_ },
|
|
802
|
+
arr
|
|
803
|
+
);
|
|
804
|
+
}
|
|
805
|
+
/** 非顺序上料:BOM 组在表中首次出现的顺序(0-based) */
|
|
806
|
+
resolveEntryOrderInTable(entryIdx, arr) {
|
|
807
|
+
const seen = [];
|
|
808
|
+
for (const r of arr) {
|
|
809
|
+
if (r.deleted_) continue;
|
|
810
|
+
const idx = this.resolveEntryIndex(r);
|
|
811
|
+
if (idx < 0 || seen.includes(idx)) continue;
|
|
812
|
+
seen.push(idx);
|
|
813
|
+
}
|
|
814
|
+
return seen.indexOf(entryIdx);
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* 定位顺序上料时的当前编辑组对应 BOM 明细。
|
|
818
|
+
* 编辑行无物料时,用前后组夹出范围,取 (prev, next) 开区间起点。
|
|
819
|
+
*/
|
|
820
|
+
findSequenceBomEntry(arr) {
|
|
821
|
+
const editRows = arr.filter((i) => !i.is_confirmed_ && !i.deleted_);
|
|
822
|
+
if (!editRows.length) return;
|
|
823
|
+
const hit = editRows.find((i) => i.product_id_) ?? editRows.find((i) => i.bom_entry_id_);
|
|
824
|
+
if (hit?.product_id_) return this.findUtilByProductId(hit.product_id_);
|
|
825
|
+
if (hit?.bom_entry_id_) {
|
|
826
|
+
return this.bomEntryValidators.find((v) => v.bomEntry.id_ === hit.bom_entry_id_);
|
|
827
|
+
}
|
|
828
|
+
const from = arr.indexOf(editRows[0]);
|
|
829
|
+
const to = arr.indexOf(editRows[editRows.length - 1]);
|
|
830
|
+
let prev = -1;
|
|
831
|
+
let next = this.bomEntryValidators.length;
|
|
832
|
+
for (let i = from - 1; i >= 0; i--) {
|
|
833
|
+
const idx = this.resolveEntryIndex(arr[i]);
|
|
834
|
+
if (idx >= 0) {
|
|
835
|
+
prev = idx;
|
|
836
|
+
break;
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
for (let i = to + 1; i < arr.length; i++) {
|
|
840
|
+
const idx = this.resolveEntryIndex(arr[i]);
|
|
841
|
+
if (idx >= 0) {
|
|
842
|
+
next = idx;
|
|
843
|
+
break;
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
const cur = prev + 1;
|
|
847
|
+
if (cur >= next || cur >= this.bomEntryValidators.length) return;
|
|
848
|
+
return this.bomEntryValidators[cur];
|
|
849
|
+
}
|
|
1176
850
|
/**
|
|
1177
851
|
* 检验是否符合顺序投料的顺序要求
|
|
1178
852
|
* @param row 当前编辑的行
|
|
@@ -1183,21 +857,168 @@ class BomEntriesValidator {
|
|
|
1183
857
|
if (!this.enableSequenceLoading) {
|
|
1184
858
|
return;
|
|
1185
859
|
}
|
|
1186
|
-
const
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
860
|
+
const seqBomEntry = this.findSequenceBomEntry(arr);
|
|
861
|
+
if (!seqBomEntry) throw new Error("没有查找到对应的上料顺序");
|
|
862
|
+
if (!seqBomEntry.productIds.includes(row.product_id_)) {
|
|
863
|
+
throw new Error($t("请按顺序上料"));
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
/** 表中是否已有该 BOM 组(有物料行或带 bom_entry_id_ 的空行) */
|
|
867
|
+
groupExistsInTable(arr, util) {
|
|
868
|
+
return arr.some((row) => isRowInBomGroup(row, util));
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* 按 BOM 顺序计算 target 组应插入的下标:
|
|
872
|
+
* 插到表中「第一个 BOM 下标更大的组」之前;没有则表末。
|
|
873
|
+
*/
|
|
874
|
+
resolveBomOrderInsertIndex(arr, target) {
|
|
875
|
+
const targetIdx = this.bomEntryValidators.indexOf(target);
|
|
876
|
+
if (targetIdx < 0) return arr.length;
|
|
877
|
+
for (let i = 0; i < arr.length; i++) {
|
|
878
|
+
const row = arr[i];
|
|
879
|
+
if (row.deleted_) continue;
|
|
880
|
+
const idx = this.resolveEntryIndex(row);
|
|
881
|
+
if (idx > targetIdx) return i;
|
|
882
|
+
}
|
|
883
|
+
return arr.length;
|
|
884
|
+
}
|
|
885
|
+
/**
|
|
886
|
+
* 组装扫码填充计划:切组/建组标记 + 相对 arr 的下标。
|
|
887
|
+
* needInsert 时优先填 groupInsertIndex 占位行,勿再直接用 member/append 下标(会错位)。
|
|
888
|
+
*/
|
|
889
|
+
buildScanFillPlan(arr, current, target) {
|
|
890
|
+
const memberIndexes = [];
|
|
891
|
+
const emptyProductIndexes = [];
|
|
892
|
+
const emptyLotIndexes = [];
|
|
893
|
+
const byLot = target.bomEntry.type_ === "by_lot";
|
|
894
|
+
let currentLast = -1;
|
|
895
|
+
arr.forEach((row, idx) => {
|
|
896
|
+
if (isRowInBomGroup(row, current)) currentLast = idx;
|
|
897
|
+
if (!isRowInBomGroup(row, target)) return;
|
|
898
|
+
if (!row.product_id_) {
|
|
899
|
+
emptyProductIndexes.push(idx);
|
|
900
|
+
return;
|
|
1192
901
|
}
|
|
902
|
+
memberIndexes.push(idx);
|
|
903
|
+
if (byLot && !row.material_no_) emptyLotIndexes.push(idx);
|
|
904
|
+
});
|
|
905
|
+
const needInsert = !this.groupExistsInTable(arr, target);
|
|
906
|
+
const last2 = memberIndexes[memberIndexes.length - 1];
|
|
907
|
+
let groupInsertIndex = -1;
|
|
908
|
+
if (needInsert) {
|
|
909
|
+
groupInsertIndex = current !== target && currentLast >= 0 ? currentLast + 1 : this.resolveBomOrderInsertIndex(arr, target);
|
|
1193
910
|
}
|
|
911
|
+
return {
|
|
912
|
+
target,
|
|
913
|
+
current,
|
|
914
|
+
needSwitch: current !== target,
|
|
915
|
+
needInsert,
|
|
916
|
+
groupInsertIndex,
|
|
917
|
+
memberIndexes,
|
|
918
|
+
emptyProductIndexes,
|
|
919
|
+
emptyLotIndexes,
|
|
920
|
+
appendIndex: last2 !== void 0 ? last2 + 1 : arr.length
|
|
921
|
+
};
|
|
922
|
+
}
|
|
923
|
+
/**
|
|
924
|
+
* 通用校验 2:物料是否允许写入目标组(不改动原 validateSubstitute)
|
|
925
|
+
*/
|
|
926
|
+
assertGroupSubstitute(util, productId, arr) {
|
|
927
|
+
const entry = util.bomEntry;
|
|
928
|
+
if (entry.type_ === "view" || !entry.substitute_material_enabled_) {
|
|
929
|
+
if (productId !== entry.product_id_) {
|
|
930
|
+
throw new Error("匹配不到对应物料,请按规则上料或新增物料");
|
|
931
|
+
}
|
|
932
|
+
return;
|
|
933
|
+
}
|
|
934
|
+
if (!util.productIds.includes(productId)) {
|
|
935
|
+
throw new Error("匹配不到对应物料,请按规则上料或新增物料");
|
|
936
|
+
}
|
|
937
|
+
util.validateSubstitute([
|
|
938
|
+
...arr,
|
|
939
|
+
{ product_id_: productId, is_confirmed_: false, expiration_date_: "" }
|
|
940
|
+
]);
|
|
941
|
+
}
|
|
942
|
+
/**
|
|
943
|
+
* 扫码定位目标组 + 通用校验 2,返回填充计划(切组/建组/下标)。
|
|
944
|
+
* 不改表数据。
|
|
945
|
+
*/
|
|
946
|
+
validateSequenceScan(row, arr) {
|
|
947
|
+
const productId = row.product_id_;
|
|
948
|
+
const finish = (current2, target) => {
|
|
949
|
+
this.assertGroupSubstitute(target, productId, arr);
|
|
950
|
+
return this.buildScanFillPlan(arr, current2, target);
|
|
951
|
+
};
|
|
952
|
+
if (!this.enableSequenceLoading) {
|
|
953
|
+
const target = this.findUtilByProductId(productId);
|
|
954
|
+
if (!target) throw new Error("匹配不到对应物料,请按规则上料或新增物料");
|
|
955
|
+
return finish(target, target);
|
|
956
|
+
}
|
|
957
|
+
const current = this.findSequenceBomEntry(arr);
|
|
958
|
+
if (!current) {
|
|
959
|
+
const target = this.findUtilByProductId(productId);
|
|
960
|
+
if (!target) throw new Error("匹配不到对应物料,请按规则上料或新增物料");
|
|
961
|
+
if (this.groupExistsInTable(arr, target)) {
|
|
962
|
+
throw new Error("请勿重复上料");
|
|
963
|
+
}
|
|
964
|
+
return finish(target, target);
|
|
965
|
+
}
|
|
966
|
+
if (current.productIds.includes(productId)) return finish(current, current);
|
|
967
|
+
const currentIdx = this.bomEntryValidators.indexOf(current);
|
|
968
|
+
for (let i = 0; i < currentIdx; i++) {
|
|
969
|
+
const prev = this.bomEntryValidators[i];
|
|
970
|
+
if (!prev.productIds.includes(productId)) continue;
|
|
971
|
+
throw new Error(this.groupExistsInTable(arr, prev) ? "请勿重复上料" : $t("请按顺序上料"));
|
|
972
|
+
}
|
|
973
|
+
for (let i = currentIdx + 1; i < this.bomEntryValidators.length; i++) {
|
|
974
|
+
const next = this.bomEntryValidators[i];
|
|
975
|
+
const exists = this.groupExistsInTable(arr, next);
|
|
976
|
+
const optional = !next.bomEntry.force_loading_enabled_;
|
|
977
|
+
const hit = next.productIds.includes(productId);
|
|
978
|
+
if (optional && !exists) {
|
|
979
|
+
if (hit) return finish(current, next);
|
|
980
|
+
continue;
|
|
981
|
+
}
|
|
982
|
+
if (!hit) throw new Error($t("请按顺序上料"));
|
|
983
|
+
return finish(current, next);
|
|
984
|
+
}
|
|
985
|
+
throw new Error($t("请按顺序上料"));
|
|
986
|
+
}
|
|
987
|
+
/**
|
|
988
|
+
* 单组整组校验(提交编辑态组 / 切组前复用)
|
|
989
|
+
*/
|
|
990
|
+
async validateGroup(arr, util) {
|
|
991
|
+
const rows = arr.filter(
|
|
992
|
+
(r) => !r.deleted_ && r.product_id_ && (util.productIds.includes(r.product_id_) || r.bom_entry_id_ === util.bomEntry.id_)
|
|
993
|
+
);
|
|
994
|
+
if (!rows.length) throw new Error($t("sys.edhr.mcTable.materialEmptyError"));
|
|
995
|
+
rows.forEach((row) => {
|
|
996
|
+
this.validateDataCompleted(row);
|
|
997
|
+
if (row.expiration_date_ && dayjs(row.expiration_date_).endOf("day").isBefore(dayjs())) {
|
|
998
|
+
throw new Error(
|
|
999
|
+
$t("sys.expirationDateError", { product: row.product_id__lb_, lot: row.material_no_ })
|
|
1000
|
+
);
|
|
1001
|
+
}
|
|
1002
|
+
});
|
|
1003
|
+
util.validateSubstitute(arr);
|
|
1004
|
+
util.validateLotMixing(arr);
|
|
1005
|
+
util.validateSpecifiedMaterialNoForGroup(arr);
|
|
1006
|
+
const orderIndex = this.resolveGroupOrderIndexByUtil(util, arr);
|
|
1007
|
+
const groupNo = orderIndex >= 0 ? orderIndex + 1 : void 0;
|
|
1008
|
+
await util.validateGroupQty(arr, this.enableSequenceLoading, groupNo);
|
|
1009
|
+
}
|
|
1010
|
+
/**
|
|
1011
|
+
* 切组前校验当前编辑组:BOM 内 + 必填、有效期、替代料、混批、数量校验
|
|
1012
|
+
*/
|
|
1013
|
+
async validateCurrentGroupForSwitch(arr, current) {
|
|
1014
|
+
await this.validateGroup(arr, current);
|
|
1194
1015
|
}
|
|
1195
1016
|
/**
|
|
1196
1017
|
* 校验物料是否在bom里被使用
|
|
1197
1018
|
* @param row 单行的数据
|
|
1198
1019
|
*/
|
|
1199
1020
|
validateInBom(row) {
|
|
1200
|
-
if (this.
|
|
1021
|
+
if (this.noBomMode) {
|
|
1201
1022
|
return;
|
|
1202
1023
|
}
|
|
1203
1024
|
if (!row.product_id_) {
|
|
@@ -1205,12 +1026,7 @@ class BomEntriesValidator {
|
|
|
1205
1026
|
}
|
|
1206
1027
|
const util = this.findUtilByProductId(row.product_id_);
|
|
1207
1028
|
if (!util) {
|
|
1208
|
-
|
|
1209
|
-
throw new Error(
|
|
1210
|
-
$t("sys.edhr.mcTable.productNotDefine", {
|
|
1211
|
-
product: name
|
|
1212
|
-
})
|
|
1213
|
-
);
|
|
1029
|
+
throw new Error($t("匹配不到对应物料,请按规则上料或新增物料"));
|
|
1214
1030
|
}
|
|
1215
1031
|
}
|
|
1216
1032
|
/**
|
|
@@ -1257,6 +1073,13 @@ class BomEntriesValidator {
|
|
|
1257
1073
|
i.validateLotMixing(arr);
|
|
1258
1074
|
});
|
|
1259
1075
|
}
|
|
1076
|
+
/**
|
|
1077
|
+
* 通用校验 3(扫码/写入前):用 row + 表内同行组数据对比混批次数,不改动原 validateLotMixing
|
|
1078
|
+
*/
|
|
1079
|
+
validateLotMixingWithRow(row, arr) {
|
|
1080
|
+
const util = this.findUtilByProductId(row.product_id_);
|
|
1081
|
+
util?.validateLotMixingWithRow(row, arr);
|
|
1082
|
+
}
|
|
1260
1083
|
/**
|
|
1261
1084
|
* 校验数量
|
|
1262
1085
|
* @param arr
|
|
@@ -1293,15 +1116,26 @@ class BomEntriesValidator {
|
|
|
1293
1116
|
}
|
|
1294
1117
|
}
|
|
1295
1118
|
/**
|
|
1296
|
-
*
|
|
1119
|
+
* 检查扫描数据是否可以插入,通过后返回填充计划(记录模式无 plan)
|
|
1120
|
+
*/
|
|
1121
|
+
async validateScanCanInsert(row, arr) {
|
|
1122
|
+
if (this.noBomMode) {
|
|
1123
|
+
return;
|
|
1124
|
+
}
|
|
1125
|
+
this.validateInBom(row);
|
|
1126
|
+
const plan = this.validateSequenceScan(row, arr);
|
|
1127
|
+
plan.target.validateSpecifiedMaterialNo(row);
|
|
1128
|
+
plan.target.validateLotMixingWithRow(row, arr);
|
|
1129
|
+
return plan;
|
|
1130
|
+
}
|
|
1131
|
+
/**
|
|
1132
|
+
* 校验当前编辑行的数据
|
|
1297
1133
|
* @param arr
|
|
1134
|
+
* @returns
|
|
1298
1135
|
*/
|
|
1299
|
-
async
|
|
1136
|
+
async validateEditRow(arr) {
|
|
1300
1137
|
const editRow = arr.find((i) => !i.is_confirmed_);
|
|
1301
|
-
if (!editRow) {
|
|
1302
|
-
throw new Error($t("sys.edhr.mcTable.noEditingRow"));
|
|
1303
|
-
}
|
|
1304
|
-
if (this.mcPattern === MaterialConsumptionPatternEnum.RECORD) {
|
|
1138
|
+
if (!editRow || this.noBomMode) {
|
|
1305
1139
|
return;
|
|
1306
1140
|
}
|
|
1307
1141
|
this.validateInBom(editRow);
|
|
@@ -1309,6 +1143,45 @@ class BomEntriesValidator {
|
|
|
1309
1143
|
this.validateSubstitute(arr);
|
|
1310
1144
|
this.validateLotMixing(arr);
|
|
1311
1145
|
}
|
|
1146
|
+
/**
|
|
1147
|
+
* 顺序上料提交:表中最后一组之前,必须上料组不能缺失(仅结构/顺序,不校验数量)
|
|
1148
|
+
*/
|
|
1149
|
+
assertSubmitSequenceOrder(arr) {
|
|
1150
|
+
const lastPresentIdx = this.bomEntryValidators.reduce(
|
|
1151
|
+
(max, util, i) => this.groupExistsInTable(arr, util) ? i : max,
|
|
1152
|
+
-1
|
|
1153
|
+
);
|
|
1154
|
+
if (lastPresentIdx < 0) {
|
|
1155
|
+
return;
|
|
1156
|
+
}
|
|
1157
|
+
for (let i = 0; i <= lastPresentIdx; i++) {
|
|
1158
|
+
const util = this.bomEntryValidators[i];
|
|
1159
|
+
if (util.bomEntry.force_loading_enabled_ && !this.groupExistsInTable(arr, util)) {
|
|
1160
|
+
throw new Error(`物料${util.bomEntry.product_code_}为必须上料,请完成该组上料`);
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* 提交整表校验:必须上料组须存在;顺序上料校验组序;表中存在的组走整组校验(不含库存)
|
|
1166
|
+
*/
|
|
1167
|
+
async validateAllRows(arr) {
|
|
1168
|
+
if (this.noBomMode) {
|
|
1169
|
+
return;
|
|
1170
|
+
}
|
|
1171
|
+
for (const util of this.bomEntryValidators) {
|
|
1172
|
+
if (util.bomEntry.force_loading_enabled_ && !this.groupExistsInTable(arr, util)) {
|
|
1173
|
+
throw new Error(`物料${util.bomEntry.product_code_}为必须上料,请完成该组上料`);
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
if (this.enableSequenceLoading) {
|
|
1177
|
+
this.assertSubmitSequenceOrder(arr);
|
|
1178
|
+
}
|
|
1179
|
+
for (const util of this.bomEntryValidators) {
|
|
1180
|
+
if (this.groupExistsInTable(arr, util)) {
|
|
1181
|
+
await this.validateGroup(arr, util);
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1312
1185
|
/**
|
|
1313
1186
|
* 把扫描数据按情况插入到数组的位置,返回新数组
|
|
1314
1187
|
* @param row
|
|
@@ -1360,7 +1233,317 @@ class BomEntriesValidator {
|
|
|
1360
1233
|
return Array.from(result).map((i) => i.split(":").pop());
|
|
1361
1234
|
}
|
|
1362
1235
|
}
|
|
1363
|
-
|
|
1236
|
+
function isRowInBomGroup(row, util) {
|
|
1237
|
+
return util.isRowInGroup(row);
|
|
1238
|
+
}
|
|
1239
|
+
function setGroupEditState(table, util, editing) {
|
|
1240
|
+
table.forEach((r) => {
|
|
1241
|
+
if (isRowInBomGroup(r, util)) {
|
|
1242
|
+
r.is_confirmed_ = !editing;
|
|
1243
|
+
}
|
|
1244
|
+
});
|
|
1245
|
+
}
|
|
1246
|
+
var ScanParamType = /* @__PURE__ */ ((ScanParamType2) => {
|
|
1247
|
+
ScanParamType2["Lot"] = "lot";
|
|
1248
|
+
ScanParamType2["UniqueCode"] = "uniqueCode";
|
|
1249
|
+
return ScanParamType2;
|
|
1250
|
+
})(ScanParamType || {});
|
|
1251
|
+
var RequiredQtyCalcRule = /* @__PURE__ */ ((RequiredQtyCalcRule2) => {
|
|
1252
|
+
RequiredQtyCalcRule2["LotQty"] = "lotQty";
|
|
1253
|
+
RequiredQtyCalcRule2["ProductQty"] = "productQty";
|
|
1254
|
+
return RequiredQtyCalcRule2;
|
|
1255
|
+
})(RequiredQtyCalcRule || {});
|
|
1256
|
+
async function applyScanFillPlan(arr, scanRow, plan, options) {
|
|
1257
|
+
const table = cloneDeep(arr);
|
|
1258
|
+
if (!plan) {
|
|
1259
|
+
fillNoBomRow(table, scanRow);
|
|
1260
|
+
return table;
|
|
1261
|
+
}
|
|
1262
|
+
if (plan.needSwitch) {
|
|
1263
|
+
await options?.validateCurrentGroupForSwitch?.(table, plan.current);
|
|
1264
|
+
}
|
|
1265
|
+
const fillAt = plan.needInsert ? insertEmptyGroupRow(table, plan) : void 0;
|
|
1266
|
+
if (plan.needSwitch) {
|
|
1267
|
+
applyGroupEditState(table, plan);
|
|
1268
|
+
}
|
|
1269
|
+
fillTargetGroup(table, scanRow, plan, fillAt);
|
|
1270
|
+
return table;
|
|
1271
|
+
}
|
|
1272
|
+
function writeScanFields(target, scanRow, bomEntryId) {
|
|
1273
|
+
const targetRec = target;
|
|
1274
|
+
const frontKey = targetRec[FRONT_ROW_KEY];
|
|
1275
|
+
const id_ = targetRec.id_;
|
|
1276
|
+
Object.assign(target, cloneDeep(scanRow));
|
|
1277
|
+
if (frontKey != null && String(frontKey).trim() !== "") {
|
|
1278
|
+
targetRec[FRONT_ROW_KEY] = frontKey;
|
|
1279
|
+
}
|
|
1280
|
+
if (id_ != null) {
|
|
1281
|
+
targetRec.id_ = id_;
|
|
1282
|
+
}
|
|
1283
|
+
if (bomEntryId) target.bom_entry_id_ = bomEntryId;
|
|
1284
|
+
target.is_confirmed_ = false;
|
|
1285
|
+
}
|
|
1286
|
+
function fillNoBomRow(table, scanRow) {
|
|
1287
|
+
const emptyIdx = table.findIndex((r) => !r.deleted_ && !r.product_id_);
|
|
1288
|
+
if (emptyIdx >= 0) {
|
|
1289
|
+
writeScanFields(table[emptyIdx], scanRow);
|
|
1290
|
+
return;
|
|
1291
|
+
}
|
|
1292
|
+
const row = { is_confirmed_: false, expiration_date_: "" };
|
|
1293
|
+
ensureFrontRowKey(row);
|
|
1294
|
+
writeScanFields(row, scanRow);
|
|
1295
|
+
table.push(row);
|
|
1296
|
+
}
|
|
1297
|
+
function insertEmptyGroupRow(table, plan) {
|
|
1298
|
+
const empty = {
|
|
1299
|
+
bom_entry_id_: plan.target.bomEntry.id_,
|
|
1300
|
+
is_confirmed_: false,
|
|
1301
|
+
expiration_date_: ""
|
|
1302
|
+
};
|
|
1303
|
+
ensureFrontRowKey(empty);
|
|
1304
|
+
table.splice(plan.groupInsertIndex, 0, empty);
|
|
1305
|
+
return plan.groupInsertIndex;
|
|
1306
|
+
}
|
|
1307
|
+
function applyGroupEditState(table, plan) {
|
|
1308
|
+
setGroupEditState(table, plan.current, false);
|
|
1309
|
+
setGroupEditState(table, plan.target, true);
|
|
1310
|
+
}
|
|
1311
|
+
function fillTargetGroup(table, scanRow, plan, fillAt) {
|
|
1312
|
+
const bomId = plan.target.bomEntry.id_;
|
|
1313
|
+
if (fillAt !== void 0) {
|
|
1314
|
+
writeScanFields(table[fillAt], scanRow, bomId);
|
|
1315
|
+
return;
|
|
1316
|
+
}
|
|
1317
|
+
if (plan.emptyProductIndexes.length) {
|
|
1318
|
+
writeScanFields(table[plan.emptyProductIndexes[0]], scanRow, bomId);
|
|
1319
|
+
return;
|
|
1320
|
+
}
|
|
1321
|
+
const action = resolveInGroupFill(scanRow, table, plan);
|
|
1322
|
+
if (action.type === "fill") {
|
|
1323
|
+
writeScanFields(table[action.index], scanRow, bomId);
|
|
1324
|
+
return;
|
|
1325
|
+
}
|
|
1326
|
+
const nr = { is_confirmed_: false, expiration_date_: "" };
|
|
1327
|
+
ensureFrontRowKey(nr);
|
|
1328
|
+
writeScanFields(nr, scanRow, bomId);
|
|
1329
|
+
table.splice(plan.appendIndex, 0, nr);
|
|
1330
|
+
}
|
|
1331
|
+
function resolveInGroupFill(scanRow, table, plan) {
|
|
1332
|
+
const { type_ } = plan.target.bomEntry;
|
|
1333
|
+
const sameIndexes = plan.memberIndexes.filter(
|
|
1334
|
+
(i) => table[i]?.product_id_ === scanRow.product_id_
|
|
1335
|
+
);
|
|
1336
|
+
if (sameIndexes.length) {
|
|
1337
|
+
if (type_ === "view") return { type: "append" };
|
|
1338
|
+
const emptyKey = type_ === "by_lot" ? "material_no_" : type_ === "by_number" ? "qty_" : null;
|
|
1339
|
+
if (emptyKey) {
|
|
1340
|
+
const fillIdx = sameIndexes.find((i) => !table[i]?.[emptyKey]);
|
|
1341
|
+
return fillIdx !== void 0 ? { type: "fill", index: fillIdx } : { type: "append" };
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
const hasOtherProduct = plan.memberIndexes.some((i) => {
|
|
1345
|
+
const id = table[i]?.product_id_;
|
|
1346
|
+
return id && id !== scanRow.product_id_;
|
|
1347
|
+
});
|
|
1348
|
+
if (hasOtherProduct) return { type: "append" };
|
|
1349
|
+
throw new Error("匹配不到对应物料,请按规则上料或新增物料");
|
|
1350
|
+
}
|
|
1351
|
+
const EMPTY_PRODUCT_VERSION_ID = "__mc_no_selectable_product__";
|
|
1352
|
+
const EMPTY_LOT_NAME = "__mc_no_selectable_lot__";
|
|
1353
|
+
function isEmptyProductQuery(query) {
|
|
1354
|
+
const ids = query?.["id_.in"];
|
|
1355
|
+
return ids?.length === 1 && ids[0] === EMPTY_PRODUCT_VERSION_ID;
|
|
1356
|
+
}
|
|
1357
|
+
function buildProductIdQuery(options) {
|
|
1358
|
+
const { skipFilter, validator, tableData, row, rowIndex, enableSequenceLoading } = options;
|
|
1359
|
+
if (skipFilter) return void 0;
|
|
1360
|
+
const entryIdx = validator.resolveEntryIndex(row);
|
|
1361
|
+
if (entryIdx >= 0) {
|
|
1362
|
+
return toQuery(resolveGroupProductIds(validator, entryIdx, tableData));
|
|
1363
|
+
}
|
|
1364
|
+
if (enableSequenceLoading && rowIndex != null && rowIndex >= 0) {
|
|
1365
|
+
const indexes = resolveSequentialCandidateEntryIndexes(validator, tableData, rowIndex, row);
|
|
1366
|
+
if (indexes.length === 1) {
|
|
1367
|
+
return toQuery(resolveGroupProductIds(validator, indexes[0], tableData));
|
|
1368
|
+
}
|
|
1369
|
+
return toQuery(resolveUnassignedMaterialVersionIds(validator, tableData, row, rowIndex, true));
|
|
1370
|
+
}
|
|
1371
|
+
return toQuery(resolveUnassignedMaterialVersionIds(validator, tableData, row, void 0, false));
|
|
1372
|
+
}
|
|
1373
|
+
function buildMaterialNoQuery(options) {
|
|
1374
|
+
const { row, skipFilter, validator } = options;
|
|
1375
|
+
let baseQuery;
|
|
1376
|
+
if (row.product_id_) {
|
|
1377
|
+
baseQuery = {
|
|
1378
|
+
"product_id_.versionIn": [row.product_id_.split(":").pop()]
|
|
1379
|
+
};
|
|
1380
|
+
} else {
|
|
1381
|
+
const productQuery = buildProductIdQuery(options);
|
|
1382
|
+
if (!productQuery || isEmptyProductQuery(productQuery)) {
|
|
1383
|
+
baseQuery = { "product_id_.versionIn": [EMPTY_PRODUCT_VERSION_ID] };
|
|
1384
|
+
} else {
|
|
1385
|
+
const versionIds = productQuery["id_.in"].filter((id) => Boolean(id));
|
|
1386
|
+
baseQuery = { "product_id_.versionIn": versionIds };
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
if (skipFilter) {
|
|
1390
|
+
return baseQuery;
|
|
1391
|
+
}
|
|
1392
|
+
const entryIdx = validator.resolveEntryIndex(row);
|
|
1393
|
+
if (entryIdx < 0) {
|
|
1394
|
+
return baseQuery;
|
|
1395
|
+
}
|
|
1396
|
+
const entry = validator.bomEntryValidators[entryIdx].bomEntry;
|
|
1397
|
+
if (!entry.specified_material_no_enabled_) {
|
|
1398
|
+
return baseQuery;
|
|
1399
|
+
}
|
|
1400
|
+
const names = (entry.specified_material_entries_ ?? []).map((e) => e.name_).filter(Boolean);
|
|
1401
|
+
return {
|
|
1402
|
+
...baseQuery,
|
|
1403
|
+
"name_.in": names.length ? names : [EMPTY_LOT_NAME]
|
|
1404
|
+
};
|
|
1405
|
+
}
|
|
1406
|
+
function toVersionIds(ids) {
|
|
1407
|
+
return ids.map((id) => id.split(":").pop());
|
|
1408
|
+
}
|
|
1409
|
+
function toQuery(ids) {
|
|
1410
|
+
if (!ids.length) {
|
|
1411
|
+
return { "id_.in": [EMPTY_PRODUCT_VERSION_ID] };
|
|
1412
|
+
}
|
|
1413
|
+
return { "id_.in": toVersionIds(ids) };
|
|
1414
|
+
}
|
|
1415
|
+
function resolveKnownGroupEntryIndexes(validator, tableData, excludeRow) {
|
|
1416
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1417
|
+
for (const tableRow of tableData) {
|
|
1418
|
+
if (tableRow.deleted_ || tableRow === excludeRow) continue;
|
|
1419
|
+
const idx = validator.resolveEntryIndex(tableRow);
|
|
1420
|
+
if (idx >= 0) seen.add(idx);
|
|
1421
|
+
}
|
|
1422
|
+
return Array.from(seen);
|
|
1423
|
+
}
|
|
1424
|
+
function resolveSequentialBounds(validator, tableData, rowIndex, excludeRow) {
|
|
1425
|
+
let prev = -1;
|
|
1426
|
+
let next = validator.bomEntryValidators.length;
|
|
1427
|
+
for (let i = rowIndex - 1; i >= 0; i--) {
|
|
1428
|
+
const tableRow = tableData[i];
|
|
1429
|
+
if (!tableRow || tableRow.deleted_ || tableRow === excludeRow) continue;
|
|
1430
|
+
const idx = validator.resolveEntryIndex(tableRow);
|
|
1431
|
+
if (idx >= 0) {
|
|
1432
|
+
prev = idx;
|
|
1433
|
+
break;
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
for (let i = rowIndex + 1; i < tableData.length; i++) {
|
|
1437
|
+
const tableRow = tableData[i];
|
|
1438
|
+
if (!tableRow || tableRow.deleted_ || tableRow === excludeRow) continue;
|
|
1439
|
+
const idx = validator.resolveEntryIndex(tableRow);
|
|
1440
|
+
if (idx >= 0) {
|
|
1441
|
+
next = idx;
|
|
1442
|
+
break;
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
return { prev, next };
|
|
1446
|
+
}
|
|
1447
|
+
function resolveSequentialCandidateEntryIndexes(validator, tableData, rowIndex, excludeRow) {
|
|
1448
|
+
const { prev, next } = resolveSequentialBounds(validator, tableData, rowIndex, excludeRow);
|
|
1449
|
+
const indexes = [];
|
|
1450
|
+
for (let i = prev + 1; i < next; i++) {
|
|
1451
|
+
indexes.push(i);
|
|
1452
|
+
}
|
|
1453
|
+
return indexes;
|
|
1454
|
+
}
|
|
1455
|
+
function resolveMaterialVersionIdsByEntryIndexes(validator, entryIndexes) {
|
|
1456
|
+
const result = /* @__PURE__ */ new Set();
|
|
1457
|
+
for (const idx of entryIndexes) {
|
|
1458
|
+
validator.bomEntryValidators[idx]?.productIds.forEach((id) => {
|
|
1459
|
+
result.add(id.split(":").pop());
|
|
1460
|
+
});
|
|
1461
|
+
}
|
|
1462
|
+
return Array.from(result);
|
|
1463
|
+
}
|
|
1464
|
+
function resolveGroupProductIds(validator, entryIdx, tableData) {
|
|
1465
|
+
const util = validator.bomEntryValidators[entryIdx];
|
|
1466
|
+
if (!util) return [];
|
|
1467
|
+
return util.getSelectableProductIds(tableData);
|
|
1468
|
+
}
|
|
1469
|
+
function resolveUnassignedMaterialVersionIds(validator, tableData, excludeRow, rowIndex, enableSequenceLoading = false) {
|
|
1470
|
+
const allIndexes = validator.bomEntryValidators.map((_, i) => i);
|
|
1471
|
+
const knownGroupIndexes = resolveKnownGroupEntryIndexes(validator, tableData, excludeRow);
|
|
1472
|
+
let candidateGroupIndexes;
|
|
1473
|
+
if (enableSequenceLoading && rowIndex != null && rowIndex >= 0) {
|
|
1474
|
+
const intervalIndexes = resolveSequentialCandidateEntryIndexes(
|
|
1475
|
+
validator,
|
|
1476
|
+
tableData,
|
|
1477
|
+
rowIndex,
|
|
1478
|
+
excludeRow
|
|
1479
|
+
);
|
|
1480
|
+
candidateGroupIndexes = intervalIndexes.filter((i) => !knownGroupIndexes.includes(i));
|
|
1481
|
+
} else {
|
|
1482
|
+
candidateGroupIndexes = allIndexes.filter((i) => !knownGroupIndexes.includes(i));
|
|
1483
|
+
}
|
|
1484
|
+
if (!candidateGroupIndexes.length) {
|
|
1485
|
+
return [];
|
|
1486
|
+
}
|
|
1487
|
+
return resolveMaterialVersionIdsByEntryIndexes(validator, candidateGroupIndexes);
|
|
1488
|
+
}
|
|
1489
|
+
const GROUP_MERGE_FIELDS = /* @__PURE__ */ new Set([
|
|
1490
|
+
"qty_required_",
|
|
1491
|
+
"qty_consumed_total_"
|
|
1492
|
+
]);
|
|
1493
|
+
function isGroupMergeCell(tdInfo) {
|
|
1494
|
+
if (tdInfo.cellHidden || !tdInfo.cellWidget?.props) return false;
|
|
1495
|
+
const props = tdInfo.cellWidget.props;
|
|
1496
|
+
if (props.type === "serialnumber") return true;
|
|
1497
|
+
const field = props.field;
|
|
1498
|
+
return !!field && GROUP_MERGE_FIELDS.has(field);
|
|
1499
|
+
}
|
|
1500
|
+
function getGroupMergeKey(row, validator) {
|
|
1501
|
+
const entryIdx = validator.resolveEntryIndex(row);
|
|
1502
|
+
if (entryIdx >= 0) {
|
|
1503
|
+
return `bom:${validator.bomEntryValidators[entryIdx].bomEntry.id_}`;
|
|
1504
|
+
}
|
|
1505
|
+
if (row.bom_entry_id_) {
|
|
1506
|
+
return `bom:${row.bom_entry_id_}`;
|
|
1507
|
+
}
|
|
1508
|
+
return `row:${getRowId(row)}`;
|
|
1509
|
+
}
|
|
1510
|
+
function calcGroupRowSpans(rows, validator) {
|
|
1511
|
+
if (!rows.length) return [];
|
|
1512
|
+
const keys = rows.map((row) => getGroupMergeKey(row, validator));
|
|
1513
|
+
const spans = Array(rows.length).fill(1);
|
|
1514
|
+
for (let i = 0; i < keys.length; ) {
|
|
1515
|
+
let j = i + 1;
|
|
1516
|
+
while (j < keys.length && keys[j] === keys[i]) j++;
|
|
1517
|
+
const size = j - i;
|
|
1518
|
+
spans[i] = size;
|
|
1519
|
+
for (let k = i + 1; k < j; k++) {
|
|
1520
|
+
spans[k] = 0;
|
|
1521
|
+
}
|
|
1522
|
+
i = j;
|
|
1523
|
+
}
|
|
1524
|
+
return spans;
|
|
1525
|
+
}
|
|
1526
|
+
function calcGroupQtyConsumedTotal(entryIdx, tableData, validator) {
|
|
1527
|
+
if (entryIdx < 0) return 0;
|
|
1528
|
+
return tableData.reduce((sum, row) => {
|
|
1529
|
+
return validator.resolveEntryIndex(row) === entryIdx ? sum + (row.qty_ ?? 0) : sum;
|
|
1530
|
+
}, 0);
|
|
1531
|
+
}
|
|
1532
|
+
function syncGroupQtyConsumedTotals(tableData, validator) {
|
|
1533
|
+
const totals = /* @__PURE__ */ new Map();
|
|
1534
|
+
tableData.forEach((row) => {
|
|
1535
|
+
const entryIdx = validator.resolveEntryIndex(row);
|
|
1536
|
+
if (entryIdx < 0) {
|
|
1537
|
+
row.qty_consumed_total_ = void 0;
|
|
1538
|
+
return;
|
|
1539
|
+
}
|
|
1540
|
+
if (!totals.has(entryIdx)) {
|
|
1541
|
+
totals.set(entryIdx, calcGroupQtyConsumedTotal(entryIdx, tableData, validator));
|
|
1542
|
+
}
|
|
1543
|
+
row.qty_consumed_total_ = totals.get(entryIdx);
|
|
1544
|
+
});
|
|
1545
|
+
}
|
|
1546
|
+
const calculate = (...args) => window.NocodeAdapter.utils?.formulaCalculate?.(...args);
|
|
1364
1547
|
class MCDataUtil {
|
|
1365
1548
|
static allFields = [
|
|
1366
1549
|
"product_id_",
|
|
@@ -1372,7 +1555,8 @@ class MCDataUtil {
|
|
|
1372
1555
|
"expiration_date_",
|
|
1373
1556
|
"qty_required_uom_id_",
|
|
1374
1557
|
"qty_uom_id_",
|
|
1375
|
-
"qty_transfer_"
|
|
1558
|
+
"qty_transfer_",
|
|
1559
|
+
"qty_consumed_total_"
|
|
1376
1560
|
];
|
|
1377
1561
|
static editMCTable(row, data) {
|
|
1378
1562
|
if (!row._MCTABLE) {
|
|
@@ -1434,10 +1618,10 @@ class MaterialConsumeTableController {
|
|
|
1434
1618
|
this.bomEntriesValidator = new BomEntriesValidator(
|
|
1435
1619
|
this.actualBomEntries,
|
|
1436
1620
|
this.enableSequenceLoading,
|
|
1437
|
-
this.materialNoNum,
|
|
1621
|
+
() => this.materialNoNum,
|
|
1438
1622
|
this.tmplBomController.historyData,
|
|
1439
1623
|
this.tmplBomController.materialNo,
|
|
1440
|
-
this.mcPattern
|
|
1624
|
+
this.mcPattern === MaterialConsumptionPatternEnum.RECORD && !this.tmplBom.personal_bom_enabled_
|
|
1441
1625
|
);
|
|
1442
1626
|
}
|
|
1443
1627
|
tmplBomController;
|
|
@@ -1465,8 +1649,18 @@ class MaterialConsumeTableController {
|
|
|
1465
1649
|
unitConversionRules = [];
|
|
1466
1650
|
/** 主表 formState(由组件 setup 注入),用于读取主表字段值 */
|
|
1467
1651
|
mainFormState = ref({});
|
|
1468
|
-
/**
|
|
1652
|
+
/** 表单数据状态(由组件 setup 注入):未填报 / STASH / SUBMIT */
|
|
1653
|
+
dataStatus;
|
|
1654
|
+
/** 表单是否已暂存或提交(已处理过则不再跑初始化) */
|
|
1655
|
+
get isDataProcessed() {
|
|
1656
|
+
return ["STASH", "SUBMIT"].includes(this.dataStatus ?? "");
|
|
1657
|
+
}
|
|
1658
|
+
/** 批次数量或生产数量 */
|
|
1469
1659
|
get materialNoNum() {
|
|
1660
|
+
const { required_qty_calc_rule_, product_qty_field_ } = this.tmplBom;
|
|
1661
|
+
if (required_qty_calc_rule_ === RequiredQtyCalcRule.ProductQty) {
|
|
1662
|
+
return product_qty_field_ ? this.mainFormState.value[product_qty_field_] : 0;
|
|
1663
|
+
}
|
|
1470
1664
|
return this.tmplBomController.materialNoNum;
|
|
1471
1665
|
}
|
|
1472
1666
|
/** 物料消耗模式(自身没有配置的话取环境的默认值) */
|
|
@@ -1565,25 +1759,51 @@ class MaterialConsumeTableController {
|
|
|
1565
1759
|
* 根据bom明细构造子表数据(初始化时)
|
|
1566
1760
|
*/
|
|
1567
1761
|
calcFormState() {
|
|
1568
|
-
if (this.tmplBom.
|
|
1569
|
-
|
|
1570
|
-
return this.tmplBom.entries_.map((i) => {
|
|
1762
|
+
if (this.tmplBom.bom_init_enabled_) {
|
|
1763
|
+
return this.actualBomEntries.map((i) => {
|
|
1571
1764
|
return {
|
|
1572
1765
|
product_id_: i.product_id_,
|
|
1573
|
-
qty_required_: i.qty_required_ * this.materialNoNum
|
|
1574
|
-
|
|
1766
|
+
qty_required_: i.qty_required_ * this.materialNoNum,
|
|
1767
|
+
bom_entry_id_: i.id_
|
|
1575
1768
|
};
|
|
1576
1769
|
});
|
|
1577
1770
|
}
|
|
1578
1771
|
}
|
|
1772
|
+
/**
|
|
1773
|
+
* 未填报时初始化消耗表行数据
|
|
1774
|
+
* @param defaultData 子表行默认值(含工序等)
|
|
1775
|
+
*/
|
|
1776
|
+
initTableData(defaultData) {
|
|
1777
|
+
if (this.isDataProcessed) return;
|
|
1778
|
+
const rows = this.calcFormState();
|
|
1779
|
+
if (!rows?.length) return;
|
|
1780
|
+
const tableRows = transformUtils.transformSourceData2SubTable(
|
|
1781
|
+
rows,
|
|
1782
|
+
{},
|
|
1783
|
+
defaultData
|
|
1784
|
+
);
|
|
1785
|
+
tableRows.forEach((row, i) => {
|
|
1786
|
+
ensureFrontRowKey(row);
|
|
1787
|
+
if (i === 0) {
|
|
1788
|
+
MCDataUtil.setRowEditing(row, true);
|
|
1789
|
+
} else {
|
|
1790
|
+
MCDataUtil.setRowEditing(row, !this.enableSequenceLoading);
|
|
1791
|
+
}
|
|
1792
|
+
});
|
|
1793
|
+
this.actualTableData = tableRows;
|
|
1794
|
+
}
|
|
1579
1795
|
/**
|
|
1580
1796
|
* 根据数据计算需要禁用的字段
|
|
1581
1797
|
* @param row
|
|
1582
1798
|
* @return {*}
|
|
1583
1799
|
*/
|
|
1584
1800
|
calcDisabledFields(row) {
|
|
1585
|
-
const disabledKeys = [
|
|
1586
|
-
|
|
1801
|
+
const disabledKeys = [
|
|
1802
|
+
"qty_consumed_",
|
|
1803
|
+
"sort_num_",
|
|
1804
|
+
"qty_consumed_total_"
|
|
1805
|
+
];
|
|
1806
|
+
const isRecordPattern = this.mcPattern === MaterialConsumptionPatternEnum.RECORD && !this.tmplBom.personal_bom_enabled_;
|
|
1587
1807
|
if (!isRecordPattern) {
|
|
1588
1808
|
disabledKeys.push("qty_required_");
|
|
1589
1809
|
}
|
|
@@ -1600,13 +1820,38 @@ class MaterialConsumeTableController {
|
|
|
1600
1820
|
* @return {*}
|
|
1601
1821
|
*/
|
|
1602
1822
|
getProductQuery() {
|
|
1603
|
-
if (this.mcPattern === MaterialConsumptionPatternEnum.RECORD) {
|
|
1823
|
+
if (this.mcPattern === MaterialConsumptionPatternEnum.RECORD && !this.tmplBom.personal_bom_enabled_) {
|
|
1604
1824
|
return void 0;
|
|
1605
1825
|
}
|
|
1606
1826
|
return {
|
|
1607
1827
|
"id_.in": this.bomEntriesValidator.getAllMaterialIds()
|
|
1608
1828
|
};
|
|
1609
1829
|
}
|
|
1830
|
+
/**
|
|
1831
|
+
* 行级 product_id_ / material_no_ 查询共用入参
|
|
1832
|
+
*/
|
|
1833
|
+
buildProductQueryOptions(row, rowIndex) {
|
|
1834
|
+
return {
|
|
1835
|
+
validator: this.bomEntriesValidator,
|
|
1836
|
+
tableData: this.actualTableData,
|
|
1837
|
+
row,
|
|
1838
|
+
rowIndex,
|
|
1839
|
+
enableSequenceLoading: this.enableSequenceLoading,
|
|
1840
|
+
skipFilter: this.mcPattern === MaterialConsumptionPatternEnum.RECORD && !this.tmplBom.personal_bom_enabled_
|
|
1841
|
+
};
|
|
1842
|
+
}
|
|
1843
|
+
/**
|
|
1844
|
+
* 行级 product_id_ 下拉过滤(覆盖全局 id_.in)
|
|
1845
|
+
*/
|
|
1846
|
+
getProductQueryForRow(row, rowIndex) {
|
|
1847
|
+
return buildProductIdQuery(this.buildProductQueryOptions(row, rowIndex));
|
|
1848
|
+
}
|
|
1849
|
+
/**
|
|
1850
|
+
* 行级 material_no_ 批次过滤:有物料按物料;无物料与 product_id_ 可选范围一致
|
|
1851
|
+
*/
|
|
1852
|
+
getMaterialNoQueryForRow(row, rowIndex) {
|
|
1853
|
+
return buildMaterialNoQuery(this.buildProductQueryOptions(row, rowIndex));
|
|
1854
|
+
}
|
|
1610
1855
|
/**
|
|
1611
1856
|
* 是否是第一行且物料是空行
|
|
1612
1857
|
* @return {*}
|
|
@@ -1614,17 +1859,32 @@ class MaterialConsumeTableController {
|
|
|
1614
1859
|
isFirstBlankRow() {
|
|
1615
1860
|
return this.actualTableData.length === 1 && !this.actualTableData[0].product_id_;
|
|
1616
1861
|
}
|
|
1862
|
+
/**
|
|
1863
|
+
* 是否有正在编辑的组。
|
|
1864
|
+
* 一组可多行同时为编辑态;同时只能有一组处于编辑态。
|
|
1865
|
+
*/
|
|
1866
|
+
hasEditingGroup(showMessage = true) {
|
|
1867
|
+
try {
|
|
1868
|
+
const hasEditing = this.bomEntriesValidator.hasEditingGroup(this.actualTableData);
|
|
1869
|
+
if (hasEditing && showMessage) {
|
|
1870
|
+
this.error($t("sys.edhr.mcTable.onlyOneEditingRow"));
|
|
1871
|
+
}
|
|
1872
|
+
return hasEditing;
|
|
1873
|
+
} catch (e) {
|
|
1874
|
+
if (showMessage && e?.message) {
|
|
1875
|
+
this.error(e.message);
|
|
1876
|
+
}
|
|
1877
|
+
return true;
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1617
1880
|
/**
|
|
1618
1881
|
* 解析扫码的数据
|
|
1619
1882
|
* 并判断是否能存入表中,返回对象则表示可以存入
|
|
1620
1883
|
* @param str
|
|
1621
1884
|
*/
|
|
1622
|
-
async parseScanStr(
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
}
|
|
1626
|
-
const isRecordPattern = this.mcPattern === MaterialConsumptionPatternEnum.RECORD;
|
|
1627
|
-
const data = getParseRuleValue(str, this.scanRules);
|
|
1885
|
+
async parseScanStr(data, transformedData) {
|
|
1886
|
+
await this.bomEntriesValidator.hasEditingGroup(this.actualTableData);
|
|
1887
|
+
const isRecordPattern = this.mcPattern === MaterialConsumptionPatternEnum.RECORD && !this.tmplBom.personal_bom_enabled_;
|
|
1628
1888
|
console.log("parseScanStr", data);
|
|
1629
1889
|
const arr = await materialCheck({
|
|
1630
1890
|
material_no_: data.materialCode,
|
|
@@ -1633,54 +1893,50 @@ class MaterialConsumeTableController {
|
|
|
1633
1893
|
validate_: data.expiration,
|
|
1634
1894
|
// 记录模式传null,后台就不校验了
|
|
1635
1895
|
bom_entries_: isRecordPattern ? null : this.actualBomEntries,
|
|
1636
|
-
operation_id_: this.tmplBomController.operationId
|
|
1896
|
+
operation_id_: this.tmplBomController.operationId,
|
|
1897
|
+
unique_code_: data.uniqueCode,
|
|
1898
|
+
// 不开启条码解析时,参数配置的唯一码
|
|
1899
|
+
bar_code_enabled_: !this.tmplBom.disable_barcode_parsing_
|
|
1637
1900
|
}) || (isRecordPattern ? [{ productionIdentificationName: data.lot }] : null);
|
|
1638
1901
|
if (!arr) {
|
|
1639
|
-
this.error(
|
|
1902
|
+
this.error("匹配不到对应物料,请按规则上料或新增物料");
|
|
1640
1903
|
return;
|
|
1641
1904
|
}
|
|
1642
1905
|
let materialData = arr[0];
|
|
1643
|
-
if (arr.length > 1
|
|
1644
|
-
const
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1906
|
+
if (arr.length > 1) {
|
|
1907
|
+
const selected = await MaterialConsumeTableController.render.openMultiRowsModal({
|
|
1908
|
+
rows: arr
|
|
1909
|
+
});
|
|
1910
|
+
if (!selected) {
|
|
1911
|
+
return;
|
|
1648
1912
|
}
|
|
1649
|
-
materialData =
|
|
1913
|
+
materialData = selected;
|
|
1914
|
+
} else if (materialData?.productionIdentificationIsLocked) {
|
|
1915
|
+
const msg = await getLotLockedReason(materialData.productionIdentificationId);
|
|
1916
|
+
this.error(msg);
|
|
1917
|
+
return;
|
|
1650
1918
|
}
|
|
1651
1919
|
const row = {
|
|
1652
1920
|
product_id_: materialData.materialId,
|
|
1653
1921
|
material_no_: materialData.productionIdentificationName,
|
|
1654
1922
|
qty_: data.qty,
|
|
1655
|
-
is_confirmed_: false
|
|
1923
|
+
is_confirmed_: false,
|
|
1924
|
+
expiration_date_: data.expiration
|
|
1656
1925
|
};
|
|
1657
1926
|
if (isRecordPattern && !row.product_id_) {
|
|
1658
1927
|
row._scanFallback = true;
|
|
1659
1928
|
}
|
|
1660
|
-
|
|
1661
|
-
const fillData = calcFillData(data, this.scanRuleProps.fillMapArr);
|
|
1662
|
-
console.log("fillData", fillData);
|
|
1663
|
-
Object.assign(row, fillData);
|
|
1664
|
-
}
|
|
1665
|
-
if (data.expiration) {
|
|
1666
|
-
row.expiration_date_ = dayjs(data.expiration).format("YYYY-MM-DD");
|
|
1667
|
-
}
|
|
1929
|
+
Object.assign(row, transformedData);
|
|
1668
1930
|
this.setDefaultValue(row);
|
|
1669
1931
|
try {
|
|
1670
|
-
const
|
|
1671
|
-
await this.
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
}
|
|
1676
|
-
this.tableDataRef.value = newArr;
|
|
1677
|
-
const editingRow = this.actualTableData.find((i) => !i.is_confirmed_);
|
|
1678
|
-
if (editingRow && row.product_id_) {
|
|
1679
|
-
this.confirm(editingRow);
|
|
1680
|
-
}
|
|
1932
|
+
const plan = await this.bomEntriesValidator.validateScanCanInsert(row, this.actualTableData);
|
|
1933
|
+
this.tableDataRef.value = await applyScanFillPlan(this.actualTableData, row, plan, {
|
|
1934
|
+
validateCurrentGroupForSwitch: (table, current) => this.bomEntriesValidator.validateCurrentGroupForSwitch(table, current)
|
|
1935
|
+
});
|
|
1936
|
+
this.updateDerivedQtyFields();
|
|
1681
1937
|
} catch (e) {
|
|
1682
1938
|
console.error(e);
|
|
1683
|
-
if (e
|
|
1939
|
+
if (e?.message) {
|
|
1684
1940
|
this.error(e.message);
|
|
1685
1941
|
}
|
|
1686
1942
|
}
|
|
@@ -1695,25 +1951,27 @@ class MaterialConsumeTableController {
|
|
|
1695
1951
|
if (this.isScanOpen) {
|
|
1696
1952
|
return;
|
|
1697
1953
|
}
|
|
1698
|
-
console.log("open-------", this);
|
|
1699
|
-
if (!this.tmplBom.disable_barcode_parsing_ && !this.scanRuleInfo || this.tmplBom.disable_barcode_parsing_ && !this.scanParamType) {
|
|
1700
|
-
this.error($t("sys.edhr.mcTable.scanRuleNotFound"));
|
|
1701
|
-
return;
|
|
1702
|
-
}
|
|
1703
1954
|
const { title } = opts;
|
|
1704
1955
|
this.isScanOpen = true;
|
|
1705
1956
|
await MaterialConsumeTableController.render.openScanModal({
|
|
1706
1957
|
title,
|
|
1707
1958
|
subModelKey: this.widget.props.modelKey,
|
|
1708
1959
|
formModelController: this.formModelController,
|
|
1709
|
-
scanRules: this.scanRuleProps,
|
|
1710
|
-
scanParam: this.scanParamType,
|
|
1711
|
-
onScan: async ({ str }) => {
|
|
1712
|
-
console.log("onScan", str);
|
|
1960
|
+
scanRules: !this.tmplBom.disable_barcode_parsing_ ? this.scanRuleProps : void 0,
|
|
1961
|
+
scanParam: this.tmplBom.disable_barcode_parsing_ ? this.scanParamType : void 0,
|
|
1962
|
+
onScan: async ({ str, parsedValue, transformedData }) => {
|
|
1963
|
+
console.log("onScan", str, parsedValue);
|
|
1713
1964
|
if (!str) {
|
|
1714
1965
|
return;
|
|
1715
1966
|
}
|
|
1716
|
-
|
|
1967
|
+
try {
|
|
1968
|
+
await this.validateExpiration({ expiration_date_: parsedValue.expiration });
|
|
1969
|
+
await this.parseScanStr(parsedValue, transformedData);
|
|
1970
|
+
} catch (e) {
|
|
1971
|
+
if (e?.message) {
|
|
1972
|
+
this.error(e.message);
|
|
1973
|
+
}
|
|
1974
|
+
}
|
|
1717
1975
|
}
|
|
1718
1976
|
});
|
|
1719
1977
|
this.isScanOpen = false;
|
|
@@ -1726,7 +1984,7 @@ class MaterialConsumeTableController {
|
|
|
1726
1984
|
if (!this.actualBomEntries) {
|
|
1727
1985
|
return;
|
|
1728
1986
|
}
|
|
1729
|
-
await MaterialConsumeTableController.render
|
|
1987
|
+
await MaterialConsumeTableController.render?.openBomModal({
|
|
1730
1988
|
bomList: this.actualBomEntries,
|
|
1731
1989
|
onSubstitute: async () => {
|
|
1732
1990
|
console.log("一键导入数据逻辑");
|
|
@@ -1743,22 +2001,41 @@ class MaterialConsumeTableController {
|
|
|
1743
2001
|
this.formModelController = opts.formModelController;
|
|
1744
2002
|
this.unitConversionRules = opts.unitConversionRules ?? [];
|
|
1745
2003
|
this.mainFormState = opts.mainFormState ?? ref({});
|
|
1746
|
-
|
|
2004
|
+
this.dataStatus = opts.dataStatus;
|
|
2005
|
+
this.initTableData(opts.defaultRowData);
|
|
1747
2006
|
if (this.actualTableData.length === 1) {
|
|
1748
2007
|
const firstRow = this.actualTableData[0];
|
|
1749
2008
|
if (!firstRow.product_id_) {
|
|
1750
2009
|
MCDataUtil.setRowEditing(firstRow, true);
|
|
1751
2010
|
}
|
|
1752
2011
|
}
|
|
2012
|
+
watch(
|
|
2013
|
+
() => this.materialNoNum,
|
|
2014
|
+
() => this.syncQtyRequiredFromBom(),
|
|
2015
|
+
{ immediate: true }
|
|
2016
|
+
);
|
|
1753
2017
|
onUnmounted(() => {
|
|
1754
2018
|
MaterialConsumeTableController.render.destroyAllModals();
|
|
1755
2019
|
});
|
|
1756
2020
|
}
|
|
2021
|
+
/**
|
|
2022
|
+
* 按当前 materialNoNum 回写各行 qty_required_(校验侧 total 已通过 getter 实时读取)
|
|
2023
|
+
*/
|
|
2024
|
+
syncQtyRequiredFromBom() {
|
|
2025
|
+
this.actualTableData.forEach((row) => {
|
|
2026
|
+
if (!row.product_id_) return;
|
|
2027
|
+
const util = this.bomEntriesValidator.findUtilByProductId(row.product_id_);
|
|
2028
|
+
if (util) {
|
|
2029
|
+
row.qty_required_ = util.total;
|
|
2030
|
+
}
|
|
2031
|
+
});
|
|
2032
|
+
this.updateDerivedQtyFields();
|
|
2033
|
+
}
|
|
1757
2034
|
/** 校验有效期 */
|
|
1758
2035
|
validateExpiration(row) {
|
|
1759
2036
|
if (row.expiration_date_) {
|
|
1760
2037
|
if (dayjs(row.expiration_date_).endOf("day").isBefore(dayjs())) {
|
|
1761
|
-
throw new Error($t("sys.
|
|
2038
|
+
throw new Error($t("sys.expirationDateErrorTip"));
|
|
1762
2039
|
}
|
|
1763
2040
|
}
|
|
1764
2041
|
}
|
|
@@ -1798,7 +2075,7 @@ class MaterialConsumeTableController {
|
|
|
1798
2075
|
return acc;
|
|
1799
2076
|
}, {});
|
|
1800
2077
|
try {
|
|
1801
|
-
const res = await calculate
|
|
2078
|
+
const res = await calculate(formulaContent, formData);
|
|
1802
2079
|
Object.assign(row, {
|
|
1803
2080
|
qty_transfer_: res,
|
|
1804
2081
|
qty_transfer_uom_id_: targetUnitId,
|
|
@@ -1875,14 +2152,12 @@ class MaterialConsumeTableController {
|
|
|
1875
2152
|
return;
|
|
1876
2153
|
}
|
|
1877
2154
|
let errorObj;
|
|
1878
|
-
const hasEditing = this.hasEditingRow(false);
|
|
1879
|
-
if (hasEditing) {
|
|
1880
|
-
errorObj = this.calcErrorObj($t("sys.edhr.mcTable.hasEditingRow"));
|
|
1881
|
-
}
|
|
1882
2155
|
try {
|
|
1883
|
-
this.
|
|
2156
|
+
if (this.mcPattern !== MaterialConsumptionPatternEnum.RECORD && !this.tmplBom.personal_bom_enabled_) {
|
|
2157
|
+
await this.bomEntriesValidator.validateAllRows(this.actualTableData);
|
|
2158
|
+
}
|
|
1884
2159
|
} catch (e) {
|
|
1885
|
-
if (e
|
|
2160
|
+
if (e?.message) {
|
|
1886
2161
|
errorObj = this.calcErrorObj(e.message);
|
|
1887
2162
|
}
|
|
1888
2163
|
}
|
|
@@ -1900,19 +2175,36 @@ class MaterialConsumeTableController {
|
|
|
1900
2175
|
return hasEditing;
|
|
1901
2176
|
}
|
|
1902
2177
|
/**
|
|
1903
|
-
*
|
|
2178
|
+
* 选中行开启编辑(顺序上料:校验当前编辑组后整组切换;非顺序上料:始终编辑态,无需操作)
|
|
1904
2179
|
* @param row
|
|
1905
2180
|
*/
|
|
1906
|
-
editRow(row) {
|
|
1907
|
-
if (this.
|
|
2181
|
+
async editRow(row) {
|
|
2182
|
+
if (!this.enableSequenceLoading) {
|
|
2183
|
+
return;
|
|
2184
|
+
}
|
|
2185
|
+
const entryIdx = this.bomEntriesValidator.resolveEntryIndex(row);
|
|
2186
|
+
const targetUtil = entryIdx >= 0 ? this.bomEntriesValidator.bomEntryValidators[entryIdx] : void 0;
|
|
2187
|
+
if (!targetUtil) {
|
|
2188
|
+
MCDataUtil.setRowEditing(row, true);
|
|
1908
2189
|
return;
|
|
1909
2190
|
}
|
|
1910
|
-
const
|
|
1911
|
-
if (
|
|
1912
|
-
this.error($t("sys.edhr.mcTable.onlyLastRowCanEdit"));
|
|
2191
|
+
const targetRows = this.actualTableData.filter((r) => isRowInBomGroup(r, targetUtil));
|
|
2192
|
+
if (targetRows.length && targetRows.every((r) => !r.is_confirmed_)) {
|
|
1913
2193
|
return;
|
|
1914
2194
|
}
|
|
1915
|
-
|
|
2195
|
+
const current = this.bomEntriesValidator.findSequenceBomEntry(this.actualTableData);
|
|
2196
|
+
if (current && current !== targetUtil) {
|
|
2197
|
+
try {
|
|
2198
|
+
await this.bomEntriesValidator.validateCurrentGroupForSwitch(this.actualTableData, current);
|
|
2199
|
+
} catch (e) {
|
|
2200
|
+
if (e?.message) {
|
|
2201
|
+
this.error(e.message);
|
|
2202
|
+
}
|
|
2203
|
+
return;
|
|
2204
|
+
}
|
|
2205
|
+
setGroupEditState(this.actualTableData, current, false);
|
|
2206
|
+
}
|
|
2207
|
+
setGroupEditState(this.actualTableData, targetUtil, true);
|
|
1916
2208
|
}
|
|
1917
2209
|
/**
|
|
1918
2210
|
* 更新整个数组的所有行的已消耗数量
|
|
@@ -1930,8 +2222,7 @@ class MaterialConsumeTableController {
|
|
|
1930
2222
|
const beforeArr = this.actualTableData.slice(0, index + 1);
|
|
1931
2223
|
if (util) {
|
|
1932
2224
|
total += util.hasConsumed;
|
|
1933
|
-
|
|
1934
|
-
filterGroupData.forEach((i) => {
|
|
2225
|
+
util.filterGroupData(beforeArr).forEach((i) => {
|
|
1935
2226
|
total += i.qty_ ?? 0;
|
|
1936
2227
|
});
|
|
1937
2228
|
row.qty_consumed_ = total;
|
|
@@ -1941,6 +2232,19 @@ class MaterialConsumeTableController {
|
|
|
1941
2232
|
modifySingleRow(index);
|
|
1942
2233
|
}
|
|
1943
2234
|
}
|
|
2235
|
+
/**
|
|
2236
|
+
* 组级:更新 qty_consumed_total_(同组 qty_ 之和)
|
|
2237
|
+
*/
|
|
2238
|
+
updateGroupQtyConsumedTotal() {
|
|
2239
|
+
syncGroupQtyConsumedTotals(this.actualTableData, this.bomEntriesValidator);
|
|
2240
|
+
}
|
|
2241
|
+
/**
|
|
2242
|
+
* qty 相关派生字段统一入口(改 qty_ / 扫码 / 删行 等都走这里)
|
|
2243
|
+
*/
|
|
2244
|
+
updateDerivedQtyFields() {
|
|
2245
|
+
this.updateRowConsumed();
|
|
2246
|
+
this.updateGroupQtyConsumedTotal();
|
|
2247
|
+
}
|
|
1944
2248
|
/**
|
|
1945
2249
|
* 设置默认值,如工序,需求数量/已消耗数量
|
|
1946
2250
|
* @param row
|
|
@@ -1962,7 +2266,7 @@ class MaterialConsumeTableController {
|
|
|
1962
2266
|
* 统一处理表格内部的字段的值变更
|
|
1963
2267
|
* @param opts
|
|
1964
2268
|
*/
|
|
1965
|
-
handleChange(opts) {
|
|
2269
|
+
async handleChange(opts) {
|
|
1966
2270
|
const { field, row, value, option } = opts;
|
|
1967
2271
|
console.log("handleChange", opts);
|
|
1968
2272
|
if (field === "product_id_") {
|
|
@@ -1975,11 +2279,18 @@ class MaterialConsumeTableController {
|
|
|
1975
2279
|
row.qty_required_ = void 0;
|
|
1976
2280
|
this.setDefaultValue(row);
|
|
1977
2281
|
} else if (field === "material_no_") {
|
|
2282
|
+
if (option?.is_locked_) {
|
|
2283
|
+
row.material_no_ = void 0;
|
|
2284
|
+
row.material_no__id_ = void 0;
|
|
2285
|
+
const msg = await getLotLockedReason(option.id_);
|
|
2286
|
+
this.error(msg);
|
|
2287
|
+
return;
|
|
2288
|
+
}
|
|
1978
2289
|
row.product_id_ = option.product_id_;
|
|
1979
2290
|
row.expiration_date_ = option.validate_;
|
|
1980
2291
|
this.setDefaultValue(row);
|
|
1981
2292
|
} else if (field === "qty_") {
|
|
1982
|
-
this.
|
|
2293
|
+
this.updateDerivedQtyFields();
|
|
1983
2294
|
}
|
|
1984
2295
|
}
|
|
1985
2296
|
}
|
|
@@ -2034,6 +2345,7 @@ var SubTableActionEnum = /* @__PURE__ */ ((SubTableActionEnum2) => {
|
|
|
2034
2345
|
SubTableActionEnum2["VIEW_BOM"] = "VIEW_BOM";
|
|
2035
2346
|
SubTableActionEnum2["CHANGE_PARSE_RULE"] = "CHANGE_PARSE_RULE";
|
|
2036
2347
|
SubTableActionEnum2["RowEdit"] = "rowEdit";
|
|
2348
|
+
SubTableActionEnum2["Insert1GroupAfter"] = "insert1GroupAfter";
|
|
2037
2349
|
return SubTableActionEnum2;
|
|
2038
2350
|
})(SubTableActionEnum || {});
|
|
2039
2351
|
var SubTableActionMenuTypeEnum = /* @__PURE__ */ ((SubTableActionMenuTypeEnum2) => {
|
|
@@ -2081,6 +2393,12 @@ function getMenuByAction(type) {
|
|
|
2081
2393
|
label: "加一行",
|
|
2082
2394
|
icon: "icon-jiayihang"
|
|
2083
2395
|
},
|
|
2396
|
+
[SubTableActionEnum.Insert1GroupAfter]: {
|
|
2397
|
+
type: SubTableActionMenuTypeEnum.ACTION,
|
|
2398
|
+
key: SubTableActionEnum.Insert1GroupAfter,
|
|
2399
|
+
label: "加一组",
|
|
2400
|
+
icon: "icon-jiayihang"
|
|
2401
|
+
},
|
|
2084
2402
|
[SubTableActionEnum.CopyRowAfter]: {
|
|
2085
2403
|
type: SubTableActionMenuTypeEnum.ACTION,
|
|
2086
2404
|
key: SubTableActionEnum.CopyRowAfter,
|
|
@@ -2532,161 +2850,8 @@ class SubTableCore {
|
|
|
2532
2850
|
console.log(this.ctx.widget.props.tableTitle, "处理表单按钮点击事件", params);
|
|
2533
2851
|
}
|
|
2534
2852
|
}
|
|
2535
|
-
const identify = (...args) => window.NocodeAdapter.utils?.formulaIdentify?.(...args) ?? [];
|
|
2536
|
-
const calculate = (...args) => window.NocodeAdapter.utils?.formulaCalculate?.(...args);
|
|
2537
|
-
function useDependency(widget, props) {
|
|
2538
|
-
const { field, isFieldModel, fieldLink, subModelKey, newSpecificConfig } = widget.props;
|
|
2539
|
-
const fieldWidget = ref(subModelKey ? cloneDeep(props.widget) : props.widget);
|
|
2540
|
-
watch(
|
|
2541
|
-
() => props.widget.props,
|
|
2542
|
-
(newProps) => {
|
|
2543
|
-
Object.assign(fieldWidget.value.props, newProps);
|
|
2544
|
-
}
|
|
2545
|
-
);
|
|
2546
|
-
const { currentPageFormState } = useCurrentPageFormState();
|
|
2547
|
-
const targetFieldId = field ? isFieldModel ? fieldLink : field : "";
|
|
2548
|
-
const configDependency = widget.props.componentDependency?.configDependency || {};
|
|
2549
|
-
const readonly_expression = configDependency[Dependency_ENUM.READONLY]?.expression;
|
|
2550
|
-
const readonly_value = configDependency[Dependency_ENUM.READONLY]?.value;
|
|
2551
|
-
if (readonly_value && readonly_expression) {
|
|
2552
|
-
insetDep(
|
|
2553
|
-
{
|
|
2554
|
-
expression: readonly_expression,
|
|
2555
|
-
formState: currentPageFormState.value
|
|
2556
|
-
},
|
|
2557
|
-
(res) => {
|
|
2558
|
-
fieldWidget.value.props.field_readonly = !!res;
|
|
2559
|
-
}
|
|
2560
|
-
);
|
|
2561
|
-
}
|
|
2562
|
-
const field_required = widget.props?.newSpecificConfig?.newRequired;
|
|
2563
|
-
const required_expression = configDependency[Dependency_ENUM.REQUIRED]?.expression;
|
|
2564
|
-
const required_value = configDependency[Dependency_ENUM.REQUIRED]?.value;
|
|
2565
|
-
if (!field_required && required_value && required_expression) {
|
|
2566
|
-
insetDep(
|
|
2567
|
-
{
|
|
2568
|
-
expression: required_expression,
|
|
2569
|
-
formState: currentPageFormState.value
|
|
2570
|
-
},
|
|
2571
|
-
(res) => {
|
|
2572
|
-
fieldWidget.value.props.required = !!res;
|
|
2573
|
-
}
|
|
2574
|
-
);
|
|
2575
|
-
}
|
|
2576
|
-
if (field_required) {
|
|
2577
|
-
fieldWidget.value.props.required = true;
|
|
2578
|
-
}
|
|
2579
|
-
const field_disabled = widget.props.disabled;
|
|
2580
|
-
const disabled_expression = configDependency[Dependency_ENUM.DISABLED]?.expression;
|
|
2581
|
-
const disabled_value = configDependency[Dependency_ENUM.DISABLED]?.value;
|
|
2582
|
-
if (!field_disabled && disabled_value && disabled_expression) {
|
|
2583
|
-
insetDep(
|
|
2584
|
-
{
|
|
2585
|
-
expression: disabled_expression,
|
|
2586
|
-
formState: currentPageFormState.value
|
|
2587
|
-
},
|
|
2588
|
-
(res) => {
|
|
2589
|
-
fieldWidget.value.props.disabled = !!res;
|
|
2590
|
-
}
|
|
2591
|
-
);
|
|
2592
|
-
}
|
|
2593
|
-
const assignment_expression = configDependency[Dependency_ENUM.ASSIGNMENT]?.expression;
|
|
2594
|
-
const strategy = configDependency[Dependency_ENUM.ASSIGNMENT]?.strategy;
|
|
2595
|
-
if (assignment_expression) {
|
|
2596
|
-
insetDep(
|
|
2597
|
-
{
|
|
2598
|
-
expression: assignment_expression,
|
|
2599
|
-
formState: currentPageFormState.value
|
|
2600
|
-
},
|
|
2601
|
-
(res) => {
|
|
2602
|
-
const formattedValue = formatDateCompliance(res, newSpecificConfig?.mappingType);
|
|
2603
|
-
props.formData[field] = formattedValue;
|
|
2604
|
-
}
|
|
2605
|
-
);
|
|
2606
|
-
}
|
|
2607
|
-
if (!props.formData._OPCT) {
|
|
2608
|
-
props.formData._OPCT = { _DICT: {} };
|
|
2609
|
-
}
|
|
2610
|
-
const formRowData = toRef(() => {
|
|
2611
|
-
if (isFieldModel) {
|
|
2612
|
-
return props.formData._OPCT;
|
|
2613
|
-
}
|
|
2614
|
-
return props.formData;
|
|
2615
|
-
});
|
|
2616
|
-
const value = computed({
|
|
2617
|
-
get() {
|
|
2618
|
-
if (targetFieldId) {
|
|
2619
|
-
return formRowData.value[targetFieldId];
|
|
2620
|
-
}
|
|
2621
|
-
return "";
|
|
2622
|
-
},
|
|
2623
|
-
set(val) {
|
|
2624
|
-
if (targetFieldId && !!assignment_expression && strategy === ASSIGNMENTSTRATEGY_ENUM.alwaysCover)
|
|
2625
|
-
return;
|
|
2626
|
-
formRowData.value[targetFieldId] = val;
|
|
2627
|
-
}
|
|
2628
|
-
});
|
|
2629
|
-
function insetDep({ expression, formState }, callback) {
|
|
2630
|
-
if (!expression || expression === "true") {
|
|
2631
|
-
callback(true);
|
|
2632
|
-
return;
|
|
2633
|
-
}
|
|
2634
|
-
const identifyArgs = identify(expression);
|
|
2635
|
-
const cacheFormFields = computed(() => {
|
|
2636
|
-
return identifyArgs.reduce((total, i) => {
|
|
2637
|
-
const value2 = i.startsWith("_.") ? props.formData[i.slice(2)] : formState[i];
|
|
2638
|
-
total[i] = value2;
|
|
2639
|
-
return total;
|
|
2640
|
-
}, {});
|
|
2641
|
-
});
|
|
2642
|
-
watchDebounced(
|
|
2643
|
-
cacheFormFields,
|
|
2644
|
-
() => {
|
|
2645
|
-
calculate(expression, cacheFormFields.value).then(callback);
|
|
2646
|
-
},
|
|
2647
|
-
{
|
|
2648
|
-
debounce: 200,
|
|
2649
|
-
immediate: true,
|
|
2650
|
-
deep: true
|
|
2651
|
-
}
|
|
2652
|
-
);
|
|
2653
|
-
}
|
|
2654
|
-
return { value, formRowData, targetFieldId, fieldWidget };
|
|
2655
|
-
}
|
|
2656
|
-
function formatDateCompliance(value, fieldTypeVal) {
|
|
2657
|
-
if (!value) {
|
|
2658
|
-
return value === 0 || value === false ? value : null;
|
|
2659
|
-
}
|
|
2660
|
-
const valueStr = String(value).trim();
|
|
2661
|
-
if (fieldTypeVal === FIELD_TYPE.DATE) {
|
|
2662
|
-
const dateMatch = valueStr.match(/^(\d{4}-\d{2}-\d{2})/);
|
|
2663
|
-
if (!dateMatch) {
|
|
2664
|
-
return "";
|
|
2665
|
-
}
|
|
2666
|
-
return dateMatch[1];
|
|
2667
|
-
}
|
|
2668
|
-
if (fieldTypeVal === FIELD_TYPE.DATE_TIME) {
|
|
2669
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(valueStr)) {
|
|
2670
|
-
return `${valueStr} 00:00:00`;
|
|
2671
|
-
}
|
|
2672
|
-
if (/^\d{4}-\d{2}-\d{2}\s\d{1,2}:\d{2}:\d{2}$/.test(valueStr)) {
|
|
2673
|
-
return valueStr;
|
|
2674
|
-
}
|
|
2675
|
-
if (/^\d{4}-\d{2}-\d{2}\s\d{1,2}:\d{2}$/.test(valueStr)) {
|
|
2676
|
-
return `${valueStr}:00`;
|
|
2677
|
-
}
|
|
2678
|
-
return "";
|
|
2679
|
-
}
|
|
2680
|
-
if (fieldTypeVal === FIELD_TYPE.TIME) {
|
|
2681
|
-
const timeMatch = valueStr.match(/(\d{1,2}:\d{2}(?::\d{2})?)/);
|
|
2682
|
-
if (timeMatch) {
|
|
2683
|
-
return timeMatch[1];
|
|
2684
|
-
}
|
|
2685
|
-
return "";
|
|
2686
|
-
}
|
|
2687
|
-
return value;
|
|
2688
|
-
}
|
|
2689
2853
|
class DeviceLinkTmplUtil {
|
|
2854
|
+
static DEFAULT_RECOMMENDED_PROMPT = "任务:图片OCR文字提取\n规则:不虚构内容,找不到数据返回空,仅输出提取结果\n结果填充至${目标字段}\n填写提取规则:";
|
|
2690
2855
|
/**
|
|
2691
2856
|
* 创建模板数据
|
|
2692
2857
|
* @param type
|
|
@@ -2699,8 +2864,19 @@ class DeviceLinkTmplUtil {
|
|
|
2699
2864
|
};
|
|
2700
2865
|
if (type === DeviceLink.TmplTypeEnum.AI_OCR) {
|
|
2701
2866
|
Object.assign(tmpl, {
|
|
2867
|
+
name: "",
|
|
2868
|
+
deviceName: "",
|
|
2869
|
+
modelPrecision: void 0,
|
|
2870
|
+
enableAdvancedConfig: false,
|
|
2871
|
+
promptMode: "RECOMMENDED",
|
|
2872
|
+
recommendedPrompt: this.DEFAULT_RECOMMENDED_PROMPT,
|
|
2873
|
+
enableDenoise: false,
|
|
2874
|
+
enableContrast: false,
|
|
2875
|
+
enableBinarize: false,
|
|
2876
|
+
extraPrompt: "",
|
|
2702
2877
|
identifyParams: [
|
|
2703
2878
|
{
|
|
2879
|
+
id: uuid2(16),
|
|
2704
2880
|
prompt: void 0,
|
|
2705
2881
|
formField: void 0
|
|
2706
2882
|
}
|
|
@@ -2711,6 +2887,30 @@ class DeviceLinkTmplUtil {
|
|
|
2711
2887
|
}
|
|
2712
2888
|
return tmpl;
|
|
2713
2889
|
}
|
|
2890
|
+
/**
|
|
2891
|
+
* 补齐 OCR 模板新增字段,并保持历史配置的原有行为。
|
|
2892
|
+
* 历史模板没有提示词模式时按原来的普通模式处理。
|
|
2893
|
+
*/
|
|
2894
|
+
static normalizeAIOcrTmpl(tmpl) {
|
|
2895
|
+
const hasAdvancedConfig = !!tmpl.enableDenoise || !!tmpl.enableContrast || !!tmpl.enableBinarize;
|
|
2896
|
+
const identifyParams = tmpl.identifyParams?.length ? tmpl.identifyParams : [{ prompt: void 0, formField: void 0 }];
|
|
2897
|
+
return {
|
|
2898
|
+
...tmpl,
|
|
2899
|
+
name: tmpl.name ?? "",
|
|
2900
|
+
deviceName: tmpl.deviceName ?? "",
|
|
2901
|
+
enableAdvancedConfig: tmpl.enableAdvancedConfig ?? hasAdvancedConfig,
|
|
2902
|
+
promptMode: tmpl.promptMode ?? "NORMAL",
|
|
2903
|
+
recommendedPrompt: tmpl.recommendedPrompt ?? this.DEFAULT_RECOMMENDED_PROMPT,
|
|
2904
|
+
enableDenoise: tmpl.enableDenoise ?? false,
|
|
2905
|
+
enableContrast: tmpl.enableContrast ?? false,
|
|
2906
|
+
enableBinarize: tmpl.enableBinarize ?? false,
|
|
2907
|
+
extraPrompt: tmpl.extraPrompt ?? "",
|
|
2908
|
+
identifyParams: identifyParams.map((item) => ({
|
|
2909
|
+
...item,
|
|
2910
|
+
id: item.id || uuid2(16)
|
|
2911
|
+
}))
|
|
2912
|
+
};
|
|
2913
|
+
}
|
|
2714
2914
|
/**
|
|
2715
2915
|
* 计算完整的提示词
|
|
2716
2916
|
* @static
|
|
@@ -2718,13 +2918,20 @@ class DeviceLinkTmplUtil {
|
|
|
2718
2918
|
* @return {*}
|
|
2719
2919
|
*/
|
|
2720
2920
|
static calcEntirePrompt(tmpl) {
|
|
2721
|
-
|
|
2722
|
-
return
|
|
2723
|
-
}
|
|
2724
|
-
const
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2921
|
+
if (tmpl.promptMode === "RECOMMENDED") {
|
|
2922
|
+
return tmpl.recommendedPrompt ?? this.DEFAULT_RECOMMENDED_PROMPT;
|
|
2923
|
+
}
|
|
2924
|
+
const validParams = (tmpl.identifyParams || []).map((item) => ({
|
|
2925
|
+
prompt: item.prompt?.trim(),
|
|
2926
|
+
fieldKey: item.formField?.split(".").at(-1)
|
|
2927
|
+
})).filter(
|
|
2928
|
+
(item) => Boolean(item.prompt && item.fieldKey)
|
|
2929
|
+
);
|
|
2930
|
+
const paramsStr = validParams.map((item) => `图中${item.prompt}绑定${item.fieldKey}字段`).join(",");
|
|
2931
|
+
const jsonObj = validParams.reduce((acc, item) => {
|
|
2932
|
+
if (!Object.prototype.hasOwnProperty.call(acc, item.fieldKey)) {
|
|
2933
|
+
acc[item.fieldKey] = { value: null };
|
|
2934
|
+
}
|
|
2728
2935
|
return acc;
|
|
2729
2936
|
}, {});
|
|
2730
2937
|
const result = `这是一台${tmpl.deviceName ?? ""}设备/仪器图片,${paramsStr},请识别图片中的读数,以
|
|
@@ -2878,6 +3085,7 @@ class DeviceConnector {
|
|
|
2878
3085
|
}
|
|
2879
3086
|
}
|
|
2880
3087
|
}
|
|
3088
|
+
const OCR_MODEL_PRECISION_ENUM_KEY = "enu_model_precision";
|
|
2881
3089
|
class FormTmplConfigController {
|
|
2882
3090
|
/** 为了方便挂载到 word 中去 */
|
|
2883
3091
|
TmplUtil = DeviceLinkTmplUtil;
|
|
@@ -2891,7 +3099,8 @@ class FormTmplConfigController {
|
|
|
2891
3099
|
tmpls: [],
|
|
2892
3100
|
runningTmpls: [],
|
|
2893
3101
|
IOTPermission: false,
|
|
2894
|
-
OCRPermission: false
|
|
3102
|
+
OCRPermission: false,
|
|
3103
|
+
OCRModelPrecisionOptions: []
|
|
2895
3104
|
});
|
|
2896
3105
|
/** 表单模板id */
|
|
2897
3106
|
tmplId = "";
|
|
@@ -2904,6 +3113,22 @@ class FormTmplConfigController {
|
|
|
2904
3113
|
this.state.IOTPermission = await api.platform.license.getModuleAuth({ module: "IOT" }) || false;
|
|
2905
3114
|
this.state.OCRPermission = await api.apaas.onlineFormTmpl.getIsOcrGranted() || false;
|
|
2906
3115
|
}
|
|
3116
|
+
/**
|
|
3117
|
+
* 从枚举模型加载 OCR 模型精度,避免前端硬编码枚举值。
|
|
3118
|
+
*/
|
|
3119
|
+
async refreshOcrModelPrecisionOptions() {
|
|
3120
|
+
try {
|
|
3121
|
+
const result = await api.apaas.designerCommon.getEnumModelFieldList({
|
|
3122
|
+
enumModelKey: OCR_MODEL_PRECISION_ENUM_KEY,
|
|
3123
|
+
pageNo: 1,
|
|
3124
|
+
pageSize: 100
|
|
3125
|
+
});
|
|
3126
|
+
this.state.OCRModelPrecisionOptions = (result?.records || []).filter((item) => item.text && item.value).map((item) => ({ label: item.text, value: item.value }));
|
|
3127
|
+
} catch {
|
|
3128
|
+
this.state.OCRModelPrecisionOptions = [];
|
|
3129
|
+
}
|
|
3130
|
+
return this.state.OCRModelPrecisionOptions;
|
|
3131
|
+
}
|
|
2907
3132
|
/**
|
|
2908
3133
|
* 初始化
|
|
2909
3134
|
*
|
|
@@ -2925,7 +3150,12 @@ class FormTmplConfigController {
|
|
|
2925
3150
|
setConfigStr(configStr) {
|
|
2926
3151
|
console.log("配置信息", configStr);
|
|
2927
3152
|
const config = configStr ? JSON.parse(configStr) : {};
|
|
2928
|
-
this.state.tmpls = config.tmpls || []
|
|
3153
|
+
this.state.tmpls = (config.tmpls || []).map((tmpl) => {
|
|
3154
|
+
if (tmpl.type === DeviceLink.TmplTypeEnum.AI_OCR) {
|
|
3155
|
+
return this.TmplUtil.normalizeAIOcrTmpl(tmpl);
|
|
3156
|
+
}
|
|
3157
|
+
return tmpl;
|
|
3158
|
+
});
|
|
2929
3159
|
}
|
|
2930
3160
|
getConfigStr() {
|
|
2931
3161
|
const cloneTmpls = cloneDeep(this.state.tmpls);
|
|
@@ -3007,12 +3237,12 @@ function useFormTmplConfig() {
|
|
|
3007
3237
|
injectController
|
|
3008
3238
|
};
|
|
3009
3239
|
}
|
|
3010
|
-
const _hoisted_1$
|
|
3240
|
+
const _hoisted_1$5 = ["data-merge", "data-fill-direction"];
|
|
3011
3241
|
const _hoisted_2$1 = {
|
|
3012
3242
|
key: 0,
|
|
3013
3243
|
class: "absolute z-9 top-1/2 right-0 w-0 h-0 -translate-y-4"
|
|
3014
3244
|
};
|
|
3015
|
-
const _sfc_main$
|
|
3245
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
3016
3246
|
__name: "border-td",
|
|
3017
3247
|
props: {
|
|
3018
3248
|
border: {},
|
|
@@ -3078,24 +3308,24 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
3078
3308
|
_ctx.$slots.tableAction ? (openBlock(), createElementBlock("div", _hoisted_2$1, [
|
|
3079
3309
|
renderSlot(_ctx.$slots, "tableAction", {}, void 0, true)
|
|
3080
3310
|
])) : createCommentVNode("", true)
|
|
3081
|
-
], 16, _hoisted_1$
|
|
3311
|
+
], 16, _hoisted_1$5);
|
|
3082
3312
|
};
|
|
3083
3313
|
}
|
|
3084
3314
|
});
|
|
3085
|
-
const BorderTD = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3086
|
-
const _sfc_main$
|
|
3087
|
-
const _hoisted_1$
|
|
3315
|
+
const BorderTD = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-5f774f44"]]);
|
|
3316
|
+
const _sfc_main$6 = {};
|
|
3317
|
+
const _hoisted_1$4 = { class: "nocode-loading" };
|
|
3088
3318
|
function _sfc_render(_ctx, _cache) {
|
|
3089
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3319
|
+
return openBlock(), createElementBlock("div", _hoisted_1$4, [..._cache[0] || (_cache[0] = [
|
|
3090
3320
|
createElementVNode("div", { class: "nocode-shape shape-1" }, null, -1),
|
|
3091
3321
|
createElementVNode("div", { class: "nocode-shape shape-2" }, null, -1),
|
|
3092
3322
|
createElementVNode("div", { class: "nocode-shape shape-3" }, null, -1),
|
|
3093
3323
|
createElementVNode("div", { class: "nocode-shape shape-4" }, null, -1)
|
|
3094
3324
|
])]);
|
|
3095
3325
|
}
|
|
3096
|
-
const DocumentLoading = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3326
|
+
const DocumentLoading = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render], ["__scopeId", "data-v-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+1/HmO8bQ6iPRMEmMtP5/h+md5dnhOw3Om38/z/JYHolX3u+q+PoPmOJXB4vMWEKITfJFXQZ9VoF6UlhnteWjIzK8C5nxWGj7LpwncULBWCdyz3NerEA7QF0pATuqv9TrQszLts2i8LxLjnyYtt+V52u+T6FUJB+gLIyCr6HUVlldFiVHSc3oOZ/V5z+NWHfvzej9PuM9Tv/8vtIAkOsuCcpJWfVnCcJr0Mt7bqxQO0GshIJ+Vhmbb8HO4/oT94knHW97uScuWz/m8DPMShOBJgbRXQi8qNGdNQNYm1BI9o7k0XOdOWP6yyZ1wzs/0Tk/SkqsGoBW7v7T7XgvI60evqwP/xHc9FIRlIXiGQeOVPJPPi1kd9ed2J/w9ad1Z+vuy0Mr7YwHwz7OcXsFzcSt+fxFGqJPU9/L6p1F8yrbxGc71Iuc/TfqyQb+n9Qxf6nNZbhz3uo9Sn6eAfxZBO+k4X8o4yAr6wvPbl0ltr+nLQ89jIbxUWgvImr6otMybZ0WrrmlNa1rTmta0pjWtaU1rWtOa1rSmVfT/A4TsCVEFS2lVAAAAAElFTkSuQmCC";
|
|
3098
|
-
const _hoisted_1$
|
|
3328
|
+
const _hoisted_1$3 = { class: "nocode-document-layout-wrapper" };
|
|
3099
3329
|
const _hoisted_2 = {
|
|
3100
3330
|
key: 0,
|
|
3101
3331
|
class: "nocode-common-loading-warp"
|
|
@@ -3109,7 +3339,7 @@ const _hoisted_4 = {
|
|
|
3109
3339
|
class: "nocode-common-loading-warp"
|
|
3110
3340
|
};
|
|
3111
3341
|
const _hoisted_5 = { class: "w200px text-center color-[#666]" };
|
|
3112
|
-
const _sfc_main$
|
|
3342
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
3113
3343
|
__name: "document-layout",
|
|
3114
3344
|
props: {
|
|
3115
3345
|
loading: { type: Boolean },
|
|
@@ -3117,7 +3347,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3117
3347
|
},
|
|
3118
3348
|
setup(__props) {
|
|
3119
3349
|
return (_ctx, _cache) => {
|
|
3120
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3350
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
3121
3351
|
__props.loading ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
3122
3352
|
createVNode(DocumentLoading)
|
|
3123
3353
|
])) : __props.hasData ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
@@ -3708,53 +3938,6 @@ var MaterialConsumeActionType = /* @__PURE__ */ ((MaterialConsumeActionType2) =>
|
|
|
3708
3938
|
MaterialConsumeActionType2["CHANGE_PARSE_RULE"] = "CHANGE_PARSE_RULE";
|
|
3709
3939
|
return MaterialConsumeActionType2;
|
|
3710
3940
|
})(MaterialConsumeActionType || {});
|
|
3711
|
-
const _hoisted_1$3 = {
|
|
3712
|
-
key: 0,
|
|
3713
|
-
class: "material-consume-action-bar"
|
|
3714
|
-
};
|
|
3715
|
-
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
3716
|
-
__name: "material-consume-action",
|
|
3717
|
-
props: {
|
|
3718
|
-
showBom: { type: Boolean, default: false },
|
|
3719
|
-
showScanBtn: { type: Boolean, default: false },
|
|
3720
|
-
showConfirmBtn: { type: Boolean, default: true },
|
|
3721
|
-
rowData: {}
|
|
3722
|
-
},
|
|
3723
|
-
emits: ["doAction"],
|
|
3724
|
-
setup(__props, { emit: __emit }) {
|
|
3725
|
-
const props = __props;
|
|
3726
|
-
const emit = __emit;
|
|
3727
|
-
const isEditing = computed(() => {
|
|
3728
|
-
return !props.rowData.is_confirmed_;
|
|
3729
|
-
});
|
|
3730
|
-
const AllMenus = Object.values(MaterialConsumeActionType).map((e) => ({
|
|
3731
|
-
key: e,
|
|
3732
|
-
label: $t(`sys.edhr.materialConsumeAction.${e}`)
|
|
3733
|
-
}));
|
|
3734
|
-
computed(() => {
|
|
3735
|
-
return AllMenus.filter((e) => {
|
|
3736
|
-
if (e.key === MaterialConsumeActionType.CONFIRM) {
|
|
3737
|
-
return false;
|
|
3738
|
-
}
|
|
3739
|
-
return true;
|
|
3740
|
-
});
|
|
3741
|
-
});
|
|
3742
|
-
const handleConfirm = () => {
|
|
3743
|
-
emit("doAction", MaterialConsumeActionType.CONFIRM, props.rowData);
|
|
3744
|
-
};
|
|
3745
|
-
return (_ctx, _cache) => {
|
|
3746
|
-
return __props.showConfirmBtn && isEditing.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
3747
|
-
createElementVNode("div", {
|
|
3748
|
-
class: "sub-table-btn btn-confirm",
|
|
3749
|
-
onClick: handleConfirm
|
|
3750
|
-
}, [..._cache[0] || (_cache[0] = [
|
|
3751
|
-
createElementVNode("i", { class: "iconfont icon-tijiao1" }, null, -1)
|
|
3752
|
-
])])
|
|
3753
|
-
])) : createCommentVNode("", true);
|
|
3754
|
-
};
|
|
3755
|
-
}
|
|
3756
|
-
});
|
|
3757
|
-
const MaterialConsumeAction = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-18b5f02d"]]);
|
|
3758
3941
|
const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
3759
3942
|
name: "NocodeMaterialConsumeTable",
|
|
3760
3943
|
props: {
|
|
@@ -3808,6 +3991,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
3808
3991
|
const {
|
|
3809
3992
|
currentPageFormState
|
|
3810
3993
|
} = useCurrentPageFormState();
|
|
3994
|
+
const selfInfoList = inject(NCB_PROVIDE.FORM_INST_LIST, []);
|
|
3811
3995
|
provide(NCB_PROVIDE.MATERIAL_CONSUME_TABLE_CONTROLLER, tableController);
|
|
3812
3996
|
const {
|
|
3813
3997
|
field = "",
|
|
@@ -3828,12 +4012,21 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
3828
4012
|
updateCalcCallback?.(dataRelationShip?.uniqueId);
|
|
3829
4013
|
}
|
|
3830
4014
|
});
|
|
4015
|
+
const currentSelfInfo = selfInfoList?.find((item) => item?.id === dataRelationShip?.key || item?.uniqueId === dataRelationShip?.uniqueId) ?? selfInfoList?.[0];
|
|
4016
|
+
const currentFieldDefaultData = computed(() => {
|
|
4017
|
+
return defaultDataMap?.[dataRelationShip?.uniqueId ?? ""] ?? {};
|
|
4018
|
+
});
|
|
3831
4019
|
tableController.setup({
|
|
3832
4020
|
tableDataRef: modelValue,
|
|
3833
4021
|
widget: props.widget,
|
|
3834
4022
|
formModelController,
|
|
3835
4023
|
unitConversionRules,
|
|
3836
|
-
mainFormState: currentPageFormState
|
|
4024
|
+
mainFormState: currentPageFormState,
|
|
4025
|
+
dataStatus: currentSelfInfo?.dataStatus,
|
|
4026
|
+
defaultRowData: renderUtils.getDefaultValueInfo({
|
|
4027
|
+
defaultDataMap: currentFieldDefaultData.value,
|
|
4028
|
+
key: field
|
|
4029
|
+
})
|
|
3837
4030
|
});
|
|
3838
4031
|
const dataInfo = computed(() => {
|
|
3839
4032
|
const visibleToRealIndexMap = {};
|
|
@@ -3852,8 +4045,9 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
3852
4045
|
visibleToRealIndexMap
|
|
3853
4046
|
};
|
|
3854
4047
|
});
|
|
3855
|
-
const
|
|
3856
|
-
|
|
4048
|
+
const groupRowSpans = computed(() => {
|
|
4049
|
+
if (dynamicIds.length !== 1) return [];
|
|
4050
|
+
return calcGroupRowSpans(dataInfo.value.tableData, tableController.bomEntriesValidator);
|
|
3857
4051
|
});
|
|
3858
4052
|
const isFormChange = computed(() => {
|
|
3859
4053
|
return dataRelationShip?.formChangeStatus;
|
|
@@ -3864,66 +4058,103 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
3864
4058
|
}
|
|
3865
4059
|
return showDisplayStatus.value === "edit-component";
|
|
3866
4060
|
});
|
|
4061
|
+
const markRowDeleted = (row) => {
|
|
4062
|
+
if (row.id_ || row.group_ && row._2DTABLE_?.some((item) => item.id_)) {
|
|
4063
|
+
row.deleted_ = true;
|
|
4064
|
+
} else {
|
|
4065
|
+
row.tempDeleted = true;
|
|
4066
|
+
}
|
|
4067
|
+
};
|
|
4068
|
+
const deleteRowAt = (row, index) => {
|
|
4069
|
+
recordSubtableRowDelete(dataRelationShip, field, row);
|
|
4070
|
+
deleteSubtableRow(field, index);
|
|
4071
|
+
markRowDeleted(row);
|
|
4072
|
+
};
|
|
3867
4073
|
const handleDeleteRow = (rowData, dataIdx) => {
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
4074
|
+
const groupId = rowData.is_confirmed_ ? rowData.bom_entry_id_ : void 0;
|
|
4075
|
+
if (groupId) {
|
|
4076
|
+
for (let index = modelValue.value.length - 1; index >= 0; index--) {
|
|
4077
|
+
const row = modelValue.value[index];
|
|
4078
|
+
if (row.deleted_ || row.bom_entry_id_ !== groupId) continue;
|
|
4079
|
+
deleteRowAt(row, index);
|
|
4080
|
+
}
|
|
3873
4081
|
} else {
|
|
3874
|
-
|
|
3875
|
-
|
|
4082
|
+
const visibleIndex = props.start + dataIdx;
|
|
4083
|
+
const realIndex = dataInfo.value.visibleToRealIndexMap[visibleIndex] ?? visibleIndex;
|
|
4084
|
+
deleteRowAt(rowData, realIndex);
|
|
3876
4085
|
}
|
|
3877
|
-
modelValue.value =
|
|
4086
|
+
modelValue.value = relocateDeletedRowsToEnd(modelValue.value.filter((d) => !d.tempDeleted));
|
|
3878
4087
|
};
|
|
3879
|
-
const
|
|
4088
|
+
const createDefaultRows = (rowNum, quickFillDatas, patch) => {
|
|
4089
|
+
return Array.from({
|
|
4090
|
+
length: rowNum
|
|
4091
|
+
}, (_, i) => {
|
|
4092
|
+
const row = transformUtils.addSubTableRowItem({
|
|
4093
|
+
defaultData: currentFieldDefaultData.value,
|
|
4094
|
+
quickFillData: quickFillDatas?.[i],
|
|
4095
|
+
subFieldId: field,
|
|
4096
|
+
isRowSubTable2d,
|
|
4097
|
+
childInitRowLen
|
|
4098
|
+
});
|
|
4099
|
+
row.is_confirmed_ = false;
|
|
4100
|
+
patch?.(row);
|
|
4101
|
+
return row;
|
|
4102
|
+
});
|
|
4103
|
+
};
|
|
4104
|
+
const insertRowsAt = (insertIndex, rows) => {
|
|
4105
|
+
if (!rows.length) return;
|
|
4106
|
+
insertSubtableRows(field, insertIndex, rows.length);
|
|
4107
|
+
modelValue.value.splice(insertIndex, 0, ...rows);
|
|
4108
|
+
modelValue.value = relocateDeletedRowsToEnd(modelValue.value);
|
|
4109
|
+
recordSubtableRowAdd(dataRelationShip, field, rows);
|
|
4110
|
+
updateCalcCallback?.(dataRelationShip?.uniqueId);
|
|
4111
|
+
};
|
|
4112
|
+
const resolveRealIndex = (index) => dataInfo.value.visibleToRealIndexMap[props.start + index];
|
|
4113
|
+
const handleAddRowForGroup = ({
|
|
3880
4114
|
index,
|
|
3881
|
-
position = "after",
|
|
3882
|
-
rowNum = 1,
|
|
3883
|
-
actionType,
|
|
3884
4115
|
rowData,
|
|
4116
|
+
rowNum = 1,
|
|
3885
4117
|
quickFillDatas
|
|
3886
4118
|
}) => {
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
}
|
|
3890
|
-
const newRowsData = actionType === "copyRow" ? [cloneDeep(omit(rowData, ["id_", FRONT_ROW_KEY]))] : Array.from({
|
|
3891
|
-
length: rowNum
|
|
3892
|
-
}, (_, index2) => transformUtils.addSubTableRowItem({
|
|
3893
|
-
defaultData: currentFieldDefaultData.value,
|
|
3894
|
-
quickFillData: quickFillDatas?.[index2],
|
|
3895
|
-
subFieldId: field,
|
|
3896
|
-
isRowSubTable2d,
|
|
3897
|
-
childInitRowLen
|
|
4119
|
+
insertRowsAt(resolveRealIndex(index) + 1, createDefaultRows(rowNum, quickFillDatas, (r) => {
|
|
4120
|
+
if (rowData.bom_entry_id_) r.bom_entry_id_ = rowData.bom_entry_id_;
|
|
3898
4121
|
}));
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
4122
|
+
};
|
|
4123
|
+
const handleAddGroup = async ({
|
|
4124
|
+
index,
|
|
4125
|
+
rowData,
|
|
4126
|
+
quickFillDatas
|
|
4127
|
+
}) => {
|
|
4128
|
+
const {
|
|
4129
|
+
bomEntriesValidator,
|
|
4130
|
+
enableSequenceLoading,
|
|
4131
|
+
actualTableData,
|
|
4132
|
+
error
|
|
4133
|
+
} = tableController;
|
|
4134
|
+
if (enableSequenceLoading) {
|
|
4135
|
+
const editing = bomEntriesValidator.findSequenceBomEntry(actualTableData);
|
|
4136
|
+
if (editing) {
|
|
4137
|
+
try {
|
|
4138
|
+
await bomEntriesValidator.validateCurrentGroupForSwitch(actualTableData, editing);
|
|
4139
|
+
setGroupEditState(actualTableData, editing, false);
|
|
4140
|
+
} catch (e) {
|
|
4141
|
+
if (e?.message) error(e.message);
|
|
4142
|
+
return;
|
|
4143
|
+
}
|
|
4144
|
+
}
|
|
3919
4145
|
}
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
4146
|
+
const entryIdx = bomEntriesValidator.resolveEntryIndex(rowData);
|
|
4147
|
+
const util = entryIdx >= 0 ? bomEntriesValidator.bomEntryValidators[entryIdx] : void 0;
|
|
4148
|
+
let groupLast = -1;
|
|
4149
|
+
if (util) {
|
|
4150
|
+
modelValue.value.forEach((r, i) => {
|
|
4151
|
+
if (isRowInBomGroup(r, util)) {
|
|
4152
|
+
groupLast = i;
|
|
4153
|
+
}
|
|
4154
|
+
});
|
|
3925
4155
|
}
|
|
3926
|
-
|
|
4156
|
+
if (groupLast < 0) groupLast = resolveRealIndex(index);
|
|
4157
|
+
insertRowsAt(groupLast + 1, createDefaultRows(1, quickFillDatas));
|
|
3927
4158
|
};
|
|
3928
4159
|
const handleAction = (action, rowData) => {
|
|
3929
4160
|
switch (action) {
|
|
@@ -3943,7 +4174,13 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
3943
4174
|
break;
|
|
3944
4175
|
}
|
|
3945
4176
|
};
|
|
3946
|
-
const getNewTdInfo = (tdInfo, rowData) => {
|
|
4177
|
+
const getNewTdInfo = (tdInfo, rowData, rowIndex) => {
|
|
4178
|
+
if (!tdInfo.cellHidden && tdInfo.cellWidget?.props?.type === "serialnumber") {
|
|
4179
|
+
const cloneData2 = cloneDeep(tdInfo);
|
|
4180
|
+
cloneData2.cellWidget.props.groupSerialnumber = true;
|
|
4181
|
+
cloneData2.cellWidget.props.groupOrderIndex = tableController.bomEntriesValidator.resolveGroupOrderIndex(rowData, tableController.actualTableData);
|
|
4182
|
+
return cloneData2;
|
|
4183
|
+
}
|
|
3947
4184
|
if (tdInfo.cellHidden || !tdInfo?.cellWidget?.props?.field) {
|
|
3948
4185
|
return tdInfo;
|
|
3949
4186
|
}
|
|
@@ -3955,11 +4192,20 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
3955
4192
|
if (tdInfo.cellWidget.props.field === "material_no_") {
|
|
3956
4193
|
cloneData.cellWidget.props.newSpecificConfig.newOptions = [];
|
|
3957
4194
|
merge(cloneData.cellWidget.props.newSpecificConfig, {
|
|
3958
|
-
newQueryData:
|
|
3959
|
-
"product_id_.versionIn": rowData.product_id_ ? [rowData.product_id_.split(":").pop()] : null
|
|
3960
|
-
}
|
|
4195
|
+
newQueryData: tableController.getMaterialNoQueryForRow(rowData, rowIndex)
|
|
3961
4196
|
});
|
|
3962
4197
|
}
|
|
4198
|
+
if (fieldKey === "product_id_") {
|
|
4199
|
+
cloneData.cellWidget.props.needWatchOpen = true;
|
|
4200
|
+
const rowQuery = tableController.getProductQueryForRow(rowData, rowIndex);
|
|
4201
|
+
if (rowQuery) {
|
|
4202
|
+
cloneData.cellWidget.props.newSpecificConfig.newOptions = [];
|
|
4203
|
+
cloneData.cellWidget.props.newSpecificConfig.newQueryData = {
|
|
4204
|
+
...cloneData.cellWidget.props.newSpecificConfig?.newQueryData ?? {},
|
|
4205
|
+
...rowQuery
|
|
4206
|
+
};
|
|
4207
|
+
}
|
|
4208
|
+
}
|
|
3963
4209
|
if (fieldKey === "qty_uom_id_" || fieldKey === "qty_required_uom_id_") {
|
|
3964
4210
|
cloneData.cellWidget.props.quickSearchField = ["name_.like", "code_.like"];
|
|
3965
4211
|
cloneData.cellWidget.props.quickSearchExp = "OR(name_.like,code_.like)";
|
|
@@ -3979,70 +4225,89 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
3979
4225
|
}
|
|
3980
4226
|
return cloneData;
|
|
3981
4227
|
};
|
|
3982
|
-
const handleMenuClick = (rowData, dataIdx) => ({
|
|
4228
|
+
const handleMenuClick = (rowData, dataIdx) => async ({
|
|
3983
4229
|
key,
|
|
3984
4230
|
actionValue
|
|
3985
4231
|
}) => {
|
|
3986
4232
|
switch (key) {
|
|
3987
4233
|
case "rowEdit":
|
|
3988
|
-
tableController.editRow(rowData);
|
|
3989
|
-
break;
|
|
3990
|
-
case "insertRowBefore":
|
|
3991
|
-
handleAddRow({
|
|
3992
|
-
index: dataIdx,
|
|
3993
|
-
position: "before",
|
|
3994
|
-
rowNum: actionValue?.upRowNum || 1,
|
|
3995
|
-
quickFillDatas: actionValue?.data,
|
|
3996
|
-
actionType: "prevRow",
|
|
3997
|
-
rowData
|
|
3998
|
-
});
|
|
4234
|
+
await tableController.editRow(rowData);
|
|
3999
4235
|
break;
|
|
4236
|
+
// case 'insertRowBefore':
|
|
4237
|
+
// handleAddRow({
|
|
4238
|
+
// index: dataIdx,
|
|
4239
|
+
// position: 'before',
|
|
4240
|
+
// rowNum: actionValue?.upRowNum || 1,
|
|
4241
|
+
// quickFillDatas: actionValue?.data,
|
|
4242
|
+
// actionType: 'prevRow',
|
|
4243
|
+
// rowData,
|
|
4244
|
+
// });
|
|
4245
|
+
// break;
|
|
4000
4246
|
case "insert1RowAfter":
|
|
4001
4247
|
case "insertRowAfter":
|
|
4002
|
-
|
|
4003
|
-
index: dataIdx,
|
|
4004
|
-
position: "after",
|
|
4005
|
-
rowNum: actionValue?.downRowNum || 1,
|
|
4006
|
-
quickFillDatas: actionValue?.data,
|
|
4007
|
-
actionType: "nextRow",
|
|
4008
|
-
rowData
|
|
4009
|
-
});
|
|
4010
|
-
break;
|
|
4011
|
-
case "insertRowCurrent":
|
|
4012
|
-
handleAddRow({
|
|
4013
|
-
index: dataIdx,
|
|
4014
|
-
position: "after",
|
|
4015
|
-
rowNum: actionValue?.downRowNum || 1,
|
|
4016
|
-
quickFillDatas: actionValue?.data,
|
|
4017
|
-
actionType: "currentRow",
|
|
4018
|
-
rowData
|
|
4019
|
-
});
|
|
4020
|
-
break;
|
|
4021
|
-
case "copyRowAfter":
|
|
4022
|
-
handleAddRow({
|
|
4248
|
+
handleAddRowForGroup({
|
|
4023
4249
|
index: dataIdx,
|
|
4024
|
-
position: "after",
|
|
4025
4250
|
rowNum: actionValue?.downRowNum || 1,
|
|
4026
4251
|
quickFillDatas: actionValue?.data,
|
|
4027
|
-
actionType: "copyRow",
|
|
4028
4252
|
rowData
|
|
4029
4253
|
});
|
|
4030
|
-
tableController.updateRowConsumed();
|
|
4031
4254
|
break;
|
|
4032
|
-
case "
|
|
4033
|
-
|
|
4255
|
+
case "insert1GroupAfter":
|
|
4256
|
+
handleAddGroup({
|
|
4034
4257
|
index: dataIdx,
|
|
4035
|
-
position: "last",
|
|
4036
4258
|
rowNum: actionValue?.downRowNum || 1,
|
|
4037
4259
|
quickFillDatas: actionValue?.data,
|
|
4038
|
-
actionType: "copyRow",
|
|
4039
4260
|
rowData
|
|
4040
4261
|
});
|
|
4041
|
-
tableController.updateRowConsumed();
|
|
4042
4262
|
break;
|
|
4263
|
+
// case 'insertRowCurrent':
|
|
4264
|
+
// handleAddRow({
|
|
4265
|
+
// index: dataIdx,
|
|
4266
|
+
// position: 'after',
|
|
4267
|
+
// rowNum: actionValue?.downRowNum || 1,
|
|
4268
|
+
// quickFillDatas: actionValue?.data,
|
|
4269
|
+
// actionType: 'currentRow',
|
|
4270
|
+
// rowData,
|
|
4271
|
+
// });
|
|
4272
|
+
// break;
|
|
4273
|
+
// case 'copyRowAfter':
|
|
4274
|
+
// handleAddRow({
|
|
4275
|
+
// index: dataIdx,
|
|
4276
|
+
// position: 'after',
|
|
4277
|
+
// rowNum: actionValue?.downRowNum || 1,
|
|
4278
|
+
// quickFillDatas: actionValue?.data,
|
|
4279
|
+
// actionType: 'copyRow',
|
|
4280
|
+
// rowData,
|
|
4281
|
+
// });
|
|
4282
|
+
// // 更新计算已消耗数量
|
|
4283
|
+
// tableController.updateRowConsumed();
|
|
4284
|
+
// break;
|
|
4285
|
+
// case 'copyRow2Last':
|
|
4286
|
+
// handleAddRow({
|
|
4287
|
+
// index: dataIdx,
|
|
4288
|
+
// position: 'last',
|
|
4289
|
+
// rowNum: actionValue?.downRowNum || 1,
|
|
4290
|
+
// quickFillDatas: actionValue?.data,
|
|
4291
|
+
// actionType: 'copyRow',
|
|
4292
|
+
// rowData,
|
|
4293
|
+
// });
|
|
4294
|
+
// // 更新计算已消耗数量
|
|
4295
|
+
// tableController.updateRowConsumed();
|
|
4296
|
+
// break;
|
|
4043
4297
|
case "deleteRowCurrent":
|
|
4044
|
-
|
|
4045
|
-
|
|
4298
|
+
Modal.confirm({
|
|
4299
|
+
width: 316,
|
|
4300
|
+
centered: true,
|
|
4301
|
+
class: "confirm-before-delete-modal",
|
|
4302
|
+
icon: h("i", {
|
|
4303
|
+
class: "iconfont icon-jinggao"
|
|
4304
|
+
}),
|
|
4305
|
+
content: "是否确认删除?",
|
|
4306
|
+
onOk() {
|
|
4307
|
+
handleDeleteRow(rowData, dataIdx);
|
|
4308
|
+
tableController.updateDerivedQtyFields();
|
|
4309
|
+
}
|
|
4310
|
+
});
|
|
4046
4311
|
break;
|
|
4047
4312
|
default:
|
|
4048
4313
|
handleAction(key, rowData);
|
|
@@ -4054,39 +4319,66 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4054
4319
|
showScanBtn,
|
|
4055
4320
|
showEditBtn,
|
|
4056
4321
|
dataIdx,
|
|
4057
|
-
dynHeight
|
|
4322
|
+
dynHeight,
|
|
4323
|
+
showInsert1RowBtn
|
|
4058
4324
|
}) => {
|
|
4059
|
-
const menus = [
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4325
|
+
const menus = [
|
|
4326
|
+
{
|
|
4327
|
+
type: SubTableActionMenuTypeEnum.SUBTITLE,
|
|
4328
|
+
label: "业务操作"
|
|
4329
|
+
},
|
|
4330
|
+
showScanBtn ? getMenuByAction(SubTableActionEnum.SCAN) : void 0,
|
|
4331
|
+
// tableController.actualBomEntries?.length
|
|
4332
|
+
// ? getMenuByAction(SubTableActionEnum.VIEW_BOM)
|
|
4333
|
+
// : undefined,
|
|
4334
|
+
// getMenuByAction(SubTableActionEnum.CHANGE_PARSE_RULE),
|
|
4335
|
+
{
|
|
4336
|
+
type: SubTableActionMenuTypeEnum.DIVIDER
|
|
4337
|
+
},
|
|
4338
|
+
{
|
|
4339
|
+
type: SubTableActionMenuTypeEnum.SUBTITLE,
|
|
4340
|
+
label: "行编辑"
|
|
4341
|
+
},
|
|
4342
|
+
showEditBtn ? getMenuByAction(SubTableActionEnum.RowEdit) : void 0,
|
|
4343
|
+
showInsert1RowBtn ? getMenuByAction(SubTableActionEnum.Insert1RowAfter) : void 0,
|
|
4344
|
+
getMenuByAction(SubTableActionEnum.Insert1GroupAfter),
|
|
4345
|
+
// getCopySubMenu(),
|
|
4346
|
+
...showDelBtn ? [{
|
|
4347
|
+
type: SubTableActionMenuTypeEnum.DIVIDER
|
|
4348
|
+
}, getMenuByAction(SubTableActionEnum.DeleteRowCurrent)] : []
|
|
4349
|
+
].filter(Boolean);
|
|
4350
|
+
const realRowIndex = dataIdx !== -1 ? resolveRealIndex(dataIdx) : void 0;
|
|
4070
4351
|
return createVNode("tr", {
|
|
4071
4352
|
"key": trKey,
|
|
4072
4353
|
"height": dynHeight || trData.props.height
|
|
4073
4354
|
}, [trData.nextIds.map((tdId) => {
|
|
4074
|
-
const
|
|
4355
|
+
const rawTdInfo = props.widgetCenter[tdId];
|
|
4356
|
+
if (dataIdx !== -1 && groupRowSpans.value.length && isGroupMergeCell(rawTdInfo) && groupRowSpans.value[dataIdx] === 0) {
|
|
4357
|
+
return null;
|
|
4358
|
+
}
|
|
4359
|
+
const tdInfo = getNewTdInfo(rawTdInfo, rowData, realRowIndex);
|
|
4360
|
+
const groupRowspan = dataIdx !== -1 && groupRowSpans.value.length && isGroupMergeCell(tdInfo) && groupRowSpans.value[dataIdx] > 1 ? groupRowSpans.value[dataIdx] : void 0;
|
|
4075
4361
|
const tdAttrs = {
|
|
4076
4362
|
key: tdId,
|
|
4077
4363
|
id: tdId,
|
|
4078
4364
|
hidden: tdInfo.cellHidden,
|
|
4079
4365
|
borderAttrs: tdInfo.props.sourceBorderAttrs,
|
|
4080
|
-
autoMerge: tdInfo.fillDirection === "x" ? tdInfo.xAutoMerge : tdInfo.autoMerge,
|
|
4366
|
+
autoMerge: groupRowspan ? false : tdInfo.fillDirection === "x" ? tdInfo.xAutoMerge : tdInfo.autoMerge,
|
|
4081
4367
|
fillDirection: tdInfo.fillDirection,
|
|
4082
4368
|
...pick(tdInfo.props, ["rowspan", "colspan", "class"])
|
|
4083
4369
|
};
|
|
4370
|
+
if (groupRowspan) {
|
|
4371
|
+
tdAttrs.rowspan = groupRowspan;
|
|
4372
|
+
}
|
|
4084
4373
|
const realTdAttrInfo = props.subInfo.mergeBlock?.[tdId];
|
|
4085
4374
|
if (realTdAttrInfo) {
|
|
4086
4375
|
Object.assign(tdAttrs, {
|
|
4087
4376
|
...pick(realTdAttrInfo, ["rowspan", "colspan", "borderAttrs"]),
|
|
4088
4377
|
hidden: false
|
|
4089
4378
|
});
|
|
4379
|
+
if (groupRowspan) {
|
|
4380
|
+
tdAttrs.rowspan = groupRowspan;
|
|
4381
|
+
}
|
|
4090
4382
|
}
|
|
4091
4383
|
if (tdInfo.cellValueType) {
|
|
4092
4384
|
if (props.isMobile) {
|
|
@@ -4130,6 +4422,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4130
4422
|
"isEmpty": true
|
|
4131
4423
|
}), null);
|
|
4132
4424
|
}
|
|
4425
|
+
return null;
|
|
4133
4426
|
}), showAction.value && showActionMenu && createVNode("div", {
|
|
4134
4427
|
"class": "sub-table-action-bar"
|
|
4135
4428
|
}, [slots.subAction?.({
|
|
@@ -4137,11 +4430,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4137
4430
|
subTableFieldId: field,
|
|
4138
4431
|
mobileTdIdGroups: dataRelationShip?.mobileTdIdGroups,
|
|
4139
4432
|
handleMenuClick: handleMenuClick(rowData, dataIdx)
|
|
4140
|
-
})
|
|
4141
|
-
"showConfirmBtn": !isFormChange.value,
|
|
4142
|
-
"rowData": rowData,
|
|
4143
|
-
"onDoAction": handleAction
|
|
4144
|
-
}, null)])]);
|
|
4433
|
+
})])]);
|
|
4145
4434
|
};
|
|
4146
4435
|
return () => createVNode("div", {
|
|
4147
4436
|
"class": "cmp-sub-table"
|
|
@@ -4154,7 +4443,6 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4154
4443
|
"width": cw
|
|
4155
4444
|
}, null))]), createVNode("tbody", null, [props.subInfo.containerIds.map((trId) => {
|
|
4156
4445
|
const trInfo = props.widgetCenter[trId];
|
|
4157
|
-
console.log("trInfo", trInfo);
|
|
4158
4446
|
if (trInfo.props.identifier !== "dynamicTr") {
|
|
4159
4447
|
const dynHeight = props.subInfo.dynamicRowHeights?.[trId];
|
|
4160
4448
|
return renderTr2Td(trId, trInfo, realFormState.value, {
|
|
@@ -4165,17 +4453,16 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4165
4453
|
});
|
|
4166
4454
|
}
|
|
4167
4455
|
if (trId === lastDynamicId) {
|
|
4168
|
-
|
|
4456
|
+
dataInfo.value.tableData.length - 1;
|
|
4169
4457
|
return dataInfo.value.tableData.map((data, dataIdx) => {
|
|
4170
4458
|
const stableRowKey = getRowId(data);
|
|
4171
4459
|
return dynamicIds.map((rowId, rowIdx) => {
|
|
4172
4460
|
const isLastDynRow = rowIdx === lastDynRowIdx;
|
|
4173
|
-
const
|
|
4174
|
-
const
|
|
4175
|
-
(tableController.enableSequenceLoading ? isLast : true);
|
|
4176
|
-
const showScanBtn = isLast;
|
|
4461
|
+
const showDelBtn = dataInfo.value.hasSubData && isLastDynRow;
|
|
4462
|
+
const showScanBtn = isLastDynRow;
|
|
4177
4463
|
const showActionMenu = isLastDynRow;
|
|
4178
|
-
const showEditBtn = !isFormChange.value &&
|
|
4464
|
+
const showEditBtn = !isFormChange.value && data.is_confirmed_;
|
|
4465
|
+
const showInsert1RowBtn = !isFormChange.value && !data.is_confirmed_;
|
|
4179
4466
|
const row = props.widgetCenter[rowId];
|
|
4180
4467
|
const dynHeight = props.subInfo.dynamicRowHeights?.[rowId]?.[dataIdx];
|
|
4181
4468
|
return renderTr2Td(`${stableRowKey}_${rowIdx}`, row, data, {
|
|
@@ -4184,7 +4471,8 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4184
4471
|
showScanBtn,
|
|
4185
4472
|
showEditBtn,
|
|
4186
4473
|
dataIdx,
|
|
4187
|
-
dynHeight
|
|
4474
|
+
dynHeight,
|
|
4475
|
+
showInsert1RowBtn
|
|
4188
4476
|
});
|
|
4189
4477
|
});
|
|
4190
4478
|
});
|
|
@@ -4350,7 +4638,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
4350
4638
|
show: props.showEditBtn,
|
|
4351
4639
|
type: "action",
|
|
4352
4640
|
key: SubTableActionEnum.RowEdit,
|
|
4353
|
-
label: "
|
|
4641
|
+
label: "编辑",
|
|
4354
4642
|
icon: "icon-zhongxinbianjidangqianhang"
|
|
4355
4643
|
},
|
|
4356
4644
|
{
|
|
@@ -4553,7 +4841,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
4553
4841
|
};
|
|
4554
4842
|
}
|
|
4555
4843
|
});
|
|
4556
|
-
const SubTableAction = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
4844
|
+
const SubTableAction = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-01ca4702"]]);
|
|
4557
4845
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
4558
4846
|
__name: "fixed-table-action",
|
|
4559
4847
|
props: {
|
|
@@ -4666,12 +4954,7 @@ const DocumentPaper = /* @__PURE__ */ defineComponent({
|
|
|
4666
4954
|
const subTableCoreFactory = computed(() => subTableCoreFactoryMap.value?.[props.basicInfo?.uniqueId]);
|
|
4667
4955
|
const filledFixedTableKeys = ref([]);
|
|
4668
4956
|
const fixedTables = computed(() => {
|
|
4669
|
-
|
|
4670
|
-
if (!info) {
|
|
4671
|
-
return [];
|
|
4672
|
-
}
|
|
4673
|
-
const designer = JSON.parse(info.designerJson || "{}");
|
|
4674
|
-
return designer.sheets?.[0]?.paper?.fixedTables || designer.fixedTables || [];
|
|
4957
|
+
return props.widgetCenter.paper?.props.fixedTables || [];
|
|
4675
4958
|
});
|
|
4676
4959
|
const fixedTableInfoMap = computed(() => {
|
|
4677
4960
|
const {
|
|
@@ -5126,28 +5409,27 @@ export {
|
|
|
5126
5409
|
FixedQuickFillModal as F,
|
|
5127
5410
|
InstanceStatusValues as I,
|
|
5128
5411
|
MaterialConsumptionPatternEnum as M,
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
useValidator as
|
|
5135
|
-
DocumentPaper as
|
|
5136
|
-
DynamicTableAction as
|
|
5137
|
-
MaterialConsumeTableController as
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
DeviceConnector as
|
|
5146
|
-
DocumentLoading as
|
|
5147
|
-
DynamicQuickFillModal as
|
|
5148
|
-
FormTmplConfigController as
|
|
5149
|
-
MCDataUtil as
|
|
5150
|
-
|
|
5151
|
-
useOnlineFormTransformField2Component as u,
|
|
5412
|
+
OCR_MODEL_PRECISION_ENUM_KEY as O,
|
|
5413
|
+
RequiredQtyCalcRule as R,
|
|
5414
|
+
ScanParamType as S,
|
|
5415
|
+
_sfc_main$5 as _,
|
|
5416
|
+
useStyles as a,
|
|
5417
|
+
useValidator as b,
|
|
5418
|
+
DocumentPaper as c,
|
|
5419
|
+
DynamicTableAction as d,
|
|
5420
|
+
MaterialConsumeTableController as e,
|
|
5421
|
+
SubTableCore as f,
|
|
5422
|
+
SubTableActionMenuTypeEnum as g,
|
|
5423
|
+
getMenuByAction as h,
|
|
5424
|
+
SubTableActionEnum as i,
|
|
5425
|
+
getCopySubMenu as j,
|
|
5426
|
+
getInsertSubMenu as k,
|
|
5427
|
+
useMaterialBalance as l,
|
|
5428
|
+
DeviceConnector as m,
|
|
5429
|
+
DocumentLoading as n,
|
|
5430
|
+
DynamicQuickFillModal as o,
|
|
5431
|
+
FormTmplConfigController as p,
|
|
5432
|
+
MCDataUtil as q,
|
|
5433
|
+
useFormTmplConfig as u,
|
|
5152
5434
|
validate as v
|
|
5153
5435
|
};
|