@gct-paas/word 0.1.52-beta.12 → 0.1.52-beta.13

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
@@ -33160,7 +33160,7 @@ function toFormatValue(fieldType, value) {
33160
33160
  if ([FIELD_TYPE.INTEGER, FIELD_TYPE.LONG].includes(fieldType)) {
33161
33161
  const _val_ = parseInt(value);
33162
33162
  return isNaN(_val_) ? null : _val_;
33163
- } else if (fieldType === FIELD_TYPE.DECIMAL) {
33163
+ } else if ([FIELD_TYPE.DOUBLE, FIELD_TYPE.DECIMAL].includes(fieldType)) {
33164
33164
  const _val_ = parseFloat(value);
33165
33165
  return isNaN(_val_) ? null : _val_;
33166
33166
  } else if (fieldType === FIELD_TYPE.BOOLEAN) {
@@ -82811,10 +82811,19 @@ const fieldNameMap = {
82811
82811
  product_check_qty: "产品检验数量",
82812
82812
  material_check_qty: "材料检验数量",
82813
82813
  external_reference_no: "外部参考号",
82814
+ order_no: "订单号",
82815
+ related_lot_no: "关联批次",
82814
82816
  warehouse_receipt_no: "单据编号",
82815
82817
  warehouse_receipt_date: "单据日期",
82816
82818
  warehouse_manager: "仓管员",
82817
82819
  warehouse: "仓库",
82820
+ location: "库位",
82821
+ production_identifier: "物料批次(生产标识)",
82822
+ object_type: "对象",
82823
+ material_consume: "物料消耗",
82824
+ qty: "数量",
82825
+ qty_consumed: "已消耗数量",
82826
+ qty_required: "需求数量",
82818
82827
  device_ref: "设备关联",
82819
82828
  device_ref_multi: "设备多选",
82820
82829
  number: "数值",
@@ -82942,12 +82951,23 @@ const getField2Operators = (fieldType) => {
82942
82951
  case FIELD_TYPE.RELATED_LOT_NO:
82943
82952
  case FIELD_TYPE.SCRAP_MATERIAL_NO:
82944
82953
  case FIELD_TYPE.EXTERNAL_REF_NO:
82954
+ case FIELD_TYPE.ORDER_NO:
82955
+ case FIELD_TYPE.WAREHOUSE_RECEIPT_NO:
82945
82956
  options = StringOperators.slice();
82946
82957
  break;
82947
82958
  case FIELD_TYPE.INTEGER:
82948
82959
  case FIELD_TYPE.LONG:
82949
82960
  case FIELD_TYPE.DOUBLE:
82950
82961
  case FIELD_TYPE.DECIMAL:
82962
+ case FIELD_TYPE.QTY:
82963
+ case FIELD_TYPE.QTY_CONSUMED:
82964
+ case FIELD_TYPE.QTY_REQUIRED:
82965
+ case FIELD_TYPE.GOOD_QTY:
82966
+ case FIELD_TYPE.NOT_GOOD_QTY:
82967
+ case FIELD_TYPE.SCRAP_QTY:
82968
+ case FIELD_TYPE.DESTRUCTIVE_TEST_QTY:
82969
+ case FIELD_TYPE.PRODUCT_CHECK_QTY:
82970
+ case FIELD_TYPE.MATERIAL_CHECK_QTY:
82951
82971
  options = NumberOperators.slice();
82952
82972
  break;
82953
82973
  case FIELD_TYPE.BOOLEAN:
@@ -82956,6 +82976,9 @@ const getField2Operators = (fieldType) => {
82956
82976
  case FIELD_TYPE.DATE:
82957
82977
  case FIELD_TYPE.TIME:
82958
82978
  case FIELD_TYPE.DATE_TIME:
82979
+ case FIELD_TYPE.TRACE_DATE:
82980
+ case FIELD_TYPE.WAREHOUSE_RECEIPT_DATE:
82981
+ case FIELD_TYPE.PRODUCTION_DATE:
82959
82982
  options = TimeOperators.slice();
82960
82983
  break;
82961
82984
  case FIELD_TYPE.OPTION:
@@ -82965,6 +82988,7 @@ const getField2Operators = (fieldType) => {
82965
82988
  case FIELD_TYPE.REF:
82966
82989
  case FIELD_TYPE.RDO_REF:
82967
82990
  case FIELD_TYPE.WAREHOUSE:
82991
+ case FIELD_TYPE.LOCATION:
82968
82992
  options = OptionOperators.slice();
82969
82993
  break;
82970
82994
  case FIELD_TYPE.OPTION_MULTI:
@@ -85157,7 +85181,7 @@ const DYN_CONFIG_BY_TYPE = {
85157
85181
  attrsTransform: [...basicAttrs.required, ...basicAttrs.placeholder]
85158
85182
  }
85159
85183
  };
85160
- const FIELD_TYPE_TO_FW$1 = {
85184
+ const FIELD_TYPE_TO_FW = {
85161
85185
  [FIELD_TYPE.TEXT]: "fw:input",
85162
85186
  [FIELD_TYPE.LONG_TEXT]: "fw:input",
85163
85187
  [FIELD_TYPE.INTEGER]: "fw:number",
@@ -85210,7 +85234,7 @@ function buildPropsFromRow(row, config2, baseProps = {}) {
85210
85234
  return patch;
85211
85235
  }
85212
85236
  function resolveFwType(fieldType, props) {
85213
- return FIELD_TYPE_TO_FW$1[fieldType] ?? "fw:input";
85237
+ return FIELD_TYPE_TO_FW[fieldType] ?? "fw:input";
85214
85238
  }
85215
85239
  function parseCrossIndices(path) {
85216
85240
  const m = path.match(/\[(\d+)\]\[(\d+)\](?:\.[^[]+)?$/);
@@ -95746,27 +95770,13 @@ class FieldBaseHandler extends RunHandlerBase {
95746
95770
  context.addRun(run);
95747
95771
  }
95748
95772
  }
95749
- const FIELD_TYPE_TO_FW = {
95750
- [FIELD_TYPE.TEXT]: "fw:input",
95751
- [FIELD_TYPE.LONG_TEXT]: "fw:input",
95752
- [FIELD_TYPE.INTEGER]: "fw:number",
95753
- [FIELD_TYPE.LONG]: "fw:number",
95754
- [FIELD_TYPE.DOUBLE]: "fw:double",
95755
- [FIELD_TYPE.DECIMAL]: "fw:number",
95756
- [FIELD_TYPE.DATE]: "fw:date",
95757
- [FIELD_TYPE.DATE_TIME]: "fw:date-time",
95758
- [FIELD_TYPE.TIME]: "fw:time",
95759
- [FIELD_TYPE.ENUM]: "fw:enum",
95760
- [FIELD_TYPE.ENUM_MULTI]: "fw:enum-multiple",
95761
- [FIELD_TYPE.MATERIAL_NO]: "fw:table-select",
95762
- [FIELD_TYPE.RELATED_LOT_NO]: "fw:table-select",
95763
- [FIELD_TYPE.PRODUCT]: "fw:rdo-table-select",
95764
- [FIELD_TYPE.DEVICE]: "fw:table-select",
95765
- [FIELD_TYPE.MFG_ORDER]: "fw:table-select",
95766
- [FIELD_TYPE.RECORD_NO]: "fw:input",
95767
- [FIELD_TYPE.ORDER_NO]: "fw:input",
95768
- [FIELD_TYPE.TRACE_DATE]: "fw:date"
95769
- };
95773
+ function resolveAttachFieldComponent(ctx, fieldType) {
95774
+ const component = ctx.context.doc.fieldModelQuery.getFieldManifest(fieldType)?.component;
95775
+ if (component && component !== "cascade") {
95776
+ return component;
95777
+ }
95778
+ return "fw:input";
95779
+ }
95770
95780
  class AttachFieldHandler extends FieldBaseHandler {
95771
95781
  static layoutOptionAttachFields(ctx, option, layoutStyle) {
95772
95782
  const items = option.attachFields;
@@ -95793,7 +95803,7 @@ class AttachFieldHandler extends FieldBaseHandler {
95793
95803
  }
95794
95804
  static buildWidgetMeta(ctx, item, parentWr, parentRuntimeValuePath, parentOptionValue, runtimePath) {
95795
95805
  const fieldType = item.fieldData.fieldType;
95796
- const type4 = FIELD_TYPE_TO_FW[fieldType] ?? "fw:input";
95806
+ const type4 = resolveAttachFieldComponent(ctx, fieldType);
95797
95807
  const parentMeta = parentWr.widgetMeta;
95798
95808
  const attachFieldParent = {
95799
95809
  parentModelRefId: this.getModelRefId(ctx.context, parentWr),
@@ -108880,6 +108890,9 @@ class SuiteRuntime {
108880
108890
  getMasterSlaveFieldList(modelKey) {
108881
108891
  return this.fieldService.getFieldList(modelKey)?.filter((i) => i.type === FIELD_TYPE.MASTERSLAVE) || [];
108882
108892
  }
108893
+ getFieldManifest(type4) {
108894
+ return this.fieldManifestService.getManifestByType(type4);
108895
+ }
108883
108896
  reloadFields(modelKey) {
108884
108897
  this.fieldService.clear(modelKey);
108885
108898
  return this.loadFieldList(modelKey);
@@ -130346,7 +130359,10 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
130346
130359
  FIELD_TYPE.MFG_ORDER,
130347
130360
  FIELD_TYPE.RECORD_NO,
130348
130361
  FIELD_TYPE.ORDER_NO,
130349
- FIELD_TYPE.TRACE_DATE
130362
+ FIELD_TYPE.EXTERNAL_REF_NO,
130363
+ FIELD_TYPE.TRACE_DATE,
130364
+ FIELD_TYPE.WAREHOUSE_RECEIPT_NO,
130365
+ FIELD_TYPE.WAREHOUSE_RECEIPT_DATE
130350
130366
  ];
130351
130367
  if (!allowFieldTypes.includes(meta.field.fieldType)) {
130352
130368
  GctMessage.warning(props.customFieldMsg ?? "能绑定数值、文本、日期和追溯类型的字段");
@@ -130396,7 +130412,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
130396
130412
  };
130397
130413
  }
130398
130414
  });
130399
- const AttachFieldEditor = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-abcd1f7d"]]);
130415
+ const AttachFieldEditor = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-fc484054"]]);
130400
130416
  const _hoisted_1$Q = { class: "option-container" };
130401
130417
  const _hoisted_2$q = { class: "option-item" };
130402
130418
  const _hoisted_3$f = { class: "option" };
@@ -136214,6 +136230,22 @@ const selectStrategyMap = {
136214
136230
  },
136215
136231
  transform: transformLotData
136216
136232
  },
136233
+ [FIELD_TYPE.WAREHOUSE]: {
136234
+ columnsKey: "ref",
136235
+ fetcher: "ref",
136236
+ buildQuery({ keyword, searchField, extraParams }) {
136237
+ return buildRefQuickSearchQuery(searchField, keyword, extraParams);
136238
+ },
136239
+ transform: transformLotData
136240
+ },
136241
+ [FIELD_TYPE.LOCATION]: {
136242
+ columnsKey: "ref",
136243
+ fetcher: "ref",
136244
+ buildQuery({ keyword, searchField, extraParams }) {
136245
+ return buildRefQuickSearchQuery(searchField, keyword, extraParams);
136246
+ },
136247
+ transform: transformLotData
136248
+ },
136217
136249
  [FIELD_TYPE.REF]: {
136218
136250
  columnsKey: "ref",
136219
136251
  fetcher: "ref",
@@ -1,4 +1,5 @@
1
1
  import { FieldScope, FieldService, ModelService, FieldMeta, ModelMeta } from '../../../capabilities/model-field-runtime';
2
+ import { FIELD_TYPE } from '../../../domain/field/field-type';
2
3
  import { ComponentService } from '../../../capabilities/component-registry';
3
4
  import { PanelRouterService } from '../../../capabilities/panel/router/service';
4
5
  import { PanelSchemaService } from '../../../capabilities/panel/schema/service';
@@ -33,6 +34,7 @@ export declare class SuiteRuntime implements FieldModelQuery {
33
34
  */
34
35
  ensureModelFieldsReady(modelKey: ModelKey): Promise<void>;
35
36
  getMasterSlaveFieldList(modelKey: ModelKey): FieldMeta[];
37
+ getFieldManifest(type: FIELD_TYPE): import('../../../capabilities/field-manifest').FieldManifest | undefined;
36
38
  reloadFields(modelKey: ModelKey): Promise<import('../../../capabilities/model-field-runtime').FieldListResult>;
37
39
  reloadModel(modelKey: ModelKey): Promise<[ModelMeta | undefined, import('../../../capabilities/model-field-runtime').FieldListResult]>;
38
40
  dispose(): void;
@@ -1,4 +1,6 @@
1
1
  import { FieldListResult, FieldMeta, FieldScope, ModelMeta } from '../../capabilities/model-field-runtime';
2
+ import { FieldManifest } from '../../capabilities/field-manifest';
3
+ import { FIELD_TYPE } from '../../domain/field/field-type';
2
4
  /**
3
5
  * 字段/模型查询能力(不依赖 Vue provide/inject)。
4
6
  * 由 {@link SuiteRuntime} 实现。
@@ -18,4 +20,5 @@ export interface FieldModelQuery {
18
20
  ensureModelFieldsReady(modelKey: ModelKey): Promise<void>;
19
21
  reloadFields(modelKey: ModelKey): Promise<FieldListResult>;
20
22
  reloadModel(modelKey: ModelKey): Promise<[ModelMeta | undefined, FieldListResult]>;
23
+ getFieldManifest(type: FIELD_TYPE): FieldManifest | undefined;
21
24
  }
package/dist/word.css CHANGED
@@ -11478,13 +11478,13 @@ svg.portrait-icon[data-v-8bdb451e] {
11478
11478
  color: #ff7875;
11479
11479
  }
11480
11480
 
11481
- .fill-fields-area[data-v-abcd1f7d] {
11481
+ .fill-fields-area[data-v-fc484054] {
11482
11482
  padding: 4px;
11483
11483
  background: #f0f0f0;
11484
11484
  border-radius: 4px;
11485
11485
  margin-top: 6px;
11486
11486
  }
11487
- .attach-fields-editor[data-v-abcd1f7d] {
11487
+ .attach-fields-editor[data-v-fc484054] {
11488
11488
  padding: 4px;
11489
11489
  border-color: transparent;
11490
11490
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/word",
3
- "version": "0.1.52-beta.12",
3
+ "version": "0.1.52-beta.13",
4
4
  "description": "GCT 在线 word",
5
5
  "keywords": [
6
6
  "vue",