@gct-paas/excel 0.1.33-beta.4 → 0.1.34
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-B2hP5Pw4.js → BaseComponent-_Tw8N_6J.js} +1 -1
- package/dist/{VueVideoPlayer-D0SQGvMx.js → VueVideoPlayer-uu8pHm89.js} +2 -2
- package/dist/{align-editor-Ss2gJqa-.js → align-editor-Bk5NBwxp.js} +1 -1
- package/dist/{barcode-design-BqIBQDqn.js → barcode-design-l1M7YhQ4.js} +2 -2
- package/dist/base/index.es.js +338 -598
- package/dist/{diagonal-design-BkuiWsT9.js → diagonal-design-9sIwuCOq.js} +2 -2
- package/dist/{dynamic-table-action-CZyU0uX-.js → dynamic-table-action-Bgwu2J5-.js} +74 -298
- package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-Rn52Yoy5.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-DhvnFfly.js} +4603 -6473
- package/dist/{edit.utils-CXmmCnxE-CaZYkGtk.js → edit.utils-CXmmCnxE-DBJfGya8.js} +1 -1
- package/dist/excel.css +1195 -2213
- package/dist/{exceljs.min-B2yMJJSO.js → exceljs.min-BC8M-dtv.js} +2 -2
- package/dist/{font-editor-Bhq8_nP8.js → font-editor-CsclZy98.js} +3 -3
- package/dist/{image-design-hTV7cmpq.js → image-design-DnAdcfkb.js} +2 -2
- package/dist/{index-DtWqWakF.js → index-0Rza_pO7.js} +2 -2
- package/dist/{index-B4NdWTOz.js → index-6ngOgN2T.js} +2 -2
- package/dist/{index-Bs12lNOF.js → index-BCm5uXm-.js} +1 -1
- package/dist/{index-CV3riQ3c.js → index-BQMk49wv.js} +3 -12
- package/dist/{index-Cmh_28Hs.js → index-BgCogSDc.js} +2 -2
- package/dist/{index-M-byfdiF.js → index-BmNtd4fF.js} +2 -2
- package/dist/{index-BWhvLFuS.js → index-BqLIOyYU.js} +3 -3
- package/dist/{index-CbVXT1EA.js → index-C3OVB8dF.js} +3 -6
- package/dist/{index-CBWRF4iQ.js → index-C6yP97M1.js} +1 -1
- package/dist/{index-CfGEDuF1.js → index-CIIhgR7l.js} +2 -2
- package/dist/{index-CM8l268J.js → index-CT5-f2Au.js} +2 -2
- package/dist/{index-Bx19JyfY.js → index-CZ3sFBq-.js} +2 -2
- package/dist/{index-CwEgjuxx.js → index-ChxSu2Nh.js} +2 -2
- package/dist/{index-B93hJuCY.js → index-CkNER_VJ.js} +2 -2
- package/dist/{index-Tw10Pcrk.js → index-CvR85MT_.js} +2 -2
- package/dist/{index-BwaCvy6l.js → index-D0JsOfx9.js} +2 -2
- package/dist/{index-BiyCBnHO.js → index-D874iHsv.js} +2 -2
- package/dist/{index-i4OH7WEx.js → index-DAKyKA6u.js} +30605 -32301
- package/dist/{index-m1firQQM.js → index-DIPExK1-.js} +1 -1
- package/dist/{index-D1uEF2Q-.js → index-DK3WaVk5.js} +1 -1
- package/dist/{index-Buys_3U5.js → index-DWM0h8VY.js} +2 -2
- package/dist/{index-Dq4VxDIZ.js → index-DX_Q7-Ex.js} +2 -2
- package/dist/{index-0naSKwsT.js → index-DZZB4Wki.js} +1 -1
- package/dist/{index-BmSqi0nn.js → index-Dk8Tzd5l.js} +3 -3
- package/dist/{index-QOhjFhUU.js → index-Dnv99kDV.js} +1 -1
- package/dist/{index-hQB6BP8F.js → index-K2KtldGf.js} +1 -1
- package/dist/{index-D9MOQLTY.js → index-PgiiSnTz.js} +2 -2
- package/dist/{index-SB9y5m0H.js → index-Q6EM0L2a.js} +24 -13
- package/dist/{index-M-BT6Mb0.js → index-RZFebqUU.js} +3 -3
- package/dist/{index-Bday1WBV.js → index-TcBAhuR3.js} +2 -2
- package/dist/{index-KYZ_LYw8.js → index-VX-I525j.js} +1 -1
- package/dist/{index-Bb9_9KOc.js → index-YHJMTfT6.js} +1 -1
- package/dist/{index-C6lVuYjH.js → index-i-kXn1Pm.js} +2 -2
- package/dist/{index-CmIhi6Su.js → index-jDUqcMDS.js} +3 -3
- package/dist/index.es.js +2 -2
- package/dist/{mb-render-lZnQMwuY.js → mb-render-BWsK2uaj.js} +1 -1
- package/dist/{online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-Dxi-5wnV.js → online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-D0gNSgDm.js} +8 -1
- package/dist/{pagination-design-BlxYaew2.js → pagination-design-DMqBR1NA.js} +2 -2
- package/dist/paper-widget-design-C8fkvFqe.js +4 -0
- package/dist/{qrcode-design-BWupHh6k.js → qrcode-design-10wjLIKT.js} +1 -1
- package/dist/{revo-grid.entry-BxGIzM1P.js → revo-grid.entry-C8HVGuwE.js} +1 -1
- package/dist/{revogr-attribution_7.entry-D-RfLR2_.js → revogr-attribution_7.entry-C57R5N9H.js} +3 -3
- package/dist/{revogr-clipboard_3.entry-CZXj_qxx.js → revogr-clipboard_3.entry-C-t0bHXx.js} +2 -2
- package/dist/{revogr-data_4.entry-3DDluLT2.js → revogr-data_4.entry-xIPTVLfC.js} +2 -2
- package/dist/{revogr-filter-panel.entry-DIcPvy6A.js → revogr-filter-panel.entry-ByM_cVBE.js} +1 -1
- package/dist/{serialnumber-design-BgIZu0sW.js → serialnumber-design-nwsYg88n.js} +1 -1
- package/dist/shared/index.es.js +25 -31
- package/dist/{single-field-drop-B26XDPsU.js → single-field-drop-DkY3m6YN.js} +2 -2
- package/dist/{size-editor-B5f5QFKt.js → size-editor-Bl32fjTp.js} +1 -1
- package/dist/src/adapter/adapter.d.ts +1 -6
- package/dist/src/assets/svgs/table/index.d.ts +0 -1
- package/dist/src/domain/table/business/material/material-requisition/profile/field-keys.d.ts +1 -1
- package/dist/src/domain/table/design/create-subtable.d.ts +1 -1
- package/dist/src/domain/table/design/hooks/on-field-attach.d.ts +1 -1
- package/dist/src/domain/table/design/index.d.ts +1 -1
- package/dist/src/domain/table/design/ribbon-options.d.ts +0 -1
- package/dist/src/domain/table/design/sub-model-matcher.d.ts +0 -1
- package/dist/src/domain/table/index.d.ts +2 -3
- package/dist/src/domain/table/registry.d.ts +0 -1
- package/dist/src/domain/table/types.d.ts +3 -8
- package/dist/src/nocode-base/src/constant/index.d.ts +2 -18
- package/dist/src/nocode-base/src/core/sub-table/profile-driven-sub-table-core.d.ts +1 -23
- package/dist/src/nocode-base/src/hooks/index.d.ts +1 -2
- package/dist/src/nocode-base/src/hooks/material-consume/bom-validator.d.ts +2 -10
- package/dist/src/nocode-base/src/hooks/material-consume/material-consume-table-controller.d.ts +0 -5
- package/dist/src/nocode-base/src/hooks/useValidator.d.ts +2 -2
- package/dist/src/nocode-base/src/hooks/validation/runValidation.d.ts +0 -2
- package/dist/src/nocode-base/src/hooks/validation/useFormValidator.d.ts +0 -4
- package/dist/src/nocode-base/src/interface/ref.d.ts +2 -2
- package/dist/src/nocode-base/src/types/business/index.d.ts +1 -8
- package/dist/src/nocode-base/src/types/common/base.d.ts +1 -53
- package/dist/src/nocode-base/src/types/fields/i-select.d.ts +2 -0
- package/dist/src/nocode-base/src/types/fields/i-sign.d.ts +1 -15
- package/dist/src/nocode-base/src/types/fields/i-trace.d.ts +2 -0
- package/dist/src/nocode-base/src/types/fields/index.d.ts +1 -1
- package/dist/src/nocode-base/src/types/index.d.ts +1 -1
- package/dist/src/nocode-base/src/types/widgets/i-paper.d.ts +1 -3
- package/dist/src/online-form/src/components/version-diff/index/types.d.ts +1 -5
- package/dist/src/online-form/src/views/__cell_widgets__/common/display-fields-editor/display-fields.util.d.ts +4 -4
- package/dist/src/online-form/src/views/designer/constants/index.d.ts +0 -1
- package/dist/src/online-form/src/views/designer/enums/index.d.ts +1 -2
- package/dist/src/online-form/src/views/designer/hooks/useAllSpreadSheets.d.ts +0 -48
- package/dist/src/online-form/src/views/designer/hooks/useSpreadSheet.d.ts +0 -63
- package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/panel-rule-config.vue.d.ts +1 -18
- package/dist/src/online-form/src/views/designer/modules/panel/sub-table/comps/use-dynamic-sub-table-panel.d.ts +0 -30
- package/dist/src/online-form/src/views/designer/types/index.d.ts +2 -4
- package/dist/src/online-form/src/views/designer/utils/xlsx-parser.d.ts +0 -3
- package/dist/src/online-form/src/views/render/__components__/_field_/_base_/trace-like-wrapper.d.ts +1 -0
- package/dist/src/shared/components/Signature/card-signer.vue.d.ts +2 -2
- package/dist/src/shared/components/Signature/index.d.ts +2 -1
- package/dist/src/shared/components/Signature/logic/index.d.ts +23 -8
- package/dist/src/shared/components/Signature/types/index.d.ts +1 -6
- package/dist/src/shared/components/Signature/ui/password-signer.vue.d.ts +0 -2
- package/dist/src/shared/components/Signature/ui/sign-editor.vue.d.ts +29 -0
- package/dist/src/shared/components/Signature/ui/sign-popover-content.vue.d.ts +2 -6
- package/dist/src/shared/components/Signature/ui/sign-preview.vue.d.ts +18 -0
- package/dist/src/shared/components/Signature/ui/sign-switcher-modal.vue.d.ts +116 -0
- package/dist/src/shared/components/Signature/ui/sign-switcher.vue.d.ts +1 -3
- package/dist/src/shared/enum/field-type.d.ts +0 -5
- package/dist/src/shared/enum/online-form.d.ts +2 -8
- package/dist/{text-design-BZdgEMzq.js → text-design-CbV0vuqF.js} +2 -2
- package/dist/{throttle-Cpk1LoGk-D8x0_nKc.js → throttle-Cpk1LoGk-CRmC7Dda.js} +1 -1
- package/dist/{timediff-design-CsDLmpYK.js → timediff-design-CRhHuuBP.js} +1 -1
- package/dist/{trace-like-wrapper-CDvm5U29.js → trace-like-wrapper-X6CpvzRL.js} +19 -9
- package/dist/{value-editor.vue_vue_type_style_index_0_lang-CzUVMyDu.js → value-editor.vue_vue_type_style_index_0_lang-CRA6eXLm.js} +2 -2
- package/dist/web-render/index.es.js +3 -3
- package/dist/{widget-barcode-gP8W3DXl.js → widget-barcode-Cu626jK0.js} +4 -4
- package/dist/{widget-diagonal-CtJoLiKo.js → widget-diagonal-GjbFYzj9.js} +3 -3
- package/dist/{widget-image-CY7PHvI6.js → widget-image-DVagnQCr.js} +5 -5
- package/dist/{widget-line-DE0G3Zr6.js → widget-line-CRSekvVI.js} +2 -2
- package/dist/{widget-pagination-MJ-CtnWn.js → widget-pagination-DWxAH-L-.js} +5 -5
- package/dist/{widget-power-BFKBLkF5.js → widget-power-CP0-k64v.js} +3 -3
- package/dist/{widget-qrcode-ChM7UInm.js → widget-qrcode-BmLxlcml.js} +3 -3
- package/dist/{widget-rangelimit-D7tsCL8x.js → widget-rangelimit-CWU0hpQa.js} +3 -3
- package/dist/{widget-serialnumber-BkdIJ6rG.js → widget-serialnumber-RrIf7OeB.js} +1 -1
- package/dist/{widget-text-UmCluu4T.js → widget-text-C_-KzTvw.js} +5 -5
- package/dist/{widget-timediff-CWRjMEL9.js → widget-timediff-DypM9RjI.js} +2 -2
- package/package.json +2 -2
- package/dist/paper-widget-design-wrFvO7Dq.js +0 -4
- package/dist/src/domain/field/text/udi-manifest.d.ts +0 -2
- package/dist/src/domain/table/business/device/maintenance/index.d.ts +0 -1
- package/dist/src/domain/table/business/device/maintenance/profile/field-keys.d.ts +0 -9
- package/dist/src/domain/table/business/device/maintenance/profile/fields.d.ts +0 -2
- package/dist/src/domain/table/business/device/maintenance/profile/index.d.ts +0 -3
- package/dist/src/domain/table/business/device/point-inspection/index.d.ts +0 -1
- package/dist/src/domain/table/business/device/point-inspection/profile/field-keys.d.ts +0 -9
- package/dist/src/domain/table/business/device/point-inspection/profile/fields.d.ts +0 -2
- package/dist/src/domain/table/business/device/point-inspection/profile/index.d.ts +0 -3
- package/dist/src/domain/table/business/device/signature-lock.d.ts +0 -9
- package/dist/src/domain/table/business/material/material-substitution/index.d.ts +0 -2
- package/dist/src/domain/table/business/material/material-substitution/profile/field-keys.d.ts +0 -75
- package/dist/src/domain/table/business/material/material-substitution/profile/fields.d.ts +0 -2
- package/dist/src/domain/table/business/material/material-substitution/profile/index.d.ts +0 -4
- package/dist/src/domain/table/business/material/material-substitution/runtime/register-handlers.d.ts +0 -1
- package/dist/src/domain/table/business/material/material-substitution/runtime/row-change-handlers.d.ts +0 -6
- package/dist/src/nocode-base/src/components/inspection-decision-prompt-modal.vue.d.ts +0 -7
- package/dist/src/nocode-base/src/hooks/inspection-decision-rule/evaluator.d.ts +0 -11
- package/dist/src/nocode-base/src/hooks/udi.d.ts +0 -5
- package/dist/src/nocode-base/src/hooks/useCalcFunction.d.ts +0 -3
- package/dist/src/online-form/src/views/designer/hooks/useDhrEdition.d.ts +0 -7
- package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/decision-rule-condition.vue.d.ts +0 -19
- package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/decision-rule-group.vue.d.ts +0 -16
- package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/decision-rule.d.ts +0 -54
- package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/field-tree-node.vue.d.ts +0 -24
- package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/field-tree-select.vue.d.ts +0 -30
- package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/field-tree-utils.d.ts +0 -12
- package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/inspection-decision-modal.vue.d.ts +0 -9
- package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/word-ui/gct-button.vue.d.ts +0 -33
- package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/word-ui/gct-icon.vue.d.ts +0 -12
- package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/word-ui/gct-input.vue.d.ts +0 -23
- package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/word-ui/gct-modal.vue.d.ts +0 -36
- package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/word-ui/gct-scrollbar.vue.d.ts +0 -21
- package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/word-ui/gct-select.vue.d.ts +0 -30
- package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/word-ui/gct-switch.vue.d.ts +0 -17
- package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/word-ui/gct-text-area.vue.d.ts +0 -20
- package/dist/src/online-form/src/views/designer/modules/panel/panel-rule-config/word-ui/index.d.ts +0 -8
- package/dist/src/online-form/src/views/render/__components__/_field_/sign/component/sign-validation.d.ts +0 -13
|
@@ -1,10 +1,10 @@
|
|
|
1
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,
|
|
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-DhvnFfly.js";
|
|
3
3
|
import { isNil, cloneDeep, merge, pickBy, mergeWith, omit, last, pick } from "lodash-es";
|
|
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-BWsK2uaj.js";
|
|
8
8
|
const InstanceStatusValues = {
|
|
9
9
|
/** 作废状态 */
|
|
10
10
|
ABANDON: "ABANDON",
|
|
@@ -365,14 +365,13 @@ class McRowValidateError extends Error {
|
|
|
365
365
|
row;
|
|
366
366
|
}
|
|
367
367
|
class BomEntryValidator {
|
|
368
|
-
constructor(bomEntry, enableSequenceLoading, getMaterialNoNum, historyData, mainMaterialNo, noBomMode
|
|
368
|
+
constructor(bomEntry, enableSequenceLoading, getMaterialNoNum, historyData, mainMaterialNo, noBomMode) {
|
|
369
369
|
this.bomEntry = bomEntry;
|
|
370
370
|
this.enableSequenceLoading = enableSequenceLoading;
|
|
371
371
|
this.getMaterialNoNum = getMaterialNoNum;
|
|
372
372
|
this.historyData = historyData;
|
|
373
373
|
this.mainMaterialNo = mainMaterialNo;
|
|
374
374
|
this.noBomMode = noBomMode;
|
|
375
|
-
this.isCustomRequiredQty = isCustomRequiredQty;
|
|
376
375
|
this.productIds.push(this.bomEntry.product_id_);
|
|
377
376
|
this.productCodes[this.bomEntry.product_id_] = this.bomEntry.product_code_;
|
|
378
377
|
if (this.bomEntry.substitute_material_enabled_ && this.bomEntry.substitute_material_entries_) {
|
|
@@ -389,7 +388,6 @@ class BomEntryValidator {
|
|
|
389
388
|
historyData;
|
|
390
389
|
mainMaterialNo;
|
|
391
390
|
noBomMode;
|
|
392
|
-
isCustomRequiredQty;
|
|
393
391
|
/** 该明细使用到的产品的id集合 */
|
|
394
392
|
productIds = [];
|
|
395
393
|
/** 物料和code的映射 */
|
|
@@ -422,7 +420,7 @@ class BomEntryValidator {
|
|
|
422
420
|
* @return {*}
|
|
423
421
|
*/
|
|
424
422
|
filterGroupData(arr) {
|
|
425
|
-
return arr.filter((i) => this.
|
|
423
|
+
return arr.filter((i) => this.productIds.includes(i.product_id_));
|
|
426
424
|
}
|
|
427
425
|
/** 行是否属于本 BOM 组(优先 bom_entry_id_,避免跨组 product_id_ 误判) */
|
|
428
426
|
isRowInGroup(row) {
|
|
@@ -605,18 +603,8 @@ class BomEntryValidator {
|
|
|
605
603
|
if (!entry.qty_validation_enabled_ || entry.type_ === "view") {
|
|
606
604
|
return;
|
|
607
605
|
}
|
|
608
|
-
const groupData = this.filterGroupData(arr);
|
|
609
606
|
const loaded = this.calcQtyConsumed(arr);
|
|
610
|
-
|
|
611
|
-
if (this.isCustomRequiredQty) {
|
|
612
|
-
const currentQty = groupData[0]?.qty_required_;
|
|
613
|
-
if (typeof currentQty !== "number" || !Number.isFinite(currentQty) || currentQty <= 0) {
|
|
614
|
-
throw new Error(
|
|
615
|
-
groupNo != null && groupNo > 0 ? `序号${groupNo},需求数量必须大于 0` : "需求数量必须大于 0"
|
|
616
|
-
);
|
|
617
|
-
}
|
|
618
|
-
required = currentQty - this.hasConsumed;
|
|
619
|
-
}
|
|
607
|
+
const required = this.remainingNum;
|
|
620
608
|
const diff = loaded - required;
|
|
621
609
|
const rule = entry.qty_validation_rule_;
|
|
622
610
|
const fail = (msg) => {
|
|
@@ -638,9 +626,9 @@ class BomEntryValidator {
|
|
|
638
626
|
if (diff > 0) fail($t("sys.qtyValidationRule.lte"));
|
|
639
627
|
break;
|
|
640
628
|
case "bounds": {
|
|
641
|
-
const
|
|
629
|
+
const groupData = this.filterGroupData(arr);
|
|
642
630
|
const consumeSum = this.calcQtyForBounds(arr) + this.calcQtyForBounds(this.historyData);
|
|
643
|
-
const { min, max } = await this.calcCustomNumberLimit(
|
|
631
|
+
const { min, max } = await this.calcCustomNumberLimit(groupData[0]);
|
|
644
632
|
if (min !== void 0 && consumeSum < min || max !== void 0 && consumeSum > max) {
|
|
645
633
|
fail($t("sys.qtyValidationRule.bounds", { min, max }));
|
|
646
634
|
}
|
|
@@ -650,14 +638,13 @@ class BomEntryValidator {
|
|
|
650
638
|
}
|
|
651
639
|
}
|
|
652
640
|
class BomEntriesValidator {
|
|
653
|
-
constructor(entries, enableSequenceLoading, getMaterialNoNum, historyData, mainMaterialNo, noBomMode
|
|
641
|
+
constructor(entries, enableSequenceLoading, getMaterialNoNum, historyData, mainMaterialNo, noBomMode) {
|
|
654
642
|
this.entries = entries;
|
|
655
643
|
this.enableSequenceLoading = enableSequenceLoading;
|
|
656
644
|
this.getMaterialNoNum = getMaterialNoNum;
|
|
657
645
|
this.historyData = historyData;
|
|
658
646
|
this.mainMaterialNo = mainMaterialNo;
|
|
659
647
|
this.noBomMode = noBomMode;
|
|
660
|
-
this.isCustomRequiredQty = isCustomRequiredQty;
|
|
661
648
|
this.bomEntryValidators = entries.map(
|
|
662
649
|
(i) => new BomEntryValidator(
|
|
663
650
|
i,
|
|
@@ -665,8 +652,7 @@ class BomEntriesValidator {
|
|
|
665
652
|
getMaterialNoNum,
|
|
666
653
|
historyData,
|
|
667
654
|
mainMaterialNo,
|
|
668
|
-
noBomMode
|
|
669
|
-
isCustomRequiredQty
|
|
655
|
+
noBomMode
|
|
670
656
|
)
|
|
671
657
|
);
|
|
672
658
|
}
|
|
@@ -676,7 +662,6 @@ class BomEntriesValidator {
|
|
|
676
662
|
historyData;
|
|
677
663
|
mainMaterialNo;
|
|
678
664
|
noBomMode;
|
|
679
|
-
isCustomRequiredQty;
|
|
680
665
|
bomEntryValidators;
|
|
681
666
|
/**
|
|
682
667
|
* 翻译物料的code
|
|
@@ -734,14 +719,11 @@ class BomEntriesValidator {
|
|
|
734
719
|
* 行 → BOM 明细在 bomEntryValidators 中的下标,找不到返回 -1
|
|
735
720
|
*/
|
|
736
721
|
resolveEntryIndex(row) {
|
|
737
|
-
if (row.bom_entry_id_) {
|
|
738
|
-
return this.bomEntryValidators.findIndex((v) => v.bomEntry.id_ === row.bom_entry_id_);
|
|
739
|
-
}
|
|
740
722
|
if (row.product_id_) {
|
|
741
723
|
const i = this.bomEntryValidators.findIndex((v) => v.productIds.includes(row.product_id_));
|
|
742
724
|
if (i >= 0) return i;
|
|
743
725
|
}
|
|
744
|
-
return -1;
|
|
726
|
+
return row.bom_entry_id_ ? this.bomEntryValidators.findIndex((v) => v.bomEntry.id_ === row.bom_entry_id_) : -1;
|
|
745
727
|
}
|
|
746
728
|
/**
|
|
747
729
|
* 行所属组在序号列中的 groupOrderIndex(0-based;-1 未绑 BOM 组)
|
|
@@ -1137,7 +1119,6 @@ var ScanParamType = /* @__PURE__ */ ((ScanParamType2) => {
|
|
|
1137
1119
|
var RequiredQtyCalcRule = /* @__PURE__ */ ((RequiredQtyCalcRule2) => {
|
|
1138
1120
|
RequiredQtyCalcRule2["LotQty"] = "lotQty";
|
|
1139
1121
|
RequiredQtyCalcRule2["ProductQty"] = "productQty";
|
|
1140
|
-
RequiredQtyCalcRule2["Custom"] = "custom";
|
|
1141
1122
|
return RequiredQtyCalcRule2;
|
|
1142
1123
|
})(RequiredQtyCalcRule || {});
|
|
1143
1124
|
async function applyScanFillPlan(arr, scanRow, plan, options) {
|
|
@@ -1510,8 +1491,7 @@ class MaterialConsumeTableController {
|
|
|
1510
1491
|
() => this.materialNoNum,
|
|
1511
1492
|
this.tmplBomController.historyData,
|
|
1512
1493
|
this.tmplBomController.materialNo,
|
|
1513
|
-
this.mcPattern === MaterialConsumptionPatternEnum.RECORD && !this.tmplBom.personal_bom_enabled_
|
|
1514
|
-
this.tmplBom.required_qty_calc_rule_ === RequiredQtyCalcRule.Custom
|
|
1494
|
+
this.mcPattern === MaterialConsumptionPatternEnum.RECORD && !this.tmplBom.personal_bom_enabled_
|
|
1515
1495
|
);
|
|
1516
1496
|
}
|
|
1517
1497
|
tmplBomController;
|
|
@@ -1550,9 +1530,6 @@ class MaterialConsumeTableController {
|
|
|
1550
1530
|
/** 批次数量或生产数量 */
|
|
1551
1531
|
get materialNoNum() {
|
|
1552
1532
|
const { required_qty_calc_rule_, product_qty_field_ } = this.tmplBom;
|
|
1553
|
-
if (required_qty_calc_rule_ === RequiredQtyCalcRule.Custom) {
|
|
1554
|
-
return void 0;
|
|
1555
|
-
}
|
|
1556
1533
|
if (required_qty_calc_rule_ === RequiredQtyCalcRule.ProductQty) {
|
|
1557
1534
|
return product_qty_field_ ? this.mainFormState.value[product_qty_field_] : 0;
|
|
1558
1535
|
}
|
|
@@ -1600,35 +1577,6 @@ class MaterialConsumeTableController {
|
|
|
1600
1577
|
const deletedArr = this.tableDataRef.value.filter((i) => i.deleted_);
|
|
1601
1578
|
this.tableDataRef.value = [...value, ...deletedArr];
|
|
1602
1579
|
}
|
|
1603
|
-
get isCustomRequiredQty() {
|
|
1604
|
-
return this.tmplBom.required_qty_calc_rule_ === RequiredQtyCalcRule.Custom;
|
|
1605
|
-
}
|
|
1606
|
-
getBomGroupForRow(row) {
|
|
1607
|
-
const validators = this.bomEntriesValidator.bomEntryValidators;
|
|
1608
|
-
if (row.bom_entry_id_) {
|
|
1609
|
-
return validators.find((util) => util.bomEntry.id_ === row.bom_entry_id_);
|
|
1610
|
-
}
|
|
1611
|
-
return row.product_id_ ? this.bomEntriesValidator.findUtilByProductId(row.product_id_) : void 0;
|
|
1612
|
-
}
|
|
1613
|
-
/** 自定义规则的需求数量在同一 BOM 组内保持一致。 */
|
|
1614
|
-
getCustomGroupRequiredQty(row) {
|
|
1615
|
-
const util = this.getBomGroupForRow(row);
|
|
1616
|
-
if (!util) return row.qty_required_;
|
|
1617
|
-
return this.actualTableData.find(
|
|
1618
|
-
(item) => util.isRowInGroup(item) && item.qty_required_ != null
|
|
1619
|
-
)?.qty_required_;
|
|
1620
|
-
}
|
|
1621
|
-
setCustomGroupRequiredQty(row, qty) {
|
|
1622
|
-
if (!this.isCustomRequiredQty) return;
|
|
1623
|
-
const util = this.getBomGroupForRow(row);
|
|
1624
|
-
if (!util) {
|
|
1625
|
-
row.qty_required_ = qty;
|
|
1626
|
-
return;
|
|
1627
|
-
}
|
|
1628
|
-
this.actualTableData.forEach((item) => {
|
|
1629
|
-
if (util.isRowInGroup(item)) item.qty_required_ = qty;
|
|
1630
|
-
});
|
|
1631
|
-
}
|
|
1632
1580
|
/** 错误信息 */
|
|
1633
1581
|
error(message2) {
|
|
1634
1582
|
MaterialConsumeTableController.render.message({
|
|
@@ -1684,11 +1632,10 @@ class MaterialConsumeTableController {
|
|
|
1684
1632
|
*/
|
|
1685
1633
|
calcFormState() {
|
|
1686
1634
|
if (this.tmplBom.bom_init_enabled_) {
|
|
1687
|
-
const materialNoNum = this.materialNoNum;
|
|
1688
1635
|
return this.actualBomEntries.map((i) => {
|
|
1689
1636
|
return {
|
|
1690
1637
|
product_id_: i.product_id_,
|
|
1691
|
-
|
|
1638
|
+
qty_required_: i.qty_required_ * this.materialNoNum,
|
|
1692
1639
|
bom_entry_id_: i.id_
|
|
1693
1640
|
};
|
|
1694
1641
|
});
|
|
@@ -1728,7 +1675,7 @@ class MaterialConsumeTableController {
|
|
|
1728
1675
|
"sort_num_",
|
|
1729
1676
|
"qty_consumed_total_"
|
|
1730
1677
|
];
|
|
1731
|
-
const isRecordPattern = this.mcPattern === MaterialConsumptionPatternEnum.RECORD &&
|
|
1678
|
+
const isRecordPattern = this.mcPattern === MaterialConsumptionPatternEnum.RECORD && !this.tmplBom.personal_bom_enabled_;
|
|
1732
1679
|
if (!isRecordPattern) {
|
|
1733
1680
|
disabledKeys.push("qty_required_");
|
|
1734
1681
|
}
|
|
@@ -1868,19 +1815,9 @@ class MaterialConsumeTableController {
|
|
|
1868
1815
|
this.setDefaultValue(row);
|
|
1869
1816
|
try {
|
|
1870
1817
|
const plan = await this.bomEntriesValidator.validateScanCanInsert(row, this.actualTableData);
|
|
1871
|
-
|
|
1872
|
-
(item) => plan.target.isRowInGroup(item) && item.qty_required_ != null
|
|
1873
|
-
)?.qty_required_ : void 0;
|
|
1874
|
-
const nextTable = await applyScanFillPlan(this.actualTableData, row, plan, {
|
|
1818
|
+
this.tableDataRef.value = await applyScanFillPlan(this.actualTableData, row, plan, {
|
|
1875
1819
|
validateCurrentGroupForSwitch: (table, current) => this.bomEntriesValidator.validateCurrentGroupForSwitch(table, current)
|
|
1876
1820
|
});
|
|
1877
|
-
if (this.isCustomRequiredQty && plan) {
|
|
1878
|
-
const requiredQty = existingRequiredQty ?? row.qty_required_;
|
|
1879
|
-
nextTable.forEach((item) => {
|
|
1880
|
-
if (plan.target.isRowInGroup(item)) item.qty_required_ = requiredQty;
|
|
1881
|
-
});
|
|
1882
|
-
}
|
|
1883
|
-
this.tableDataRef.value = nextTable;
|
|
1884
1821
|
this.updateDerivedQtyFields();
|
|
1885
1822
|
} catch (e) {
|
|
1886
1823
|
console.error(e);
|
|
@@ -1969,7 +1906,6 @@ class MaterialConsumeTableController {
|
|
|
1969
1906
|
* 按当前 materialNoNum 回写各行 qty_required_(校验侧 total 已通过 getter 实时读取)
|
|
1970
1907
|
*/
|
|
1971
1908
|
syncQtyRequiredFromBom() {
|
|
1972
|
-
if (this.tmplBom.required_qty_calc_rule_ === RequiredQtyCalcRule.Custom) return;
|
|
1973
1909
|
this.actualTableData.forEach((row) => {
|
|
1974
1910
|
if (!row.product_id_) return;
|
|
1975
1911
|
const util = this.bomEntriesValidator.findUtilByProductId(row.product_id_);
|
|
@@ -2241,9 +2177,7 @@ class MaterialConsumeTableController {
|
|
|
2241
2177
|
if (row.product_id_) {
|
|
2242
2178
|
const util = this.bomEntriesValidator.findUtilByProductId(row.product_id_);
|
|
2243
2179
|
if (util) {
|
|
2244
|
-
|
|
2245
|
-
row.qty_required_ = util.total;
|
|
2246
|
-
}
|
|
2180
|
+
row.qty_required_ = util.total;
|
|
2247
2181
|
row.qty_consumed_ = util.hasConsumed;
|
|
2248
2182
|
row.bom_entry_id_ = util.bomEntry.id_;
|
|
2249
2183
|
}
|
|
@@ -2256,10 +2190,7 @@ class MaterialConsumeTableController {
|
|
|
2256
2190
|
async handleChange(opts) {
|
|
2257
2191
|
const { field, row, value, option } = opts;
|
|
2258
2192
|
console.log("handleChange", opts);
|
|
2259
|
-
if (field === "
|
|
2260
|
-
const qty = value == null || value === "" ? void 0 : Number(value);
|
|
2261
|
-
this.setCustomGroupRequiredQty(row, qty);
|
|
2262
|
-
} else if (field === "product_id_") {
|
|
2193
|
+
if (field === "product_id_") {
|
|
2263
2194
|
if (row._scanFallback) {
|
|
2264
2195
|
try {
|
|
2265
2196
|
await validateReinspectionDate({
|
|
@@ -2273,8 +2204,6 @@ class MaterialConsumeTableController {
|
|
|
2273
2204
|
}
|
|
2274
2205
|
return;
|
|
2275
2206
|
}
|
|
2276
|
-
const oldGroupId = row.bom_entry_id_;
|
|
2277
|
-
const oldRequiredQty = this.isCustomRequiredQty && oldGroupId ? this.getCustomGroupRequiredQty(row) : void 0;
|
|
2278
2207
|
row.material_no_ = void 0;
|
|
2279
2208
|
row.material_no__id_ = void 0;
|
|
2280
2209
|
row.material_no__lb_ = void 0;
|
|
@@ -2283,10 +2212,6 @@ class MaterialConsumeTableController {
|
|
|
2283
2212
|
row.expiration_date_ = void 0;
|
|
2284
2213
|
this.setDefaultValue(row);
|
|
2285
2214
|
this.updateDerivedQtyFields();
|
|
2286
|
-
if (this.isCustomRequiredQty) {
|
|
2287
|
-
const qty = oldGroupId && row.bom_entry_id_ === oldGroupId ? oldRequiredQty : this.getCustomGroupRequiredQty(row);
|
|
2288
|
-
this.setCustomGroupRequiredQty(row, qty);
|
|
2289
|
-
}
|
|
2290
2215
|
} else if (field === "material_no_") {
|
|
2291
2216
|
if (option?.is_locked_) {
|
|
2292
2217
|
row.material_no_ = void 0;
|
|
@@ -2310,16 +2235,9 @@ class MaterialConsumeTableController {
|
|
|
2310
2235
|
this.error(e.message);
|
|
2311
2236
|
return;
|
|
2312
2237
|
}
|
|
2313
|
-
const oldGroupId = row.bom_entry_id_;
|
|
2314
|
-
const oldRequiredQty = this.isCustomRequiredQty && oldGroupId ? this.getCustomGroupRequiredQty(row) : void 0;
|
|
2315
2238
|
row.product_id_ = option.product_id_;
|
|
2316
2239
|
row.expiration_date_ = option.validate_;
|
|
2317
|
-
if (this.isCustomRequiredQty) row.qty_required_ = void 0;
|
|
2318
2240
|
this.setDefaultValue(row);
|
|
2319
|
-
if (this.isCustomRequiredQty) {
|
|
2320
|
-
const qty = oldGroupId && row.bom_entry_id_ === oldGroupId ? oldRequiredQty : this.getCustomGroupRequiredQty(row);
|
|
2321
|
-
this.setCustomGroupRequiredQty(row, qty);
|
|
2322
|
-
}
|
|
2323
2241
|
} else if (field === "qty_") {
|
|
2324
2242
|
this.updateDerivedQtyFields();
|
|
2325
2243
|
}
|
|
@@ -2593,11 +2511,11 @@ async function validateObjectBomQtyOnSubmit(opts) {
|
|
|
2593
2511
|
}
|
|
2594
2512
|
return errors;
|
|
2595
2513
|
}
|
|
2596
|
-
function isBlank$
|
|
2514
|
+
function isBlank$1(value) {
|
|
2597
2515
|
return value == null || value === "";
|
|
2598
2516
|
}
|
|
2599
2517
|
function pickPresent(preferred, fallback) {
|
|
2600
|
-
return isBlank$
|
|
2518
|
+
return isBlank$1(preferred) ? fallback : preferred;
|
|
2601
2519
|
}
|
|
2602
2520
|
function resolveObjectFieldKeys(opts) {
|
|
2603
2521
|
const obj = opts.objectFieldList?.find((item) => item.objectField === opts.belongingObject);
|
|
@@ -2617,7 +2535,7 @@ function resolveObjectFieldKeys(opts) {
|
|
|
2617
2535
|
};
|
|
2618
2536
|
}
|
|
2619
2537
|
function buildObjectLotExtraQuery(productId) {
|
|
2620
|
-
if (isBlank$
|
|
2538
|
+
if (isBlank$1(productId)) return {};
|
|
2621
2539
|
const versionId = String(productId).split(":").pop();
|
|
2622
2540
|
if (!versionId) return {};
|
|
2623
2541
|
return { "product_id_.versionEq": versionId };
|
|
@@ -2630,9 +2548,9 @@ function clearObjectLotFields(formData, materialNoKey) {
|
|
|
2630
2548
|
}
|
|
2631
2549
|
function shouldClearLotOnProductChange(opts) {
|
|
2632
2550
|
const { prevProduct, nextProduct, lotValue } = opts;
|
|
2633
|
-
if (isBlank$
|
|
2551
|
+
if (isBlank$1(prevProduct) && isBlank$1(nextProduct)) return false;
|
|
2634
2552
|
if (prevProduct === nextProduct) return false;
|
|
2635
|
-
if (isBlank$
|
|
2553
|
+
if (isBlank$1(prevProduct) && !isBlank$1(nextProduct) && !isBlank$1(lotValue)) {
|
|
2636
2554
|
return false;
|
|
2637
2555
|
}
|
|
2638
2556
|
return true;
|
|
@@ -2650,7 +2568,7 @@ function runWithFillProduct(fn) {
|
|
|
2650
2568
|
}
|
|
2651
2569
|
function fillProductFromLotOption(opts) {
|
|
2652
2570
|
const productId = opts.option?.product_id_ ?? opts.option?._item?.product_id_;
|
|
2653
|
-
if (!opts.productKey || isBlank$
|
|
2571
|
+
if (!opts.productKey || isBlank$1(productId)) return;
|
|
2654
2572
|
runWithFillProduct(() => {
|
|
2655
2573
|
opts.formData[opts.productKey] = productId;
|
|
2656
2574
|
});
|
|
@@ -2681,7 +2599,7 @@ async function applyConsumeObjectTraceChange(opts) {
|
|
|
2681
2599
|
}
|
|
2682
2600
|
if (keys.bomEntryIdKey) {
|
|
2683
2601
|
formData[keys.bomEntryIdKey] = null;
|
|
2684
|
-
if (!isBlank$
|
|
2602
|
+
if (!isBlank$1(opts.nextValue) && opts.formInstBom) {
|
|
2685
2603
|
const entry = resolveObjectBomEntry({
|
|
2686
2604
|
formInstBom: opts.formInstBom,
|
|
2687
2605
|
belongingObject,
|
|
@@ -2691,7 +2609,7 @@ async function applyConsumeObjectTraceChange(opts) {
|
|
|
2691
2609
|
}
|
|
2692
2610
|
}
|
|
2693
2611
|
const lotValue = keys.materialNoKey ? formData[keys.materialNoKey] : void 0;
|
|
2694
|
-
if (!isBlank$
|
|
2612
|
+
if (!isBlank$1(opts.nextValue) && !isBlank$1(lotValue)) {
|
|
2695
2613
|
try {
|
|
2696
2614
|
await validateReinspectionDate({
|
|
2697
2615
|
product_id_: String(opts.nextValue),
|
|
@@ -2710,7 +2628,7 @@ async function applyConsumeObjectTraceChange(opts) {
|
|
|
2710
2628
|
return { abortLocked: opts.option.id_ };
|
|
2711
2629
|
}
|
|
2712
2630
|
const params = resolveLotValidateParams(keys, formData, opts.option);
|
|
2713
|
-
if (isBlank$
|
|
2631
|
+
if (isBlank$1(params.material_no_) && isBlank$1(params.material_no_id_)) return {};
|
|
2714
2632
|
try {
|
|
2715
2633
|
await validateReinspectionDate(params);
|
|
2716
2634
|
} catch (e) {
|
|
@@ -2724,7 +2642,7 @@ async function applyConsumeObjectTraceChange(opts) {
|
|
|
2724
2642
|
});
|
|
2725
2643
|
if (keys.bomEntryIdKey && opts.formInstBom) {
|
|
2726
2644
|
const productId = opts.option?.product_id_ ?? opts.option?._item?.product_id_;
|
|
2727
|
-
if (!isBlank$
|
|
2645
|
+
if (!isBlank$1(productId)) {
|
|
2728
2646
|
const entry = resolveObjectBomEntry({
|
|
2729
2647
|
formInstBom: opts.formInstBom,
|
|
2730
2648
|
belongingObject,
|
|
@@ -2980,7 +2898,6 @@ class TdHandler {
|
|
|
2980
2898
|
set fieldReadonly(val) {
|
|
2981
2899
|
this.cloneTd();
|
|
2982
2900
|
this.td.cellWidget.props.readonly = val;
|
|
2983
|
-
this.td.cellWidget.props.field_readonly = val;
|
|
2984
2901
|
if (val) {
|
|
2985
2902
|
this.td.cellWidget.props.disabled = false;
|
|
2986
2903
|
}
|
|
@@ -3292,12 +3209,6 @@ class SubTableCore {
|
|
|
3292
3209
|
*/
|
|
3293
3210
|
calcFieldStatus(params) {
|
|
3294
3211
|
const result = {};
|
|
3295
|
-
const config = this.bizTableConfig;
|
|
3296
|
-
if (config?.dataLockControlField && params.field === config.dataLockControlField) {
|
|
3297
|
-
result.readonly = isPersistedSignatureLockActive(config, params.rowData);
|
|
3298
|
-
} else if (config?.dataLockControlField) {
|
|
3299
|
-
result.disabled = isSignatureLockActive(config, params.rowData);
|
|
3300
|
-
}
|
|
3301
3212
|
return result;
|
|
3302
3213
|
}
|
|
3303
3214
|
/**
|
|
@@ -3440,38 +3351,6 @@ class SubTableCore {
|
|
|
3440
3351
|
console.log(this.ctx.widget.props.tableTitle, "处理表单按钮点击事件", params);
|
|
3441
3352
|
}
|
|
3442
3353
|
}
|
|
3443
|
-
let currentParamsConfig = {
|
|
3444
|
-
routingParamList: [],
|
|
3445
|
-
inspectionParamList: []
|
|
3446
|
-
};
|
|
3447
|
-
function setFormulaParamsConfig(paramsConfig = {}) {
|
|
3448
|
-
currentParamsConfig = paramsConfig ?? {};
|
|
3449
|
-
}
|
|
3450
|
-
async function CALC_IS_QUALIFIED(key, value, paramList) {
|
|
3451
|
-
if (!key || value == null) {
|
|
3452
|
-
return null;
|
|
3453
|
-
}
|
|
3454
|
-
const config = paramList?.find((e) => e.customFieldKey === key);
|
|
3455
|
-
if (!config) return null;
|
|
3456
|
-
const { upperLimit, lowerLimit } = config;
|
|
3457
|
-
if (lowerLimit == null || upperLimit == null) return null;
|
|
3458
|
-
const actual = Number(value);
|
|
3459
|
-
const min = Number(config.lowerLimit);
|
|
3460
|
-
const max = Number(config.upperLimit);
|
|
3461
|
-
if (![actual, min, max].every(Number.isFinite)) return null;
|
|
3462
|
-
return actual >= min && actual <= max;
|
|
3463
|
-
}
|
|
3464
|
-
const FORMULA_FUNCS = {
|
|
3465
|
-
RoutingParamCheck: (key, value) => CALC_IS_QUALIFIED(key, value, currentParamsConfig.routingParamList || []),
|
|
3466
|
-
InspectionParamCheck: (key, value) => CALC_IS_QUALIFIED(key, value, currentParamsConfig.inspectionParamList || [])
|
|
3467
|
-
};
|
|
3468
|
-
function registerFormulaFuncs() {
|
|
3469
|
-
const register = window.NocodeAdapter.utils?.formulaRegister;
|
|
3470
|
-
if (!register) return;
|
|
3471
|
-
Object.entries(FORMULA_FUNCS).forEach(([k, func]) => {
|
|
3472
|
-
register(k, func);
|
|
3473
|
-
});
|
|
3474
|
-
}
|
|
3475
3354
|
class DeviceLinkTmplUtil {
|
|
3476
3355
|
static DEFAULT_RECOMMENDED_PROMPT = "任务:图片OCR文字提取\n规则:不虚构内容,找不到数据返回空,仅输出提取结果\n结果填充至${目标字段}\n填写提取规则:";
|
|
3477
3356
|
/**
|
|
@@ -3887,7 +3766,7 @@ const OPERATION_RECEIVE_QTY_API = {
|
|
|
3887
3766
|
modelKey: "em_routing_operation_number",
|
|
3888
3767
|
bsKey: "getOne"
|
|
3889
3768
|
};
|
|
3890
|
-
function isBlank
|
|
3769
|
+
function isBlank(value) {
|
|
3891
3770
|
return value == null || value === "";
|
|
3892
3771
|
}
|
|
3893
3772
|
function unwrapBizPayload(res) {
|
|
@@ -3902,7 +3781,7 @@ function unwrapBizPayload(res) {
|
|
|
3902
3781
|
async function fetchOperationReceiveQty(paramsConfig) {
|
|
3903
3782
|
const containerId = paramsConfig?.containerId;
|
|
3904
3783
|
const routingOperationId = paramsConfig?.routingOperationId;
|
|
3905
|
-
if (isBlank
|
|
3784
|
+
if (isBlank(containerId) || isBlank(routingOperationId)) return void 0;
|
|
3906
3785
|
try {
|
|
3907
3786
|
const res = await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
|
|
3908
3787
|
OPERATION_RECEIVE_QTY_API,
|
|
@@ -3923,74 +3802,6 @@ async function fetchOperationReceiveQty(paramsConfig) {
|
|
|
3923
3802
|
return void 0;
|
|
3924
3803
|
}
|
|
3925
3804
|
}
|
|
3926
|
-
const UDI_API = {
|
|
3927
|
-
modelCategory: "entity",
|
|
3928
|
-
modelKey: "em_production_identification_udi",
|
|
3929
|
-
bsKey: "listAll"
|
|
3930
|
-
};
|
|
3931
|
-
function isPresent(value) {
|
|
3932
|
-
return value !== void 0 && value !== null && value !== "";
|
|
3933
|
-
}
|
|
3934
|
-
function isBlank(value) {
|
|
3935
|
-
return value === void 0 || value === null || value === "";
|
|
3936
|
-
}
|
|
3937
|
-
function unwrapUdiList(res) {
|
|
3938
|
-
if (Array.isArray(res)) return res;
|
|
3939
|
-
if (!res || typeof res !== "object") return [];
|
|
3940
|
-
const data = res.data;
|
|
3941
|
-
if (Array.isArray(data)) return data;
|
|
3942
|
-
if (data && typeof data === "object" && Array.isArray(data.data)) {
|
|
3943
|
-
return data.data;
|
|
3944
|
-
}
|
|
3945
|
-
return [];
|
|
3946
|
-
}
|
|
3947
|
-
function resolveUdiQuery(paramsConfig) {
|
|
3948
|
-
const containerId = paramsConfig?.containerId;
|
|
3949
|
-
if (!isBlank(containerId)) {
|
|
3950
|
-
return { production_identification_id_: String(containerId) };
|
|
3951
|
-
}
|
|
3952
|
-
const snId = paramsConfig?.snId;
|
|
3953
|
-
if (!isBlank(snId)) {
|
|
3954
|
-
return { production_identification_id_: String(snId) };
|
|
3955
|
-
}
|
|
3956
|
-
return void 0;
|
|
3957
|
-
}
|
|
3958
|
-
function parseUdi(res) {
|
|
3959
|
-
const row = unwrapUdiList(res)[0];
|
|
3960
|
-
if (!row) return void 0;
|
|
3961
|
-
const value = row.udi_;
|
|
3962
|
-
return isPresent(value) ? String(value) : void 0;
|
|
3963
|
-
}
|
|
3964
|
-
const inflightUdiByQuery = /* @__PURE__ */ new Map();
|
|
3965
|
-
const resolvedUdiByQuery = /* @__PURE__ */ new Map();
|
|
3966
|
-
async function fetchUdi(paramsConfig) {
|
|
3967
|
-
const query = resolveUdiQuery(paramsConfig);
|
|
3968
|
-
if (!query) return void 0;
|
|
3969
|
-
const cacheKey = JSON.stringify(query);
|
|
3970
|
-
if (resolvedUdiByQuery.has(cacheKey)) return resolvedUdiByQuery.get(cacheKey);
|
|
3971
|
-
const existing = inflightUdiByQuery.get(cacheKey);
|
|
3972
|
-
if (existing) return existing;
|
|
3973
|
-
const task = (async () => {
|
|
3974
|
-
try {
|
|
3975
|
-
const res = await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
|
|
3976
|
-
UDI_API,
|
|
3977
|
-
{},
|
|
3978
|
-
{ query, pageNo: 1, pageSize: 1 }
|
|
3979
|
-
);
|
|
3980
|
-
const udi = parseUdi(res);
|
|
3981
|
-
resolvedUdiByQuery.set(cacheKey, udi);
|
|
3982
|
-
return udi;
|
|
3983
|
-
} catch {
|
|
3984
|
-
return void 0;
|
|
3985
|
-
}
|
|
3986
|
-
})();
|
|
3987
|
-
inflightUdiByQuery.set(cacheKey, task);
|
|
3988
|
-
try {
|
|
3989
|
-
return await task;
|
|
3990
|
-
} finally {
|
|
3991
|
-
inflightUdiByQuery.delete(cacheKey);
|
|
3992
|
-
}
|
|
3993
|
-
}
|
|
3994
3805
|
const _hoisted_1$5 = ["data-merge", "data-fill-direction"];
|
|
3995
3806
|
const _hoisted_2$1 = {
|
|
3996
3807
|
key: 0,
|
|
@@ -4864,7 +4675,6 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4864
4675
|
Object.assign(rowData, defaultRow, preserved);
|
|
4865
4676
|
tableController.setDefaultValue(rowData);
|
|
4866
4677
|
rowData.bom_entry_id_ = void 0;
|
|
4867
|
-
if (tableController.isCustomRequiredQty) rowData.qty_required_ = void 0;
|
|
4868
4678
|
rowData.qty_consumed_total_ = void 0;
|
|
4869
4679
|
clearMcValidatorComments();
|
|
4870
4680
|
tableController.updateDerivedQtyFields();
|
|
@@ -4886,11 +4696,8 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4886
4696
|
rowNum = 1,
|
|
4887
4697
|
quickFillDatas
|
|
4888
4698
|
}) => {
|
|
4889
|
-
const bomEntryId = rowData.bom_entry_id_ ?? (rowData.product_id_ ? tableController.bomEntriesValidator.findUtilByProductId(rowData.product_id_)?.bomEntry.id_ : void 0);
|
|
4890
|
-
const requiredQty = tableController.isCustomRequiredQty && bomEntryId ? tableController.getCustomGroupRequiredQty(rowData) : void 0;
|
|
4891
4699
|
insertRowsAt(resolveRealIndex(index) + 1, createDefaultRows(rowNum, quickFillDatas, (r) => {
|
|
4892
|
-
if (
|
|
4893
|
-
if (tableController.isCustomRequiredQty && bomEntryId) r.qty_required_ = requiredQty;
|
|
4700
|
+
if (rowData.bom_entry_id_) r.bom_entry_id_ = rowData.bom_entry_id_;
|
|
4894
4701
|
}));
|
|
4895
4702
|
};
|
|
4896
4703
|
const handleAddGroup = async ({
|
|
@@ -4927,11 +4734,7 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4927
4734
|
});
|
|
4928
4735
|
}
|
|
4929
4736
|
if (groupLast < 0) groupLast = resolveRealIndex(index);
|
|
4930
|
-
insertRowsAt(groupLast + 1, createDefaultRows(1, quickFillDatas
|
|
4931
|
-
if (tableController.isCustomRequiredQty && quickFillDatas?.[0]?.qty_required_ == null) {
|
|
4932
|
-
row.qty_required_ = void 0;
|
|
4933
|
-
}
|
|
4934
|
-
}));
|
|
4737
|
+
insertRowsAt(groupLast + 1, createDefaultRows(1, quickFillDatas));
|
|
4935
4738
|
};
|
|
4936
4739
|
const handleAction = (action, rowData) => {
|
|
4937
4740
|
switch (action) {
|
|
@@ -5803,11 +5606,16 @@ const DocumentPaper = /* @__PURE__ */ defineComponent({
|
|
|
5803
5606
|
quickFill
|
|
5804
5607
|
} = table;
|
|
5805
5608
|
const {
|
|
5609
|
+
l: leftNo,
|
|
5806
5610
|
r: rightNo,
|
|
5807
5611
|
t: topNo
|
|
5808
5612
|
} = range;
|
|
5809
|
-
const firstTrId = widgetCenter[ComponentTypeEnum.PAPER].nextIds[topNo - 1];
|
|
5810
|
-
const
|
|
5613
|
+
const firstTrId = table.topTrId ?? widgetCenter[ComponentTypeEnum.PAPER].nextIds[topNo - 1];
|
|
5614
|
+
const actionTdId = widgetCenter[firstTrId]?.nextIds.slice(leftNo - 1, rightNo).reverse().find((tdId) => {
|
|
5615
|
+
const td = widgetCenter[tdId];
|
|
5616
|
+
return td?.cellValueType && !td.cellHidden;
|
|
5617
|
+
});
|
|
5618
|
+
if (!actionTdId) return;
|
|
5811
5619
|
const columns = Object.values(widgetCenter[ComponentTypeEnum.PAPER].props.fixedTableFieldMap || {}).filter((o) => o.fieldMeta?.subFieldKey === subFieldKey).map((o) => {
|
|
5812
5620
|
const {
|
|
5813
5621
|
fieldMeta,
|
|
@@ -5820,7 +5628,7 @@ const DocumentPaper = /* @__PURE__ */ defineComponent({
|
|
|
5820
5628
|
};
|
|
5821
5629
|
});
|
|
5822
5630
|
const columnKeys = columns.map((c) => c.prop);
|
|
5823
|
-
map[
|
|
5631
|
+
map[actionTdId] = {
|
|
5824
5632
|
subFieldKey,
|
|
5825
5633
|
subModelKey,
|
|
5826
5634
|
range,
|
|
@@ -5927,33 +5735,6 @@ const DocumentPaper = /* @__PURE__ */ defineComponent({
|
|
|
5927
5735
|
}
|
|
5928
5736
|
return attrInfo;
|
|
5929
5737
|
};
|
|
5930
|
-
const applyFixedTableSignatureLock = (tdInfo) => {
|
|
5931
|
-
if (!tdInfo.props?.isNewFixedTableTd || !tdInfo.cellWidget?.props?.field) {
|
|
5932
|
-
return tdInfo;
|
|
5933
|
-
}
|
|
5934
|
-
const tableField = tdInfo.props.fixedTableFieldId;
|
|
5935
|
-
const table = fixedTables.value.find((item) => item.field === tableField);
|
|
5936
|
-
const config2 = table?.bizTableConfig;
|
|
5937
|
-
if (!config2?.dataLockControlField) return tdInfo;
|
|
5938
|
-
const rowIndex = tdInfo.cellFixedTableDataIdx ?? 0;
|
|
5939
|
-
const rowData = props.formState?.[tableField]?.[rowIndex];
|
|
5940
|
-
const isControlField = tdInfo.cellWidget.props.field === config2.dataLockControlField;
|
|
5941
|
-
const locked = isSignatureLockActive(config2, rowData) && !isControlField;
|
|
5942
|
-
const controlFieldReadonly = isControlField && isPersistedSignatureLockActive(config2, rowData);
|
|
5943
|
-
const originalProps = tdInfo.cellWidget.props;
|
|
5944
|
-
return {
|
|
5945
|
-
...tdInfo,
|
|
5946
|
-
cellWidget: {
|
|
5947
|
-
...tdInfo.cellWidget,
|
|
5948
|
-
props: {
|
|
5949
|
-
...originalProps,
|
|
5950
|
-
fieldDisabled: locked ? true : originalProps.fieldDisabled,
|
|
5951
|
-
field_readonly: controlFieldReadonly ? true : originalProps.field_readonly,
|
|
5952
|
-
readonly: controlFieldReadonly ? true : originalProps.readonly
|
|
5953
|
-
}
|
|
5954
|
-
}
|
|
5955
|
-
};
|
|
5956
|
-
};
|
|
5957
5738
|
onMounted(async () => {
|
|
5958
5739
|
if (props.basicInfo.renderModeType === RenderModeEnum.ViewMode) {
|
|
5959
5740
|
await waitDomStable(mainTableRef.value, void 0, void 0, props.basicInfo.__isPrintRender);
|
|
@@ -6008,7 +5789,7 @@ const DocumentPaper = /* @__PURE__ */ defineComponent({
|
|
|
6008
5789
|
"key": `${trId}_${trIndex}`,
|
|
6009
5790
|
"height": height
|
|
6010
5791
|
}, [tdIds.map((tdId) => {
|
|
6011
|
-
const tdInfo =
|
|
5792
|
+
const tdInfo = props.widgetCenter[tdId];
|
|
6012
5793
|
const tdAttrs = {
|
|
6013
5794
|
key: tdId,
|
|
6014
5795
|
id: tdId,
|
|
@@ -6091,7 +5872,7 @@ const DocumentPaper = /* @__PURE__ */ defineComponent({
|
|
|
6091
5872
|
...widgetAttrs,
|
|
6092
5873
|
dynamicConfig
|
|
6093
5874
|
}) : null,
|
|
6094
|
-
// [固定表]
|
|
5875
|
+
// 在[固定表]顶部的可见单元格上加装操作按钮
|
|
6095
5876
|
tableAction: (() => {
|
|
6096
5877
|
const fixedTableActionVisible = fixedTableInfo?.quickFillVisible && !filledFixedTableKeys.value.includes(fixedTableInfo.subFieldKey);
|
|
6097
5878
|
return () => fixedTableActionVisible ? createVNode(_sfc_main$2, {
|
|
@@ -6268,62 +6049,57 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
6268
6049
|
});
|
|
6269
6050
|
const DynamicTableAction = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-53d7e66c"]]);
|
|
6270
6051
|
export {
|
|
6271
|
-
|
|
6272
|
-
resolveScanAdjustType as A,
|
|
6052
|
+
getCopySubMenu as A,
|
|
6273
6053
|
BorderTD as B,
|
|
6274
|
-
|
|
6054
|
+
resolveScanParsedValue as C,
|
|
6275
6055
|
DeviceLinkTmplUtil as D,
|
|
6276
6056
|
EMPTY_PRODUCT_VERSION_ID as E,
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6057
|
+
resolveScanFillData as F,
|
|
6058
|
+
isProductBatchEmptyRow as G,
|
|
6059
|
+
useMaterialBalance as H,
|
|
6280
6060
|
InstanceStatusValues as I,
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6061
|
+
validate as J,
|
|
6062
|
+
validateObjectBomQtyOnSubmit as K,
|
|
6063
|
+
DeviceConnector as L,
|
|
6284
6064
|
MaterialConsumptionPatternEnum as M,
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6065
|
+
DocumentLoading as N,
|
|
6066
|
+
DynamicQuickFillModal as O,
|
|
6067
|
+
FixedQuickFillModal as P,
|
|
6068
|
+
FormTmplConfigController as Q,
|
|
6289
6069
|
RequiredQtyCalcRule as R,
|
|
6290
6070
|
ScanParamType as S,
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6071
|
+
MCDataUtil as T,
|
|
6072
|
+
OCR_MODEL_PRECISION_ENUM_KEY as U,
|
|
6073
|
+
getAppInfo as V,
|
|
6074
|
+
getSuiteKey as W,
|
|
6075
|
+
isBlank$1 as X,
|
|
6076
|
+
isEqmSuite as Y,
|
|
6077
|
+
pickObjectFieldKeys as Z,
|
|
6298
6078
|
_sfc_main$5 as _,
|
|
6299
6079
|
useTmplBom as a,
|
|
6300
|
-
isEqmSuite as a0,
|
|
6301
|
-
parseUdi as a1,
|
|
6302
|
-
pickObjectFieldKeys as a2,
|
|
6303
|
-
resolveUdiQuery as a3,
|
|
6304
6080
|
buildObjectLotExtraQuery as b,
|
|
6305
6081
|
resolveObjectBomEntry as c,
|
|
6306
6082
|
runWithFillProduct as d,
|
|
6307
6083
|
applyConsumeObjectTraceChange as e,
|
|
6308
|
-
|
|
6084
|
+
fetchOperationReceiveQty as f,
|
|
6309
6085
|
getObjectBomMaterialLotQuery as g,
|
|
6310
|
-
|
|
6086
|
+
getObjectBomProductQuery as h,
|
|
6311
6087
|
isEdhrSuite as i,
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6088
|
+
useStyles as j,
|
|
6089
|
+
useValidator as k,
|
|
6090
|
+
DocumentPaper as l,
|
|
6091
|
+
DynamicTableAction as m,
|
|
6316
6092
|
normalizeFieldWidth as n,
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6093
|
+
MaterialConsumeTableController as o,
|
|
6094
|
+
SubTableCore as p,
|
|
6095
|
+
SubTableActionMenuTypeEnum as q,
|
|
6320
6096
|
resolveObjectFieldKeys as r,
|
|
6321
|
-
|
|
6322
|
-
|
|
6097
|
+
getMenuByAction as s,
|
|
6098
|
+
SubTableActionEnum as t,
|
|
6323
6099
|
useFormTmplConfig as u,
|
|
6324
6100
|
validateObjectBomForScan as v,
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6101
|
+
getInsertSubMenu as w,
|
|
6102
|
+
resolveScanAdjustType as x,
|
|
6103
|
+
resolveScanQty as y,
|
|
6104
|
+
toDateOnly as z
|
|
6329
6105
|
};
|