@gct-paas/word 0.1.47-beta.12 → 0.1.47-beta.14

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/index.es.js CHANGED
@@ -32591,7 +32591,7 @@ const createList = (n) => Array.from({ length: n }, (_2, i) => i);
32591
32591
  const _hoisted_1$2g = { class: "gct-time-container" };
32592
32592
  const _hoisted_2$1u = { class: "scrollbar-container" };
32593
32593
  const _hoisted_3$1b = ["onClick"];
32594
- const _hoisted_4$T = { class: "gct-time-footer" };
32594
+ const _hoisted_4$S = { class: "gct-time-footer" };
32595
32595
  const _hoisted_5$H = { class: "gct-right-btns" };
32596
32596
  const _sfc_main$3u = /* @__PURE__ */ defineComponent({
32597
32597
  __name: "time",
@@ -32779,7 +32779,7 @@ const _sfc_main$3u = /* @__PURE__ */ defineComponent({
32779
32779
  ]);
32780
32780
  }), 128))
32781
32781
  ]),
32782
- createElementVNode("div", _hoisted_4$T, [
32782
+ createElementVNode("div", _hoisted_4$S, [
32783
32783
  createElementVNode("div", {
32784
32784
  class: "gct-now-btn",
32785
32785
  onClick: nowDay
@@ -32819,7 +32819,7 @@ const GctTimer = /* @__PURE__ */ _export_sfc(_sfc_main$3u, [["__scopeId", "data-
32819
32819
  const _hoisted_1$2f = { class: "gct-dtp-panel-inner" };
32820
32820
  const _hoisted_2$1t = { class: "gct-dtp-date" };
32821
32821
  const _hoisted_3$1a = { class: "gct-dtp-header" };
32822
- const _hoisted_4$S = { class: "text" };
32822
+ const _hoisted_4$R = { class: "text" };
32823
32823
  const _hoisted_5$G = { class: "gct-dtp-head" };
32824
32824
  const _hoisted_6$t = { class: "gct-dtp-rows-wrapper" };
32825
32825
  const _hoisted_7$o = ["onClick"];
@@ -32833,7 +32833,7 @@ const _hoisted_10$9 = {
32833
32833
  class: "gct-dtp-time"
32834
32834
  };
32835
32835
  const _hoisted_11$6 = { class: "gct-dtp-time-header" };
32836
- const _hoisted_12$4 = { class: "gct-dtp-time-container" };
32836
+ const _hoisted_12$5 = { class: "gct-dtp-time-container" };
32837
32837
  const _sfc_main$3t = /* @__PURE__ */ defineComponent({
32838
32838
  __name: "calendar",
32839
32839
  props: {
@@ -33021,7 +33021,7 @@ const _sfc_main$3t = /* @__PURE__ */ defineComponent({
33021
33021
  color: "#64748b",
33022
33022
  onClick: withModifiers(prevMonth, ["stop"])
33023
33023
  }),
33024
- createElementVNode("div", _hoisted_4$S, toDisplayString(monthTitle.value), 1),
33024
+ createElementVNode("div", _hoisted_4$R, toDisplayString(monthTitle.value), 1),
33025
33025
  createVNode(unref(GctIcon), {
33026
33026
  class: "nav",
33027
33027
  icon: "icon-a-Rightarrow",
@@ -33084,7 +33084,7 @@ const _sfc_main$3t = /* @__PURE__ */ defineComponent({
33084
33084
  ]),
33085
33085
  showTimeLocal.value ? (openBlock(), createElementBlock("div", _hoisted_10$9, [
33086
33086
  createElementVNode("div", _hoisted_11$6, toDisplayString(timeValue.value), 1),
33087
- createElementVNode("div", _hoisted_12$4, [
33087
+ createElementVNode("div", _hoisted_12$5, [
33088
33088
  createVNode(GctTimer, {
33089
33089
  "model-value": timeValue.value,
33090
33090
  format: __props.timeFormat,
@@ -33232,7 +33232,7 @@ const _hoisted_3$18 = {
33232
33232
  key: 0,
33233
33233
  class: "group-label"
33234
33234
  };
33235
- const _hoisted_4$R = ["onClick"];
33235
+ const _hoisted_4$Q = ["onClick"];
33236
33236
  const _hoisted_5$F = { class: "option-label" };
33237
33237
  const _hoisted_6$s = { class: "option-right" };
33238
33238
  const _hoisted_7$n = {
@@ -33371,7 +33371,7 @@ const _sfc_main$3p = /* @__PURE__ */ defineComponent({
33371
33371
  })) : createCommentVNode("", true)
33372
33372
  ])
33373
33373
  ], 64))
33374
- ], 10, _hoisted_4$R);
33374
+ ], 10, _hoisted_4$Q);
33375
33375
  }), 128)),
33376
33376
  group2._showDivider !== false && groupIndex !== normalizedGroupOptions.value.length - 1 ? (openBlock(), createElementBlock("div", _hoisted_7$n)) : createCommentVNode("", true)
33377
33377
  ], 64);
@@ -33660,7 +33660,7 @@ const _hoisted_1$28 = {
33660
33660
  };
33661
33661
  const _hoisted_2$1n = ["src"];
33662
33662
  const _hoisted_3$14 = { class: "upload-img-mask" };
33663
- const _hoisted_4$Q = { class: "tip-text" };
33663
+ const _hoisted_4$P = { class: "tip-text" };
33664
33664
  const _hoisted_5$E = {
33665
33665
  key: 2,
33666
33666
  class: "upload-loading"
@@ -33752,7 +33752,7 @@ const _sfc_main$3k = /* @__PURE__ */ defineComponent({
33752
33752
  }, [
33753
33753
  createElementVNode("div", null, [
33754
33754
  _cache[1] || (_cache[1] = createElementVNode("i", { class: "iconfont icon-tupian_wudaima" }, null, -1)),
33755
- createElementVNode("div", _hoisted_4$Q, toDisplayString(__props.tip), 1)
33755
+ createElementVNode("div", _hoisted_4$P, toDisplayString(__props.tip), 1)
33756
33756
  ])
33757
33757
  ])),
33758
33758
  loading.value ? (openBlock(), createElementBlock("div", _hoisted_5$E, [..._cache[2] || (_cache[2] = [
@@ -33788,7 +33788,7 @@ const _hoisted_3$13 = {
33788
33788
  key: 1,
33789
33789
  class: "gct-input-clear-icon-default"
33790
33790
  };
33791
- const _hoisted_4$P = {
33791
+ const _hoisted_4$O = {
33792
33792
  key: 2,
33793
33793
  class: "gct-input-count"
33794
33794
  };
@@ -33998,7 +33998,7 @@ const _sfc_main$3j = /* @__PURE__ */ defineComponent({
33998
33998
  })
33999
33999
  ]))
34000
34000
  ])) : createCommentVNode("", true),
34001
- props.showCount ? (openBlock(), createElementBlock("span", _hoisted_4$P, [
34001
+ props.showCount ? (openBlock(), createElementBlock("span", _hoisted_4$O, [
34002
34002
  createTextVNode(toDisplayString(countValue.value), 1),
34003
34003
  props.maxLength ? (openBlock(), createElementBlock("span", _hoisted_5$D, " / " + toDisplayString(props.maxLength), 1)) : createCommentVNode("", true)
34004
34004
  ])) : createCommentVNode("", true),
@@ -34020,7 +34020,7 @@ const _hoisted_3$12 = {
34020
34020
  key: 1,
34021
34021
  class: "stepper"
34022
34022
  };
34023
- const _hoisted_4$O = {
34023
+ const _hoisted_4$N = {
34024
34024
  key: 2,
34025
34025
  class: "gct-input-number-suffix"
34026
34026
  };
@@ -34286,7 +34286,7 @@ const _sfc_main$3i = /* @__PURE__ */ defineComponent({
34286
34286
  })
34287
34287
  ], 2)
34288
34288
  ])) : createCommentVNode("", true),
34289
- props.suffix ? (openBlock(), createElementBlock("span", _hoisted_4$O, [
34289
+ props.suffix ? (openBlock(), createElementBlock("span", _hoisted_4$N, [
34290
34290
  createElementVNode("span", _hoisted_5$C, toDisplayString(__props.suffix), 1)
34291
34291
  ])) : createCommentVNode("", true)
34292
34292
  ], 2);
@@ -34480,7 +34480,7 @@ const GctLoading = /* @__PURE__ */ _export_sfc(_sfc_main$3f, [["render", _sfc_re
34480
34480
  const _hoisted_1$22 = { class: "message-wrapper" };
34481
34481
  const _hoisted_2$1i = ["onMouseenter", "onMouseleave"];
34482
34482
  const _hoisted_3$$ = { class: "message-message" };
34483
- const _hoisted_4$N = ["onClick"];
34483
+ const _hoisted_4$M = ["onClick"];
34484
34484
  const _sfc_main$3e = /* @__PURE__ */ defineComponent({
34485
34485
  __name: "Message",
34486
34486
  setup(__props, { expose: __expose }) {
@@ -34551,7 +34551,7 @@ const _sfc_main$3e = /* @__PURE__ */ defineComponent({
34551
34551
  key: 0,
34552
34552
  class: "message-close icon iconfont icon-guanbi",
34553
34553
  onClick: ($event) => remove2(item.id)
34554
- }, null, 8, _hoisted_4$N)) : createCommentVNode("", true)
34554
+ }, null, 8, _hoisted_4$M)) : createCommentVNode("", true)
34555
34555
  ], 42, _hoisted_2$1i);
34556
34556
  }), 128))
34557
34557
  ]),
@@ -35833,7 +35833,7 @@ const GctSegmentSlider = /* @__PURE__ */ _export_sfc(_sfc_main$39, [["__scopeId"
35833
35833
  const _hoisted_1$1Z = { class: "popper-container" };
35834
35834
  const _hoisted_2$1g = { class: "group-name" };
35835
35835
  const _hoisted_3$Z = ["onClick"];
35836
- const _hoisted_4$M = ["onClick"];
35836
+ const _hoisted_4$L = ["onClick"];
35837
35837
  const _hoisted_5$B = {
35838
35838
  key: 2,
35839
35839
  class: "empty"
@@ -36035,7 +36035,7 @@ const _sfc_main$38 = /* @__PURE__ */ defineComponent({
36035
36035
  _: 2
36036
36036
  }, 1032, ["disabled"])
36037
36037
  ], 64))
36038
- ], 10, _hoisted_4$M);
36038
+ ], 10, _hoisted_4$L);
36039
36039
  }), 128)),
36040
36040
  !normalizedFlatOptions.value.length ? (openBlock(), createElementBlock("div", _hoisted_5$B, " 暂无数据 ")) : createCommentVNode("", true)
36041
36041
  ])
@@ -36101,7 +36101,7 @@ const _hoisted_2$1f = {
36101
36101
  class: "gct-ss-search-icon"
36102
36102
  };
36103
36103
  const _hoisted_3$Y = { class: "gct-ss-list" };
36104
- const _hoisted_4$L = ["onClick"];
36104
+ const _hoisted_4$K = ["onClick"];
36105
36105
  const _hoisted_5$A = {
36106
36106
  key: 0,
36107
36107
  class: "gct-ss-empty"
@@ -36275,7 +36275,7 @@ const _sfc_main$37 = /* @__PURE__ */ defineComponent({
36275
36275
  key: item.value,
36276
36276
  class: normalizeClass(["gct-ss-option", { selected: item.value === __props.modelValue, disabled: item.disabled }]),
36277
36277
  onClick: ($event) => onSelect(item)
36278
- }, toDisplayString(item.label), 11, _hoisted_4$L);
36278
+ }, toDisplayString(item.label), 11, _hoisted_4$K);
36279
36279
  }), 128)),
36280
36280
  !filteredOptions.value.length ? (openBlock(), createElementBlock("div", _hoisted_5$A, "暂无数据")) : createCommentVNode("", true)
36281
36281
  ])
@@ -36341,7 +36341,7 @@ const _hoisted_3$X = {
36341
36341
  key: 0,
36342
36342
  class: "selection-col"
36343
36343
  };
36344
- const _hoisted_4$K = ["onClick"];
36344
+ const _hoisted_4$J = ["onClick"];
36345
36345
  const _hoisted_5$z = {
36346
36346
  key: 0,
36347
36347
  class: "selection-col"
@@ -36507,7 +36507,7 @@ const _sfc_main$35 = /* @__PURE__ */ defineComponent({
36507
36507
  ], true)
36508
36508
  ], 4);
36509
36509
  }), 128))
36510
- ], 14, _hoisted_4$K);
36510
+ ], 14, _hoisted_4$J);
36511
36511
  }), 128))
36512
36512
  ])
36513
36513
  ])
@@ -36609,7 +36609,7 @@ const _hoisted_2$1d = {
36609
36609
  class: "rdo-tree-select-node__switcher placeholder"
36610
36610
  };
36611
36611
  const _hoisted_3$W = { class: "rdo-tree-select-node__title" };
36612
- const _hoisted_4$J = { class: "rdo-tree-select-node__label" };
36612
+ const _hoisted_4$I = { class: "rdo-tree-select-node__label" };
36613
36613
  const _hoisted_5$y = {
36614
36614
  key: 0,
36615
36615
  class: "rdo-tree-select-node__tag"
@@ -36669,7 +36669,7 @@ const _sfc_main$32 = /* @__PURE__ */ defineComponent({
36669
36669
  })
36670
36670
  ], 2)) : (openBlock(), createElementBlock("span", _hoisted_2$1d)),
36671
36671
  createElementVNode("span", _hoisted_3$W, [
36672
- createElementVNode("span", _hoisted_4$J, toDisplayString(__props.node.title), 1),
36672
+ createElementVNode("span", _hoisted_4$I, toDisplayString(__props.node.title), 1),
36673
36673
  __props.node.isDefault && !hasChildren.value ? (openBlock(), createElementBlock("span", _hoisted_5$y, "默认")) : createCommentVNode("", true)
36674
36674
  ])
36675
36675
  ], 6),
@@ -37106,7 +37106,7 @@ const _hoisted_3$V = {
37106
37106
  key: 1,
37107
37107
  class: "rdo-tree-select__empty"
37108
37108
  };
