@gct-paas/word 0.1.58 → 0.1.60

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.
@@ -9,7 +9,12 @@ export declare const HYPERLINK_TEXT_COLOR = "#0563c1";
9
9
  export declare function getLabelPath(path: string): string;
10
10
  export declare function getHrefPath(path: string): string;
11
11
  export declare function getIdPath(path: string): string;
12
- /** 派生数据路径(label / href / id),不参与 changedMap / 业务副作用 */
12
+ /**
13
+ * 是否为批次 companion id 路径(以 `__id_` 结尾)。
14
+ * 在于判断用了 endsWith('_id_'):product_id_、warehouse_id_ 也会命中。改成只认以 __id_ 结尾
15
+ */
16
+ export declare function isCompanionIdPath(path: string): boolean;
17
+ /** 派生数据路径(label / href / companion id),不参与 changedMap / 业务副作用 */
13
18
  export declare function isDerivedDataPath(path: string): boolean;
14
19
  /** 子表行内仅前端使用、不参与提交的字段 */
15
20
  export declare const ROW_RUNTIME_META_KEYS: Set<string>;
package/dist/index.es.js CHANGED
@@ -33396,8 +33396,11 @@ function getHrefPath(path) {
33396
33396
  function getIdPath(path) {
33397
33397
  return path + ID_SUFFIX;
33398
33398
  }
33399
+ function isCompanionIdPath(path) {
33400
+ return path.endsWith("_" + ID_SUFFIX);
33401
+ }
33399
33402
  function isDerivedDataPath(path) {
33400
- return path.endsWith(LABEL_SUFFIX) || path.endsWith(HREF_SUFFIX) || path.endsWith(ID_SUFFIX);
33403
+ return path.endsWith(LABEL_SUFFIX) || path.endsWith(HREF_SUFFIX) || isCompanionIdPath(path);
33401
33404
  }
33402
33405
  const ROW_RUNTIME_META_KEYS = /* @__PURE__ */ new Set([
33403
33406
  "row_source_",
@@ -94492,12 +94495,14 @@ class SetMaterialConsumeTable extends CommandBase {
94492
94495
  row: endCell.parent?.getCurrentIndex(),
94493
94496
  col: endCell.getCurrentIndex()
94494
94497
  };
94498
+ const { name: name2, valuePath } = this.payload;
94499
+ const props = { table_key_: valuePath };
94495
94500
  this.output = startCell.table.setMaterialConsumeTable({
94496
94501
  start,
94497
94502
  end,
94498
- name: this.payload.name,
94499
- valuePath: this.payload.valuePath,
94500
- widgetMeta: { props: { table_key_: "" } }
94503
+ name: name2,
94504
+ valuePath,
94505
+ widgetMeta: { props }
94501
94506
  });
94502
94507
  return null;
94503
94508
  }
@@ -122317,7 +122322,7 @@ const filterFn = (f) => {
122317
122322
  ].includes(f.key)) {
122318
122323
  return false;
122319
122324
  }
122320
- if (f.createType === "BUILTIN" && f.key && f.key.endsWith(ID_SUFFIX) && f.type === FIELD_TYPE.TEXT) {
122325
+ if (f.createType === "BUILTIN" && f.key && isCompanionIdPath(f.key) && f.type === FIELD_TYPE.TEXT) {
122321
122326
  return false;
122322
122327
  }
122323
122328
  return true;
@@ -126764,6 +126769,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
126764
126769
  { label: "记录模式", value: MaterialConsumptionPatternEnum.RECORD }
126765
126770
  ];
126766
126771
  const props = __props;
126772
+ const isBomGranted = ref(false);
126767
126773
  const regionRef = computed(
126768
126774
  () => props.widget.findRegionById(props.active.context.regionId)
126769
126775
  );
@@ -126779,8 +126785,8 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
126779
126785
  regionType: "material-consume-table"
126780
126786
  });
126781
126787
  onMounted(async () => {
126782
- const isGranted = await queryIsBomGranted();
126783
- if (isGranted && regionProps.value && !regionProps.value.material_consumption_pattern_) {
126788
+ isBomGranted.value = await queryIsBomGranted();
126789
+ if (isBomGranted.value && regionProps.value && !regionProps.value.material_consumption_pattern_) {
126784
126790
  regionProps.value.material_consumption_pattern_ = MaterialConsumptionPatternEnum.BOM;
126785
126791
  }
126786
126792
  });
@@ -126813,7 +126819,8 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
126813
126819
  ]),
