@gct-paas/excel 0.1.28-beta.9 → 0.1.28
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/{BaseComponent-yoXj5Q9c.js → BaseComponent-9YPaGJfR.js} +3 -1
- package/dist/{VueVideoPlayer-DnxMrbso.js → VueVideoPlayer-DDUZu4FR.js} +2 -2
- package/dist/{align-editor-B4gydK1M.js → align-editor-aEWznFoT.js} +1 -1
- package/dist/{barcode-design-Cid0MzDI.js → barcode-design-UQyluywP.js} +2 -2
- package/dist/base/index.es.js +718 -466
- package/dist/{diagonal-design-C1ZotzUS.js → diagonal-design-bGGzn_Wt.js} +2 -2
- package/dist/{dynamic-table-action-C1o2TjqX.js → dynamic-table-action-DmQ4nVdA.js} +825 -216
- package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-D8HQKSsX.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BviS9x-o.js} +2457 -757
- package/dist/{edit.utils-CXmmCnxE-DEOcuCns.js → edit.utils-CXmmCnxE-pmY90xaE.js} +1 -1
- package/dist/excel.css +20939 -21654
- package/dist/{exceljs.min-DHw6Xo0Z.js → exceljs.min-BxkFiHRf.js} +2 -2
- package/dist/{font-editor-BMzWHu2P.js → font-editor-BBNgoyoK.js} +3 -3
- package/dist/{image-design-Cv7Md3br.js → image-design-CV8ivT4U.js} +3 -2
- package/dist/{index-ClwYjOaz.js → index-B94zjbXB.js} +2 -2
- package/dist/{index-DCyS2gPu.js → index-B9hn-Xpy.js} +62 -261
- package/dist/{index-CTfI5z2v.js → index-BI1w0HuA.js} +2 -2
- package/dist/{index-DYJ2NY6r.js → index-BIyoFjsu.js} +1 -1
- package/dist/{index-Cf0HUPLj.js → index-BNdFxtuu.js} +2 -2
- package/dist/{index-B_rAitke.js → index-BVy2F-LZ.js} +2 -2
- package/dist/{index-t_DIs_9d.js → index-BbRU7v-W.js} +2 -2
- package/dist/{index-BQLH_u5E.js → index-BgUSwNSn.js} +1 -1
- package/dist/{index-DPHsObDL.js → index-Bu5KxbKA.js} +2 -2
- package/dist/{index-DVknMcoI.js → index-BzNleuvF.js} +8 -5
- package/dist/{index-BC7ZPYu4.js → index-CJgeCzTz.js} +4 -7
- package/dist/{index-KJIuf63z.js → index-CY_9UWH1.js} +3 -3
- package/dist/{index-DYPfKE_B.js → index-Co8dy8tY.js} +2 -2
- package/dist/index-CuwWhVy-.js +26 -0
- package/dist/{index-B2oEU1dw.js → index-D3RlguP-.js} +2 -2
- package/dist/{index-De0lJXBW.js → index-DAokF2RK.js} +2 -2
- package/dist/{index-B_qNr-yz.js → index-DUomn6r4.js} +2 -2
- package/dist/{index-DLhVj92F.js → index-DVCumM_5.js} +2 -2
- package/dist/{index-DHCfwj7L.js → index-DX2S50Jz.js} +1 -1
- package/dist/{index-b03O87gX.js → index-DXutPZQB.js} +1 -1
- package/dist/{index-BMaOAtO5.js → index-DXvugQoP.js} +2 -2
- package/dist/{index-CDLpl1vT.js → index-DapZh4vf.js} +57467 -75573
- package/dist/{index-EGCBxJ5U.js → index-Dxiaj_9W.js} +2 -2
- package/dist/{index-CB2KdECV.js → index-DzZ4dTHg.js} +2 -2
- package/dist/index-FJwxWmrK.js +26 -0
- package/dist/{index-DGF9F0hk.js → index-JYTz2lAb.js} +2 -2
- package/dist/index-R0Xrpn-f.js +56 -0
- package/dist/{index-BNW93hpM.js → index-RHv1ncwn.js} +1 -1
- package/dist/{index-Bi8eFVNQ.js → index-eaPQQt2I.js} +1 -1
- package/dist/{index-Ca8Vr4hp.js → index-f4FwucgP.js} +3 -3
- package/dist/{index-D4SRGG7R.js → index-kZ3vhOMA.js} +2 -2
- package/dist/{index-yee5hcWj.js → index-q0gBBMoc.js} +2 -2
- package/dist/{index--m7aMhTe.js → index-s7YNVpgF.js} +1 -1
- package/dist/{index-DWd__rfX.js → index-zuExIXWU.js} +1 -1
- package/dist/index.es.js +49 -47
- package/dist/{mb-render-DNA0sAdk.js → mb-render-BBRR_byl.js} +3 -3
- package/dist/{version-select-Dt0iT2ZE.js → online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-BGrVMSEF.js} +418 -421
- package/dist/{pagination-design-a-8WGmGL.js → pagination-design-D2f9xg95.js} +2 -2
- package/dist/paper-widget-design-COSbrtAL.js +4 -0
- package/dist/{qrcode-design-CWa7ucIf.js → qrcode-design-DuLbid5Q.js} +1 -1
- package/dist/{revo-grid.entry-D7L9YPVS.js → revo-grid.entry-DW8yYngF.js} +1 -1
- package/dist/{revogr-attribution_7.entry-Cp0OE2PX.js → revogr-attribution_7.entry-WnSOjAfL.js} +3 -3
- package/dist/{revogr-clipboard_3.entry-CcGTw0f4.js → revogr-clipboard_3.entry-5f1ZtJWy.js} +2 -2
- package/dist/{revogr-data_4.entry-Bh7oCpj9.js → revogr-data_4.entry-BwcXhOPY.js} +2 -2
- package/dist/{revogr-filter-panel.entry-OJyr7l1E.js → revogr-filter-panel.entry-CXpo_Btw.js} +1 -1
- package/dist/{serialnumber-design-BDTeHe2C.js → serialnumber-design-CYdELIDU.js} +1 -1
- package/dist/shared/index.es.js +25 -30
- package/dist/{single-field-drop-C-IeYaFA.js → single-field-drop-BpdZOAYb.js} +2 -2
- package/dist/{size-editor-Ibjf73lo.js → size-editor-Dr3sVcUl.js} +1 -1
- package/dist/src/adapter/adapter.d.ts +36 -0
- package/dist/src/adapter/setup.d.ts +18 -12
- package/dist/src/domain/field/auto-complete/material-container-manifest.d.ts +2 -0
- package/dist/src/domain/field/auto-complete/material-no-manifest.d.ts +2 -0
- package/dist/src/domain/field/auto-complete/related-lot-no-manifest.d.ts +2 -0
- package/dist/src/domain/field/auto-complete/scrap-material-no-manifest.d.ts +2 -0
- package/dist/src/domain/field/auto-complete/sterilization-container-manifest.d.ts +2 -0
- package/dist/src/domain/field/date/date-manifest.d.ts +2 -0
- package/dist/src/domain/field/date/date-time-manifest.d.ts +2 -0
- package/dist/src/domain/field/date/production-date-manifest.d.ts +2 -0
- package/dist/src/domain/field/date/re-inspection-date-manifest.d.ts +2 -0
- package/dist/src/domain/field/date/report-end-time-manifest.d.ts +2 -0
- package/dist/src/domain/field/date/report-start-time-manifest.d.ts +2 -0
- package/dist/src/domain/field/date/time-manifest.d.ts +2 -0
- package/dist/src/domain/field/date/trace-date-manifest.d.ts +2 -0
- package/dist/src/domain/field/date/validity-manifest.d.ts +2 -0
- package/dist/src/domain/field/date/warehouse-receipt-date-manifest.d.ts +2 -0
- package/dist/src/domain/field/index.d.ts +9 -0
- package/dist/src/domain/field/number/decimal-manifest.d.ts +2 -0
- package/dist/src/domain/field/number/destructive-test-qty-manifest.d.ts +2 -0
- package/dist/src/domain/field/number/double-manifest.d.ts +2 -0
- package/dist/src/domain/field/number/good-qty-manifest.d.ts +2 -0
- package/dist/src/domain/field/number/inspection-qty-manifest.d.ts +2 -0
- package/dist/src/domain/field/number/integer-manifest.d.ts +2 -0
- package/dist/src/domain/field/number/long-manifest.d.ts +2 -0
- package/dist/src/domain/field/number/material-check-qty-manifest.d.ts +2 -0
- package/dist/src/domain/field/number/not-good-qty-manifest.d.ts +2 -0
- package/dist/src/domain/field/number/of-inst-num-manifest.d.ts +2 -0
- package/dist/src/domain/field/number/operation-output-qty-manifest.d.ts +2 -0
- package/dist/src/domain/field/number/operation-receive-qty-manifest.d.ts +2 -0
- package/dist/src/domain/field/number/product-check-qty-manifest.d.ts +2 -0
- package/dist/src/domain/field/number/production-qty-manifest.d.ts +2 -0
- package/dist/src/domain/field/number/qty-consumed-manifest.d.ts +2 -0
- package/dist/src/domain/field/number/qty-manifest.d.ts +2 -0
- package/dist/src/domain/field/number/qty-required-manifest.d.ts +2 -0
- package/dist/src/domain/field/number/scrap-qty-manifest.d.ts +2 -0
- package/dist/src/domain/field/number/work-hours-manifest.d.ts +2 -0
- package/dist/src/domain/field/option/boolean-manifest.d.ts +2 -0
- package/dist/src/domain/field/option/enum-manifest.d.ts +2 -0
- package/dist/src/domain/field/option/enum-multi-manifest.d.ts +2 -0
- package/dist/src/domain/field/option/option-manifest.d.ts +2 -0
- package/dist/src/domain/field/option/option-multi-manifest.d.ts +2 -0
- package/dist/src/domain/field/rdo-select/e-sop-manifest.d.ts +2 -0
- package/dist/src/domain/field/rdo-select/product-manifest.d.ts +2 -0
- package/dist/src/domain/field/rdo-select/scrap-material-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/device-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/device-ref-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/device-ref-multi-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/location-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/mfg-order-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/model-relation-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/not-good-group-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/not-good-reason-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/operation-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/org-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/org-multi-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/production-container-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/ref-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/ref-multi-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/routing-operation-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/scrap-group-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/scrap-reason-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/shopfloor-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/target-warehouse-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/user-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/user-multi-manifest.d.ts +2 -0
- package/dist/src/domain/field/select/warehouse-manifest.d.ts +2 -0
- package/dist/src/domain/field/text/e-sop-version-manifest.d.ts +2 -0
- package/dist/src/domain/field/text/external-reference-no-manifest.d.ts +2 -0
- package/dist/src/domain/field/text/long-text-manifest.d.ts +2 -0
- package/dist/src/domain/field/text/order-no-manifest.d.ts +2 -0
- package/dist/src/domain/field/text/record-no-manifest.d.ts +2 -0
- package/dist/src/domain/field/text/text-manifest.d.ts +2 -0
- package/dist/src/domain/field/text/warehouse-receipt-no-manifest.d.ts +2 -0
- package/dist/src/domain/field/types.d.ts +18 -0
- package/dist/src/domain/field/upload/attachment-manifest.d.ts +2 -0
- package/dist/src/domain/field/upload/image-manifest.d.ts +2 -0
- package/dist/src/domain/field/upload/reporter-manifest.d.ts +2 -0
- package/dist/src/domain/field/upload/signature-manifest.d.ts +2 -0
- package/dist/src/domain/field/upload/warehouse-manager-manifest.d.ts +2 -0
- package/dist/src/domain/index.d.ts +1 -0
- package/dist/src/domain/object/date-object/index.d.ts +5 -0
- package/dist/src/domain/object/date-object/profile/field-keys.d.ts +19 -0
- package/dist/src/domain/object/date-object/profile/fields.d.ts +2 -0
- package/dist/src/domain/object/date-object/profile/index.d.ts +3 -0
- package/dist/src/domain/object/date-object/runtime/date-object-context.d.ts +30 -0
- package/dist/src/domain/object/date-object/runtime/date-object-runtime.d.ts +43 -0
- package/dist/src/domain/object/date-object/runtime/fetch-records.d.ts +13 -0
- package/dist/src/domain/object/date-object/runtime/object-handlers.d.ts +4 -0
- package/dist/src/domain/object/date-object/runtime/re-inspection-date.d.ts +25 -0
- package/dist/src/domain/object/date-object/runtime/register-handlers.d.ts +1 -0
- package/dist/src/domain/object/date-object/runtime/row-change-handlers.d.ts +6 -0
- package/dist/src/domain/object/date-object/runtime/utils.d.ts +13 -0
- package/dist/src/domain/object/date-object/types.d.ts +53 -0
- package/dist/src/domain/object/index.d.ts +1 -0
- package/dist/src/domain/table/business/warehouse/device-part-consume/profile/field-keys.d.ts +14 -0
- package/dist/src/domain/table/business/warehouse/part-stocktake/profile/field-keys.d.ts +14 -0
- package/dist/src/domain/table/business/warehouse/shared/eqm-part-api.d.ts +13 -0
- package/dist/src/domain/table/business/warehouse/warehouse-in/profile/field-keys.d.ts +40 -3
- package/dist/src/domain/table/business/warehouse/warehouse-in/runtime/row-change-handlers.d.ts +9 -1
- package/dist/src/domain/table/business/warehouse/warehouse-inbound/profile/field-keys.d.ts +17 -0
- package/dist/src/domain/table/business/warehouse/warehouse-inventory/index.d.ts +3 -0
- package/dist/src/domain/table/business/warehouse/warehouse-inventory/profile/api.d.ts +14 -0
- package/dist/src/domain/table/business/warehouse/warehouse-inventory/profile/field-keys.d.ts +17 -34
- package/dist/src/domain/table/business/warehouse/warehouse-inventory/runtime/stocktake-dimension.d.ts +13 -0
- package/dist/src/domain/table/business/warehouse/warehouse-inventory/types.d.ts +20 -0
- package/dist/src/domain/table/business/warehouse/warehouse-outbound/profile/field-keys.d.ts +14 -0
- package/dist/src/domain/table/design/panel-features.d.ts +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/nocode-base/src/components/document-quick-fill/fixed-quick-fill-modal.vue.d.ts +3 -1
- package/dist/src/nocode-base/src/components/document-sub-table-action/type.d.ts +2 -0
- package/dist/src/nocode-base/src/constant/index.d.ts +5 -1
- package/dist/src/nocode-base/src/core/sub-table/profile-driven-sub-table-core.d.ts +42 -2
- package/dist/src/nocode-base/src/core/sub-table/stocktake-table-core.d.ts +1 -1
- package/dist/src/nocode-base/src/core/sub-table/sub-table-core.d.ts +11 -0
- package/dist/src/nocode-base/src/core/sub-table/utils/scan/scan-helpers.d.ts +13 -0
- package/dist/src/nocode-base/src/core/sub-table/utils/stocktake/stocktake-calc.d.ts +3 -1
- package/dist/src/nocode-base/src/core/sub-table/warehouse-in-table-core.d.ts +15 -0
- package/dist/src/nocode-base/src/core/sub-table/warehouse-out-table-core.d.ts +1 -0
- package/dist/src/nocode-base/src/hooks/date-object/use-date-object.d.ts +2 -0
- package/dist/src/nocode-base/src/hooks/device-link/controller.d.ts +3 -4
- package/dist/src/nocode-base/src/hooks/device-link/types.d.ts +1 -1
- package/dist/src/nocode-base/src/hooks/index.d.ts +1 -0
- package/dist/src/nocode-base/src/hooks/material-consume/bom-validator.d.ts +20 -6
- package/dist/src/nocode-base/src/hooks/material-consume/material-consume-table-controller.d.ts +34 -19
- package/dist/src/nocode-base/src/hooks/material-consume/service.d.ts +12 -0
- package/dist/src/nocode-base/src/hooks/material-consume/tmpl-bom-controller.d.ts +1 -4
- package/dist/src/nocode-base/src/hooks/material-consume-object/bom-validator.d.ts +49 -8
- package/dist/src/nocode-base/src/hooks/material-consume-object/index.d.ts +1 -0
- package/dist/src/nocode-base/src/hooks/material-consume-object/product-lot-link.d.ts +35 -0
- package/dist/src/nocode-base/src/hooks/operation-receive-qty.d.ts +2 -0
- package/dist/src/nocode-base/src/hooks/useRenderPageFactory.d.ts +12 -0
- package/dist/src/nocode-base/src/hooks/useStyles.d.ts +2 -2
- package/dist/src/nocode-base/src/interface/device-query.d.ts +40 -0
- package/dist/src/nocode-base/src/interface/index.d.ts +2 -1
- package/dist/src/nocode-base/src/interface/render.d.ts +11 -0
- package/dist/src/nocode-base/src/interface/transform.d.ts +1 -1
- package/dist/src/nocode-base/src/types/business/index.d.ts +3 -1
- package/dist/src/nocode-base/src/types/business/pretreatment-list.d.ts +3 -1
- package/dist/src/nocode-base/src/types/business/sterilize-batch.d.ts +3 -1
- package/dist/src/nocode-base/src/types/business/stocktake.d.ts +5 -1
- package/dist/src/nocode-base/src/types/common/base.d.ts +8 -0
- package/dist/src/nocode-base/src/types/fields/i-select.d.ts +13 -1
- package/dist/src/nocode-base/src/types/fields/i-trace.d.ts +6 -6
- package/dist/src/nocode-base/src/types/widgets/i-paper.d.ts +4 -8
- package/dist/src/nocode-web-render/src/render/sub-table/stocktake/stocktake-web-render.d.ts +1 -1
- package/dist/src/online-form/src/views/__cell_widgets__/common/display-fields-editor/display-fields-editor.vue.d.ts +3 -3
- package/dist/src/online-form/src/views/__cell_widgets__/common/display-fields-editor/display-fields.util.d.ts +15 -0
- package/dist/src/online-form/src/views/__cell_widgets__/common/field-config-visibility.d.ts +2 -0
- package/dist/src/online-form/src/views/__cell_widgets__/common/quick-search-editor/quick-search-editor.vue.d.ts +1 -4
- package/dist/src/online-form/src/views/__cell_widgets__/common/quick-search-editor/quick-search.util.d.ts +12 -10
- package/dist/src/online-form/src/views/__cell_widgets__/common/ref-autofill-editor/autofill-field-utils.d.ts +10 -0
- package/dist/src/online-form/src/views/__cell_widgets__/fake-field/fake-input.vue.d.ts +13 -0
- package/dist/src/{nocode-web-render/src/render/sub-table/stocktake/scan-modal.vue.d.ts → online-form/src/views/__cell_widgets__/fake-field/fake-number-input.vue.d.ts} +7 -1
- package/dist/src/online-form/src/views/__cell_widgets__/fake-field/fake-option-select.vue.d.ts +11 -0
- package/dist/src/online-form/src/views/__cell_widgets__/fake-field/fake-select.vue.d.ts +11 -0
- package/dist/src/online-form/src/views/__cell_widgets__/fake-field/index.d.ts +4 -0
- package/dist/src/online-form/src/views/__cell_widgets__/field-design-components.d.ts +4 -0
- package/dist/src/online-form/src/views/__cell_widgets__/index.d.ts +0 -3
- package/dist/src/online-form/src/views/__cell_widgets__/widget-panel-map.d.ts +3 -0
- package/dist/src/online-form/src/views/designer/constants/index.d.ts +5 -6
- package/dist/src/online-form/src/views/designer/hooks/useAllSpreadSheets.d.ts +80 -0
- package/dist/src/online-form/src/views/designer/hooks/useSpreadSheet.d.ts +110 -3
- package/dist/src/online-form/src/views/designer/modules/base/drag-box.vue.d.ts +1 -1
- package/dist/src/online-form/src/views/designer/modules/panel/panel-data-init-config/object-init/hooks/useObjectInit.d.ts +1 -1
- package/dist/src/online-form/src/views/designer/modules/panel/panel-tmpl-config/ai-tmpl/ai-tmpl-editor-modal.vue.d.ts +30 -0
- package/dist/src/online-form/src/views/designer/modules/panel/panel-tmpl-config/ai-tmpl/ai-tmpl-editor.vue.d.ts +6 -17
- package/dist/src/online-form/src/views/designer/modules/panel/panel-tmpl-config/ai-tmpl/types.d.ts +20 -0
- package/dist/src/online-form/src/views/designer/modules/panel/sub-table/comps/use-dynamic-sub-table-panel.d.ts +58 -0
- package/dist/src/online-form/src/views/designer/modules/panel/sub-table/material-consumption/bom-entry-editor.vue.d.ts +2 -1
- package/dist/src/online-form/src/views/designer/modules/toolkit/model-field/add-field-btn.vue.d.ts +1 -3
- package/dist/src/online-form/src/views/designer/utils/cell-content-style.d.ts +30 -0
- package/dist/src/online-form/src/views/designer/utils/field-type-label.d.ts +1 -0
- package/dist/src/online-form/src/views/render/__components__/_common_/widget-component-visible.vue.d.ts +1 -0
- package/dist/src/online-form/src/views/render/__components__/_field_/_base_/cell/cell-auto-complete.vue.d.ts +34 -0
- package/dist/src/online-form/src/views/render/__components__/_field_/_base_/cell/cell-date-picker.vue.d.ts +23 -0
- package/dist/src/online-form/src/views/render/__components__/_field_/_base_/cell/cell-media.d.ts +5 -0
- package/dist/src/online-form/src/views/render/__components__/_field_/_base_/cell/cell-media.vue.d.ts +40 -0
- package/dist/src/online-form/src/views/render/__components__/_field_/_base_/cell/cell-text-input.vue.d.ts +21 -0
- package/dist/src/online-form/src/views/render/__components__/_field_/_base_/cell/cell-textarea.vue.d.ts +24 -0
- package/dist/src/online-form/src/views/render/__components__/_field_/_base_/cell/index.d.ts +9 -0
- package/dist/src/online-form/src/views/render/__components__/_field_/_base_/cell/use-select-list-height.d.ts +9 -0
- package/dist/src/online-form/src/views/render/__components__/_field_/_base_/trace-like-wrapper.d.ts +26 -0
- package/dist/src/online-form/src/views/render/__components__/_field_/auto-complete/index.d.ts +14 -0
- package/dist/src/online-form/src/views/render/__components__/_field_/{trace → rdo-select}/index.d.ts +2 -2
- package/dist/src/online-form/src/views/render/__components__/_field_/trace/composables/usePopoverWrapperHeight.d.ts +11 -2
- package/dist/src/online-form/src/views/render/__components__/_field_/trace/utils/columns.d.ts +13 -0
- package/dist/src/online-form/src/views/render/__components__/_field_/trace/utils/use-rule-props.d.ts +3 -3
- package/dist/src/shared/components/FieldStateIcon/field-state-icon.vue.d.ts +17 -0
- package/dist/src/shared/components/FieldStateIcon/index.d.ts +3 -0
- package/dist/src/shared/components/Preview/src/Functional.vue.d.ts +1 -1
- package/dist/src/shared/components/Signature/index.d.ts +2 -1
- package/dist/src/shared/components/Signature/types/index.d.ts +4 -0
- package/dist/src/shared/components/Signature/ui/handwriting-signer.vue.d.ts +1 -0
- package/dist/src/shared/components/Signature/ui/password-signer.vue.d.ts +1 -0
- package/dist/src/shared/components/Signature/ui/sign-popover-content.vue.d.ts +122 -0
- package/dist/src/shared/components/Signature/ui/sign-switcher-modal.vue.d.ts +4 -0
- package/dist/src/shared/components/Signature/ui/sign-switcher.vue.d.ts +3 -0
- package/dist/src/shared/components/registerGlobComp.d.ts +5 -0
- package/dist/src/shared/enum/field-type.d.ts +39 -284
- package/dist/src/shared/enum/index.d.ts +1 -1
- package/dist/src/shared/utils/field-size.d.ts +3 -0
- package/dist/src/shared/utils/lot2sn.d.ts +22 -0
- package/dist/{text-design-B1eX7Rp1.js → text-design-CwR0nlo0.js} +2 -2
- package/dist/{throttle-Cpk1LoGk-kodOPzL5.js → throttle-Cpk1LoGk-Dkz6zJ8F.js} +1 -1
- package/dist/{timediff-design-CoDU15y8.js → timediff-design-INgy9LDa.js} +1 -1
- package/dist/trace-like-wrapper-CDVQC9nc.js +34 -0
- package/dist/{value-editor.vue_vue_type_style_index_0_lang-ey1VNCHV.js → value-editor.vue_vue_type_style_index_0_lang-B6OHtKgu.js} +2 -2
- package/dist/web-render/index.es.js +118 -17
- package/dist/{widget-barcode-DAxib6qS.js → widget-barcode-BwVnh-YN.js} +4 -4
- package/dist/{widget-diagonal-BLo6XT0t.js → widget-diagonal-CrwmwCig.js} +5 -7
- package/dist/{widget-image-D_1erLrE.js → widget-image-BBUd3Sds.js} +6 -5
- package/dist/{widget-line-BwnSq4--.js → widget-line-BrtK1Cyg.js} +4 -4
- package/dist/{widget-pagination-DZMwe14i.js → widget-pagination-CL4-9x6C.js} +5 -5
- package/dist/{widget-power-DfV-8moi.js → widget-power-CM63pEBI.js} +3 -3
- package/dist/{widget-qrcode-C3yTAHOn.js → widget-qrcode-CKaQeTLP.js} +3 -3
- package/dist/{widget-rangelimit-DK8hANd1.js → widget-rangelimit-CXU8rtul.js} +3 -3
- package/dist/{widget-serialnumber-B2pkh6KT.js → widget-serialnumber-DyIKmcmC.js} +1 -1
- package/dist/{widget-text-98SaLOpt.js → widget-text-s757UF00.js} +5 -5
- package/dist/{widget-timediff-OD7HVoVr.js → widget-timediff-C6mIOI8p.js} +2 -2
- package/package.json +16 -6
- package/dist/agg-design-BO3eBkol.js +0 -24
- package/dist/agg-props-DEXapyb8.js +0 -10
- package/dist/agg-style-CDLpFoBn.js +0 -33
- package/dist/attach-fields-editor-DXh9f5iy.js +0 -116
- package/dist/base-font-editor-Ccv90UWY.js +0 -179
- package/dist/boolean-design-D1BIjOGz.js +0 -124
- package/dist/boolean-props-Cqb1zZfy.js +0 -155
- package/dist/boolean-style-C2uaO_Ei.js +0 -108
- package/dist/cell-upload-xzz2ufK7.js +0 -35
- package/dist/date-range-editor-D0SCmmS0.js +0 -472
- package/dist/date-time-design-pv0mRSgV.js +0 -64
- package/dist/date-time-props-B0YQO-ig.js +0 -105
- package/dist/date-time-style-Dn4TErcH.js +0 -33
- package/dist/decimal-design-BMKikWwr.js +0 -29
- package/dist/decimal-display-mode-BLrn-r-H.js +0 -60
- package/dist/decimal-props-BXVnDByV.js +0 -313
- package/dist/decimal-style-C5hB5sv6.js +0 -33
- package/dist/default-value-editor.vue_vue_type_script_setup_true_name_default-value-editor_lang-LcZ8lvPF.js +0 -370
- package/dist/double-design-5yOxs5xB.js +0 -28
- package/dist/double-props-CQ9yBXNl.js +0 -91
- package/dist/double-style-C01aPXrT.js +0 -33
- package/dist/enum-design-DewhmfeF.js +0 -97
- package/dist/enum-props-0ECHvFUr.js +0 -734
- package/dist/enum-style-fm5Ap8eG.js +0 -76
- package/dist/expression-design-BY6oI5EW.js +0 -24
- package/dist/expression-props-3OvDgw-p.js +0 -10
- package/dist/expression-style-Hhv8wnAe.js +0 -33
- package/dist/file-design-QE5qUMix.js +0 -17
- package/dist/file-props-CEGee5yo.js +0 -201
- package/dist/file-style-65tfxL94.js +0 -9
- package/dist/image-design-BoQOLCEL.js +0 -23
- package/dist/image-props-GuHBNt9S.js +0 -16
- package/dist/image-style-BLQukPqV.js +0 -9
- package/dist/index-CBYXYocJ.js +0 -40
- package/dist/index-DI8vltuS.js +0 -68
- package/dist/integer-design-C8kRP1tV.js +0 -28
- package/dist/integer-props-XICS-8Qt.js +0 -162
- package/dist/integer-style-BstrlNJp.js +0 -33
- package/dist/number-input-ex-BjIp4mym.js +0 -69
- package/dist/org-design-DWZI8xev.js +0 -24
- package/dist/org-props-0CY6-hLS.js +0 -96
- package/dist/org-style-HDV7obSe.js +0 -33
- package/dist/paper-widget-design-CT80i7VR.js +0 -4
- package/dist/ref-autofill-editor-CObqr_xh.js +0 -2376
- package/dist/ref-design-BQ8o1gKm.js +0 -24
- package/dist/ref-props-xjVvnvGW.js +0 -348
- package/dist/ref-style-MZ52QRhu.js +0 -33
- package/dist/regex-editor-BctX8jdd.js +0 -823
- package/dist/select-render-type-editor.vue_vue_type_script_setup_true_lang-CONYLCmt.js +0 -159
- package/dist/signature-design-CFOFAaEu.js +0 -20
- package/dist/signature-props-N6ng9rqg.js +0 -346
- package/dist/signature-style-D2QQrgMT.js +0 -9
- package/dist/src/nocode-base/src/hooks/material-date/material-date.d.ts +0 -44
- package/dist/src/nocode-base/src/hooks/material-date/service.d.ts +0 -4
- package/dist/src/nocode-base/src/hooks/material-date/use-material-date.d.ts +0 -2
- package/dist/text-design-CCs-p8Y3.js +0 -39
- package/dist/text-props-C6-s7LBP.js +0 -447
- package/dist/text-style-OUxV8LDu.js +0 -33
- package/dist/trace-design-Bhg0EIyC.js +0 -77
- package/dist/trace-props-DVekq4wE.js +0 -624
- package/dist/trace-style-CfSu__TO.js +0 -33
- package/dist/user-design-fMF_h4IG.js +0 -24
- package/dist/user-props-BGjEpC4j.js +0 -103
- package/dist/user-style-RUHIGWFF.js +0 -33
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { computed, watch, toRaw, onUnmounted, markRaw, ref, inject, unref, provide, reactive, defineComponent, openBlock, createElementBlock, mergeProps, createElementVNode, normalizeClass, renderSlot, createCommentVNode, createVNode, toDisplayString, toRef, isVNode, h, onBeforeMount, resolveComponent, createBlock, withCtx, Fragment, renderList, createTextVNode
|
|
1
|
+
import { computed, watch, toRaw, onUnmounted, markRaw, ref, inject, unref, provide, nextTick, reactive, defineComponent, openBlock, createElementBlock, mergeProps, createElementVNode, normalizeClass, renderSlot, createCommentVNode, createVNode, toDisplayString, toRef, isVNode, h, onMounted, onBeforeMount, resolveComponent, createBlock, withCtx, Fragment, renderList, createTextVNode } from "vue";
|
|
2
|
+
import { C as ComponentTypeEnum, aP as useWidgetStaticAttrs, Z as PlatformEnum, d9 as assembleRules, da as deleteFormRule, db as setFormRule, c2 as requestDisplayValidation, dc as isReferenceOptionActive, dd as validateAllFields, de as runValidation, df as ensureFrontRowKey, dg as FRONT_ROW_KEY, cf as getRowId, b1 as getParseRuleInfo, bb as transformUtils, aY as materialCheck, aZ as getLotLockedReason, a_ as validateReinspectionDate, bh as FormulaRuleFieldKeyEnum, aW as NCB_PROVIDE, F as FIELD_TYPE, dh as buildError, z as api, l as SubTableType, b2 as getParseRuleValue, c9 as uuid2, aH as DeviceLink, a4 as _export_sfc, cz as buildFormChangeDisplayRows, d5 as resolveRowFormChangeMark, d4 as resolveFormChangeRowUi, cS as isAnnLocationSelected, d6 as setSelectMobileTdId, cT as isFormChangeGhostRow, x as CellType, aR as setSelectAnnotationId, c$ as recordSubtableRowDelete, cB as deleteSubtableRow, d0 as relocateDeletedRowsToEnd, cR as insertSubtableRows, c_ as recordSubtableRowAdd, G as useModal, di as q, dj as groupFixedTableRows, dk as QUICK_FILL_ALLOWED_FIELDS, dl as processQuickFillRows, dm as getIsGroupEmpty, bf as RenderModeEnum, cM as getSubTableQuickFillInfo } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BviS9x-o.js";
|
|
2
3
|
import { isNil, cloneDeep, merge, pickBy, mergeWith, omit, last, pick } from "lodash-es";
|
|
3
|
-
import { ax as useWidgetStaticAttrs, Q as PlatformEnum, m as ComponentTypeEnum, cu as assembleRules, cv as deleteFormRule, cw as setFormRule, bp as requestDisplayValidation, cx as isReferenceOptionActive, cy as validateAllFields, cz as runValidation, cA as ensureFrontRowKey, cB as FRONT_ROW_KEY, bC as getRowId, aL as getParseRuleInfo, bj as transformUtils, aO as materialCheck, aP as getLotLockedReason, aT as FormulaRuleFieldKeyEnum, aF as NCB_PROVIDE, F as FIELD_TYPE, w as api, d as SubTableType, aM as getParseRuleValue, bw as uuid2, ap as DeviceLink, _ as _export_sfc, bV as buildFormChangeDisplayRows, cq as resolveRowFormChangeMark, cp as resolveFormChangeRowUi, cb as isAnnLocationSelected, cr as setSelectMobileTdId, cc as isFormChangeGhostRow, t as CellType, az as setSelectAnnotationId, ck as recordSubtableRowDelete, bX as deleteSubtableRow, cl as relocateDeletedRowsToEnd, ca as insertSubtableRows, cj as recordSubtableRowAdd, aN as useCurrentPageFormState, aC as renderUtils, y as useModal, cC as q, cD as groupFixedTableRows, cE as QUICK_FILL_ALLOWED_FIELDS, cF as processQuickFillRows, cG as getIsGroupEmpty, aR as RenderModeEnum, c5 as getSubTableQuickFillInfo } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-D8HQKSsX.js";
|
|
4
4
|
import dayjs from "dayjs";
|
|
5
5
|
import { u as useNamespace } from "./use-namespace-BxkK4ofX.js";
|
|
6
6
|
import { Modal, message } from "ant-design-vue";
|
|
7
|
-
import { u as useFormModel } from "./mb-render-
|
|
7
|
+
import { u as useFormModel } from "./mb-render-BBRR_byl.js";
|
|
8
8
|
const InstanceStatusValues = {
|
|
9
9
|
/** 作废状态 */
|
|
10
10
|
ABANDON: "ABANDON",
|
|
@@ -38,12 +38,19 @@ var MaterialConsumptionPatternEnum = /* @__PURE__ */ ((MaterialConsumptionPatter
|
|
|
38
38
|
MaterialConsumptionPatternEnum2["BOM"] = "bom";
|
|
39
39
|
return MaterialConsumptionPatternEnum2;
|
|
40
40
|
})(MaterialConsumptionPatternEnum || {});
|
|
41
|
-
function
|
|
41
|
+
function isDroppedFieldWidget(widget, isDroppedField) {
|
|
42
|
+
if (typeof isDroppedField === "boolean") return isDroppedField;
|
|
43
|
+
return widget?.component !== ComponentTypeEnum.RO && widget?.component !== ComponentTypeEnum.DynRo;
|
|
44
|
+
}
|
|
45
|
+
function useStyles(widget, isArea = false, isDroppedField) {
|
|
42
46
|
const otherClass = computed(() => {
|
|
47
|
+
const dropped = isDroppedFieldWidget(widget, isDroppedField);
|
|
48
|
+
const cls = [];
|
|
43
49
|
if (!widget.style) {
|
|
44
|
-
|
|
50
|
+
cls.push(dropped ? "m-justify-center" : "m-justify-start");
|
|
51
|
+
cls.push(isArea ? "m-content-center" : "m-items-center");
|
|
52
|
+
return cls;
|
|
45
53
|
}
|
|
46
|
-
const cls = [];
|
|
47
54
|
if (widget.style["textAlign"]) {
|
|
48
55
|
if (widget.style["textAlign"] === "center") {
|
|
49
56
|
cls.push("m-justify-center");
|
|
@@ -55,7 +62,7 @@ function useStyles(widget, isArea = false) {
|
|
|
55
62
|
cls.push("m-justify-end");
|
|
56
63
|
}
|
|
57
64
|
} else {
|
|
58
|
-
cls.push("m-justify-center");
|
|
65
|
+
cls.push(dropped ? "m-justify-center" : "m-justify-start");
|
|
59
66
|
}
|
|
60
67
|
if (widget.style["verticalAlign"]) {
|
|
61
68
|
if (widget.style["verticalAlign"] === "middle") {
|
|
@@ -74,16 +81,33 @@ function useStyles(widget, isArea = false) {
|
|
|
74
81
|
});
|
|
75
82
|
return { otherClass };
|
|
76
83
|
}
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
const DEFAULT_FIELD_WIDTH = 75;
|
|
85
|
+
function normalizeFieldWidth(value) {
|
|
86
|
+
if (value == null || value === "") return DEFAULT_FIELD_WIDTH;
|
|
87
|
+
const width = Number(value);
|
|
88
|
+
return Number.isFinite(width) && width >= 0 ? width : DEFAULT_FIELD_WIDTH;
|
|
89
|
+
}
|
|
90
|
+
function fieldChromeStyles(state) {
|
|
91
|
+
const required = state === "required";
|
|
92
|
+
const disabled = state === "disabled";
|
|
93
|
+
const border = required ? "#ffb0ae" : "#e0e3eb";
|
|
94
|
+
const hover = required ? "#ff7875" : "var(--ant-primary-color)";
|
|
95
|
+
const background = disabled ? "#f2f3f5" : required ? "#fff7f7" : "#fff";
|
|
96
|
+
const text = disabled ? "#bfbfbf" : "#1a1d23";
|
|
97
|
+
return {
|
|
98
|
+
"--cell-field-border-color": border,
|
|
99
|
+
"--cell-field-border-hover-color": hover,
|
|
100
|
+
"--cell-field-background-color": background,
|
|
101
|
+
"--cell-field-placeholder-color": "#bfbfbf",
|
|
102
|
+
"--cell-field-text-color": text
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
function resolveChromeState(isDp, blocked, required) {
|
|
106
|
+
if (isDp) return "default";
|
|
107
|
+
if (blocked) return "disabled";
|
|
108
|
+
if (required) return "required";
|
|
109
|
+
return "default";
|
|
110
|
+
}
|
|
87
111
|
const reliableVerticalTextStyles = {
|
|
88
112
|
"writing-mode": "horizontal-tb",
|
|
89
113
|
display: "inline-block",
|
|
@@ -115,11 +139,11 @@ function useValidator(props) {
|
|
|
115
139
|
const isDpPlatform = computed(
|
|
116
140
|
() => dataRelationShip?.platformType === PlatformEnum.INTEGRATION_PAAS_DP
|
|
117
141
|
);
|
|
118
|
-
const sizeStyles = {
|
|
119
|
-
"--size": `${widget.props.size ?? 12}px`,
|
|
120
|
-
"--cmp-width":
|
|
142
|
+
const sizeStyles = computed(() => ({
|
|
143
|
+
"--size": typeof widget.style?.fontSize === "number" ? `${widget.style.fontSize}px` : widget.style?.fontSize || `${widget.props.size ?? 12}px`,
|
|
144
|
+
"--cmp-width": `${normalizeFieldWidth(widget.props.cmpWidth)}px`,
|
|
121
145
|
"--cmp-height": `${widget.props.cmpHeight ?? 0}px`
|
|
122
|
-
};
|
|
146
|
+
}));
|
|
123
147
|
const skipFormItem = computed(() => {
|
|
124
148
|
if (widget.component === ComponentTypeEnum.DynValue) {
|
|
125
149
|
return true;
|
|
@@ -292,13 +316,16 @@ function useValidator(props) {
|
|
|
292
316
|
);
|
|
293
317
|
const widgetStyles = computed(() => {
|
|
294
318
|
if (widget.component === ComponentTypeEnum.DynValue) {
|
|
295
|
-
return isDpPlatform.value ?
|
|
319
|
+
return isDpPlatform.value ? fieldChromeStyles("default") : {};
|
|
296
320
|
}
|
|
297
|
-
const
|
|
298
|
-
|
|
321
|
+
const chrome = resolveChromeState(
|
|
322
|
+
isDpPlatform.value,
|
|
323
|
+
blocked.value,
|
|
324
|
+
!!showRequired.value && referenceActive.value
|
|
325
|
+
);
|
|
299
326
|
return {
|
|
300
|
-
...sizeStyles,
|
|
301
|
-
...
|
|
327
|
+
...sizeStyles.value,
|
|
328
|
+
...fieldChromeStyles(chrome),
|
|
302
329
|
...isVerticalLrText(widget.style) ? reliableVerticalTextStyles : {}
|
|
303
330
|
};
|
|
304
331
|
});
|
|
@@ -327,6 +354,16 @@ const validate = async (formData, paper, uniqueId) => {
|
|
|
327
354
|
uiApplied: false
|
|
328
355
|
};
|
|
329
356
|
};
|
|
357
|
+
class McRowValidateError extends Error {
|
|
358
|
+
constructor(message2, targetFieldId, row) {
|
|
359
|
+
super(message2);
|
|
360
|
+
this.targetFieldId = targetFieldId;
|
|
361
|
+
this.row = row;
|
|
362
|
+
this.name = "McRowValidateError";
|
|
363
|
+
}
|
|
364
|
+
targetFieldId;
|
|
365
|
+
row;
|
|
366
|
+
}
|
|
330
367
|
class BomEntryValidator {
|
|
331
368
|
constructor(bomEntry, enableSequenceLoading, getMaterialNoNum, historyData, mainMaterialNo, noBomMode) {
|
|
332
369
|
this.bomEntry = bomEntry;
|
|
@@ -499,7 +536,7 @@ class BomEntryValidator {
|
|
|
499
536
|
}
|
|
500
537
|
const allowed = (this.bomEntry.specified_material_entries_ ?? []).map((e) => e.name_).filter(Boolean);
|
|
501
538
|
if (!allowed.includes(lot)) {
|
|
502
|
-
throw new
|
|
539
|
+
throw new McRowValidateError(`${lot},不在指定物料批次范围内`, "material_no_", row);
|
|
503
540
|
}
|
|
504
541
|
}
|
|
505
542
|
/** 整组指定批次校验:组内每一行有批次值的都检查 */
|
|
@@ -523,6 +560,11 @@ class BomEntryValidator {
|
|
|
523
560
|
const groupData = this.filterGroupData(arr);
|
|
524
561
|
return groupData.reduce((acc, cur) => acc + (cur.qty_ ?? 0), 0);
|
|
525
562
|
}
|
|
563
|
+
/** 上下限校验统一按需求单位口径取转换数量,历史数据未转换时兼容原数量。 */
|
|
564
|
+
calcQtyForBounds(arr) {
|
|
565
|
+
const groupData = this.filterGroupData(arr);
|
|
566
|
+
return groupData.reduce((acc, cur) => acc + (cur.qty_transfer_ ?? cur.qty_ ?? 0), 0);
|
|
567
|
+
}
|
|
526
568
|
/**
|
|
527
569
|
* 计算自定义的数量校验的最大值和最小值
|
|
528
570
|
* @param data
|
|
@@ -585,7 +627,7 @@ class BomEntryValidator {
|
|
|
585
627
|
break;
|
|
586
628
|
case "bounds": {
|
|
587
629
|
const groupData = this.filterGroupData(arr);
|
|
588
|
-
const consumeSum =
|
|
630
|
+
const consumeSum = this.calcQtyForBounds(arr) + this.calcQtyForBounds(this.historyData);
|
|
589
631
|
const { min, max } = await this.calcCustomNumberLimit(groupData[0]);
|
|
590
632
|
if (min !== void 0 && consumeSum < min || max !== void 0 && consumeSum > max) {
|
|
591
633
|
fail($t("sys.qtyValidationRule.bounds", { min, max }));
|
|
@@ -654,12 +696,14 @@ class BomEntriesValidator {
|
|
|
654
696
|
}
|
|
655
697
|
/**
|
|
656
698
|
* 是否有正在编辑的组。
|
|
657
|
-
*
|
|
658
|
-
*
|
|
699
|
+
* 未开顺序上料:只回答有无未确认行,不限制组数。
|
|
700
|
+
* 顺序上料:一组可多行同时 !is_confirmed_;正常应只有一组。
|
|
701
|
+
* @returns 有编辑行且只落在一组 → true;无编辑行 → false;顺序上料且跨多组编辑 → 抛错
|
|
659
702
|
*/
|
|
660
703
|
hasEditingGroup(arr) {
|
|
661
704
|
const editRows = arr.filter((i) => !i.is_confirmed_ && !i.deleted_);
|
|
662
705
|
if (!editRows.length) return false;
|
|
706
|
+
if (!this.enableSequenceLoading) return true;
|
|
663
707
|
const groupIds = /* @__PURE__ */ new Set();
|
|
664
708
|
for (const row of editRows) {
|
|
665
709
|
const id = this.getRowGroupId(row);
|
|
@@ -878,15 +922,9 @@ class BomEntriesValidator {
|
|
|
878
922
|
if (!rows.length) throw new Error($t("sys.edhr.mcTable.materialEmptyError"));
|
|
879
923
|
rows.forEach((row) => {
|
|
880
924
|
this.validateDataCompleted(row);
|
|
881
|
-
if (row.expiration_date_ && dayjs(row.expiration_date_).endOf("day").isBefore(dayjs())) {
|
|
882
|
-
throw new Error(
|
|
883
|
-
$t("sys.expirationDateError", { product: row.product_id__lb_, lot: row.material_no_ })
|
|
884
|
-
);
|
|
885
|
-
}
|
|
886
925
|
});
|
|
887
926
|
util.validateSubstitute(arr);
|
|
888
927
|
util.validateLotMixing(arr);
|
|
889
|
-
util.validateSpecifiedMaterialNoForGroup(arr);
|
|
890
928
|
const orderIndex = this.resolveGroupOrderIndexByUtil(util, arr);
|
|
891
929
|
const groupNo = orderIndex >= 0 ? orderIndex + 1 : void 0;
|
|
892
930
|
await util.validateGroupQty(arr, this.enableSequenceLoading, groupNo);
|
|
@@ -898,46 +936,98 @@ class BomEntriesValidator {
|
|
|
898
936
|
await this.validateGroup(arr, current);
|
|
899
937
|
}
|
|
900
938
|
/**
|
|
901
|
-
*
|
|
902
|
-
* @param row 单行的数据
|
|
939
|
+
* 行级错误(提交收集全部打标;切组/扫码抛第一条)
|
|
903
940
|
*/
|
|
904
|
-
|
|
941
|
+
getRowFieldErrors(row) {
|
|
905
942
|
if (this.noBomMode) {
|
|
906
|
-
return;
|
|
943
|
+
return [];
|
|
907
944
|
}
|
|
945
|
+
const errors = [];
|
|
908
946
|
if (!row.product_id_) {
|
|
909
|
-
|
|
947
|
+
errors.push(
|
|
948
|
+
new McRowValidateError($t("sys.edhr.mcTable.materialEmptyError"), "product_id_", row)
|
|
949
|
+
);
|
|
950
|
+
return errors;
|
|
910
951
|
}
|
|
911
952
|
const util = this.findUtilByProductId(row.product_id_);
|
|
912
953
|
if (!util) {
|
|
913
|
-
|
|
954
|
+
errors.push(
|
|
955
|
+
new McRowValidateError($t("匹配不到对应物料,请按规则上料或新增物料"), "product_id_", row)
|
|
956
|
+
);
|
|
957
|
+
return errors;
|
|
914
958
|
}
|
|
915
|
-
}
|
|
916
|
-
/**
|
|
917
|
-
* 检查数据是否完整
|
|
918
|
-
* @param arr
|
|
919
|
-
*/
|
|
920
|
-
validateDataCompleted(row) {
|
|
921
|
-
this.validateInBom(row);
|
|
922
|
-
const util = this.findUtilByProductId(row.product_id_);
|
|
923
959
|
const { type_ } = util.bomEntry;
|
|
924
960
|
if (type_ === "view") {
|
|
925
|
-
return;
|
|
961
|
+
return errors;
|
|
926
962
|
}
|
|
927
963
|
if (type_ === "by_lot" && !row.material_no_) {
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
964
|
+
errors.push(
|
|
965
|
+
new McRowValidateError(
|
|
966
|
+
$t("sys.edhr.mcTable.materialNoEmptyError", {
|
|
967
|
+
product: this.translateProductCode(row.product_id_)
|
|
968
|
+
}),
|
|
969
|
+
"material_no_",
|
|
970
|
+
row
|
|
971
|
+
)
|
|
932
972
|
);
|
|
933
973
|
}
|
|
934
974
|
if (!row.qty_) {
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
975
|
+
errors.push(
|
|
976
|
+
new McRowValidateError(
|
|
977
|
+
$t("sys.edhr.mcTable.materialNumEmptyError", {
|
|
978
|
+
product: this.translateProductCode(row.product_id_)
|
|
979
|
+
}),
|
|
980
|
+
"qty_",
|
|
981
|
+
row
|
|
982
|
+
)
|
|
939
983
|
);
|
|
940
984
|
}
|
|
985
|
+
if (row.expiration_date_ && dayjs(row.expiration_date_).endOf("day").isBefore(dayjs())) {
|
|
986
|
+
errors.push(
|
|
987
|
+
new McRowValidateError(
|
|
988
|
+
$t("sys.expirationDateError", {
|
|
989
|
+
product: row.product_id__lb_,
|
|
990
|
+
lot: row.material_no_
|
|
991
|
+
}),
|
|
992
|
+
"expiration_date_",
|
|
993
|
+
row
|
|
994
|
+
)
|
|
995
|
+
);
|
|
996
|
+
}
|
|
997
|
+
try {
|
|
998
|
+
util.validateSpecifiedMaterialNo(row);
|
|
999
|
+
} catch (e) {
|
|
1000
|
+
if (e instanceof McRowValidateError) {
|
|
1001
|
+
errors.push(e);
|
|
1002
|
+
} else if (e?.message) {
|
|
1003
|
+
errors.push(new McRowValidateError(e.message, "material_no_", row));
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
return errors;
|
|
1007
|
+
}
|
|
1008
|
+
/**
|
|
1009
|
+
* 校验物料是否在bom里被使用
|
|
1010
|
+
* @param row 单行的数据
|
|
1011
|
+
*/
|
|
1012
|
+
validateInBom(row) {
|
|
1013
|
+
const first = this.getRowFieldErrors(row).find((e) => e.targetFieldId === "product_id_");
|
|
1014
|
+
if (first) throw first;
|
|
1015
|
+
}
|
|
1016
|
+
/**
|
|
1017
|
+
* 检查数据是否完整(切组/扫码:遇错即抛)
|
|
1018
|
+
*/
|
|
1019
|
+
validateDataCompleted(row) {
|
|
1020
|
+
const first = this.getRowFieldErrors(row)[0];
|
|
1021
|
+
if (first) throw first;
|
|
1022
|
+
}
|
|
1023
|
+
/** 提交:收集全表行级错误,不中断。无物料且无组归属的占位行跳过 */
|
|
1024
|
+
collectRowErrors(arr) {
|
|
1025
|
+
const errors = [];
|
|
1026
|
+
arr.forEach((row) => {
|
|
1027
|
+
if (row.deleted_ || !row.product_id_ && !row.bom_entry_id_) return;
|
|
1028
|
+
errors.push(...this.getRowFieldErrors(row));
|
|
1029
|
+
});
|
|
1030
|
+
return errors;
|
|
941
1031
|
}
|
|
942
1032
|
/**
|
|
943
1033
|
* 检查扫描数据是否可以插入,通过后返回填充计划(记录模式无 plan)
|
|
@@ -971,9 +1061,9 @@ class BomEntriesValidator {
|
|
|
971
1061
|
}
|
|
972
1062
|
}
|
|
973
1063
|
/**
|
|
974
|
-
*
|
|
1064
|
+
* 提交组级校验:必须上料 / 顺序 / 替代料 / 混批 / 组数量。遇错即抛,不含行级必填。
|
|
975
1065
|
*/
|
|
976
|
-
async
|
|
1066
|
+
async assertGroupRules(arr) {
|
|
977
1067
|
if (this.noBomMode) {
|
|
978
1068
|
return;
|
|
979
1069
|
}
|
|
@@ -986,9 +1076,16 @@ class BomEntriesValidator {
|
|
|
986
1076
|
this.assertSubmitSequenceOrder(arr);
|
|
987
1077
|
}
|
|
988
1078
|
for (const util of this.bomEntryValidators) {
|
|
989
|
-
if (this.groupExistsInTable(arr, util))
|
|
990
|
-
|
|
991
|
-
|
|
1079
|
+
if (!this.groupExistsInTable(arr, util)) continue;
|
|
1080
|
+
const rows = arr.filter(
|
|
1081
|
+
(r) => !r.deleted_ && r.product_id_ && (util.productIds.includes(r.product_id_) || r.bom_entry_id_ === util.bomEntry.id_)
|
|
1082
|
+
);
|
|
1083
|
+
if (!rows.length) continue;
|
|
1084
|
+
util.validateSubstitute(arr);
|
|
1085
|
+
util.validateLotMixing(arr);
|
|
1086
|
+
const orderIndex = this.resolveGroupOrderIndexByUtil(util, arr);
|
|
1087
|
+
const groupNo = orderIndex >= 0 ? orderIndex + 1 : void 0;
|
|
1088
|
+
await util.validateGroupQty(arr, this.enableSequenceLoading, groupNo);
|
|
992
1089
|
}
|
|
993
1090
|
}
|
|
994
1091
|
/**
|
|
@@ -1384,7 +1481,7 @@ class MaterialConsumeTableController {
|
|
|
1384
1481
|
this.tmplBomController = tmplBomController;
|
|
1385
1482
|
this.tmplBom = tmplBom;
|
|
1386
1483
|
this.initScanRule(this.tmplBom.barcode_parsing_rules_id_);
|
|
1387
|
-
this.scanParamType = this.tmplBom.
|
|
1484
|
+
this.scanParamType = this.tmplBom.scan_param_type_;
|
|
1388
1485
|
markRaw(this);
|
|
1389
1486
|
this.bomEntriesValidator = new BomEntriesValidator(
|
|
1390
1487
|
this.actualBomEntries,
|
|
@@ -1418,10 +1515,12 @@ class MaterialConsumeTableController {
|
|
|
1418
1515
|
formModelController;
|
|
1419
1516
|
/** 当前 paper 上配置的单位转化规则(由组件 setup 注入) */
|
|
1420
1517
|
unitConversionRules = [];
|
|
1421
|
-
/** 主表 formState
|
|
1518
|
+
/** 主表 formState(由 factory bindRuntime 注入),用于读取主表字段值 */
|
|
1422
1519
|
mainFormState = ref({});
|
|
1423
|
-
/**
|
|
1520
|
+
/** 表单数据状态(由 factory bindRuntime 注入):未填报 / STASH / SUBMIT */
|
|
1424
1521
|
dataStatus;
|
|
1522
|
+
/** factory 是否已绑定过运行时(避免重复 initTableData) */
|
|
1523
|
+
runtimeBound = false;
|
|
1425
1524
|
/** 表单是否已暂存或提交(已处理过则不再跑初始化) */
|
|
1426
1525
|
get isDataProcessed() {
|
|
1427
1526
|
return ["STASH", "SUBMIT"].includes(this.dataStatus ?? "");
|
|
@@ -1632,7 +1731,8 @@ class MaterialConsumeTableController {
|
|
|
1632
1731
|
}
|
|
1633
1732
|
/**
|
|
1634
1733
|
* 是否有正在编辑的组。
|
|
1635
|
-
*
|
|
1734
|
+
* 顺序上料:一组可多行同时为编辑态,同时只能有一组处于编辑态。
|
|
1735
|
+
* 未开顺序上料:不限制组数。
|
|
1636
1736
|
*/
|
|
1637
1737
|
hasEditingGroup(showMessage = true) {
|
|
1638
1738
|
try {
|
|
@@ -1654,7 +1754,9 @@ class MaterialConsumeTableController {
|
|
|
1654
1754
|
* @param str
|
|
1655
1755
|
*/
|
|
1656
1756
|
async parseScanStr(data, transformedData) {
|
|
1657
|
-
|
|
1757
|
+
if (this.enableSequenceLoading) {
|
|
1758
|
+
this.bomEntriesValidator.hasEditingGroup(this.actualTableData);
|
|
1759
|
+
}
|
|
1658
1760
|
const isRecordPattern = this.mcPattern === MaterialConsumptionPatternEnum.RECORD && !this.tmplBom.personal_bom_enabled_;
|
|
1659
1761
|
console.log("parseScanStr", data);
|
|
1660
1762
|
const arr = await materialCheck({
|
|
@@ -1687,6 +1789,16 @@ class MaterialConsumeTableController {
|
|
|
1687
1789
|
this.error(msg);
|
|
1688
1790
|
return;
|
|
1689
1791
|
}
|
|
1792
|
+
try {
|
|
1793
|
+
await validateReinspectionDate({
|
|
1794
|
+
product_id_: materialData.materialId,
|
|
1795
|
+
material_no_: materialData.productionIdentificationName,
|
|
1796
|
+
material_no_id_: materialData.productionIdentificationId
|
|
1797
|
+
});
|
|
1798
|
+
} catch (e) {
|
|
1799
|
+
this.error(e.message);
|
|
1800
|
+
return;
|
|
1801
|
+
}
|
|
1690
1802
|
const row = {
|
|
1691
1803
|
product_id_: materialData.materialId,
|
|
1692
1804
|
material_no_: materialData.productionIdentificationName,
|
|
@@ -1763,16 +1875,15 @@ class MaterialConsumeTableController {
|
|
|
1763
1875
|
});
|
|
1764
1876
|
}
|
|
1765
1877
|
/**
|
|
1766
|
-
*
|
|
1767
|
-
*
|
|
1878
|
+
* 表单加载时由 factory 调用:绑定稳定数据源并初始化行数据。
|
|
1879
|
+
* 不在分页组件 setup 中调用,避免跨页挂载重复 init。
|
|
1768
1880
|
*/
|
|
1769
|
-
|
|
1881
|
+
bindRuntime(opts) {
|
|
1770
1882
|
this.tableDataRef = opts.tableDataRef;
|
|
1771
|
-
this.widget = opts.widget;
|
|
1772
|
-
this.formModelController = opts.formModelController;
|
|
1773
|
-
this.unitConversionRules = opts.unitConversionRules ?? [];
|
|
1774
1883
|
this.mainFormState = opts.mainFormState ?? ref({});
|
|
1775
1884
|
this.dataStatus = opts.dataStatus;
|
|
1885
|
+
if (this.runtimeBound) return;
|
|
1886
|
+
this.runtimeBound = true;
|
|
1776
1887
|
this.initTableData(opts.defaultRowData);
|
|
1777
1888
|
if (this.actualTableData.length === 1) {
|
|
1778
1889
|
const firstRow = this.actualTableData[0];
|
|
@@ -1780,14 +1891,14 @@ class MaterialConsumeTableController {
|
|
|
1780
1891
|
MCDataUtil.setRowEditing(firstRow, true);
|
|
1781
1892
|
}
|
|
1782
1893
|
}
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1894
|
+
}
|
|
1895
|
+
/**
|
|
1896
|
+
* 消耗表组件挂载时调用:只同步视图依赖,不初始化数据、不注册 watch。
|
|
1897
|
+
*/
|
|
1898
|
+
bindView(opts) {
|
|
1899
|
+
this.widget = opts.widget;
|
|
1900
|
+
this.formModelController = opts.formModelController;
|
|
1901
|
+
this.unitConversionRules = opts.unitConversionRules ?? [];
|
|
1791
1902
|
}
|
|
1792
1903
|
/**
|
|
1793
1904
|
* 按当前 materialNoNum 回写各行 qty_required_(校验侧 total 已通过 getter 实时读取)
|
|
@@ -1891,23 +2002,42 @@ class MaterialConsumeTableController {
|
|
|
1891
2002
|
// }
|
|
1892
2003
|
// }
|
|
1893
2004
|
/**
|
|
1894
|
-
*
|
|
1895
|
-
* @param message
|
|
1896
|
-
* @return {*}
|
|
2005
|
+
* 生成校验清单格式的报错(仅行级,挂对应单元格)
|
|
1897
2006
|
*/
|
|
1898
|
-
calcErrorObj(
|
|
2007
|
+
calcErrorObj(err) {
|
|
2008
|
+
const targetFieldId = err.targetFieldId;
|
|
2009
|
+
const rowIndex = Math.max(this.actualTableData.indexOf(err.row), 0);
|
|
2010
|
+
const modelKey = this.widget.props.modelKey;
|
|
2011
|
+
const showFieldName = this.formModelController?.findField(modelKey, targetFieldId)?.name || targetFieldId;
|
|
1899
2012
|
return {
|
|
1900
|
-
field: this.widget.props.field
|
|
2013
|
+
field: `${this.widget.props.field}_${rowIndex}_${targetFieldId}`,
|
|
1901
2014
|
message: JSON.stringify({
|
|
1902
|
-
message:
|
|
1903
|
-
showFieldName
|
|
1904
|
-
showModelKey:
|
|
2015
|
+
message: err.message,
|
|
2016
|
+
showFieldName,
|
|
2017
|
+
showModelKey: modelKey,
|
|
1905
2018
|
showModelName: this.widget.props.tableTitle,
|
|
1906
2019
|
subFieldKey: this.widget.props.field,
|
|
1907
|
-
targetFieldId
|
|
2020
|
+
targetFieldId
|
|
1908
2021
|
})
|
|
1909
2022
|
};
|
|
1910
2023
|
}
|
|
2024
|
+
/**
|
|
2025
|
+
* 当前行 BOM 行级批注:待删除的 key + 重算后的错误
|
|
2026
|
+
* 改物料/批次会清批次数量有效期,四个字段一起替换;改数量/有效期只动自身
|
|
2027
|
+
*/
|
|
2028
|
+
getRowCommentPatch(row, field) {
|
|
2029
|
+
const rowIndex = Math.max(this.actualTableData.indexOf(row), 0);
|
|
2030
|
+
const fieldKeys = field === "qty_" || field === "expiration_date_" ? [field] : ["product_id_", "material_no_", "qty_", "expiration_date_"];
|
|
2031
|
+
const keys = fieldKeys.map((f) => `${this.widget.props.field}_${rowIndex}_${f}`);
|
|
2032
|
+
const keySet = new Set(keys);
|
|
2033
|
+
const add = {};
|
|
2034
|
+
this.bomEntriesValidator.getRowFieldErrors(row).forEach((e) => {
|
|
2035
|
+
const obj = this.calcErrorObj(e);
|
|
2036
|
+
if (!keySet.has(obj.field)) return;
|
|
2037
|
+
(add[obj.field] ??= []).push(obj);
|
|
2038
|
+
});
|
|
2039
|
+
return { keys, add };
|
|
2040
|
+
}
|
|
1911
2041
|
/**
|
|
1912
2042
|
* 是否是单独一行空数据
|
|
1913
2043
|
*/
|
|
@@ -1921,23 +2051,36 @@ class MaterialConsumeTableController {
|
|
|
1921
2051
|
return false;
|
|
1922
2052
|
}
|
|
1923
2053
|
/**
|
|
1924
|
-
*
|
|
2054
|
+
* 提交校验:先行级打标,全部通过后再组级 fail-fast toast
|
|
1925
2055
|
*/
|
|
1926
2056
|
async submitValidate() {
|
|
1927
2057
|
if (this.isOnlyEmptyRow()) {
|
|
1928
|
-
return;
|
|
2058
|
+
return { isValid: true };
|
|
2059
|
+
}
|
|
2060
|
+
for (const row of this.actualTableData) {
|
|
2061
|
+
await this.applyUnitConversionRules(row);
|
|
2062
|
+
}
|
|
2063
|
+
if (this.mcPattern === MaterialConsumptionPatternEnum.RECORD && !this.tmplBom.personal_bom_enabled_) {
|
|
2064
|
+
return { isValid: true };
|
|
2065
|
+
}
|
|
2066
|
+
const rowErrors = this.bomEntriesValidator.collectRowErrors(this.actualTableData);
|
|
2067
|
+
if (rowErrors.length) {
|
|
2068
|
+
const fields = {};
|
|
2069
|
+
rowErrors.forEach((e) => {
|
|
2070
|
+
const obj = this.calcErrorObj(e);
|
|
2071
|
+
(fields[obj.field] ??= []).push(obj);
|
|
2072
|
+
});
|
|
2073
|
+
return { isValid: false, fields };
|
|
1929
2074
|
}
|
|
1930
|
-
let errorObj;
|
|
1931
2075
|
try {
|
|
1932
|
-
|
|
1933
|
-
await this.bomEntriesValidator.validateAllRows(this.actualTableData);
|
|
1934
|
-
}
|
|
2076
|
+
await this.bomEntriesValidator.assertGroupRules(this.actualTableData);
|
|
1935
2077
|
} catch (e) {
|
|
1936
2078
|
if (e?.message) {
|
|
1937
|
-
|
|
2079
|
+
this.error(e.message);
|
|
1938
2080
|
}
|
|
2081
|
+
return { isValid: false };
|
|
1939
2082
|
}
|
|
1940
|
-
return
|
|
2083
|
+
return { isValid: true };
|
|
1941
2084
|
}
|
|
1942
2085
|
/**
|
|
1943
2086
|
* 是否有正在编辑的行
|
|
@@ -2047,27 +2190,56 @@ class MaterialConsumeTableController {
|
|
|
2047
2190
|
console.log("handleChange", opts);
|
|
2048
2191
|
if (field === "product_id_") {
|
|
2049
2192
|
if (row._scanFallback) {
|
|
2193
|
+
try {
|
|
2194
|
+
await validateReinspectionDate({
|
|
2195
|
+
product_id_: row.product_id_,
|
|
2196
|
+
material_no_: row.material_no_,
|
|
2197
|
+
material_no_id_: row.material_no__id_
|
|
2198
|
+
});
|
|
2199
|
+
} catch (e) {
|
|
2200
|
+
row.product_id_ = void 0;
|
|
2201
|
+
this.error(e.message);
|
|
2202
|
+
}
|
|
2050
2203
|
return;
|
|
2051
2204
|
}
|
|
2052
2205
|
row.material_no_ = void 0;
|
|
2053
|
-
row.
|
|
2206
|
+
row.material_no__id_ = void 0;
|
|
2207
|
+
row.material_no__lb_ = void 0;
|
|
2054
2208
|
row.qty_consumed_ = void 0;
|
|
2055
2209
|
row.qty_required_ = void 0;
|
|
2210
|
+
row.expiration_date_ = void 0;
|
|
2056
2211
|
this.setDefaultValue(row);
|
|
2212
|
+
this.updateDerivedQtyFields();
|
|
2057
2213
|
} else if (field === "material_no_") {
|
|
2058
2214
|
if (option?.is_locked_) {
|
|
2059
2215
|
row.material_no_ = void 0;
|
|
2060
2216
|
row.material_no__id_ = void 0;
|
|
2217
|
+
row.material_no__lb_ = void 0;
|
|
2061
2218
|
const msg = await getLotLockedReason(option.id_);
|
|
2062
2219
|
this.error(msg);
|
|
2063
2220
|
return;
|
|
2064
2221
|
}
|
|
2222
|
+
if (!value) return;
|
|
2223
|
+
try {
|
|
2224
|
+
await validateReinspectionDate({
|
|
2225
|
+
product_id_: option.product_id_ ?? row.product_id_,
|
|
2226
|
+
material_no_: row.material_no_ ?? value,
|
|
2227
|
+
material_no_id_: option.id_
|
|
2228
|
+
});
|
|
2229
|
+
} catch (e) {
|
|
2230
|
+
row.material_no_ = void 0;
|
|
2231
|
+
row.material_no__id_ = void 0;
|
|
2232
|
+
row.material_no__lb_ = void 0;
|
|
2233
|
+
this.error(e.message);
|
|
2234
|
+
return;
|
|
2235
|
+
}
|
|
2065
2236
|
row.product_id_ = option.product_id_;
|
|
2066
2237
|
row.expiration_date_ = option.validate_;
|
|
2067
2238
|
this.setDefaultValue(row);
|
|
2068
2239
|
} else if (field === "qty_") {
|
|
2069
2240
|
this.updateDerivedQtyFields();
|
|
2070
2241
|
}
|
|
2242
|
+
await this.applyUnitConversionRules(row);
|
|
2071
2243
|
}
|
|
2072
2244
|
}
|
|
2073
2245
|
const FormTmplBomControllerKey = "GctFormTmplBomController";
|
|
@@ -2122,31 +2294,74 @@ function findObjectBom(formInstBom, belongingObject) {
|
|
|
2122
2294
|
const objectBomList = formInstBom.formTmplObjectBomList;
|
|
2123
2295
|
return objectBomList?.find((item) => item.object_key_ === belongingObject);
|
|
2124
2296
|
}
|
|
2125
|
-
function
|
|
2297
|
+
function shouldSkipObjectBomConstraint(objectBom) {
|
|
2298
|
+
if (!objectBom) return true;
|
|
2299
|
+
if (objectBom.personal_bom_enabled_) return true;
|
|
2300
|
+
return objectBom.material_consumption_pattern_ === MaterialConsumptionPatternEnum.RECORD;
|
|
2301
|
+
}
|
|
2302
|
+
function collectObjectBomProductVersionIds(formInstBom, belongingObject) {
|
|
2303
|
+
const objectBom = findObjectBom(formInstBom, belongingObject);
|
|
2304
|
+
if (shouldSkipObjectBomConstraint(objectBom)) return null;
|
|
2305
|
+
const versionIds = /* @__PURE__ */ new Set();
|
|
2306
|
+
(formInstBom.bomEntries ?? []).forEach((entry) => {
|
|
2307
|
+
getGroupProductIds(entry).forEach((id) => {
|
|
2308
|
+
const versionId = id?.split(":").pop();
|
|
2309
|
+
if (versionId) versionIds.add(versionId);
|
|
2310
|
+
});
|
|
2311
|
+
});
|
|
2312
|
+
return versionIds.size ? Array.from(versionIds) : [EMPTY_PRODUCT_VERSION_ID];
|
|
2313
|
+
}
|
|
2314
|
+
function getObjectBomProductQuery(opts) {
|
|
2315
|
+
const ids = collectObjectBomProductVersionIds(opts.formInstBom, opts.belongingObject);
|
|
2316
|
+
return ids ? { "id_.in": ids } : null;
|
|
2317
|
+
}
|
|
2318
|
+
function normalizeSubFields(subFields, options) {
|
|
2126
2319
|
if (!subFields) return [];
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
);
|
|
2320
|
+
const list = Array.isArray(subFields) ? subFields : Object.values(subFields);
|
|
2321
|
+
const requireUsed = options?.requireUsed !== false;
|
|
2322
|
+
return list.filter((f) => Boolean(f?.key && (!requireUsed || f.used)));
|
|
2130
2323
|
}
|
|
2131
2324
|
function matchFieldBiz(f, bizType) {
|
|
2132
2325
|
return (f.bizType || f.type) === bizType;
|
|
2133
2326
|
}
|
|
2134
|
-
function pickObjectFieldKeys(subFields, belongingObject) {
|
|
2135
|
-
const list = normalizeSubFields(subFields).filter(
|
|
2327
|
+
function pickObjectFieldKeys(subFields, belongingObject, options) {
|
|
2328
|
+
const list = normalizeSubFields(subFields, options).filter(
|
|
2136
2329
|
(f) => !belongingObject || !f.belongingObject || f.belongingObject === belongingObject
|
|
2137
2330
|
);
|
|
2138
2331
|
const byBiz = (bizType) => list.find((f) => matchFieldBiz(f, bizType));
|
|
2139
2332
|
const qtyField = byBiz(FIELD_TYPE.QTY);
|
|
2333
|
+
const productField = byBiz(FIELD_TYPE.PRODUCT);
|
|
2334
|
+
const materialNoField = byBiz(FIELD_TYPE.MATERIAL_NO);
|
|
2140
2335
|
return {
|
|
2141
|
-
productKey:
|
|
2336
|
+
productKey: productField?.key,
|
|
2337
|
+
productFieldName: productField?.name,
|
|
2338
|
+
materialNoKey: materialNoField?.key,
|
|
2339
|
+
materialNoFieldName: materialNoField?.name,
|
|
2142
2340
|
qtyKey: qtyField?.key,
|
|
2143
2341
|
qtyRequiredKey: byBiz(FIELD_TYPE.QTY_REQUIRED)?.key,
|
|
2144
|
-
qtyFieldName: qtyField?.name
|
|
2342
|
+
qtyFieldName: qtyField?.name,
|
|
2343
|
+
bomEntryIdKey: byBiz(FIELD_TYPE.BOM_ENTRY_ID)?.key
|
|
2145
2344
|
};
|
|
2146
2345
|
}
|
|
2147
2346
|
function hasRequiredQtyValue(value) {
|
|
2148
2347
|
return value !== null && value !== void 0 && value !== "";
|
|
2149
2348
|
}
|
|
2349
|
+
function toObjectSubmitError(opts) {
|
|
2350
|
+
const { field, message: message2, showFieldName, showModelName, showModelKey, subFieldKey } = opts;
|
|
2351
|
+
return {
|
|
2352
|
+
field,
|
|
2353
|
+
message: buildError(
|
|
2354
|
+
{
|
|
2355
|
+
showModelName: showModelName ?? "",
|
|
2356
|
+
showModelKey: showModelKey ?? "",
|
|
2357
|
+
showFieldName: showFieldName || field,
|
|
2358
|
+
subFieldKey,
|
|
2359
|
+
targetFieldId: field
|
|
2360
|
+
},
|
|
2361
|
+
message2
|
|
2362
|
+
)
|
|
2363
|
+
};
|
|
2364
|
+
}
|
|
2150
2365
|
function resolveObjectBomEntry(opts) {
|
|
2151
2366
|
const { formInstBom, belongingObject, productId } = opts;
|
|
2152
2367
|
const objectBom = findObjectBom(formInstBom, belongingObject);
|
|
@@ -2211,10 +2426,7 @@ function validateObjectBomForScan(opts) {
|
|
|
2211
2426
|
return;
|
|
2212
2427
|
}
|
|
2213
2428
|
const objectBom = findObjectBom(formInstBom, belongingObject);
|
|
2214
|
-
if (
|
|
2215
|
-
return;
|
|
2216
|
-
}
|
|
2217
|
-
if (objectBom.personal_bom_enabled_) {
|
|
2429
|
+
if (shouldSkipObjectBomConstraint(objectBom)) {
|
|
2218
2430
|
return;
|
|
2219
2431
|
}
|
|
2220
2432
|
const bomEntries = formInstBom.bomEntries ?? [];
|
|
@@ -2223,39 +2435,49 @@ function validateObjectBomForScan(opts) {
|
|
|
2223
2435
|
}
|
|
2224
2436
|
}
|
|
2225
2437
|
function getObjectBomMaterialLotQuery(opts) {
|
|
2226
|
-
const
|
|
2227
|
-
|
|
2228
|
-
if (!objectBom || objectBom.personal_bom_enabled_) {
|
|
2229
|
-
return null;
|
|
2230
|
-
}
|
|
2231
|
-
const bomEntries = formInstBom.bomEntries ?? [];
|
|
2232
|
-
const versionIds = /* @__PURE__ */ new Set();
|
|
2233
|
-
bomEntries.forEach((entry) => {
|
|
2234
|
-
getGroupProductIds(entry).forEach((id) => {
|
|
2235
|
-
const versionId = id?.split(":").pop();
|
|
2236
|
-
if (versionId) versionIds.add(versionId);
|
|
2237
|
-
});
|
|
2238
|
-
});
|
|
2239
|
-
return {
|
|
2240
|
-
"product_id_.versionIn": versionIds.size ? Array.from(versionIds) : [EMPTY_PRODUCT_VERSION_ID]
|
|
2241
|
-
};
|
|
2438
|
+
const ids = collectObjectBomProductVersionIds(opts.formInstBom, opts.belongingObject);
|
|
2439
|
+
return ids ? { "product_id_.versionIn": ids } : null;
|
|
2242
2440
|
}
|
|
2243
2441
|
async function validateObjectBomQtyOnSubmit(opts) {
|
|
2244
|
-
const { formState, objectFieldList, formInstBom } = opts;
|
|
2442
|
+
const { formState, objectFieldList, formInstBom, showModelKey } = opts;
|
|
2245
2443
|
if (!formInstBom || !objectFieldList?.length) {
|
|
2246
|
-
return
|
|
2444
|
+
return [];
|
|
2247
2445
|
}
|
|
2248
2446
|
const sequential = !!formInstBom.sequenceEntries?.[0]?.enabled_;
|
|
2447
|
+
const errors = [];
|
|
2249
2448
|
for (const obj of objectFieldList) {
|
|
2250
2449
|
if (!obj?.objectField) continue;
|
|
2251
|
-
const
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2450
|
+
const objectBom = findObjectBom(formInstBom, obj.objectField);
|
|
2451
|
+
if (objectBom?.material_consumption_pattern_ === MaterialConsumptionPatternEnum.RECORD) {
|
|
2452
|
+
continue;
|
|
2453
|
+
}
|
|
2454
|
+
const { productKey, productFieldName, qtyKey, qtyRequiredKey, qtyFieldName } = pickObjectFieldKeys(obj.subFields, obj.objectField);
|
|
2455
|
+
const productId = productKey ? formState[productKey] : void 0;
|
|
2456
|
+
const objectShowModelName = obj.objectFieldName || obj.objectField;
|
|
2457
|
+
if (productKey && productId) {
|
|
2458
|
+
try {
|
|
2459
|
+
validateObjectBomForScan({
|
|
2460
|
+
formInstBom,
|
|
2461
|
+
belongingObject: obj.objectField,
|
|
2462
|
+
productId
|
|
2463
|
+
});
|
|
2464
|
+
} catch (e) {
|
|
2465
|
+
errors.push(
|
|
2466
|
+
toObjectSubmitError({
|
|
2467
|
+
field: productKey,
|
|
2468
|
+
message: e?.message || ERR_MATERIAL_NOT_MATCH,
|
|
2469
|
+
showFieldName: productFieldName,
|
|
2470
|
+
showModelName: objectShowModelName,
|
|
2471
|
+
showModelKey,
|
|
2472
|
+
subFieldKey: obj.objectField
|
|
2473
|
+
})
|
|
2474
|
+
);
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2255
2477
|
if (!qtyKey || !qtyRequiredKey) continue;
|
|
2478
|
+
const qtyRaw = formState[qtyKey];
|
|
2256
2479
|
const requiredRaw = formState[qtyRequiredKey];
|
|
2257
|
-
if (!hasRequiredQtyValue(requiredRaw)) continue;
|
|
2258
|
-
const productId = productKey ? formState[productKey] : void 0;
|
|
2480
|
+
if (!hasRequiredQtyValue(qtyRaw) || !hasRequiredQtyValue(requiredRaw)) continue;
|
|
2259
2481
|
const entry = resolveObjectBomEntry({
|
|
2260
2482
|
formInstBom,
|
|
2261
2483
|
belongingObject: obj.objectField,
|
|
@@ -2263,7 +2485,7 @@ async function validateObjectBomQtyOnSubmit(opts) {
|
|
|
2263
2485
|
});
|
|
2264
2486
|
if (!entry?.qty_validation_enabled_) continue;
|
|
2265
2487
|
if (entry.type_ === "view") continue;
|
|
2266
|
-
const loaded = Number(
|
|
2488
|
+
const loaded = Number(qtyRaw);
|
|
2267
2489
|
const required = Number(requiredRaw);
|
|
2268
2490
|
try {
|
|
2269
2491
|
await assertObjectQtyValidationRule({
|
|
@@ -2273,17 +2495,163 @@ async function validateObjectBomQtyOnSubmit(opts) {
|
|
|
2273
2495
|
sequential
|
|
2274
2496
|
});
|
|
2275
2497
|
} catch (e) {
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2498
|
+
errors.push(
|
|
2499
|
+
toObjectSubmitError({
|
|
2500
|
+
field: qtyKey,
|
|
2279
2501
|
message: e?.message || String(e),
|
|
2280
|
-
showFieldName: qtyFieldName
|
|
2281
|
-
|
|
2502
|
+
showFieldName: qtyFieldName,
|
|
2503
|
+
showModelName: objectShowModelName,
|
|
2504
|
+
showModelKey,
|
|
2505
|
+
subFieldKey: obj.objectField
|
|
2282
2506
|
})
|
|
2283
|
-
|
|
2507
|
+
);
|
|
2284
2508
|
}
|
|
2285
2509
|
}
|
|
2286
|
-
return
|
|
2510
|
+
return errors;
|
|
2511
|
+
}
|
|
2512
|
+
function isBlank$1(value) {
|
|
2513
|
+
return value == null || value === "";
|
|
2514
|
+
}
|
|
2515
|
+
function pickPresent(preferred, fallback) {
|
|
2516
|
+
return isBlank$1(preferred) ? fallback : preferred;
|
|
2517
|
+
}
|
|
2518
|
+
function resolveObjectFieldKeys(opts) {
|
|
2519
|
+
const obj = opts.objectFieldList?.find((item) => item.objectField === opts.belongingObject);
|
|
2520
|
+
const fromList = obj?.subFields ? pickObjectFieldKeys(obj.subFields, opts.belongingObject) : {};
|
|
2521
|
+
const fromFallback = pickObjectFieldKeys(opts.fallbackFields, opts.belongingObject, {
|
|
2522
|
+
requireUsed: false
|
|
2523
|
+
});
|
|
2524
|
+
return {
|
|
2525
|
+
productKey: pickPresent(fromList.productKey, fromFallback.productKey),
|
|
2526
|
+
productFieldName: fromList.productFieldName ?? fromFallback.productFieldName,
|
|
2527
|
+
materialNoKey: pickPresent(fromList.materialNoKey, fromFallback.materialNoKey),
|
|
2528
|
+
materialNoFieldName: fromList.materialNoFieldName ?? fromFallback.materialNoFieldName,
|
|
2529
|
+
qtyKey: pickPresent(fromList.qtyKey, fromFallback.qtyKey),
|
|
2530
|
+
qtyRequiredKey: pickPresent(fromList.qtyRequiredKey, fromFallback.qtyRequiredKey),
|
|
2531
|
+
qtyFieldName: fromList.qtyFieldName ?? fromFallback.qtyFieldName,
|
|
2532
|
+
bomEntryIdKey: pickPresent(fromList.bomEntryIdKey, fromFallback.bomEntryIdKey)
|
|
2533
|
+
};
|
|
2534
|
+
}
|
|
2535
|
+
function buildObjectLotExtraQuery(productId) {
|
|
2536
|
+
if (isBlank$1(productId)) return {};
|
|
2537
|
+
const versionId = String(productId).split(":").pop();
|
|
2538
|
+
if (!versionId) return {};
|
|
2539
|
+
return { "product_id_.versionEq": versionId };
|
|
2540
|
+
}
|
|
2541
|
+
function clearObjectLotFields(formData, materialNoKey) {
|
|
2542
|
+
if (!materialNoKey) return;
|
|
2543
|
+
formData[materialNoKey] = void 0;
|
|
2544
|
+
formData[`${materialNoKey}_id_`] = void 0;
|
|
2545
|
+
formData[`${materialNoKey}_lb_`] = void 0;
|
|
2546
|
+
}
|
|
2547
|
+
function shouldClearLotOnProductChange(opts) {
|
|
2548
|
+
const { prevProduct, nextProduct, lotValue } = opts;
|
|
2549
|
+
if (isBlank$1(prevProduct) && isBlank$1(nextProduct)) return false;
|
|
2550
|
+
if (prevProduct === nextProduct) return false;
|
|
2551
|
+
if (isBlank$1(prevProduct) && !isBlank$1(nextProduct) && !isBlank$1(lotValue)) {
|
|
2552
|
+
return false;
|
|
2553
|
+
}
|
|
2554
|
+
return true;
|
|
2555
|
+
}
|
|
2556
|
+
let fillingProduct = false;
|
|
2557
|
+
function runWithFillProduct(fn) {
|
|
2558
|
+
fillingProduct = true;
|
|
2559
|
+
try {
|
|
2560
|
+
fn();
|
|
2561
|
+
} finally {
|
|
2562
|
+
nextTick(() => {
|
|
2563
|
+
fillingProduct = false;
|
|
2564
|
+
});
|
|
2565
|
+
}
|
|
2566
|
+
}
|
|
2567
|
+
function fillProductFromLotOption(opts) {
|
|
2568
|
+
const productId = opts.option?.product_id_ ?? opts.option?._item?.product_id_;
|
|
2569
|
+
if (!opts.productKey || isBlank$1(productId)) return;
|
|
2570
|
+
runWithFillProduct(() => {
|
|
2571
|
+
opts.formData[opts.productKey] = productId;
|
|
2572
|
+
});
|
|
2573
|
+
}
|
|
2574
|
+
function resolveLotValidateParams(keys, formData, option) {
|
|
2575
|
+
return {
|
|
2576
|
+
product_id_: option?.product_id_ ?? option?._item?.product_id_ ?? (keys.productKey ? formData[keys.productKey] : void 0),
|
|
2577
|
+
material_no_: option?.name_ ?? option?.__VALUE__ ?? (keys.materialNoKey ? formData[keys.materialNoKey] : void 0),
|
|
2578
|
+
material_no_id_: option?.id_ ?? (keys.materialNoKey ? formData[`${keys.materialNoKey}_id_`] : void 0)
|
|
2579
|
+
};
|
|
2580
|
+
}
|
|
2581
|
+
async function applyConsumeObjectTraceChange(opts) {
|
|
2582
|
+
const { belongingObject, role, formData } = opts;
|
|
2583
|
+
if (!belongingObject || !formData) return {};
|
|
2584
|
+
const keys = resolveObjectFieldKeys({
|
|
2585
|
+
belongingObject,
|
|
2586
|
+
objectFieldList: opts.objectFieldList,
|
|
2587
|
+
fallbackFields: opts.fallbackFields
|
|
2588
|
+
});
|
|
2589
|
+
if (role === FIELD_TYPE.PRODUCT) {
|
|
2590
|
+
if (!("prevProduct" in opts) || fillingProduct) return {};
|
|
2591
|
+
if (shouldClearLotOnProductChange({
|
|
2592
|
+
prevProduct: opts.prevProduct,
|
|
2593
|
+
nextProduct: opts.nextValue,
|
|
2594
|
+
lotValue: keys.materialNoKey ? formData[keys.materialNoKey] : void 0
|
|
2595
|
+
})) {
|
|
2596
|
+
clearObjectLotFields(formData, keys.materialNoKey);
|
|
2597
|
+
}
|
|
2598
|
+
if (keys.bomEntryIdKey) {
|
|
2599
|
+
formData[keys.bomEntryIdKey] = null;
|
|
2600
|
+
if (!isBlank$1(opts.nextValue) && opts.formInstBom) {
|
|
2601
|
+
const entry = resolveObjectBomEntry({
|
|
2602
|
+
formInstBom: opts.formInstBom,
|
|
2603
|
+
belongingObject,
|
|
2604
|
+
productId: String(opts.nextValue)
|
|
2605
|
+
});
|
|
2606
|
+
if (entry) formData[keys.bomEntryIdKey] = entry.id_;
|
|
2607
|
+
}
|
|
2608
|
+
}
|
|
2609
|
+
const lotValue = keys.materialNoKey ? formData[keys.materialNoKey] : void 0;
|
|
2610
|
+
if (!isBlank$1(opts.nextValue) && !isBlank$1(lotValue)) {
|
|
2611
|
+
try {
|
|
2612
|
+
await validateReinspectionDate({
|
|
2613
|
+
product_id_: String(opts.nextValue),
|
|
2614
|
+
material_no_: lotValue,
|
|
2615
|
+
material_no_id_: keys.materialNoKey ? formData[`${keys.materialNoKey}_id_`] : void 0
|
|
2616
|
+
});
|
|
2617
|
+
} catch (e) {
|
|
2618
|
+
return { abortReinspection: e?.message || String(e) };
|
|
2619
|
+
}
|
|
2620
|
+
}
|
|
2621
|
+
return {};
|
|
2622
|
+
}
|
|
2623
|
+
if (role === FIELD_TYPE.MATERIAL_NO) {
|
|
2624
|
+
if (opts.option?.is_locked_) {
|
|
2625
|
+
clearObjectLotFields(formData, keys.materialNoKey);
|
|
2626
|
+
return { abortLocked: opts.option.id_ };
|
|
2627
|
+
}
|
|
2628
|
+
const params = resolveLotValidateParams(keys, formData, opts.option);
|
|
2629
|
+
if (isBlank$1(params.material_no_) && isBlank$1(params.material_no_id_)) return {};
|
|
2630
|
+
try {
|
|
2631
|
+
await validateReinspectionDate(params);
|
|
2632
|
+
} catch (e) {
|
|
2633
|
+
clearObjectLotFields(formData, keys.materialNoKey);
|
|
2634
|
+
return { abortReinspection: e?.message || String(e) };
|
|
2635
|
+
}
|
|
2636
|
+
fillProductFromLotOption({
|
|
2637
|
+
formData,
|
|
2638
|
+
productKey: keys.productKey,
|
|
2639
|
+
option: opts.option
|
|
2640
|
+
});
|
|
2641
|
+
if (keys.bomEntryIdKey && opts.formInstBom) {
|
|
2642
|
+
const productId = opts.option?.product_id_ ?? opts.option?._item?.product_id_;
|
|
2643
|
+
if (!isBlank$1(productId)) {
|
|
2644
|
+
const entry = resolveObjectBomEntry({
|
|
2645
|
+
formInstBom: opts.formInstBom,
|
|
2646
|
+
belongingObject,
|
|
2647
|
+
productId: String(productId)
|
|
2648
|
+
});
|
|
2649
|
+
if (entry) formData[keys.bomEntryIdKey] = entry.id_;
|
|
2650
|
+
}
|
|
2651
|
+
}
|
|
2652
|
+
return {};
|
|
2653
|
+
}
|
|
2654
|
+
return {};
|
|
2287
2655
|
}
|
|
2288
2656
|
function useMaterialBalance() {
|
|
2289
2657
|
async function getConsumeData({ cloneRuntimeJson, operationId, materialNo }) {
|
|
@@ -2323,6 +2691,21 @@ function useMaterialBalance() {
|
|
|
2323
2691
|
destoryConsumeModal
|
|
2324
2692
|
};
|
|
2325
2693
|
}
|
|
2694
|
+
function getAppInfo() {
|
|
2695
|
+
return api.apaas.designerCommon.getGetApp();
|
|
2696
|
+
}
|
|
2697
|
+
async function getSuiteKey() {
|
|
2698
|
+
const appInfo = await getAppInfo();
|
|
2699
|
+
return appInfo?.suiteKey;
|
|
2700
|
+
}
|
|
2701
|
+
async function isEdhrSuite() {
|
|
2702
|
+
const suiteKey = await getSuiteKey();
|
|
2703
|
+
return suiteKey === "eDHR";
|
|
2704
|
+
}
|
|
2705
|
+
async function isEqmSuite() {
|
|
2706
|
+
const suiteKey = await getSuiteKey();
|
|
2707
|
+
return suiteKey === "EQM";
|
|
2708
|
+
}
|
|
2326
2709
|
var SubTableActionEnum = /* @__PURE__ */ ((SubTableActionEnum2) => {
|
|
2327
2710
|
SubTableActionEnum2["QuickFillRowCurrent"] = "quickFillRowCurrent";
|
|
2328
2711
|
SubTableActionEnum2["InsertRowBefore"] = "insertRowBefore";
|
|
@@ -2331,6 +2714,7 @@ var SubTableActionEnum = /* @__PURE__ */ ((SubTableActionEnum2) => {
|
|
|
2331
2714
|
SubTableActionEnum2["CopyRowAfter"] = "copyRowAfter";
|
|
2332
2715
|
SubTableActionEnum2["CopyRow2Last"] = "copyRow2Last";
|
|
2333
2716
|
SubTableActionEnum2["DeleteRowCurrent"] = "deleteRowCurrent";
|
|
2717
|
+
SubTableActionEnum2["ClearRowCurrent"] = "clearRowCurrent";
|
|
2334
2718
|
SubTableActionEnum2["CONFIRM"] = "CONFIRM";
|
|
2335
2719
|
SubTableActionEnum2["SCAN"] = "SCAN";
|
|
2336
2720
|
SubTableActionEnum2["VIEW_BOM"] = "VIEW_BOM";
|
|
@@ -2419,6 +2803,12 @@ function getMenuByAction(type) {
|
|
|
2419
2803
|
key: SubTableActionEnum.DeleteRowCurrent,
|
|
2420
2804
|
label: "删除行",
|
|
2421
2805
|
icon: "size24 icon-a-shanchubiaoge"
|
|
2806
|
+
},
|
|
2807
|
+
[SubTableActionEnum.ClearRowCurrent]: {
|
|
2808
|
+
type: SubTableActionMenuTypeEnum.ACTION,
|
|
2809
|
+
key: SubTableActionEnum.ClearRowCurrent,
|
|
2810
|
+
label: "清除内容",
|
|
2811
|
+
icon: "size24 icon-a-shanchubiaoge"
|
|
2422
2812
|
}
|
|
2423
2813
|
};
|
|
2424
2814
|
return map[type];
|
|
@@ -2542,6 +2932,46 @@ class TdHandler {
|
|
|
2542
2932
|
this.mergeTd({ cellWidget: { props: { newSpecificConfig: { customLoader } } } });
|
|
2543
2933
|
}
|
|
2544
2934
|
}
|
|
2935
|
+
const SCAN_ROW_META_KEYS = /* @__PURE__ */ new Set([FRONT_ROW_KEY, "id_", "id", "group_", "deleted_", "delete_"]);
|
|
2936
|
+
function hasRowId(row) {
|
|
2937
|
+
const id = row.id_ ?? row.id;
|
|
2938
|
+
return id !== void 0 && id !== null && String(id).trim() !== "";
|
|
2939
|
+
}
|
|
2940
|
+
function isEmptyScanValue(value) {
|
|
2941
|
+
if (value == null || value === "") return true;
|
|
2942
|
+
if (typeof value === "object" && !Array.isArray(value) && Object.keys(value).length === 0) {
|
|
2943
|
+
return true;
|
|
2944
|
+
}
|
|
2945
|
+
return false;
|
|
2946
|
+
}
|
|
2947
|
+
function isProductBatchEmptyRow(row) {
|
|
2948
|
+
return isEmptyScanValue(row.product_id_) && isEmptyScanValue(row.material_no_) && isEmptyScanValue(row.material_no__id_);
|
|
2949
|
+
}
|
|
2950
|
+
function hasSubtableBusinessData(row, ignoreValues = {}) {
|
|
2951
|
+
if (!row || typeof row !== "object") return false;
|
|
2952
|
+
if (hasRowId(row)) return true;
|
|
2953
|
+
return Object.keys(row).some((key) => {
|
|
2954
|
+
if (SCAN_ROW_META_KEYS.has(key) || key.startsWith("_")) return false;
|
|
2955
|
+
const value = row[key];
|
|
2956
|
+
if (isEmptyScanValue(value)) return false;
|
|
2957
|
+
if (key in ignoreValues && value === ignoreValues[key]) return false;
|
|
2958
|
+
return true;
|
|
2959
|
+
});
|
|
2960
|
+
}
|
|
2961
|
+
function appendOrFillScanRow(visibleRows, row, ignoreValues = {}, isEmptyRow = (item) => !hasSubtableBusinessData(item, ignoreValues)) {
|
|
2962
|
+
const emptyIndex = visibleRows.findIndex((item) => item && !item.deleted_ && isEmptyRow(item));
|
|
2963
|
+
if (emptyIndex >= 0) {
|
|
2964
|
+
const existing = visibleRows[emptyIndex];
|
|
2965
|
+
const next = { ...existing };
|
|
2966
|
+
for (const [key, value] of Object.entries(row)) {
|
|
2967
|
+
if (SCAN_ROW_META_KEYS.has(key)) continue;
|
|
2968
|
+
next[key] = value;
|
|
2969
|
+
}
|
|
2970
|
+
return visibleRows.map((item, index) => index === emptyIndex ? next : item);
|
|
2971
|
+
}
|
|
2972
|
+
ensureFrontRowKey(row);
|
|
2973
|
+
return [...visibleRows, row];
|
|
2974
|
+
}
|
|
2545
2975
|
function resolveScanParsedValue(input) {
|
|
2546
2976
|
if (input.parsedValue && typeof input.parsedValue === "object") {
|
|
2547
2977
|
return input.parsedValue;
|
|
@@ -2851,15 +3281,45 @@ class SubTableCore {
|
|
|
2851
3281
|
return;
|
|
2852
3282
|
}
|
|
2853
3283
|
this.isScanOpen = true;
|
|
3284
|
+
const { disableBarcodeParsing, scanParamType } = this.bizTableConfig || {};
|
|
2854
3285
|
await this.render.openScanModal({
|
|
2855
3286
|
title: this.ctx.widget.props.tableTitle,
|
|
2856
3287
|
subModelKey: this.subModelKey,
|
|
2857
3288
|
formModelController: this.formModelController,
|
|
2858
|
-
scanRules: this.scanRuleProps,
|
|
3289
|
+
scanRules: disableBarcodeParsing ? void 0 : this.scanRuleProps,
|
|
3290
|
+
scanParam: disableBarcodeParsing ? scanParamType : void 0,
|
|
2859
3291
|
onScan: this.onScan
|
|
2860
3292
|
});
|
|
2861
3293
|
this.isScanOpen = false;
|
|
2862
3294
|
}
|
|
3295
|
+
/** 解析子表默认值(函数默认值先求值),扫码填空行时忽略这些字段 */
|
|
3296
|
+
resolveScanIgnoreValues() {
|
|
3297
|
+
const defaultMap = this.calcDefaultMap() || {};
|
|
3298
|
+
const ignoreValues = {};
|
|
3299
|
+
for (const [key, value] of Object.entries(defaultMap)) {
|
|
3300
|
+
ignoreValues[key] = typeof value === "function" ? value() : value;
|
|
3301
|
+
}
|
|
3302
|
+
return ignoreValues;
|
|
3303
|
+
}
|
|
3304
|
+
/**
|
|
3305
|
+
* 扫码空行判定。默认走整行业务字段;出入库可覆盖为只看物料/批次。
|
|
3306
|
+
*/
|
|
3307
|
+
isEmptyScanRow(row, ignoreValues) {
|
|
3308
|
+
return !hasSubtableBusinessData(row, ignoreValues);
|
|
3309
|
+
}
|
|
3310
|
+
/**
|
|
3311
|
+
* 扫码入行:优先回填首个空壳占位行,否则追加到表尾。
|
|
3312
|
+
* 对齐 Word appendOrFillScanRow,避免仅一行空壳时扫码落到第二行。
|
|
3313
|
+
*/
|
|
3314
|
+
appendOrFillScanRow(row) {
|
|
3315
|
+
const ignoreValues = this.resolveScanIgnoreValues();
|
|
3316
|
+
this.tableData = appendOrFillScanRow(
|
|
3317
|
+
this.showTableData,
|
|
3318
|
+
row,
|
|
3319
|
+
ignoreValues,
|
|
3320
|
+
(item) => this.isEmptyScanRow(item, ignoreValues)
|
|
3321
|
+
);
|
|
3322
|
+
}
|
|
2863
3323
|
/**
|
|
2864
3324
|
* 扫码多条候选时选择一行(1 条自动选中)
|
|
2865
3325
|
*/
|
|
@@ -2951,14 +3411,37 @@ class DeviceLinkTmplUtil {
|
|
|
2951
3411
|
};
|
|
2952
3412
|
}
|
|
2953
3413
|
/**
|
|
2954
|
-
*
|
|
2955
|
-
*
|
|
2956
|
-
* @param tmpl
|
|
2957
|
-
* @return {*}
|
|
3414
|
+
* 推荐模式保存时转成运行提示词:文案保持 ${字段名},
|
|
3415
|
+
* 按插入时记下的字段补上与普通模式相同的 JSON 回写格式。
|
|
2958
3416
|
*/
|
|
3417
|
+
static buildRecommendedRuntimePrompt(tmpl) {
|
|
3418
|
+
const text = tmpl.recommendedPrompt ?? this.DEFAULT_RECOMMENDED_PROMPT;
|
|
3419
|
+
const params = (tmpl.identifyParams || []).filter(
|
|
3420
|
+
(item) => item.prompt?.trim() && item.formField
|
|
3421
|
+
);
|
|
3422
|
+
const fieldKeys = [];
|
|
3423
|
+
params.forEach((item) => {
|
|
3424
|
+
const token = "${" + item.prompt.trim() + "}";
|
|
3425
|
+
const formField = item.formField;
|
|
3426
|
+
if (!text.includes(token) || !formField) return;
|
|
3427
|
+
const fieldKey = formField.split(".").at(-1);
|
|
3428
|
+
if (fieldKey && !fieldKeys.includes(fieldKey)) {
|
|
3429
|
+
fieldKeys.push(fieldKey);
|
|
3430
|
+
}
|
|
3431
|
+
});
|
|
3432
|
+
if (!fieldKeys.length) return text;
|
|
3433
|
+
const jsonObj = fieldKeys.reduce((acc, fieldKey) => {
|
|
3434
|
+
acc[fieldKey] = { value: null };
|
|
3435
|
+
return acc;
|
|
3436
|
+
}, {});
|
|
3437
|
+
return `${text}
|
|
3438
|
+
请识别图片中的读数,以
|
|
3439
|
+
${JSON.stringify(jsonObj, null, 2)}
|
|
3440
|
+
格式返回`;
|
|
3441
|
+
}
|
|
2959
3442
|
static calcEntirePrompt(tmpl) {
|
|
2960
3443
|
if (tmpl.promptMode === "RECOMMENDED") {
|
|
2961
|
-
return
|
|
3444
|
+
return this.buildRecommendedRuntimePrompt(tmpl);
|
|
2962
3445
|
}
|
|
2963
3446
|
const validParams = (tmpl.identifyParams || []).map((item) => ({
|
|
2964
3447
|
prompt: item.prompt?.trim(),
|
|
@@ -3149,7 +3632,7 @@ class FormTmplConfigController {
|
|
|
3149
3632
|
* 初始化权限
|
|
3150
3633
|
*/
|
|
3151
3634
|
async initPermissions() {
|
|
3152
|
-
this.state.IOTPermission = await api.platform.license.getModuleAuth({
|
|
3635
|
+
this.state.IOTPermission = await api.platform.license.getModuleAuth({ moduleType: "IOT" }) || false;
|
|
3153
3636
|
this.state.OCRPermission = await api.apaas.onlineFormTmpl.getIsOcrGranted() || false;
|
|
3154
3637
|
}
|
|
3155
3638
|
/**
|
|
@@ -3162,7 +3645,7 @@ class FormTmplConfigController {
|
|
|
3162
3645
|
pageNo: 1,
|
|
3163
3646
|
pageSize: 100
|
|
3164
3647
|
});
|
|
3165
|
-
this.state.OCRModelPrecisionOptions = (result?.
|
|
3648
|
+
this.state.OCRModelPrecisionOptions = (result?.data || []).filter((item) => item.text && item.value).map((item) => ({ label: item.text, value: item.value }));
|
|
3166
3649
|
} catch {
|
|
3167
3650
|
this.state.OCRModelPrecisionOptions = [];
|
|
3168
3651
|
}
|
|
@@ -3276,6 +3759,47 @@ function useFormTmplConfig() {
|
|
|
3276
3759
|
injectController
|
|
3277
3760
|
};
|
|
3278
3761
|
}
|
|
3762
|
+
const OPERATION_RECEIVE_QTY_API = {
|
|
3763
|
+
modelCategory: "entity",
|
|
3764
|
+
modelKey: "em_routing_operation_number",
|
|
3765
|
+
bsKey: "getOne"
|
|
3766
|
+
};
|
|
3767
|
+
function isBlank(value) {
|
|
3768
|
+
return value == null || value === "";
|
|
3769
|
+
}
|
|
3770
|
+
function unwrapBizPayload(res) {
|
|
3771
|
+
if (!res || typeof res !== "object") return null;
|
|
3772
|
+
const withData = res;
|
|
3773
|
+
const payload = withData.data != null && typeof withData.data === "object" ? withData.data : res;
|
|
3774
|
+
if (payload.data != null && typeof payload.data === "object" && !Array.isArray(payload.data)) {
|
|
3775
|
+
return payload.data;
|
|
3776
|
+
}
|
|
3777
|
+
return payload;
|
|
3778
|
+
}
|
|
3779
|
+
async function fetchOperationReceiveQty(paramsConfig) {
|
|
3780
|
+
const containerId = paramsConfig?.containerId;
|
|
3781
|
+
const routingOperationId = paramsConfig?.routingOperationId;
|
|
3782
|
+
if (isBlank(containerId) || isBlank(routingOperationId)) return void 0;
|
|
3783
|
+
try {
|
|
3784
|
+
const res = await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
|
|
3785
|
+
OPERATION_RECEIVE_QTY_API,
|
|
3786
|
+
{},
|
|
3787
|
+
{
|
|
3788
|
+
query: {
|
|
3789
|
+
container_id_: String(containerId),
|
|
3790
|
+
routing_operation_id_: String(routingOperationId)
|
|
3791
|
+
}
|
|
3792
|
+
}
|
|
3793
|
+
);
|
|
3794
|
+
const payload = unwrapBizPayload(res);
|
|
3795
|
+
const raw = payload?.qty_current_;
|
|
3796
|
+
if (raw === void 0 || raw === null || raw === "") return void 0;
|
|
3797
|
+
const num = Number(raw);
|
|
3798
|
+
return Number.isNaN(num) ? void 0 : num;
|
|
3799
|
+
} catch {
|
|
3800
|
+
return void 0;
|
|
3801
|
+
}
|
|
3802
|
+
}
|
|
3279
3803
|
const _hoisted_1$5 = ["data-merge", "data-fill-direction"];
|
|
3280
3804
|
const _hoisted_2$1 = {
|
|
3281
3805
|
key: 0,
|
|
@@ -3664,6 +4188,9 @@ const DocumentSubTable = /* @__PURE__ */ defineComponent({
|
|
|
3664
4188
|
class: "iconfont icon-jinggao"
|
|
3665
4189
|
}),
|
|
3666
4190
|
content,
|
|
4191
|
+
okText: $t("sys.okText"),
|
|
4192
|
+
cancelText: $t("sys.cancel"),
|
|
4193
|
+
zIndex: 1050,
|
|
3667
4194
|
onOk() {
|
|
3668
4195
|
handleDeleteRow(rowData, dataIdx);
|
|
3669
4196
|
}
|
|
@@ -4027,10 +4554,6 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4027
4554
|
const tableController = props.tableController;
|
|
4028
4555
|
const paperWidget = inject(NCB_PROVIDE.PAGER, null);
|
|
4029
4556
|
const unitConversionRules = paperWidget?.props?.unitConversionRules ?? [];
|
|
4030
|
-
const {
|
|
4031
|
-
currentPageFormState
|
|
4032
|
-
} = useCurrentPageFormState();
|
|
4033
|
-
const selfInfoList = inject(NCB_PROVIDE.FORM_INST_LIST, []);
|
|
4034
4557
|
provide(NCB_PROVIDE.MATERIAL_CONSUME_TABLE_CONTROLLER, tableController);
|
|
4035
4558
|
const {
|
|
4036
4559
|
field = "",
|
|
@@ -4051,21 +4574,13 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4051
4574
|
updateCalcCallback?.(dataRelationShip?.uniqueId);
|
|
4052
4575
|
}
|
|
4053
4576
|
});
|
|
4054
|
-
const currentSelfInfo = selfInfoList?.find((item) => item?.id === dataRelationShip?.key || item?.uniqueId === dataRelationShip?.uniqueId) ?? selfInfoList?.[0];
|
|
4055
4577
|
const currentFieldDefaultData = computed(() => {
|
|
4056
4578
|
return defaultDataMap?.[dataRelationShip?.uniqueId ?? ""] ?? {};
|
|
4057
4579
|
});
|
|
4058
|
-
tableController.
|
|
4059
|
-
tableDataRef: modelValue,
|
|
4580
|
+
tableController.bindView({
|
|
4060
4581
|
widget: props.widget,
|
|
4061
4582
|
formModelController,
|
|
4062
|
-
unitConversionRules
|
|
4063
|
-
mainFormState: currentPageFormState,
|
|
4064
|
-
dataStatus: currentSelfInfo?.dataStatus,
|
|
4065
|
-
defaultRowData: renderUtils.getDefaultValueInfo({
|
|
4066
|
-
defaultDataMap: currentFieldDefaultData.value,
|
|
4067
|
-
key: field
|
|
4068
|
-
})
|
|
4583
|
+
unitConversionRules
|
|
4069
4584
|
});
|
|
4070
4585
|
const dataInfo = computed(() => {
|
|
4071
4586
|
const visibleToRealIndexMap = {};
|
|
@@ -4104,6 +4619,11 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4104
4619
|
row.tempDeleted = true;
|
|
4105
4620
|
}
|
|
4106
4621
|
};
|
|
4622
|
+
const clearMcValidatorComments = () => {
|
|
4623
|
+
if (!dataRelationShip) return;
|
|
4624
|
+
dataRelationShip.mcValidatorMessageMap = {};
|
|
4625
|
+
dataRelationShip.mcValidatorLocationList = [];
|
|
4626
|
+
};
|
|
4107
4627
|
const deleteRowAt = (row, index) => {
|
|
4108
4628
|
recordSubtableRowDelete(dataRelationShip, field, row);
|
|
4109
4629
|
deleteSubtableRow(field, index);
|
|
@@ -4123,6 +4643,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4123
4643
|
deleteRowAt(rowData, realIndex);
|
|
4124
4644
|
}
|
|
4125
4645
|
modelValue.value = relocateDeletedRowsToEnd(modelValue.value.filter((d) => !d.tempDeleted));
|
|
4646
|
+
clearMcValidatorComments();
|
|
4126
4647
|
};
|
|
4127
4648
|
const createDefaultRows = (rowNum, quickFillDatas, patch) => {
|
|
4128
4649
|
return Array.from({
|
|
@@ -4140,6 +4661,23 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4140
4661
|
return row;
|
|
4141
4662
|
});
|
|
4142
4663
|
};
|
|
4664
|
+
const PRESERVE_ROW_KEYS = ["id_", FRONT_ROW_KEY, "group_"];
|
|
4665
|
+
const handleClearRow = (rowData) => {
|
|
4666
|
+
const defaultRow = omit(createDefaultRows(1)[0], PRESERVE_ROW_KEYS);
|
|
4667
|
+
const preserved = pick(rowData, PRESERVE_ROW_KEYS);
|
|
4668
|
+
Object.keys(rowData).forEach((key) => {
|
|
4669
|
+
if (!PRESERVE_ROW_KEYS.includes(key)) {
|
|
4670
|
+
delete rowData[key];
|
|
4671
|
+
}
|
|
4672
|
+
});
|
|
4673
|
+
Object.assign(rowData, defaultRow, preserved);
|
|
4674
|
+
tableController.setDefaultValue(rowData);
|
|
4675
|
+
rowData.bom_entry_id_ = void 0;
|
|
4676
|
+
rowData.qty_consumed_total_ = void 0;
|
|
4677
|
+
clearMcValidatorComments();
|
|
4678
|
+
tableController.updateDerivedQtyFields();
|
|
4679
|
+
updateCalcCallback?.(dataRelationShip?.uniqueId);
|
|
4680
|
+
};
|
|
4143
4681
|
const insertRowsAt = (insertIndex, rows) => {
|
|
4144
4682
|
if (!rows.length) return;
|
|
4145
4683
|
insertSubtableRows(field, insertIndex, rows.length);
|
|
@@ -4147,6 +4685,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4147
4685
|
modelValue.value = relocateDeletedRowsToEnd(modelValue.value);
|
|
4148
4686
|
recordSubtableRowAdd(dataRelationShip, field, rows);
|
|
4149
4687
|
updateCalcCallback?.(dataRelationShip?.uniqueId);
|
|
4688
|
+
clearMcValidatorComments();
|
|
4150
4689
|
};
|
|
4151
4690
|
const resolveRealIndex = (index) => dataInfo.value.visibleToRealIndexMap[props.start + index];
|
|
4152
4691
|
const handleAddRowForGroup = ({
|
|
@@ -4342,18 +4881,37 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4342
4881
|
class: "iconfont icon-jinggao"
|
|
4343
4882
|
}),
|
|
4344
4883
|
content: "是否确认删除?",
|
|
4884
|
+
okText: $t("sys.okText"),
|
|
4885
|
+
cancelText: $t("sys.cancel"),
|
|
4345
4886
|
onOk() {
|
|
4346
4887
|
handleDeleteRow(rowData, dataIdx);
|
|
4347
4888
|
tableController.updateDerivedQtyFields();
|
|
4348
4889
|
}
|
|
4349
4890
|
});
|
|
4350
4891
|
break;
|
|
4892
|
+
case "clearRowCurrent":
|
|
4893
|
+
Modal.confirm({
|
|
4894
|
+
width: 316,
|
|
4895
|
+
centered: true,
|
|
4896
|
+
class: "confirm-before-delete-modal",
|
|
4897
|
+
icon: h("i", {
|
|
4898
|
+
class: "iconfont icon-jinggao"
|
|
4899
|
+
}),
|
|
4900
|
+
content: "是否确认清除内容?",
|
|
4901
|
+
okText: $t("sys.okText"),
|
|
4902
|
+
cancelText: $t("sys.cancel"),
|
|
4903
|
+
onOk() {
|
|
4904
|
+
handleClearRow(rowData);
|
|
4905
|
+
}
|
|
4906
|
+
});
|
|
4907
|
+
break;
|
|
4351
4908
|
default:
|
|
4352
4909
|
handleAction(key, rowData);
|
|
4353
4910
|
}
|
|
4354
4911
|
};
|
|
4355
4912
|
const renderTr2Td = (trKey, trData, rowData, {
|
|
4356
4913
|
showDelBtn,
|
|
4914
|
+
showClearBtn = false,
|
|
4357
4915
|
showActionMenu,
|
|
4358
4916
|
showScanBtn,
|
|
4359
4917
|
showEditBtn,
|
|
@@ -4361,6 +4919,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4361
4919
|
dynHeight,
|
|
4362
4920
|
showInsert1RowBtn
|
|
4363
4921
|
}) => {
|
|
4922
|
+
const extraRowAction = showDelBtn ? SubTableActionEnum.DeleteRowCurrent : showClearBtn ? SubTableActionEnum.ClearRowCurrent : void 0;
|
|
4364
4923
|
const menus = [
|
|
4365
4924
|
{
|
|
4366
4925
|
type: SubTableActionMenuTypeEnum.SUBTITLE,
|
|
@@ -4382,9 +4941,9 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4382
4941
|
showInsert1RowBtn ? getMenuByAction(SubTableActionEnum.Insert1RowAfter) : void 0,
|
|
4383
4942
|
getMenuByAction(SubTableActionEnum.Insert1GroupAfter),
|
|
4384
4943
|
// getCopySubMenu(),
|
|
4385
|
-
...
|
|
4944
|
+
...extraRowAction ? [{
|
|
4386
4945
|
type: SubTableActionMenuTypeEnum.DIVIDER
|
|
4387
|
-
}, getMenuByAction(
|
|
4946
|
+
}, getMenuByAction(extraRowAction)] : []
|
|
4388
4947
|
].filter(Boolean);
|
|
4389
4948
|
const realRowIndex = dataIdx !== -1 ? resolveRealIndex(dataIdx) : void 0;
|
|
4390
4949
|
return createVNode("tr", {
|
|
@@ -4498,14 +5057,16 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4498
5057
|
return dynamicIds.map((rowId, rowIdx) => {
|
|
4499
5058
|
const isLastDynRow = rowIdx === lastDynRowIdx;
|
|
4500
5059
|
const showDelBtn = dataInfo.value.hasSubData && isLastDynRow;
|
|
4501
|
-
const
|
|
5060
|
+
const showClearBtn = !dataInfo.value.hasSubData && isLastDynRow;
|
|
5061
|
+
const showScanBtn = !isFormChange.value && isLastDynRow;
|
|
4502
5062
|
const showActionMenu = isLastDynRow;
|
|
4503
5063
|
const showEditBtn = !isFormChange.value && data.is_confirmed_;
|
|
4504
|
-
const showInsert1RowBtn = !isFormChange.value && !data.is_confirmed_;
|
|
5064
|
+
const showInsert1RowBtn = isFormChange.value || !isFormChange.value && !data.is_confirmed_;
|
|
4505
5065
|
const row = props.widgetCenter[rowId];
|
|
4506
5066
|
const dynHeight = props.subInfo.dynamicRowHeights?.[rowId]?.[dataIdx];
|
|
4507
5067
|
return renderTr2Td(`${stableRowKey}_${rowIdx}`, row, data, {
|
|
4508
5068
|
showDelBtn,
|
|
5069
|
+
showClearBtn,
|
|
4509
5070
|
showActionMenu,
|
|
4510
5071
|
showScanBtn,
|
|
4511
5072
|
showEditBtn,
|
|
@@ -4534,6 +5095,28 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4534
5095
|
const props = __props;
|
|
4535
5096
|
const rows = ref([]);
|
|
4536
5097
|
const cols = ref([]);
|
|
5098
|
+
const gridContainer = ref(null);
|
|
5099
|
+
const gridWidth = ref(0);
|
|
5100
|
+
const availableWidth = computed(() => Math.max(0, Math.floor(gridWidth.value) - 2));
|
|
5101
|
+
const colSize = computed(
|
|
5102
|
+
() => Math.max(200, Math.floor(availableWidth.value / (cols.value.length || 1)))
|
|
5103
|
+
);
|
|
5104
|
+
const gridCols = computed(
|
|
5105
|
+
() => cols.value.map((col, index) => ({
|
|
5106
|
+
...col,
|
|
5107
|
+
size: index === cols.value.length - 1 && availableWidth.value >= cols.value.length * 200 ? availableWidth.value - colSize.value * index : colSize.value
|
|
5108
|
+
}))
|
|
5109
|
+
);
|
|
5110
|
+
let resizeObserver;
|
|
5111
|
+
onMounted(() => {
|
|
5112
|
+
if (!gridContainer.value) return;
|
|
5113
|
+
gridWidth.value = gridContainer.value.clientWidth;
|
|
5114
|
+
resizeObserver = new ResizeObserver((entries) => {
|
|
5115
|
+
if (entries[0]) gridWidth.value = entries[0].contentRect.width;
|
|
5116
|
+
});
|
|
5117
|
+
resizeObserver.observe(gridContainer.value);
|
|
5118
|
+
});
|
|
5119
|
+
onUnmounted(() => resizeObserver?.disconnect());
|
|
4537
5120
|
onBeforeMount(() => {
|
|
4538
5121
|
const { rowCount, colCount } = props;
|
|
4539
5122
|
const newRow = () => Array.from({ length: colCount }).reduce((map, v, i) => {
|
|
@@ -4592,23 +5175,29 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4592
5175
|
createElementVNode("li", null, " 表单中支持快速填报的字段类型:文本、长文本、整数、长整数、小数、精度小数、日期、时间、日期时间、LOT/SN、报废物料批次、枚举单选、枚举多选(选项间以“,”分割) ")
|
|
4593
5176
|
])
|
|
4594
5177
|
], -1)),
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
5178
|
+
createElementVNode("div", {
|
|
5179
|
+
ref_key: "gridContainer",
|
|
5180
|
+
ref: gridContainer,
|
|
5181
|
+
class: "grid-container"
|
|
5182
|
+
}, [
|
|
5183
|
+
createVNode(unref(q), {
|
|
5184
|
+
class: "cell-border",
|
|
5185
|
+
range: "",
|
|
5186
|
+
resize: "",
|
|
5187
|
+
colSize: colSize.value,
|
|
5188
|
+
source: rows.value,
|
|
5189
|
+
columns: gridCols.value,
|
|
5190
|
+
theme: "material",
|
|
5191
|
+
"hide-attribution": "",
|
|
5192
|
+
"apply-on-close": true,
|
|
5193
|
+
onBeforepaste: handleBeforePaste
|
|
5194
|
+
}, null, 8, ["colSize", "source", "columns"])
|
|
5195
|
+
], 512)
|
|
4607
5196
|
]);
|
|
4608
5197
|
};
|
|
4609
5198
|
}
|
|
4610
5199
|
});
|
|
4611
|
-
const FixedQuickFillModal = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
5200
|
+
const FixedQuickFillModal = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-05f7a433"]]);
|
|
4612
5201
|
const _hoisted_1$1 = {
|
|
4613
5202
|
key: 1,
|
|
4614
5203
|
class: "sub-table-action__subtitle"
|
|
@@ -4865,22 +5454,26 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
4865
5454
|
})
|
|
4866
5455
|
]),
|
|
4867
5456
|
default: withCtx(() => [
|
|
4868
|
-
_cache[3] || (_cache[3] = createElementVNode("div", { class: "more-btn" }, [
|
|
4869
|
-
createElementVNode("
|
|
5457
|
+
_cache[3] || (_cache[3] = createElementVNode("div", { class: "sub-more-btn" }, [
|
|
5458
|
+
createElementVNode("div", { class: "sub-more-btn-item" }, [
|
|
5459
|
+
createElementVNode("i", { class: "iconfont icon-gengduo2" })
|
|
5460
|
+
])
|
|
4870
5461
|
], -1))
|
|
4871
5462
|
]),
|
|
4872
5463
|
_: 1
|
|
4873
5464
|
})) : (openBlock(), createElementBlock("div", {
|
|
4874
5465
|
key: 1,
|
|
4875
|
-
class: "more-btn",
|
|
5466
|
+
class: "sub-more-btn",
|
|
4876
5467
|
onClick: _cache[2] || (_cache[2] = ($event) => emit("menuClick", { key: "default" }))
|
|
4877
5468
|
}, [..._cache[4] || (_cache[4] = [
|
|
4878
|
-
createElementVNode("
|
|
5469
|
+
createElementVNode("div", { class: "sub-more-btn-item" }, [
|
|
5470
|
+
createElementVNode("i", { class: "iconfont icon-gengduo2" })
|
|
5471
|
+
], -1)
|
|
4879
5472
|
])]));
|
|
4880
5473
|
};
|
|
4881
5474
|
}
|
|
4882
5475
|
});
|
|
4883
|
-
const SubTableAction = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
5476
|
+
const SubTableAction = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-acff8196"]]);
|
|
4884
5477
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
4885
5478
|
__name: "fixed-table-action",
|
|
4886
5479
|
props: {
|
|
@@ -5267,7 +5860,7 @@ const DocumentPaper = /* @__PURE__ */ defineComponent({
|
|
|
5267
5860
|
}, tdAttrs, {
|
|
5268
5861
|
"isEmpty": true
|
|
5269
5862
|
}), {
|
|
5270
|
-
default: () => tdInfo.cellValueType !== CellType.Default || tdInfo.cellWidget
|
|
5863
|
+
default: () => tdInfo.cellValueType !== CellType.Default || tdInfo.cellWidget?.props?.value || tdInfo.cellWidget?.props?.inlineContent?.length ? slots.widget?.({
|
|
5271
5864
|
tdInfo,
|
|
5272
5865
|
...widgetAttrs,
|
|
5273
5866
|
dynamicConfig
|
|
@@ -5449,41 +6042,57 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5449
6042
|
});
|
|
5450
6043
|
const DynamicTableAction = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-53d7e66c"]]);
|
|
5451
6044
|
export {
|
|
5452
|
-
|
|
6045
|
+
getCopySubMenu as A,
|
|
5453
6046
|
BorderTD as B,
|
|
5454
|
-
|
|
6047
|
+
resolveScanParsedValue as C,
|
|
5455
6048
|
DeviceLinkTmplUtil as D,
|
|
5456
|
-
|
|
6049
|
+
EMPTY_PRODUCT_VERSION_ID as E,
|
|
6050
|
+
resolveScanFillData as F,
|
|
6051
|
+
isProductBatchEmptyRow as G,
|
|
6052
|
+
useMaterialBalance as H,
|
|
5457
6053
|
InstanceStatusValues as I,
|
|
6054
|
+
validate as J,
|
|
6055
|
+
validateObjectBomQtyOnSubmit as K,
|
|
6056
|
+
DeviceConnector as L,
|
|
5458
6057
|
MaterialConsumptionPatternEnum as M,
|
|
5459
|
-
|
|
6058
|
+
DocumentLoading as N,
|
|
6059
|
+
DynamicQuickFillModal as O,
|
|
6060
|
+
FixedQuickFillModal as P,
|
|
6061
|
+
FormTmplConfigController as Q,
|
|
5460
6062
|
RequiredQtyCalcRule as R,
|
|
5461
6063
|
ScanParamType as S,
|
|
6064
|
+
MCDataUtil as T,
|
|
6065
|
+
OCR_MODEL_PRECISION_ENUM_KEY as U,
|
|
6066
|
+
getAppInfo as V,
|
|
6067
|
+
getSuiteKey as W,
|
|
6068
|
+
isBlank$1 as X,
|
|
6069
|
+
isEqmSuite as Y,
|
|
6070
|
+
pickObjectFieldKeys as Z,
|
|
5462
6071
|
_sfc_main$5 as _,
|
|
5463
6072
|
useTmplBom as a,
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
6073
|
+
buildObjectLotExtraQuery as b,
|
|
6074
|
+
resolveObjectBomEntry as c,
|
|
6075
|
+
runWithFillProduct as d,
|
|
6076
|
+
applyConsumeObjectTraceChange as e,
|
|
6077
|
+
fetchOperationReceiveQty as f,
|
|
5469
6078
|
getObjectBomMaterialLotQuery as g,
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
6079
|
+
getObjectBomProductQuery as h,
|
|
6080
|
+
isEdhrSuite as i,
|
|
6081
|
+
useStyles as j,
|
|
6082
|
+
useValidator as k,
|
|
6083
|
+
DocumentPaper as l,
|
|
6084
|
+
DynamicTableAction as m,
|
|
6085
|
+
normalizeFieldWidth as n,
|
|
6086
|
+
MaterialConsumeTableController as o,
|
|
6087
|
+
SubTableCore as p,
|
|
6088
|
+
SubTableActionMenuTypeEnum as q,
|
|
6089
|
+
resolveObjectFieldKeys as r,
|
|
6090
|
+
getMenuByAction as s,
|
|
6091
|
+
SubTableActionEnum as t,
|
|
5483
6092
|
useFormTmplConfig as u,
|
|
5484
6093
|
validateObjectBomForScan as v,
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
6094
|
+
getInsertSubMenu as w,
|
|
6095
|
+
resolveScanAdjustType as x,
|
|
6096
|
+
resolveScanQty as y,
|
|
6097
|
+
toDateOnly as z
|
|
5489
6098
|
};
|