@gct-paas/word 0.1.63-beta.9 → 0.1.63

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
@@ -33535,7 +33535,7 @@ function getValue$1(value, multiple) {
33535
33535
  }
33536
33536
  return value;
33537
33537
  }
33538
- function setValue(value, valuePath, payload) {
33538
+ function setValue$1(value, valuePath, payload) {
33539
33539
  const { multiple = false, valueKey } = payload || {};
33540
33540
  const values = multiple ? value?.map((item) => valueKey ? item[valueKey] : item).join(",") || null : value ?? null;
33541
33541
  return {
@@ -81339,7 +81339,7 @@ function getLabelPath(path) {
81339
81339
  function getHrefPath(path) {
81340
81340
  return path + HREF_SUFFIX;
81341
81341
  }
81342
- function getIdPath(path) {
81342
+ function getIdPath$1(path) {
81343
81343
  return path + ID_SUFFIX;
81344
81344
  }
81345
81345
  function isCompanionIdPath(path) {
@@ -84511,7 +84511,7 @@ function createIdEnricher(reg) {
84511
84511
  return createCompanionEnricher(reg, {
84512
84512
  cacheNamespace: "id_enrich_resolve",
84513
84513
  defaultIdPrefix: "id:",
84514
- getCompanionPath: getIdPath,
84514
+ getCompanionPath: getIdPath$1,
84515
84515
  preserveOnHydrate: true,
84516
84516
  skipWhenCompanionPresent: true,
84517
84517
  buildCacheKey: (path, value, doc) => ({
@@ -85362,7 +85362,7 @@ class DataManager {
85362
85362
  return getHrefPath(path);
85363
85363
  }
85364
85364
  getIdPath(path) {
85365
- return getIdPath(path);
85365
+ return getIdPath$1(path);
85366
85366
  }
85367
85367
  getFieldRuntimeSpecificConfigKeys() {
85368
85368
  return [...this.fieldRuntimeConfigByPath.keys()];
@@ -86591,7 +86591,7 @@ class DataManager {
86591
86591
  designValuePath,
86592
86592
  getLabelPath(designValuePath),
86593
86593
  getHrefPath(designValuePath),
86594
- getIdPath(designValuePath)
86594
+ getIdPath$1(designValuePath)
86595
86595
  ];
86596
86596
  const wildcardKeys = new Set(bases.map((path) => this.convertPathToWildcard(path)));
86597
86597
  const result = new Set(bases);
@@ -86615,7 +86615,7 @@ class DataManager {
86615
86615
  paths.add(path);
86616
86616
  paths.add(getLabelPath(path));
86617
86617
  paths.add(getHrefPath(path));
86618
- paths.add(getIdPath(path));
86618
+ paths.add(getIdPath$1(path));
86619
86619
  }
86620
86620
  return [...paths];
86621
86621
  }
@@ -86626,7 +86626,7 @@ class DataManager {
86626
86626
  designValuePath,
86627
86627
  getLabelPath(designValuePath),
86628
86628
  getHrefPath(designValuePath),
86629
- getIdPath(designValuePath)
86629
+ getIdPath$1(designValuePath)
86630
86630
  ].map((path) => this.convertPathToWildcard(path))
86631
86631
  );
86632
86632
  const nodes = this.collectDepNodes();
@@ -86873,7 +86873,7 @@ function buildFieldSelectUpdates(valuePath, value, optionId, options = {}) {
86873
86873
  [valuePath]: normalizedValue
86874
86874
  };
86875
86875
  if (options.persistOptionId) {
86876
- updates[getIdPath(valuePath)] = optionId ?? null;
86876
+ updates[getIdPath$1(valuePath)] = optionId ?? null;
86877
86877
  }
86878
86878
  return updates;
86879
86879
  }
@@ -89134,7 +89134,7 @@ const CLEAR_ON_MFG_ORDER_SWITCH = [F$2.materialContainer, F$2.productionContaine
89134
89134
  const CLEAR_ON_MATERIAL_CONTAINER_NO_EMPTY = [...CLEAR_ON_COMMON_EMPTY];
89135
89135
  const CLEAR_ON_MATERIAL_CONTAINER_NO_SWITCH = [F$2.mfgOrder, F$2.productionContainer];
89136
89136
  const CLEAR_ON_MATERIAL_CONTAINER_NO_MANUAL_SWITCH = [...CLEAR_ON_COMMON_EMPTY];
89137
- const MATERIAL_CONTAINER_ID = getIdPath(F$2.materialContainer);
89137
+ const MATERIAL_CONTAINER_ID = getIdPath$1(F$2.materialContainer);
89138
89138
  const PRODUCT_EDITABILITY_WATCH = [
89139
89139
  F$2.materialContainer,
89140
89140
  MATERIAL_CONTAINER_ID,
@@ -89444,7 +89444,7 @@ function handleMfgOrderChange(doc, subFieldKey, rowIndex) {
89444
89444
  function handleMaterialContainerNoChange(doc, subFieldKey, rowIndex) {
89445
89445
  const ctx = getRowChangeCtx(doc, subFieldKey, rowIndex);
89446
89446
  if (!ctx) return;
89447
- const clearWhenPresent = isBlank(ctx.row[getIdPath(F$2.materialContainer)]) ? [...CLEAR_ON_MATERIAL_CONTAINER_NO_MANUAL_SWITCH, ...CLEAR_ON_MATERIAL_CONTAINER_NO_SWITCH] : CLEAR_ON_MATERIAL_CONTAINER_NO_SWITCH;
89447
+ const clearWhenPresent = isBlank(ctx.row[getIdPath$1(F$2.materialContainer)]) ? [...CLEAR_ON_MATERIAL_CONTAINER_NO_MANUAL_SWITCH, ...CLEAR_ON_MATERIAL_CONTAINER_NO_SWITCH] : CLEAR_ON_MATERIAL_CONTAINER_NO_SWITCH;
89448
89448
  handleIdentityFieldChange$1(
89449
89449
  ctx,
89450
89450
  F$2.materialContainer,
@@ -108232,7 +108232,6 @@ class BomEntryValidator {
108232
108232
  if (idSet.size > 1) {
108233
108233
  throw new Error(
108234
108234
  "整批替代不允许混用主料或者替代料"
108235
- /*$t('sys.edhr.mcTable.notAllowMixSubstituteMaterial')*/
108236
108235
  );
108237
108236
  }
108238
108237
  }
@@ -108279,7 +108278,6 @@ class BomEntryValidator {
108279
108278
  if (["eq", "lte"].includes(this.bomEntry.qty_validation_rule_) && consumeNum > this.remainingNum) {
108280
108279
  throw new Error(
108281
108280
  "当前物料上料总消耗不能大于需求数量"
108282
- /*$t('sys.edhr.mcTable.overMaterialConsumeError')*/
108283
108281
  );
108284
108282
  }
108285
108283
  if (this.bomEntry.qty_validation_rule_ === "bounds") {
@@ -109490,53 +109488,51 @@ const syncMaterialConsumeTableBomInfo = async (templateId, docModel) => {
109490
109488
  const initMaterialConsumeTableConfig = (doc, subConfig, tmplBomC) => {
109491
109489
  if (!tmplBomC?.formInstBom?.formTmplBomList) return;
109492
109490
  const useBomMode = tmplBomC.defaultMCPattern === MaterialConsumptionPatternEnum.BOM;
109493
- tmplBomC.formInstBom.formTmplBomList.forEach(({
109494
- personal_bom_enabled_,
109495
- entries_,
109496
- table_key_
109497
- }) => {
109498
- if (useBomMode) {
109499
- const entries = personal_bom_enabled_ ? entries_ : tmplBomC.bomEntries;
109500
- const includedIds = [];
109501
- (entries || []).forEach((e) => {
109502
- includedIds.push(e.product_id_.split(":").pop());
109503
- (e.substitute_material_entries_ || []).forEach((_e) => {
109504
- includedIds.push(_e.product_id_.split(":").pop());
109491
+ tmplBomC.formInstBom.formTmplBomList.forEach(
109492
+ ({ personal_bom_enabled_, entries_, table_key_ }) => {
109493
+ if (useBomMode) {
109494
+ const entries = personal_bom_enabled_ ? entries_ : tmplBomC.bomEntries;
109495
+ const includedIds = [];
109496
+ (entries || []).forEach((e) => {
109497
+ includedIds.push(e.product_id_.split(":").pop());
109498
+ (e.substitute_material_entries_ || []).forEach((_e) => {
109499
+ includedIds.push(_e.product_id_.split(":").pop());
109500
+ });
109505
109501
  });
109506
- });
109507
- subConfig[`${table_key_}[n].product_id_`] = { "id_.in": includedIds };
109508
- }
109509
- const subFieldKey = table_key_.replace("$.", "");
109510
- const rows = doc.dataManager.getRawData()[subFieldKey] || [];
109511
- const rowCount = rows.length;
109512
- repeat(rowCount || 1, (index2) => {
109513
- MCDataUtil.disableQtyFields(doc.dataManager, `${table_key_}[${index2}]`);
109514
- });
109515
- rows.forEach((row, rowIndex) => {
109516
- const rowPath = `${table_key_}[${rowIndex}]`;
109517
- const tableController = tmplBomC?.findTableControllerByField(table_key_);
109518
- if (row.product_id_) {
109519
- const versionId = row.product_id_.split(":").pop();
109520
- if (versionId) {
109521
- subConfig[`${rowPath}.material_no_`] = {
109522
- "product_id_.versionIn": [versionId]
109523
- };
109524
- }
109502
+ subConfig[`${table_key_}[n].product_id_`] = { "id_.in": includedIds };
109525
109503
  }
109526
- MCDataUtil.updateViewFieldsDisablement({
109527
- dataManager: doc.dataManager,
109528
- rowPath,
109529
- disabled: !!tableController?.getMaterialTypeIsView(row.product_id_)
109504
+ const subFieldKey = table_key_.replace("$.", "");
109505
+ const rows = doc.dataManager.getRawData()[subFieldKey] || [];
109506
+ const rowCount = rows.length;
109507
+ repeat(rowCount || 1, (index2) => {
109508
+ MCDataUtil.disableQtyFields(doc.dataManager, `${table_key_}[${index2}]`);
109530
109509
  });
109531
- if (row.is_confirmed_) {
109532
- MCDataUtil.updateConfirmableFieldsDisablement({
109510
+ rows.forEach((row, rowIndex) => {
109511
+ const rowPath = `${table_key_}[${rowIndex}]`;
109512
+ const tableController = tmplBomC?.findTableControllerByField(table_key_);
109513
+ if (row.product_id_) {
109514
+ const versionId = row.product_id_.split(":").pop();
109515
+ if (versionId) {
109516
+ subConfig[`${rowPath}.material_no_`] = {
109517
+ "product_id_.versionIn": [versionId]
109518
+ };
109519
+ }
109520
+ }
109521
+ MCDataUtil.updateViewFieldsDisablement({
109533
109522
  dataManager: doc.dataManager,
109534
109523
  rowPath,
109535
- disabled: true
109524
+ disabled: !!tableController?.getMaterialTypeIsView(row.product_id_)
109536
109525
  });
109537
- }
109538
- });
109539
- });
109526
+ if (row.is_confirmed_) {
109527
+ MCDataUtil.updateConfirmableFieldsDisablement({
109528
+ dataManager: doc.dataManager,
109529
+ rowPath,
109530
+ disabled: true
109531
+ });
109532
+ }
109533
+ });
109534
+ }
109535
+ );
109540
109536
  };
109541
109537
  class DocRequestStrategy {
109542
109538
  props;
@@ -111747,7 +111743,7 @@ function appendFillMapPayload(payload, parsed, parseRules, runtimeValuePath) {
111747
111743
  for (const formField of mapItem?.formFields || []) {
111748
111744
  const path = resolveTargetPath(runtimeValuePath, formField);
111749
111745
  if (!path || path === runtimeValuePath) continue;
111750
- Object.assign(payload, setValue(value, path));
111746
+ Object.assign(payload, setValue$1(value, path));
111751
111747
  }
111752
111748
  }
111753
111749
  }
@@ -111798,7 +111794,7 @@ async function submitDeviceScan(params) {
111798
111794
  if (!row) {
111799
111795
  return { ok: false, message: MSG_NO_DATA };
111800
111796
  }
111801
- const payload = setValue(row.__VALUE__, runtimeValuePath);
111797
+ const payload = setValue$1(row.__VALUE__, runtimeValuePath);
111802
111798
  appendFillMapPayload(payload, parsed, parseRules, runtimeValuePath);
111803
111799
  return { ok: true, payload, record: row._item };
111804
111800
  }
@@ -125385,7 +125381,7 @@ const _sfc_main$2c = /* @__PURE__ */ defineComponent({
125385
125381
  return getValue$1(value, isMultiple.value);
125386
125382
  },
125387
125383
  set(v) {
125388
- const data = setValue(v, runtimeValuePath.value, {
125384
+ const data = setValue$1(v, runtimeValuePath.value, {
125389
125385
  multiple: isMultiple.value
125390
125386
  });
125391
125387
  docInst.value?.dataManager.setMultiple(data, "user");
@@ -129165,7 +129161,7 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
129165
129161
  };
129166
129162
  }
129167
129163
  });
129168
- const MaterialConsumeTablePanel = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["__scopeId", "data-v-0b5a3b4b"]]);
129164
+ const MaterialConsumeTablePanel = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["__scopeId", "data-v-0e3048f6"]]);
129169
129165
  const schema$a = createTablePanelSchema("material-consume-table.basic", MaterialConsumeTablePanel);
129170
129166
  const schema$9 = createTablePanelSchema("fixed-table.basic", BoundedSubTablePanel);
129171
129167
  const _sfc_main$1F = /* @__PURE__ */ defineComponent({
@@ -139662,7 +139658,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
139662
139658
  emitChange(value);
139663
139659
  }
139664
139660
  function emitChange(value) {
139665
- const data = setValue(value, runtimeValuePath.value, {
139661
+ const data = setValue$1(value, runtimeValuePath.value, {
139666
139662
  multiple: props.isMultiple
139667
139663
  });
139668
139664
  emit("change", data);
@@ -139959,7 +139955,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
139959
139955
  emitChange(null);
139960
139956
  }
139961
139957
  function emitChange(value) {
139962
- const data = setValue(value, runtimeValuePath.value, {
139958
+ const data = setValue$1(value, runtimeValuePath.value, {
139963
139959
  multiple: props.isMultiple
139964
139960
  });
139965
139961
  emit("change", data);
@@ -140047,7 +140043,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
140047
140043
  () => isDateTime.value ? resolveDateTimePickerTimeFormat(widgetProps.value) : void 0
140048
140044
  );
140049
140045
  function onPanelChange(v) {
140050
- const data = setValue(
140046
+ const data = setValue$1(
140051
140047
  v ? formatDateTimeForStorage(v, storageFormat.value, pickerTimeFormat.value) : v,
140052
140048
  runtimeValuePath.value
140053
140049
  );
@@ -140086,7 +140082,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
140086
140082
  const pickerFormat = computed(() => resolveTimePickerFormat(widgetProps.value));
140087
140083
  function onPanelChange(timeObj) {
140088
140084
  const value = timeObj.value == null ? timeObj.value : completeTimeValue(timeObj.value);
140089
- const data = setValue(value, runtimeValuePath.value);
140085
+ const data = setValue$1(value, runtimeValuePath.value);
140090
140086
  emit("change", data);
140091
140087
  }
140092
140088
  return (_ctx, _cache) => {
@@ -140559,7 +140555,7 @@ function useTableDropdown(props, searchFilters) {
140559
140555
  const columns2 = computed(() => getColumns(strategy.value.columnsKey, strategy.value.isTree));
140560
140556
  const selectedId = computed(() => {
140561
140557
  if (!runtimeValuePath.value) return void 0;
140562
- const id = docInst.value.dataManager.get(getIdPath(runtimeValuePath.value));
140558
+ const id = docInst.value.dataManager.get(getIdPath$1(runtimeValuePath.value));
140563
140559
  return id != null && id !== "" ? String(id) : void 0;
140564
140560
  });
140565
140561
  const businessLinkage = computed(
@@ -140786,6 +140782,10 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
140786
140782
  row?._item?.id_,
140787
140783
  { persistOptionId: persistOptionId.value }
140788
140784
  );
140785
+ if (persistOptionId.value) {
140786
+ const idPath = getIdPath(runtimeValuePath.value);
140787
+ Object.assign(data, setValue(row?._item?.id_ ?? void 0, idPath));
140788
+ }
140789
140789
  if (clearValuePath.value) {
140790
140790
  Object.assign(data, buildFieldSelectUpdates(clearValuePath.value, void 0));
140791
140791
  }
@@ -140978,7 +140978,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
140978
140978
  showValue = value;
140979
140979
  }
140980
140980
  }
140981
- const data = setValue(showValue, runtimeValuePath.value);
140981
+ const data = setValue$1(showValue, runtimeValuePath.value);
140982
140982
  emit("change", data, __DEFAULT__ ? __DEFAULT__._item : row?._item);
140983
140983
  };
140984
140984
  __expose({
@@ -141389,7 +141389,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
141389
141389
  GctMessage.warning("请等待附件上传完成后再点击确定");
141390
141390
  return;
141391
141391
  }
141392
- return setValue(innerValue.value, runtimeValuePath.value);
141392
+ return setValue$1(innerValue.value, runtimeValuePath.value);
141393
141393
  }
141394
141394
  function cancelUploading() {
141395
141395
  uploadRef.value?.cancelUploading?.();
@@ -141717,7 +141717,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
141717
141717
  GctMessage.warning("请等待图片上传完成后再点击确定");
141718
141718
  return;
141719
141719
  }
141720
- return setValue(innerValue.value, runtimeValuePath.value);
141720
+ return setValue$1(innerValue.value, runtimeValuePath.value);
141721
141721
  }
141722
141722
  function cancelUploading() {
141723
141723
  uploadRef.value?.cancelUploading?.();
@@ -142002,7 +142002,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
142002
142002
  const persistSignatures = () => {
142003
142003
  const list = signatureList.value.map(({ displaySrc: _2, ...item }) => item);
142004
142004
  const data = list.length ? JSON.stringify(list) : void 0;
142005
- return setValue(data, runtimeValuePath.value);
142005
+ return setValue$1(data, runtimeValuePath.value);
142006
142006
  };
142007
142007
  const validateAll = async () => {
142008
142008
  clearErrors();
package/dist/word.css CHANGED
@@ -10774,22 +10774,22 @@ svg.portrait-icon[data-v-8bdb451e] {
10774
10774
  .bom-entry-item .iconfont.btn-item[data-v-cabb46fe] {
10775
10775
  margin-right: 8px;
10776
10776
  }
10777
- .panel-material-consume-table[data-v-0b5a3b4b] {
10777
+ .panel-material-consume-table[data-v-0e3048f6] {
10778
10778
  position: relative;
10779
10779
  }
10780
- .panel-material-consume-table .container[data-v-0b5a3b4b] {
10780
+ .panel-material-consume-table .container[data-v-0e3048f6] {
10781
10781
  padding: 16px;
10782
10782
  }
10783
- .panel-material-consume-table .form-custom-label[data-v-0b5a3b4b] {
10783
+ .panel-material-consume-table .form-custom-label[data-v-0e3048f6] {
10784
10784
  display: inline-flex;
10785
10785
  align-items: center;
10786
10786
  gap: 4px;
10787
10787
  }
10788
- .panel-material-consume-table .form-custom-label .icon[data-v-0b5a3b4b] {
10788
+ .panel-material-consume-table .form-custom-label .icon[data-v-0e3048f6] {
10789
10789
  cursor: pointer;
10790
10790
  vertical-align: text-top;
10791
10791
  }
10792
- .panel-material-consume-table .content[data-v-0b5a3b4b] {
10792
+ .panel-material-consume-table .content[data-v-0e3048f6] {
10793
10793
  display: flex;
10794
10794
  align-items: center;
10795
10795
  justify-content: flex-end;
@@ -10797,7 +10797,7 @@ svg.portrait-icon[data-v-8bdb451e] {
10797
10797
  line-height: 22px;
10798
10798
  width: 100%;
10799
10799
  }
10800
- .panel-material-consume-table .entries-container[data-v-0b5a3b4b] {
10800
+ .panel-material-consume-table .entries-container[data-v-0e3048f6] {
10801
10801
  padding: 6px 0;
10802
10802
  }
10803
10803
  .add-ds-btn[data-v-e5dff26f] {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/word",
3
- "version": "0.1.63-beta.9",
3
+ "version": "0.1.63",
4
4
  "description": "GCT 在线 word",
5
5
  "keywords": [
6
6
  "vue",