@gct-paas/excel 0.1.39-beta.9 → 0.1.39
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-Dri2NRAY.js → BaseComponent-vcQYIdIV.js} +2 -2
- package/dist/{VueVideoPlayer-DPJyefX-.js → VueVideoPlayer-i-e8JA1p.js} +2 -2
- package/dist/{align-editor-BvGUsoz3.js → align-editor-BHe6RawU.js} +1 -1
- package/dist/{barcode-design-j7wyssrW.js → barcode-design-B2QebWCm.js} +2 -2
- package/dist/base/index.es.js +624 -264
- package/dist/{diagonal-design-BSZWkw3m.js → diagonal-design-Di8yoq2q.js} +2 -2
- package/dist/{dynamic-table-action-BQfJFJ4j.js → dynamic-table-action-ixEHBudI.js} +1041 -368
- package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-DZRtpBe8.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-CKf2tZG7.js} +1039 -1409
- package/dist/{edit.utils-CXmmCnxE-CvJGxh2v.js → edit.utils-CXmmCnxE-Dq-jFR6z.js} +1 -1
- package/dist/excel.css +568 -369
- package/dist/{exceljs.min-S4WRZ454.js → exceljs.min-Biokosoj.js} +2 -2
- package/dist/{font-editor-DH2EtSpD.js → font-editor-B8l8oZMc.js} +3 -3
- package/dist/{image-design-A8_t4F3t.js → image-design-BI6ld3iT.js} +2 -2
- package/dist/{index-DFNVqlgA.js → index-0QNiqIDD.js} +1 -1
- package/dist/{index-Caygbi4F.js → index-4DBBFAz2.js} +2 -2
- package/dist/{index-DERot0lx.js → index-5-uaHPu2.js} +2 -2
- package/dist/{index-H2nF4SP8.js → index-849t15XD.js} +2 -2
- package/dist/{index-C3k8QiLF.js → index-ACzLWeSq.js} +2 -2
- package/dist/{index-DkwkBWEP.js → index-B-2uV1do.js} +2 -2
- package/dist/{index-bH6ERrWd.js → index-B-in7hrx.js} +2 -2
- package/dist/{index-B-Kwr44d.js → index-B1qdPPcT.js} +1 -1
- package/dist/{index-B_GyS-E2.js → index-B2-4fQY4.js} +1 -1
- package/dist/{index-BMgsVWb2.js → index-BC-WTGht.js} +6 -3
- package/dist/{index-CJdwj04Z.js → index-BWibgLgR.js} +1 -1
- package/dist/{index-DWVhXPb-.js → index-BY-gcezU.js} +2 -2
- package/dist/{index-BLmR9aiG.js → index-B_8k4BAM.js} +1 -1
- package/dist/{index-CTASuQPn.js → index-BaiFrPHF.js} +1 -1
- package/dist/{index-BULBrHtQ.js → index-BgCtUVN4.js} +2 -2
- package/dist/{index-CxQSyBZw.js → index-Boq5CJjh.js} +3 -3
- package/dist/{index-CfGLFrkj.js → index-BwN8dOzz.js} +1 -1
- package/dist/{index-DPNbUuwP.js → index-Bz-WrsTI.js} +6 -5
- package/dist/{index-DnykuPHF.js → index-C4P86Gyr.js} +2 -2
- package/dist/{index-CRloZ0HP.js → index-C68Ddx67.js} +2 -2
- package/dist/{index-afC-rHNa.js → index-CDYkiSAG.js} +2 -2
- package/dist/{index-DN9Y7054.js → index-CKQht60B.js} +6 -5
- package/dist/{index-BUK-p31i.js → index-CM549sqd.js} +3 -2
- package/dist/{index-DmBx27M9.js → index-CNNAdkvj.js} +2 -2
- package/dist/{index-Bs8Xs0bo.js → index-CTmqu_l0.js} +1 -1
- package/dist/{index-DY7Xkd8n.js → index-CbwfhoZc.js} +2 -2
- package/dist/{index-D9444n1O.js → index-CbzO_9_B.js} +2 -2
- package/dist/{index-BE-3UQG0.js → index-CqJMdCBq.js} +50 -3
- package/dist/{index-Bo_31wZD.js → index-DJWuge8D.js} +5 -7
- package/dist/{index-D9OUmbBs.js → index-DdeccRDL.js} +1 -1
- package/dist/{index-Cc6r9LJx.js → index-T4KiEmZK.js} +3 -3
- package/dist/{index-DsLZqLga.js → index-aGBVmmIs.js} +2 -2
- package/dist/{index-DrA9ZgS7.js → index-bLaVMu7L.js} +2442 -1956
- package/dist/{index-DPHGDezJ.js → index-n8fyvJSm.js} +1 -1
- package/dist/{index-D1jXU0ka.js → index-rMox9ntl.js} +2 -2
- package/dist/index.es.js +2 -2
- package/dist/{mb-render-DybPk-KF.js → mb-render-BhZlu6KQ.js} +8 -2
- package/dist/{online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-BEX02BrW.js → online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-1sgb8Alq.js} +8 -1
- package/dist/{pagination-design-0W-jGAyr.js → pagination-design-DvqAcQIp.js} +2 -2
- package/dist/paper-widget-design-D_kqGHiq.js +4 -0
- package/dist/{print-runtime-instance-DcjvavYI.js → print-runtime-instance-CmWFXzPQ.js} +1 -1
- package/dist/{print-snapshot-renderer-CsCyscta.js → print-snapshot-renderer-DsksM5OJ.js} +3 -3
- package/dist/{qrcode-design-bZWGrJtf.js → qrcode-design-CuDgywl1.js} +1 -1
- package/dist/{revo-grid.entry-EvEm_y2W.js → revo-grid.entry-BqAGRHgf.js} +1 -1
- package/dist/{revogr-attribution_7.entry-DgE6PR1L.js → revogr-attribution_7.entry-Dl-LcgkK.js} +3 -3
- package/dist/{revogr-clipboard_3.entry-CNDxeVhF.js → revogr-clipboard_3.entry-CT01IdhF.js} +2 -2
- package/dist/{revogr-data_4.entry-DKwV9DMF.js → revogr-data_4.entry-fH5V7Zgk.js} +2 -2
- package/dist/{revogr-filter-panel.entry-1SAhHHfl.js → revogr-filter-panel.entry-DiC81RU-.js} +1 -1
- package/dist/seal-design-CZ8RLM62.js +4 -0
- package/dist/{serialnumber-design-Cs3B0ZNE.js → serialnumber-design-CVO53aOV.js} +1 -1
- package/dist/shared/index.es.js +23 -21
- package/dist/{single-field-drop-p4d5y85m.js → single-field-drop-B51_f5z6.js} +2 -2
- package/dist/{size-editor-B2TfX4_r.js → size-editor-BeSNExEt.js} +1 -1
- package/dist/src/domain/table/business/material/material-balance/profile/fields.d.ts +2 -0
- package/dist/src/domain/table/business/preprocess/pretreatment-list/profile/field-keys.d.ts +1 -7
- package/dist/src/domain/table/business/sterilize/entrust-steril-batch-list/profile/fields.d.ts +2 -0
- package/dist/src/nocode-base/src/core/factory/sub-table-factory.d.ts +2 -0
- package/dist/src/nocode-base/src/core/sub-table/allocate-table-core.d.ts +2 -1
- package/dist/src/nocode-base/src/core/sub-table/sub-table-core.d.ts +2 -1
- package/dist/src/nocode-base/src/hooks/form-model/form-model-controller.d.ts +2 -0
- package/dist/src/nocode-base/src/hooks/material-consume/bom-validator.d.ts +9 -7
- package/dist/src/nocode-base/src/hooks/material-consume/material-consume-table-controller.d.ts +18 -14
- package/dist/src/nocode-base/src/hooks/material-consume/tmpl-bom-controller.d.ts +20 -7
- package/dist/src/nocode-base/src/hooks/material-consume/types.d.ts +6 -0
- package/dist/src/nocode-base/src/hooks/material-consume-object/bom-validator.d.ts +4 -3
- package/dist/src/nocode-base/src/hooks/material-consume-object/initialize-autofill.d.ts +19 -0
- package/dist/src/nocode-base/src/hooks/material-consume-object/object-validation-controller.d.ts +24 -0
- package/dist/src/nocode-base/src/interface/render.d.ts +3 -1
- package/dist/src/nocode-base/src/interface/transform.d.ts +14 -1
- package/dist/src/nocode-base/src/runtime/formula-utils.d.ts +2 -0
- package/dist/src/nocode-base/src/runtime/multi-sheet-runtime.d.ts +3 -1
- package/dist/src/nocode-base/src/runtime/runtime-context.d.ts +4 -0
- package/dist/src/nocode-base/src/runtime/runtime-form-state-store.d.ts +6 -2
- package/dist/src/nocode-base/src/runtime/table-row-identity.d.ts +2 -0
- package/dist/src/nocode-base/src/types/render/sub-table-render.d.ts +5 -1
- package/dist/src/nocode-web-render/src/render/sub-table/common/inventory-scan-columns.d.ts +6 -0
- package/dist/src/online-form/src/views/__cell_widgets__/cell-widget-design.vue.d.ts +2 -0
- package/dist/src/online-form/src/views/__cell_widgets__/common/display-fields-editor/display-fields.util.d.ts +2 -2
- package/dist/src/online-form/src/views/__cell_widgets__/common/quick-search-editor/quick-search.util.d.ts +8 -0
- package/dist/src/online-form/src/views/__cell_widgets__/fake-field/fake-option-select.vue.d.ts +1 -0
- package/dist/src/online-form/src/views/designer/conversions/normalize-paper-grid.d.ts +3 -0
- package/dist/src/online-form/src/views/designer/hooks/useAllSpreadSheets.d.ts +35 -0
- package/dist/src/online-form/src/views/designer/hooks/useSpreadSheet.d.ts +16 -1
- package/dist/src/online-form/src/views/designer/modules/base/designer-wrapper.vue.d.ts +1 -0
- package/dist/src/online-form/src/views/designer/modules/duplicate-field-notice.vue.d.ts +2 -0
- package/dist/src/online-form/src/views/designer/modules/panel/panel-data-init-config/object-init/hooks/useObjectInit.d.ts +2 -0
- package/dist/src/online-form/src/views/designer/modules/panel/sub-table/comps/use-dynamic-sub-table-panel.d.ts +12 -0
- package/dist/src/online-form/src/views/designer/modules/xlsx-import-summary.vue.d.ts +11 -0
- package/dist/src/online-form/src/views/designer/types/index.d.ts +2 -0
- package/dist/src/online-form/src/views/designer/types/sheets.d.ts +2 -0
- package/dist/src/online-form/src/views/designer/utils/cell-field-placements.d.ts +12 -0
- package/dist/src/online-form/src/views/designer/utils/xlsx-parser.d.ts +9 -3
- package/dist/src/online-form/src/views/render/__components__/_field_/trace/composables/useReferenceLabel.d.ts +4 -0
- package/dist/src/online-form/src/views/render/__components__/_field_/trace/utils/use-rule-props.d.ts +0 -3
- package/dist/src/shared/enum/field-type.d.ts +2 -0
- package/dist/src/shared/enum/index.d.ts +2 -0
- package/dist/src/shared/enum/product-type.d.ts +9 -0
- package/dist/src/shared/enum/production-identification.d.ts +19 -0
- package/dist/src/shared/utils/cell-wrap.d.ts +9 -0
- package/dist/src/shared/utils/grid-size.d.ts +2 -0
- package/dist/src/shared/utils/lot2sn.d.ts +14 -1
- package/dist/src/shared/utils/query-filter.d.ts +24 -0
- package/dist/{sub-table-factory-CNkIUJTC.js → sub-table-factory-sC8iCJWs.js} +38 -18
- package/dist/{text-design-CQh0wCUf.js → text-design-DK_QWoro.js} +5 -4
- package/dist/{throttle-Cpk1LoGk-Ch-cqj2G.js → throttle-Cpk1LoGk-BreMfOwP.js} +1 -1
- package/dist/{timediff-design-DASqeRcJ.js → timediff-design-Iwg0BNOb.js} +1 -1
- package/dist/{trace-like-wrapper-WHxVTEDg.js → trace-like-wrapper-D0pPaeII.js} +5 -2
- package/dist/{value-editor.vue_vue_type_style_index_0_lang-DpD-eicm.js → value-editor.vue_vue_type_style_index_0_lang-B4gIt1fw.js} +2 -2
- package/dist/web-render/index.es.js +3 -3
- package/dist/{widget-barcode-Bbxna1MX.js → widget-barcode-DSBywfHB.js} +4 -4
- package/dist/{widget-diagonal-Zm6RJ-dJ.js → widget-diagonal-DiBbiuEA.js} +3 -3
- package/dist/{widget-image-CnSS8iu3.js → widget-image-DUtfyekO.js} +5 -5
- package/dist/{widget-line-DLOrL-Ko.js → widget-line-6Ngl_4mJ.js} +2 -2
- package/dist/{widget-pagination-m6JH4QqC.js → widget-pagination-DXmnbvtx.js} +5 -5
- package/dist/{widget-power-Bavhllni.js → widget-power-DbsY-uwC.js} +3 -3
- package/dist/{widget-qrcode-DLXRIwk7.js → widget-qrcode-LsBgDKds.js} +3 -3
- package/dist/{widget-rangelimit-Cd-qdFTp.js → widget-rangelimit-DJ_5u-vA.js} +3 -3
- package/dist/{widget-serialnumber-CL8cIWsV.js → widget-serialnumber-TEVkPcgx.js} +1 -1
- package/dist/{widget-text-B-IJP4xb.js → widget-text-DD-xuVwh.js} +5 -5
- package/dist/{widget-timediff-CSd24naC.js → widget-timediff-DQV78xgH.js} +2 -2
- package/package.json +2 -2
- package/dist/paper-widget-design-DFXzTgYk.js +0 -4
- package/dist/seal-design-RaHNhk4V.js +0 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { has,
|
|
1
|
+
import { has, keyBy, pick, isNil, isEmpty, mapKeys, cloneDeep, flatMap, omit, merge, pickBy, isObject as isObject$1, omitBy, defaults, groupBy, isEqual, get as get$1, last, first } from "lodash-es";
|
|
2
2
|
import dayjs from "dayjs";
|
|
3
|
-
import { computed, defineComponent, ref, onMounted, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, toDisplayString, vShow, createVNode, render as render$1,
|
|
3
|
+
import { computed, toRaw, defineComponent, ref, onMounted, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, toDisplayString, vShow, createVNode, render as render$1, inject, defineAsyncComponent, getCurrentInstance, h as h$1 } from "vue";
|
|
4
4
|
import { api as api$1 } from "@gct-paas/api";
|
|
5
5
|
var PlatformEnum = /* @__PURE__ */ ((PlatformEnum2) => {
|
|
6
6
|
PlatformEnum2["INTEGRATION_PAAS_DP"] = "INTEGRATION_PAAS_DP";
|
|
@@ -478,6 +478,17 @@ const PaperSizeMap = computed(() => ({
|
|
|
478
478
|
size: void 0
|
|
479
479
|
}
|
|
480
480
|
}));
|
|
481
|
+
var ProductionIdentificationTypeEnum = /* @__PURE__ */ ((ProductionIdentificationTypeEnum2) => {
|
|
482
|
+
ProductionIdentificationTypeEnum2["MATERIAL"] = "MATERIAL";
|
|
483
|
+
ProductionIdentificationTypeEnum2["LOT"] = "LOT";
|
|
484
|
+
ProductionIdentificationTypeEnum2["SN"] = "SN";
|
|
485
|
+
ProductionIdentificationTypeEnum2["STERILIZATION"] = "STERILIZATION";
|
|
486
|
+
ProductionIdentificationTypeEnum2["INSPECTION_CONTAINER"] = "INSPECTION_CONTAINER";
|
|
487
|
+
ProductionIdentificationTypeEnum2["LEGACY_INSPECTION"] = "inspection";
|
|
488
|
+
ProductionIdentificationTypeEnum2["PACK_BOX"] = "PACK_BOX";
|
|
489
|
+
ProductionIdentificationTypeEnum2["UDI"] = "UDI";
|
|
490
|
+
return ProductionIdentificationTypeEnum2;
|
|
491
|
+
})(ProductionIdentificationTypeEnum || {});
|
|
481
492
|
var CardControlEnum = /* @__PURE__ */ ((CardControlEnum2) => {
|
|
482
493
|
CardControlEnum2["CHECK"] = "check";
|
|
483
494
|
CardControlEnum2["CHECK2TIP"] = "check2tip";
|
|
@@ -1506,6 +1517,14 @@ const FieldIconMap = {
|
|
|
1506
1517
|
"qty"
|
|
1507
1518
|
/* QTY */
|
|
1508
1519
|
]: "icon-shuliang",
|
|
1520
|
+
[
|
|
1521
|
+
"object_type"
|
|
1522
|
+
/* OBJECT_TYPE */
|
|
1523
|
+
]: "icon-duixiang bd-iconfont",
|
|
1524
|
+
[
|
|
1525
|
+
"material_consume"
|
|
1526
|
+
/* MATERIAL_CONSUME */
|
|
1527
|
+
]: "icon-field-product",
|
|
1509
1528
|
[
|
|
1510
1529
|
"model_relation"
|
|
1511
1530
|
/* MODEL_RELATION */
|
|
@@ -1901,7 +1920,14 @@ function applyFillFromMaterialNoOption(row, source) {
|
|
|
1901
1920
|
return applyFillFromMapping$1(row, source, FILL_FROM_MATERIAL_NO_OPTION);
|
|
1902
1921
|
}
|
|
1903
1922
|
function applyFillFromProductOption$1(row, source) {
|
|
1904
|
-
|
|
1923
|
+
const defaults2 = source.__DEFAULT__;
|
|
1924
|
+
const product = defaults2 && typeof defaults2 === "object" ? Object.fromEntries(
|
|
1925
|
+
FILL_FROM_PRODUCT_OPTION$1.map(({ optionField }) => [
|
|
1926
|
+
optionField,
|
|
1927
|
+
defaults2[optionField] ?? source[optionField]
|
|
1928
|
+
])
|
|
1929
|
+
) : source;
|
|
1930
|
+
return applyFillFromMapping$1(row, product, FILL_FROM_PRODUCT_OPTION$1);
|
|
1905
1931
|
}
|
|
1906
1932
|
function isBlank$d(value) {
|
|
1907
1933
|
return value === void 0 || value === null || value === "";
|
|
@@ -1916,7 +1942,7 @@ const PRODUCT_QUICK_SEARCH_FIELDS = [
|
|
|
1916
1942
|
"spec_.like"
|
|
1917
1943
|
];
|
|
1918
1944
|
const PRODUCT_QUICK_SEARCH_EXP = `OR(${PRODUCT_QUICK_SEARCH_FIELDS.join(",")})`;
|
|
1919
|
-
const fields$
|
|
1945
|
+
const fields$f = [
|
|
1920
1946
|
{
|
|
1921
1947
|
match: { fieldKey: F$c.product },
|
|
1922
1948
|
defaultProps: {
|
|
@@ -1966,7 +1992,7 @@ const profile$h = {
|
|
|
1966
1992
|
refModelType: "WAREHOUSE_IN",
|
|
1967
1993
|
tableType: SubTableType.WAREHOUSE_IN
|
|
1968
1994
|
},
|
|
1969
|
-
fields: fields$
|
|
1995
|
+
fields: fields$f,
|
|
1970
1996
|
contextAssignments: [
|
|
1971
1997
|
{ when: "onRowInit", fieldKey: F$c.warehouse, paramKey: "warehouseId", onlyIfEmpty: true },
|
|
1972
1998
|
{ when: "onRowInit", fieldKey: F$c.mfgOrder, paramKey: "mfgOrderId", onlyIfEmpty: true },
|
|
@@ -2083,7 +2109,7 @@ const FILL_FROM_INVENTORY_OPTION$4 = [
|
|
|
2083
2109
|
{ optionField: "validate_", toField: F$b.validity },
|
|
2084
2110
|
{ optionField: "re_inspection_date_", toField: F$b.reInspectionDate }
|
|
2085
2111
|
];
|
|
2086
|
-
const fields$
|
|
2112
|
+
const fields$e = [
|
|
2087
2113
|
{
|
|
2088
2114
|
match: { fieldKey: [...DISABLED_INPUT_FIELDS$8] },
|
|
2089
2115
|
defaultProps: {
|
|
@@ -2108,7 +2134,7 @@ const profile$g = {
|
|
|
2108
2134
|
refModelType: "WAREHOUSE_OUT",
|
|
2109
2135
|
tableType: SubTableType.WAREHOUSE_OUT
|
|
2110
2136
|
},
|
|
2111
|
-
fields: fields$
|
|
2137
|
+
fields: fields$e,
|
|
2112
2138
|
contextAssignments: [
|
|
2113
2139
|
{ when: "onRowInit", fieldKey: F$b.warehouse, paramKey: "warehouseId", onlyIfEmpty: true },
|
|
2114
2140
|
{ when: "onRowInit", fieldKey: F$b.mfgOrder, paramKey: "mfgOrderId", onlyIfEmpty: true },
|
|
@@ -2170,7 +2196,7 @@ const FILL_FROM_PART_OPTION = [
|
|
|
2170
2196
|
{ optionField: "unit_", toField: F$a.qtyUom }
|
|
2171
2197
|
];
|
|
2172
2198
|
const PART_QUICK_SEARCH_FIELDS = ["part_code_.iLike", "part_name_.iLike"];
|
|
2173
|
-
const fields$
|
|
2199
|
+
const fields$d = [
|
|
2174
2200
|
{
|
|
2175
2201
|
match: { fieldKey: F$a.part },
|
|
2176
2202
|
defaultProps: {
|
|
@@ -2208,7 +2234,7 @@ const profile$f = {
|
|
|
2208
2234
|
refModelType: "WAREHOUSE_INBOUND",
|
|
2209
2235
|
tableType: SubTableType.WAREHOUSE_INBOUND
|
|
2210
2236
|
},
|
|
2211
|
-
fields: fields$
|
|
2237
|
+
fields: fields$d,
|
|
2212
2238
|
contextAssignments: [
|
|
2213
2239
|
{ when: "onRowInit", fieldKey: F$a.warehouse, paramKey: "warehouseId", onlyIfEmpty: true }
|
|
2214
2240
|
],
|
|
@@ -2293,7 +2319,7 @@ const FILL_FROM_INVENTORY_OPTION$3 = [
|
|
|
2293
2319
|
{ optionField: "uom_id_", toField: F$9.qtyUom },
|
|
2294
2320
|
{ optionField: "validate_", toField: F$9.validity }
|
|
2295
2321
|
];
|
|
2296
|
-
const fields$
|
|
2322
|
+
const fields$c = [
|
|
2297
2323
|
{
|
|
2298
2324
|
match: { fieldKey: F$9.part },
|
|
2299
2325
|
autofillTemplates: FILL_FROM_INVENTORY_OPTION$3.map(({ optionField, toField }) => ({
|
|
@@ -2327,7 +2353,7 @@ const profile$e = {
|
|
|
2327
2353
|
refModelType: "WAREHOUSE_OUTBOUND",
|
|
2328
2354
|
tableType: SubTableType.WAREHOUSE_OUTBOUND
|
|
2329
2355
|
},
|
|
2330
|
-
fields: fields$
|
|
2356
|
+
fields: fields$c,
|
|
2331
2357
|
rowHandlers: [{ when: "onFieldChange", watch: [F$9.part], handler: "on-part-id-change" }],
|
|
2332
2358
|
runtimeRules: [
|
|
2333
2359
|
{
|
|
@@ -2469,7 +2495,7 @@ const INVENTORY_BASE_FIELDS = [
|
|
|
2469
2495
|
F$8.productSpec,
|
|
2470
2496
|
F$8.warehouse
|
|
2471
2497
|
];
|
|
2472
|
-
const fields$
|
|
2498
|
+
const fields$b = [
|
|
2473
2499
|
{
|
|
2474
2500
|
match: { fieldKey: [...DESIGN_DISABLED_INPUT_FIELDS] },
|
|
2475
2501
|
defaultProps: {
|
|
@@ -2524,7 +2550,7 @@ const profile$d = {
|
|
|
2524
2550
|
/** 默认按库位精细 */
|
|
2525
2551
|
stocktakeDimension: STOCKTAKE_DIMENSION.locationDetail
|
|
2526
2552
|
},
|
|
2527
|
-
fields: fields$
|
|
2553
|
+
fields: fields$b,
|
|
2528
2554
|
contextAssignments: [
|
|
2529
2555
|
{ when: "onRowInit", fieldKey: F$8.warehouse, paramKey: "warehouseId", onlyIfEmpty: true }
|
|
2530
2556
|
],
|
|
@@ -2714,7 +2740,7 @@ const FILL_FROM_INVENTORY_OPTION$2 = [
|
|
|
2714
2740
|
{ optionField: "stock_num_", toField: F$7.stock },
|
|
2715
2741
|
{ optionField: "uom_id_", toField: F$7.qtyUom }
|
|
2716
2742
|
];
|
|
2717
|
-
const fields$
|
|
2743
|
+
const fields$a = [
|
|
2718
2744
|
{
|
|
2719
2745
|
match: { fieldKey: F$7.part },
|
|
2720
2746
|
autofillTemplates: FILL_FROM_INVENTORY_OPTION$2.map(({ optionField, toField }) => ({
|
|
@@ -2755,7 +2781,7 @@ const profile$c = {
|
|
|
2755
2781
|
refModelType: "PART_STOCKTAKE",
|
|
2756
2782
|
tableType: SubTableType.PART_STOCKTAKE
|
|
2757
2783
|
},
|
|
2758
|
-
fields: fields$
|
|
2784
|
+
fields: fields$a,
|
|
2759
2785
|
rowHandlers: [
|
|
2760
2786
|
{ when: "onFieldChange", watch: [F$7.part], handler: "on-part-id-change" },
|
|
2761
2787
|
{
|
|
@@ -2880,7 +2906,7 @@ const FILL_FROM_INVENTORY_OPTION$1 = [
|
|
|
2880
2906
|
{ optionField: "storage_zone_id_", toField: F$6.storageZone },
|
|
2881
2907
|
{ optionField: "location_id_", toField: F$6.location }
|
|
2882
2908
|
];
|
|
2883
|
-
const fields$
|
|
2909
|
+
const fields$9 = [
|
|
2884
2910
|
{
|
|
2885
2911
|
match: { fieldKey: F$6.part },
|
|
2886
2912
|
autofillTemplates: FILL_FROM_INVENTORY_OPTION$1.map(({ optionField, toField }) => ({
|
|
@@ -2921,7 +2947,7 @@ const profile$b = {
|
|
|
2921
2947
|
refModelType: "DEVICE_PART_CONSUME",
|
|
2922
2948
|
tableType: SubTableType.DEVICE_PART_CONSUME
|
|
2923
2949
|
},
|
|
2924
|
-
fields: fields$
|
|
2950
|
+
fields: fields$9,
|
|
2925
2951
|
rowHandlers: [{ when: "onFieldChange", watch: [F$6.part], handler: "on-part-id-change" }],
|
|
2926
2952
|
runtimeRules: [
|
|
2927
2953
|
{
|
|
@@ -3027,7 +3053,7 @@ const FILL_FROM_INVENTORY_OPTION = [
|
|
|
3027
3053
|
{ optionField: "validate_", toField: F$5.validity },
|
|
3028
3054
|
{ optionField: "re_inspection_date_", toField: F$5.reInspectionDate }
|
|
3029
3055
|
];
|
|
3030
|
-
const fields$
|
|
3056
|
+
const fields$8 = [
|
|
3031
3057
|
{
|
|
3032
3058
|
match: { fieldKey: [...DISABLED_INPUT_FIELDS$3] },
|
|
3033
3059
|
defaultProps: {
|
|
@@ -3052,7 +3078,7 @@ const profile$a = {
|
|
|
3052
3078
|
refModelType: "ALLOCATE",
|
|
3053
3079
|
tableType: SubTableType.ALLOCATE
|
|
3054
3080
|
},
|
|
3055
|
-
fields: fields$
|
|
3081
|
+
fields: fields$8,
|
|
3056
3082
|
contextAssignments: [
|
|
3057
3083
|
{ when: "onRowInit", fieldKey: F$5.originWarehouse, paramKey: "warehouseId", onlyIfEmpty: true },
|
|
3058
3084
|
{ when: "onRowInit", fieldKey: F$5.mfgOrder, paramKey: "mfgOrderId", onlyIfEmpty: true },
|
|
@@ -3104,6 +3130,16 @@ const profile$9 = {
|
|
|
3104
3130
|
labelBjColor: "rgba(72,145,179,0.8)"
|
|
3105
3131
|
}
|
|
3106
3132
|
};
|
|
3133
|
+
const fields$7 = [
|
|
3134
|
+
{
|
|
3135
|
+
match: { fieldKey: ["material_id_", "material_balance_percent_"] },
|
|
3136
|
+
defaultProps: {
|
|
3137
|
+
disabled: true,
|
|
3138
|
+
fieldDisabled: true,
|
|
3139
|
+
required: false
|
|
3140
|
+
}
|
|
3141
|
+
}
|
|
3142
|
+
];
|
|
3107
3143
|
const TABLE_TYPE$7 = "material-balance";
|
|
3108
3144
|
const profile$8 = {
|
|
3109
3145
|
type: TABLE_TYPE$7,
|
|
@@ -3119,6 +3155,7 @@ const profile$8 = {
|
|
|
3119
3155
|
refModelType: "MATERIAL_BALANCE",
|
|
3120
3156
|
tableType: SubTableType.MATERIAL_BALANCE
|
|
3121
3157
|
},
|
|
3158
|
+
fields: fields$7,
|
|
3122
3159
|
theme: {
|
|
3123
3160
|
color: "#6FB38B",
|
|
3124
3161
|
background: "rgba(111,179,139,0.2)",
|
|
@@ -3141,7 +3178,7 @@ const F$4 = {
|
|
|
3141
3178
|
};
|
|
3142
3179
|
const DISABLED_INPUT_FIELDS$2 = [F$4.productName, F$4.productCode, F$4.productSpec];
|
|
3143
3180
|
const CLEAR_ON_PRODUCT_EMPTY$1 = [F$4.productName, F$4.productCode, F$4.productSpec];
|
|
3144
|
-
const fields$
|
|
3181
|
+
const fields$6 = [
|
|
3145
3182
|
{
|
|
3146
3183
|
match: { fieldKey: F$4.product },
|
|
3147
3184
|
autofillTemplates: [
|
|
@@ -3183,7 +3220,7 @@ const profile$7 = {
|
|
|
3183
3220
|
refModelType: "MATERIAL_REQUISITION",
|
|
3184
3221
|
tableType: SubTableType.MATERIAL_REQUISITION
|
|
3185
3222
|
},
|
|
3186
|
-
fields: fields$
|
|
3223
|
+
fields: fields$6,
|
|
3187
3224
|
contextAssignments: [
|
|
3188
3225
|
{ when: "onRowInit", fieldKey: F$4.mfgOrder, paramKey: "mfgOrderId", onlyIfEmpty: true },
|
|
3189
3226
|
{ when: "onRowInit", fieldKey: F$4.lotSn, paramKey: "lotSnId", onlyIfEmpty: true }
|
|
@@ -3291,7 +3328,7 @@ const SCAN_ROW_CONTENT_FIELDS = [
|
|
|
3291
3328
|
F$3.targetMaterialNo,
|
|
3292
3329
|
F$3.targetProduct
|
|
3293
3330
|
];
|
|
3294
|
-
const fields$
|
|
3331
|
+
const fields$5 = [
|
|
3295
3332
|
{
|
|
3296
3333
|
match: { fieldKey: F$3.sourceProduct },
|
|
3297
3334
|
autofillTemplates: FILL_FROM_SOURCE_PRODUCT_OPTION.map(({ optionField, toField }) => ({
|
|
@@ -3339,7 +3376,7 @@ const profile$6 = {
|
|
|
3339
3376
|
refModelType: "MATERIAL_SUBSTITUTION",
|
|
3340
3377
|
tableType: SubTableType.MATERIAL_SUBSTITUTION
|
|
3341
3378
|
},
|
|
3342
|
-
fields: fields$
|
|
3379
|
+
fields: fields$5,
|
|
3343
3380
|
rowHandlers: [
|
|
3344
3381
|
{
|
|
3345
3382
|
when: "onFieldChange",
|
|
@@ -3396,7 +3433,7 @@ const F$2 = {
|
|
|
3396
3433
|
/** 复核人 */
|
|
3397
3434
|
reviewer: "reviewer_"
|
|
3398
3435
|
};
|
|
3399
|
-
const fields$
|
|
3436
|
+
const fields$4 = [
|
|
3400
3437
|
{
|
|
3401
3438
|
match: { fieldKey: F$2.inspectionDate },
|
|
3402
3439
|
defaultProps: {
|
|
@@ -3431,7 +3468,7 @@ const profile$5 = {
|
|
|
3431
3468
|
refModelType: onlineFormMasterModelTypeEnum.POINT_INSPECTION,
|
|
3432
3469
|
tableType: SubTableType.FIXED
|
|
3433
3470
|
},
|
|
3434
|
-
fields: fields$
|
|
3471
|
+
fields: fields$4
|
|
3435
3472
|
};
|
|
3436
3473
|
const F$1 = {
|
|
3437
3474
|
/** 点检日期 */
|
|
@@ -3441,7 +3478,7 @@ const F$1 = {
|
|
|
3441
3478
|
/** 复核人 */
|
|
3442
3479
|
reviewer: "reviewer_"
|
|
3443
3480
|
};
|
|
3444
|
-
const fields$
|
|
3481
|
+
const fields$3 = [
|
|
3445
3482
|
{
|
|
3446
3483
|
match: { fieldKey: F$1.inspectionDate },
|
|
3447
3484
|
defaultProps: {
|
|
@@ -3476,8 +3513,27 @@ const profile$4 = {
|
|
|
3476
3513
|
refModelType: onlineFormMasterModelTypeEnum.MAINTENANCE,
|
|
3477
3514
|
tableType: SubTableType.FIXED
|
|
3478
3515
|
},
|
|
3479
|
-
fields: fields$
|
|
3516
|
+
fields: fields$3
|
|
3480
3517
|
};
|
|
3518
|
+
const fields$2 = [
|
|
3519
|
+
{
|
|
3520
|
+
match: {
|
|
3521
|
+
fieldKey: [
|
|
3522
|
+
"product_id_",
|
|
3523
|
+
"product_id_name_",
|
|
3524
|
+
"product_id_code_",
|
|
3525
|
+
"product_id_spec_",
|
|
3526
|
+
"mfg_order_id_",
|
|
3527
|
+
"mfg_order_code_"
|
|
3528
|
+
]
|
|
3529
|
+
},
|
|
3530
|
+
defaultProps: {
|
|
3531
|
+
disabled: true,
|
|
3532
|
+
fieldDisabled: true,
|
|
3533
|
+
required: false
|
|
3534
|
+
}
|
|
3535
|
+
}
|
|
3536
|
+
];
|
|
3481
3537
|
const TABLE_TYPE$2 = "entrust-steril-batch-list";
|
|
3482
3538
|
const profile$3 = {
|
|
3483
3539
|
type: TABLE_TYPE$2,
|
|
@@ -3494,6 +3550,7 @@ const profile$3 = {
|
|
|
3494
3550
|
refModelType: "PRODUCTION_CONTAINER_LIST_4_STERILIZATION",
|
|
3495
3551
|
tableType: SubTableType.STERILIZE_BATCH
|
|
3496
3552
|
},
|
|
3553
|
+
fields: fields$2,
|
|
3497
3554
|
theme: {
|
|
3498
3555
|
color: "#2196D5",
|
|
3499
3556
|
background: "rgba(33,150,213,0.2)",
|
|
@@ -3580,7 +3637,6 @@ const FILL_FROM_CONTAINER_OPTION = [
|
|
|
3580
3637
|
{ optionField: F.productName, toField: F.productName },
|
|
3581
3638
|
{ optionField: F.productCode, toField: F.productCode },
|
|
3582
3639
|
{ optionField: F.productSpec, toField: F.productSpec },
|
|
3583
|
-
{ optionField: F.mfgOrder, toField: F.mfgOrder },
|
|
3584
3640
|
{ optionField: F.mfgOrderCode, toField: F.mfgOrderCode },
|
|
3585
3641
|
{ optionField: "real_start_date_", toField: F.productionDate },
|
|
3586
3642
|
{ optionField: F.qty, toField: F.qty }
|
|
@@ -3995,6 +4051,240 @@ function resolveDesignPanelFeatures(tableType) {
|
|
|
3995
4051
|
showConfigSection
|
|
3996
4052
|
};
|
|
3997
4053
|
}
|
|
4054
|
+
const uuid2 = (len, radix) => {
|
|
4055
|
+
const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
|
|
4056
|
+
let uuid = [], i2;
|
|
4057
|
+
radix = radix || chars.length;
|
|
4058
|
+
if (len) {
|
|
4059
|
+
for (i2 = 0; i2 < len; i2++) uuid[i2] = chars[0 | Math.random() * radix];
|
|
4060
|
+
} else {
|
|
4061
|
+
let r;
|
|
4062
|
+
uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
|
|
4063
|
+
uuid[14] = "4";
|
|
4064
|
+
for (i2 = 0; i2 < 36; i2++) {
|
|
4065
|
+
if (!uuid[i2]) {
|
|
4066
|
+
r = 0 | Math.random() * 16;
|
|
4067
|
+
uuid[i2] = chars[i2 == 19 ? r & 3 | 8 : r];
|
|
4068
|
+
}
|
|
4069
|
+
}
|
|
4070
|
+
}
|
|
4071
|
+
return uuid.join("");
|
|
4072
|
+
};
|
|
4073
|
+
const normalizeToArray = (val) => Array.isArray(val) ? val.filter((v) => !isNil(v)) : !isNil(val) ? [val] : [];
|
|
4074
|
+
const safeParseArray = (str) => {
|
|
4075
|
+
try {
|
|
4076
|
+
if (!str) return [];
|
|
4077
|
+
const v = JSON.parse(str);
|
|
4078
|
+
return Array.isArray(v) ? v : [];
|
|
4079
|
+
} catch {
|
|
4080
|
+
return [];
|
|
4081
|
+
}
|
|
4082
|
+
};
|
|
4083
|
+
const mergeByMultiKey = (A, B, {
|
|
4084
|
+
keyFields = ["type", "isCustom"],
|
|
4085
|
+
fieldsToMerge = ["alias", "enable"],
|
|
4086
|
+
isAllowMerge = true,
|
|
4087
|
+
isConcat = false
|
|
4088
|
+
} = {}) => {
|
|
4089
|
+
if (!Array.isArray(A)) return [];
|
|
4090
|
+
if (!isAllowMerge || !Array.isArray(B) || B.length === 0) return [...A];
|
|
4091
|
+
if (isConcat && Array.isArray(A) && A.length === 0) return [...B];
|
|
4092
|
+
const keyFn = (item) => keyFields.map((k) => {
|
|
4093
|
+
const v = item?.[k];
|
|
4094
|
+
if (typeof v === "boolean") return String(v);
|
|
4095
|
+
return v == null ? "" : String(v);
|
|
4096
|
+
}).join("::");
|
|
4097
|
+
const bMap = keyBy(B, keyFn);
|
|
4098
|
+
const result = A.map((a) => {
|
|
4099
|
+
const info = bMap[keyFn(a)];
|
|
4100
|
+
return info ? { ...a, ...pick(info, fieldsToMerge) } : { ...a };
|
|
4101
|
+
});
|
|
4102
|
+
return result;
|
|
4103
|
+
};
|
|
4104
|
+
const CLIENT_ROW_UID_KEY = "__gct_rv_uid";
|
|
4105
|
+
const FRONT_ROW_KEY = "front_row_key_";
|
|
4106
|
+
function ensureFrontRowKey(row) {
|
|
4107
|
+
if (!row) return "";
|
|
4108
|
+
const existing = row[FRONT_ROW_KEY];
|
|
4109
|
+
if (existing != null && String(existing).trim() !== "") return String(existing);
|
|
4110
|
+
const uid = Array.isArray(row._2DTABLE_) && row.group_ != null && String(row.group_).trim() !== "" ? `group:${row.group_}` : `r_${Date.now()}_${uuid2(8)}`;
|
|
4111
|
+
row[FRONT_ROW_KEY] = uid;
|
|
4112
|
+
return uid;
|
|
4113
|
+
}
|
|
4114
|
+
const getRowId = (row) => ensureFrontRowKey(row);
|
|
4115
|
+
function ensureTableRowKeys(rows) {
|
|
4116
|
+
if (!Array.isArray(rows)) return;
|
|
4117
|
+
rows.forEach((row) => {
|
|
4118
|
+
if (!row || typeof row !== "object" || Array.isArray(row)) return;
|
|
4119
|
+
ensureFrontRowKey(row);
|
|
4120
|
+
ensureTableRowKeys(row._2DTABLE_);
|
|
4121
|
+
});
|
|
4122
|
+
}
|
|
4123
|
+
function resetTableRowIdentity(row) {
|
|
4124
|
+
delete row.id_;
|
|
4125
|
+
delete row[FRONT_ROW_KEY];
|
|
4126
|
+
if (Array.isArray(row._2DTABLE_) && row.group_ != null) row.group_ = `dyn${uuid2(16)}`;
|
|
4127
|
+
ensureFrontRowKey(row);
|
|
4128
|
+
if (Array.isArray(row._2DTABLE_)) row._2DTABLE_.forEach(resetTableRowIdentity);
|
|
4129
|
+
}
|
|
4130
|
+
const RUNTIME_COLUMN_ROW_KEY = "_column_row_key_";
|
|
4131
|
+
const MAX_FRONT_ROW_KEY_LENGTH = 255;
|
|
4132
|
+
const TABLE_2D_ROW_KEY_PREFIX = "2d1.";
|
|
4133
|
+
function encodeBase64Url(value) {
|
|
4134
|
+
return btoa(
|
|
4135
|
+
Array.from(new TextEncoder().encode(value), (byte) => String.fromCharCode(byte)).join("")
|
|
4136
|
+
).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
4137
|
+
}
|
|
4138
|
+
function decodeBase64Url(value) {
|
|
4139
|
+
const base64 = value.replace(/-/g, "+").replace(/_/g, "/");
|
|
4140
|
+
const padded = base64 + "=".repeat((4 - base64.length % 4) % 4);
|
|
4141
|
+
return new TextDecoder().decode(Uint8Array.from(atob(padded), (char) => char.charCodeAt(0)));
|
|
4142
|
+
}
|
|
4143
|
+
function decodeTableCellRowKey(rowKey) {
|
|
4144
|
+
if (typeof rowKey !== "string" || !rowKey.startsWith(TABLE_2D_ROW_KEY_PREFIX)) return void 0;
|
|
4145
|
+
try {
|
|
4146
|
+
const parsed = JSON.parse(decodeBase64Url(rowKey.slice(TABLE_2D_ROW_KEY_PREFIX.length)));
|
|
4147
|
+
if (!Array.isArray(parsed) || parsed.length !== 2 || parsed.some((item) => typeof item !== "string" || item === ""))
|
|
4148
|
+
return void 0;
|
|
4149
|
+
return { cellRowKey: parsed[0], columnRowKey: parsed[1] };
|
|
4150
|
+
} catch {
|
|
4151
|
+
return void 0;
|
|
4152
|
+
}
|
|
4153
|
+
}
|
|
4154
|
+
function encodeTableCellRowKey(cellRowKey, columnRowKey) {
|
|
4155
|
+
const decoded = decodeTableCellRowKey(cellRowKey);
|
|
4156
|
+
const originalCellRowKey = decoded?.cellRowKey ?? String(cellRowKey ?? "");
|
|
4157
|
+
const persistedColumnRowKey = String(columnRowKey ?? "");
|
|
4158
|
+
if (!originalCellRowKey || !persistedColumnRowKey)
|
|
4159
|
+
throw new Error("二维表子行或关联列缺少 front_row_key_");
|
|
4160
|
+
if (decoded?.columnRowKey === persistedColumnRowKey) return String(cellRowKey);
|
|
4161
|
+
const encoded = `${TABLE_2D_ROW_KEY_PREFIX}${encodeBase64Url(
|
|
4162
|
+
JSON.stringify([originalCellRowKey, persistedColumnRowKey])
|
|
4163
|
+
)}`;
|
|
4164
|
+
if (encoded.length > MAX_FRONT_ROW_KEY_LENGTH)
|
|
4165
|
+
throw new Error(`二维表内置关联键长度超过 ${MAX_FRONT_ROW_KEY_LENGTH},不能提交`);
|
|
4166
|
+
return encoded;
|
|
4167
|
+
}
|
|
4168
|
+
function isTableRowKeyMatch(rowKey, expected) {
|
|
4169
|
+
if (rowKey == null || expected == null) return false;
|
|
4170
|
+
const actual = String(rowKey);
|
|
4171
|
+
const target = String(expected);
|
|
4172
|
+
return actual === target || decodeTableCellRowKey(actual)?.cellRowKey === target;
|
|
4173
|
+
}
|
|
4174
|
+
function splitRuntimeDataPath(path) {
|
|
4175
|
+
const parts = path.split(".");
|
|
4176
|
+
const result = [];
|
|
4177
|
+
for (let index2 = 0; index2 < parts.length; index2++) {
|
|
4178
|
+
const part = parts[index2];
|
|
4179
|
+
const candidate = `${part}.${parts[index2 + 1] ?? ""}`;
|
|
4180
|
+
if (part === "2d1" && decodeTableCellRowKey(candidate)) {
|
|
4181
|
+
result.push(candidate);
|
|
4182
|
+
index2++;
|
|
4183
|
+
} else result.push(part);
|
|
4184
|
+
}
|
|
4185
|
+
return result;
|
|
4186
|
+
}
|
|
4187
|
+
function findRuntimeTableRow(rows, rowKey) {
|
|
4188
|
+
if (!rowKey || !Array.isArray(rows)) return void 0;
|
|
4189
|
+
for (const row of rows) {
|
|
4190
|
+
if (!row || row.deleted_) continue;
|
|
4191
|
+
if (isTableRowKeyMatch(row[FRONT_ROW_KEY], rowKey)) return row;
|
|
4192
|
+
const child = findRuntimeTableRow(row._2DTABLE_, rowKey);
|
|
4193
|
+
if (child) return child;
|
|
4194
|
+
}
|
|
4195
|
+
return void 0;
|
|
4196
|
+
}
|
|
4197
|
+
function findRuntimeParentRow(rows, rowKey) {
|
|
4198
|
+
if (!rowKey || !Array.isArray(rows)) return void 0;
|
|
4199
|
+
return rows.find(
|
|
4200
|
+
(row) => !row?.deleted_ && (isTableRowKeyMatch(row[FRONT_ROW_KEY], rowKey) || row._2DTABLE_?.some(
|
|
4201
|
+
(child) => !child?.deleted_ && isTableRowKeyMatch(child[FRONT_ROW_KEY], rowKey)
|
|
4202
|
+
))
|
|
4203
|
+
);
|
|
4204
|
+
}
|
|
4205
|
+
function findRuntimeTableCell(parent, columnRowKey) {
|
|
4206
|
+
if (!columnRowKey || !Array.isArray(parent?._2DTABLE_)) return void 0;
|
|
4207
|
+
return parent._2DTABLE_.find(
|
|
4208
|
+
(child) => !child?.deleted_ && child[RUNTIME_COLUMN_ROW_KEY] === columnRowKey
|
|
4209
|
+
);
|
|
4210
|
+
}
|
|
4211
|
+
function getRenderedRuntimeTableCell(state, info, parent, displayColumn) {
|
|
4212
|
+
if (!info?.colSubFieldKey) {
|
|
4213
|
+
return parent?._2DTABLE_?.at(displayColumn);
|
|
4214
|
+
}
|
|
4215
|
+
const column = state[info.colSubFieldKey]?.at(displayColumn);
|
|
4216
|
+
return column ? findRuntimeTableCell(parent, ensureFrontRowKey(column)) : void 0;
|
|
4217
|
+
}
|
|
4218
|
+
function bindRuntimeTableColumns(state, relations) {
|
|
4219
|
+
const expandedTables = /* @__PURE__ */ new Set();
|
|
4220
|
+
for (const info of relations) {
|
|
4221
|
+
const rows = state[info.rowSubFieldKey];
|
|
4222
|
+
const columns = info.colSubFieldKey ? state[info.colSubFieldKey] : void 0;
|
|
4223
|
+
if (!Array.isArray(rows) || !Array.isArray(columns)) continue;
|
|
4224
|
+
ensureTableRowKeys(columns);
|
|
4225
|
+
for (const parent of rows) {
|
|
4226
|
+
if (!Array.isArray(parent?._2DTABLE_)) continue;
|
|
4227
|
+
ensureTableRowKeys([parent]);
|
|
4228
|
+
const existingKeys = parent._2DTABLE_.map((child) => child[RUNTIME_COLUMN_ROW_KEY]).filter(Boolean);
|
|
4229
|
+
const bound = new Set(existingKeys);
|
|
4230
|
+
if (bound.size !== existingKeys.length)
|
|
4231
|
+
throw new Error(`二维表「${info.rowSubFieldKey}」存在重复的关联列行键`);
|
|
4232
|
+
const available = columns.filter(
|
|
4233
|
+
(column) => !column.deleted_ && !bound.has(ensureFrontRowKey(column))
|
|
4234
|
+
);
|
|
4235
|
+
for (const child of parent._2DTABLE_) {
|
|
4236
|
+
if (child[RUNTIME_COLUMN_ROW_KEY]) continue;
|
|
4237
|
+
const persistedIdentity = decodeTableCellRowKey(child[FRONT_ROW_KEY]);
|
|
4238
|
+
const reference = info.rowRefFieldKey ? child[info.rowRefFieldKey] : void 0;
|
|
4239
|
+
let businessColumn;
|
|
4240
|
+
if (reference != null && reference !== "" && info.colRefFieldKey) {
|
|
4241
|
+
const matches = columns.filter(
|
|
4242
|
+
(candidate) => String(candidate[info.colRefFieldKey]) === String(reference)
|
|
4243
|
+
);
|
|
4244
|
+
if (matches.length !== 1)
|
|
4245
|
+
throw new Error(
|
|
4246
|
+
`二维表「${info.rowSubFieldKey}」的关联列引用「${reference}」无法唯一匹配`
|
|
4247
|
+
);
|
|
4248
|
+
businessColumn = matches[0];
|
|
4249
|
+
}
|
|
4250
|
+
const persistedColumn = persistedIdentity ? columns.find(
|
|
4251
|
+
(candidate) => ensureFrontRowKey(candidate) === persistedIdentity.columnRowKey
|
|
4252
|
+
) : void 0;
|
|
4253
|
+
if (persistedIdentity && !persistedColumn)
|
|
4254
|
+
throw new Error(
|
|
4255
|
+
`二维表「${info.rowSubFieldKey}」子行「${child[FRONT_ROW_KEY]}」的内置关联列不存在`
|
|
4256
|
+
);
|
|
4257
|
+
if (businessColumn && persistedColumn && businessColumn !== persistedColumn)
|
|
4258
|
+
throw new Error(
|
|
4259
|
+
`二维表「${info.rowSubFieldKey}」子行「${child[FRONT_ROW_KEY]}」的业务引用与内置关联冲突`
|
|
4260
|
+
);
|
|
4261
|
+
const column = businessColumn ?? persistedColumn ?? available.shift();
|
|
4262
|
+
if (!column) throw new Error(`二维表「${info.rowSubFieldKey}」缺少可绑定的关联列行`);
|
|
4263
|
+
const columnKey = ensureFrontRowKey(column);
|
|
4264
|
+
if (bound.has(columnKey))
|
|
4265
|
+
throw new Error(`二维表「${info.rowSubFieldKey}」重复绑定关联列行「${columnKey}」`);
|
|
4266
|
+
toRaw(child)[RUNTIME_COLUMN_ROW_KEY] = columnKey;
|
|
4267
|
+
bound.add(columnKey);
|
|
4268
|
+
const availablePosition = available.indexOf(column);
|
|
4269
|
+
if (availablePosition >= 0) available.splice(availablePosition, 1);
|
|
4270
|
+
}
|
|
4271
|
+
if (!parent.deleted_) {
|
|
4272
|
+
for (const column of available) {
|
|
4273
|
+
const child = {
|
|
4274
|
+
_DICT: {},
|
|
4275
|
+
_OPCT: {},
|
|
4276
|
+
_MCTABLE: {},
|
|
4277
|
+
[RUNTIME_COLUMN_ROW_KEY]: ensureFrontRowKey(column)
|
|
4278
|
+
};
|
|
4279
|
+
ensureFrontRowKey(child);
|
|
4280
|
+
parent._2DTABLE_.push(child);
|
|
4281
|
+
expandedTables.add(info.rowSubFieldKey);
|
|
4282
|
+
}
|
|
4283
|
+
}
|
|
4284
|
+
}
|
|
4285
|
+
}
|
|
4286
|
+
return Array.from(expandedTables);
|
|
4287
|
+
}
|
|
3998
4288
|
const manifest$1g = {
|
|
3999
4289
|
type: FIELD_TYPE.MATERIAL_CONTAINER,
|
|
4000
4290
|
design: "fw:auto-complete",
|
|
@@ -5228,82 +5518,6 @@ function toPx(length, element) {
|
|
|
5228
5518
|
return unit == "px" ? val : pxPerUnit(unit, element) * val;
|
|
5229
5519
|
}
|
|
5230
5520
|
var src = toPx;
|
|
5231
|
-
const uuid2 = (len, radix) => {
|
|
5232
|
-
const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
|
|
5233
|
-
let uuid = [], i2;
|
|
5234
|
-
radix = radix || chars.length;
|
|
5235
|
-
if (len) {
|
|
5236
|
-
for (i2 = 0; i2 < len; i2++) uuid[i2] = chars[0 | Math.random() * radix];
|
|
5237
|
-
} else {
|
|
5238
|
-
let r;
|
|
5239
|
-
uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
|
|
5240
|
-
uuid[14] = "4";
|
|
5241
|
-
for (i2 = 0; i2 < 36; i2++) {
|
|
5242
|
-
if (!uuid[i2]) {
|
|
5243
|
-
r = 0 | Math.random() * 16;
|
|
5244
|
-
uuid[i2] = chars[i2 == 19 ? r & 3 | 8 : r];
|
|
5245
|
-
}
|
|
5246
|
-
}
|
|
5247
|
-
}
|
|
5248
|
-
return uuid.join("");
|
|
5249
|
-
};
|
|
5250
|
-
const normalizeToArray = (val) => Array.isArray(val) ? val.filter((v) => !isNil(v)) : !isNil(val) ? [val] : [];
|
|
5251
|
-
const safeParseArray = (str) => {
|
|
5252
|
-
try {
|
|
5253
|
-
if (!str) return [];
|
|
5254
|
-
const v = JSON.parse(str);
|
|
5255
|
-
return Array.isArray(v) ? v : [];
|
|
5256
|
-
} catch {
|
|
5257
|
-
return [];
|
|
5258
|
-
}
|
|
5259
|
-
};
|
|
5260
|
-
const mergeByMultiKey = (A, B, {
|
|
5261
|
-
keyFields = ["type", "isCustom"],
|
|
5262
|
-
fieldsToMerge = ["alias", "enable"],
|
|
5263
|
-
isAllowMerge = true,
|
|
5264
|
-
isConcat = false
|
|
5265
|
-
} = {}) => {
|
|
5266
|
-
if (!Array.isArray(A)) return [];
|
|
5267
|
-
if (!isAllowMerge || !Array.isArray(B) || B.length === 0) return [...A];
|
|
5268
|
-
if (isConcat && Array.isArray(A) && A.length === 0) return [...B];
|
|
5269
|
-
const keyFn = (item) => keyFields.map((k) => {
|
|
5270
|
-
const v = item?.[k];
|
|
5271
|
-
if (typeof v === "boolean") return String(v);
|
|
5272
|
-
return v == null ? "" : String(v);
|
|
5273
|
-
}).join("::");
|
|
5274
|
-
const bMap = keyBy(B, keyFn);
|
|
5275
|
-
const result = A.map((a) => {
|
|
5276
|
-
const info = bMap[keyFn(a)];
|
|
5277
|
-
return info ? { ...a, ...pick(info, fieldsToMerge) } : { ...a };
|
|
5278
|
-
});
|
|
5279
|
-
return result;
|
|
5280
|
-
};
|
|
5281
|
-
const CLIENT_ROW_UID_KEY = "__gct_rv_uid";
|
|
5282
|
-
const FRONT_ROW_KEY = "front_row_key_";
|
|
5283
|
-
function ensureFrontRowKey(row) {
|
|
5284
|
-
if (!row) return "";
|
|
5285
|
-
const existing = row[FRONT_ROW_KEY];
|
|
5286
|
-
if (existing != null && String(existing).trim() !== "") return String(existing);
|
|
5287
|
-
const uid = Array.isArray(row._2DTABLE_) && row.group_ != null && String(row.group_).trim() !== "" ? `group:${row.group_}` : `r_${Date.now()}_${uuid2(8)}`;
|
|
5288
|
-
row[FRONT_ROW_KEY] = uid;
|
|
5289
|
-
return uid;
|
|
5290
|
-
}
|
|
5291
|
-
const getRowId = (row) => ensureFrontRowKey(row);
|
|
5292
|
-
function ensureTableRowKeys(rows) {
|
|
5293
|
-
if (!Array.isArray(rows)) return;
|
|
5294
|
-
rows.forEach((row) => {
|
|
5295
|
-
if (!row || typeof row !== "object" || Array.isArray(row)) return;
|
|
5296
|
-
ensureFrontRowKey(row);
|
|
5297
|
-
ensureTableRowKeys(row._2DTABLE_);
|
|
5298
|
-
});
|
|
5299
|
-
}
|
|
5300
|
-
function resetTableRowIdentity(row) {
|
|
5301
|
-
delete row.id_;
|
|
5302
|
-
delete row[FRONT_ROW_KEY];
|
|
5303
|
-
if (Array.isArray(row._2DTABLE_) && row.group_ != null) row.group_ = `dyn${uuid2(16)}`;
|
|
5304
|
-
ensureFrontRowKey(row);
|
|
5305
|
-
if (Array.isArray(row._2DTABLE_)) row._2DTABLE_.forEach(resetTableRowIdentity);
|
|
5306
|
-
}
|
|
5307
5521
|
var Syntax;
|
|
5308
5522
|
(function(Syntax2) {
|
|
5309
5523
|
Syntax2["AssignmentExpression"] = "AssignmentExpression";
|
|
@@ -59482,151 +59696,6 @@ async function requestNonMedProCheckDsData(payload) {
|
|
|
59482
59696
|
}
|
|
59483
59697
|
return Object.keys(byTable).length > 0 ? { byTable } : void 0;
|
|
59484
59698
|
}
|
|
59485
|
-
const RUNTIME_COLUMN_ROW_KEY = "_column_row_key_";
|
|
59486
|
-
const MAX_FRONT_ROW_KEY_LENGTH = 255;
|
|
59487
|
-
const TABLE_2D_ROW_KEY_PREFIX = "2d1.";
|
|
59488
|
-
function encodeBase64Url(value) {
|
|
59489
|
-
return btoa(
|
|
59490
|
-
Array.from(new TextEncoder().encode(value), (byte) => String.fromCharCode(byte)).join("")
|
|
59491
|
-
).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
59492
|
-
}
|
|
59493
|
-
function decodeBase64Url(value) {
|
|
59494
|
-
const base64 = value.replace(/-/g, "+").replace(/_/g, "/");
|
|
59495
|
-
const padded = base64 + "=".repeat((4 - base64.length % 4) % 4);
|
|
59496
|
-
return new TextDecoder().decode(Uint8Array.from(atob(padded), (char) => char.charCodeAt(0)));
|
|
59497
|
-
}
|
|
59498
|
-
function decodeTableCellRowKey(rowKey) {
|
|
59499
|
-
if (typeof rowKey !== "string" || !rowKey.startsWith(TABLE_2D_ROW_KEY_PREFIX)) return void 0;
|
|
59500
|
-
try {
|
|
59501
|
-
const parsed = JSON.parse(decodeBase64Url(rowKey.slice(TABLE_2D_ROW_KEY_PREFIX.length)));
|
|
59502
|
-
if (!Array.isArray(parsed) || parsed.length !== 2 || parsed.some((item) => typeof item !== "string" || item === ""))
|
|
59503
|
-
return void 0;
|
|
59504
|
-
return { cellRowKey: parsed[0], columnRowKey: parsed[1] };
|
|
59505
|
-
} catch {
|
|
59506
|
-
return void 0;
|
|
59507
|
-
}
|
|
59508
|
-
}
|
|
59509
|
-
function encodeTableCellRowKey(cellRowKey, columnRowKey) {
|
|
59510
|
-
const decoded = decodeTableCellRowKey(cellRowKey);
|
|
59511
|
-
const originalCellRowKey = decoded?.cellRowKey ?? String(cellRowKey ?? "");
|
|
59512
|
-
const persistedColumnRowKey = String(columnRowKey ?? "");
|
|
59513
|
-
if (!originalCellRowKey || !persistedColumnRowKey)
|
|
59514
|
-
throw new Error("二维表子行或关联列缺少 front_row_key_");
|
|
59515
|
-
if (decoded?.columnRowKey === persistedColumnRowKey) return String(cellRowKey);
|
|
59516
|
-
const encoded = `${TABLE_2D_ROW_KEY_PREFIX}${encodeBase64Url(
|
|
59517
|
-
JSON.stringify([originalCellRowKey, persistedColumnRowKey])
|
|
59518
|
-
)}`;
|
|
59519
|
-
if (encoded.length > MAX_FRONT_ROW_KEY_LENGTH)
|
|
59520
|
-
throw new Error(`二维表内置关联键长度超过 ${MAX_FRONT_ROW_KEY_LENGTH},不能提交`);
|
|
59521
|
-
return encoded;
|
|
59522
|
-
}
|
|
59523
|
-
function isTableRowKeyMatch(rowKey, expected) {
|
|
59524
|
-
if (rowKey == null || expected == null) return false;
|
|
59525
|
-
const actual = String(rowKey);
|
|
59526
|
-
const target = String(expected);
|
|
59527
|
-
return actual === target || decodeTableCellRowKey(actual)?.cellRowKey === target;
|
|
59528
|
-
}
|
|
59529
|
-
function findRuntimeTableRow(rows, rowKey) {
|
|
59530
|
-
if (!rowKey || !Array.isArray(rows)) return void 0;
|
|
59531
|
-
for (const row of rows) {
|
|
59532
|
-
if (!row || row.deleted_) continue;
|
|
59533
|
-
if (isTableRowKeyMatch(row[FRONT_ROW_KEY], rowKey)) return row;
|
|
59534
|
-
const child = findRuntimeTableRow(row._2DTABLE_, rowKey);
|
|
59535
|
-
if (child) return child;
|
|
59536
|
-
}
|
|
59537
|
-
return void 0;
|
|
59538
|
-
}
|
|
59539
|
-
function findRuntimeParentRow(rows, rowKey) {
|
|
59540
|
-
if (!rowKey || !Array.isArray(rows)) return void 0;
|
|
59541
|
-
return rows.find(
|
|
59542
|
-
(row) => !row?.deleted_ && (isTableRowKeyMatch(row[FRONT_ROW_KEY], rowKey) || row._2DTABLE_?.some(
|
|
59543
|
-
(child) => !child?.deleted_ && isTableRowKeyMatch(child[FRONT_ROW_KEY], rowKey)
|
|
59544
|
-
))
|
|
59545
|
-
);
|
|
59546
|
-
}
|
|
59547
|
-
function findRuntimeTableCell(parent, columnRowKey) {
|
|
59548
|
-
if (!columnRowKey || !Array.isArray(parent?._2DTABLE_)) return void 0;
|
|
59549
|
-
return parent._2DTABLE_.find(
|
|
59550
|
-
(child) => !child?.deleted_ && child[RUNTIME_COLUMN_ROW_KEY] === columnRowKey
|
|
59551
|
-
);
|
|
59552
|
-
}
|
|
59553
|
-
function getRenderedRuntimeTableCell(state, info, parent, displayColumn) {
|
|
59554
|
-
if (!info?.colSubFieldKey) {
|
|
59555
|
-
return parent?._2DTABLE_?.at(displayColumn);
|
|
59556
|
-
}
|
|
59557
|
-
const column = state[info.colSubFieldKey]?.at(displayColumn);
|
|
59558
|
-
return column ? findRuntimeTableCell(parent, ensureFrontRowKey(column)) : void 0;
|
|
59559
|
-
}
|
|
59560
|
-
function bindRuntimeTableColumns(state, relations) {
|
|
59561
|
-
const expandedTables = /* @__PURE__ */ new Set();
|
|
59562
|
-
for (const info of relations) {
|
|
59563
|
-
const rows = state[info.rowSubFieldKey];
|
|
59564
|
-
const columns = info.colSubFieldKey ? state[info.colSubFieldKey] : void 0;
|
|
59565
|
-
if (!Array.isArray(rows) || !Array.isArray(columns)) continue;
|
|
59566
|
-
ensureTableRowKeys(columns);
|
|
59567
|
-
for (const parent of rows) {
|
|
59568
|
-
if (!Array.isArray(parent?._2DTABLE_)) continue;
|
|
59569
|
-
ensureTableRowKeys([parent]);
|
|
59570
|
-
const existingKeys = parent._2DTABLE_.map((child) => child[RUNTIME_COLUMN_ROW_KEY]).filter(Boolean);
|
|
59571
|
-
const bound = new Set(existingKeys);
|
|
59572
|
-
if (bound.size !== existingKeys.length)
|
|
59573
|
-
throw new Error(`二维表「${info.rowSubFieldKey}」存在重复的关联列行键`);
|
|
59574
|
-
const available = columns.filter(
|
|
59575
|
-
(column) => !column.deleted_ && !bound.has(ensureFrontRowKey(column))
|
|
59576
|
-
);
|
|
59577
|
-
for (const child of parent._2DTABLE_) {
|
|
59578
|
-
if (child[RUNTIME_COLUMN_ROW_KEY]) continue;
|
|
59579
|
-
const persistedIdentity = decodeTableCellRowKey(child[FRONT_ROW_KEY]);
|
|
59580
|
-
const reference = info.rowRefFieldKey ? child[info.rowRefFieldKey] : void 0;
|
|
59581
|
-
let businessColumn;
|
|
59582
|
-
if (reference != null && reference !== "" && info.colRefFieldKey) {
|
|
59583
|
-
const matches = columns.filter(
|
|
59584
|
-
(candidate) => String(candidate[info.colRefFieldKey]) === String(reference)
|
|
59585
|
-
);
|
|
59586
|
-
if (matches.length !== 1)
|
|
59587
|
-
throw new Error(
|
|
59588
|
-
`二维表「${info.rowSubFieldKey}」的关联列引用「${reference}」无法唯一匹配`
|
|
59589
|
-
);
|
|
59590
|
-
businessColumn = matches[0];
|
|
59591
|
-
}
|
|
59592
|
-
const persistedColumn = persistedIdentity ? columns.find(
|
|
59593
|
-
(candidate) => ensureFrontRowKey(candidate) === persistedIdentity.columnRowKey
|
|
59594
|
-
) : void 0;
|
|
59595
|
-
if (persistedIdentity && !persistedColumn)
|
|
59596
|
-
throw new Error(
|
|
59597
|
-
`二维表「${info.rowSubFieldKey}」子行「${child[FRONT_ROW_KEY]}」的内置关联列不存在`
|
|
59598
|
-
);
|
|
59599
|
-
if (businessColumn && persistedColumn && businessColumn !== persistedColumn)
|
|
59600
|
-
throw new Error(
|
|
59601
|
-
`二维表「${info.rowSubFieldKey}」子行「${child[FRONT_ROW_KEY]}」的业务引用与内置关联冲突`
|
|
59602
|
-
);
|
|
59603
|
-
const column = businessColumn ?? persistedColumn ?? available.shift();
|
|
59604
|
-
if (!column) throw new Error(`二维表「${info.rowSubFieldKey}」缺少可绑定的关联列行`);
|
|
59605
|
-
const columnKey = ensureFrontRowKey(column);
|
|
59606
|
-
if (bound.has(columnKey))
|
|
59607
|
-
throw new Error(`二维表「${info.rowSubFieldKey}」重复绑定关联列行「${columnKey}」`);
|
|
59608
|
-
toRaw(child)[RUNTIME_COLUMN_ROW_KEY] = columnKey;
|
|
59609
|
-
bound.add(columnKey);
|
|
59610
|
-
const availablePosition = available.indexOf(column);
|
|
59611
|
-
if (availablePosition >= 0) available.splice(availablePosition, 1);
|
|
59612
|
-
}
|
|
59613
|
-
if (!parent.deleted_) {
|
|
59614
|
-
for (const column of available) {
|
|
59615
|
-
const child = {
|
|
59616
|
-
_DICT: {},
|
|
59617
|
-
_OPCT: {},
|
|
59618
|
-
_MCTABLE: {},
|
|
59619
|
-
[RUNTIME_COLUMN_ROW_KEY]: ensureFrontRowKey(column)
|
|
59620
|
-
};
|
|
59621
|
-
ensureFrontRowKey(child);
|
|
59622
|
-
parent._2DTABLE_.push(child);
|
|
59623
|
-
expandedTables.add(info.rowSubFieldKey);
|
|
59624
|
-
}
|
|
59625
|
-
}
|
|
59626
|
-
}
|
|
59627
|
-
}
|
|
59628
|
-
return Array.from(expandedTables);
|
|
59629
|
-
}
|
|
59630
59699
|
const DEFAULT_FROM_STATE = {
|
|
59631
59700
|
_DICT: {},
|
|
59632
59701
|
//翻译的字段
|
|
@@ -60291,6 +60360,21 @@ const transformUtils = {
|
|
|
60291
60360
|
}
|
|
60292
60361
|
return {};
|
|
60293
60362
|
},
|
|
60363
|
+
/** 数据加载完成事件;全部 Sheet 的数据合并后、创建 Store 和分页前只执行一次。 */
|
|
60364
|
+
getEventInitDataLoaded: async (payload) => {
|
|
60365
|
+
const { formConfig, formState, viewMode, dataStatus, ofCtx } = payload;
|
|
60366
|
+
if (viewMode !== RenderModeEnum.FormMode || !formConfig?.javascript) return;
|
|
60367
|
+
const codeInstance = setCodeRunner(formConfig.javascript, formState, ofCtx);
|
|
60368
|
+
try {
|
|
60369
|
+
if (typeof codeInstance.exports?.GCT_BUILT_IN_DATA_LOADED !== "function") return;
|
|
60370
|
+
await codeInstance.invoke("GCT_BUILT_IN_DATA_LOADED", {
|
|
60371
|
+
isDataProcessed: dataStatus === "STASH" || dataStatus === "SUBMIT",
|
|
60372
|
+
formState
|
|
60373
|
+
});
|
|
60374
|
+
} finally {
|
|
60375
|
+
codeInstance.dispose();
|
|
60376
|
+
}
|
|
60377
|
+
},
|
|
60294
60378
|
/** 创建字段事件执行器;注册后由 RuntimeInstanceRecord 持有,全部 Sheet 共用。 */
|
|
60295
60379
|
createScriptRunner: (payload) => {
|
|
60296
60380
|
const { formConfig, viewMode, ofCtx } = payload || {};
|
|
@@ -60417,11 +60501,18 @@ const transformUtils = {
|
|
|
60417
60501
|
/** 数据转成真实提交数据(二维表要平铺);layout 是所有 Sheet 的业务表汇总索引。 */
|
|
60418
60502
|
getSubmitFormData: (formData, layout) => {
|
|
60419
60503
|
const {
|
|
60504
|
+
subTableInfo = [],
|
|
60505
|
+
businessTableFields = [],
|
|
60420
60506
|
subTable2DList = [],
|
|
60421
60507
|
checkTable2DList = [],
|
|
60422
60508
|
materialConsumeTableList = []
|
|
60423
60509
|
} = layout || {};
|
|
60424
60510
|
const list2D = [...subTable2DList, ...checkTable2DList];
|
|
60511
|
+
const businessFields = new Set(businessTableFields);
|
|
60512
|
+
const fixedTableFields = new Set(
|
|
60513
|
+
subTableInfo.filter((table) => table.key === "newfixed").map((table) => table.field)
|
|
60514
|
+
);
|
|
60515
|
+
const structuralColumnFields = new Set(list2D.map((table) => table.colSubFieldKey));
|
|
60425
60516
|
bindRuntimeTableColumns(formData, list2D);
|
|
60426
60517
|
const filterKeys = [
|
|
60427
60518
|
"_DICT",
|
|
@@ -60439,6 +60530,15 @@ const transformUtils = {
|
|
|
60439
60530
|
if (isObject$1(value)) return !isEmpty(value);
|
|
60440
60531
|
return true;
|
|
60441
60532
|
});
|
|
60533
|
+
const hasSubTableSubmitData = (row) => (
|
|
60534
|
+
// __CHILDREN__ 包含嵌套业务记录,不能与客户端元数据一起忽略。
|
|
60535
|
+
Array.isArray(row.__CHILDREN__) && row.__CHILDREN__.some((child) => isObject$1(child) && hasSubTableSubmitData(child)) || hasBusinessData(
|
|
60536
|
+
omitBy(
|
|
60537
|
+
row,
|
|
60538
|
+
(_value, key) => key.startsWith("_") || key.endsWith("_lb_") || key === "deleted_" || key === "delete_"
|
|
60539
|
+
)
|
|
60540
|
+
)
|
|
60541
|
+
);
|
|
60442
60542
|
const realFormData = Object.keys(formData).reduce((acc, fieldKey) => {
|
|
60443
60543
|
const info = list2D.find(
|
|
60444
60544
|
(item) => (item.subTable2d || item.checkTable2d) && item.rowSubFieldKey === fieldKey
|
|
@@ -60496,6 +60596,8 @@ const transformUtils = {
|
|
|
60496
60596
|
);
|
|
60497
60597
|
acc[fieldKey] = arr;
|
|
60498
60598
|
} else if (Array.isArray(formData[fieldKey])) {
|
|
60599
|
+
const shouldFilterEmptyRows = businessFields.has(fieldKey) && !structuralColumnFields.has(fieldKey);
|
|
60600
|
+
const preserveFixedRowPositions = shouldFilterEmptyRows && fixedTableFields.has(fieldKey) && formData[fieldKey].some(hasSubTableSubmitData);
|
|
60499
60601
|
acc[fieldKey] = formData[fieldKey].map(
|
|
60500
60602
|
(item) => Object.fromEntries(
|
|
60501
60603
|
Object.entries(item).filter(([key, value]) => {
|
|
@@ -60504,6 +60606,8 @@ const transformUtils = {
|
|
|
60504
60606
|
return true;
|
|
60505
60607
|
})
|
|
60506
60608
|
)
|
|
60609
|
+
).filter(
|
|
60610
|
+
(row) => !shouldFilterEmptyRows || preserveFixedRowPositions || hasSubTableSubmitData(row)
|
|
60507
60611
|
);
|
|
60508
60612
|
} else {
|
|
60509
60613
|
acc[fieldKey] = formData[fieldKey];
|
|
@@ -60513,12 +60617,11 @@ const transformUtils = {
|
|
|
60513
60617
|
console.log("0506 数据转成真实提交数据(二维表要平铺)", realFormData);
|
|
60514
60618
|
return omit(realFormData, filterKeys);
|
|
60515
60619
|
},
|
|
60516
|
-
getFormDataIdsMap: (formData, preserveKeys = []) => {
|
|
60620
|
+
getFormDataIdsMap: (formData, preserveKeys = [], shouldPreserveField) => {
|
|
60517
60621
|
const preserveKeySet = /* @__PURE__ */ new Set([FRONT_ROW_KEY, "group_", ...preserveKeys.filter(Boolean)]);
|
|
60518
|
-
const
|
|
60519
|
-
const processEntry = (entry, isFirstLevel = false) => {
|
|
60622
|
+
const processEntry = (entry, isFirstLevel = false, path = "") => {
|
|
60520
60623
|
if (Array.isArray(entry)) {
|
|
60521
|
-
const processed = entry.map((item) => processEntry(item, false)).filter(Boolean);
|
|
60624
|
+
const processed = entry.map((item, index2) => processEntry(item, false, `${path}.${index2}`)).filter(Boolean);
|
|
60522
60625
|
return processed.length ? processed : void 0;
|
|
60523
60626
|
}
|
|
60524
60627
|
if (entry && typeof entry === "object") {
|
|
@@ -60526,23 +60629,15 @@ const transformUtils = {
|
|
|
60526
60629
|
if ("id_" in entry) {
|
|
60527
60630
|
result.id_ = entry.id_;
|
|
60528
60631
|
}
|
|
60529
|
-
if (isFirstLevel) {
|
|
60530
|
-
for (const [key, value] of Object.entries(entry)) {
|
|
60531
|
-
if (key.startsWith("record_no_")) {
|
|
60532
|
-
result[key] = value;
|
|
60533
|
-
}
|
|
60534
|
-
}
|
|
60535
|
-
}
|
|
60536
60632
|
for (const [key, value] of Object.entries(entry)) {
|
|
60537
|
-
|
|
60633
|
+
const fieldPath = path ? `${path}.${key}` : key;
|
|
60634
|
+
if (key === "id_" || isFirstLevel && key.startsWith("record_no_") || preserveKeySet.has(key) || shouldPreserveField?.(fieldPath)) {
|
|
60538
60635
|
result[key] = value;
|
|
60539
|
-
}
|
|
60540
|
-
|
|
60541
|
-
|
|
60542
|
-
|
|
60543
|
-
|
|
60544
|
-
if (processed !== void 0) {
|
|
60545
|
-
result[key] = processed;
|
|
60636
|
+
} else {
|
|
60637
|
+
const processed = processEntry(value, false, fieldPath);
|
|
60638
|
+
if (processed !== void 0) {
|
|
60639
|
+
result[key] = processed;
|
|
60640
|
+
}
|
|
60546
60641
|
}
|
|
60547
60642
|
}
|
|
60548
60643
|
return Object.keys(result).length ? result : void 0;
|
|
@@ -60688,55 +60783,119 @@ async function generateSnByRuleId(id) {
|
|
|
60688
60783
|
return preview(res.data.config_);
|
|
60689
60784
|
}
|
|
60690
60785
|
}
|
|
60691
|
-
const
|
|
60692
|
-
|
|
60693
|
-
|
|
60694
|
-
|
|
60695
|
-
|
|
60696
|
-
};
|
|
60697
|
-
function joinAnd$1(keys2) {
|
|
60698
|
-
if (keys2.length === 0) return "";
|
|
60699
|
-
if (keys2.length === 1) return keys2[0];
|
|
60700
|
-
return `AND(${keys2.join(",")})`;
|
|
60701
|
-
}
|
|
60702
|
-
function joinOr$1(keys2) {
|
|
60703
|
-
if (keys2.length === 0) return "";
|
|
60704
|
-
if (keys2.length === 1) return keys2[0];
|
|
60705
|
-
return `OR(${keys2.join(",")})`;
|
|
60786
|
+
const EMPTY_QUERY_VALUE = "__excel_no_matching_query_value__";
|
|
60787
|
+
function joinAnd$1(expressions) {
|
|
60788
|
+
if (expressions.length === 0) return "";
|
|
60789
|
+
if (expressions.length === 1) return expressions[0];
|
|
60790
|
+
return `AND(${expressions.join(",")})`;
|
|
60706
60791
|
}
|
|
60707
|
-
function
|
|
60708
|
-
|
|
60792
|
+
function joinOr$1(expressions) {
|
|
60793
|
+
if (expressions.length === 0) return "";
|
|
60794
|
+
if (expressions.length === 1) return expressions[0];
|
|
60795
|
+
return `OR(${expressions.join(",")})`;
|
|
60709
60796
|
}
|
|
60710
|
-
function
|
|
60711
|
-
return Object.fromEntries(
|
|
60712
|
-
Object.entries(queryData).filter(([key]) => !key.endsWith(".like") && !key.endsWith(".iLike"))
|
|
60713
|
-
);
|
|
60714
|
-
}
|
|
60715
|
-
function buildLotLikeQuery(searchFields, keyword, extraQuery = {}) {
|
|
60797
|
+
function buildLikeQuery(searchFields, keyword, extraQuery = {}, options) {
|
|
60716
60798
|
const queryData = { ...extraQuery };
|
|
60799
|
+
const orExpKeys = new Set(
|
|
60800
|
+
Array.isArray(queryData.__orExpKeys) ? queryData.__orExpKeys : []
|
|
60801
|
+
);
|
|
60802
|
+
delete queryData.__orExpKeys;
|
|
60717
60803
|
const filterKeys = Object.keys(queryData);
|
|
60718
60804
|
const searchKeys = [];
|
|
60719
60805
|
if (keyword?.trim()) {
|
|
60720
60806
|
searchFields.forEach((field) => {
|
|
60721
|
-
const key =
|
|
60807
|
+
const key = field.includes(".") ? field : `${field}.iLike`;
|
|
60722
60808
|
queryData[key] = keyword;
|
|
60723
60809
|
searchKeys.push(key);
|
|
60724
60810
|
});
|
|
60725
60811
|
}
|
|
60726
|
-
const
|
|
60727
|
-
|
|
60728
|
-
|
|
60729
|
-
|
|
60812
|
+
const filterCombine = options?.filterCombine ?? "and";
|
|
60813
|
+
let filterExp = "";
|
|
60814
|
+
if (orExpKeys.size > 0 && filterCombine === "and") {
|
|
60815
|
+
const orKeys = filterKeys.filter((key) => orExpKeys.has(key));
|
|
60816
|
+
const andKeys = filterKeys.filter((key) => !orExpKeys.has(key));
|
|
60817
|
+
const orExp = joinOr$1(orKeys);
|
|
60818
|
+
const andExp = joinAnd$1(andKeys);
|
|
60819
|
+
filterExp = andExp && orExp ? `AND(${andExp},${orExp})` : andExp || orExp;
|
|
60820
|
+
} else {
|
|
60821
|
+
filterExp = filterCombine === "or" ? joinOr$1(filterKeys) : joinAnd$1(filterKeys);
|
|
60822
|
+
}
|
|
60823
|
+
const searchExp = joinOr$1(searchKeys);
|
|
60824
|
+
return {
|
|
60825
|
+
queryData,
|
|
60826
|
+
exp: filterExp && searchExp ? `AND(${filterExp},${searchExp})` : filterExp || searchExp
|
|
60827
|
+
};
|
|
60828
|
+
}
|
|
60829
|
+
function splitAndTerms(expression) {
|
|
60830
|
+
if (!expression.startsWith("AND(") || !expression.endsWith(")")) return [expression];
|
|
60831
|
+
const inner = expression.slice(4, -1);
|
|
60832
|
+
const terms = [];
|
|
60833
|
+
let depth = 0;
|
|
60834
|
+
let start = 0;
|
|
60835
|
+
for (let index2 = 0; index2 < inner.length; index2++) {
|
|
60836
|
+
const char = inner[index2];
|
|
60837
|
+
if (char === "(") depth++;
|
|
60838
|
+
if (char === ")" && --depth < 0) return [expression];
|
|
60839
|
+
if (char === "," && depth === 0) {
|
|
60840
|
+
terms.push(inner.slice(start, index2).trim());
|
|
60841
|
+
start = index2 + 1;
|
|
60842
|
+
}
|
|
60843
|
+
}
|
|
60844
|
+
terms.push(inner.slice(start).trim());
|
|
60845
|
+
if (depth !== 0 || terms.some((term) => !term)) return [expression];
|
|
60846
|
+
return terms.flatMap(splitAndTerms);
|
|
60847
|
+
}
|
|
60848
|
+
function combineQueryExpressions(...expressions) {
|
|
60849
|
+
return joinAnd$1([...new Set(expressions.filter(Boolean).flatMap(splitAndTerms))]);
|
|
60850
|
+
}
|
|
60851
|
+
function mergeQueryFilters(query, filters) {
|
|
60852
|
+
if (!filters.length) return query;
|
|
60853
|
+
const queryData = { ...query.queryData };
|
|
60854
|
+
const baseExp = query.exp || joinAnd$1(Object.keys(queryData));
|
|
60855
|
+
const expressions = new Set(baseExp ? splitAndTerms(baseExp) : []);
|
|
60856
|
+
for (const filter of filters) {
|
|
60857
|
+
const key = `${filter.field}.${filter.operator}`;
|
|
60858
|
+
let values = [...new Set(filter.values)];
|
|
60859
|
+
const existing = queryData[key];
|
|
60860
|
+
if (Array.isArray(existing) && existing.length) {
|
|
60861
|
+
const existingValues = new Set(existing.map(String));
|
|
60862
|
+
values = values.filter((value) => existingValues.has(value));
|
|
60863
|
+
}
|
|
60864
|
+
queryData[key] = values.length ? values : [EMPTY_QUERY_VALUE];
|
|
60865
|
+
expressions.add(key);
|
|
60866
|
+
}
|
|
60867
|
+
return { ...query, queryData, exp: joinAnd$1([...expressions]) };
|
|
60868
|
+
}
|
|
60869
|
+
const LOT_CONTAINER_ROLE = {
|
|
60870
|
+
/** 关联批父节点 */
|
|
60871
|
+
RELATED_PARENT: "related_parent",
|
|
60872
|
+
/** 关联批子批次 */
|
|
60873
|
+
RELATED_CHILD: "related_child"
|
|
60874
|
+
};
|
|
60875
|
+
function omitLikeQueryKeys(queryData = {}) {
|
|
60876
|
+
return Object.fromEntries(
|
|
60877
|
+
Object.entries(queryData).filter(([key]) => !key.endsWith(".like") && !key.endsWith(".iLike"))
|
|
60878
|
+
);
|
|
60879
|
+
}
|
|
60880
|
+
function buildLotLikeQuery(...args) {
|
|
60881
|
+
return buildLikeQuery(...args);
|
|
60730
60882
|
}
|
|
60731
60883
|
function buildLotSnListQuery(keyword = "", extraQuery = {}) {
|
|
60732
|
-
return buildLotLikeQuery(
|
|
60733
|
-
"
|
|
60734
|
-
|
|
60735
|
-
|
|
60884
|
+
return buildLotLikeQuery(
|
|
60885
|
+
["name_", "related_parent_name_", "product_id_code_", "product_id_name_", "spec_"],
|
|
60886
|
+
keyword,
|
|
60887
|
+
{
|
|
60888
|
+
"container_role_.ne": LOT_CONTAINER_ROLE.RELATED_PARENT,
|
|
60889
|
+
...extraQuery
|
|
60890
|
+
}
|
|
60891
|
+
);
|
|
60736
60892
|
}
|
|
60737
60893
|
function buildProductionLotListQuery(keyword = "", extraQuery = {}) {
|
|
60738
60894
|
return buildLotLikeQuery(["name_", "related_parent_name_"], keyword, {
|
|
60739
|
-
"production_identification_type_.in": [
|
|
60895
|
+
"production_identification_type_.in": [
|
|
60896
|
+
ProductionIdentificationTypeEnum.LOT,
|
|
60897
|
+
ProductionIdentificationTypeEnum.SN
|
|
60898
|
+
],
|
|
60740
60899
|
is_rework_: 0,
|
|
60741
60900
|
"container_role_.ne": LOT_CONTAINER_ROLE.RELATED_PARENT,
|
|
60742
60901
|
...extraQuery
|
|
@@ -60744,7 +60903,10 @@ function buildProductionLotListQuery(keyword = "", extraQuery = {}) {
|
|
|
60744
60903
|
}
|
|
60745
60904
|
function buildInspectionLotListQuery(keyword = "", extraQuery = {}) {
|
|
60746
60905
|
return buildLotLikeQuery(["name_", "related_parent_name_"], keyword, {
|
|
60747
|
-
"production_identification_type_.
|
|
60906
|
+
"production_identification_type_.in": [
|
|
60907
|
+
ProductionIdentificationTypeEnum.INSPECTION_CONTAINER,
|
|
60908
|
+
ProductionIdentificationTypeEnum.LEGACY_INSPECTION
|
|
60909
|
+
],
|
|
60748
60910
|
is_rework_: 0,
|
|
60749
60911
|
"container_role_.ne": LOT_CONTAINER_ROLE.RELATED_PARENT,
|
|
60750
60912
|
...extraQuery
|
|
@@ -60753,6 +60915,38 @@ function buildInspectionLotListQuery(keyword = "", extraQuery = {}) {
|
|
|
60753
60915
|
function composeProductionLotListQuery(queryData = {}, keyword = "") {
|
|
60754
60916
|
return buildProductionLotListQuery(keyword, omitLikeQueryKeys(queryData));
|
|
60755
60917
|
}
|
|
60918
|
+
function buildMaterialLotListQuery(keyword = "", extraQuery = {}) {
|
|
60919
|
+
return buildLikeQuery(["name_", "product_id_code_", "product_id_name_", "spec_"], keyword, {
|
|
60920
|
+
"production_identification_type_.eq": ProductionIdentificationTypeEnum.MATERIAL,
|
|
60921
|
+
"production_identification_type_.isNull": null,
|
|
60922
|
+
"container_role_.ne": LOT_CONTAINER_ROLE.RELATED_PARENT,
|
|
60923
|
+
__orExpKeys: ["production_identification_type_.eq", "production_identification_type_.isNull"],
|
|
60924
|
+
...extraQuery
|
|
60925
|
+
});
|
|
60926
|
+
}
|
|
60927
|
+
function composeMaterialLotListQuery(queryData = {}, exp = "") {
|
|
60928
|
+
const query = { ...queryData };
|
|
60929
|
+
const searchAliases = {
|
|
60930
|
+
"material_no_.like": "name_.like",
|
|
60931
|
+
"material_no_.iLike": "name_.iLike"
|
|
60932
|
+
};
|
|
60933
|
+
for (const [alias, key] of Object.entries(searchAliases)) {
|
|
60934
|
+
if (!Object.prototype.hasOwnProperty.call(query, alias)) continue;
|
|
60935
|
+
query[key] = query[alias];
|
|
60936
|
+
delete query[alias];
|
|
60937
|
+
}
|
|
60938
|
+
const searchExp = (exp || "").replace(/[^(),\s]+/g, (key) => searchAliases[key] ?? key);
|
|
60939
|
+
const referencedKeys = new Set(searchExp.match(/[^(),\s]+/g) ?? []);
|
|
60940
|
+
const filters = Object.fromEntries(
|
|
60941
|
+
Object.entries(query).filter(([key]) => !referencedKeys.has(key))
|
|
60942
|
+
);
|
|
60943
|
+
const baseQuery = buildMaterialLotListQuery("", filters);
|
|
60944
|
+
delete query.__orExpKeys;
|
|
60945
|
+
return {
|
|
60946
|
+
queryData: { ...baseQuery.queryData, ...query },
|
|
60947
|
+
exp: combineQueryExpressions(baseQuery.exp, searchExp)
|
|
60948
|
+
};
|
|
60949
|
+
}
|
|
60756
60950
|
const CACHE_TTL = 30 * 1e3;
|
|
60757
60951
|
const recordCache = /* @__PURE__ */ new Map();
|
|
60758
60952
|
function isPresent(value) {
|
|
@@ -60846,11 +61040,11 @@ function buildDeviceBaseQuery(extraQuery) {
|
|
|
60846
61040
|
const { "device_type_id_.eq": deviceTypeId, ...extra } = extraQuery ?? {};
|
|
60847
61041
|
return {
|
|
60848
61042
|
"state_.eq": DeviceStatus.IN_USE,
|
|
60849
|
-
"
|
|
60850
|
-
"
|
|
61043
|
+
"last_calibration_date_.ge": today,
|
|
61044
|
+
"last_calibration_date_.isNull": null,
|
|
60851
61045
|
...extra,
|
|
60852
61046
|
...deviceTypeId ? { "device_type_id_.eq": deviceTypeId } : {},
|
|
60853
|
-
__orExpKeys: ["
|
|
61047
|
+
__orExpKeys: ["last_calibration_date_.ge", "last_calibration_date_.isNull"]
|
|
60854
61048
|
};
|
|
60855
61049
|
}
|
|
60856
61050
|
function buildDeviceFilterQuery(extraQuery) {
|
|
@@ -61513,7 +61707,7 @@ async function getSterilizeLotList({
|
|
|
61513
61707
|
{},
|
|
61514
61708
|
{
|
|
61515
61709
|
query: {
|
|
61516
|
-
production_identification_type_:
|
|
61710
|
+
production_identification_type_: ProductionIdentificationTypeEnum.STERILIZATION,
|
|
61517
61711
|
"container_role_.ne": LOT_CONTAINER_ROLE.RELATED_PARENT,
|
|
61518
61712
|
...props.queryData
|
|
61519
61713
|
},
|
|
@@ -61573,19 +61767,12 @@ async function getMaterialLotList({ queryData = {}, exp = "", pageNo = 1, pageSi
|
|
|
61573
61767
|
modelKey: "em_production_identification",
|
|
61574
61768
|
bsKey: "biz_get_production_identification"
|
|
61575
61769
|
};
|
|
61770
|
+
const materialQuery = composeMaterialLotListQuery(props.queryData, props.exp);
|
|
61576
61771
|
const queryParams = {
|
|
61577
61772
|
pageNo: props.pageNo,
|
|
61578
61773
|
pageSize: props.pageSize,
|
|
61579
|
-
exp:
|
|
61580
|
-
|
|
61581
|
-
props.exp
|
|
61582
|
-
),
|
|
61583
|
-
query: {
|
|
61584
|
-
"production_identification_type_.eq": "MATERIAL",
|
|
61585
|
-
"production_identification_type_.isNull": null,
|
|
61586
|
-
"container_role_.ne": LOT_CONTAINER_ROLE.RELATED_PARENT,
|
|
61587
|
-
...props.queryData
|
|
61588
|
-
}
|
|
61774
|
+
exp: materialQuery.exp,
|
|
61775
|
+
query: materialQuery.queryData
|
|
61589
61776
|
};
|
|
61590
61777
|
const res = await api.apaas.modelComprehensive.postBizServiceGeneralModelCategoryModelKeyBsKey(
|
|
61591
61778
|
params2,
|
|
@@ -62585,6 +62772,7 @@ const renderUtils = {
|
|
|
62585
62772
|
/** 获取默认值集合 */
|
|
62586
62773
|
getDefaultValueMapByField: ({
|
|
62587
62774
|
defaultValueFields,
|
|
62775
|
+
objectProductDefaults = /* @__PURE__ */ new WeakMap(),
|
|
62588
62776
|
mainMaterialNo = void 0,
|
|
62589
62777
|
mainRelatedLotNo = void 0,
|
|
62590
62778
|
mainProductName = void 0,
|
|
@@ -62620,7 +62808,10 @@ const renderUtils = {
|
|
|
62620
62808
|
};
|
|
62621
62809
|
const getDefaultValue = (field) => {
|
|
62622
62810
|
const { fieldType, timeType, dateType, defaultValue, belongingObject, bizType } = field;
|
|
62623
|
-
if (belongingObject &&
|
|
62811
|
+
if (belongingObject && fieldType === FIELD_TYPE.PRODUCT) {
|
|
62812
|
+
return objectProductDefaults.get(field)?.value;
|
|
62813
|
+
}
|
|
62814
|
+
if (belongingObject && fieldType === FIELD_TYPE.MATERIAL_NO) {
|
|
62624
62815
|
return void 0;
|
|
62625
62816
|
}
|
|
62626
62817
|
if (bizType === FIELD_TYPE.WAREHOUSE || fieldType === FIELD_TYPE.WAREHOUSE) {
|
|
@@ -62663,7 +62854,7 @@ const renderUtils = {
|
|
|
62663
62854
|
case FIELD_TYPE.ORG_MULTI:
|
|
62664
62855
|
return defaultOrgId;
|
|
62665
62856
|
case FIELD_TYPE.MATERIAL_NO:
|
|
62666
|
-
return mainMaterialNo;
|
|
62857
|
+
return bizType === FIELD_TYPE.MATERIAL_CONTAINER ? defaultValue : mainMaterialNo;
|
|
62667
62858
|
case FIELD_TYPE.RELATED_LOT_NO:
|
|
62668
62859
|
return mainRelatedLotNo;
|
|
62669
62860
|
case FIELD_TYPE.PRODUCT:
|
|
@@ -62688,6 +62879,7 @@ const renderUtils = {
|
|
|
62688
62879
|
assignValue(key, `${fieldId}_id_`, mainSterilizationLotId);
|
|
62689
62880
|
}
|
|
62690
62881
|
if (!configuredDefaultFields.has(field) && enableAutofill !== false && Array.isArray(autofillRules) && autofillRules.length > 0) {
|
|
62882
|
+
const isObjectProduct = !!field.belongingObject && fieldType === FIELD_TYPE.PRODUCT;
|
|
62691
62883
|
let sourceData = fieldType === FIELD_TYPE.PRODUCT ? productData : fieldType === FIELD_TYPE.ROUTING_OPERATION ? operationData : null;
|
|
62692
62884
|
if (fieldType === FIELD_TYPE.MFG_ORDER) {
|
|
62693
62885
|
sourceData = mfgOrderData;
|
|
@@ -62707,14 +62899,19 @@ const renderUtils = {
|
|
|
62707
62899
|
if (bizType === FIELD_TYPE.WAREHOUSE) {
|
|
62708
62900
|
sourceData = warehouseData;
|
|
62709
62901
|
}
|
|
62902
|
+
if (isObjectProduct) {
|
|
62903
|
+
sourceData = objectProductDefaults.get(field)?.sourceData;
|
|
62904
|
+
}
|
|
62710
62905
|
if (sourceData) {
|
|
62711
|
-
autofillRules.forEach(({ fromField, toField, toFieldType }) => {
|
|
62906
|
+
autofillRules.forEach(({ fromField, toField, toFieldType, fromSubTableField }) => {
|
|
62907
|
+
if (!toField) return;
|
|
62908
|
+
const targetKey = isObjectProduct ? fromSubTableField || key : key;
|
|
62712
62909
|
if (fromField === "uom_id_" && sourceData?.[fromField] && toFieldType !== FIELD_TYPE.REF) {
|
|
62713
|
-
const dictVal = sourceData?._DICT?.[fromField][sourceData?.[fromField]];
|
|
62910
|
+
const dictVal = sourceData?._DICT?.[fromField]?.[sourceData?.[fromField]];
|
|
62714
62911
|
const val = Array.isArray(dictVal) ? dictVal[0] : dictVal || sourceData?.[fromField];
|
|
62715
|
-
assignValue(
|
|
62912
|
+
assignValue(targetKey, toField, val);
|
|
62716
62913
|
} else {
|
|
62717
|
-
assignValue(
|
|
62914
|
+
assignValue(targetKey, toField, sourceData?.[fromField]);
|
|
62718
62915
|
}
|
|
62719
62916
|
});
|
|
62720
62917
|
}
|
|
@@ -63982,12 +64179,16 @@ const calcUtils = {
|
|
|
63982
64179
|
(acc, item) => {
|
|
63983
64180
|
acc.containerIds.push(item.trId);
|
|
63984
64181
|
Object.entries(item.mergeCells).forEach(([key, value]) => {
|
|
64182
|
+
const sourceTdId = value.dataFsSymbol.replace("gct.", "");
|
|
64183
|
+
if ((item.status === calcUtils.GH || item.status === calcUtils.SH) && value.tdId === sourceTdId) {
|
|
64184
|
+
delete staticMergeRemaining[sourceTdId];
|
|
64185
|
+
}
|
|
63985
64186
|
const rowH = pageItem.dynHeights.get(item.uuid);
|
|
63986
64187
|
const rowContrib = Array.isArray(rowH) ? rowH.reduce((a, b) => a + b, 0) : rowH ?? item.height ?? 0;
|
|
63987
64188
|
if (!acc.mergeCells[key]) {
|
|
63988
64189
|
acc.mergeCells[key] = {
|
|
63989
64190
|
firstTdId: value.tdId,
|
|
63990
|
-
sourceTdId
|
|
64191
|
+
sourceTdId,
|
|
63991
64192
|
rowspan: 1,
|
|
63992
64193
|
// 初始值为 1
|
|
63993
64194
|
borderAttrs: value.borderAttrs,
|
|
@@ -64138,10 +64339,14 @@ const calcUtils = {
|
|
|
64138
64339
|
if (!groups.has(sheetId)) groups.set(sheetId, []);
|
|
64139
64340
|
groups.get(sheetId).push(id);
|
|
64140
64341
|
}
|
|
64141
|
-
if (groups.size)
|
|
64142
|
-
|
|
64143
|
-
|
|
64144
|
-
|
|
64342
|
+
if (groups.size)
|
|
64343
|
+
return [...groups.entries()].flatMap(([sheetId, ids]) => {
|
|
64344
|
+
const partition = {
|
|
64345
|
+
...runtimeJson,
|
|
64346
|
+
paper: { ...root2, nextIds: ids, props: { ...root2.props, floatingFieldIds: [] } }
|
|
64347
|
+
};
|
|
64348
|
+
return calcUtils.initCalc(partition, formState).map((page, pageIndex) => ({ ...page, sheetId, pageIndex }));
|
|
64349
|
+
});
|
|
64145
64350
|
}
|
|
64146
64351
|
const baseMarketObj = calcUtils.marketOverview(runtimeJson, formState);
|
|
64147
64352
|
const paper = runtimeJson[ComponentTypeEnum.PAPER];
|
|
@@ -64564,140 +64769,238 @@ function resolveFieldRenderComponent(props) {
|
|
|
64564
64769
|
}
|
|
64565
64770
|
return resolveRenderComponent(props.bizType, props.fieldType);
|
|
64566
64771
|
}
|
|
64567
|
-
|
|
64568
|
-
|
|
64569
|
-
|
|
64570
|
-
|
|
64571
|
-
|
|
64572
|
-
|
|
64573
|
-
|
|
64574
|
-
|
|
64575
|
-
|
|
64576
|
-
|
|
64577
|
-
|
|
64578
|
-
|
|
64579
|
-
|
|
64580
|
-
function isAttachFieldActive(attach, formData) {
|
|
64581
|
-
if (attach?.parent && !isAttachFieldActive(attach.parent, formData)) return false;
|
|
64582
|
-
if (!attach?.belongFieldId || isNil(attach.optionValue)) {
|
|
64583
|
-
return true;
|
|
64584
|
-
}
|
|
64585
|
-
const row = attach.subtableFieldId ? findRuntimeTableRow(formData?.[attach.subtableFieldId], attach.rowKey) : formData;
|
|
64586
|
-
if (attach.subtableFieldId && (!attach.rowKey || !row || row === formData)) {
|
|
64587
|
-
return false;
|
|
64588
|
-
}
|
|
64589
|
-
const raw = row?.[attach.belongFieldId];
|
|
64590
|
-
if (attach.multiple) {
|
|
64591
|
-
const current = renderUtils.getValue(raw, true);
|
|
64592
|
-
if (!Array.isArray(current)) return false;
|
|
64593
|
-
return current.some((v) => isSameOptionValue(v, attach.optionValue));
|
|
64594
|
-
}
|
|
64595
|
-
return isSameOptionValue(raw, attach.optionValue);
|
|
64772
|
+
const getApi$1 = api.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey;
|
|
64773
|
+
const postApi = api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey;
|
|
64774
|
+
async function materialCheck(params) {
|
|
64775
|
+
const res = await postApi(
|
|
64776
|
+
{
|
|
64777
|
+
bsKey: "biz_single_material_check",
|
|
64778
|
+
modelKey: "em_material_loading",
|
|
64779
|
+
modelCategory: "entity"
|
|
64780
|
+
},
|
|
64781
|
+
{},
|
|
64782
|
+
params
|
|
64783
|
+
);
|
|
64784
|
+
return res;
|
|
64596
64785
|
}
|
|
64597
|
-
function
|
|
64598
|
-
|
|
64599
|
-
return true;
|
|
64600
|
-
}
|
|
64601
|
-
return isAttachFieldActive(
|
|
64786
|
+
async function stockCheck(params) {
|
|
64787
|
+
await postApi(
|
|
64602
64788
|
{
|
|
64603
|
-
|
|
64604
|
-
|
|
64605
|
-
|
|
64789
|
+
bsKey: "biz_form_single_confirm",
|
|
64790
|
+
modelKey: "em_material_loading",
|
|
64791
|
+
modelCategory: "entity"
|
|
64606
64792
|
},
|
|
64607
|
-
|
|
64793
|
+
{},
|
|
64794
|
+
{
|
|
64795
|
+
entry: params.entry,
|
|
64796
|
+
material_id_: params.row.product_id_,
|
|
64797
|
+
production_identification_name_: params.row.material_no_,
|
|
64798
|
+
qty_: params.row.qty_,
|
|
64799
|
+
operation_id_: params.row.routing_operation_id_,
|
|
64800
|
+
main_material_no_: params.mainMaterialNo
|
|
64801
|
+
}
|
|
64608
64802
|
);
|
|
64609
64803
|
}
|
|
64610
|
-
|
|
64611
|
-
|
|
64612
|
-
|
|
64613
|
-
|
|
64614
|
-
|
|
64615
|
-
|
|
64616
|
-
|
|
64617
|
-
|
|
64618
|
-
|
|
64619
|
-
|
|
64620
|
-
|
|
64621
|
-
|
|
64622
|
-
|
|
64804
|
+
async function fetchHistoryConsume(params) {
|
|
64805
|
+
const res = await postApi(
|
|
64806
|
+
{
|
|
64807
|
+
bsKey: "listAll",
|
|
64808
|
+
modelKey: "em_material_consume",
|
|
64809
|
+
modelCategory: "entity"
|
|
64810
|
+
},
|
|
64811
|
+
{},
|
|
64812
|
+
{
|
|
64813
|
+
query: params
|
|
64814
|
+
}
|
|
64815
|
+
);
|
|
64816
|
+
console.log("查询历史消耗数据", res);
|
|
64817
|
+
const arr = res.data ?? [];
|
|
64818
|
+
arr.map((i2) => {
|
|
64819
|
+
i2.qty_ = i2.qty_consumed_;
|
|
64820
|
+
});
|
|
64821
|
+
return arr;
|
|
64623
64822
|
}
|
|
64624
|
-
function
|
|
64625
|
-
|
|
64626
|
-
|
|
64627
|
-
|
|
64628
|
-
|
|
64629
|
-
|
|
64630
|
-
|
|
64631
|
-
|
|
64632
|
-
|
|
64823
|
+
async function judgeUnique(opts) {
|
|
64824
|
+
const res = await postApi(
|
|
64825
|
+
{
|
|
64826
|
+
bsKey: "biz_form_unique",
|
|
64827
|
+
modelKey: "em_material_loading",
|
|
64828
|
+
modelCategory: "entity"
|
|
64829
|
+
},
|
|
64830
|
+
{},
|
|
64831
|
+
{
|
|
64832
|
+
model_key_: opts.modelKey,
|
|
64833
|
+
datas_: opts.data
|
|
64834
|
+
}
|
|
64633
64835
|
);
|
|
64634
|
-
return
|
|
64635
|
-
...stamp,
|
|
64636
|
-
sealPosition: { ...isSealPosition(parsed.sealPosition) ? parsed.sealPosition : fallback }
|
|
64637
|
-
};
|
|
64836
|
+
return res;
|
|
64638
64837
|
}
|
|
64639
|
-
function
|
|
64838
|
+
async function isBomGranted() {
|
|
64640
64839
|
try {
|
|
64641
|
-
const
|
|
64642
|
-
|
|
64643
|
-
|
|
64840
|
+
const res = await getApi$1(
|
|
64841
|
+
{
|
|
64842
|
+
modelKey: "em_product_bom",
|
|
64843
|
+
bsKey: "biz_bom_granted",
|
|
64844
|
+
modelCategory: "entity"
|
|
64845
|
+
},
|
|
64846
|
+
{},
|
|
64847
|
+
{}
|
|
64848
|
+
);
|
|
64849
|
+
return res ?? false;
|
|
64850
|
+
} catch (error) {
|
|
64851
|
+
console.log("");
|
|
64644
64852
|
return false;
|
|
64645
64853
|
}
|
|
64646
64854
|
}
|
|
64647
|
-
function
|
|
64648
|
-
|
|
64649
|
-
|
|
64650
|
-
|
|
64651
|
-
}
|
|
64652
|
-
|
|
64855
|
+
async function getReinspectionDate(params) {
|
|
64856
|
+
if (!params.material_no_id_ && !params.material_no_) return;
|
|
64857
|
+
({
|
|
64858
|
+
"product_id_.versionIn": [params.product_id_.split(":").pop()]
|
|
64859
|
+
});
|
|
64860
|
+
if (params.material_no_id_) {
|
|
64861
|
+
params.material_no_id_;
|
|
64862
|
+
} else {
|
|
64863
|
+
params.material_no_;
|
|
64653
64864
|
}
|
|
64865
|
+
const res = await postApi(
|
|
64866
|
+
{
|
|
64867
|
+
modelCategory: "entity",
|
|
64868
|
+
modelKey: "em_production_identification",
|
|
64869
|
+
bsKey: "getOne"
|
|
64870
|
+
},
|
|
64871
|
+
{},
|
|
64872
|
+
{
|
|
64873
|
+
query: {
|
|
64874
|
+
name_: params.material_no_,
|
|
64875
|
+
id_: params.material_no_id_,
|
|
64876
|
+
"product_id_.versionEq": params.product_id_
|
|
64877
|
+
}
|
|
64878
|
+
}
|
|
64879
|
+
);
|
|
64880
|
+
const record = res?.data?.[0] ?? res?.data;
|
|
64881
|
+
const raw = record?.re_inspection_date_ ?? record?.retest_date_;
|
|
64882
|
+
if (raw == null || raw === "") return;
|
|
64883
|
+
const parsed = dayjs(raw);
|
|
64884
|
+
if (!parsed.isValid()) return;
|
|
64885
|
+
return parsed.format("YYYY-MM-DD");
|
|
64654
64886
|
}
|
|
64655
|
-
function
|
|
64656
|
-
|
|
64657
|
-
|
|
64658
|
-
|
|
64659
|
-
|
|
64660
|
-
|
|
64661
|
-
|
|
64887
|
+
async function validateReinspectionDate(opts) {
|
|
64888
|
+
if (!opts.product_id_ || !opts.material_no_ && !opts.material_no_id_) return;
|
|
64889
|
+
const date = await getReinspectionDate({
|
|
64890
|
+
product_id_: opts.product_id_,
|
|
64891
|
+
material_no_: opts.material_no_,
|
|
64892
|
+
material_no_id_: opts.material_no_id_
|
|
64893
|
+
});
|
|
64894
|
+
if (!date) return;
|
|
64895
|
+
if (dayjs(date).isBefore(dayjs(), "day")) {
|
|
64896
|
+
throw new Error($t("sys.retestDateErrorTip"));
|
|
64897
|
+
}
|
|
64662
64898
|
}
|
|
64663
|
-
function
|
|
64664
|
-
|
|
64665
|
-
|
|
64899
|
+
async function getLotLockedReason(production_identification_id_) {
|
|
64900
|
+
const { data = {}, dict = {} } = await postApi(
|
|
64901
|
+
{
|
|
64902
|
+
modelCategory: "entity",
|
|
64903
|
+
modelKey: "em_production_identification_lock_record",
|
|
64904
|
+
bsKey: "biz_get_one_lock_record"
|
|
64905
|
+
},
|
|
64906
|
+
{},
|
|
64907
|
+
{
|
|
64908
|
+
production_identification_id_
|
|
64909
|
+
}
|
|
64666
64910
|
);
|
|
64911
|
+
return $t("sys.lotLockedReason", {
|
|
64912
|
+
name: dict.lock_user_id_[data.lock_user_id_],
|
|
64913
|
+
reason: data.lock_reason_
|
|
64914
|
+
});
|
|
64667
64915
|
}
|
|
64668
|
-
|
|
64669
|
-
|
|
64670
|
-
|
|
64916
|
+
var Config_Fields = /* @__PURE__ */ ((Config_Fields2) => {
|
|
64917
|
+
Config_Fields2["materialCode"] = "materialCode";
|
|
64918
|
+
Config_Fields2["lot"] = "lot";
|
|
64919
|
+
Config_Fields2["qty"] = "qty";
|
|
64920
|
+
Config_Fields2["expiration"] = "expiration";
|
|
64921
|
+
Config_Fields2["deviceCode"] = "deviceCode";
|
|
64922
|
+
Config_Fields2["other"] = "other";
|
|
64923
|
+
return Config_Fields2;
|
|
64924
|
+
})(Config_Fields || {});
|
|
64925
|
+
const getApi = api.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey;
|
|
64926
|
+
async function getParseRuleInfo(params) {
|
|
64927
|
+
const res = await getApi(
|
|
64928
|
+
{
|
|
64929
|
+
bsKey: "rdoGetVersionById",
|
|
64930
|
+
modelKey: "em_barcode_parsing_rules",
|
|
64931
|
+
modelCategory: "entity"
|
|
64932
|
+
},
|
|
64933
|
+
params
|
|
64934
|
+
);
|
|
64935
|
+
return res.data;
|
|
64671
64936
|
}
|
|
64672
|
-
function
|
|
64673
|
-
|
|
64674
|
-
|
|
64675
|
-
|
|
64676
|
-
|
|
64677
|
-
|
|
64937
|
+
function handleOldConfig(config) {
|
|
64938
|
+
if (config.list && !config.fieldList) {
|
|
64939
|
+
config.fieldList = config.list.map((type) => {
|
|
64940
|
+
return {
|
|
64941
|
+
type,
|
|
64942
|
+
key: type === Config_Fields.other ? uuid2(32) : type
|
|
64943
|
+
};
|
|
64944
|
+
});
|
|
64945
|
+
delete config.list;
|
|
64946
|
+
}
|
|
64947
|
+
config.fieldList.forEach((item) => {
|
|
64948
|
+
if (!item.key) {
|
|
64949
|
+
item.key = item.type === Config_Fields.other ? uuid2(32) : item.type;
|
|
64950
|
+
}
|
|
64951
|
+
});
|
|
64952
|
+
return config;
|
|
64678
64953
|
}
|
|
64679
|
-
function
|
|
64680
|
-
|
|
64681
|
-
|
|
64682
|
-
|
|
64683
|
-
|
|
64684
|
-
|
|
64685
|
-
|
|
64954
|
+
function getParseRuleValue(labelStr, labelRule) {
|
|
64955
|
+
if (!labelRule) {
|
|
64956
|
+
throw new Error("请传入解析规则");
|
|
64957
|
+
}
|
|
64958
|
+
const ruleObj = JSON.parse(labelRule);
|
|
64959
|
+
const ruleConfig = handleOldConfig(ruleObj);
|
|
64960
|
+
const { separator, nullSymbol, fieldList } = ruleConfig;
|
|
64961
|
+
const labelArr = labelStr.split(separator);
|
|
64962
|
+
return labelArr.reduce((obj, e, idx) => {
|
|
64963
|
+
const field = fieldList[idx];
|
|
64964
|
+
if (field) {
|
|
64965
|
+
let val = nullSymbol && e === nullSymbol ? null : e;
|
|
64966
|
+
if (val !== null) {
|
|
64967
|
+
switch (field.type) {
|
|
64968
|
+
case Config_Fields.qty:
|
|
64969
|
+
val = Number(val);
|
|
64970
|
+
break;
|
|
64971
|
+
case Config_Fields.expiration:
|
|
64972
|
+
val = dayjs(val, field.format).format("YYYY-MM-DD HH:mm:ss");
|
|
64973
|
+
break;
|
|
64974
|
+
}
|
|
64975
|
+
}
|
|
64976
|
+
obj[field.key] = val;
|
|
64686
64977
|
}
|
|
64687
|
-
|
|
64688
|
-
|
|
64689
|
-
|
|
64690
|
-
|
|
64691
|
-
|
|
64692
|
-
|
|
64693
|
-
|
|
64978
|
+
return obj;
|
|
64979
|
+
}, {});
|
|
64980
|
+
}
|
|
64981
|
+
async function getParseRuleConfig(id) {
|
|
64982
|
+
const res = await getParseRuleInfo({ id });
|
|
64983
|
+
if (res?.rules_) {
|
|
64984
|
+
const ruleObj = JSON.parse(res.rules_);
|
|
64985
|
+
const ruleConfig = handleOldConfig(ruleObj);
|
|
64986
|
+
return ruleConfig;
|
|
64987
|
+
}
|
|
64988
|
+
}
|
|
64989
|
+
function calcFillData(data, fillMapArr) {
|
|
64990
|
+
const obj = {};
|
|
64991
|
+
if (fillMapArr?.length) {
|
|
64992
|
+
fillMapArr.forEach((i2) => {
|
|
64993
|
+
const fromKey = i2.barcodeField;
|
|
64994
|
+
if (fromKey && fromKey in data) {
|
|
64995
|
+
const val = data[fromKey];
|
|
64996
|
+
i2.formFields?.forEach((key) => {
|
|
64997
|
+
const toKey2 = key.split(".")[1];
|
|
64998
|
+
obj[toKey2] = val;
|
|
64694
64999
|
});
|
|
64695
|
-
} else if (typeof raw !== "string") {
|
|
64696
|
-
formData[props.field] = JSON.stringify(parsed);
|
|
64697
65000
|
}
|
|
64698
|
-
}
|
|
64699
|
-
}
|
|
65001
|
+
});
|
|
64700
65002
|
}
|
|
65003
|
+
return obj;
|
|
64701
65004
|
}
|
|
64702
65005
|
var isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, mathceil = Math.ceil, mathfloor = Math.floor, bignumberError = "[BigNumber Error] ", tooManyDigits = bignumberError + "Number primitive has more than 15 significant digits: ", BASE = 1e14, LOG_BASE = 14, MAX_SAFE_INTEGER$2 = 9007199254740991, POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], SQRT_BASE = 1e7, MAX = 1e9;
|
|
64703
65006
|
function clone(configObject) {
|
|
@@ -66030,665 +66333,6 @@ function toFixedPoint(str, e, z) {
|
|
|
66030
66333
|
return str;
|
|
66031
66334
|
}
|
|
66032
66335
|
var BigNumber = clone();
|
|
66033
|
-
const { identify, calculate } = {
|
|
66034
|
-
identify: (expression) => window.NocodeAdapter.utils?.formulaIdentify?.(expression) ?? [],
|
|
66035
|
-
calculate: (expression, data) => window.NocodeAdapter.utils?.formulaCalculate?.(expression, data)
|
|
66036
|
-
};
|
|
66037
|
-
const getFieldDataValue = (parseInfo, formData) => {
|
|
66038
|
-
const getTextValue = (processedKey, value) => {
|
|
66039
|
-
const textValue = value ?? formData?.[processedKey] ?? "";
|
|
66040
|
-
return Array.isArray(textValue) ? textValue.join() : textValue;
|
|
66041
|
-
};
|
|
66042
|
-
const { type, processed, hashValue } = parseInfo;
|
|
66043
|
-
if (type === "hash") {
|
|
66044
|
-
const tableData = toRaw(formData?.[hashValue] || []);
|
|
66045
|
-
return tableData.filter((d) => !d.deleted_).map((row) => getTextValue(processed, row?.[processed])).filter((i2) => !isNil(i2));
|
|
66046
|
-
}
|
|
66047
|
-
return getTextValue(processed, formData?.[processed]);
|
|
66048
|
-
};
|
|
66049
|
-
const parseFormulaVar = (formulaVar) => {
|
|
66050
|
-
const result = {
|
|
66051
|
-
original: formulaVar,
|
|
66052
|
-
type: "",
|
|
66053
|
-
processed: "",
|
|
66054
|
-
hashValue: "",
|
|
66055
|
-
dataType: ""
|
|
66056
|
-
};
|
|
66057
|
-
if (/^\$([^$]+)\$\.(.+)$/.test(formulaVar)) {
|
|
66058
|
-
const match = formulaVar.match(/^\$([^$]+)\$\.(.+)$/);
|
|
66059
|
-
result.type = "hash";
|
|
66060
|
-
result.processed = match[2];
|
|
66061
|
-
result.hashValue = match[1];
|
|
66062
|
-
result.dataType = "globType";
|
|
66063
|
-
} else if (/^_\.(.+)$/.test(formulaVar)) {
|
|
66064
|
-
const match = formulaVar.match(/^_\.(.+)$/);
|
|
66065
|
-
result.type = "underscore";
|
|
66066
|
-
result.processed = match[1];
|
|
66067
|
-
result.dataType = "currentRowType";
|
|
66068
|
-
} else {
|
|
66069
|
-
result.type = "plain";
|
|
66070
|
-
result.processed = formulaVar;
|
|
66071
|
-
result.dataType = "globType";
|
|
66072
|
-
}
|
|
66073
|
-
return result;
|
|
66074
|
-
};
|
|
66075
|
-
const getParseFormulaVarInfos = (expr) => {
|
|
66076
|
-
const rowArgs = expr ? identify(expr) : [];
|
|
66077
|
-
return {
|
|
66078
|
-
rowArgs,
|
|
66079
|
-
parseInfos: rowArgs.map((curr) => parseFormulaVar(curr))
|
|
66080
|
-
};
|
|
66081
|
-
};
|
|
66082
|
-
const calculateFormula = async (expr, formData, instanceFormState) => {
|
|
66083
|
-
const rowArgs = identify(expr);
|
|
66084
|
-
const formulaData = isEmpty(rowArgs) ? {} : rowArgs.reduce((total, curr) => {
|
|
66085
|
-
const parseInfo = parseFormulaVar(curr);
|
|
66086
|
-
total[curr] = getFieldDataValue(
|
|
66087
|
-
parseInfo,
|
|
66088
|
-
parseInfo.dataType === "currentRowType" ? formData : instanceFormState
|
|
66089
|
-
);
|
|
66090
|
-
return total;
|
|
66091
|
-
}, {});
|
|
66092
|
-
return calculate(expr, formulaData);
|
|
66093
|
-
};
|
|
66094
|
-
const isEmptyValue = (value) => {
|
|
66095
|
-
return value === void 0 || value === null || typeof value === "string" && value.trim() === "" || Array.isArray(value) && value.length === 0;
|
|
66096
|
-
};
|
|
66097
|
-
const compareByOp = (left, right, op) => {
|
|
66098
|
-
switch (op) {
|
|
66099
|
-
case RangeCompareOp.LT:
|
|
66100
|
-
return left < right;
|
|
66101
|
-
case RangeCompareOp.LE:
|
|
66102
|
-
return left <= right;
|
|
66103
|
-
case RangeCompareOp.GT:
|
|
66104
|
-
return left > right;
|
|
66105
|
-
case RangeCompareOp.GE:
|
|
66106
|
-
default:
|
|
66107
|
-
return left >= right;
|
|
66108
|
-
}
|
|
66109
|
-
};
|
|
66110
|
-
const rangeCompareMessage = (op, val) => {
|
|
66111
|
-
switch (op) {
|
|
66112
|
-
case RangeCompareOp.LT:
|
|
66113
|
-
return $t("sys.fieldValueNotGreaterOrEqual", { val });
|
|
66114
|
-
case RangeCompareOp.LE:
|
|
66115
|
-
return $t("sys.fieldValueNoMoreThan", { val });
|
|
66116
|
-
case RangeCompareOp.GT:
|
|
66117
|
-
return $t("sys.fieldValueNotLessOrEqual", { val });
|
|
66118
|
-
case RangeCompareOp.GE:
|
|
66119
|
-
default:
|
|
66120
|
-
return $t("sys.fieldValueNotLessThan", { val });
|
|
66121
|
-
}
|
|
66122
|
-
};
|
|
66123
|
-
const toUnixTimestamp = (input) => {
|
|
66124
|
-
if (isNil(input) || input === "") return null;
|
|
66125
|
-
const asNumber = typeof input === "number" || typeof input === "string" && /^-?\d+(\.\d+)?$/.test(input.trim());
|
|
66126
|
-
if (asNumber) {
|
|
66127
|
-
const n = Number(input);
|
|
66128
|
-
if (Number.isNaN(n)) return null;
|
|
66129
|
-
const parsed2 = n > 1e12 ? dayjs(n) : dayjs.unix(n);
|
|
66130
|
-
return parsed2.isValid() ? parsed2.unix() : null;
|
|
66131
|
-
}
|
|
66132
|
-
const parsed = dayjs(input);
|
|
66133
|
-
return parsed.isValid() ? parsed.unix() : null;
|
|
66134
|
-
};
|
|
66135
|
-
const buildError = (validatorInfo, message2) => JSON.stringify({ ...validatorInfo, message: message2 });
|
|
66136
|
-
function areValidationCommentsEqual(left, right) {
|
|
66137
|
-
const serialize = (comments) => JSON.stringify(
|
|
66138
|
-
comments,
|
|
66139
|
-
(_key, value) => value && typeof value === "object" && "message" in value ? { ...value, message: value.message } : value
|
|
66140
|
-
);
|
|
66141
|
-
return serialize(left) === serialize(right);
|
|
66142
|
-
}
|
|
66143
|
-
const createRule = (validator, message2, trigger = "change") => ({
|
|
66144
|
-
required: true,
|
|
66145
|
-
validator,
|
|
66146
|
-
message: message2,
|
|
66147
|
-
trigger
|
|
66148
|
-
});
|
|
66149
|
-
function relocateDeletedRowsToEnd(rows = []) {
|
|
66150
|
-
const active = [];
|
|
66151
|
-
const deleted = [];
|
|
66152
|
-
for (const row of rows) {
|
|
66153
|
-
if (row?.deleted_) deleted.push(row);
|
|
66154
|
-
else active.push(row);
|
|
66155
|
-
}
|
|
66156
|
-
return [...active, ...deleted];
|
|
66157
|
-
}
|
|
66158
|
-
const MAX_NUMERIC_DIGITS = 15;
|
|
66159
|
-
const NUMERIC_FIELD_TYPES = /* @__PURE__ */ new Set([
|
|
66160
|
-
FIELD_TYPE.INTEGER,
|
|
66161
|
-
FIELD_TYPE.LONG,
|
|
66162
|
-
FIELD_TYPE.DOUBLE,
|
|
66163
|
-
FIELD_TYPE.DECIMAL
|
|
66164
|
-
]);
|
|
66165
|
-
function filterRulesByTrigger(rules, trigger) {
|
|
66166
|
-
return rules.filter((rule) => {
|
|
66167
|
-
const ruleTrigger = rule.trigger;
|
|
66168
|
-
if (!ruleTrigger) return trigger === "change";
|
|
66169
|
-
if (trigger === "blur") {
|
|
66170
|
-
return ruleTrigger === "blur" || ruleTrigger === "change";
|
|
66171
|
-
}
|
|
66172
|
-
return ruleTrigger === trigger;
|
|
66173
|
-
});
|
|
66174
|
-
}
|
|
66175
|
-
function assembleRules(input) {
|
|
66176
|
-
const { showRequired, fieldType, validatorInfo, props } = input;
|
|
66177
|
-
const {
|
|
66178
|
-
minlength,
|
|
66179
|
-
maxlength,
|
|
66180
|
-
regex,
|
|
66181
|
-
regexHint,
|
|
66182
|
-
validateTrue,
|
|
66183
|
-
validateFalse,
|
|
66184
|
-
enableRangeValidate,
|
|
66185
|
-
maxValidateMode,
|
|
66186
|
-
minValidateMode,
|
|
66187
|
-
maxCompareOp,
|
|
66188
|
-
minCompareOp,
|
|
66189
|
-
minValue,
|
|
66190
|
-
maxValue,
|
|
66191
|
-
minFormulaExpr,
|
|
66192
|
-
maxFormulaExpr,
|
|
66193
|
-
minDate,
|
|
66194
|
-
maxDate,
|
|
66195
|
-
minDateFormulaExpr,
|
|
66196
|
-
maxDateFormulaExpr,
|
|
66197
|
-
maxDateValidateMode,
|
|
66198
|
-
minDateValidateMode
|
|
66199
|
-
} = props;
|
|
66200
|
-
const resolvedMaxCompareOp = maxCompareOp ?? RangeCompareOp.LE;
|
|
66201
|
-
const resolvedMinCompareOp = minCompareOp ?? RangeCompareOp.GE;
|
|
66202
|
-
const RuleProps = [];
|
|
66203
|
-
if (props.bizType === FIELD_TYPE.SEAL) {
|
|
66204
|
-
if (showRequired) {
|
|
66205
|
-
RuleProps.push(
|
|
66206
|
-
createRule(
|
|
66207
|
-
(_rule, value) => isSealStamped(value),
|
|
66208
|
-
buildError(
|
|
66209
|
-
{ ...validatorInfo, validationCode: "seal-required" },
|
|
66210
|
-
$t("sys.fieldRequired")
|
|
66211
|
-
),
|
|
66212
|
-
"manual"
|
|
66213
|
-
)
|
|
66214
|
-
);
|
|
66215
|
-
}
|
|
66216
|
-
RuleProps.push(createRule((_rule, value) => isEmptyValue(value) || isValidSealValue(value), buildError(validatorInfo, $t("sys.seal.invalid"))));
|
|
66217
|
-
return RuleProps;
|
|
66218
|
-
}
|
|
66219
|
-
if (showRequired) {
|
|
66220
|
-
RuleProps.push(
|
|
66221
|
-
createRule(
|
|
66222
|
-
(_rule, value) => !isEmptyValue(value),
|
|
66223
|
-
buildError(validatorInfo, $t("sys.fieldRequired")),
|
|
66224
|
-
"manual"
|
|
66225
|
-
)
|
|
66226
|
-
);
|
|
66227
|
-
}
|
|
66228
|
-
if (!isNil(minlength)) {
|
|
66229
|
-
RuleProps.push(
|
|
66230
|
-
createRule((_rule, value) => {
|
|
66231
|
-
if (isEmptyValue(value)) return true;
|
|
66232
|
-
return String(value).length >= minlength;
|
|
66233
|
-
}, buildError(validatorInfo, $t("sys.fieldLengthNotLessThan", { len: minlength })))
|
|
66234
|
-
);
|
|
66235
|
-
}
|
|
66236
|
-
const effectiveMaxlength = isNil(maxlength) && fieldType === FIELD_TYPE.TEXT ? 1024 : maxlength;
|
|
66237
|
-
if (!isNil(effectiveMaxlength)) {
|
|
66238
|
-
RuleProps.push(
|
|
66239
|
-
createRule((_rule, value) => {
|
|
66240
|
-
if (isEmptyValue(value)) return true;
|
|
66241
|
-
return String(value).length <= effectiveMaxlength;
|
|
66242
|
-
}, buildError(validatorInfo, $t("sys.fieldLengthNoMoreThan", { len: effectiveMaxlength })))
|
|
66243
|
-
);
|
|
66244
|
-
}
|
|
66245
|
-
if (regex) {
|
|
66246
|
-
RuleProps.push(
|
|
66247
|
-
createRule((_rule, value) => {
|
|
66248
|
-
if (isEmptyValue(value)) return true;
|
|
66249
|
-
return new RegExp(regex).test(value);
|
|
66250
|
-
}, buildError(validatorInfo, regexHint ?? $t("sys.fieldFormatError")))
|
|
66251
|
-
);
|
|
66252
|
-
}
|
|
66253
|
-
if (validateTrue) {
|
|
66254
|
-
RuleProps.push({
|
|
66255
|
-
required: true,
|
|
66256
|
-
trigger: "manual",
|
|
66257
|
-
validator: (_rule, value) => value === true,
|
|
66258
|
-
message: buildError(validatorInfo, $t("sys.fieldValueNeedTrue"))
|
|
66259
|
-
});
|
|
66260
|
-
}
|
|
66261
|
-
if (validateFalse) {
|
|
66262
|
-
RuleProps.push({
|
|
66263
|
-
required: true,
|
|
66264
|
-
trigger: "manual",
|
|
66265
|
-
validator: (_rule, value) => value === false,
|
|
66266
|
-
message: buildError(validatorInfo, $t("sys.fieldValueNeedFalse"))
|
|
66267
|
-
});
|
|
66268
|
-
}
|
|
66269
|
-
const maxMode = maxValidateMode ?? RangeValidateMode.No_Validate;
|
|
66270
|
-
const minMode = minValidateMode ?? RangeValidateMode.No_Validate;
|
|
66271
|
-
const shouldValidateNumericLength = !enableRangeValidate || maxMode === RangeValidateMode.No_Validate || minMode === RangeValidateMode.No_Validate;
|
|
66272
|
-
if (shouldValidateNumericLength && NUMERIC_FIELD_TYPES.has(fieldType ?? "")) {
|
|
66273
|
-
RuleProps.push(
|
|
66274
|
-
createRule((_rule, value) => {
|
|
66275
|
-
if (isEmptyValue(value)) return true;
|
|
66276
|
-
const raw = String(value).trim();
|
|
66277
|
-
const text = /e/i.test(raw) ? new BigNumber(raw).toFixed() : raw;
|
|
66278
|
-
return text.replace(/[+\-.]/g, "").length <= MAX_NUMERIC_DIGITS;
|
|
66279
|
-
}, buildError(validatorInfo, $t("sys.fieldNumericDigitsNoMoreThan")))
|
|
66280
|
-
);
|
|
66281
|
-
}
|
|
66282
|
-
if (!enableRangeValidate) {
|
|
66283
|
-
return RuleProps;
|
|
66284
|
-
}
|
|
66285
|
-
if (minValidateMode === RangeValidateMode.Fixed_Number && !isEmptyValue(minValue)) {
|
|
66286
|
-
RuleProps.push(
|
|
66287
|
-
createRule((_rule, value) => {
|
|
66288
|
-
if (isEmptyValue(value)) return true;
|
|
66289
|
-
return compareByOp(Number(value), Number(minValue), resolvedMinCompareOp);
|
|
66290
|
-
}, buildError(validatorInfo, rangeCompareMessage(resolvedMinCompareOp, minValue)))
|
|
66291
|
-
);
|
|
66292
|
-
}
|
|
66293
|
-
if (minValidateMode === RangeValidateMode.Variable_Validate && minFormulaExpr) {
|
|
66294
|
-
RuleProps.push({
|
|
66295
|
-
required: true,
|
|
66296
|
-
trigger: "change",
|
|
66297
|
-
validator: async (_rule, value, _callback, _source, options) => {
|
|
66298
|
-
const currentFormData = getCurrentFormData(_rule, options);
|
|
66299
|
-
const formulaValue = await calculateFormula(
|
|
66300
|
-
minFormulaExpr,
|
|
66301
|
-
currentFormData,
|
|
66302
|
-
options?.formData
|
|
66303
|
-
);
|
|
66304
|
-
if (isEmptyValue(formulaValue)) {
|
|
66305
|
-
return Promise.resolve();
|
|
66306
|
-
}
|
|
66307
|
-
const parsedMin = parseFloat(formulaValue);
|
|
66308
|
-
if (!isNaN(parsedMin)) {
|
|
66309
|
-
if (isEmptyValue(value)) {
|
|
66310
|
-
return Promise.resolve();
|
|
66311
|
-
}
|
|
66312
|
-
if (!compareByOp(Number(value), parsedMin, resolvedMinCompareOp)) {
|
|
66313
|
-
return Promise.reject(
|
|
66314
|
-
new Error(
|
|
66315
|
-
buildError(validatorInfo, rangeCompareMessage(resolvedMinCompareOp, parsedMin))
|
|
66316
|
-
)
|
|
66317
|
-
);
|
|
66318
|
-
}
|
|
66319
|
-
}
|
|
66320
|
-
return Promise.resolve();
|
|
66321
|
-
}
|
|
66322
|
-
});
|
|
66323
|
-
}
|
|
66324
|
-
if (maxValidateMode === RangeValidateMode.Fixed_Number && !isEmptyValue(maxValue)) {
|
|
66325
|
-
RuleProps.push(
|
|
66326
|
-
createRule((_rule, value) => {
|
|
66327
|
-
if (isEmptyValue(value)) return true;
|
|
66328
|
-
return compareByOp(Number(value), Number(maxValue), resolvedMaxCompareOp);
|
|
66329
|
-
}, buildError(validatorInfo, rangeCompareMessage(resolvedMaxCompareOp, maxValue)))
|
|
66330
|
-
);
|
|
66331
|
-
}
|
|
66332
|
-
if (maxValidateMode === RangeValidateMode.Variable_Validate && maxFormulaExpr) {
|
|
66333
|
-
RuleProps.push({
|
|
66334
|
-
required: true,
|
|
66335
|
-
trigger: "change",
|
|
66336
|
-
validator: async (_rule, value, _callback, _source, options) => {
|
|
66337
|
-
const currentFormData = getCurrentFormData(_rule, options);
|
|
66338
|
-
const formulaValue = await calculateFormula(
|
|
66339
|
-
maxFormulaExpr,
|
|
66340
|
-
currentFormData,
|
|
66341
|
-
options?.formData
|
|
66342
|
-
);
|
|
66343
|
-
if (isEmptyValue(formulaValue)) {
|
|
66344
|
-
return Promise.resolve();
|
|
66345
|
-
}
|
|
66346
|
-
const parsedMax = parseFloat(formulaValue);
|
|
66347
|
-
if (!isNaN(parsedMax)) {
|
|
66348
|
-
if (isEmptyValue(value)) {
|
|
66349
|
-
return Promise.resolve();
|
|
66350
|
-
}
|
|
66351
|
-
if (!compareByOp(Number(value), parsedMax, resolvedMaxCompareOp)) {
|
|
66352
|
-
return Promise.reject(
|
|
66353
|
-
new Error(
|
|
66354
|
-
buildError(validatorInfo, rangeCompareMessage(resolvedMaxCompareOp, parsedMax))
|
|
66355
|
-
)
|
|
66356
|
-
);
|
|
66357
|
-
}
|
|
66358
|
-
}
|
|
66359
|
-
return Promise.resolve();
|
|
66360
|
-
}
|
|
66361
|
-
});
|
|
66362
|
-
}
|
|
66363
|
-
if (minDateValidateMode === RangeValidateMode.Fixed_Number && minDate) {
|
|
66364
|
-
RuleProps.push(
|
|
66365
|
-
createRule((_rule, value) => {
|
|
66366
|
-
if (isEmptyValue(value)) return true;
|
|
66367
|
-
const inputTime = dayjs(value).unix();
|
|
66368
|
-
const minTimestamp = dayjs(minDate).unix();
|
|
66369
|
-
if (!dayjs(value).isValid() || !dayjs(minDate).isValid()) return true;
|
|
66370
|
-
return compareByOp(inputTime, minTimestamp, resolvedMinCompareOp);
|
|
66371
|
-
}, buildError(validatorInfo, rangeCompareMessage(resolvedMinCompareOp, minDate)))
|
|
66372
|
-
);
|
|
66373
|
-
}
|
|
66374
|
-
if (maxDateValidateMode === RangeValidateMode.Fixed_Number && maxDate) {
|
|
66375
|
-
RuleProps.push(
|
|
66376
|
-
createRule((_rule, value) => {
|
|
66377
|
-
if (isEmptyValue(value)) return true;
|
|
66378
|
-
const inputTime = dayjs(value).unix();
|
|
66379
|
-
const maxTimestamp = dayjs(maxDate).unix();
|
|
66380
|
-
if (!dayjs(value).isValid() || !dayjs(maxDate).isValid()) return true;
|
|
66381
|
-
return compareByOp(inputTime, maxTimestamp, resolvedMaxCompareOp);
|
|
66382
|
-
}, buildError(validatorInfo, rangeCompareMessage(resolvedMaxCompareOp, maxDate)))
|
|
66383
|
-
);
|
|
66384
|
-
}
|
|
66385
|
-
if (minDateValidateMode === RangeValidateMode.Variable_Validate && minDateFormulaExpr) {
|
|
66386
|
-
RuleProps.push({
|
|
66387
|
-
required: true,
|
|
66388
|
-
trigger: "change",
|
|
66389
|
-
validator: async (_rule, value, _callback, _source, options) => {
|
|
66390
|
-
const currentFormData = getCurrentFormData(_rule, options);
|
|
66391
|
-
const formulaValue = await calculateFormula(
|
|
66392
|
-
minDateFormulaExpr,
|
|
66393
|
-
currentFormData,
|
|
66394
|
-
options?.formData
|
|
66395
|
-
);
|
|
66396
|
-
const limitTime = toUnixTimestamp(formulaValue);
|
|
66397
|
-
if (limitTime !== null) {
|
|
66398
|
-
if (isEmptyValue(value)) {
|
|
66399
|
-
return Promise.resolve();
|
|
66400
|
-
}
|
|
66401
|
-
if (!dayjs(value).isValid()) {
|
|
66402
|
-
return Promise.resolve();
|
|
66403
|
-
}
|
|
66404
|
-
const inputTime = dayjs(value).unix();
|
|
66405
|
-
const fmt = fieldType === FIELD_TYPE.DATE_TIME ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
66406
|
-
if (!compareByOp(inputTime, limitTime, resolvedMinCompareOp)) {
|
|
66407
|
-
return Promise.reject(
|
|
66408
|
-
new Error(
|
|
66409
|
-
buildError(
|
|
66410
|
-
validatorInfo,
|
|
66411
|
-
rangeCompareMessage(resolvedMinCompareOp, dayjs.unix(limitTime).format(fmt))
|
|
66412
|
-
)
|
|
66413
|
-
)
|
|
66414
|
-
);
|
|
66415
|
-
}
|
|
66416
|
-
}
|
|
66417
|
-
return Promise.resolve();
|
|
66418
|
-
}
|
|
66419
|
-
});
|
|
66420
|
-
}
|
|
66421
|
-
if (maxDateValidateMode === RangeValidateMode.Variable_Validate && maxDateFormulaExpr) {
|
|
66422
|
-
RuleProps.push({
|
|
66423
|
-
required: true,
|
|
66424
|
-
trigger: "change",
|
|
66425
|
-
validator: async (_rule, value, _callback, _source, options) => {
|
|
66426
|
-
const currentFormData = getCurrentFormData(_rule, options);
|
|
66427
|
-
const formulaValue = await calculateFormula(
|
|
66428
|
-
maxDateFormulaExpr,
|
|
66429
|
-
currentFormData,
|
|
66430
|
-
options?.formData
|
|
66431
|
-
);
|
|
66432
|
-
const limitTime = toUnixTimestamp(formulaValue);
|
|
66433
|
-
if (limitTime !== null) {
|
|
66434
|
-
if (isEmptyValue(value)) {
|
|
66435
|
-
return Promise.resolve();
|
|
66436
|
-
}
|
|
66437
|
-
if (!dayjs(value).isValid()) {
|
|
66438
|
-
return Promise.resolve();
|
|
66439
|
-
}
|
|
66440
|
-
const inputTime = dayjs(value).unix();
|
|
66441
|
-
const fmt = fieldType === FIELD_TYPE.DATE_TIME ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
66442
|
-
if (!compareByOp(inputTime, limitTime, resolvedMaxCompareOp)) {
|
|
66443
|
-
return Promise.reject(
|
|
66444
|
-
new Error(
|
|
66445
|
-
buildError(
|
|
66446
|
-
validatorInfo,
|
|
66447
|
-
rangeCompareMessage(resolvedMaxCompareOp, dayjs.unix(limitTime).format(fmt))
|
|
66448
|
-
)
|
|
66449
|
-
)
|
|
66450
|
-
);
|
|
66451
|
-
}
|
|
66452
|
-
}
|
|
66453
|
-
return Promise.resolve();
|
|
66454
|
-
}
|
|
66455
|
-
});
|
|
66456
|
-
}
|
|
66457
|
-
return RuleProps;
|
|
66458
|
-
}
|
|
66459
|
-
const getApi$1 = api.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey;
|
|
66460
|
-
const postApi = api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey;
|
|
66461
|
-
async function materialCheck(params) {
|
|
66462
|
-
const res = await postApi(
|
|
66463
|
-
{
|
|
66464
|
-
bsKey: "biz_single_material_check",
|
|
66465
|
-
modelKey: "em_material_loading",
|
|
66466
|
-
modelCategory: "entity"
|
|
66467
|
-
},
|
|
66468
|
-
{},
|
|
66469
|
-
params
|
|
66470
|
-
);
|
|
66471
|
-
return res;
|
|
66472
|
-
}
|
|
66473
|
-
async function stockCheck(params) {
|
|
66474
|
-
await postApi(
|
|
66475
|
-
{
|
|
66476
|
-
bsKey: "biz_form_single_confirm",
|
|
66477
|
-
modelKey: "em_material_loading",
|
|
66478
|
-
modelCategory: "entity"
|
|
66479
|
-
},
|
|
66480
|
-
{},
|
|
66481
|
-
{
|
|
66482
|
-
entry: params.entry,
|
|
66483
|
-
material_id_: params.row.product_id_,
|
|
66484
|
-
production_identification_name_: params.row.material_no_,
|
|
66485
|
-
qty_: params.row.qty_,
|
|
66486
|
-
operation_id_: params.row.routing_operation_id_,
|
|
66487
|
-
main_material_no_: params.mainMaterialNo
|
|
66488
|
-
}
|
|
66489
|
-
);
|
|
66490
|
-
}
|
|
66491
|
-
async function fetchHistoryConsume(params) {
|
|
66492
|
-
const res = await postApi(
|
|
66493
|
-
{
|
|
66494
|
-
bsKey: "listAll",
|
|
66495
|
-
modelKey: "em_material_consume",
|
|
66496
|
-
modelCategory: "entity"
|
|
66497
|
-
},
|
|
66498
|
-
{},
|
|
66499
|
-
{
|
|
66500
|
-
query: params
|
|
66501
|
-
}
|
|
66502
|
-
);
|
|
66503
|
-
console.log("查询历史消耗数据", res);
|
|
66504
|
-
const arr = res.data ?? [];
|
|
66505
|
-
arr.map((i2) => {
|
|
66506
|
-
i2.qty_ = i2.qty_consumed_;
|
|
66507
|
-
});
|
|
66508
|
-
return arr;
|
|
66509
|
-
}
|
|
66510
|
-
async function judgeUnique(opts) {
|
|
66511
|
-
const res = await postApi(
|
|
66512
|
-
{
|
|
66513
|
-
bsKey: "biz_form_unique",
|
|
66514
|
-
modelKey: "em_material_loading",
|
|
66515
|
-
modelCategory: "entity"
|
|
66516
|
-
},
|
|
66517
|
-
{},
|
|
66518
|
-
{
|
|
66519
|
-
model_key_: opts.modelKey,
|
|
66520
|
-
datas_: opts.data
|
|
66521
|
-
}
|
|
66522
|
-
);
|
|
66523
|
-
return res;
|
|
66524
|
-
}
|
|
66525
|
-
async function isBomGranted() {
|
|
66526
|
-
try {
|
|
66527
|
-
const res = await getApi$1(
|
|
66528
|
-
{
|
|
66529
|
-
modelKey: "em_product_bom",
|
|
66530
|
-
bsKey: "biz_bom_granted",
|
|
66531
|
-
modelCategory: "entity"
|
|
66532
|
-
},
|
|
66533
|
-
{},
|
|
66534
|
-
{}
|
|
66535
|
-
);
|
|
66536
|
-
return res ?? false;
|
|
66537
|
-
} catch (error) {
|
|
66538
|
-
console.log("");
|
|
66539
|
-
return false;
|
|
66540
|
-
}
|
|
66541
|
-
}
|
|
66542
|
-
async function getReinspectionDate(params) {
|
|
66543
|
-
if (!params.material_no_id_ && !params.material_no_) return;
|
|
66544
|
-
({
|
|
66545
|
-
"product_id_.versionIn": [params.product_id_.split(":").pop()]
|
|
66546
|
-
});
|
|
66547
|
-
if (params.material_no_id_) {
|
|
66548
|
-
params.material_no_id_;
|
|
66549
|
-
} else {
|
|
66550
|
-
params.material_no_;
|
|
66551
|
-
}
|
|
66552
|
-
const res = await postApi(
|
|
66553
|
-
{
|
|
66554
|
-
modelCategory: "entity",
|
|
66555
|
-
modelKey: "em_production_identification",
|
|
66556
|
-
bsKey: "getOne"
|
|
66557
|
-
},
|
|
66558
|
-
{},
|
|
66559
|
-
{
|
|
66560
|
-
query: {
|
|
66561
|
-
name_: params.material_no_,
|
|
66562
|
-
id_: params.material_no_id_,
|
|
66563
|
-
"product_id_.versionEq": params.product_id_
|
|
66564
|
-
}
|
|
66565
|
-
}
|
|
66566
|
-
);
|
|
66567
|
-
const record = res?.data?.[0] ?? res?.data;
|
|
66568
|
-
const raw = record?.re_inspection_date_ ?? record?.retest_date_;
|
|
66569
|
-
if (raw == null || raw === "") return;
|
|
66570
|
-
const parsed = dayjs(raw);
|
|
66571
|
-
if (!parsed.isValid()) return;
|
|
66572
|
-
return parsed.format("YYYY-MM-DD");
|
|
66573
|
-
}
|
|
66574
|
-
async function validateReinspectionDate(opts) {
|
|
66575
|
-
if (!opts.product_id_ || !opts.material_no_ && !opts.material_no_id_) return;
|
|
66576
|
-
const date = await getReinspectionDate({
|
|
66577
|
-
product_id_: opts.product_id_,
|
|
66578
|
-
material_no_: opts.material_no_,
|
|
66579
|
-
material_no_id_: opts.material_no_id_
|
|
66580
|
-
});
|
|
66581
|
-
if (!date) return;
|
|
66582
|
-
if (dayjs(date).isBefore(dayjs(), "day")) {
|
|
66583
|
-
throw new Error($t("sys.retestDateErrorTip"));
|
|
66584
|
-
}
|
|
66585
|
-
}
|
|
66586
|
-
async function getLotLockedReason(production_identification_id_) {
|
|
66587
|
-
const { data = {}, dict = {} } = await postApi(
|
|
66588
|
-
{
|
|
66589
|
-
modelCategory: "entity",
|
|
66590
|
-
modelKey: "em_production_identification_lock_record",
|
|
66591
|
-
bsKey: "biz_get_one_lock_record"
|
|
66592
|
-
},
|
|
66593
|
-
{},
|
|
66594
|
-
{
|
|
66595
|
-
production_identification_id_
|
|
66596
|
-
}
|
|
66597
|
-
);
|
|
66598
|
-
return $t("sys.lotLockedReason", {
|
|
66599
|
-
name: dict.lock_user_id_[data.lock_user_id_],
|
|
66600
|
-
reason: data.lock_reason_
|
|
66601
|
-
});
|
|
66602
|
-
}
|
|
66603
|
-
var Config_Fields = /* @__PURE__ */ ((Config_Fields2) => {
|
|
66604
|
-
Config_Fields2["materialCode"] = "materialCode";
|
|
66605
|
-
Config_Fields2["lot"] = "lot";
|
|
66606
|
-
Config_Fields2["qty"] = "qty";
|
|
66607
|
-
Config_Fields2["expiration"] = "expiration";
|
|
66608
|
-
Config_Fields2["deviceCode"] = "deviceCode";
|
|
66609
|
-
Config_Fields2["other"] = "other";
|
|
66610
|
-
return Config_Fields2;
|
|
66611
|
-
})(Config_Fields || {});
|
|
66612
|
-
const getApi = api.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey;
|
|
66613
|
-
async function getParseRuleInfo(params) {
|
|
66614
|
-
const res = await getApi(
|
|
66615
|
-
{
|
|
66616
|
-
bsKey: "rdoGetVersionById",
|
|
66617
|
-
modelKey: "em_barcode_parsing_rules",
|
|
66618
|
-
modelCategory: "entity"
|
|
66619
|
-
},
|
|
66620
|
-
params
|
|
66621
|
-
);
|
|
66622
|
-
return res.data;
|
|
66623
|
-
}
|
|
66624
|
-
function handleOldConfig(config) {
|
|
66625
|
-
if (config.list && !config.fieldList) {
|
|
66626
|
-
config.fieldList = config.list.map((type) => {
|
|
66627
|
-
return {
|
|
66628
|
-
type,
|
|
66629
|
-
key: type === Config_Fields.other ? uuid2(32) : type
|
|
66630
|
-
};
|
|
66631
|
-
});
|
|
66632
|
-
delete config.list;
|
|
66633
|
-
}
|
|
66634
|
-
config.fieldList.forEach((item) => {
|
|
66635
|
-
if (!item.key) {
|
|
66636
|
-
item.key = item.type === Config_Fields.other ? uuid2(32) : item.type;
|
|
66637
|
-
}
|
|
66638
|
-
});
|
|
66639
|
-
return config;
|
|
66640
|
-
}
|
|
66641
|
-
function getParseRuleValue(labelStr, labelRule) {
|
|
66642
|
-
if (!labelRule) {
|
|
66643
|
-
throw new Error("请传入解析规则");
|
|
66644
|
-
}
|
|
66645
|
-
const ruleObj = JSON.parse(labelRule);
|
|
66646
|
-
const ruleConfig = handleOldConfig(ruleObj);
|
|
66647
|
-
const { separator, nullSymbol, fieldList } = ruleConfig;
|
|
66648
|
-
const labelArr = labelStr.split(separator);
|
|
66649
|
-
return labelArr.reduce((obj, e, idx) => {
|
|
66650
|
-
const field = fieldList[idx];
|
|
66651
|
-
if (field) {
|
|
66652
|
-
let val = nullSymbol && e === nullSymbol ? null : e;
|
|
66653
|
-
if (val !== null) {
|
|
66654
|
-
switch (field.type) {
|
|
66655
|
-
case Config_Fields.qty:
|
|
66656
|
-
val = Number(val);
|
|
66657
|
-
break;
|
|
66658
|
-
case Config_Fields.expiration:
|
|
66659
|
-
val = dayjs(val, field.format).format("YYYY-MM-DD HH:mm:ss");
|
|
66660
|
-
break;
|
|
66661
|
-
}
|
|
66662
|
-
}
|
|
66663
|
-
obj[field.key] = val;
|
|
66664
|
-
}
|
|
66665
|
-
return obj;
|
|
66666
|
-
}, {});
|
|
66667
|
-
}
|
|
66668
|
-
async function getParseRuleConfig(id) {
|
|
66669
|
-
const res = await getParseRuleInfo({ id });
|
|
66670
|
-
if (res?.rules_) {
|
|
66671
|
-
const ruleObj = JSON.parse(res.rules_);
|
|
66672
|
-
const ruleConfig = handleOldConfig(ruleObj);
|
|
66673
|
-
return ruleConfig;
|
|
66674
|
-
}
|
|
66675
|
-
}
|
|
66676
|
-
function calcFillData(data, fillMapArr) {
|
|
66677
|
-
const obj = {};
|
|
66678
|
-
if (fillMapArr?.length) {
|
|
66679
|
-
fillMapArr.forEach((i2) => {
|
|
66680
|
-
const fromKey = i2.barcodeField;
|
|
66681
|
-
if (fromKey && fromKey in data) {
|
|
66682
|
-
const val = data[fromKey];
|
|
66683
|
-
i2.formFields?.forEach((key) => {
|
|
66684
|
-
const toKey2 = key.split(".")[1];
|
|
66685
|
-
obj[toKey2] = val;
|
|
66686
|
-
});
|
|
66687
|
-
}
|
|
66688
|
-
});
|
|
66689
|
-
}
|
|
66690
|
-
return obj;
|
|
66691
|
-
}
|
|
66692
66336
|
const NUMBER_FIELD_TYPES = /* @__PURE__ */ new Set([
|
|
66693
66337
|
FIELD_TYPE.INTEGER,
|
|
66694
66338
|
FIELD_TYPE.LONG,
|
|
@@ -67152,27 +66796,27 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
67152
66796
|
case "revo-grid":
|
|
67153
66797
|
return import(
|
|
67154
66798
|
/* webpackMode: "lazy" */
|
|
67155
|
-
"./revo-grid.entry-
|
|
66799
|
+
"./revo-grid.entry-BqAGRHgf.js"
|
|
67156
66800
|
).then(processMod, consoleError);
|
|
67157
66801
|
case "revogr-filter-panel":
|
|
67158
66802
|
return import(
|
|
67159
66803
|
/* webpackMode: "lazy" */
|
|
67160
|
-
"./revogr-filter-panel.entry-
|
|
66804
|
+
"./revogr-filter-panel.entry-DiC81RU-.js"
|
|
67161
66805
|
).then(processMod, consoleError);
|
|
67162
66806
|
case "revogr-attribution_7":
|
|
67163
66807
|
return import(
|
|
67164
66808
|
/* webpackMode: "lazy" */
|
|
67165
|
-
"./revogr-attribution_7.entry-
|
|
66809
|
+
"./revogr-attribution_7.entry-Dl-LcgkK.js"
|
|
67166
66810
|
).then(processMod, consoleError);
|
|
67167
66811
|
case "revogr-clipboard_3":
|
|
67168
66812
|
return import(
|
|
67169
66813
|
/* webpackMode: "lazy" */
|
|
67170
|
-
"./revogr-clipboard_3.entry-
|
|
66814
|
+
"./revogr-clipboard_3.entry-CT01IdhF.js"
|
|
67171
66815
|
).then(processMod, consoleError);
|
|
67172
66816
|
case "revogr-data_4":
|
|
67173
66817
|
return import(
|
|
67174
66818
|
/* webpackMode: "lazy" */
|
|
67175
|
-
"./revogr-data_4.entry-
|
|
66819
|
+
"./revogr-data_4.entry-fH5V7Zgk.js"
|
|
67176
66820
|
).then(processMod, consoleError);
|
|
67177
66821
|
}
|
|
67178
66822
|
}
|
|
@@ -77408,7 +77052,7 @@ function groupFixedTableRows(rows, options) {
|
|
|
77408
77052
|
return result;
|
|
77409
77053
|
}
|
|
77410
77054
|
export {
|
|
77411
|
-
|
|
77055
|
+
LabelPosition as $,
|
|
77412
77056
|
ParamModelTypeEnum as A,
|
|
77413
77057
|
BwipCodeType as B,
|
|
77414
77058
|
ComponentTypeEnum as C,
|
|
@@ -77426,320 +77070,306 @@ export {
|
|
|
77426
77070
|
Orientation as O,
|
|
77427
77071
|
PaginationFormat as P,
|
|
77428
77072
|
PaperWidgeValueType as Q,
|
|
77429
|
-
|
|
77073
|
+
onlineFormMasterModelTypeEnum as R,
|
|
77430
77074
|
SUB_TABLE_PANEL_TYPE_NAME as S,
|
|
77431
77075
|
TRACE_FIELD_TYPES as T,
|
|
77432
|
-
|
|
77433
|
-
|
|
77076
|
+
UniqueConstraintType as U,
|
|
77077
|
+
FieldDefaultValueTypeEnum as V,
|
|
77434
77078
|
WAREHOUSE_FIELD_TYPES as W,
|
|
77435
|
-
|
|
77436
|
-
|
|
77437
|
-
|
|
77438
|
-
|
|
77079
|
+
FormTypeEnum as X,
|
|
77080
|
+
mitt as Y,
|
|
77081
|
+
isDateObjectField as Z,
|
|
77082
|
+
PlatformEnum as _,
|
|
77439
77083
|
getProfile as a,
|
|
77440
|
-
|
|
77441
|
-
|
|
77442
|
-
|
|
77443
|
-
|
|
77444
|
-
|
|
77445
|
-
|
|
77446
|
-
|
|
77447
|
-
|
|
77448
|
-
|
|
77449
|
-
|
|
77450
|
-
|
|
77451
|
-
|
|
77452
|
-
|
|
77453
|
-
|
|
77454
|
-
|
|
77455
|
-
|
|
77456
|
-
|
|
77457
|
-
|
|
77458
|
-
|
|
77459
|
-
|
|
77460
|
-
|
|
77461
|
-
|
|
77462
|
-
|
|
77463
|
-
|
|
77464
|
-
|
|
77465
|
-
|
|
77466
|
-
|
|
77467
|
-
|
|
77468
|
-
|
|
77469
|
-
|
|
77470
|
-
|
|
77471
|
-
|
|
77472
|
-
|
|
77473
|
-
|
|
77474
|
-
|
|
77475
|
-
|
|
77476
|
-
|
|
77477
|
-
|
|
77478
|
-
|
|
77479
|
-
|
|
77480
|
-
|
|
77481
|
-
|
|
77482
|
-
|
|
77483
|
-
|
|
77484
|
-
|
|
77485
|
-
|
|
77486
|
-
|
|
77487
|
-
|
|
77488
|
-
|
|
77489
|
-
|
|
77490
|
-
|
|
77491
|
-
|
|
77492
|
-
|
|
77493
|
-
|
|
77494
|
-
|
|
77495
|
-
|
|
77496
|
-
|
|
77497
|
-
|
|
77498
|
-
|
|
77499
|
-
|
|
77500
|
-
|
|
77501
|
-
|
|
77502
|
-
|
|
77503
|
-
|
|
77084
|
+
getParseRuleInfo as a$,
|
|
77085
|
+
BooleanShowMode as a0,
|
|
77086
|
+
SignatureImageDirectionEnum as a1,
|
|
77087
|
+
FallbackSignTypeEnum as a2,
|
|
77088
|
+
SignatureNumberTypeEnum as a3,
|
|
77089
|
+
SignatureTimeTypeEnum as a4,
|
|
77090
|
+
SignShowTypeEnum as a5,
|
|
77091
|
+
SignatureTypeEnum as a6,
|
|
77092
|
+
_export_sfc as a7,
|
|
77093
|
+
normalizeFieldType as a8,
|
|
77094
|
+
PaperSizeMap as a9,
|
|
77095
|
+
getSubTableTypeByRefModelType as aA,
|
|
77096
|
+
getAllTableProfiles as aB,
|
|
77097
|
+
transformUtils as aC,
|
|
77098
|
+
EmptySymbol as aD,
|
|
77099
|
+
ASSIGNMENTSTRATEGY_ENUM as aE,
|
|
77100
|
+
Dependency_ENUM as aF,
|
|
77101
|
+
EntityModelCategoryEnum as aG,
|
|
77102
|
+
resolveLotDisplayLabel as aH,
|
|
77103
|
+
CheckDsTypeEnum as aI,
|
|
77104
|
+
DeviceLink as aJ,
|
|
77105
|
+
DeviceParamsTypeTitle as aK,
|
|
77106
|
+
AITooltips as aL,
|
|
77107
|
+
DenoiseMethodOptions as aM,
|
|
77108
|
+
BinarizeMethodOptions as aN,
|
|
77109
|
+
JoinModelTypeEum as aO,
|
|
77110
|
+
sqlUtils as aP,
|
|
77111
|
+
DateFormat as aQ,
|
|
77112
|
+
LOT_CONTAINER_ROLE as aR,
|
|
77113
|
+
buildLotSnListQuery as aS,
|
|
77114
|
+
renderUtils as aT,
|
|
77115
|
+
resolveLotRecordByValue as aU,
|
|
77116
|
+
materialCheck as aV,
|
|
77117
|
+
getLotLockedReason as aW,
|
|
77118
|
+
validateReinspectionDate as aX,
|
|
77119
|
+
buildMaterialLotListQuery as aY,
|
|
77120
|
+
ProductionIdentificationTypeEnum as aZ,
|
|
77121
|
+
BindCmpStyleEnum as a_,
|
|
77122
|
+
getFieldMain as aa,
|
|
77123
|
+
buildUUID as ab,
|
|
77124
|
+
FieldIconMap as ac,
|
|
77125
|
+
BigNumber as ad,
|
|
77126
|
+
FieldSysVarDefaultValueEnum as ae,
|
|
77127
|
+
CellWidgetViewState as af,
|
|
77128
|
+
DiagonalDirection as ag,
|
|
77129
|
+
WidgetImageSizeMode as ah,
|
|
77130
|
+
LineDirection as ai,
|
|
77131
|
+
TimeDiffFormat as aj,
|
|
77132
|
+
DiagonalVertex as ak,
|
|
77133
|
+
resolveDiagonalVertex as al,
|
|
77134
|
+
getThemeColorByTableType as am,
|
|
77135
|
+
ViewTypeEnum as an,
|
|
77136
|
+
isDynamicSubTablePanelType as ao,
|
|
77137
|
+
isFixedSubTablePanelType as ap,
|
|
77138
|
+
ExpressionModeEnum as aq,
|
|
77139
|
+
ReturnTypeEnum as ar,
|
|
77140
|
+
ExpressionTabEnum as as,
|
|
77141
|
+
RangeValidateMode as at,
|
|
77142
|
+
RangeCompareOp as au,
|
|
77143
|
+
DecimalDisplayMode as av,
|
|
77144
|
+
ImageDisplayModeEnum as aw,
|
|
77145
|
+
FormDesignEnum as ax,
|
|
77146
|
+
BASIC_FIELD_TYPES as ay,
|
|
77147
|
+
getExclusiveBusinessTypeTokens as az,
|
|
77504
77148
|
isBusinessSubTableProfile as b,
|
|
77505
|
-
|
|
77506
|
-
|
|
77507
|
-
|
|
77508
|
-
|
|
77509
|
-
|
|
77510
|
-
|
|
77511
|
-
|
|
77512
|
-
|
|
77513
|
-
|
|
77514
|
-
|
|
77515
|
-
|
|
77516
|
-
|
|
77517
|
-
|
|
77518
|
-
|
|
77519
|
-
|
|
77520
|
-
|
|
77521
|
-
|
|
77522
|
-
|
|
77523
|
-
|
|
77524
|
-
|
|
77525
|
-
|
|
77526
|
-
|
|
77527
|
-
|
|
77528
|
-
|
|
77529
|
-
|
|
77530
|
-
|
|
77531
|
-
|
|
77532
|
-
|
|
77533
|
-
|
|
77534
|
-
|
|
77535
|
-
|
|
77536
|
-
|
|
77537
|
-
|
|
77538
|
-
|
|
77539
|
-
|
|
77540
|
-
|
|
77541
|
-
|
|
77542
|
-
|
|
77543
|
-
|
|
77544
|
-
|
|
77545
|
-
|
|
77546
|
-
|
|
77547
|
-
|
|
77548
|
-
|
|
77549
|
-
|
|
77550
|
-
|
|
77551
|
-
|
|
77552
|
-
|
|
77553
|
-
|
|
77554
|
-
|
|
77555
|
-
|
|
77556
|
-
|
|
77557
|
-
|
|
77558
|
-
|
|
77559
|
-
|
|
77560
|
-
|
|
77561
|
-
|
|
77562
|
-
|
|
77563
|
-
|
|
77564
|
-
|
|
77565
|
-
|
|
77566
|
-
|
|
77567
|
-
|
|
77568
|
-
|
|
77149
|
+
fetchMedProCheckDsData as b$,
|
|
77150
|
+
getParseRuleValue as b0,
|
|
77151
|
+
normalizeRefLoaderResult as b1,
|
|
77152
|
+
STOCKTAKE_DIMENSION as b2,
|
|
77153
|
+
F$8 as b3,
|
|
77154
|
+
resolveStocktakeSelectApi as b4,
|
|
77155
|
+
RenderModeEnum as b5,
|
|
77156
|
+
normalizeProductionContainerOptions as b6,
|
|
77157
|
+
buildProductionLotListQuery as b7,
|
|
77158
|
+
refUtils as b8,
|
|
77159
|
+
buildInspectionLotListQuery as b9,
|
|
77160
|
+
CHECK_TABLE_MEDPRO_PROTOCOL_KEY as bA,
|
|
77161
|
+
CodeRunner as bB,
|
|
77162
|
+
Config_Fields as bC,
|
|
77163
|
+
ControlStatusEnum as bD,
|
|
77164
|
+
DEVICE_SEARCH_API as bE,
|
|
77165
|
+
DeviceStatus as bF,
|
|
77166
|
+
EBR_PROVIDE_ENUM as bG,
|
|
77167
|
+
EFieldBizTypeEnum as bH,
|
|
77168
|
+
MAX_FRONT_ROW_KEY_LENGTH as bI,
|
|
77169
|
+
MobileFillTypeEnum as bJ,
|
|
77170
|
+
OfficeTypeEnum as bK,
|
|
77171
|
+
PosEnum as bL,
|
|
77172
|
+
RUNTIME_COLUMN_ROW_KEY as bM,
|
|
77173
|
+
SummaryApproveHisTypeEnum as bN,
|
|
77174
|
+
applyCheckDsDataToRuntime as bO,
|
|
77175
|
+
applyMedProCheckDsDataToRuntime as bP,
|
|
77176
|
+
bindRuntimeTableColumns as bQ,
|
|
77177
|
+
buildDeviceBaseQuery as bR,
|
|
77178
|
+
calcFillData as bS,
|
|
77179
|
+
calcUtils as bT,
|
|
77180
|
+
decodeTableCellRowKey as bU,
|
|
77181
|
+
encodeTableCellRowKey as bV,
|
|
77182
|
+
ensureFrontRowKey as bW,
|
|
77183
|
+
ensureTableRowKeys as bX,
|
|
77184
|
+
extractKeywordFromQueryData as bY,
|
|
77185
|
+
fetchCheckDsDataForTable as bZ,
|
|
77186
|
+
fetchCustomCheckDsData as b_,
|
|
77187
|
+
buildDeviceFilterQuery as ba,
|
|
77188
|
+
DEVICE_GROUP_QUERY_KEY as bb,
|
|
77189
|
+
getRowId as bc,
|
|
77190
|
+
findRuntimeTableRow as bd,
|
|
77191
|
+
findRuntimeParentRow as be,
|
|
77192
|
+
useOnlineFormTransformField2Component as bf,
|
|
77193
|
+
FormulaRuleFieldKeyEnum as bg,
|
|
77194
|
+
formulaRuleFieldDict as bh,
|
|
77195
|
+
resolveDesignPanelFeatures as bi,
|
|
77196
|
+
BIZ_TABLE_CONFIG_SEED_TYPES as bj,
|
|
77197
|
+
STOCKTAKE_DIMENSION_OPTIONS as bk,
|
|
77198
|
+
isRepeatingSubTablePanelType as bl,
|
|
77199
|
+
uuid2 as bm,
|
|
77200
|
+
fetchHistoryConsume as bn,
|
|
77201
|
+
isBomGranted as bo,
|
|
77202
|
+
parseFrontConfig as bp,
|
|
77203
|
+
baseDataUtils as bq,
|
|
77204
|
+
normalizeToArray as br,
|
|
77205
|
+
safeParseArray as bs,
|
|
77206
|
+
BpmnNodeTypeEnum as bt,
|
|
77207
|
+
mergeByMultiKey as bu,
|
|
77208
|
+
evaluateInspectionDecisionRule as bv,
|
|
77209
|
+
useNocodeEmitter as bw,
|
|
77210
|
+
commonUtils as bx,
|
|
77211
|
+
BpmnSignatureTypeEnum as by,
|
|
77212
|
+
ButtonTypeEnum as bz,
|
|
77569
77213
|
getProfileByTableType as c,
|
|
77570
|
-
|
|
77571
|
-
|
|
77572
|
-
|
|
77573
|
-
|
|
77574
|
-
|
|
77575
|
-
|
|
77576
|
-
|
|
77577
|
-
|
|
77578
|
-
|
|
77579
|
-
|
|
77580
|
-
|
|
77581
|
-
|
|
77582
|
-
|
|
77583
|
-
|
|
77584
|
-
|
|
77585
|
-
|
|
77586
|
-
|
|
77587
|
-
|
|
77588
|
-
|
|
77589
|
-
|
|
77590
|
-
|
|
77591
|
-
|
|
77592
|
-
|
|
77593
|
-
|
|
77594
|
-
|
|
77595
|
-
|
|
77596
|
-
F$
|
|
77597
|
-
|
|
77598
|
-
|
|
77599
|
-
F
|
|
77600
|
-
|
|
77601
|
-
|
|
77602
|
-
|
|
77603
|
-
|
|
77604
|
-
|
|
77605
|
-
|
|
77606
|
-
|
|
77607
|
-
|
|
77608
|
-
|
|
77609
|
-
|
|
77610
|
-
|
|
77611
|
-
|
|
77612
|
-
|
|
77613
|
-
|
|
77614
|
-
|
|
77615
|
-
|
|
77616
|
-
|
|
77617
|
-
|
|
77618
|
-
|
|
77619
|
-
|
|
77620
|
-
|
|
77621
|
-
|
|
77622
|
-
|
|
77623
|
-
|
|
77624
|
-
|
|
77625
|
-
|
|
77626
|
-
|
|
77627
|
-
|
|
77628
|
-
|
|
77629
|
-
|
|
77630
|
-
|
|
77631
|
-
|
|
77632
|
-
|
|
77633
|
-
|
|
77214
|
+
PRODUCT_QUICK_SEARCH_FIELDS as c$,
|
|
77215
|
+
findRuntimeTableCell as c0,
|
|
77216
|
+
getCheckTableSnapshotKey as c1,
|
|
77217
|
+
getParseRuleConfig as c2,
|
|
77218
|
+
getReinspectionDate as c3,
|
|
77219
|
+
getRenderedRuntimeTableCell as c4,
|
|
77220
|
+
handleOldConfig as c5,
|
|
77221
|
+
hasAnyCheckTableSnapshot as c6,
|
|
77222
|
+
hasByTableCheckTableSnapshot as c7,
|
|
77223
|
+
hasSharedCheckTableSnapshot as c8,
|
|
77224
|
+
isMedProSuite as c9,
|
|
77225
|
+
runRowHandler as cA,
|
|
77226
|
+
F$a as cB,
|
|
77227
|
+
F$9 as cC,
|
|
77228
|
+
FILL_FROM_SOURCE_PRODUCT_OPTION as cD,
|
|
77229
|
+
FILL_FROM_TARGET_MATERIAL_NO_OPTION as cE,
|
|
77230
|
+
FILL_FROM_INVENTORY_OPTION$2 as cF,
|
|
77231
|
+
FILL_FROM_PART_OPTION as cG,
|
|
77232
|
+
FILL_FROM_INVENTORY_OPTION$3 as cH,
|
|
77233
|
+
TABLE_TYPE$b as cI,
|
|
77234
|
+
FILL_FROM_INVENTORY_OPTION$1 as cJ,
|
|
77235
|
+
INVENTORY_BASE_FIELDS as cK,
|
|
77236
|
+
resolveGroupByWarehouse as cL,
|
|
77237
|
+
AUTO_LOAD_READONLY_SELECT_FIELDS as cM,
|
|
77238
|
+
buildFillFromInventoryOption as cN,
|
|
77239
|
+
resolveStocktakeInventoryApi as cO,
|
|
77240
|
+
F$5 as cP,
|
|
77241
|
+
FILL_FROM_INVENTORY_OPTION as cQ,
|
|
77242
|
+
composeProductionLotListQuery as cR,
|
|
77243
|
+
F as cS,
|
|
77244
|
+
isProductManuallyEditable as cT,
|
|
77245
|
+
applyFillFromMfgOrderOption as cU,
|
|
77246
|
+
applyFillFromOption as cV,
|
|
77247
|
+
applyFillFromProductOption as cW,
|
|
77248
|
+
mergeQueryFilters as cX,
|
|
77249
|
+
composeMaterialLotListQuery as cY,
|
|
77250
|
+
MATERIAL_CONTAINER_ID as cZ,
|
|
77251
|
+
F$c as c_,
|
|
77252
|
+
isTableRowKeyMatch as ca,
|
|
77253
|
+
jsonSchemaUtils as cb,
|
|
77254
|
+
judgeUnique as cc,
|
|
77255
|
+
migrateDiagonalDirectionToVertex as cd,
|
|
77256
|
+
requestMedProCheckDsData as ce,
|
|
77257
|
+
requestNonMedProCheckDsData as cf,
|
|
77258
|
+
splitRuntimeDataPath as cg,
|
|
77259
|
+
stockCheck as ch,
|
|
77260
|
+
useOnlineFormActionButton as ci,
|
|
77261
|
+
getFieldPlaceholder as cj,
|
|
77262
|
+
FRONT_ROW_KEY as ck,
|
|
77263
|
+
resetTableRowIdentity as cl,
|
|
77264
|
+
q as cm,
|
|
77265
|
+
QUICK_FILL_ALLOWED_FIELDS as cn,
|
|
77266
|
+
groupFixedTableRows as co,
|
|
77267
|
+
processQuickFillRows as cp,
|
|
77268
|
+
getIsGroupEmpty as cq,
|
|
77269
|
+
getAugmentedNamespace as cr,
|
|
77270
|
+
CardControlEnum as cs,
|
|
77271
|
+
EntityModelTypeEnum as ct,
|
|
77272
|
+
RecordNoGenerateEnum as cu,
|
|
77273
|
+
TagTypeEnum as cv,
|
|
77274
|
+
F$6 as cw,
|
|
77275
|
+
SCAN_ROW_CONTENT_FIELDS as cx,
|
|
77276
|
+
F$3 as cy,
|
|
77277
|
+
F$7 as cz,
|
|
77634
77278
|
getBusinessProfileByRefModelType as d,
|
|
77635
|
-
|
|
77636
|
-
|
|
77637
|
-
|
|
77638
|
-
|
|
77639
|
-
|
|
77640
|
-
|
|
77641
|
-
|
|
77642
|
-
|
|
77643
|
-
|
|
77644
|
-
|
|
77645
|
-
|
|
77646
|
-
|
|
77647
|
-
|
|
77648
|
-
|
|
77649
|
-
|
|
77650
|
-
|
|
77651
|
-
|
|
77652
|
-
|
|
77653
|
-
|
|
77654
|
-
|
|
77655
|
-
|
|
77656
|
-
|
|
77657
|
-
|
|
77658
|
-
|
|
77659
|
-
|
|
77660
|
-
|
|
77661
|
-
|
|
77662
|
-
|
|
77663
|
-
|
|
77664
|
-
|
|
77665
|
-
|
|
77666
|
-
|
|
77667
|
-
|
|
77668
|
-
|
|
77669
|
-
|
|
77670
|
-
|
|
77671
|
-
|
|
77672
|
-
|
|
77673
|
-
|
|
77674
|
-
|
|
77675
|
-
|
|
77676
|
-
|
|
77677
|
-
|
|
77678
|
-
|
|
77679
|
-
|
|
77680
|
-
|
|
77681
|
-
|
|
77682
|
-
|
|
77683
|
-
|
|
77684
|
-
|
|
77685
|
-
|
|
77686
|
-
|
|
77687
|
-
|
|
77688
|
-
|
|
77689
|
-
|
|
77690
|
-
|
|
77691
|
-
|
|
77692
|
-
|
|
77693
|
-
|
|
77694
|
-
|
|
77695
|
-
|
|
77696
|
-
|
|
77697
|
-
|
|
77279
|
+
TMP_SELECTION_BG_CLASS as d$,
|
|
77280
|
+
PRODUCT_QUICK_SEARCH_EXP as d0,
|
|
77281
|
+
isProductManuallyEditable$1 as d1,
|
|
77282
|
+
applyFillFromMaterialNoOption as d2,
|
|
77283
|
+
applyFillFromProductOption$1 as d3,
|
|
77284
|
+
F$b as d4,
|
|
77285
|
+
FILL_FROM_INVENTORY_OPTION$4 as d5,
|
|
77286
|
+
registerInstance as d6,
|
|
77287
|
+
createEvent as d7,
|
|
77288
|
+
getColumnByProp as d8,
|
|
77289
|
+
timeout as d9,
|
|
77290
|
+
getSourceItem as dA,
|
|
77291
|
+
getSourceItemVirtualIndexByProp as dB,
|
|
77292
|
+
getColumnType as dC,
|
|
77293
|
+
setSourceByPhysicalIndex as dD,
|
|
77294
|
+
setSourceByVirtualIndex as dE,
|
|
77295
|
+
SelectionStore as dF,
|
|
77296
|
+
cropCellToMax as dG,
|
|
77297
|
+
nextCell as dH,
|
|
77298
|
+
isRowType as dI,
|
|
77299
|
+
ViewportStore as dJ,
|
|
77300
|
+
AndOrButton as dK,
|
|
77301
|
+
ReorderButton as dL,
|
|
77302
|
+
TrashButton as dM,
|
|
77303
|
+
isFilterBtn as dN,
|
|
77304
|
+
ColumnService as dO,
|
|
77305
|
+
MOBILE_CLASS as dP,
|
|
77306
|
+
SELECTION_BORDER_CLASS as dQ,
|
|
77307
|
+
getCellData as dR,
|
|
77308
|
+
getCellEditor as dS,
|
|
77309
|
+
getRange as dT,
|
|
77310
|
+
isRangeSingleCell as dU,
|
|
77311
|
+
codesLetter as dV,
|
|
77312
|
+
calculateRowHeaderSize as dW,
|
|
77313
|
+
ROW_HEADER_TYPE as dX,
|
|
77314
|
+
getScrollbarSize as dY,
|
|
77315
|
+
FOCUS_CLASS as dZ,
|
|
77316
|
+
CELL_HANDLER_CLASS as d_,
|
|
77317
|
+
getVisibleSourceItem as da,
|
|
77318
|
+
getColumns as db,
|
|
77319
|
+
rowTypes as dc,
|
|
77320
|
+
GroupingRowPlugin as dd,
|
|
77321
|
+
StretchColumn as de,
|
|
77322
|
+
isStretchPlugin as df,
|
|
77323
|
+
AutoSizeColumnPlugin as dg,
|
|
77324
|
+
FilterPlugin as dh,
|
|
77325
|
+
ExportFilePlugin as di,
|
|
77326
|
+
SortingPlugin as dj,
|
|
77327
|
+
ColumnMovePlugin as dk,
|
|
77328
|
+
ThemeService as dl,
|
|
77329
|
+
h as dm,
|
|
77330
|
+
Host as dn,
|
|
77331
|
+
getElement as dp,
|
|
77332
|
+
BasePlugin as dq,
|
|
77333
|
+
reduce as dr,
|
|
77334
|
+
columnTypes as ds,
|
|
77335
|
+
debounce$1 as dt,
|
|
77336
|
+
RESIZE_INTERVAL as du,
|
|
77337
|
+
DimensionStore as dv,
|
|
77338
|
+
gatherTrimmedItems as dw,
|
|
77339
|
+
getColumnSizes as dx,
|
|
77340
|
+
getItemByIndex as dy,
|
|
77341
|
+
DataStore as dz,
|
|
77698
77342
|
expandAutofillTemplates as e,
|
|
77699
|
-
|
|
77700
|
-
|
|
77701
|
-
|
|
77702
|
-
|
|
77703
|
-
|
|
77704
|
-
|
|
77705
|
-
|
|
77706
|
-
|
|
77707
|
-
|
|
77708
|
-
|
|
77709
|
-
|
|
77710
|
-
|
|
77711
|
-
|
|
77712
|
-
|
|
77713
|
-
|
|
77714
|
-
|
|
77715
|
-
|
|
77716
|
-
|
|
77717
|
-
|
|
77718
|
-
|
|
77719
|
-
|
|
77720
|
-
|
|
77721
|
-
|
|
77722
|
-
|
|
77723
|
-
|
|
77724
|
-
|
|
77725
|
-
|
|
77726
|
-
|
|
77727
|
-
|
|
77728
|
-
|
|
77729
|
-
GROUP_EXPAND_BTN as em,
|
|
77730
|
-
DATA_ROW as en,
|
|
77731
|
-
isGroupingColumn as eo,
|
|
77732
|
-
GROUP_COLUMN_PROP as ep,
|
|
77733
|
-
getCellRaw as eq,
|
|
77734
|
-
DATA_COL as er,
|
|
77735
|
-
CELL_CLASS as es,
|
|
77736
|
-
Build as et,
|
|
77737
|
-
isRowDragService as eu,
|
|
77738
|
-
DRAG_ICON_CLASS as ev,
|
|
77739
|
-
DRAGGABLE_CLASS as ew,
|
|
77740
|
-
getCellDataParsed as ex,
|
|
77741
|
-
GROUP_EXPAND_EVENT as ey,
|
|
77742
|
-
isGrouping as ez,
|
|
77343
|
+
getItemByPosition as e0,
|
|
77344
|
+
EDIT_INPUT_WR as e1,
|
|
77345
|
+
keyValues as e2,
|
|
77346
|
+
isObject as e3,
|
|
77347
|
+
DRAGG_TEXT as e4,
|
|
77348
|
+
PSEUDO_GROUP_ITEM as e5,
|
|
77349
|
+
GROUP_EXPANDED as e6,
|
|
77350
|
+
GROUP_DEPTH as e7,
|
|
77351
|
+
GROUP_EXPAND_BTN as e8,
|
|
77352
|
+
DATA_ROW as e9,
|
|
77353
|
+
isGroupingColumn as ea,
|
|
77354
|
+
GROUP_COLUMN_PROP as eb,
|
|
77355
|
+
getCellRaw as ec,
|
|
77356
|
+
DATA_COL as ed,
|
|
77357
|
+
CELL_CLASS as ee,
|
|
77358
|
+
Build as ef,
|
|
77359
|
+
isRowDragService as eg,
|
|
77360
|
+
DRAG_ICON_CLASS as eh,
|
|
77361
|
+
DRAGGABLE_CLASS as ei,
|
|
77362
|
+
getCellDataParsed as ej,
|
|
77363
|
+
GROUP_EXPAND_EVENT as ek,
|
|
77364
|
+
isGrouping as el,
|
|
77365
|
+
HEADER_ROW_CLASS as em,
|
|
77366
|
+
HEADER_ACTUAL_ROW_CLASS as en,
|
|
77367
|
+
ROW_FOCUSED_CLASS as eo,
|
|
77368
|
+
HEADER_SORTABLE_CLASS as ep,
|
|
77369
|
+
MIN_COL_SIZE as eq,
|
|
77370
|
+
FilterButton as er,
|
|
77371
|
+
HeaderCellRenderer as es,
|
|
77372
|
+
HEADER_CLASS as et,
|
|
77743
77373
|
SubTableType as f,
|
|
77744
77374
|
getAllDataProfiles as g,
|
|
77745
77375
|
getAllBusinessRefModelTypes as h,
|