@gct-paas/excel 0.1.19 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{VueVideoPlayer-Bt1Le9qP.js → VueVideoPlayer-DePpm38H.js} +2 -2
- package/dist/{agg-design-B_5evAJ0.js → agg-design-hreKYp5a.js} +1 -1
- package/dist/{agg-props-C62Ecenu.js → agg-props-CCDh2o6E.js} +1 -1
- package/dist/{agg-style-Q0xSL8Ye.js → agg-style-Bh8vdJvs.js} +1 -1
- package/dist/{align-editor-D_LtYlh3.js → align-editor-DpDuDOMr.js} +1 -1
- package/dist/{attach-fields-editor-3v3VNOfe.js → attach-fields-editor-BeGxW6de.js} +2 -2
- package/dist/{barcode-design-lusKmMnv.js → barcode-design-CFVTZNAy.js} +2 -2
- package/dist/base/index.es.js +6 -6
- package/dist/{base-font-editor-DmasOst9.js → base-font-editor-laOkjBe1.js} +2 -2
- package/dist/{boolean-design-BqGJVhKn.js → boolean-design-DIlM9Nrt.js} +2 -2
- package/dist/{boolean-props-DS7J4GHS.js → boolean-props-CGuFs72-.js} +3 -3
- package/dist/{boolean-style-C9FslVV7.js → boolean-style-BUz6sBUN.js} +4 -4
- package/dist/{cell-upload-BFw5Yg_j.js → cell-upload-Dw3t7ZKJ.js} +2 -2
- package/dist/{date-range-editor-PmJBHc8i.js → date-range-editor-rXaru-8n.js} +2 -2
- package/dist/{date-time-design-DQ_Z-xUx.js → date-time-design-HfjWK3SA.js} +1 -1
- package/dist/{date-time-props-DfZoJukN.js → date-time-props-C_cG-6wI.js} +3 -3
- package/dist/{date-time-style-Doye-MHk.js → date-time-style-BeCDP5TE.js} +1 -1
- package/dist/{decimal-design-Bg-tdrtL.js → decimal-design-DzLpjX9N.js} +1 -1
- package/dist/{decimal-display-mode-D_K6_XX1.js → decimal-display-mode-BhD1cOOe.js} +2 -2
- package/dist/{decimal-props-4QveEdf3.js → decimal-props-C6f22071.js} +4 -4
- package/dist/{decimal-style-B-n8SfAy.js → decimal-style-XN3rLM2j.js} +1 -1
- package/dist/{default-value-editor.vue_vue_type_script_setup_true_name_default-value-editor_lang-B3GvGAje.js → default-value-editor.vue_vue_type_script_setup_true_name_default-value-editor_lang-CJC4kBNh.js} +2 -2
- package/dist/{diagonal-design-B_l3lV5s.js → diagonal-design-Dh0qhgSq.js} +2 -2
- package/dist/{double-design-BaWZXLjK.js → double-design-XHHlqmEp.js} +1 -1
- package/dist/{double-props-sDsBpAER.js → double-props-Cvi36aBN.js} +4 -4
- package/dist/{double-style--oSjQw07.js → double-style-Dkoth54S.js} +1 -1
- package/dist/{dynamic-table-action-zLjamAaN.js → dynamic-table-action-mGrBO_bn.js} +100 -271
- package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_94e9d614_lang-UooIxEeL.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-OPdk2I5p.js} +321 -105
- package/dist/{edit.utils-CXmmCnxE-BrwRVXLT.js → edit.utils-CXmmCnxE-DeDBtyJd.js} +1 -1
- package/dist/{enum-design-BgVuHvvu.js → enum-design-CAOAFdI6.js} +2 -2
- package/dist/{enum-props-DYN6LsLg.js → enum-props-CBN-AvBS.js} +4 -4
- package/dist/{enum-style-D56_-gMw.js → enum-style-cOiK44Ae.js} +3 -3
- package/dist/excel.css +570 -241
- package/dist/{exceljs.min-DQkwXbni.js → exceljs.min-pnja99MZ.js} +2 -2
- package/dist/{expression-design-CIMwIArR.js → expression-design-CqgcK8eO.js} +1 -1
- package/dist/{expression-props--l3LwKAM.js → expression-props-wXQOIrMY.js} +1 -1
- package/dist/{expression-style-CjM5oro9.js → expression-style-BzavnOux.js} +1 -1
- package/dist/{file-design-BYcXA55B.js → file-design-BSQknhnY.js} +1 -1
- package/dist/{file-props-DvsQZUcL.js → file-props-CwiuBVHW.js} +2 -2
- package/dist/{file-style-BiWmCsMZ.js → file-style-CG4a3THb.js} +1 -1
- package/dist/{font-editor-BaRVmXey.js → font-editor--CgwL-wF.js} +3 -3
- package/dist/{form-annotation-controller-Zw6OoPLe.js → form-annotation-controller-DDDyHAwe.js} +2 -2
- package/dist/{image-design-Dr_w89Hq.js → image-design-CwPjfDxf.js} +2 -2
- package/dist/{image-design-Bad-BXel.js → image-design-D1D0SN5W.js} +2 -2
- package/dist/{image-props-4lKEAwDq.js → image-props-C4E9gMsG.js} +1 -1
- package/dist/{image-style-LoHD1zvr.js → image-style-CIb1mi13.js} +1 -1
- package/dist/{index-CEufXc_2.js → index-0mxMA4vZ.js} +1 -1
- package/dist/{index-CqjhgxKH.js → index-A2MbCZtS.js} +9 -3
- package/dist/{index-pPTh0-mL.js → index-B2ZNkbGm.js} +1 -1
- package/dist/{index-ByXwQO9g.js → index-B2tFXR--.js} +2 -2
- package/dist/{index-CcLTIQGc.js → index-B7DDYlzm.js} +1 -1
- package/dist/{index-B3YoA1vo.js → index-BAlLZmfu.js} +1 -1
- package/dist/{index-Dk-CUvB9.js → index-BG_CEaW0.js} +1319 -890
- package/dist/{index-DDnUeBCP.js → index-BJYSmTeW.js} +1 -1
- package/dist/{index-C7KdVTwU.js → index-BKoXo3Ha.js} +1 -1
- package/dist/{index-BsUkUBZV.js → index-BSHUFede.js} +1 -1
- package/dist/{index-Dq72GFzs.js → index-Bi4hE4Ye.js} +2 -2
- package/dist/{index-DRYxbbtG.js → index-BneV2tbp.js} +1 -1
- package/dist/{index-CH--dgZ4.js → index-ByTKu8n6.js} +1 -1
- package/dist/{index-BZYuG4zS.js → index-CGSTq7zN.js} +1 -1
- package/dist/{index-D4Yb4Urx.js → index-CIl6oWcB.js} +1 -1
- package/dist/{index-D9CHdykS.js → index-CKqLoN9r.js} +1 -1
- package/dist/{index-Bm6Hdoud.js → index-CWpratsK.js} +7 -6
- package/dist/{index--Bxx_VqV.js → index-CcmNFTia.js} +2 -2
- package/dist/{index-3qfB5NN-.js → index-CeMBvNee.js} +1 -1
- package/dist/{index-B_VejD7m.js → index-Cgka0WmQ.js} +1 -1
- package/dist/{index-B9IMST50.js → index-D0XkCn_x.js} +1 -1
- package/dist/{index-B-2N8GeG.js → index-D0n65ya-.js} +1 -1
- package/dist/{index-Ce0SltjH.js → index-D9tUJAeF.js} +1 -1
- package/dist/{index-D-mFMP7t.js → index-DLoQlQk6.js} +2 -2
- package/dist/{index-Vx5npC-J.js → index-DOj318_B.js} +2 -2
- package/dist/{index-BSfbsA-W.js → index-Dl2FIifp.js} +1 -1
- package/dist/{index-COiTpNXf.js → index-Drf0Arr4.js} +1 -1
- package/dist/{index-DpPrrfLV.js → index-HHF5iK-6.js} +5 -1
- package/dist/{index-Bki98NXv.js → index-Hg59RKKE.js} +1 -1
- package/dist/{index-CP099vf_.js → index-PMDIMwwL.js} +1 -1
- package/dist/{index-CQ7Hcly4.js → index-PWmkKVZV.js} +1 -1
- package/dist/{index-C6mtZJIQ.js → index-UUDS4nmS.js} +1 -1
- package/dist/{index-Bsjegt_0.js → index-ZrNXSw4w.js} +1 -1
- package/dist/index.es.js +44 -44
- package/dist/{integer-design-C2EkL0hc.js → integer-design-Cy9c0fzI.js} +1 -1
- package/dist/{integer-props-Cs-CvjQS.js → integer-props-DFDOIb2a.js} +4 -4
- package/dist/{integer-style-BtAfQCAn.js → integer-style-CfIX5ReH.js} +1 -1
- package/dist/{mb-render-CsWNoQnS.js → mb-render-D_uumPQr.js} +1 -1
- package/dist/{number-input-ex-eza87s5O.js → number-input-ex-CWci0pCj.js} +1 -1
- package/dist/{org-props-BJ6FKaVj.js → org-props-B5dk289u.js} +2 -2
- package/dist/{org-style-LRy5QsV5.js → org-style-BoSDPuw9.js} +1 -1
- package/dist/{pagination-design-sA-kbILI.js → pagination-design-Ci4wxUIk.js} +2 -2
- package/dist/paper-widget-design-BilYU9rh.js +4 -0
- package/dist/{qrcode-design-BsWJrsvD.js → qrcode-design-CJ9R5DIn.js} +1 -1
- package/dist/ref-autofill-editor-B4KDvHhR.js +2334 -0
- package/dist/{ref-props-BInJu7PN.js → ref-props-CwDGepT3.js} +17 -9
- package/dist/{ref-style-Dgc_9tko.js → ref-style-B35CsOQO.js} +1 -1
- package/dist/{regex-editor-C09XpMhm.js → regex-editor-CIVvr_Lx.js} +2 -2
- package/dist/{revo-grid.entry-BIm5A5wM.js → revo-grid.entry-DeWzC35s.js} +1 -1
- package/dist/{revogr-attribution_7.entry-B06XF5B_.js → revogr-attribution_7.entry-BJZ-twfj.js} +3 -3
- package/dist/{revogr-clipboard_3.entry-C8dVJYtR.js → revogr-clipboard_3.entry-DkgRA8qw.js} +2 -2
- package/dist/{revogr-data_4.entry-Dgp6vYqe.js → revogr-data_4.entry-BZLzvcbo.js} +2 -2
- package/dist/{revogr-filter-panel.entry-xo_juIUc.js → revogr-filter-panel.entry-zGvhshno.js} +1 -1
- package/dist/{select-render-type-editor.vue_vue_type_script_setup_true_lang-vIUGBOWr.js → select-render-type-editor.vue_vue_type_script_setup_true_lang-Asn5-ZRz.js} +2 -2
- package/dist/{serialnumber-design-mWcys6hI.js → serialnumber-design-CYFU5TVt.js} +1 -1
- package/dist/shared/index.es.js +14 -14
- package/dist/{signature-design-Dl-Lv5Z5.js → signature-design-Cwi0cZOI.js} +1 -1
- package/dist/{signature-props-DSzpO-_r.js → signature-props-cQRB8U8x.js} +3 -3
- package/dist/{signature-style-Bk34vOsk.js → signature-style-C90NsLxg.js} +1 -1
- package/dist/{single-field-drop-CiPUMT9B.js → single-field-drop-BFhQs-3z.js} +2 -2
- package/dist/{size-editor-B5aunbUM.js → size-editor-Dx3y_otg.js} +1 -1
- package/dist/src/nocode-base/src/components/document-quick-fill/fixed-quick-fill-modal.vue.d.ts +5 -1
- package/dist/src/nocode-base/src/components/document-quick-fill/quick-fill.util.d.ts +11 -6
- package/dist/src/nocode-base/src/components/document-sub-table-action/fixed-table-action.vue.d.ts +4 -0
- package/dist/src/nocode-base/src/types/fields/i-select.d.ts +4 -0
- package/dist/src/nocode-base/src/types/fields/i-trace.d.ts +7 -0
- package/dist/src/online-form/src/views/__cell_widgets__/common/display-fields-editor/display-fields-editor.vue.d.ts +15 -0
- package/dist/src/online-form/src/views/__cell_widgets__/common/display-fields-editor/display-fields.util.d.ts +11 -0
- package/dist/src/online-form/src/views/__cell_widgets__/common/display-fields-editor/index.d.ts +3 -0
- package/dist/src/online-form/src/views/__cell_widgets__/common/quick-search-editor/index.d.ts +3 -0
- package/dist/src/online-form/src/views/__cell_widgets__/common/quick-search-editor/quick-search-editor.vue.d.ts +15 -0
- package/dist/src/online-form/src/views/__cell_widgets__/common/quick-search-editor/quick-search.util.d.ts +14 -0
- package/dist/src/online-form/src/views/designer/modules/panel/comps/quick-fill-config.vue.d.ts +1 -0
- package/dist/src/online-form/src/views/render/__components__/_field_/_base_/common-select.util.d.ts +47 -0
- package/dist/src/shared/components/field-transfer/components/field-transfer-modal.vue.d.ts +30 -0
- package/dist/src/shared/components/field-transfer/components/modal-wrapper.vue.d.ts +65 -0
- package/dist/src/shared/components/field-transfer/hooks/useModelField.d.ts +169 -0
- package/dist/src/shared/components/field-transfer/hooks/useTreeData.d.ts +139 -0
- package/dist/src/shared/components/field-transfer/index.d.ts +21 -0
- package/dist/src/shared/components/field-transfer/useFieldTransfer.d.ts +47 -0
- package/dist/src/shared/components/field-transfer/utils/enum.d.ts +6 -0
- package/dist/src/shared/components/field-transfer/utils/i18n.d.ts +1 -0
- package/dist/src/shared/components/field-transfer/utils/tree-tool.d.ts +6 -0
- package/dist/{text-design-BIFz5gw1.js → text-design-TEheiKQx.js} +2 -2
- package/dist/{text-design-C0dORvkP.js → text-design-jMPxIgZW.js} +2 -2
- package/dist/{text-props-ClHI-4aM.js → text-props-CrkSvg6D.js} +5 -5
- package/dist/{text-style-DANM5fvy.js → text-style-DmwTt8KQ.js} +1 -1
- package/dist/{throttle-Cpk1LoGk-Da5HSLWc.js → throttle-Cpk1LoGk-DTkhEkFR.js} +1 -1
- package/dist/{timediff-design-BDCsQIal.js → timediff-design-D_if-K1S.js} +1 -1
- package/dist/{trace-design-CKqq1WH_.js → trace-design-oN7pgtab.js} +2 -2
- package/dist/{trace-props-BI24XFMc.js → trace-props-BFnUk6kv.js} +24 -16
- package/dist/{trace-style-CX1f7oZH.js → trace-style-TNnFcvfw.js} +1 -1
- package/dist/{user-props-gF7KPnP8.js → user-props-Ce-ilCmU.js} +2 -2
- package/dist/{user-style-DIouAMWa.js → user-style-4rp0jKYP.js} +1 -1
- package/dist/{value-editor.vue_vue_type_style_index_0_lang-DHj-zNxm.js → value-editor.vue_vue_type_style_index_0_lang-DMuR0u4j.js} +2 -2
- package/dist/{version-select-CL3QQGND.js → version-select-DSFIlYgX.js} +1 -1
- package/dist/web-render/index.es.js +4 -4
- package/dist/{widget-barcode-DZiCyrQW.js → widget-barcode-Du7LOaiy.js} +4 -4
- package/dist/{widget-diagonal-D_Oz8te1.js → widget-diagonal-D-q7WK6T.js} +3 -3
- package/dist/{widget-image-TL_SLOap.js → widget-image-Da5mvgMm.js} +5 -5
- package/dist/{widget-line-BQ-qcBUA.js → widget-line-oIFH8P04.js} +2 -2
- package/dist/{widget-pagination-DciJE9qC.js → widget-pagination-CSonelt_.js} +5 -5
- package/dist/{widget-power-B9KTIpwA.js → widget-power-CWczWA7K.js} +3 -3
- package/dist/{widget-qrcode-DRoj5rSy.js → widget-qrcode-MQ-cSphb.js} +3 -3
- package/dist/{widget-rangelimit-Ckgx3i4r.js → widget-rangelimit-CFDeRJIf.js} +3 -3
- package/dist/{widget-serialnumber-aUkR-0yC.js → widget-serialnumber-DlE2-jvp.js} +1 -1
- package/dist/{widget-text-CJIT-hY3.js → widget-text-B1SnpOGN.js} +5 -5
- package/dist/{widget-timediff-x-RQMdNg.js → widget-timediff-DeyJbqRE.js} +2 -2
- package/package.json +1 -1
- package/dist/paper-widget-design-BGY5qu-K.js +0 -4
- package/dist/ref-autofill-editor-BbozAOcm.js +0 -673
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { computed, watch, toRaw, onUnmounted, markRaw, ref, toRef, reactive, inject, provide, defineComponent, openBlock, createElementBlock, mergeProps, unref, createElementVNode, normalizeClass, renderSlot, createCommentVNode, createVNode, toDisplayString, isVNode, h, onBeforeMount, resolveComponent, createBlock, withCtx, Fragment, renderList, createTextVNode, onMounted } from "vue";
|
|
2
2
|
import { cloneDeep, has, isNil, merge, defaults, pickBy, mergeWith, omit, last, pick } from "lodash-es";
|
|
3
|
-
import { e as ComponentTypeEnum, F as FIELD_TYPE, i as api, aT as ButtonTypeEnum, v as FormTypeEnum, aO as safeParseArray, aq as RenderModeEnum, aQ as mergeByMultiKey, aS as BpmnSignatureTypeEnum, aP as BpmnNodeTypeEnum, ab as useWidgetStaticAttrs, by as assembleRules, bz as deleteFormRule, bA as setFormRule, aF as requestDisplayValidation, bB as isReferenceOptionActive, bC as validateAllFields, bD as runValidation, bE as stockCheck, am as getParseRuleInfo, an as getParseRuleValue, bF as materialCheck, ax as calcFillData, as as FormulaRuleFieldKeyEnum, bG as judgeUnique, g as SubTableType, ao as useCurrentPageFormState, R as Dependency_ENUM, Q as ASSIGNMENTSTRATEGY_ENUM, aM as uuid2, a3 as DeviceLink, G as useNamespace, _ as _export_sfc, aj as NCB_PROVIDE, b5 as buildFormChangeDisplayRows, aR as getRowId, bw as resolveRowFormChangeMark, bv as resolveFormChangeRowUi, bk as isAnnLocationSelected, bx as setSelectMobileTdId, bl as isFormChangeGhostRow, h as CellType, ad as setSelectAnnotationId, br as recordSubtableRowDelete, b8 as deleteSubtableRow, bs as relocateDeletedRowsToEnd, bH as FRONT_ROW_KEY, az as transformUtils, bj as insertSubtableRows, bq as recordSubtableRowAdd, u as useModal, bI as q, bh as getSubTableQuickFillInfo } from "./dynamic-table-action.
|
|
4
|
-
import { u as useFormModel, w as watchDebounced } from "./mb-render-
|
|
3
|
+
import { e as ComponentTypeEnum, F as FIELD_TYPE, i as api, aT as ButtonTypeEnum, v as FormTypeEnum, aO as safeParseArray, aq as RenderModeEnum, aQ as mergeByMultiKey, aS as BpmnSignatureTypeEnum, aP as BpmnNodeTypeEnum, ab as useWidgetStaticAttrs, by as assembleRules, bz as deleteFormRule, bA as setFormRule, aF as requestDisplayValidation, bB as isReferenceOptionActive, bC as validateAllFields, bD as runValidation, bE as stockCheck, am as getParseRuleInfo, an as getParseRuleValue, bF as materialCheck, ax as calcFillData, as as FormulaRuleFieldKeyEnum, bG as judgeUnique, g as SubTableType, ao as useCurrentPageFormState, R as Dependency_ENUM, Q as ASSIGNMENTSTRATEGY_ENUM, aM as uuid2, a3 as DeviceLink, G as useNamespace, _ as _export_sfc, aj as NCB_PROVIDE, b5 as buildFormChangeDisplayRows, aR as getRowId, bw as resolveRowFormChangeMark, bv as resolveFormChangeRowUi, bk as isAnnLocationSelected, bx as setSelectMobileTdId, bl as isFormChangeGhostRow, h as CellType, ad as setSelectAnnotationId, br as recordSubtableRowDelete, b8 as deleteSubtableRow, bs as relocateDeletedRowsToEnd, bH as FRONT_ROW_KEY, az as transformUtils, bj as insertSubtableRows, bq as recordSubtableRowAdd, u as useModal, bI as q, bJ as groupFixedTableRows, bK as QUICK_FILL_ALLOWED_FIELDS, bL as processQuickFillRows, bM as getIsGroupEmpty, bh as getSubTableQuickFillInfo } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-OPdk2I5p.js";
|
|
4
|
+
import { u as useFormModel, w as watchDebounced } from "./mb-render-D_uumPQr.js";
|
|
5
5
|
import dayjs from "dayjs";
|
|
6
|
-
import { Modal } from "ant-design-vue";
|
|
6
|
+
import { Modal, message } from "ant-design-vue";
|
|
7
7
|
var MaterialConsumptionPatternEnum = /* @__PURE__ */ ((MaterialConsumptionPatternEnum2) => {
|
|
8
8
|
MaterialConsumptionPatternEnum2["RECORD"] = "record";
|
|
9
9
|
MaterialConsumptionPatternEnum2["BOM"] = "bom";
|
|
@@ -1051,14 +1051,14 @@ class BomEntryValidator {
|
|
|
1051
1051
|
*/
|
|
1052
1052
|
async validateHasCompleted(arr) {
|
|
1053
1053
|
const groupData = this.filterGroupData(arr);
|
|
1054
|
-
const
|
|
1054
|
+
const message2 = $t("sys.edhr.mcTable.sequenceLoadingError", {
|
|
1055
1055
|
product: this.bomEntry.product_code_
|
|
1056
1056
|
});
|
|
1057
1057
|
if (!groupData.length) {
|
|
1058
1058
|
if (!this.bomEntry.force_loading_enabled_) {
|
|
1059
1059
|
return;
|
|
1060
1060
|
}
|
|
1061
|
-
throw new Error(
|
|
1061
|
+
throw new Error(message2);
|
|
1062
1062
|
}
|
|
1063
1063
|
if (this.bomEntry.type_ === "view") {
|
|
1064
1064
|
return;
|
|
@@ -1071,26 +1071,26 @@ class BomEntryValidator {
|
|
|
1071
1071
|
// 等于的时候要相等才算填报完成,小于的时候报错,大于由修改的时候报错,这边不报错
|
|
1072
1072
|
case "eq":
|
|
1073
1073
|
if (consumeNum < this.remainingNum) {
|
|
1074
|
-
throw new Error(
|
|
1074
|
+
throw new Error(message2);
|
|
1075
1075
|
}
|
|
1076
1076
|
break;
|
|
1077
1077
|
// 大于等于的时候要大于等于才算完成
|
|
1078
1078
|
case "gte":
|
|
1079
1079
|
if (consumeNum < this.remainingNum) {
|
|
1080
|
-
throw new Error(
|
|
1080
|
+
throw new Error(message2);
|
|
1081
1081
|
}
|
|
1082
1082
|
break;
|
|
1083
1083
|
// 小于等于的时候要小于等于有值就算算完成
|
|
1084
1084
|
case "lte":
|
|
1085
1085
|
if (consumeNum <= 0) {
|
|
1086
|
-
throw new Error(
|
|
1086
|
+
throw new Error(message2);
|
|
1087
1087
|
}
|
|
1088
1088
|
break;
|
|
1089
1089
|
case "bounds":
|
|
1090
1090
|
const consumeSum = consumeNum + this.hasConsumed;
|
|
1091
1091
|
const { min } = await this.calcCustomNumberLimit(groupData[0]);
|
|
1092
1092
|
if (consumeSum < min) {
|
|
1093
|
-
throw new Error(
|
|
1093
|
+
throw new Error(message2);
|
|
1094
1094
|
}
|
|
1095
1095
|
break;
|
|
1096
1096
|
}
|
|
@@ -1480,10 +1480,10 @@ class MaterialConsumeTableController {
|
|
|
1480
1480
|
this.tableDataRef.value = [...value, ...deletedArr];
|
|
1481
1481
|
}
|
|
1482
1482
|
/** 错误信息 */
|
|
1483
|
-
error(
|
|
1483
|
+
error(message2) {
|
|
1484
1484
|
MaterialConsumeTableController.render.message({
|
|
1485
1485
|
type: "error",
|
|
1486
|
-
content:
|
|
1486
|
+
content: message2
|
|
1487
1487
|
});
|
|
1488
1488
|
}
|
|
1489
1489
|
/**
|
|
@@ -1805,11 +1805,11 @@ class MaterialConsumeTableController {
|
|
|
1805
1805
|
* @param message
|
|
1806
1806
|
* @return {*}
|
|
1807
1807
|
*/
|
|
1808
|
-
calcErrorObj(
|
|
1808
|
+
calcErrorObj(message2) {
|
|
1809
1809
|
return {
|
|
1810
1810
|
field: this.widget.props.field + "_0_product_id_",
|
|
1811
1811
|
message: JSON.stringify({
|
|
1812
|
-
message,
|
|
1812
|
+
message: message2,
|
|
1813
1813
|
showFieldName: $t("sys.model.product"),
|
|
1814
1814
|
showModelKey: this.widget.props.modelKey,
|
|
1815
1815
|
showModelName: this.widget.props.tableTitle,
|
|
@@ -2970,7 +2970,7 @@ function useFormTmplConfig() {
|
|
|
2970
2970
|
const _hoisted_1$6 = ["data-merge", "data-fill-direction"];
|
|
2971
2971
|
const _hoisted_2$1 = {
|
|
2972
2972
|
key: 0,
|
|
2973
|
-
class: "absolute z-9 top-
|
|
2973
|
+
class: "absolute z-9 top-1/2 right-0 w-0 h-0 -translate-y-4"
|
|
2974
2974
|
};
|
|
2975
2975
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
2976
2976
|
__name: "border-td",
|
|
@@ -3042,7 +3042,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
3042
3042
|
};
|
|
3043
3043
|
}
|
|
3044
3044
|
});
|
|
3045
|
-
const BorderTD = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
3045
|
+
const BorderTD = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-5f774f44"]]);
|
|
3046
3046
|
const _sfc_main$7 = {};
|
|
3047
3047
|
const _hoisted_1$5 = { class: "nocode-loading" };
|
|
3048
3048
|
function _sfc_render(_ctx, _cache) {
|
|
@@ -4152,197 +4152,6 @@ const MaterialConsumeTable = /* @__PURE__ */ defineComponent({
|
|
|
4152
4152
|
})])])]);
|
|
4153
4153
|
}
|
|
4154
4154
|
});
|
|
4155
|
-
function processRows(rows = [], columns = []) {
|
|
4156
|
-
const isBlank = (v) => v === null || v === void 0 || typeof v === "string" && v.trim() === "" || Array.isArray(v) && v.length === 0;
|
|
4157
|
-
const roundToScale = (num, scale) => {
|
|
4158
|
-
if (scale == null) return num;
|
|
4159
|
-
const factor = Math.pow(10, scale);
|
|
4160
|
-
return Math.round(num * factor) / factor;
|
|
4161
|
-
};
|
|
4162
|
-
const parseNumber = (v, { integer = false, scale = null } = {}) => {
|
|
4163
|
-
if (v === null || v === void 0) return null;
|
|
4164
|
-
if (typeof v === "number") {
|
|
4165
|
-
if (!Number.isFinite(v)) return null;
|
|
4166
|
-
if (integer && !Number.isInteger(v)) return null;
|
|
4167
|
-
const n2 = scale != null ? roundToScale(v, scale) : v;
|
|
4168
|
-
return Number.isFinite(n2) ? n2 : null;
|
|
4169
|
-
}
|
|
4170
|
-
let s = String(v).trim();
|
|
4171
|
-
if (s === "") return null;
|
|
4172
|
-
s = s.replace(/,/g, "");
|
|
4173
|
-
if (/^[\(\(].+[\)\)]$/.test(s)) {
|
|
4174
|
-
s = "-" + s.replace(/^[\(\(]|[\)\)]$/g, "");
|
|
4175
|
-
}
|
|
4176
|
-
const n = Number(s);
|
|
4177
|
-
if (!Number.isFinite(n)) return null;
|
|
4178
|
-
if (integer) {
|
|
4179
|
-
if (!Number.isInteger(n)) return null;
|
|
4180
|
-
return n;
|
|
4181
|
-
} else {
|
|
4182
|
-
return scale != null ? roundToScale(n, scale) : n;
|
|
4183
|
-
}
|
|
4184
|
-
};
|
|
4185
|
-
const parseToDate = (v) => {
|
|
4186
|
-
if (v === null || v === void 0 || v === "") return null;
|
|
4187
|
-
if (typeof v === "string") {
|
|
4188
|
-
let s = v.trim();
|
|
4189
|
-
if (s === "") return null;
|
|
4190
|
-
s = s.replace(/-/g, "/");
|
|
4191
|
-
if (/^\d{1,2}:\d{2}(:\d{2})?$/.test(s)) {
|
|
4192
|
-
const today = /* @__PURE__ */ new Date();
|
|
4193
|
-
const datePart = `${today.getFullYear()}/${today.getMonth() + 1}/${today.getDate()}`;
|
|
4194
|
-
s = `${datePart} ${s}`;
|
|
4195
|
-
}
|
|
4196
|
-
const d = new Date(s);
|
|
4197
|
-
return isNaN(d) ? null : d;
|
|
4198
|
-
}
|
|
4199
|
-
return null;
|
|
4200
|
-
};
|
|
4201
|
-
const buildOptionLookup = (opts = []) => {
|
|
4202
|
-
const map = /* @__PURE__ */ new Map();
|
|
4203
|
-
for (const o of opts) {
|
|
4204
|
-
const val = o.value != null ? String(o.value) : void 0;
|
|
4205
|
-
const text = o.text != null ? String(o.text) : void 0;
|
|
4206
|
-
const label = o.label != null ? String(o.label) : void 0;
|
|
4207
|
-
if (val !== void 0) map.set(val, val);
|
|
4208
|
-
if (text !== void 0) map.set(text, val || text);
|
|
4209
|
-
if (label !== void 0) map.set(label, val || label);
|
|
4210
|
-
}
|
|
4211
|
-
return map;
|
|
4212
|
-
};
|
|
4213
|
-
const pad2 = (n) => String(n).padStart(2, "0");
|
|
4214
|
-
const formatDate = (d) => `${d.getFullYear()}-${pad2(d.getMonth() + 1)}-${pad2(d.getDate())}`;
|
|
4215
|
-
const formatTime = (d) => `${pad2(d.getHours())}:${pad2(d.getMinutes())}:${pad2(d.getSeconds())}`;
|
|
4216
|
-
const formatDateTime = (d) => `${formatDate(d)} ${formatTime(d)}`;
|
|
4217
|
-
const out = rows.map((row) => {
|
|
4218
|
-
const newRow = { ...row };
|
|
4219
|
-
for (const f of columns) {
|
|
4220
|
-
const val = row[f.prop];
|
|
4221
|
-
switch (f.fieldType) {
|
|
4222
|
-
case FIELD_TYPE.INTEGER:
|
|
4223
|
-
case FIELD_TYPE.LONG:
|
|
4224
|
-
{
|
|
4225
|
-
const n = parseNumber(val, { integer: true });
|
|
4226
|
-
newRow[f.prop] = isBlank(n) ? void 0 : n;
|
|
4227
|
-
}
|
|
4228
|
-
break;
|
|
4229
|
-
case FIELD_TYPE.DOUBLE:
|
|
4230
|
-
case FIELD_TYPE.DECIMAL:
|
|
4231
|
-
{
|
|
4232
|
-
const n = parseNumber(val, { integer: false, scale: null });
|
|
4233
|
-
newRow[f.prop] = isBlank(n) ? void 0 : n;
|
|
4234
|
-
}
|
|
4235
|
-
break;
|
|
4236
|
-
case FIELD_TYPE.DATE:
|
|
4237
|
-
{
|
|
4238
|
-
const d = parseToDate(val);
|
|
4239
|
-
newRow[f.prop] = d ? formatDate(d) : isBlank(val) ? void 0 : val;
|
|
4240
|
-
}
|
|
4241
|
-
break;
|
|
4242
|
-
case FIELD_TYPE.TIME:
|
|
4243
|
-
{
|
|
4244
|
-
const d = parseToDate(val);
|
|
4245
|
-
newRow[f.prop] = d ? formatTime(d) : isBlank(val) ? void 0 : val;
|
|
4246
|
-
}
|
|
4247
|
-
break;
|
|
4248
|
-
case FIELD_TYPE.DATE_TIME:
|
|
4249
|
-
{
|
|
4250
|
-
const d = parseToDate(val);
|
|
4251
|
-
newRow[f.prop] = d ? formatDateTime(d) : isBlank(val) ? void 0 : val;
|
|
4252
|
-
}
|
|
4253
|
-
break;
|
|
4254
|
-
case FIELD_TYPE.OPTION_MULTI:
|
|
4255
|
-
{
|
|
4256
|
-
const lookup = buildOptionLookup(f.newOptions);
|
|
4257
|
-
if (typeof val === "string") {
|
|
4258
|
-
const tokens = val.split(/[;,]/).map((s) => s.trim()).filter((s) => s !== "");
|
|
4259
|
-
const arr = tokens.map((t) => lookup.get(t)).filter((v) => v !== void 0);
|
|
4260
|
-
newRow[f.prop] = arr.length ? arr.join(",") : void 0;
|
|
4261
|
-
} else {
|
|
4262
|
-
newRow[f.prop] = isBlank(val) ? void 0 : val;
|
|
4263
|
-
}
|
|
4264
|
-
}
|
|
4265
|
-
break;
|
|
4266
|
-
case FIELD_TYPE.OPTION:
|
|
4267
|
-
{
|
|
4268
|
-
const lookup = buildOptionLookup(f.newOptions);
|
|
4269
|
-
if (isBlank(val)) {
|
|
4270
|
-
newRow[f.prop] = void 0;
|
|
4271
|
-
} else {
|
|
4272
|
-
const tokens = val.split(/[;,]/).map((s) => s.trim()).filter((s) => s !== "");
|
|
4273
|
-
const normalized = lookup.get(tokens?.[0]);
|
|
4274
|
-
newRow[f.prop] = normalized !== void 0 ? normalized : void 0;
|
|
4275
|
-
}
|
|
4276
|
-
}
|
|
4277
|
-
break;
|
|
4278
|
-
default:
|
|
4279
|
-
newRow[f.prop] = isBlank(val) ? void 0 : val;
|
|
4280
|
-
}
|
|
4281
|
-
}
|
|
4282
|
-
return newRow;
|
|
4283
|
-
}).filter((row) => {
|
|
4284
|
-
return columns.some((f) => {
|
|
4285
|
-
const v = row[f.prop];
|
|
4286
|
-
if (v === 0 || v === false) return true;
|
|
4287
|
-
return !isBlank(v);
|
|
4288
|
-
});
|
|
4289
|
-
});
|
|
4290
|
-
return out;
|
|
4291
|
-
}
|
|
4292
|
-
function groupFixedTableRows(rows, options) {
|
|
4293
|
-
const { rowCount, colCount, direction, z = "row" } = options;
|
|
4294
|
-
const n = rows.length;
|
|
4295
|
-
if (!n) return [];
|
|
4296
|
-
const keys = Object.keys(rows[0]);
|
|
4297
|
-
const m = keys.length;
|
|
4298
|
-
const matrix = rows.map((row) => keys.map((k) => row[k]));
|
|
4299
|
-
const result = [];
|
|
4300
|
-
function createBlock2(startRow, startCol, height, width) {
|
|
4301
|
-
const values = [];
|
|
4302
|
-
if (z === "row") {
|
|
4303
|
-
for (let r = 0; r < height; r++) {
|
|
4304
|
-
const rowValues = [];
|
|
4305
|
-
for (let c = 0; c < width; c++) {
|
|
4306
|
-
rowValues.push(matrix[startRow + r][startCol + c]);
|
|
4307
|
-
}
|
|
4308
|
-
if (r % 2 === 1) {
|
|
4309
|
-
rowValues.reverse();
|
|
4310
|
-
}
|
|
4311
|
-
values.push(...rowValues);
|
|
4312
|
-
}
|
|
4313
|
-
} else {
|
|
4314
|
-
for (let c = 0; c < width; c++) {
|
|
4315
|
-
const colValues = [];
|
|
4316
|
-
for (let r = 0; r < height; r++) {
|
|
4317
|
-
colValues.push(matrix[startRow + r][startCol + c]);
|
|
4318
|
-
}
|
|
4319
|
-
if (c % 2 === 1) {
|
|
4320
|
-
colValues.reverse();
|
|
4321
|
-
}
|
|
4322
|
-
values.push(...colValues);
|
|
4323
|
-
}
|
|
4324
|
-
}
|
|
4325
|
-
const row = {};
|
|
4326
|
-
values.forEach((v, i) => {
|
|
4327
|
-
row[`K${i}`] = v;
|
|
4328
|
-
});
|
|
4329
|
-
result.push(row);
|
|
4330
|
-
}
|
|
4331
|
-
if (direction === "x") {
|
|
4332
|
-
for (let r = 0; r < n; r += rowCount) {
|
|
4333
|
-
for (let c = 0; c < m; c += colCount) {
|
|
4334
|
-
createBlock2(r, c, Math.min(rowCount, n - r), Math.min(colCount, m - c));
|
|
4335
|
-
}
|
|
4336
|
-
}
|
|
4337
|
-
} else {
|
|
4338
|
-
for (let c = 0; c < m; c += colCount) {
|
|
4339
|
-
for (let r = 0; r < n; r += rowCount) {
|
|
4340
|
-
createBlock2(r, c, Math.min(rowCount, n - r), Math.min(colCount, m - c));
|
|
4341
|
-
}
|
|
4342
|
-
}
|
|
4343
|
-
}
|
|
4344
|
-
return result;
|
|
4345
|
-
}
|
|
4346
4155
|
const _hoisted_1$2 = { class: "document-quick-fill-container" };
|
|
4347
4156
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
4348
4157
|
__name: "fixed-quick-fill-modal",
|
|
@@ -4367,6 +4176,12 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4367
4176
|
rows.value = Array.from({ length: rowCount }, newRow);
|
|
4368
4177
|
cols.value = Object.keys(rows.value?.[0] || {}).map((k) => ({ prop: k, name: k }));
|
|
4369
4178
|
});
|
|
4179
|
+
const handleBeforePaste = (e) => {
|
|
4180
|
+
if (!props.columns.length) {
|
|
4181
|
+
e.preventDefault();
|
|
4182
|
+
message.warn($t("sys.quickFillingFixedNoFieldsTip"));
|
|
4183
|
+
}
|
|
4184
|
+
};
|
|
4370
4185
|
async function onSave() {
|
|
4371
4186
|
const { dgRowCount, dgColCount, dgDirection, columns } = props;
|
|
4372
4187
|
const groupedRows = groupFixedTableRows(unref(rows), {
|
|
@@ -4380,7 +4195,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4380
4195
|
}
|
|
4381
4196
|
const _row = {};
|
|
4382
4197
|
columns.forEach((col, i) => {
|
|
4383
|
-
|
|
4198
|
+
if (QUICK_FILL_ALLOWED_FIELDS.has(col.fieldType)) {
|
|
4199
|
+
_row[col.prop] = values[i];
|
|
4200
|
+
}
|
|
4384
4201
|
});
|
|
4385
4202
|
return _row;
|
|
4386
4203
|
}).filter(Boolean);
|
|
@@ -4388,7 +4205,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4388
4205
|
return {
|
|
4389
4206
|
ok: true,
|
|
4390
4207
|
params: {
|
|
4391
|
-
data:
|
|
4208
|
+
data: processQuickFillRows(groupedRows, columns)
|
|
4392
4209
|
}
|
|
4393
4210
|
};
|
|
4394
4211
|
} catch (err) {
|
|
@@ -4417,13 +4234,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4417
4234
|
columns: cols.value,
|
|
4418
4235
|
theme: "material",
|
|
4419
4236
|
"hide-attribution": "",
|
|
4420
|
-
"apply-on-close": true
|
|
4237
|
+
"apply-on-close": true,
|
|
4238
|
+
onBeforepaste: handleBeforePaste
|
|
4421
4239
|
}, null, 8, ["source", "columns"])
|
|
4422
4240
|
]);
|
|
4423
4241
|
};
|
|
4424
4242
|
}
|
|
4425
4243
|
});
|
|
4426
|
-
const FixedQuickFillModal = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
4244
|
+
const FixedQuickFillModal = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-082f502b"]]);
|
|
4427
4245
|
const _hoisted_1$1 = {
|
|
4428
4246
|
key: 1,
|
|
4429
4247
|
class: "sub-table-action__subtitle"
|
|
@@ -4556,9 +4374,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
4556
4374
|
];
|
|
4557
4375
|
return menus.filter((i) => i.show !== false);
|
|
4558
4376
|
});
|
|
4559
|
-
const displayMenus = computed(
|
|
4560
|
-
() => props.menus?.length ? props.menus : showMenus.value
|
|
4561
|
-
);
|
|
4377
|
+
const displayMenus = computed(() => props.menus?.length ? props.menus : showMenus.value);
|
|
4562
4378
|
const stopRefPropagation = (vm) => {
|
|
4563
4379
|
if (!vm?.$el) {
|
|
4564
4380
|
return;
|
|
@@ -4697,10 +4513,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
4697
4513
|
};
|
|
4698
4514
|
}
|
|
4699
4515
|
});
|
|
4700
|
-
const SubTableAction = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
4516
|
+
const SubTableAction = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-e0624e4c"]]);
|
|
4701
4517
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
4702
4518
|
__name: "fixed-table-action",
|
|
4703
4519
|
props: {
|
|
4520
|
+
tdId: {},
|
|
4704
4521
|
formState: {},
|
|
4705
4522
|
widgetCenter: {},
|
|
4706
4523
|
fixedTableInfo: {}
|
|
@@ -4717,18 +4534,19 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4717
4534
|
const props = __props;
|
|
4718
4535
|
const onMenuClick = async ({ key }) => {
|
|
4719
4536
|
if (key === "quickFillRowCurrent") {
|
|
4720
|
-
const {
|
|
4721
|
-
const {
|
|
4537
|
+
const { fixedTableInfo } = props;
|
|
4538
|
+
const {
|
|
4539
|
+
range,
|
|
4540
|
+
dgRange,
|
|
4541
|
+
subFieldKey,
|
|
4542
|
+
fillDirection: dgDirection,
|
|
4543
|
+
columns,
|
|
4544
|
+
columnKeys
|
|
4545
|
+
} = fixedTableInfo;
|
|
4722
4546
|
const rowCount = range.b - range.t + 1;
|
|
4723
4547
|
const colCount = range.r - range.l + 1;
|
|
4724
4548
|
const dgRowCount = dgRange.b - dgRange.t + 1;
|
|
4725
4549
|
const dgColCount = dgRange.r - dgRange.l + 1;
|
|
4726
|
-
const columns = Object.values(widgetCenter[ComponentTypeEnum.PAPER].props.fixedTableFieldMap).map((o) => o.fieldMeta).filter((m) => m?.subFieldKey === subFieldKey).map((m) => ({
|
|
4727
|
-
prop: m.field,
|
|
4728
|
-
fieldType: m.fieldType,
|
|
4729
|
-
newOptions: []
|
|
4730
|
-
// JSW TODO: 传递枚举单选、多选 选项
|
|
4731
|
-
}));
|
|
4732
4550
|
const res = await window.NocodeAdapter.utils.overlay.modal(
|
|
4733
4551
|
FixedQuickFillModal,
|
|
4734
4552
|
{
|
|
@@ -4742,14 +4560,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4742
4560
|
{ title: "快速填报", width: "1060px" }
|
|
4743
4561
|
);
|
|
4744
4562
|
if (res.ok && res.params?.data.length) {
|
|
4745
|
-
const validKeys = columns.map((c) => c.prop);
|
|
4746
4563
|
const newGroupList = [...res.params.data];
|
|
4747
4564
|
let activeIndex = 0;
|
|
4748
4565
|
props.formState[subFieldKey].forEach((oldGroup) => {
|
|
4749
|
-
const
|
|
4750
|
-
|
|
4751
|
-
);
|
|
4752
|
-
if (isEmptyGroup) {
|
|
4566
|
+
const isEmpty = getIsGroupEmpty(oldGroup, columnKeys);
|
|
4567
|
+
if (isEmpty) {
|
|
4753
4568
|
const newGroup = newGroupList[activeIndex];
|
|
4754
4569
|
if (newGroup) {
|
|
4755
4570
|
Object.assign(oldGroup, newGroup);
|
|
@@ -4809,37 +4624,66 @@ const DocumentPaper = /* @__PURE__ */ defineComponent({
|
|
|
4809
4624
|
const tmplBomController = computed(() => tmplBomCMap.value?.[props.basicInfo?.uniqueId]);
|
|
4810
4625
|
const subTableCoreFactoryMap = inject(NCB_PROVIDE.SUB_TABLE_CORE_FACTORY_MAP);
|
|
4811
4626
|
const subTableCoreFactory = computed(() => subTableCoreFactoryMap.value?.[props.basicInfo?.uniqueId]);
|
|
4812
|
-
const
|
|
4627
|
+
const filledFixedTableKeys = ref([]);
|
|
4628
|
+
const fixedTables = computed(() => {
|
|
4813
4629
|
const info = props.selfInfoList?.[0];
|
|
4814
|
-
const map = {};
|
|
4815
4630
|
if (!info) {
|
|
4816
|
-
return
|
|
4631
|
+
return [];
|
|
4817
4632
|
}
|
|
4818
4633
|
const designer = JSON.parse(info.designerJson || "{}");
|
|
4819
|
-
|
|
4820
|
-
|
|
4634
|
+
return designer.sheets?.[0]?.paper?.fixedTables || designer.fixedTables || [];
|
|
4635
|
+
});
|
|
4636
|
+
const fixedTableInfoMap = computed(() => {
|
|
4637
|
+
const {
|
|
4638
|
+
widgetCenter
|
|
4639
|
+
} = props;
|
|
4640
|
+
const map = {};
|
|
4641
|
+
fixedTables.value.forEach((table) => {
|
|
4821
4642
|
const {
|
|
4822
|
-
field,
|
|
4823
|
-
model,
|
|
4643
|
+
field: subFieldKey,
|
|
4644
|
+
model: subModelKey,
|
|
4824
4645
|
range,
|
|
4825
4646
|
dgRange,
|
|
4826
|
-
fillDirection
|
|
4647
|
+
fillDirection,
|
|
4648
|
+
quickFill
|
|
4827
4649
|
} = table;
|
|
4828
4650
|
const {
|
|
4829
|
-
r:
|
|
4830
|
-
t:
|
|
4651
|
+
r: colNo,
|
|
4652
|
+
t: rowNo
|
|
4831
4653
|
} = range;
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4654
|
+
const trId = widgetCenter[ComponentTypeEnum.PAPER].nextIds[rowNo - 1];
|
|
4655
|
+
const tdId = widgetCenter[trId].nextIds[colNo - 1];
|
|
4656
|
+
const newOptions = widgetCenter[tdId]?.cellWidget?.props?.newSpecificConfig?.newOptions || [];
|
|
4657
|
+
const columns = Object.values(widgetCenter[ComponentTypeEnum.PAPER].props.fixedTableFieldMap || {}).map((o) => o.fieldMeta).filter((m) => m?.subFieldKey === subFieldKey).map((m) => ({
|
|
4658
|
+
prop: m.field,
|
|
4659
|
+
fieldType: m.fieldType,
|
|
4660
|
+
newOptions
|
|
4661
|
+
}));
|
|
4662
|
+
const columnKeys = columns.map((c) => c.prop);
|
|
4663
|
+
map[tdId] = {
|
|
4664
|
+
subFieldKey,
|
|
4665
|
+
subModelKey,
|
|
4835
4666
|
range,
|
|
4836
4667
|
dgRange,
|
|
4837
4668
|
fillDirection,
|
|
4838
|
-
|
|
4669
|
+
columns,
|
|
4670
|
+
columnKeys,
|
|
4671
|
+
// 兼容历史数据,[固定表]默认开启 快速填报
|
|
4672
|
+
quickFillVisible: quickFill === void 0 ? true : quickFill
|
|
4839
4673
|
};
|
|
4840
4674
|
});
|
|
4841
4675
|
return map;
|
|
4842
4676
|
});
|
|
4677
|
+
watch(() => props.formState, (formState) => {
|
|
4678
|
+
filledFixedTableKeys.value = fixedTables.value.map((t) => t.field).filter((subTableField) => {
|
|
4679
|
+
const info = Object.values(fixedTableInfoMap.value).find((item) => item.subFieldKey === subTableField);
|
|
4680
|
+
const colKeys = info?.columnKeys || [];
|
|
4681
|
+
return formState[subTableField]?.every((g) => !getIsGroupEmpty(g, colKeys));
|
|
4682
|
+
});
|
|
4683
|
+
}, {
|
|
4684
|
+
deep: true,
|
|
4685
|
+
immediate: true
|
|
4686
|
+
});
|
|
4843
4687
|
const mainTableRef = ref();
|
|
4844
4688
|
const isPdfMode = inject(NCB_PROVIDE.IS_PDF, false);
|
|
4845
4689
|
const openFillFieldsModal = inject(NCB_PROVIDE.MOBILE_FILL_FIELDS_POPUP);
|
|
@@ -4976,7 +4820,7 @@ const DocumentPaper = /* @__PURE__ */ defineComponent({
|
|
|
4976
4820
|
return createVNode("tr", {
|
|
4977
4821
|
"key": `${trId}_${trIndex}`,
|
|
4978
4822
|
"height": height
|
|
4979
|
-
}, [tdIds.map((tdId
|
|
4823
|
+
}, [tdIds.map((tdId) => {
|
|
4980
4824
|
const tdInfo = props.widgetCenter[tdId];
|
|
4981
4825
|
const tdAttrs = {
|
|
4982
4826
|
key: tdId,
|
|
@@ -5049,8 +4893,7 @@ const DocumentPaper = /* @__PURE__ */ defineComponent({
|
|
|
5049
4893
|
onClick: setSelectMobileTdId.bind(null, tdInfo, props.basicInfo, props.widgetCenter, openFillFieldsModal, -1)
|
|
5050
4894
|
});
|
|
5051
4895
|
}
|
|
5052
|
-
const
|
|
5053
|
-
const fixedTableInfo = fixedTableInfoMap.value[coord];
|
|
4896
|
+
const fixedTableInfo = fixedTableInfoMap.value[tdId];
|
|
5054
4897
|
return createVNode(BorderTD, mergeProps({
|
|
5055
4898
|
"style": tdInfo.style
|
|
5056
4899
|
}, tdAttrs, {
|
|
@@ -5062,11 +4905,15 @@ const DocumentPaper = /* @__PURE__ */ defineComponent({
|
|
|
5062
4905
|
dynamicConfig
|
|
5063
4906
|
}) : null,
|
|
5064
4907
|
// [固定表]右上角 加装 操作按钮
|
|
5065
|
-
tableAction:
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
4908
|
+
tableAction: (() => {
|
|
4909
|
+
const fixedTableActionVisible = fixedTableInfo?.quickFillVisible && !filledFixedTableKeys.value.includes(fixedTableInfo.subFieldKey);
|
|
4910
|
+
return () => fixedTableActionVisible ? createVNode(_sfc_main$2, {
|
|
4911
|
+
"tdId": tdId,
|
|
4912
|
+
"formState": props.formState,
|
|
4913
|
+
"widgetCenter": props.widgetCenter,
|
|
4914
|
+
"fixedTableInfo": fixedTableInfo
|
|
4915
|
+
}, null) : null;
|
|
4916
|
+
})()
|
|
5070
4917
|
});
|
|
5071
4918
|
}
|
|
5072
4919
|
if (realTdAttrInfo && tdInfo.cellHidden) {
|
|
@@ -5113,7 +4960,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5113
4960
|
return {
|
|
5114
4961
|
ok: true,
|
|
5115
4962
|
params: {
|
|
5116
|
-
data:
|
|
4963
|
+
data: processQuickFillRows(unref(rows), props.columns)
|
|
5117
4964
|
}
|
|
5118
4965
|
};
|
|
5119
4966
|
} catch (err) {
|
|
@@ -5150,7 +4997,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5150
4997
|
};
|
|
5151
4998
|
}
|
|
5152
4999
|
});
|
|
5153
|
-
const DynamicQuickFillModal = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
5000
|
+
const DynamicQuickFillModal = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-ae9acd3f"]]);
|
|
5154
5001
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5155
5002
|
__name: "dynamic-table-action",
|
|
5156
5003
|
props: {
|
|
@@ -5174,24 +5021,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5174
5021
|
const fieldColumn = computed(() => {
|
|
5175
5022
|
const info = getSubTableQuickFillInfo(props.subTableFieldId, props.mobileTdIdGroups);
|
|
5176
5023
|
if (!info?.mainWidgetIds?.length) return [];
|
|
5177
|
-
const allowed = /* @__PURE__ */ new Set([
|
|
5178
|
-
FIELD_TYPE.TEXT,
|
|
5179
|
-
FIELD_TYPE.LONG_TEXT,
|
|
5180
|
-
FIELD_TYPE.INTEGER,
|
|
5181
|
-
FIELD_TYPE.LONG,
|
|
5182
|
-
FIELD_TYPE.DOUBLE,
|
|
5183
|
-
FIELD_TYPE.DECIMAL,
|
|
5184
|
-
FIELD_TYPE.DATE,
|
|
5185
|
-
FIELD_TYPE.TIME,
|
|
5186
|
-
FIELD_TYPE.DATE_TIME,
|
|
5187
|
-
FIELD_TYPE.OPTION,
|
|
5188
|
-
FIELD_TYPE.OPTION_MULTI,
|
|
5189
|
-
FIELD_TYPE.MATERIAL_NO,
|
|
5190
|
-
FIELD_TYPE.STERILIZE_LOT,
|
|
5191
|
-
FIELD_TYPE.MATERIAL_LOT,
|
|
5192
|
-
FIELD_TYPE.RELATED_LOT_NO,
|
|
5193
|
-
FIELD_TYPE.SCRAP_MATERIAL_NO
|
|
5194
|
-
]);
|
|
5195
5024
|
return info.mainWidgetIds.flatMap((tdId) => {
|
|
5196
5025
|
const widget = props.widgetCenter?.[tdId];
|
|
5197
5026
|
if (!widget) return [];
|
|
@@ -5201,7 +5030,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5201
5030
|
const wProps = cellWidget.props || {};
|
|
5202
5031
|
const { isFieldModel, field, fieldType, newSpecificConfig } = wProps;
|
|
5203
5032
|
if (isFieldModel) return [];
|
|
5204
|
-
if (!
|
|
5033
|
+
if (!QUICK_FILL_ALLOWED_FIELDS.has(fieldType)) return [];
|
|
5205
5034
|
return {
|
|
5206
5035
|
fieldType,
|
|
5207
5036
|
field,
|
|
@@ -5250,7 +5079,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5250
5079
|
};
|
|
5251
5080
|
}
|
|
5252
5081
|
});
|
|
5253
|
-
const DynamicTableAction = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5082
|
+
const DynamicTableAction = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-53d7e66c"]]);
|
|
5254
5083
|
export {
|
|
5255
5084
|
BorderTD as B,
|
|
5256
5085
|
DeviceLinkTmplUtil as D,
|