37109
- const _hoisted_4$I = ["title"];
37109
+ const _hoisted_4$H = ["title"];
37110
37110
  const _hoisted_5$x = { class: "rdo-tree-select__value-text" };
37111
37111
  const _hoisted_6$o = {
37112
37112
  key: 0,
@@ -37335,7 +37335,7 @@ const _sfc_main$31 = /* @__PURE__ */ defineComponent({
37335
37335
  }, [
37336
37336
  createElementVNode("span", _hoisted_5$x, toDisplayString(selectedDisplay.value.text), 1),
37337
37337
  selectedDisplay.value.showDefaultTag ? (openBlock(), createElementBlock("span", _hoisted_6$o, "默认")) : createCommentVNode("", true)
37338
- ], 8, _hoisted_4$I)) : (openBlock(), createElementBlock("span", _hoisted_7$j, toDisplayString(__props.placeholder), 1)),
37338
+ ], 8, _hoisted_4$H)) : (openBlock(), createElementBlock("span", _hoisted_7$j, toDisplayString(__props.placeholder), 1)),
37339
37339
  innerValue.value && __props.allowClear && !__props.disabled ? (openBlock(), createBlock(unref(GctIcon), {
37340
37340
  key: 2,
37341
37341
  class: "rdo-tree-select__clear",
@@ -39173,7 +39173,7 @@ const colorUtils$1 = {
39173
39173
  const _hoisted_1$1S = { class: "color-picker-container" };
39174
39174
  const _hoisted_2$1a = { class: "color-submenu-panel" };
39175
39175
  const _hoisted_3$T = { class: "color-content-standard" };
39176
- const _hoisted_4$H = { class: "items" };
39176
+ const _hoisted_4$G = { class: "items" };
39177
39177
  const _hoisted_5$w = ["onClick"];
39178
39178
  const _sfc_main$2$ = /* @__PURE__ */ defineComponent({
39179
39179
  __name: "ColorPicker",
@@ -39220,7 +39220,7 @@ const _sfc_main$2$ = /* @__PURE__ */ defineComponent({
39220
39220
  ]),
39221
39221
  createElementVNode("div", _hoisted_3$T, [
39222
39222
  _cache[1] || (_cache[1] = createElementVNode("div", { class: "title" }, "标准色", -1)),
39223
- createElementVNode("div", _hoisted_4$H, [
39223
+ createElementVNode("div", _hoisted_4$G, [
39224
39224
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(colorUtils$1).standard, (c2, idx) => {
39225
39225
  return openBlock(), createBlock(unref(_sfc_main$34), {
39226
39226
  key: "theme-" + idx,
@@ -49743,11 +49743,7 @@ class DataManager {
49743
49743
  }
49744
49744
  /** 收集与字段绑定相关的路径(含 value / label / href 及通配符变体) */
49745
49745
  collectFieldBindingPaths(designValuePath) {
49746
- const bases = [
49747
- designValuePath,
49748
- getLabelPath(designValuePath),
49749
- getHrefPath(designValuePath)
49750
- ];
49746
+ const bases = [designValuePath, getLabelPath(designValuePath), getHrefPath(designValuePath)];
49751
49747
  const wildcardKeys = new Set(bases.map((path) => this.convertPathToWildcard(path)));
49752
49748
  const result = new Set(bases);
49753
49749
  const scanTargets = [
@@ -53202,6 +53198,7 @@ const postApi = api.apaas.modelComprehensive.postBizServiceModelCategoryModelKey
53202
53198
  HttpUtil.use((inst) => {
53203
53199
  inst.interceptors.response.use((response) => {
53204
53200
  if (response.config.__useWordMessage && !response.data.ok) {
53201
+ response.data.message = void 0;
53205
53202
  GctMessage.error(response.data.subMessage);
53206
53203
  }
53207
53204
  return response;
@@ -53860,6 +53857,23 @@ class McWebRender extends MCRender {
53860
53857
  });
53861
53858
  }
53862
53859
  }
53860
+ const KEY = "_subFieldConfig";
53861
+ const getSubFieldConfig = (paramsConfig) => {
53862
+ return {
53863
+ init(subConfig) {
53864
+ if (!paramsConfig) return;
53865
+ paramsConfig[KEY] = subConfig;
53866
+ },
53867
+ get(valuePath) {
53868
+ if (!valuePath || !paramsConfig?.[KEY]) return {};
53869
+ return paramsConfig[KEY][valuePath] || {};
53870
+ },
53871
+ set(valuePath, subConfig) {
53872
+ if (!valuePath || !paramsConfig?.[KEY]) return;
53873
+ paramsConfig[KEY][valuePath] = subConfig;
53874
+ }
53875
+ };
53876
+ };
53863
53877
  class MCDataUtil {
53864
53878
  static allFields = [
53865
53879
  "product_id_",
@@ -53915,6 +53929,9 @@ class MCDataUtil {
53915
53929
  if (key.startsWith(`$.${subFieldKey}[${rowIndex}]`)) {
53916
53930
  dataManager.setFieldRuntimeSpecificConfig(key, { newDisabled: isConfirmed });
53917
53931
  }
53932
+ if ([`$.${subFieldKey}[${rowIndex}].qty_required_`, `$.${subFieldKey}[${rowIndex}].qty_consumed_`].includes(key)) {
53933
+ dataManager.setFieldRuntimeSpecificConfig(key, { newDisabled: true });
53934
+ }
53918
53935
  });
53919
53936
  }
53920
53937
  }
@@ -54327,20 +54344,58 @@ class MaterialConsumeTableController {
54327
54344
  }
54328
54345
  }
54329
54346
  }
54330
- /**
54331
- * 统一处理表格内部的字段的值变更
54332
- * @param opts
54333
- */
54334
- handleChange(opts) {
54335
- const { field, row, option } = opts;
54336
- console.log("handleChange", opts);
54337
- if (field === "product_id_") {
54338
- row.material_no_ = void 0;
54339
- row.qty_ = void 0;
54340
- this.setDefaultValue(row);
54341
- } else if (field === "material_no_") {
54342
- row.product_id_ = option.product_id_;
54343
- this.setDefaultValue(row);
54347
+ getDefaultValue(row) {
54348
+ const value = {};
54349
+ if (!row.routing_operation_id_) {
54350
+ value.routing_operation_id_ = this.tmplBomController.operationId;
54351
+ }
54352
+ if (row.product_id_) {
54353
+ const util = this.bomEntriesValidator.findUtilByProductId(row.product_id_);
54354
+ if (util) {
54355
+ value.qty_required_ = util.total;
54356
+ value.qty_consumed_ = util.hasConsumed;
54357
+ value.bom_entry_id_ = util.bomEntry.id_;
54358
+ }
54359
+ }
54360
+ return value;
54361
+ }
54362
+ handleSelectChange({
54363
+ changedData,
54364
+ selectedOption,
54365
+ doc,
54366
+ parsed,
54367
+ dataIndex
54368
+ }) {
54369
+ const { fieldKey, parentFieldKey, parentFieldPath } = parsed;
54370
+ if (["product_id_", "material_no_"].includes(fieldKey)) {
54371
+ const rowPath = `${parentFieldPath}[${dataIndex}]`;
54372
+ if (fieldKey === "product_id_") {
54373
+ const versionId = changedData[`${rowPath}.product_id_`]?.split(":").pop();
54374
+ if (versionId) {
54375
+ getSubFieldConfig(doc.paramsConfig).set(`${rowPath}.material_no_`, {
54376
+ "product_id_.versionIn": [versionId]
54377
+ });
54378
+ }
54379
+ doc.dataManager.setMultiple({
54380
+ [`${rowPath}.material_no_`]: void 0,
54381
+ [`${rowPath}.material_no__lb_`]: void 0,
54382
+ [`${rowPath}.qty_`]: void 0
54383
+ });
54384
+ } else if (fieldKey === "material_no_") {
54385
+ doc.dataManager.setMultiple({
54386
+ [`${rowPath}.product_id_`]: selectedOption.product_id_
54387
+ // [`${rowPath}.product_id__lb_`]: record.product_id__lb_, // 目前取不到
54388
+ });
54389
+ }
54390
+ const rowData = doc.dataManager.getRawData()[parentFieldKey][dataIndex];
54391
+ const value = this.getDefaultValue(rowData);
54392
+ const wordValue = Object.entries(value).reduce((data, [key, value2]) => {
54393
+ data[`${rowPath}.${key}`] = value2;
54394
+ return data;
54395
+ }, {});
54396
+ doc.dataManager.setMultiple(wordValue);
54397
+ doc.dataManager.setFieldRuntimeSpecificConfig(`${rowPath}.qty_required_`, { newDisabled: true });
54398
+ doc.dataManager.setFieldRuntimeSpecificConfig(`${rowPath}.qty_consumed_`, { newDisabled: true });
54344
54399
  }
54345
54400
  }
54346
54401
  }
@@ -54353,7 +54408,7 @@ class FormTmplBomController {
54353
54408
  materialNo;
54354
54409
  /** 历史填报数据 */
54355
54410
  historyData = [];
54356
- /** 表单控制器(key是tableKey) */
54411
+ /** 表单控制器(key是 valuePath) */
54357
54412
  tableControllers = {};
54358
54413
  /** 字段key和tableKey的映射 */
54359
54414
  field2TableMap = {};
@@ -54434,16 +54489,14 @@ class FormTmplBomController {
54434
54489
  }
54435
54490
  /**
54436
54491
  * 根据字段key获取子表控制器
54437
- * @param field
54438
- * @return {*}
54439
54492
  */
54440
- // findTableControllerByField(field: string) {
54441
- // return this.tableControllers[this.field2TableMap[field]!];
54493
+ // findTableControllerByField(subFieldKey: string) {
54494
+ // return this.tableControllers[subFieldKey];
54442
54495
  // }
54496
+ // 方法废弃,word 里改在初始化时记录到 paramsConfig
54443
54497
  /**
54444
54498
  * 处理字段组件
54445
54499
  * - 补充物料字段的额外查询条件
54446
- * @param field
54447
54500
  */
54448
54501
  // handleField(field: any) {
54449
54502
  // const { subFieldKey, fieldType } = field;
@@ -55075,6 +55128,7 @@ const apiFetchers = {
55075
55128
  const result = await api.apaas.designerCommon.getGetCanBeUsedOrgUser({
55076
55129
  modelKey,
55077
55130
  fieldKey,
55131
+ onlyHasSeat: true,
55078
55132
  pageSize: API_CONFIG.USER_PAGE_SIZE
55079
55133
  });
55080
55134
  const { data = [], totalCount, totalPage } = result || {};
@@ -103348,7 +103402,7 @@ async function prepareDocumentRenderData(options) {
103348
103402
  });
103349
103403
  }
103350
103404
  async function initializeDocumentEngine(props, payload, result) {
103351
- const { id, requestInfo, fillModeType, paramsConfig } = result;
103405
+ const { id, requestInfo, fillModeType, paramsConfig, tmplBomC } = result;
103352
103406
  const materialNo = paramsConfig?.materialNo || requestInfo.materialNo;
103353
103407
  const { mainModelKey, masterSlaveList } = await prepareDocumentFieldContext({
103354
103408
  requestInfo,
@@ -103380,6 +103434,14 @@ async function initializeDocumentEngine(props, payload, result) {
103380
103434
  r.widgetMeta.props = matchedBom;
103381
103435
  });
103382
103436
  }
103437
+ if (paramsConfig && tmplBomC?.formInstBom?.formTmplBomList) {
103438
+ const subConfig = {};
103439
+ tmplBomC.formInstBom.formTmplBomList.forEach(({ table_key_, entries_ }) => {
103440
+ const includedIds = (entries_ || []).map((e) => e.product_id_.split(":").pop());
103441
+ subConfig[`${table_key_}[n].product_id_`] = { "id_.in": includedIds };
103442
+ });
103443
+ getSubFieldConfig(paramsConfig).init(subConfig);
103444
+ }
103383
103445
  const instances = docModel.getWidgetInstances();
103384
103446
  if (fillModeType !== DocModeTypeConst.Edit) {
103385
103447
  instances.forEach((instance2) => {
@@ -105071,13 +105133,13 @@ function getDropdownOverlayActionConfig(type4, options) {
105071
105133
  icon: "icon-saoyisao",
105072
105134
  actionType: "scan-dialog",
105073
105135
  dialogKey: "device-scan",
105074
- tooltip: "点击可切换到搜索模式"
105136
+ tooltip: "双击可切换到搜索模式"
105075
105137
  };
105076
105138
  }
105077
105139
  return {
105078
105140
  icon: "icon-pad_search",
105079
105141
  actionType: "scan-dropdown",
105080
- tooltip: "点击可切换到扫码模式"
105142
+ tooltip: "双击可切换到扫码模式"
105081
105143
  };
105082
105144
  }
105083
105145
  const supported = getSupportedDropdownTypes();
@@ -106299,16 +106361,21 @@ Schema.warning = warning;
106299
106361
  Schema.messages = messages;
106300
106362
  Schema.validators = validators;
106301
106363
  const buildError = (validatorInfo, message) => JSON.stringify({ ...validatorInfo, message });
106302
- const createRule = (validator2, message) => ({
106364
+ const createRule = (validator2, message, trigger = "change") => ({
106303
106365
  required: true,
106304
106366
  validator: validator2,
106305
- message
106367
+ message,
106368
+ trigger
106306
106369
  });
106307
106370
  const requiredRule = (ctx) => {
106308
106371
  if (!ctx.showRequired) return null;
106309
- return createRule((_rule, value, _callback, _source, _options) => {
106310
- return !isEmptyValue$1(value);
106311
- }, buildError(ctx.validatorInfo, "字段为必填项!"));
106372
+ return createRule(
106373
+ (_rule, value, _callback, _source, _options) => {
106374
+ return !isEmptyValue$1(value);
106375
+ },
106376
+ buildError(ctx.validatorInfo, "字段为必填项!"),
106377
+ "manual"
106378
+ );
106312
106379
  };
106313
106380
  const minNumberRule = (ctx) => {
106314
106381
  if (ctx.enableRangeValidate && ctx.minValidateMode === RangeValidateModeTypeConst.Fixed_Number) {
@@ -106338,6 +106405,7 @@ const minNumberFormulaRule = (ctx) => {
106338
106405
  if (ctx.enableRangeValidate && ctx.minValidateMode === RangeValidateModeTypeConst.Variable_Validate && ctx.minFormulaExpr) {
106339
106406
  return {
106340
106407
  required: true,
106408
+ trigger: "change",
106341
106409
  async validator(_rule, value, _callback, _source, _options) {
106342
106410
  const rawData = ctx.getRawData();
106343
106411
  const subRowData = ctx.getSubRowFormData(ctx.validatorInfo.runtimeValuePath);
@@ -106360,6 +106428,7 @@ const maxNumberFormulaRule = (ctx) => {
106360
106428
  if (ctx.enableRangeValidate && ctx.maxValidateMode === RangeValidateModeTypeConst.Variable_Validate && ctx.maxFormulaExpr) {
106361
106429
  return {
106362
106430
  required: true,
106431
+ trigger: "change",
106363
106432
  async validator(_rule, value, _callback, _source, _options) {
106364
106433
  const rawData = ctx.getRawData();
106365
106434
  const subRowData = ctx.getSubRowFormData(ctx.validatorInfo.runtimeValuePath);
@@ -106410,6 +106479,7 @@ const minTimeFormulaRule = (ctx) => {
106410
106479
  if (ctx.enableRangeValidate && ctx.minDateValidateMode === RangeValidateModeTypeConst.Variable_Validate && ctx.minDateFormulaExpr) {
106411
106480
  return {
106412
106481
  required: true,
106482
+ trigger: "change",
106413
106483
  async validator(_rule, value, _callback, _source, _options) {
106414
106484
  const rawData = ctx.getRawData();
106415
106485
  const subRowData = ctx.getSubRowFormData(ctx.validatorInfo.runtimeValuePath);
@@ -106439,6 +106509,7 @@ const maxTimeFormulaRule = (ctx) => {
106439
106509
  if (ctx.enableRangeValidate && ctx.maxDateValidateMode === RangeValidateModeTypeConst.Variable_Validate && ctx.maxDateFormulaExpr) {
106440
106510
  return {
106441
106511
  required: true,
106512
+ trigger: "change",
106442
106513
  async validator(_rule, value, _callback, _source, _options) {
106443
106514
  const rawData = ctx.getRawData();
106444
106515
  const subRowData = ctx.getSubRowFormData(ctx.validatorInfo.runtimeValuePath);
@@ -106464,6 +106535,17 @@ const maxTimeFormulaRule = (ctx) => {
106464
106535
  }
106465
106536
  return null;
106466
106537
  };
106538
+ function filterRulesByTrigger(rules2, trigger) {
106539
+ if (trigger === "all") return rules2;
106540
+ return rules2.filter((rule) => {
106541
+ const ruleTrigger = rule.trigger;
106542
+ if (!ruleTrigger) return trigger === "change";
106543
+ if (trigger === "blur") {
106544
+ return ruleTrigger === "blur" || ruleTrigger === "change";
106545
+ }
106546
+ return ruleTrigger === trigger;
106547
+ });
106548
+ }
106467
106549
  const assembleRules = (ctx) => {
106468
106550
  const rules2 = [
106469
106551
  requiredRule(ctx),
@@ -106504,13 +106586,49 @@ function createValidateAll() {
106504
106586
  }
106505
106587
  };
106506
106588
  }
106589
+ async function waitForDataSettle() {
106590
+ await nextTick();
106591
+ await new Promise((resolve) => setTimeout(resolve, 0));
106592
+ }
106593
+ const DEBOUNCE_MS$1 = 300;
106594
+ const schedulersByDocId = /* @__PURE__ */ new Map();
106595
+ function getScheduler(doc) {
106596
+ let scheduler = schedulersByDocId.get(doc.id);
106597
+ if (!scheduler) {
106598
+ scheduler = { debounceTimer: null, running: false, pendingTrigger: "change" };
106599
+ schedulersByDocId.set(doc.id, scheduler);
106600
+ }
106601
+ return scheduler;
106602
+ }
106603
+ function clearScheduler(doc) {
106604
+ const scheduler = schedulersByDocId.get(doc.id);
106605
+ if (!scheduler) return;
106606
+ if (scheduler.debounceTimer) {
106607
+ clearTimeout(scheduler.debounceTimer);
106608
+ scheduler.debounceTimer = null;
106609
+ }
106610
+ schedulersByDocId.delete(doc.id);
106611
+ }
106612
+ function pruneStaleValidationComments(doc, map) {
106613
+ if (!map) return null;
106614
+ const validPaths = new Set(listWidgetValuePaths(doc));
106615
+ const next = {};
106616
+ for (const [path, errors] of Object.entries(map)) {
106617
+ if (validPaths.has(path)) {
106618
+ next[path] = errors;
106619
+ }
106620
+ }
106621
+ return Object.keys(next).length ? next : null;
106622
+ }
106507
106623
  function showValidationComments(doc, map) {
106508
- doc.eventManager.dispatchCustom("inter:show-validation-comment", map);
106624
+ doc.eventManager.dispatchCustom(
106625
+ "inter:show-validation-comment",
106626
+ pruneStaleValidationComments(doc, map)
106627
+ );
106509
106628
  }
106510
- function hasValidationComments(doc) {
106511
- if (!doc) return false;
106512
- const map = doc.interactionManager.get("validationCommentMap");
106513
- return !!map && Object.keys(map).length > 0;
106629
+ function pruneValidationComments(doc) {
106630
+ const current = doc.interactionManager.get("validationCommentMap");
106631
+ showValidationComments(doc, current);
106514
106632
  }
106515
106633
  function findLayoutNodeByValuePath(doc, runtimeValuePath) {
106516
106634
  let found;
@@ -106591,72 +106709,113 @@ function buildWidgetValidationPayload(doc, widget) {
106591
106709
  rules: rules2
106592
106710
  };
106593
106711
  }
106594
- const validateAllFields = async (doc) => {
106712
+ function clearResolvedManualErrors(doc, map) {
106713
+ if (!map) return map;
106714
+ const next = { ...map };
106715
+ for (const path of Object.keys(next)) {
106716
+ const widget = findLayoutNodeByValuePath(doc, path);
106717
+ const payload = widget ? buildWidgetValidationPayload(doc, widget) : null;
106718
+ if (!payload) continue;
106719
+ const hasManual = filterRulesByTrigger(payload.rules, "manual").length > 0;
106720
+ const hasLive = filterRulesByTrigger(payload.rules, "change").length > 0;
106721
+ if (hasManual && !hasLive && !isEmptyValue$1(payload.value)) {
106722
+ delete next[path];
106723
+ }
106724
+ }
106725
+ return Object.keys(next).length ? next : null;
106726
+ }
106727
+ function mergeLiveValidation(doc, liveResult, livePaths) {
106728
+ const current = doc.interactionManager.get("validationCommentMap");
106729
+ const base = current && Object.keys(current).length ? { ...current } : {};
106730
+ for (const path of livePaths) {
106731
+ if (liveResult?.[path]) {
106732
+ base[path] = liveResult[path];
106733
+ } else {
106734
+ delete base[path];
106735
+ }
106736
+ }
106737
+ const merged = Object.keys(base).length ? base : liveResult;
106738
+ return clearResolvedManualErrors(doc, merged);
106739
+ }
106740
+ async function runValidation(doc, mode) {
106595
106741
  const formState = {};
106596
106742
  const formRules = {};
106743
+ const livePaths = [];
106597
106744
  for (const runtimeValuePath of listWidgetValuePaths(doc)) {
106598
106745
  const widget = findLayoutNodeByValuePath(doc, runtimeValuePath);
106599
106746
  if (!widget) continue;
106600
106747
  const payload = buildWidgetValidationPayload(doc, widget);
106601
106748
  if (!payload) continue;
106749
+ const activeRules = filterRulesByTrigger(payload.rules, mode);
106750
+ if (!activeRules.length) continue;
106602
106751
  formState[payload.runtimeValuePath] = payload.value;
106603
- formRules[payload.runtimeValuePath] = payload.rules;
106752
+ formRules[payload.runtimeValuePath] = activeRules;
106753
+ if (mode !== "all") {
106754
+ livePaths.push(payload.runtimeValuePath);
106755
+ }
106756
+ }
106757
+ if (!Object.keys(formRules).length) {
106758
+ if (mode === "all") {
106759
+ showValidationComments(doc, null);
106760
+ }
106761
+ return null;
106604
106762
  }
106605
106763
  const validateAll = createValidateAll();
106606
106764
  const result = await validateAll(formRules, formState);
106607
106765
  console.log("validateAllFields", result);
106608
- showValidationComments(doc, result);
106766
+ if (mode === "all") {
106767
+ showValidationComments(doc, result);
106768
+ } else {
106769
+ showValidationComments(doc, mergeLiveValidation(doc, result, livePaths));
106770
+ }
106609
106771
  return result;
106610
- };
106611
- const DEBOUNCE_MS$1 = 300;
106612
- const schedulers = /* @__PURE__ */ new WeakMap();
106613
- function registerDocValidationRefresh(doc, options) {
106614
- let debounceTimer = null;
106615
- let running = false;
106616
- const scheduler = {
106617
- schedule(opts) {
106618
- if (options.isSuppressed()) return;
106619
- if (!hasValidationComments(doc)) return;
106620
- if (debounceTimer) {
106621
- clearTimeout(debounceTimer);
106622
- debounceTimer = null;
106623
- }
106624
- const run = async () => {
106625
- if (running || options.isSuppressed()) return;
106626
- running = true;
106627
- try {
106628
- await waitForDataManagerSettle();
106629
- if (!hasValidationComments(doc)) return;
106630
- await validateAllFields(doc);
106631
- } finally {
106632
- running = false;
106633
- }
106634
- };
106635
- if (opts?.immediate) {
106636
- void run();
106637
- return;
106638
- }
106639
- debounceTimer = setTimeout(() => {
106640
- debounceTimer = null;
106641
- void run();
106642
- }, DEBOUNCE_MS$1);
106643
- },
106644
- dispose() {
106645
- if (debounceTimer) {
106646
- clearTimeout(debounceTimer);
106647
- debounceTimer = null;
106648
- }
106772
+ }
106773
+ async function executeValidation(doc, trigger) {
106774
+ const scheduler = getScheduler(doc);
106775
+ if (scheduler.running) {
106776
+ scheduler.pendingTrigger = trigger === "all" ? "all" : trigger;
106777
+ return;
106778
+ }
106779
+ scheduler.running = true;
106780
+ try {
106781
+ await waitForDataSettle();
106782
+ await runValidation(doc, trigger);
106783
+ const pending = scheduler.pendingTrigger;
106784
+ scheduler.pendingTrigger = "change";
106785
+ if (pending !== trigger) {
106786
+ await runValidation(doc, pending);
106649
106787
  }
106650
- };
106651
- schedulers.set(doc, scheduler);
106652
- return () => {
106653
- scheduler.dispose();
106654
- schedulers.delete(doc);
106655
- };
106788
+ } finally {
106789
+ scheduler.running = false;
106790
+ }
106656
106791
  }
106657
- function requestValidationRefresh(doc, immediate = false) {
106658
- schedulers.get(doc)?.schedule({ immediate });
106792
+ function requestFullValidation(doc, options = {}) {
106793
+ const { immediate = false, trigger = "change" } = options;
106794
+ const scheduler = getScheduler(doc);
106795
+ if (immediate) {
106796
+ if (scheduler.debounceTimer) {
106797
+ clearTimeout(scheduler.debounceTimer);
106798
+ scheduler.debounceTimer = null;
106799
+ }
106800
+ void executeValidation(doc, trigger);
106801
+ return;
106802
+ }
106803
+ scheduler.pendingTrigger = trigger;
106804
+ if (scheduler.debounceTimer) {
106805
+ clearTimeout(scheduler.debounceTimer);
106806
+ }
106807
+ scheduler.debounceTimer = setTimeout(() => {
106808
+ scheduler.debounceTimer = null;
106809
+ void executeValidation(doc, scheduler.pendingTrigger);
106810
+ }, DEBOUNCE_MS$1);
106659
106811
  }
106812
+ function disposeDocValidationScheduler(doc) {
106813
+ clearScheduler(doc);
106814
+ }
106815
+ const validateAllFields = async (doc) => {
106816
+ await waitForDataSettle();
106817
+ return runValidation(doc, "all");
106818
+ };
106660
106819
  const _sfc_main$2O = /* @__PURE__ */ defineComponent({
106661
106820
  __name: "overlay-render",
106662
106821
  props: {
@@ -106670,6 +106829,7 @@ const _sfc_main$2O = /* @__PURE__ */ defineComponent({
106670
106829
  },
106671
106830
  emits: ["enter", "leave"],
106672
106831
  setup(__props) {
106832
+ const tmplBomCRef = inject(TMPL_BOM_CONTROLLER);
106673
106833
  const interCtx = useInteractionContext();
106674
106834
  const designCtx = useDesignSuiteContext();
106675
106835
  const props = __props;
@@ -106743,16 +106903,21 @@ const _sfc_main$2O = /* @__PURE__ */ defineComponent({
106743
106903
  const showActionIcon = computed(() => !!actionConfig.value.icon);
106744
106904
  watch(
106745
106905
  () => [interCtx.focusModelId, interCtx.focusTick],
106746
- ([modelId], [oldModelId]) => {
106906
+ async ([modelId], [oldModelId]) => {
106747
106907
  const isCurrent = modelId === props.modelId;
106748
106908
  const wasCurrent = oldModelId === props.modelId;
106749
106909
  if (wasCurrent && !isCurrent) {
106750
106910
  console.log("blur");
106751
- props.doc.eventManager.dispatchCustom("ime:commit-validate", {
106752
- valuePath: runtimeValuePath.value,
106753
- formats: buildNumberFormats(widgetProps.value, widgetType.value)
106754
- });
106755
- requestValidationRefresh(props.doc);
106911
+ const commitTasks = props.doc.eventManager.dispatchCustom(
106912
+ "ime:commit-validate",
106913
+ {
106914
+ valuePath: runtimeValuePath.value,
106915
+ formats: buildNumberFormats(widgetProps.value, widgetType.value)
106916
+ }
106917
+ );
106918
+ await Promise.all(commitTasks);
106919
+ await waitForDataManagerSettle();
106920
+ requestFullValidation(props.doc, { immediate: true, trigger: "blur" });
106756
106921
  }
106757
106922
  if (isCurrent) {
106758
106923
  console.log("focus");
@@ -106801,7 +106966,6 @@ const _sfc_main$2O = /* @__PURE__ */ defineComponent({
106801
106966
  designCtx.runtime.getMasterSlaveFieldList(props.doc.mainModelKey)
106802
106967
  );
106803
106968
  props.doc.dataManager.setMultiple({ ...payload, ...dataValues });
106804
- requestValidationRefresh(props.doc, true);
106805
106969
  }
106806
106970
  }
106807
106971
  });
@@ -106858,7 +107022,6 @@ const _sfc_main$2O = /* @__PURE__ */ defineComponent({
106858
107022
  const savedValue = await bodyRef?.value?.onSave?.();
106859
107023
  if (!savedValue) return;
106860
107024
  props.doc.dataManager.setMultiple(savedValue);
106861
- requestValidationRefresh(props.doc, true);
106862
107025
  close();
106863
107026
  } catch (error) {
106864
107027
  GctMessage.warning("业务处理失败,请联系管理员");
@@ -106876,7 +107039,26 @@ const _sfc_main$2O = /* @__PURE__ */ defineComponent({
106876
107039
  designCtx.runtime.getMasterSlaveFieldList(props.doc.mainModelKey)
106877
107040
  );
106878
107041
  props.doc.dataManager.setMultiple({ ...data, ...dataValues });
106879
- requestValidationRefresh(props.doc, true);
107042
+ const subFieldValuePath = props.widget.widgetMeta?.field?.valuePath;
107043
+ const dataIndex = props.widget.dataSlotIndex?.dataIndex;
107044
+ if (subFieldValuePath && isNumber(dataIndex)) {
107045
+ const parsed = parseValuePath(subFieldValuePath);
107046
+ const { parentFieldPath } = parsed;
107047
+ const allRegions = props.doc.model?.document.body.children.flatMap(
107048
+ (w2) => w2.name === "w:tbl" ? w2.regions : []
107049
+ );
107050
+ const isMaterialConsumeTable = allRegions?.find((r) => r.valuePath === parentFieldPath)?.type === "material-consume-table";
107051
+ if (isMaterialConsumeTable && tmplBomCRef?.value) {
107052
+ const tableController = tmplBomCRef.value.tableControllers[parentFieldPath];
107053
+ tableController?.handleSelectChange({
107054
+ changedData: data,
107055
+ selectedOption: record,
107056
+ doc: props.doc,
107057
+ parsed,
107058
+ dataIndex
107059
+ });
107060
+ }
107061
+ }
106880
107062
  }
106881
107063
  return (_ctx, _cache) => {
106882
107064
  return isTargetReady.value ? (openBlock(), createBlock(Teleport, {
@@ -106940,7 +107122,7 @@ const _sfc_main$2O = /* @__PURE__ */ defineComponent({
106940
107122
  };
106941
107123
  }
106942
107124
  });
106943
- const OverlayRender = /* @__PURE__ */ _export_sfc(_sfc_main$2O, [["__scopeId", "data-v-d9277289"]]);
107125
+ const OverlayRender = /* @__PURE__ */ _export_sfc(_sfc_main$2O, [["__scopeId", "data-v-4da4215f"]]);
106944
107126
  let activeHoverId = 0;
106945
107127
  function useHoverDelay(callback, delay = 120) {
106946
107128
  let timer = null;
@@ -108640,7 +108822,7 @@ function useTableSelection() {
108640
108822
  const _hoisted_1$1L = { class: "col-headers" };
108641
108823
  const _hoisted_2$17 = ["onMouseenter"];
108642
108824
  const _hoisted_3$R = ["onClick"];
108643
- const _hoisted_4$G = ["onMousedown"];
108825
+ const _hoisted_4$F = ["onMousedown"];
108644
108826
  const _hoisted_5$v = { class: "row-headers" };
108645
108827
  const _hoisted_6$n = ["onMouseenter"];
108646
108828
  const _hoisted_7$i = ["onClick"];
@@ -108931,7 +109113,7 @@ const _sfc_main$2A = /* @__PURE__ */ defineComponent({
108931
109113
  height: `${__props.tableHeight}px`
108932
109114
  }),
108933
109115
  onMousedown: ($event) => onResizeMouseDown("col", colIndex, $event)
108934
- }, null, 46, _hoisted_4$G)
109116
+ }, null, 46, _hoisted_4$F)
108935
109117
  ]);
108936
109118
  }), 128))
108937
109119
  ]),
@@ -109227,16 +109409,26 @@ const _sfc_main$2x = /* @__PURE__ */ defineComponent({
109227
109409
  }
109228
109410
  });
109229
109411
  const _hoisted_1$1K = { class: "sub-table-action-bar" };
109230
- const _hoisted_2$16 = { class: "material-consume-menu" };
109231
- const _hoisted_3$Q = ["onClick"];
109232
- const _hoisted_4$F = { class: "sub-table-btn scan-btn" };
109233
- const _hoisted_5$u = { class: "sub-table-action-content" };
109234
- const _hoisted_6$m = { class: "action-group" };
109235
- const _hoisted_7$h = { class: "insert-row-container" };
109236
- const _hoisted_8$e = { class: "insert-row-item" };
109237
- const _hoisted_9$a = { class: "insert-row-item" };
109238
- const _hoisted_10$7 = { class: "sub-table-btn" };
109239
- const _hoisted_11$5 = { class: "sub-table-btn" };
109412
+ const _hoisted_2$16 = { class: "sub-table-action-popper" };
109413
+ const _hoisted_3$Q = {
109414
+ key: 0,
109415
+ class: "action-menu"
109416
+ };
109417
+ const _hoisted_4$E = ["onClick"];
109418
+ const _hoisted_5$u = { class: "item-label" };
109419
+ const _hoisted_6$m = { class: "action-menu" };
109420
+ const _hoisted_7$h = { class: "item-icon" };
109421
+ const _hoisted_8$e = { class: "item-icon" };
109422
+ const _hoisted_9$a = { class: "item-icon scale-large" };
109423
+ const _hoisted_10$7 = { class: "item-label flex-between-center" };
109424
+ const _hoisted_11$5 = { class: "item-icon scale-large" };
109425
+ const _hoisted_12$4 = { class: "item-label flex-between-center" };
109426
+ const _hoisted_13$3 = {
109427
+ key: 1,
109428
+ class: "action-menu"
109429
+ };
109430
+ const _hoisted_14$3 = { class: "item-icon" };
109431
+ const _hoisted_15$2 = { class: "more-btn" };
109240
109432
  const _sfc_main$2w = /* @__PURE__ */ defineComponent({
109241
109433
  __name: "sub-table-action",
109242
109434
  props: {
@@ -109252,12 +109444,6 @@ const _sfc_main$2w = /* @__PURE__ */ defineComponent({
109252
109444
  const props = __props;
109253
109445
  const mainFields = designCtx.runtime.getFieldList(props.doc.mainModelKey);
109254
109446
  const HOVER_DELAY = { show: 200, hide: 150 };
109255
- const materialMenus = [
109256
- { label: "条码扫描", value: "scan" },
109257
- { label: "BOM", value: "bom" },
109258
- { label: "条码解析规则变更", value: "change" }
109259
- ];
109260
- const insertMoreRef = ref(null);
109261
109447
  const formState = reactive({
109262
109448
  upRowNum: 1,
109263
109449
  downRowNum: 1
@@ -109287,21 +109473,33 @@ const _sfc_main$2w = /* @__PURE__ */ defineComponent({
109287
109473
  const isMaterialConsumeTable = computed(() => {
109288
109474
  return props.cell?.subRenderer?.type === "material-consume-table";
109289
109475
  });
109290
- const isMaterialConsumeTableConfirmed = computed(() => {
109291
- const { subFieldKey } = getCtx();
109292
- const { dataIndex: rowIndex } = props.cell.subRenderer;
109476
+ const computedInfo = computed(() => {
109477
+ const { index: rowIndex, subFieldKey } = getCtx();
109293
109478
  const tableData = docInst.value.dataManager.getRawData()[subFieldKey] ?? [];
109294
- return tableData[rowIndex]?.is_confirmed_;
109479
+ const isDeleteBtnVisible = tableData.length >= 2;
109480
+ const isRowConfirmed = !!tableData[rowIndex]?.is_confirmed_;
109481
+ return {
109482
+ isDeleteBtnVisible,
109483
+ isRowConfirmed
109484
+ };
109485
+ });
109486
+ const materialMenuList = computed(() => {
109487
+ return [
109488
+ { icon: "icon-bianji", label: "编辑行", value: "edit", visible: computedInfo.value.isRowConfirmed },
109489
+ { icon: "icon-saoyisao", label: "条码扫描", value: "scan", visible: props.isLastGroup },
109490
+ { icon: "icon-a-bom11", label: "BOM", value: "bom", visible: props.isLastGroup },
109491
+ { icon: "icon-tiaomajiexi", label: "条码解析规则变更", value: "change", visible: props.isLastGroup }
109492
+ ];
109295
109493
  });
109296
109494
  const handleMaterialConsumeAction = async (val) => {
109297
109495
  if (!tmplBomCRef?.value?.tableControllers || !props.cell?.subRenderer?.valuePath) return;
109298
109496
  const tableController = tmplBomCRef.value.tableControllers[props.cell.subRenderer.valuePath];
109299
109497
  if (!tableController) return;
109300
- const { subFieldKey } = getCtx();
109498
+ const { index: rowIndex, subFieldKey } = getCtx();
109301
109499
  if (!subFieldKey) return;
109302
109500
  const { dataManager } = docInst.value;
109303
109501
  const tableData = dataManager.getRawData()[subFieldKey] ?? [];
109304
- const { dataIndex: rowIndex, tableName } = props.cell.subRenderer;
109502
+ const { tableName } = props.cell.subRenderer;
109305
109503
  let row = tableData[rowIndex];
109306
109504
  const insertEmptyRow = (row2, rowIndex2, cb) => {
109307
109505
  if (!row2) {
@@ -109340,7 +109538,7 @@ const _sfc_main$2w = /* @__PURE__ */ defineComponent({
109340
109538
  const { path, index: index2 } = getCtx();
109341
109539
  const storageIndex = props.doc.dataManager.resolveSubtableVisibleIndex(path, index2);
109342
109540
  const data = props.doc.dataManager.get(`${path}[${storageIndex}]`) || {};
109343
- props.doc.dataManager.insertAt(path, index2 + 1, data);
109541
+ props.doc.dataManager.insertAt(path, index2 + 1, omit(data, "id_"));
109344
109542
  };
109345
109543
  const actionHandlers = {
109346
109544
  insertRowAfter() {
@@ -109359,7 +109557,6 @@ const _sfc_main$2w = /* @__PURE__ */ defineComponent({
109359
109557
  copyCurrentRow: copyRow
109360
109558
  };
109361
109559
  const handleAction = (key) => {
109362
- insertMoreRef.value?.hide?.();
109363
109560
  actionHandlers[key]?.();
109364
109561
  formState.upRowNum = 1;
109365
109562
  formState.downRowNum = 1;
@@ -109370,167 +109567,139 @@ const _sfc_main$2w = /* @__PURE__ */ defineComponent({
109370
109567
  }, [
109371
109568
  !readonly2.value ? (openBlock(), createElementBlock("div", {
109372
109569
  key: 0,
109373
- class: "sub-table-action",
109570
+ class: "sub-table-action-container",
109374
109571
  style: normalizeStyle(__props.pos)
109375
109572
  }, [
109376
109573
  createElementVNode("div", _hoisted_1$1K, [
109377
- isMaterialConsumeTable.value && __props.isLastGroup && !isMaterialConsumeTableConfirmed.value ? (openBlock(), createElementBlock("div", {
109378
- key: 0,
109379
- class: "sub-table-btn confirm-btn",
109380
- onClick: _cache[0] || (_cache[0] = ($event) => handleMaterialConsumeAction("confirm"))
109381
- }, [
109382
- createVNode(unref(GctIcon), {
109383
- icon: "icon-tijiao1",
109384
- color: "#4ec262"
109385
- })
109386
- ])) : createCommentVNode("", true),
109387
- isMaterialConsumeTable.value && __props.isLastGroup ? (openBlock(), createBlock(unref(_sfc_main$3q), {
109388
- key: 1,
109389
- placement: "bottom-start",
109390
- triggers: ["hover"],
109391
- popperTriggers: ["hover"],
109392
- delay: HOVER_DELAY,
109393
- "instant-move": ""
109394
- }, {
109395
- popper: withCtx(() => [
109396
- createElementVNode("div", _hoisted_2$16, [
109397
- (openBlock(), createElementBlock(Fragment, null, renderList(materialMenus, (item) => {
109398
- return createElementVNode("div", {
109399
- key: item.value,
109400
- class: "menu-item",
109401
- onClick: ($event) => handleMaterialConsumeAction(item.value)
109402
- }, toDisplayString(item.label), 9, _hoisted_3$Q);
109403
- }), 64))
109404
- ])
109405
- ]),
109406
- default: withCtx(() => [
109407
- createElementVNode("div", _hoisted_4$F, [
109408
- createVNode(unref(GctIcon), {
109409
- icon: "icon-saoyisao",
109410
- color: "#5378ff"
109411
- })
109412
- ])
109413
- ]),
109414
- _: 1
109415
- })) : createCommentVNode("", true),
109416
109574
  createVNode(unref(_sfc_main$3q), {
109417
- placement: "right",
109418
- triggers: ["hover"],
109419
- popperTriggers: ["hover"],
109575
+ placement: "bottom-end",
109576
+ triggers: ["click"],
109577
+ popperTriggers: ["click"],
109420
109578
  delay: HOVER_DELAY,
109421
109579
  "instant-move": ""
109422
109580
  }, {
109423
109581
  popper: withCtx(() => [
109424
- createElementVNode("div", _hoisted_5$u, [
109582
+ createElementVNode("div", _hoisted_2$16, [
109583
+ isMaterialConsumeTable.value ? (openBlock(), createElementBlock("div", _hoisted_3$Q, [
109584
+ _cache[10] || (_cache[10] = createElementVNode("div", { class: "menu-title" }, "业务操作", -1)),
109585
+ (openBlock(true), createElementBlock(Fragment, null, renderList(materialMenuList.value.filter((o) => o.visible), (item) => {
109586
+ return openBlock(), createElementBlock("div", {
109587
+ key: item.value,
109588
+ class: "menu-item",
109589
+ onClick: ($event) => handleMaterialConsumeAction(item.value)
109590
+ }, [
109591
+ createElementVNode("div", {
109592
+ class: normalizeClass(["item-icon", item.value === "change" ? "scale-large" : void 0])
109593
+ }, [
109594
+ createVNode(unref(GctIcon), {
109595
+ icon: item.icon
109596
+ }, null, 8, ["icon"])
109597
+ ], 2),
109598
+ createElementVNode("div", _hoisted_5$u, toDisplayString(item.label), 1)
109599
+ ], 8, _hoisted_4$E);
109600
+ }), 128))
109601
+ ])) : createCommentVNode("", true),
109425
109602
  createElementVNode("div", _hoisted_6$m, [
109426
- isMaterialConsumeTable.value && isMaterialConsumeTableConfirmed.value ? (openBlock(), createElementBlock("div", {
109427
- key: 0,
109428
- class: "sub-table-btn",
109429
- onClick: _cache[1] || (_cache[1] = ($event) => handleMaterialConsumeAction("edit"))
109430
- }, [
109431
- createVNode(unref(GctIcon), {
109432
- icon: "icon-bianji",
109433
- color: "#fff"
109434
- })
109435
- ])) : createCommentVNode("", true),
109603
+ _cache[15] || (_cache[15] = createElementVNode("div", { class: "menu-title" }, "行编辑", -1)),
109436
109604
  createElementVNode("div", {
109437
- class: "sub-table-btn",
109438
- onClick: _cache[2] || (_cache[2] = ($event) => handleAction("insertRowAfter"))
109605
+ class: "menu-item",
109606
+ onClick: _cache[0] || (_cache[0] = ($event) => handleAction("insertRowAfter"))
109439
109607
  }, [
109440
- createVNode(unref(GctIcon), {
109441
- icon: "icon-tianjia",
109442
- color: "#fff"
109443
- })
109608
+ createElementVNode("div", _hoisted_7$h, [
109609
+ createVNode(unref(GctIcon), { icon: "icon-tianjia" })
109610
+ ]),
109611
+ _cache[11] || (_cache[11] = createElementVNode("div", { class: "item-label" }, " 加一行 ", -1))
109444
109612
  ]),
109445
109613
  createElementVNode("div", {
109446
- class: "sub-table-btn",
109447
- onClick: _cache[3] || (_cache[3] = ($event) => handleAction("copyCurrentRow"))
109614
+ class: "menu-item",
109615
+ onClick: _cache[1] || (_cache[1] = ($event) => handleAction("copyCurrentRow"))
109448
109616
  }, [
109449
- createVNode(unref(GctIcon), {
109450
- icon: "icon-fuzhihang",
109451
- color: "#fff"
109452
- })
109617
+ createElementVNode("div", _hoisted_8$e, [
109618
+ createVNode(unref(GctIcon), { icon: "icon-fuzhihang" })
109619
+ ]),
109620
+ _cache[12] || (_cache[12] = createElementVNode("div", { class: "item-label" }, " 复制行 ", -1))
109453
109621
  ]),
109454
- createVNode(unref(_sfc_main$3q), {
109455
- ref_key: "insertMoreRef",
109456
- ref: insertMoreRef,
109457
- placement: "bottom-start",
109458
- showTriggers: ["hover"],
109459
- popperShowTriggers: ["hover"],
109460
- popperHideTriggers: ["hover"],
109461
- delay: HOVER_DELAY,
109462
- distance: 6,
109463
- "instant-move": ""
109464
- }, {
109465
- popper: withCtx(() => [
109466
- createElementVNode("div", _hoisted_7$h, [
109467
- createElementVNode("div", _hoisted_8$e, [
109468
- createElementVNode("div", {
109469
- class: "title",
109470
- onClick: _cache[4] || (_cache[4] = ($event) => handleAction("insertRowBeforeMore"))
109471
- }, " 在上方插入行 "),
109472
- createVNode(unref(GctInputNumber), {
109473
- modelValue: formState.upRowNum,
109474
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => formState.upRowNum = $event),
109475
- min: 1,
109476
- integer: "",
109477
- style: { "width": "68px" }
109478
- }, null, 8, ["modelValue"])
109479
- ]),
109480
- createElementVNode("div", _hoisted_9$a, [
109481
- createElementVNode("div", {
109482
- class: "title",
109483
- onClick: _cache[6] || (_cache[6] = ($event) => handleAction("insertRowAfterMore"))
109484
- }, " 在下方插入行 "),
109485
- createVNode(unref(GctInputNumber), {
109486
- modelValue: formState.downRowNum,
109487
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => formState.downRowNum = $event),
109488
- min: 1,
109489
- integer: "",
109490
- style: { "width": "68px" }
109491
- }, null, 8, ["modelValue"])
109492
- ])
109493
- ])
109622
+ createElementVNode("div", {
109623
+ class: "menu-item",
109624
+ onClick: _cache[4] || (_cache[4] = ($event) => handleAction("insertRowBeforeMore"))
109625
+ }, [
109626
+ createElementVNode("div", _hoisted_9$a, [
109627
+ createVNode(unref(GctIcon), { icon: "icon-shangfangcharuhang" })
109494
109628
  ]),
109495
- default: withCtx(() => [
109496
- createElementVNode("div", _hoisted_10$7, [
109497
- createVNode(unref(GctIcon), {
109498
- icon: "icon-gengduo1",
109499
- color: "#fff"
109500
- })
109501
- ])
109629
+ createElementVNode("div", _hoisted_10$7, [
109630
+ _cache[13] || (_cache[13] = createElementVNode("div", null, " 在上方插入行 ", -1)),
109631
+ createVNode(unref(GctInputNumber), {
109632
+ modelValue: formState.upRowNum,
109633
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => formState.upRowNum = $event),
109634
+ min: 1,
109635
+ integer: "",
109636
+ style: { "width": "68px" },
109637
+ onClick: _cache[3] || (_cache[3] = withModifiers(() => {
109638
+ }, ["stop"]))
109639
+ }, null, 8, ["modelValue"])
109640
+ ])
109641
+ ]),
109642
+ createElementVNode("div", {
109643
+ class: "menu-item",
109644
+ onClick: _cache[7] || (_cache[7] = ($event) => handleAction("insertRowAfterMore"))
109645
+ }, [
109646
+ createElementVNode("div", _hoisted_11$5, [
109647
+ createVNode(unref(GctIcon), { icon: "icon-xiafangcharuhang" })
109502
109648
  ]),
109503
- _: 1
109504
- }, 512)
109649
+ createElementVNode("div", _hoisted_12$4, [
109650
+ _cache[14] || (_cache[14] = createElementVNode("div", null, " 在下方插入行 ", -1)),
109651
+ createVNode(unref(GctInputNumber), {
109652
+ modelValue: formState.downRowNum,
109653
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => formState.downRowNum = $event),
109654
+ min: 1,
109655
+ integer: "",
109656
+ style: { "width": "68px" },
109657
+ onClick: _cache[6] || (_cache[6] = withModifiers(() => {
109658
+ }, ["stop"]))
109659
+ }, null, 8, ["modelValue"])
109660
+ ])
109661
+ ])
109505
109662
  ]),
109506
- createElementVNode("div", {
109507
- class: "sub-table-btn delete-icon",
109508
- onClick: _cache[8] || (_cache[8] = ($event) => handleAction("deleteRowCurrent"))
109509
- }, [
109510
- createVNode(unref(GctIcon), {
109511
- icon: "icon-shanchu1",
109512
- color: "#fff"
109513
- })
109514
- ])
109663
+ computedInfo.value.isDeleteBtnVisible ? (openBlock(), createElementBlock("div", _hoisted_13$3, [
109664
+ createElementVNode("div", {
109665
+ class: "menu-item",
109666
+ onClick: _cache[8] || (_cache[8] = ($event) => handleAction("deleteRowCurrent"))
109667
+ }, [
109668
+ createElementVNode("div", _hoisted_14$3, [
109669
+ createVNode(unref(GctIcon), { icon: "icon-shanchu1" })
109670
+ ]),
109671
+ _cache[16] || (_cache[16] = createElementVNode("div", { class: "item-label" }, " 删除行 ", -1))
109672
+ ])
109673
+ ])) : createCommentVNode("", true)
109515
109674
  ])
109516
109675
  ]),
109517
109676
  default: withCtx(() => [
109518
- createElementVNode("div", _hoisted_11$5, [
109677
+ createElementVNode("div", _hoisted_15$2, [
109519
109678
  createVNode(unref(GctIcon), {
109520
- icon: "icon-neibuyingyong",
109521
- color: "#5378ff"
109679
+ icon: "icon-gengduo1",
109680
+ color: "#fff"
109522
109681
  })
109523
109682
  ])
109524
109683
  ]),
109525
109684
  _: 1
109526
- })
109685
+ }),
109686
+ isMaterialConsumeTable.value && __props.isLastGroup && !computedInfo.value.isRowConfirmed ? (openBlock(), createElementBlock("div", {
109687
+ key: 0,
109688
+ class: "confirm-btn",
109689
+ onClick: _cache[9] || (_cache[9] = ($event) => handleMaterialConsumeAction("confirm"))
109690
+ }, [
109691
+ createVNode(unref(GctIcon), {
109692
+ icon: "icon-tijiao1",
109693
+ color: "#4ec262"
109694
+ })
109695
+ ])) : createCommentVNode("", true)
109527
109696
  ])
109528
109697
  ], 4)) : createCommentVNode("", true)
109529
109698
  ], 8, ["to"]);
109530
109699
  };
109531
109700
  }
109532
109701
  });
109533
- const SubTableAction = /* @__PURE__ */ _export_sfc(_sfc_main$2w, [["__scopeId", "data-v-3228f8df"]]);
109702
+ const SubTableAction = /* @__PURE__ */ _export_sfc(_sfc_main$2w, [["__scopeId", "data-v-13501110"]]);
109534
109703
  const _sfc_main$2v = /* @__PURE__ */ defineComponent({
109535
109704
  __name: "index",
109536
109705
  props: {
@@ -110429,10 +110598,10 @@ function useDocLooperAutoSaveNotify(factory2, ops, options) {
110429
110598
  function useValidationFullSync(factory2, options) {
110430
110599
  let suppress = true;
110431
110600
  let unsubscribeData = null;
110432
- let unregisterRefresh = null;
110433
110601
  let stopWatchDoc = null;
110434
110602
  let stopWatchTick = null;
110435
110603
  let knownWidgetPaths = /* @__PURE__ */ new Set();
110604
+ let boundDoc = null;
110436
110605
  function isSuppressed() {
110437
110606
  return suppress || !!options?.suppressSignal?.value;
110438
110607
  }
@@ -110442,30 +110611,34 @@ function useValidationFullSync(factory2, options) {
110442
110611
  function disposeSubscriptions() {
110443
110612
  unsubscribeData?.();
110444
110613
  unsubscribeData = null;
110445
- unregisterRefresh?.();
110446
- unregisterRefresh = null;
110447
110614
  stopWatchTick?.();
110448
110615
  stopWatchTick = null;
110616
+ if (boundDoc) {
110617
+ disposeDocValidationScheduler(boundDoc);
110618
+ }
110619
+ boundDoc = null;
110449
110620
  }
110450
110621
  function bindDoc() {
110451
110622
  disposeSubscriptions();
110452
110623
  const doc = factory2.docIns.value;
110453
110624
  if (!doc) return;
110625
+ boundDoc = doc;
110454
110626
  snapshotWidgetPaths(doc);
110455
- unregisterRefresh = registerDocValidationRefresh(doc, { isSuppressed });
110456
110627
  unsubscribeData = doc.dataManager.subscribe("$", () => {
110457
- requestValidationRefresh(doc);
110628
+ if (isSuppressed()) return;
110629
+ requestFullValidation(doc, { trigger: "change" });
110458
110630
  });
110459
110631
  stopWatchTick = watch(
110460
110632
  () => factory2.docInfo.value.updateTick,
110461
110633
  () => {
110462
110634
  const currentDoc = factory2.docIns.value;
110463
- if (!currentDoc || !hasValidationComments(currentDoc)) return;
110635
+ if (!currentDoc || isSuppressed()) return;
110464
110636
  const currentPaths = new Set(listWidgetValuePaths(currentDoc));
110465
110637
  const hasRowStructureChange = [...currentPaths].some((path) => !knownWidgetPaths.has(path)) || [...knownWidgetPaths].some((path) => !currentPaths.has(path));
110466
110638
  if (!hasRowStructureChange) return;
110467
110639
  snapshotWidgetPaths(currentDoc);
110468
- requestValidationRefresh(currentDoc, true);
110640
+ pruneValidationComments(currentDoc);
110641
+ requestFullValidation(currentDoc, { immediate: true, trigger: "change" });
110469
110642
  }
110470
110643
  );
110471
110644
  }
@@ -111312,7 +111485,7 @@ const _sfc_main$2o = /* @__PURE__ */ defineComponent({
111312
111485
  const _hoisted_1$1E = { class: "color-picker-container" };
111313
111486
  const _hoisted_2$11 = { class: "color-content-auto" };
111314
111487
  const _hoisted_3$N = { class: "color-content-theme" };
111315
- const _hoisted_4$E = ["onClick"];
111488
+ const _hoisted_4$D = ["onClick"];
111316
111489
  const _hoisted_5$t = { class: "color-content-standard" };
111317
111490
  const _hoisted_6$l = { class: "items" };
111318
111491
  const _hoisted_7$g = ["onClick"];
@@ -111395,7 +111568,7 @@ const _sfc_main$2n = /* @__PURE__ */ defineComponent({
111395
111568
  class: "color-icon",
111396
111569
  style: normalizeStyle({ "background-color": c2.color }),
111397
111570
  onClick: ($event) => handleColorClick(c2.color)
111398
- }, null, 12, _hoisted_4$E))
111571
+ }, null, 12, _hoisted_4$D))
111399
111572
  ]),
111400
111573
  _: 2
111401
111574
  }, 1024);
@@ -111898,7 +112071,7 @@ const svgTableMaterialConsume = "data:image/svg+xml,%3c?xml%20version='1.0'%20st
111898
112071
  const _hoisted_1$1A = { class: "items-container" };
111899
112072
  const _hoisted_2$10 = { class: "ribbon-tab-item" };
111900
112073
  const _hoisted_3$M = { class: "ribbon-tab-item" };
111901
- const _hoisted_4$D = { class: "ribbon-tab-item" };
112074
+ const _hoisted_4$C = { class: "ribbon-tab-item" };
111902
112075
  const _hoisted_5$s = { class: "ribbon-tab-item" };
111903
112076
  const _hoisted_6$k = { class: "ribbon-tab-item" };
111904
112077
  const _hoisted_7$f = { class: "ribbon-tab-item" };
@@ -112205,7 +112378,7 @@ const _sfc_main$2j = /* @__PURE__ */ defineComponent({
112205
112378
  }, 8, ["modelValue", "options"])
112206
112379
  ]),
112207
112380
  _cache[27] || (_cache[27] = createElementVNode("div", { class: "split-divider" }, null, -1)),
112208
- createElementVNode("div", _hoisted_4$D, [
112381
+ createElementVNode("div", _hoisted_4$C, [
112209
112382
  createVNode(ButtonIcon, {
112210
112383
  tooltip: "加粗",
112211
112384
  iconExtraProps: { icon: "icon-Bold" },
@@ -112339,7 +112512,7 @@ const Ribbon = /* @__PURE__ */ _export_sfc(_sfc_main$2i, [["__scopeId", "data-v-
112339
112512
  const _hoisted_1$1y = { class: "toolkit-item" };
112340
112513
  const _hoisted_2$_ = { class: "toolkit-popper-wrap" };
112341
112514
  const _hoisted_3$L = { class: "toolkit-popper-title" };
112342
- const _hoisted_4$C = { class: "title" };
112515
+ const _hoisted_4$B = { class: "title" };
112343
112516
  const _hoisted_5$r = { class: "label" };
112344
112517
  const _sfc_main$2h = /* @__PURE__ */ defineComponent({
112345
112518
  __name: "toolkit-item",
@@ -112407,7 +112580,7 @@ const _sfc_main$2h = /* @__PURE__ */ defineComponent({
112407
112580
  fn: withCtx(() => [
112408
112581
  createElementVNode("div", _hoisted_2$_, [
112409
112582
  createElementVNode("div", _hoisted_3$L, [
112410
- createElementVNode("span", _hoisted_4$C, toDisplayString(__props.title), 1),
112583
+ createElementVNode("span", _hoisted_4$B, toDisplayString(__props.title), 1),
112411
112584
  createElementVNode("span", {
112412
112585
  class: "close",
112413
112586
  onClick: onClose
@@ -112579,7 +112752,7 @@ function createDesignPaperWidgetToWidgetFactory(getManifest) {
112579
112752
  const _hoisted_1$1x = { class: "content-fields-wrapper" };
112580
112753
  const _hoisted_2$Z = { class: "search" };
112581
112754
  const _hoisted_3$K = { class: "container" };
112582
- const _hoisted_4$B = { class: "item main" };
112755
+ const _hoisted_4$A = { class: "item main" };
112583
112756
  const _hoisted_5$q = {
112584
112757
  key: 0,
112585
112758
  class: "field-list-wrap"
@@ -112687,7 +112860,7 @@ const _sfc_main$2g = /* @__PURE__ */ defineComponent({
112687
112860
  }, 8, ["modelValue"])
112688
112861
  ]),
112689
112862
  createElementVNode("div", _hoisted_3$K, [
112690
- createElementVNode("div", _hoisted_4$B, toDisplayString(unref(modelMeta)?.modelName), 1),
112863
+ createElementVNode("div", _hoisted_4$A, toDisplayString(unref(modelMeta)?.modelName), 1),
112691
112864
  filteredFields.value.length ? (openBlock(), createElementBlock("div", _hoisted_5$q, [
112692
112865
  createVNode(unref(GctScrollbar), null, {
112693
112866
  default: withCtx(() => [
@@ -112875,7 +113048,7 @@ const _hoisted_3$I = {
112875
113048
  key: 0,
112876
113049
  class: "breadcrumb"
112877
113050
  };
112878
- const _hoisted_4$A = {
113051
+ const _hoisted_4$z = {
112879
113052
  key: 1,
112880
113053
  class: "title"
112881
113054
  };
@@ -112966,7 +113139,7 @@ const _sfc_main$2d = /* @__PURE__ */ defineComponent({
112966
113139
  ]),
112967
113140
  _: 1
112968
113141
  })
112969
- ])) : (openBlock(), createElementBlock("div", _hoisted_4$A, toDisplayString(unref(schemaTitle) || "表单属性"), 1))
113142
+ ])) : (openBlock(), createElementBlock("div", _hoisted_4$z, toDisplayString(unref(schemaTitle) || "表单属性"), 1))
112970
113143
  ]),
112971
113144
  createElementVNode("div", {
112972
113145
  class: normalizeClass(["panel-container", unref(active) ? unref(active).panelType.replace(":", "-") + "-container" : void 0])
@@ -113510,7 +113683,7 @@ function resolveTableColModelIndex(tableCell) {
113510
113683
  const _hoisted_1$1t = { class: "item-suffix" };
113511
113684
  const _hoisted_2$W = { class: "item-suffix" };
113512
113685
  const _hoisted_3$H = { class: "item-suffix" };
113513
- const _hoisted_4$z = { class: "item-suffix" };
113686
+ const _hoisted_4$y = { class: "item-suffix" };
113514
113687
  const _sfc_main$27 = /* @__PURE__ */ defineComponent({
113515
113688
  __name: "table-menu",
113516
113689
  props: {
@@ -113685,7 +113858,7 @@ const _sfc_main$27 = /* @__PURE__ */ defineComponent({
113685
113858
  }, [
113686
113859
  _cache[25] || (_cache[25] = createElementVNode("i", { class: "item-icon icon iconfont icon-a-xiacharuhang1" }, null, -1)),
113687
113860
  _cache[26] || (_cache[26] = createElementVNode("span", { class: "item-name" }, "在下方插入行", -1)),
113688
- createElementVNode("div", _hoisted_4$z, [
113861
+ createElementVNode("div", _hoisted_4$y, [
113689
113862
  createVNode(unref(GctInputNumber), {
113690
113863
  min: 1,
113691
113864
  modelValue: insertAfterRowCount.value,
@@ -113809,7 +113982,7 @@ const _sfc_main$26 = /* @__PURE__ */ defineComponent({
113809
113982
  const _hoisted_1$1s = { class: "validation-comment-item" };
113810
113983
  const _hoisted_2$V = { class: "validation-comment-panel-container" };
113811
113984
  const _hoisted_3$G = { class: "comment-header" };
113812
- const _hoisted_4$y = { class: "comment-messages" };
113985
+ const _hoisted_4$x = { class: "comment-messages" };
113813
113986
  const _hoisted_5$o = { class: "message-item" };
113814
113987
  const _hoisted_6$i = { class: "field-name" };
113815
113988
  const _hoisted_7$d = { class: "error-text" };
@@ -113895,7 +114068,7 @@ const _sfc_main$25 = /* @__PURE__ */ defineComponent({
113895
114068
  class: normalizeClass(["comment-tag", header.value.cls])
113896
114069
  }, toDisplayString(header.value.title), 3)
113897
114070
  ]),
113898
- createElementVNode("div", _hoisted_4$y, [
114071
+ createElementVNode("div", _hoisted_4$x, [
113899
114072
  (openBlock(true), createElementBlock(Fragment, null, renderList(fieldErrorList.value, (item) => {
113900
114073
  return openBlock(), createElementBlock("div", _hoisted_5$o, [
113901
114074
  createElementVNode("div", _hoisted_6$i, toDisplayString(unref(fieldInfo)?.name) + ":", 1),
@@ -113996,7 +114169,7 @@ const ValidationCommentLayer = /* @__PURE__ */ _export_sfc(_sfc_main$24, [["__sc
113996
114169
  const _hoisted_1$1q = { class: "cl__item" };
113997
114170
  const _hoisted_2$U = { class: "cl__item-panel-container" };
113998
114171
  const _hoisted_3$F = { class: "cl__hdr" };
113999
- const _hoisted_4$x = { class: "cl__hdr-title" };
114172
+ const _hoisted_4$w = { class: "cl__hdr-title" };
114000
114173
  const _hoisted_5$n = {
114001
114174
  key: 0,
114002
114175
  class: "cl__hdr-flag"
@@ -114111,7 +114284,7 @@ const _sfc_main$23 = /* @__PURE__ */ defineComponent({
114111
114284
  }, [
114112
114285
  createElementVNode("article", _hoisted_2$U, [
114113
114286
  createElementVNode("header", _hoisted_3$F, [
114114
- createElementVNode("div", _hoisted_4$x, toDisplayString(getHeaderLabel(__props.data.changeType)), 1),
114287
+ createElementVNode("div", _hoisted_4$w, toDisplayString(getHeaderLabel(__props.data.changeType)), 1),
114115
114288
  __props.data.isCurrentChange ? (openBlock(), createElementBlock("div", _hoisted_5$n, "本次变更")) : createCommentVNode("", true)
114116
114289
  ]),
114117
114290
  createElementVNode("div", _hoisted_6$h, [
@@ -114705,7 +114878,7 @@ const _hoisted_3$E = {
114705
114878
  key: 1,
114706
114879
  class: "empty-container"
114707
114880
  };
114708
- const _hoisted_4$w = {
114881
+ const _hoisted_4$v = {
114709
114882
  key: 0,
114710
114883
  class: "right-container"
114711
114884
  };
@@ -114793,7 +114966,7 @@ const _sfc_main$1$ = /* @__PURE__ */ defineComponent({
114793
114966
  width: isPreview.value ? "0px" : `${unref(rightWidth)}px`
114794
114967
  })
114795
114968
  }, [
114796
- !isPreview.value ? (openBlock(), createElementBlock("div", _hoisted_4$w, [
114969
+ !isPreview.value ? (openBlock(), createElementBlock("div", _hoisted_4$v, [
114797
114970
  createElementVNode("div", {
114798
114971
  class: "divider",
114799
114972
  onMousedown: _cache[0] || (_cache[0] = (e) => handleMouseDown(e))
@@ -118885,7 +119058,7 @@ const PortraitIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["render", _sfc_
118885
119058
  const _hoisted_1$1k = { class: "orientation-item" };
118886
119059
  const _hoisted_2$R = { class: "orientation-icon" };
118887
119060
  const _hoisted_3$D = { class: "orientation-item" };
118888
- const _hoisted_4$v = { class: "orientation-icon" };
119061
+ const _hoisted_4$u = { class: "orientation-icon" };
118889
119062
  const _sfc_main$1F = /* @__PURE__ */ defineComponent({
118890
119063
  __name: "orientation-module",
118891
119064
  props: {
@@ -118924,7 +119097,7 @@ const _sfc_main$1F = /* @__PURE__ */ defineComponent({
118924
119097
  }, 8, ["value"])
118925
119098
  ]),
118926
119099
  createElementVNode("label", _hoisted_3$D, [
118927
- createElementVNode("span", _hoisted_4$v, [
119100
+ createElementVNode("span", _hoisted_4$u, [
118928
119101
  createVNode(LandscapeIcon)
118929
119102
  ]),
118930
119103
  createVNode(unref(GctRadio), {
@@ -119096,7 +119269,7 @@ const _hoisted_3$C = {
119096
119269
  key: 0,
119097
119270
  class: "head"
119098
119271
  };
119099
- const _hoisted_4$u = { class: "title" };
119272
+ const _hoisted_4$t = { class: "title" };
119100
119273
  const _hoisted_5$l = {
119101
119274
  key: 1,
119102
119275
  class: "link"
@@ -119133,7 +119306,7 @@ const _sfc_main$1D = /* @__PURE__ */ defineComponent({
119133
119306
  onClick: ($event) => _ctx.$emit("active", item)
119134
119307
  }, [
119135
119308
  item?.thead ? (openBlock(), createElementBlock("div", _hoisted_3$C, [
119136
- createElementVNode("span", _hoisted_4$u, toDisplayString(item.thead.name || "[表头]"), 1),
119309
+ createElementVNode("span", _hoisted_4$t, toDisplayString(item.thead.name || "[表头]"), 1),
119137
119310
  createVNode(unref(GctIcon), {
119138
119311
  class: "icon",
119139
119312
  icon: "icon-shanchu2",
@@ -119602,7 +119775,7 @@ function usePanelProps(targetRef, propsPath, opts) {
119602
119775
  const _hoisted_1$1g = { class: "panel-dynamic-table" };
119603
119776
  const _hoisted_2$N = { class: "container" };
119604
119777
  const _hoisted_3$A = { class: "container" };
119605
- const _hoisted_4$t = { class: "form-custom-label" };
119778
+ const _hoisted_4$s = { class: "form-custom-label" };
119606
119779
  const _hoisted_5$k = { class: "content" };
119607
119780
  const _sfc_main$1B = /* @__PURE__ */ defineComponent({
119608
119781
  __name: "DynamicTablePanel",
@@ -119704,7 +119877,7 @@ const _sfc_main$1B = /* @__PURE__ */ defineComponent({
119704
119877
  createElementVNode("div", _hoisted_3$A, [
119705
119878
  createVNode(unref(GctFormItem), null, {
119706
119879
  label: withCtx(() => [
119707
- createElementVNode("div", _hoisted_4$t, [
119880
+ createElementVNode("div", _hoisted_4$s, [
119708
119881
  _cache[2] || (_cache[2] = createElementVNode("span", null, "快速填报", -1)),
119709
119882
  createVNode(unref(_sfc_main$34), {
119710
119883
  distance: 12,
@@ -119754,7 +119927,7 @@ const schema$b = {
119754
119927
  const _hoisted_1$1f = { class: "panel-2d-table" };
119755
119928
  const _hoisted_2$M = { class: "container" };
119756
119929
  const _hoisted_3$z = { class: "line-content" };
119757
- const _hoisted_4$s = { class: "line-content cell-count" };
119930
+ const _hoisted_4$r = { class: "line-content cell-count" };
119758
119931
  const _sfc_main$1A = /* @__PURE__ */ defineComponent({
119759
119932
  __name: "_2DTablePanel",
119760
119933
  props: {
@@ -119866,7 +120039,7 @@ const _sfc_main$1A = /* @__PURE__ */ defineComponent({
119866
120039
  onClick: _cache[1] || (_cache[1] = withModifiers(($event) => onDelete("deleteDataGroup2D"), ["stop"]))
119867
120040
  }, "删除动态关联")) : createCommentVNode("", true)
119868
120041
  ]),
119869
- createElementVNode("div", _hoisted_4$s, [
120042
+ createElementVNode("div", _hoisted_4$r, [
119870
120043
  _cache[2] || (_cache[2] = createElementVNode("span", null, "当前已固定", -1)),
119871
120044
  createElementVNode("span", null, toDisplayString(unref(regionRef)?.cellCount), 1),
119872
120045
  _cache[3] || (_cache[3] = createElementVNode("span", null, "个单元格", -1))
@@ -119931,7 +120104,8 @@ const AddBtn = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["__scopeId", "data-v-
119931
120104
  const _sfc_main$1y = /* @__PURE__ */ defineComponent({
119932
120105
  __name: "parse-rule-editor",
119933
120106
  props: {
119934
- modelValue: { default: void 0 }
120107
+ modelValue: { default: void 0 },
120108
+ subModelKey: { default: void 0 }
119935
120109
  },
119936
120110
  emits: ["update:modelValue"],
119937
120111
  setup(__props, { emit: __emit }) {
@@ -119960,8 +120134,9 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
119960
120134
  return (_ctx, _cache) => {
119961
120135
  return openBlock(), createBlock(AddBtn, {
119962
120136
  modelValue: value.value,
119963
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
119964
- }, null, 8, ["modelValue"]);
120137
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
120138
+ subModelKey: __props.subModelKey
120139
+ }, null, 8, ["modelValue", "subModelKey"]);
119965
120140
  };
119966
120141
  }
119967
120142
  });
@@ -120035,7 +120210,7 @@ const _hoisted_3$y = {
120035
120210
  key: 0,
120036
120211
  class: "iconfont icon-drag mover"
120037
120212
  };
120038
- const _hoisted_4$r = { class: "bom-entry-item-content ks-col" };
120213
+ const _hoisted_4$q = { class: "bom-entry-item-content ks-col" };
120039
120214
  const _hoisted_5$j = { class: "bom-entry-item-content-item ell overflow-hidden" };
120040
120215
  const _hoisted_6$e = ["title"];
120041
120216
  const _hoisted_7$9 = { class: "bom-entry-item-btns ml8px" };
@@ -120067,7 +120242,7 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
120067
120242
  }
120068
120243
  const edit = async (data) => {
120069
120244
  const cloneData = cloneDeep(data);
120070
- const hasIds = calcHasProductIds();
120245
+ const hasIds = calcHasProductIds(data);
120071
120246
  triggerUtil.handle("OPEN_MATERIAL_CONSUME_TABLE_ADD_MATERIAL_MODAL", { data: cloneData, hasIds }).then((res) => {
120072
120247
  if (res.ok) {
120073
120248
  Object.assign(data, res.data);
@@ -120131,7 +120306,7 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
120131
120306
  item: withCtx(({ element }) => [
120132
120307
  createElementVNode("div", _hoisted_2$L, [
120133
120308
  !__props.disabled ? (openBlock(), createElementBlock("i", _hoisted_3$y)) : createCommentVNode("", true),
120134
- createElementVNode("div", _hoisted_4$r, [
120309
+ createElementVNode("div", _hoisted_4$q, [
120135
120310
  createElementVNode("div", _hoisted_5$j, [
120136
120311
  (openBlock(), createBlock(_sfc_main$1x, {
120137
120312
  key: element.product_id_,
@@ -120177,11 +120352,11 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
120177
120352
  };
120178
120353
  }
120179
120354
  });
120180
- const BomEntryEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["__scopeId", "data-v-bd727c66"]]);
120355
+ const BomEntryEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["__scopeId", "data-v-d7a225cc"]]);
120181
120356
  const _hoisted_1$1c = { class: "panel-material-consume-table" };
120182
120357
  const _hoisted_2$K = { class: "container" };
120183
120358
  const _hoisted_3$x = { class: "container" };
120184
- const _hoisted_4$q = { class: "content" };
120359
+ const _hoisted_4$p = { class: "content" };
120185
120360
  const _hoisted_5$i = { class: "entries-container" };
120186
120361
  const _hoisted_6$d = { class: "content" };
120187
120362
  const _sfc_main$1v = /* @__PURE__ */ defineComponent({
@@ -120291,7 +120466,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
120291
120466
  createVNode(_sfc_main$1y, {
120292
120467
  modelValue: unref(regionProps).barcode_parsing_rules_id_,
120293
120468
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(regionProps).barcode_parsing_rules_id_ = $event),
120294
- subModelKey: fieldInfo.value?.modelKey
120469
+ subModelKey: fieldInfo.value?.bindInfo
120295
120470
  }, null, 8, ["modelValue", "subModelKey"])
120296
120471
  ]),
120297
120472
  _: 1
@@ -120301,7 +120476,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
120301
120476
  createElementVNode("div", { class: "form-custom-label" }, " 人为指定物料 ", -1)
120302
120477
  ])]),
120303
120478
  default: withCtx(() => [
120304
- createElementVNode("div", _hoisted_4$q, [
120479
+ createElementVNode("div", _hoisted_4$p, [
120305
120480
  createVNode(unref(GctSwitch), {
120306
120481
  modelValue: unref(regionProps).personal_bom_enabled_,
120307
120482
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(regionProps).personal_bom_enabled_ = $event),
@@ -120342,7 +120517,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
120342
120517
  };
120343
120518
  }
120344
120519
  });
120345
- const MaterialConsumeTablePanel = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["__scopeId", "data-v-e911ba4d"]]);
120520
+ const MaterialConsumeTablePanel = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["__scopeId", "data-v-d02b91ab"]]);
120346
120521
  const schema$9 = {
120347
120522
  key: "material-consume-table.basic",
120348
120523
  title: [
@@ -120354,7 +120529,7 @@ const schema$9 = {
120354
120529
  const _hoisted_1$1b = { class: "panel-fixed-table" };
120355
120530
  const _hoisted_2$J = { class: "container" };
120356
120531
  const _hoisted_3$w = { class: "line-content" };
120357
- const _hoisted_4$p = { class: "line-content cell-count" };
120532
+ const _hoisted_4$o = { class: "line-content cell-count" };
120358
120533
  const _sfc_main$1u = /* @__PURE__ */ defineComponent({
120359
120534
  __name: "FixedTablePanel",
120360
120535
  props: {
@@ -120466,7 +120641,7 @@ const _sfc_main$1u = /* @__PURE__ */ defineComponent({
120466
120641
  onClick: _cache[1] || (_cache[1] = withModifiers(($event) => onDelete("deleteBoundedItem"), ["stop"]))
120467
120642
  }, "删除数据分组")) : createCommentVNode("", true)
120468
120643
  ]),
120469
- createElementVNode("div", _hoisted_4$p, [
120644
+ createElementVNode("div", _hoisted_4$o, [
120470
120645
  _cache[2] || (_cache[2] = createElementVNode("span", null, "当前已固定", -1)),
120471
120646
  createElementVNode("span", null, toDisplayString(unref(regionRef)?.cellCount), 1),
120472
120647
  _cache[3] || (_cache[3] = createElementVNode("span", null, "个单元格", -1))
@@ -120491,7 +120666,7 @@ const schema$8 = {
120491
120666
  const _hoisted_1$1a = { class: "panel-check-table" };
120492
120667
  const _hoisted_2$I = { class: "container" };
120493
120668
  const _hoisted_3$v = { class: "line-content" };
120494
- const _hoisted_4$o = { class: "line-content cell-count" };
120669
+ const _hoisted_4$n = { class: "line-content cell-count" };
120495
120670
  const _sfc_main$1t = /* @__PURE__ */ defineComponent({
120496
120671
  __name: "CheckTablePanel",
120497
120672
  props: {
@@ -120603,7 +120778,7 @@ const _sfc_main$1t = /* @__PURE__ */ defineComponent({
120603
120778
  onClick: _cache[1] || (_cache[1] = withModifiers(($event) => onDelete("deleteDataGroup2D"), ["stop"]))
120604
120779
  }, "删除动态关联")) : createCommentVNode("", true)
120605
120780
  ]),
120606
- createElementVNode("div", _hoisted_4$o, [
120781
+ createElementVNode("div", _hoisted_4$n, [
120607
120782
  _cache[2] || (_cache[2] = createElementVNode("span", null, "当前已固定", -1)),
120608
120783
  createElementVNode("span", null, toDisplayString(unref(regionRef)?.cellCount), 1),
120609
120784
  _cache[3] || (_cache[3] = createElementVNode("span", null, "个单元格", -1))
@@ -120628,7 +120803,7 @@ const schema$7 = {
120628
120803
  const _hoisted_1$19 = { class: "panel-data-group" };
120629
120804
  const _hoisted_2$H = { class: "container" };
120630
120805
  const _hoisted_3$u = { class: "line-content" };
120631
- const _hoisted_4$n = { class: "content" };
120806
+ const _hoisted_4$m = { class: "content" };
120632
120807
  const _sfc_main$1s = /* @__PURE__ */ defineComponent({
120633
120808
  __name: "DataGroupPanel",
120634
120809
  props: {
@@ -120692,7 +120867,7 @@ const _sfc_main$1s = /* @__PURE__ */ defineComponent({
120692
120867
  ]),
120693
120868
  createVNode(unref(GctFormItem), { label: "引用填充(撑满固定表)" }, {
120694
120869
  default: withCtx(() => [
120695
- createElementVNode("div", _hoisted_4$n, [
120870
+ createElementVNode("div", _hoisted_4$m, [
120696
120871
  createVNode(unref(GctSwitch), {
120697
120872
  modelValue: unref(regionProps).autoFill,
120698
120873
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(regionProps).autoFill = $event),
@@ -120737,7 +120912,7 @@ const schema$6 = {
120737
120912
  const _hoisted_1$18 = { class: "panel-data-group-2d" };
120738
120913
  const _hoisted_2$G = { class: "container" };
120739
120914
  const _hoisted_3$t = { class: "line-content" };
120740
- const _hoisted_4$m = { class: "content" };
120915
+ const _hoisted_4$l = { class: "content" };
120741
120916
  const _sfc_main$1r = /* @__PURE__ */ defineComponent({
120742
120917
  __name: "DataGroup2DPanel",
120743
120918
  props: {
@@ -120818,7 +120993,7 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
120818
120993
  ]),
120819
120994
  createVNode(unref(GctFormItem), { label: "引用填充(撑满表格)" }, {
120820
120995
  default: withCtx(() => [
120821
- createElementVNode("div", _hoisted_4$m, [
120996
+ createElementVNode("div", _hoisted_4$l, [
120822
120997
  createVNode(unref(GctSwitch), {
120823
120998
  modelValue: unref(regionProps).autoFill,
120824
120999
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(regionProps).autoFill = $event),
@@ -121851,7 +122026,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
121851
122026
  const _hoisted_1$12 = { class: "data-source-model-link-wrapper" };
121852
122027
  const _hoisted_2$C = { class: "model-link-container" };
121853
122028
  const _hoisted_3$r = { class: "model-link-content" };
121854
- const _hoisted_4$l = { class: "model-link-item" };
122029
+ const _hoisted_4$k = { class: "model-link-item" };
121855
122030
  const _hoisted_5$h = { class: "model-link-item" };
121856
122031
  const _sfc_main$1f = /* @__PURE__ */ defineComponent({
121857
122032
  __name: "data-source-model-link",
@@ -122026,7 +122201,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
122026
122201
  return openBlock(), createElementBlock("div", _hoisted_1$12, [
122027
122202
  createElementVNode("div", _hoisted_2$C, [
122028
122203
  createElementVNode("div", _hoisted_3$r, [
122029
- createElementVNode("div", _hoisted_4$l, [
122204
+ createElementVNode("div", _hoisted_4$k, [
122030
122205
  _cache[9] || (_cache[9] = createElementVNode("span", { class: "blank first" }, "当", -1)),
122031
122206
  createVNode(unref(GctSelect), {
122032
122207
  class: "custom-select",
@@ -122278,7 +122453,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
122278
122453
  const _hoisted_1$10 = { class: "data-source-field-map-wrapper" };
122279
122454
  const _hoisted_2$A = { class: "field-map-container" };
122280
122455
  const _hoisted_3$p = { class: "field-map-content" };
122281
- const _hoisted_4$k = { class: "field-map-item" };
122456
+ const _hoisted_4$j = { class: "field-map-item" };
122282
122457
  const _hoisted_5$g = { class: "blank last" };
122283
122458
  const _hoisted_6$c = ["onClick"];
122284
122459
  const _sfc_main$1c = /* @__PURE__ */ defineComponent({
@@ -122427,7 +122602,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
122427
122602
  _cache[3] || (_cache[3] = createElementVNode("div", { class: "line" }, null, -1)),
122428
122603
  createElementVNode("div", _hoisted_2$A, [
122429
122604
  createElementVNode("div", _hoisted_3$p, [
122430
- createElementVNode("div", _hoisted_4$k, [
122605
+ createElementVNode("div", _hoisted_4$j, [
122431
122606
  createVNode(unref(GctSelect), {
122432
122607
  class: "custom-select",
122433
122608
  bordered: false,
@@ -122514,7 +122689,7 @@ const DataSourceFieldMap = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["__scopeI
122514
122689
  const _hoisted_1$$ = { class: "param-link-container" };
122515
122690
  const _hoisted_2$z = { class: "param-link-content" };
122516
122691
  const _hoisted_3$o = { class: "param-link-item" };
122517
- const _hoisted_4$j = { class: "blank last" };
122692
+ const _hoisted_4$i = { class: "blank last" };
122518
122693
  const _hoisted_5$f = ["onClick"];
122519
122694
  const _sfc_main$1b = /* @__PURE__ */ defineComponent({
122520
122695
  __name: "param-field-link",
@@ -122656,7 +122831,7 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
122656
122831
  "onUpdate:modelValue": ($event) => fieldItem.field = $event,
122657
122832
  options: fieldOptions.value
122658
122833
  }, null, 8, ["modelValue", "onUpdate:modelValue", "options"]),
122659
- createElementVNode("span", _hoisted_4$j, [
122834
+ createElementVNode("span", _hoisted_4$i, [
122660
122835
  createElementVNode("i", {
122661
122836
  class: "iconfont icon-shanchu",
122662
122837
  onClick: ($event) => removeFieldItem(fieldItem)
@@ -123014,7 +123189,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
123014
123189
  const _hoisted_1$Z = { class: "field-dependency-form" };
123015
123190
  const _hoisted_2$x = { class: "form-row current-component" };
123016
123191
  const _hoisted_3$m = { class: "control" };
123017
- const _hoisted_4$i = { class: "field-icon" };
123192
+ const _hoisted_4$h = { class: "field-icon" };
123018
123193
  const _hoisted_5$e = { class: "form-row" };
123019
123194
  const _hoisted_6$b = { class: "control" };
123020
123195
  const _hoisted_7$8 = { class: "form-row" };
@@ -123113,7 +123288,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
123113
123288
  createElementVNode("div", _hoisted_2$x, [
123114
123289
  _cache[9] || (_cache[9] = createElementVNode("div", { class: "label" }, "当前组件", -1)),
123115
123290
  createElementVNode("div", _hoisted_3$m, [
123116
- createElementVNode("div", _hoisted_4$i, [
123291
+ createElementVNode("div", _hoisted_4$h, [
123117
123292
  createVNode(unref(GctIcon), {
123118
123293
  class: "icon",
123119
123294
  icon: __props.fieldIdentity.icon,
@@ -123294,7 +123469,7 @@ const getFormulaFieldOptions = (infoList) => {
123294
123469
  const _hoisted_1$Y = { class: "field-dependency-module" };
123295
123470
  const _hoisted_2$w = { class: "field-dependency-list" };
123296
123471
  const _hoisted_3$l = { class: "item-header" };
123297
- const _hoisted_4$h = { class: "title" };
123472
+ const _hoisted_4$g = { class: "title" };
123298
123473
  const _hoisted_5$d = { class: "main" };
123299
123474
  const _hoisted_6$a = {
123300
123475
  key: 0,
@@ -123459,7 +123634,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
123459
123634
  class: "field-dependency-item"
123460
123635
  }, [
123461
123636
  createElementVNode("div", _hoisted_3$l, [
123462
- createElementVNode("div", _hoisted_4$h, [
123637
+ createElementVNode("div", _hoisted_4$g, [
123463
123638
  createElementVNode("span", _hoisted_5$d, toDisplayString(unref(FieldDependencyTypeCh)[type4]), 1),
123464
123639
  type4 === unref(FieldDependencyTypeConst).Assignment ? (openBlock(), createElementBlock("span", _hoisted_6$a, " 公式计算 ")) : createCommentVNode("", true)
123465
123640
  ]),
@@ -123758,8 +123933,7 @@ const schema$2 = {
123758
123933
  };
123759
123934
  const _hoisted_1$V = { class: "panel-table-header" };
123760
123935
  const _hoisted_2$u = { class: "container" };
123761
- const _hoisted_3$j = { class: "readonly-text" };
123762
- const _hoisted_4$g = { class: "render-mode" };
123936
+ const _hoisted_3$j = { class: "render-mode" };
123763
123937
  const _sfc_main$14 = /* @__PURE__ */ defineComponent({
123764
123938
  __name: "TableHeaderPanel",
123765
123939
  props: {
@@ -123817,15 +123991,9 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
123817
123991
  ]),
123818
123992
  _: 1
123819
123993
  }, 8, ["label"]),
123820
- createVNode(unref(GctFormItem), { label: "单元格" }, {
123821
- default: withCtx(() => [
123822
- createElementVNode("span", _hoisted_3$j, toDisplayString(headerInfo.value.range), 1)
123823
- ]),
123824
- _: 1
123825
- }),
123826
123994
  createVNode(unref(GctFormItem), { label: "渲染方式" }, {
123827
123995
  default: withCtx(() => [
123828
- createElementVNode("span", _hoisted_4$g, toDisplayString(headerInfo.value.renderMode), 1)
123996
+ createElementVNode("span", _hoisted_3$j, toDisplayString(headerInfo.value.renderMode), 1)
123829
123997
  ]),
123830
123998
  _: 1
123831
123999
  })
@@ -123837,7 +124005,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
123837
124005
  };
123838
124006
  }
123839
124007
  });
123840
- const TableHeaderPanel = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["__scopeId", "data-v-22abf304"]]);
124008
+ const TableHeaderPanel = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["__scopeId", "data-v-1c020e08"]]);
123841
124009
  const schema$1 = {
123842
124010
  key: "table-header.basic",
123843
124011
  title: "表头",
@@ -130171,8 +130339,7 @@ function shouldEnableLinkage(doc, clickedFieldType, clickedKey) {
130171
130339
  function buildLikeQuery(fields, keyword, query) {
130172
130340
  if (!keyword?.trim()) {
130173
130341
  return {
130174
- // queryData: { ...query }, // todo 暂时注释,不然一条数据都请求不到
130175
- queryData: {},
130342
+ queryData: { ...query },
130176
130343
  exp: ""
130177
130344
  };
130178
130345
  }
@@ -130183,7 +130350,7 @@ function buildLikeQuery(fields, keyword, query) {
130183
130350
  return prev;
130184
130351
  },
130185
130352
  {
130186
- // ...query // todo 暂时注释,不然一条数据都请求不到
130353
+ ...query
130187
130354
  }
130188
130355
  );
130189
130356
  const exp = `OR(${fields.map((k) => `${k}.like`).join(",")})`;
@@ -130194,8 +130361,15 @@ const selectStrategyMap = {
130194
130361
  columnsKey: "lot-sn",
130195
130362
  fetcher: "lot2sn",
130196
130363
  allowManualInput: true,
130197
- buildQuery({ keyword }) {
130198
- return buildLikeQuery(["material_no_"], keyword);
130364
+ buildQuery({ keyword, extraParams }) {
130365
+ return buildLikeQuery(
130366
+ ["material_no_"],
130367
+ keyword,
130368
+ {
130369
+ "instance_status_.ne": "ARCHIVED",
130370
+ ...extraParams
130371
+ }
130372
+ );
130199
130373
  },
130200
130374
  transform: transformLotData
130201
130375
  },
@@ -130204,7 +130378,7 @@ const selectStrategyMap = {
130204
130378
  fetcher: "lot2sn",
130205
130379
  allowManualInput: true,
130206
130380
  buildQuery({ keyword }) {
130207
- return buildLikeQuery(["material_no_"], keyword);
130381
+ return buildLikeQuery(["material_no_"], keyword, { "instance_status_.ne": "ARCHIVED" });
130208
130382
  },
130209
130383
  transform: transformLotData
130210
130384
  },
@@ -130213,7 +130387,7 @@ const selectStrategyMap = {
130213
130387
  fetcher: "lot2sn",
130214
130388
  allowManualInput: true,
130215
130389
  buildQuery({ keyword }) {
130216
- return buildLikeQuery(["material_no_"], keyword);
130390
+ return buildLikeQuery(["material_no_"], keyword, { "instance_status_.ne": "ARCHIVED" });
130217
130391
  },
130218
130392
  transform: transformLotData
130219
130393
  },
@@ -130239,7 +130413,11 @@ const selectStrategyMap = {
130239
130413
  columnsKey: "route-operation",
130240
130414
  fetcher: "ref",
130241
130415
  buildQuery({ keyword }) {
130242
- return buildLikeQuery(["name_", "code_"], keyword);
130416
+ return buildLikeQuery(["name_", "code_"], keyword, {
130417
+ type_: "NODE_SPEC",
130418
+ operating_state_: true
130419
+ // ref_master_id_: paramsConfig?.routingId, // todo
130420
+ });
130243
130421
  },
130244
130422
  transform: transformLotData
130245
130423
  },
@@ -130248,7 +130426,9 @@ const selectStrategyMap = {
130248
130426
  fetcher: "ref",
130249
130427
  clearFieldId: "scrap_reason_1_",
130250
130428
  buildQuery({ keyword }) {
130251
- return buildLikeQuery(["name_", "code_"], keyword);
130429
+ return buildLikeQuery(["name_", "code_"], keyword, {
130430
+ operating_state_: true
130431
+ });
130252
130432
  },
130253
130433
  transform: transformLotData
130254
130434
  },
@@ -130272,7 +130452,9 @@ const selectStrategyMap = {
130272
130452
  isLinkQuery: true
130273
130453
  };
130274
130454
  if (keyword?.trim()) {
130275
- const { queryData: searchQuery, exp } = buildLikeQuery(["name_", "code_"], keyword);
130455
+ const { queryData: searchQuery, exp } = buildLikeQuery(["name_", "code_"], keyword, {
130456
+ operating_state_: true
130457
+ });
130276
130458
  return { queryData: { ...queryData, ...searchQuery }, exp };
130277
130459
  }
130278
130460
  return {
@@ -130280,7 +130462,9 @@ const selectStrategyMap = {
130280
130462
  exp: ""
130281
130463
  };
130282
130464
  }
130283
- return buildLikeQuery(["name_", "code_"], keyword);
130465
+ return buildLikeQuery(["name_", "code_"], keyword, {
130466
+ operating_state_: true
130467
+ });
130284
130468
  },
130285
130469
  transform: transformLotData
130286
130470
  },
@@ -130289,7 +130473,9 @@ const selectStrategyMap = {
130289
130473
  fetcher: "ref",
130290
130474
  clearFieldId: "not_good_reason_1_",
130291
130475
  buildQuery({ keyword }) {
130292
- return buildLikeQuery(["name_", "code_"], keyword);
130476
+ return buildLikeQuery(["name_", "code_"], keyword, {
130477
+ operating_state_: true
130478
+ });
130293
130479
  },
130294
130480
  transform: transformLotData
130295
130481
  },
@@ -130313,7 +130499,9 @@ const selectStrategyMap = {
130313
130499
  isLinkQuery: true
130314
130500
  };
130315
130501
  if (keyword?.trim()) {
130316
- const { queryData: searchQuery, exp } = buildLikeQuery(["name_", "code_"], keyword);
130502
+ const { queryData: searchQuery, exp } = buildLikeQuery(["name_", "code_"], keyword, {
130503
+ operating_state_: true
130504
+ });
130317
130505
  return { queryData: { ...queryData, ...searchQuery }, exp };
130318
130506
  }
130319
130507
  return {
@@ -130321,7 +130509,9 @@ const selectStrategyMap = {
130321
130509
  exp: ""
130322
130510
  };
130323
130511
  }
130324
- return buildLikeQuery(["name_", "code_"], keyword);
130512
+ return buildLikeQuery(["name_", "code_"], keyword, {
130513
+ operating_state_: true
130514
+ });
130325
130515
  },
130326
130516
  transform: transformLotData
130327
130517
  },
@@ -130329,8 +130519,15 @@ const selectStrategyMap = {
130329
130519
  columnsKey: "rdo-ref",
130330
130520
  fetcher: "rdo2ref",
130331
130521
  isTree: true,
130332
- buildQuery({ keyword }) {
130333
- return buildLikeQuery(["name_", "code_"], keyword);
130522
+ buildQuery({ keyword, extraParams }) {
130523
+ return buildLikeQuery(
130524
+ ["name_", "code_"],
130525
+ keyword,
130526
+ {
130527
+ operating_state_: true,
130528
+ ...extraParams
130529
+ }
130530
+ );
130334
130531
  },
130335
130532
  transform: transformTreeData
130336
130533
  },
@@ -130339,7 +130536,9 @@ const selectStrategyMap = {
130339
130536
  fetcher: "rdo2ref",
130340
130537
  isTree: true,
130341
130538
  buildQuery({ keyword }) {
130342
- return buildLikeQuery(["name_", "code_"], keyword);
130539
+ return buildLikeQuery(["name_", "code_"], keyword, {
130540
+ operating_state_: true
130541
+ });
130343
130542
  },
130344
130543
  transform: transformTreeData
130345
130544
  }
@@ -130421,12 +130620,22 @@ function useTableDropdown(props, searchFilters) {
130421
130620
  const { buildQuery, fetcher: fetcher2, transform } = strategy.value;
130422
130621
  const isLinkQuery = enableLinkage.value;
130423
130622
  const filters = unref(searchFilters);
130623
+ const valuePath = fieldMeta.value?.valuePath;
130624
+ const subFieldConfig = getSubFieldConfig(docInst.value.paramsConfig);
130625
+ let extraParams = subFieldConfig.get(valuePath);
130626
+ const dataIndex = props.widget?.dataSlotIndex?.dataIndex;
130627
+ if (valuePath && isNumber(dataIndex)) {
130628
+ const _valuePath = valuePath.replace("[n]", `[${dataIndex}]`);
130629
+ const _extraParams = subFieldConfig.get(_valuePath);
130630
+ Object.assign(extraParams, _extraParams);
130631
+ }
130424
130632
  const { queryData = {}, exp = "" } = buildQuery?.({
130425
130633
  keyword,
130426
130634
  isLinkQuery,
130427
130635
  linkDataId: isLinkQuery ? String(linkDataValue.value ?? "") : void 0,
130428
130636
  searchField: widgetProps.value.searchField,
130429
- deviceTypeId: deviceTypeId ?? filters?.deviceTypeId
130637
+ deviceTypeId: deviceTypeId ?? filters?.deviceTypeId,
130638
+ extraParams
130430
130639
  }) ?? {};
130431
130640
  const res = await apiFetchers[fetcher2].getOptions({
130432
130641
  fieldKey: fieldInfo.value.key,