@gct-paas/word 0.1.58 → 0.1.59

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_",
@@ -122317,7 +122320,7 @@ const filterFn = (f) => {
122317
122320
  ].includes(f.key)) {
122318
122321
  return false;
122319
122322
  }
122320
- if (f.createType === "BUILTIN" && f.key && f.key.endsWith(ID_SUFFIX) && f.type === FIELD_TYPE.TEXT) {
122323
+ if (f.createType === "BUILTIN" && f.key && isCompanionIdPath(f.key) && f.type === FIELD_TYPE.TEXT) {
122321
122324
  return false;
122322
122325
  }
122323
122326
  return true;
@@ -126764,6 +126767,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
126764
126767
  { label: "记录模式", value: MaterialConsumptionPatternEnum.RECORD }
126765
126768
  ];
126766
126769
  const props = __props;
126770
+ const isBomGranted = ref(false);
126767
126771
  const regionRef = computed(
126768
126772
  () => props.widget.findRegionById(props.active.context.regionId)
126769
126773
  );
@@ -126779,8 +126783,8 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
126779
126783
  regionType: "material-consume-table"
126780
126784
  });
126781
126785
  onMounted(async () => {
126782
- const isGranted = await queryIsBomGranted();
126783
- if (isGranted && regionProps.value && !regionProps.value.material_consumption_pattern_) {
126786
+ isBomGranted.value = await queryIsBomGranted();
126787
+ if (isBomGranted.value && regionProps.value && !regionProps.value.material_consumption_pattern_) {
126784
126788
  regionProps.value.material_consumption_pattern_ = MaterialConsumptionPatternEnum.BOM;
126785
126789
  }
126786
126790
  });
@@ -126813,7 +126817,8 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
126813
126817
  ]),
126814
126818
  _: 1
126815
126819
  }),
126816
- createVNode(unref(GctFormItem), {
126820
+ isBomGranted.value ? (openBlock(), createBlock(unref(GctFormItem), {
126821
+ key: 0,
126817
126822
  inline: false,
126818
126823
  label: "物料消耗模式"
126819
126824
  }, {
@@ -126825,8 +126830,8 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
126825
126830
  }, null, 8, ["modelValue"])
126826
126831
  ]),
126827
126832
  _: 1
126828
- }),
126829
- unref(regionProps).material_consumption_pattern_ === unref(MaterialConsumptionPatternEnum).BOM ? (openBlock(), createBlock(unref(GctFormItem), { key: 0 }, {
126833
+ })) : createCommentVNode("", true),
126834
+ createVNode(unref(GctFormItem), null, {
126830
126835
  label: withCtx(() => [..._cache[5] || (_cache[5] = [
126831
126836
  createElementVNode("div", { class: "form-custom-label" }, " 人为指定物料 ", -1)
126832
126837
  ])]),
@@ -126840,7 +126845,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
126840
126845
  ])
126841
126846
  ]),
126842
126847
  _: 1
126843
- })) : createCommentVNode("", true),
126848
+ }),
126844
126849
  unref(regionProps).personal_bom_enabled_ ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
126845
126850
  createElementVNode("div", _hoisted_4$o, [
126846
126851
  createVNode(BomEntryEditor, {
@@ -126872,7 +126877,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
126872
126877
  };
126873
126878
  }
126874
126879
  });
126875
- const MaterialConsumeTablePanel = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["__scopeId", "data-v-0dd8e3b3"]]);
126880
+ const MaterialConsumeTablePanel = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["__scopeId", "data-v-c6970c00"]]);
126876
126881
  const schema$9 = createTablePanelSchema("material-consume-table.basic", MaterialConsumeTablePanel);
126877
126882
  const schema$8 = createTablePanelSchema("fixed-table.basic", BoundedSubTablePanel);
126878
126883
  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.59",
4
4
  "description": "GCT 在线 word",
5
5
  "keywords": [
6
6
  "vue",