126814
126820
  _: 1
126815
126821
  }),
126816
- createVNode(unref(GctFormItem), {
126822
+ isBomGranted.value ? (openBlock(), createBlock(unref(GctFormItem), {
126823
+ key: 0,
126817
126824
  inline: false,
126818
126825
  label: "物料消耗模式"
126819
126826
  }, {
@@ -126825,8 +126832,8 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
126825
126832
  }, null, 8, ["modelValue"])
126826
126833
  ]),
126827
126834
  _: 1
126828
- }),
126829
- unref(regionProps).material_consumption_pattern_ === unref(MaterialConsumptionPatternEnum).BOM ? (openBlock(), createBlock(unref(GctFormItem), { key: 0 }, {
126835
+ })) : createCommentVNode("", true),
126836
+ createVNode(unref(GctFormItem), null, {
126830
126837
  label: withCtx(() => [..._cache[5] || (_cache[5] = [
126831
126838
  createElementVNode("div", { class: "form-custom-label" }, " 人为指定物料 ", -1)
126832
126839
  ])]),
@@ -126840,7 +126847,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
126840
126847
  ])
126841
126848
  ]),
126842
126849
  _: 1
126843
- })) : createCommentVNode("", true),
126850
+ }),
126844
126851
  unref(regionProps).personal_bom_enabled_ ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
126845
126852
  createElementVNode("div", _hoisted_4$o, [
126846
126853
  createVNode(BomEntryEditor, {
@@ -126872,7 +126879,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
126872
126879
  };
126873
126880
  }
126874
126881
  });
126875
- const MaterialConsumeTablePanel = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["__scopeId", "data-v-0dd8e3b3"]]);
126882
+ const MaterialConsumeTablePanel = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["__scopeId", "data-v-c6970c00"]]);
126876
126883
  const schema$9 = createTablePanelSchema("material-consume-table.basic", MaterialConsumeTablePanel);
126877
126884
  const schema$8 = createTablePanelSchema("fixed-table.basic", BoundedSubTablePanel);
126878
126885
  const _sfc_main$1u = /* @__PURE__ */ defineComponent({
package/dist/word.css CHANGED
@@ -10539,22 +10539,22 @@ svg.portrait-icon[data-v-8bdb451e] {
10539
10539
  .bom-entry-item .iconfont.btn-item[data-v-f070d621] {
10540
10540
  margin-right: 8px;
10541
10541
  }
10542
- .panel-material-consume-table[data-v-0dd8e3b3] {
10542
+ .panel-material-consume-table[data-v-c6970c00] {
10543
10543
  position: relative;
10544
10544
  }
10545
- .panel-material-consume-table .container[data-v-0dd8e3b3] {
10545
+ .panel-material-consume-table .container[data-v-c6970c00] {
10546
10546
  padding: 16px;
10547
10547
  }
10548
- .panel-material-consume-table .form-custom-label[data-v-0dd8e3b3] {
10548
+ .panel-material-consume-table .form-custom-label[data-v-c6970c00] {
10549
10549
  display: inline-flex;
10550
10550
  align-items: center;
10551
10551
  gap: 4px;
10552
10552
  }
10553
- .panel-material-consume-table .form-custom-label .icon[data-v-0dd8e3b3] {
10553
+ .panel-material-consume-table .form-custom-label .icon[data-v-c6970c00] {
10554
10554
  cursor: pointer;
10555
10555
  vertical-align: text-top;
10556
10556
  }
10557
- .panel-material-consume-table .content[data-v-0dd8e3b3] {
10557
+ .panel-material-consume-table .content[data-v-c6970c00] {
10558
10558
  display: flex;
10559
10559
  align-items: center;
10560
10560
  justify-content: flex-end;
@@ -10562,7 +10562,7 @@ svg.portrait-icon[data-v-8bdb451e] {
10562
10562
  line-height: 22px;
10563
10563
  width: 100%;
10564
10564
  }
10565
- .panel-material-consume-table .entries-container[data-v-0dd8e3b3] {
10565
+ .panel-material-consume-table .entries-container[data-v-c6970c00] {
10566
10566
  padding: 6px 0;
10567
10567
  }
10568
10568
  .add-ds-btn[data-v-444003bd] {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/word",
3
- "version": "0.1.58",
3
+ "version": "0.1.60",
4
4
  "description": "GCT 在线 word",
5
5
  "keywords": [
6
6
  "vue",