@gct-paas/word 0.1.74-beta.21 → 0.1.74-beta.24

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.
@@ -8,6 +8,8 @@ import { DataSlotIndex } from '../../../view/types';
8
8
  type ValueType = string | number | undefined | null;
9
9
  export declare class FieldBaseHandler extends RunHandlerBase {
10
10
  static hasValue(value: ValueType): boolean;
11
+ /** 图片/附件 url 列表:兼容逗号串与数组 */
12
+ static normalizeUrlSources(raw: unknown): string[];
11
13
  /** 将展示文案拆成逐字 run;空串 split 会得到 [],需单独处理 */
12
14
  static toLayoutChars(label: unknown): string[];
13
15
  static isPrint(ctx: HandlerContext): boolean;
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @gct-paas/word v0.1.74-beta.21 */
1
+ /*! @gct-paas/word v0.1.74-beta.24 */
2
2
  import { Fragment, Suspense, Teleport, Transition, TransitionGroup, cloneVNode, computed, createApp, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, getCurrentInstance, getCurrentScope, guardReactiveProps, h, inject, isRef, isVNode, markRaw, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeMount, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, readonly, ref, render, renderList, renderSlot, resolveComponent, resolveDynamicComponent, shallowRef, toDisplayString, toHandlers, toRaw, toRef, toValue, unref, useAttrs, useCssVars, useModel, useSlots, vModelRadio, vModelText, vShow, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
3
3
  import Mt, { PopperWrapper } from "floating-vue";
4
4
  import VueKonva from "vue-konva";
@@ -98448,9 +98448,12 @@ function buildLikeQuery(searchFields, keyword, extraQuery = {}, options) {
98448
98448
  exp
98449
98449
  };
98450
98450
  }
98451
+ /** 设备可选过滤:使用中 + 校准有效期未过(next_calibration_date_ >= 当前时间) */
98451
98452
  function buildDeviceBaseQuery(extraQuery) {
98452
98453
  const queryData = {
98453
98454
  operating_state_: true,
98455
+ "status_.eq": DeviceStatus.IN_USE,
98456
+ "next_calibration_date_.ge": dayjs().format("YYYY-MM-DD HH:mm:ss"),
98454
98457
  ...extraQuery
98455
98458
  };
98456
98459
  const deviceTypeId = queryData["device_type_id_.eq"];
@@ -98465,9 +98468,29 @@ function buildDeviceQuickSearchQuery(quickSearchField, keyword, extraQuery) {
98465
98468
  function buildRefQuickSearchQuery(searchField, keyword, extraQuery, options) {
98466
98469
  return buildLikeQuery((searchField === null || searchField === void 0 ? void 0 : searchField.length) ? searchField : ["code_", "name_"], keyword, { ...extraQuery }, options);
98467
98470
  }
98468
- var QUICK_SEARCH_FIELD_TYPES, QUICK_SEARCH_CREATE_TYPES, DEFAULT_QUICK_SEARCH_FIELDS, FIELD_SEARCH_DEFAULT_EXP;
98471
+ var DeviceStatus, QUICK_SEARCH_FIELD_TYPES, QUICK_SEARCH_CREATE_TYPES, DEFAULT_QUICK_SEARCH_FIELDS, FIELD_SEARCH_DEFAULT_EXP;
98469
98472
  var init_quick_search = __esmMin((() => {
98470
98473
  init_field_type();
98474
+ DeviceStatus = {
98475
+ /** 使用中 */
98476
+ IN_USE: "IN_USE",
98477
+ /** 维修中 */
98478
+ REPAIRING: "REPAIRING",
98479
+ /** 保养中 */
98480
+ MAINTAINING: "MAINTAINING",
98481
+ /** 点检中 */
98482
+ INSPECTING: "INSPECTING",
98483
+ /** 校准中 */
98484
+ CALIBRATING: "CALIBRATING",
98485
+ /** 验证中 */
98486
+ VERIFYING: "VERIFYING",
98487
+ /** 备用 */
98488
+ STANDBY: "STANDBY",
98489
+ /** 停用 */
98490
+ DEACTIVATED: "DEACTIVATED",
98491
+ /** 报废 */
98492
+ SCRAPPED: "SCRAPPED"
98493
+ };
98471
98494
  QUICK_SEARCH_FIELD_TYPES = [
98472
98495
  FIELD_TYPE.LONG_TEXT,
98473
98496
  FIELD_TYPE.TEXT,
@@ -118288,6 +118311,11 @@ var init_FieldBaseHandler = __esmMin((() => {
118288
118311
  static hasValue(value) {
118289
118312
  return value !== void 0 && value !== null && value !== "";
118290
118313
  }
118314
+ /** 图片/附件 url 列表:兼容逗号串与数组 */
118315
+ static normalizeUrlSources(raw) {
118316
+ if (raw == null || raw === "") return [];
118317
+ return (Array.isArray(raw) ? raw : String(raw).split(",")).map((s) => String(s ?? "").trim()).filter(Boolean);
118318
+ }
118291
118319
  /** 将展示文案拆成逐字 run;空串 split 会得到 [],需单独处理 */
118292
118320
  static toLayoutChars(label) {
118293
118321
  if (label === void 0 || label === null || label === "") return [];
@@ -118454,7 +118482,7 @@ var init_FieldBaseHandler = __esmMin((() => {
118454
118482
  const fontSize = layoutStyle.fontSize ?? 16;
118455
118483
  const chars = this.toLayoutChars(label);
118456
118484
  const hasContent = chars.length > 0;
118457
- let doc = context.doc;
118485
+ const doc = context.doc;
118458
118486
  this.addFieldMarker({
118459
118487
  ctx,
118460
118488
  fontSize,
@@ -118499,7 +118527,7 @@ var init_FieldBaseHandler = __esmMin((() => {
118499
118527
  static layoutNoValueLabel(ctx) {
118500
118528
  var _context$doc$model;
118501
118529
  const { context, wr } = ctx;
118502
- let doc = context.doc;
118530
+ const doc = context.doc;
118503
118531
  const textStyle = TextStyleResolver.resolve(wr.rPr, (_context$doc$model = context.doc.model) === null || _context$doc$model === void 0 ? void 0 : _context$doc$model.styles);
118504
118532
  const measureStyle = {
118505
118533
  ...TextRun.textStyle2LayoutStyle(textStyle),
@@ -118965,14 +118993,15 @@ var init_FieldImageHandler = __esmMin((() => {
118965
118993
  const valueJson = this.getValue(ctx, wr.valuePath);
118966
118994
  const isAdaptive = isAdaptiveImageWidgetMeta(wr.widgetMeta);
118967
118995
  const inCell = context.type === "cell" && !!context.cell;
118968
- if (valueJson) {
118996
+ const allSources = this.normalizeUrlSources(valueJson);
118997
+ if (allSources.length) {
118969
118998
  this.addFieldMarker({
118970
118999
  ctx,
118971
119000
  fontSize: 16,
118972
119001
  position: "left"
118973
119002
  });
118974
119003
  this.beginPrintField(ctx, true);
118975
- const filtered = (isAdaptive && inCell ? [valueJson.split(",")[0]] : valueJson.split(",")).map((s) => s === null || s === void 0 ? void 0 : s.trim()).filter(Boolean);
119004
+ const filtered = isAdaptive && inCell ? allSources.slice(0, 1) : allSources;
118976
119005
  filtered.forEach((src, index) => {
118977
119006
  var _wr$widgetMeta;
118978
119007
  const { width, height } = this.resolveImageSize((_wr$widgetMeta = wr.widgetMeta) === null || _wr$widgetMeta === void 0 ? void 0 : _wr$widgetMeta.props, isAdaptive && inCell);
@@ -119257,8 +119286,8 @@ var init_AttachmentHandler = __esmMin((() => {
119257
119286
  }
119258
119287
  static layoutField(ctx) {
119259
119288
  const { context, wr } = ctx;
119260
- let valueStr = this.getValue(ctx, wr.valuePath);
119261
- if (valueStr) {
119289
+ const files = this.normalizeUrlSources(this.getValue(ctx, wr.valuePath));
119290
+ if (files.length) {
119262
119291
  var _context$doc$model;
119263
119292
  const textStyle = TextStyleResolver.resolve(wr.rPr, (_context$doc$model = context.doc.model) === null || _context$doc$model === void 0 ? void 0 : _context$doc$model.styles);
119264
119293
  const layoutStyle = TextRun.textStyle2LayoutStyle(textStyle);
@@ -119269,7 +119298,6 @@ var init_AttachmentHandler = __esmMin((() => {
119269
119298
  position: "left"
119270
119299
  });
119271
119300
  this.beginPrintField(ctx, true);
119272
- const files = String(valueStr).split(",").filter(Boolean);
119273
119301
  this.layoutFileSummary({
119274
119302
  ctx,
119275
119303
  count: files.length,
@@ -119371,16 +119399,8 @@ var init_FieldHandler = __esmMin((() => {
119371
119399
  static layoutCheckTableValue(ctx, isLinkNotSet) {
119372
119400
  var _layoutCtx$wr$widgetM, _layoutCtx$wr$widgetM2;
119373
119401
  const layoutCtx = prepareDynLayoutWr(ctx, isLinkNotSet);
119374
- if (layoutCtx.context.doc.mode === DocModeTypeConst.Print) {
119375
- FieldBaseHandler.layoutValue(layoutCtx);
119376
- return;
119377
- }
119378
119402
  const props = ((_layoutCtx$wr$widgetM = layoutCtx.wr.widgetMeta) === null || _layoutCtx$wr$widgetM === void 0 ? void 0 : _layoutCtx$wr$widgetM.props) ?? {};
119379
119403
  const widgetType = (_layoutCtx$wr$widgetM2 = layoutCtx.wr.widgetMeta) === null || _layoutCtx$wr$widgetM2 === void 0 ? void 0 : _layoutCtx$wr$widgetM2.type;
119380
- if (props.renderComp === RenderCompTypeConst.Checkbox || props.renderComp === RenderCompTypeConst.Radio) {
119381
- OptionHandler.layout(layoutCtx);
119382
- return;
119383
- }
119384
119404
  if (widgetType === "fw:image") {
119385
119405
  FieldImageHandler.layout(layoutCtx);
119386
119406
  return;
@@ -119389,6 +119409,14 @@ var init_FieldHandler = __esmMin((() => {
119389
119409
  AttachmentHandler.layout(layoutCtx);
119390
119410
  return;
119391
119411
  }
119412
+ if (layoutCtx.context.doc.mode === DocModeTypeConst.Print) {
119413
+ FieldBaseHandler.layoutValue(layoutCtx);
119414
+ return;
119415
+ }
119416
+ if (props.renderComp === RenderCompTypeConst.Checkbox || props.renderComp === RenderCompTypeConst.Radio) {
119417
+ OptionHandler.layout(layoutCtx);
119418
+ return;
119419
+ }
119392
119420
  InputHandler.layout(layoutCtx);
119393
119421
  }
119394
119422
  };
@@ -125582,6 +125610,17 @@ var init_transform = __esmMin((() => {
125582
125610
  transformUtils = { transformSourceData2SubTable };
125583
125611
  }));
125584
125612
  //#endregion
125613
+ //#region src/runtime/canvas/table/render/material-consume/derived-qty.ts
125614
+ /**
125615
+ * 未选择物料时,已消耗数量与当前行消耗数量保持一致。
125616
+ * 空值统一写为 null,避免数值字段向提交接口传递空字符串。
125617
+ */
125618
+ function resolveConsumedQtyWithoutProduct(value) {
125619
+ if (value === void 0 || value === null || value === "") return null;
125620
+ return Number(value);
125621
+ }
125622
+ var init_derived_qty = __esmMin((() => {}));
125623
+ //#endregion
125585
125624
  //#region src/runtime/canvas/table/render/material-consume/material-consume-table-controller.ts
125586
125625
  /**
125587
125626
  * 解析规则配置字符串解析成对象
@@ -125612,6 +125651,7 @@ var init_material_consume_table_controller = __esmMin((() => {
125612
125651
  init_material_consume_group_merge();
125613
125652
  init_index_es();
125614
125653
  init_transform();
125654
+ init_derived_qty();
125615
125655
  init_defineProperty();
125616
125656
  MCDataUtil = class MCDataUtil {
125617
125657
  /**
@@ -126277,7 +126317,7 @@ var init_material_consume_table_controller = __esmMin((() => {
126277
126317
  const modifySingleRow = (row, rowIndex) => {
126278
126318
  const fieldKey = `${this.subTableInfo.valuePath}[${rowIndex}].qty_consumed_`;
126279
126319
  if (!row.product_id_) {
126280
- doc.dataManager.set(fieldKey, row.qty_ ? Number(row.qty_) : "", "user");
126320
+ doc.dataManager.set(fieldKey, resolveConsumedQtyWithoutProduct(row.qty_), "user");
126281
126321
  return;
126282
126322
  }
126283
126323
  let total = 0;
@@ -136637,16 +136677,16 @@ async function submitDeviceScan(params) {
136637
136677
  ok: false,
136638
136678
  message: MSG_NO_CODE
136639
136679
  };
136680
+ const { queryData, exp } = buildLikeQuery([], "", buildDeviceBaseQuery({
136681
+ "code_.eq": code,
136682
+ ...deviceGroupId ? { "device_group_id_.eq": deviceGroupId } : {}
136683
+ }));
136640
136684
  const option = (_res$options = (await apiFetchers.ref.getOptions({
136641
136685
  fieldKey: fieldInfo.key,
136642
136686
  modelKey: fieldInfo.modelKey,
136643
136687
  refModelKey: fieldInfo.bindInfo,
136644
- exp: "OR(code_.eq)",
136645
- queryData: {
136646
- "code_.eq": code,
136647
- ...deviceGroupId ? { "device_group_id_.eq": deviceGroupId } : {},
136648
- operating_state_: true
136649
- },
136688
+ exp,
136689
+ queryData,
136650
136690
  pageNo: 1,
136651
136691
  pageSize: 30
136652
136692
  })).options) === null || _res$options === void 0 ? void 0 : _res$options[0];
@@ -136677,6 +136717,7 @@ var init_submit_device_scan = __esmMin((() => {
136677
136717
  init_field_type();
136678
136718
  init_fetchers();
136679
136719
  init_columns();
136720
+ init_quick_search();
136680
136721
  init_utils$2();
136681
136722
  init_form_value();
136682
136723
  MSG_EMPTY = "请输入或扫描条码内容";
@@ -138662,7 +138703,7 @@ var init_table_dropdown_vue_vue_type_script_setup_true_lang = __esmMin((() => {
138662
138703
  return allowManualInput.value && !!((_keyword$value = keyword.value) === null || _keyword$value === void 0 ? void 0 : _keyword$value.trim());
138663
138704
  });
138664
138705
  const hideSearch = computed(() => props.widget.widgetMeta.props.searchable === false);
138665
- const { xTable, loading, keyword, tableData, pagination, hasData, hasNextPage, hasPrevPage, search, reset, handlePagination } = useSelectTable(fetcher, {
138706
+ const { xTable, loading, keyword, tableData, pagination, hasData, hasNextPage, hasPrevPage, search, handlePagination } = useSelectTable(fetcher, {
138666
138707
  data: [],
138667
138708
  total: 0,
138668
138709
  highlightIdx: []
@@ -138670,13 +138711,12 @@ var init_table_dropdown_vue_vue_type_script_setup_true_lang = __esmMin((() => {
138670
138711
  const debouncedSearch = useDebounceFn(() => {
138671
138712
  search();
138672
138713
  }, 500);
138714
+ watch(keyword, () => {
138715
+ debouncedSearch();
138716
+ });
138673
138717
  function onDeviceTypeChange() {
138674
138718
  debouncedSearch();
138675
138719
  }
138676
- function resetSearch() {
138677
- if (isDeviceField.value) deviceTypeId.value = void 0;
138678
- reset();
138679
- }
138680
138720
  const onChangeSelect = async (row) => {
138681
138721
  var _row$_item;
138682
138722
  const { belongingObject, fieldType } = props.widget.widgetMeta.field;
@@ -138720,8 +138760,7 @@ var init_table_dropdown_vue_vue_type_script_setup_true_lang = __esmMin((() => {
138720
138760
  class: "table-search__keyword",
138721
138761
  placeholder: unref(isDeviceField) ? "搜索设备" : "请输入关键字",
138722
138762
  allowClear: "",
138723
- onKeydown: withKeys(unref(search), ["enter"]),
138724
- onClear: unref(search)
138763
+ onKeydown: withKeys(unref(search), ["enter"])
138725
138764
  }, {
138726
138765
  prependIcon: withCtx(() => [createVNode(unref(icon_default), {
138727
138766
  icon: "icon-sousuo",
@@ -138732,39 +138771,27 @@ var init_table_dropdown_vue_vue_type_script_setup_true_lang = __esmMin((() => {
138732
138771
  }, 8, [
138733
138772
  "modelValue",
138734
138773
  "placeholder",
138735
- "onKeydown",
138736
- "onClear"
138774
+ "onKeydown"
138737
138775
  ]),
138738
- createVNode(unref(button_default), {
138739
- type: "primary",
138740
- onClick: unref(search)
138741
- }, {
138742
- default: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode("搜索", -1)])]),
138743
- _: 1
138744
- }, 8, ["onClick"]),
138745
138776
  showManualInputBtn.value ? (openBlock(), createBlock(unref(button_default), {
138746
138777
  key: 0,
138747
138778
  type: "primary",
138748
138779
  plain: "",
138749
138780
  onClick: onConfirmManualInput
138750
138781
  }, {
138751
- default: withCtx(() => [..._cache[6] || (_cache[6] = [createTextVNode(" 确认输入 ", -1)])]),
138782
+ default: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode(" 确认输入 ", -1)])]),
138752
138783
  _: 1
138753
138784
  })) : createCommentVNode("", true),
138754
- createVNode(unref(button_default), { onClick: resetSearch }, {
138755
- default: withCtx(() => [..._cache[7] || (_cache[7] = [createTextVNode("重置", -1)])]),
138756
- _: 1
138757
- }),
138758
138785
  __props.modelValue ? (openBlock(), createBlock(unref(button_default), {
138759
138786
  key: 1,
138760
138787
  type: "danger",
138761
138788
  plain: "",
138762
138789
  onClick: _cache[1] || (_cache[1] = () => onChangeSelect())
138763
138790
  }, {
138764
- default: withCtx(() => [..._cache[8] || (_cache[8] = [createTextVNode(" 清除 ", -1)])]),
138791
+ default: withCtx(() => [..._cache[6] || (_cache[6] = [createTextVNode(" 清除 ", -1)])]),
138765
138792
  _: 1
138766
138793
  })) : createCommentVNode("", true)
138767
- ], 64)) : createCommentVNode("", true), unref(isDeviceField) ? (openBlock(), createElementBlock("div", _hoisted_3$60, [_cache[9] || (_cache[9] = createElementVNode("span", { class: "table-search__label" }, "设备类型", -1)), createVNode(device_type_select_default, {
138794
+ ], 64)) : createCommentVNode("", true), unref(isDeviceField) ? (openBlock(), createElementBlock("div", _hoisted_3$60, [_cache[7] || (_cache[7] = createElementVNode("span", { class: "table-search__label" }, "设备类型", -1)), createVNode(device_type_select_default, {
138768
138795
  modelValue: deviceTypeId.value,
138769
138796
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => deviceTypeId.value = $event),
138770
138797
  onChange: onDeviceTypeChange
@@ -138857,6 +138884,7 @@ var init_rdo_version_name_tag = __esmMin((() => {
138857
138884
  //#region src/runtime/renderer/dropdowns/components/tables/rdo-table-dropdown.vue?vue&type=script&setup=true&lang.ts
138858
138885
  var _hoisted_1$141, _hoisted_2$87, rdo_table_dropdown_vue_vue_type_script_setup_true_lang_default;
138859
138886
  var init_rdo_table_dropdown_vue_vue_type_script_setup_true_lang = __esmMin((() => {
138887
+ init_dist();
138860
138888
  init_base$2();
138861
138889
  init_base_vxe_table();
138862
138890
  init_pagination_control();
@@ -138891,7 +138919,7 @@ var init_rdo_table_dropdown_vue_vue_type_script_setup_true_lang = __esmMin((() =
138891
138919
  const inputRef = ref(null);
138892
138920
  const { runtimeValuePath } = useWidgetMeta(props.widget);
138893
138921
  const { columns, fetcher } = useTableDropdown(props);
138894
- const { xTable, loading, keyword, tableData, pagination, hasData, hasNextPage, hasPrevPage, search, reset, onSizeChange, handlePagination } = useSelectTable(fetcher, {
138922
+ const { xTable, loading, keyword, tableData, pagination, hasData, hasNextPage, hasPrevPage, search, onSizeChange, handlePagination } = useSelectTable(fetcher, {
138895
138923
  data: [],
138896
138924
  total: 0,
138897
138925
  highlightIdx: {
@@ -138900,6 +138928,12 @@ var init_rdo_table_dropdown_vue_vue_type_script_setup_true_lang = __esmMin((() =
138900
138928
  }
138901
138929
  });
138902
138930
  const hideSearch = computed(() => props.widget.widgetMeta.props.searchable === false);
138931
+ const debouncedSearch = useDebounceFn(() => {
138932
+ search();
138933
+ }, 500);
138934
+ watch(keyword, () => {
138935
+ debouncedSearch();
138936
+ });
138903
138937
  const onChangeSelect = (row) => {
138904
138938
  const { __VALUE__, __DEFAULT__, __HAS_ONE_CHILD__, __SHOW_LABEL__, __VERSION_NAME__ } = row || {};
138905
138939
  const value = __VALUE__ || (row === null || row === void 0 ? void 0 : row.value) || (row === null || row === void 0 ? void 0 : row._item.id_);
@@ -138926,49 +138960,30 @@ var init_rdo_table_dropdown_vue_vue_type_script_setup_true_lang = __esmMin((() =
138926
138960
  });
138927
138961
  return (_ctx, _cache) => {
138928
138962
  return openBlock(), createElementBlock("div", _hoisted_1$141, [
138929
- !hideSearch.value ? (openBlock(), createElementBlock("div", _hoisted_2$87, [
138930
- createVNode(unref(input_default), {
138931
- modelValue: unref(keyword),
138932
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(keyword) ? keyword.value = $event : null),
138933
- ref_key: "inputRef",
138934
- ref: inputRef,
138935
- placeholder: "请输入关键字",
138936
- allowClear: "",
138937
- onKeydown: withKeys(unref(search), ["enter"]),
138938
- onClear: unref(search)
138939
- }, {
138940
- prependIcon: withCtx(() => [createVNode(unref(icon_default), {
138941
- icon: "icon-sousuo",
138942
- color: "rgba(0, 0, 0, 0.45)",
138943
- size: "14"
138944
- })]),
138945
- _: 1
138946
- }, 8, [
138947
- "modelValue",
138948
- "onKeydown",
138949
- "onClear"
138950
- ]),
138951
- createVNode(unref(button_default), {
138952
- type: "primary",
138953
- onClick: unref(search)
138954
- }, {
138955
- default: withCtx(() => [..._cache[4] || (_cache[4] = [createTextVNode("搜索", -1)])]),
138956
- _: 1
138957
- }, 8, ["onClick"]),
138958
- createVNode(unref(button_default), { onClick: unref(reset) }, {
138959
- default: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode("重置", -1)])]),
138960
- _: 1
138961
- }, 8, ["onClick"]),
138962
- __props.modelValue ? (openBlock(), createBlock(unref(button_default), {
138963
- key: 0,
138964
- type: "danger",
138965
- plain: "",
138966
- onClick: _cache[1] || (_cache[1] = () => onChangeSelect())
138967
- }, {
138968
- default: withCtx(() => [..._cache[6] || (_cache[6] = [createTextVNode("清除", -1)])]),
138969
- _: 1
138970
- })) : createCommentVNode("", true)
138971
- ])) : createCommentVNode("", true),
138963
+ !hideSearch.value ? (openBlock(), createElementBlock("div", _hoisted_2$87, [createVNode(unref(input_default), {
138964
+ modelValue: unref(keyword),
138965
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(keyword) ? keyword.value = $event : null),
138966
+ ref_key: "inputRef",
138967
+ ref: inputRef,
138968
+ placeholder: "请输入关键字",
138969
+ allowClear: "",
138970
+ onKeydown: withKeys(unref(search), ["enter"])
138971
+ }, {
138972
+ prependIcon: withCtx(() => [createVNode(unref(icon_default), {
138973
+ icon: "icon-sousuo",
138974
+ color: "rgba(0, 0, 0, 0.45)",
138975
+ size: "14"
138976
+ })]),
138977
+ _: 1
138978
+ }, 8, ["modelValue", "onKeydown"]), __props.modelValue ? (openBlock(), createBlock(unref(button_default), {
138979
+ key: 0,
138980
+ type: "danger",
138981
+ plain: "",
138982
+ onClick: _cache[1] || (_cache[1] = () => onChangeSelect())
138983
+ }, {
138984
+ default: withCtx(() => [..._cache[4] || (_cache[4] = [createTextVNode("清除", -1)])]),
138985
+ _: 1
138986
+ })) : createCommentVNode("", true)])) : createCommentVNode("", true),
138972
138987
  createVNode(base_vxe_table_default, {
138973
138988
  ref_key: "xTable",
138974
138989
  ref: xTable,
@@ -141398,21 +141413,18 @@ var init_form_change_row = __esmMin((() => {
141398
141413
  FORM_CHANGE_ROW_PALETTE = {
141399
141414
  ADD: {
141400
141415
  wmText: "新增",
141401
- text: "#306BD2",
141402
141416
  bg: "rgba(144, 172, 233, 0.16)",
141403
141417
  bgSelected: "rgba(144, 172, 233, 0.3)",
141404
141418
  wm: "rgba(144, 172, 233, 0.4)"
141405
141419
  },
141406
141420
  DEL: {
141407
141421
  wmText: "删除",
141408
- text: "#F54547",
141409
141422
  bg: "rgba(248, 130, 132, 0.16)",
141410
141423
  bgSelected: "rgba(248, 130, 132, 0.3)",
141411
141424
  wm: "rgba(248, 130, 132, 0.4)"
141412
141425
  },
141413
141426
  ORPHAN: {
141414
141427
  wmText: "增后删",
141415
- text: "#8B8B8B",
141416
141428
  bg: "rgba(169, 175, 188, 0.16)",
141417
141429
  bgSelected: "rgba(169, 175, 188, 0.3)",
141418
141430
  wm: "rgba(169, 175, 188, 0.4)"
@@ -144799,13 +144811,6 @@ function tableKeyFromValuePath(valuePath) {
144799
144811
  }
144800
144812
  return ((_body$split$ = body.split("[")[0]) === null || _body$split$ === void 0 ? void 0 : _body$split$.split(".")[0]) || void 0;
144801
144813
  }
144802
- function parseRowIndexFromValuePath(valuePath) {
144803
- if (!valuePath) return void 0;
144804
- const match = valuePath.match(/\[(\d+)\]/);
144805
- if (!match) return void 0;
144806
- const index = Number(match[1]);
144807
- return Number.isFinite(index) ? index : void 0;
144808
- }
144809
144814
  function resolveRowIndex(sub) {
144810
144815
  if (!sub) return void 0;
144811
144816
  if (sub.yDataIndex != null) return sub.yDataIndex;
@@ -144815,6 +144820,13 @@ function resolveColIndex(sub) {
144815
144820
  if ((sub === null || sub === void 0 ? void 0 : sub.xDataIndex) == null) return void 0;
144816
144821
  return sub.xDataIndex;
144817
144822
  }
144823
+ /** 是否为动态表/业务子表区域内的数据格(不含区域外列、表头) */
144824
+ function isFormChangeSubTableRegionCell(cell) {
144825
+ const sub = cell.subRenderer;
144826
+ if (!sub || !sub.valuePath) return false;
144827
+ if (sub.type === "table-header") return false;
144828
+ return sub.dataIndex != null || sub.yDataIndex != null || sub.xDataIndex != null;
144829
+ }
144818
144830
  function resolveRowMarkUi(tableKey, rowIndex, annRowDetails, rawData, focusAnnotationId) {
144819
144831
  if (rowIndex == null || rowIndex < 0 || !(annRowDetails === null || annRowDetails === void 0 ? void 0 : annRowDetails.length) || !rawData) return null;
144820
144832
  const rows = rawData[tableKey];
@@ -144828,7 +144840,6 @@ function resolveRowMarkUi(tableKey, rowIndex, annRowDetails, rawData, focusAnnot
144828
144840
  fill: focusAnnotationId === mark.cellLocation ? palette.bgSelected : palette.bg,
144829
144841
  wmText: ui.wmText,
144830
144842
  wmColor: palette.wm,
144831
- textColor: palette.text,
144832
144843
  cellLocation: mark.cellLocation
144833
144844
  };
144834
144845
  }
@@ -144841,21 +144852,22 @@ function resolveFromSubRenderer(subRenderer, annRowDetails, rawData, focusAnnota
144841
144852
  const xKey = (xKeyRaw === null || xKeyRaw === void 0 ? void 0 : xKeyRaw.replace(/\[.*$/, "")) || void 0;
144842
144853
  return resolveRowMarkUi(yKey, resolveRowIndex(subRenderer), annRowDetails, rawData, focusAnnotationId) || (xKey ? resolveRowMarkUi(xKey, resolveColIndex(subRenderer), annRowDetails, rawData, focusAnnotationId) : null) || (defaultTableKey !== yKey ? resolveRowMarkUi(defaultTableKey, resolveRowIndex(subRenderer) ?? resolveColIndex(subRenderer), annRowDetails, rawData, focusAnnotationId) : null);
144843
144854
  }
144844
- /** 按行解析增删预览样式 */
144855
+ /** 按行解析增删预览样式:锚点取动态表区域内的数据格 */
144845
144856
  function resolveRowChangeStyle(cells, annRowDetails, rawData, focusAnnotationId) {
144846
144857
  var _cells$find;
144847
- const anchor = (_cells$find = cells.find((cell) => cell.subRenderer)) === null || _cells$find === void 0 ? void 0 : _cells$find.subRenderer;
144858
+ const anchor = (_cells$find = cells.find((cell) => isFormChangeSubTableRegionCell(cell))) === null || _cells$find === void 0 ? void 0 : _cells$find.subRenderer;
144848
144859
  if (!anchor) return null;
144849
144860
  return resolveFromSubRenderer(anchor, annRowDetails, rawData, focusAnnotationId);
144850
144861
  }
144862
+ /** 水印/底色包围盒:只包动态表区域内单元格(跨页后同样只覆盖区域内列) */
144851
144863
  function resolveRowWatermark(cells, style) {
144852
144864
  if (!(style === null || style === void 0 ? void 0 : style.wmText) || !style.wmColor) return null;
144853
- const visible = cells.filter((cell) => !cell.mergeFromId);
144854
- if (!visible.length) return null;
144855
- const minX = Math.min(...visible.map((cell) => cell.roundX));
144856
- const maxX = Math.max(...visible.map((cell) => cell.roundX + cell.roundWidth));
144857
- const minY = Math.min(...visible.map((cell) => cell.roundY));
144858
- const maxY = Math.max(...visible.map((cell) => cell.roundY + cell.roundHeight));
144865
+ const regionCells = cells.filter((cell) => isFormChangeSubTableRegionCell(cell));
144866
+ if (!regionCells.length) return null;
144867
+ const minX = Math.min(...regionCells.map((cell) => cell.roundX));
144868
+ const maxX = Math.max(...regionCells.map((cell) => cell.roundX + cell.roundWidth));
144869
+ const minY = Math.min(...regionCells.map((cell) => cell.roundY));
144870
+ const maxY = Math.max(...regionCells.map((cell) => cell.roundY + cell.roundHeight));
144859
144871
  return {
144860
144872
  x: minX,
144861
144873
  y: minY,
@@ -144865,15 +144877,6 @@ function resolveRowWatermark(cells, style) {
144865
144877
  fill: style.wmColor
144866
144878
  };
144867
144879
  }
144868
- /** 字段所在数据行的变更文字色 */
144869
- function resolveRowTextColor(valuePath, annRowDetails, rawData) {
144870
- var _resolveRowMarkUi;
144871
- if (!valuePath || !(annRowDetails === null || annRowDetails === void 0 ? void 0 : annRowDetails.length) || !rawData) return void 0;
144872
- const tableKey = tableKeyFromValuePath(valuePath);
144873
- const rowIndex = parseRowIndexFromValuePath(valuePath);
144874
- if (!tableKey || rowIndex == null) return void 0;
144875
- return (_resolveRowMarkUi = resolveRowMarkUi(tableKey, rowIndex, annRowDetails, rawData)) === null || _resolveRowMarkUi === void 0 ? void 0 : _resolveRowMarkUi.textColor;
144876
- }
144877
144880
  var init_resolve_cell_row_change_style = __esmMin((() => {
144878
144881
  init_form_change_row();
144879
144882
  }));
@@ -144903,26 +144906,35 @@ var init_table_form_change_overlay_vue_vue_type_script_setup_true_name_table_for
144903
144906
  const rawData = (annRowDetails === null || annRowDetails === void 0 ? void 0 : annRowDetails.length) && previewBackup && docInst.value ? collectFormChangePreviewRaw(docInst.value, annRowDetails) : void 0;
144904
144907
  const overlayRows = [];
144905
144908
  props.rows.forEach((row) => {
144909
+ const visualRowHeight = Math.round(row.height);
144906
144910
  const layoutCells = row.cells.map((cell) => ({
144907
- ...cell,
144911
+ id: cell.id,
144912
+ mergeFromId: cell.mergeFromId,
144913
+ subRenderer: cell.subRenderer,
144908
144914
  roundX: Math.round(cell.x),
144909
144915
  roundY: Math.round(row.y),
144910
144916
  roundWidth: Math.round(cell.width),
144911
- roundHeight: Math.round(cell.height)
144917
+ roundHeight: visualRowHeight
144912
144918
  }));
144913
144919
  const rowStyle = resolveRowChangeStyle(row.cells, annRowDetails, rawData, focusAnnotationId);
144920
+ const regionCells = layoutCells.filter((cell) => isFormChangeSubTableRegionCell(cell));
144921
+ let fillRect = null;
144922
+ if ((rowStyle === null || rowStyle === void 0 ? void 0 : rowStyle.fill) && regionCells.length) {
144923
+ const minX = Math.min(...regionCells.map((cell) => cell.roundX));
144924
+ const maxX = Math.max(...regionCells.map((cell) => cell.roundX + cell.roundWidth));
144925
+ fillRect = {
144926
+ x: minX,
144927
+ y: Math.round(row.y),
144928
+ width: maxX - minX,
144929
+ height: visualRowHeight
144930
+ };
144931
+ }
144914
144932
  overlayRows.push({
144915
144933
  id: row.id,
144916
144934
  previewFill: rowStyle === null || rowStyle === void 0 ? void 0 : rowStyle.fill,
144917
- fillCells: layoutCells.filter((cell) => !cell.mergeFromId && (rowStyle === null || rowStyle === void 0 ? void 0 : rowStyle.fill)).map((cell) => ({
144918
- id: cell.id,
144919
- x: cell.roundX,
144920
- y: cell.roundY,
144921
- width: cell.roundWidth,
144922
- height: cell.roundHeight
144923
- })),
144935
+ fillRect,
144924
144936
  rowStyle,
144925
- cells: layoutCells
144937
+ regionCells
144926
144938
  });
144927
144939
  });
144928
144940
  const watermarkByMark = /* @__PURE__ */ new Map();
@@ -144930,7 +144942,7 @@ var init_table_form_change_overlay_vue_vue_type_script_setup_true_name_table_for
144930
144942
  var _row$rowStyle;
144931
144943
  const markKey = (_row$rowStyle = row.rowStyle) === null || _row$rowStyle === void 0 ? void 0 : _row$rowStyle.cellLocation;
144932
144944
  if (!markKey) return;
144933
- const partial = resolveRowWatermark(row.cells, row.rowStyle);
144945
+ const partial = resolveRowWatermark(row.regionCells, row.rowStyle);
144934
144946
  if (!partial) return;
144935
144947
  const existing = watermarkByMark.get(markKey);
144936
144948
  if (!existing) {
@@ -144956,7 +144968,7 @@ var init_table_form_change_overlay_vue_vue_type_script_setup_true_name_table_for
144956
144968
  };
144957
144969
  });
144958
144970
  const hasOverlay = computed(() => overlayModel.value.overlayRows.some((row) => row.previewFill) || overlayModel.value.rowMarks.length > 0);
144959
- const overlayRows = computed(() => overlayModel.value.overlayRows.filter((row) => row.previewFill && row.fillCells.length));
144971
+ const overlayRows = computed(() => overlayModel.value.overlayRows.filter((row) => row.previewFill && row.fillRect));
144960
144972
  const rowMarks = computed(() => overlayModel.value.rowMarks);
144961
144973
  return (_ctx, _cache) => {
144962
144974
  const _component_v_rect = resolveComponent("v-rect");
@@ -144964,23 +144976,21 @@ var init_table_form_change_overlay_vue_vue_type_script_setup_true_name_table_for
144964
144976
  const _component_v_group = resolveComponent("v-group");
144965
144977
  return hasOverlay.value ? (openBlock(), createBlock(_component_v_group, { key: 0 }, {
144966
144978
  default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(overlayRows.value, (row) => {
144967
- return openBlock(), createElementBlock(Fragment, { key: `fill-${row.id}` }, [(openBlock(true), createElementBlock(Fragment, null, renderList(row.fillCells, (cell) => {
144968
- return openBlock(), createBlock(_component_v_rect, {
144969
- key: `fill-cell-${cell.id}`,
144970
- x: cell.x,
144971
- y: cell.y,
144972
- width: cell.width,
144973
- height: cell.height,
144974
- fill: row.previewFill,
144975
- listening: false
144976
- }, null, 8, [
144977
- "x",
144978
- "y",
144979
- "width",
144980
- "height",
144981
- "fill"
144982
- ]);
144983
- }), 128))], 64);
144979
+ return openBlock(), createElementBlock(Fragment, { key: `fill-${row.id}` }, [row.fillRect ? (openBlock(), createBlock(_component_v_rect, {
144980
+ key: 0,
144981
+ x: row.fillRect.x,
144982
+ y: row.fillRect.y,
144983
+ width: row.fillRect.width,
144984
+ height: row.fillRect.height,
144985
+ fill: row.previewFill,
144986
+ listening: false
144987
+ }, null, 8, [
144988
+ "x",
144989
+ "y",
144990
+ "width",
144991
+ "height",
144992
+ "fill"
144993
+ ])) : createCommentVNode("", true)], 64);
144984
144994
  }), 128)), (openBlock(true), createElementBlock(Fragment, null, renderList(rowMarks.value, (mark) => {
144985
144995
  return openBlock(), createElementBlock(Fragment, { key: `mark-${mark.cellLocation}` }, [createVNode(_component_v_rect, {
144986
144996
  x: mark.watermark.x,
@@ -156886,7 +156896,6 @@ init_useWidgetRenderData();
156886
156896
  init_validation();
156887
156897
  init_form_change_row();
156888
156898
  init_widget();
156889
- init_resolve_cell_row_change_style();
156890
156899
  var gct_text_render_vue_vue_type_script_setup_true_name_gct_text_render_lang_default = /*@__PURE__*/ defineComponent({
156891
156900
  __name: "gct-text-render",
156892
156901
  props: {
@@ -156901,20 +156910,7 @@ var gct_text_render_vue_vue_type_script_setup_true_name_gct_text_render_lang_def
156901
156910
  return !!resolveFieldAnnotationHit(docInst.value, interCtx.annotationIds, runtimeValuePath.value);
156902
156911
  });
156903
156912
  const hasValidationError = computed(() => hasFieldErrorHighlight(interCtx.validationCommentMap, runtimeValuePath.value));
156904
- const rowTextColor = computed(() => {
156905
- var _docInst$value, _docInst$value$get;
156906
- const details = interCtx.formChangeRowDetails;
156907
- if (!(details === null || details === void 0 ? void 0 : details.length) || !interCtx.formChangeRowPreviewBackup) return void 0;
156908
- const path = runtimeValuePath.value;
156909
- if (!path || !/\[\d+\]/.test(path)) return void 0;
156910
- const tableKey = tableKeyFromValuePath(path);
156911
- if (!tableKey) return void 0;
156912
- const rows = (_docInst$value = docInst.value) === null || _docInst$value === void 0 || (_docInst$value = _docInst$value.dataManager) === null || _docInst$value === void 0 || (_docInst$value$get = _docInst$value.get) === null || _docInst$value$get === void 0 ? void 0 : _docInst$value$get.call(_docInst$value, `$.${tableKey}`);
156913
- if (!Array.isArray(rows)) return void 0;
156914
- return resolveRowTextColor(path, details, { [tableKey]: rows });
156915
- });
156916
156913
  const resolvedTextColor = computed(() => {
156917
- if (rowTextColor.value) return rowTextColor.value;
156918
156914
  if (isFieldChange.value) return FieldStateColors.fieldChange;
156919
156915
  if (showRequired.value && showReadonly.value) return void 0;
156920
156916
  return props.widget.color;
@@ -160169,6 +160165,7 @@ var bom_product_name_default = /* @__PURE__ */ defineComponent({
160169
160165
  //#region src/suites/edhr/panel-schema/material-consume-table/bom-entry-editor.vue?vue&type=script&setup=true&name=bom-entry-editor&lang.ts
160170
160166
  init_base$2();
160171
160167
  init_index_es();
160168
+ init_core();
160172
160169
  var _hoisted_1$86 = { class: "bom-entry-editor" };
160173
160170
  var _hoisted_2$50 = { class: "bom-entry-item flex items-center" };
160174
160171
  var _hoisted_3$33 = {
@@ -160190,6 +160187,11 @@ var bom_entry_editor_vue_vue_type_script_setup_true_name_bom_entry_editor_lang_d
160190
160187
  setup(__props, { emit: __emit }) {
160191
160188
  const props = __props;
160192
160189
  const emit = __emit;
160190
+ const { docInst } = useDocPubApiContext();
160191
+ const showConsumePolicy = computed(() => {
160192
+ var _docInst$value$device;
160193
+ return ((_docInst$value$device = docInst.value.deviceConfig) === null || _docInst$value$device === void 0 ? void 0 : _docInst$value$device.materialSourceType) === "line_side_inventory";
160194
+ });
160193
160195
  /** 过滤且排序后的集合 */
160194
160196
  const showList = computed(() => {
160195
160197
  var _props$list;
@@ -160229,7 +160231,8 @@ var bom_entry_editor_vue_vue_type_script_setup_true_name_bom_entry_editor_lang_d
160229
160231
  Ir("BOM_ENTRY_MODAL", {
160230
160232
  data: cloneDeep(data),
160231
160233
  hasIds: calcHasProductIds(data),
160232
- openFormulaEditor
160234
+ openFormulaEditor,
160235
+ showConsumePolicy: showConsumePolicy.value
160233
160236
  }, modalProps).then(({ success, result }) => {
160234
160237
  if (success) Object.assign(data, result);
160235
160238
  });
@@ -160238,7 +160241,8 @@ var bom_entry_editor_vue_vue_type_script_setup_true_name_bom_entry_editor_lang_d
160238
160241
  const add = async () => {
160239
160242
  Ir("BOM_ENTRY_MODAL", {
160240
160243
  hasIds: calcHasProductIds(),
160241
- openFormulaEditor
160244
+ openFormulaEditor,
160245
+ showConsumePolicy: showConsumePolicy.value
160242
160246
  }, modalProps).then(({ success, result }) => {
160243
160247
  if (success && result) {
160244
160248
  const newData = { ...result };
@@ -160318,7 +160322,7 @@ var bom_entry_editor_vue_vue_type_script_setup_true_name_bom_entry_editor_lang_d
160318
160322
  //#endregion
160319
160323
  //#region src/suites/edhr/panel-schema/material-consume-table/bom-entry-editor.vue
160320
160324
  init__plugin_vue_export_helper();
160321
- var bom_entry_editor_default = /*#__PURE__*/ _plugin_vue_export_helper_default(bom_entry_editor_vue_vue_type_script_setup_true_name_bom_entry_editor_lang_default, [["__scopeId", "data-v-b6651102"]]);
160325
+ var bom_entry_editor_default = /*#__PURE__*/ _plugin_vue_export_helper_default(bom_entry_editor_vue_vue_type_script_setup_true_name_bom_entry_editor_lang_default, [["__scopeId", "data-v-c8fea9fa"]]);
160322
160326
  //#endregion
160323
160327
  //#region src/suites/edhr/panel-schema/material-consume-table/MaterialConsumeTablePanel.vue?vue&type=script&setup=true&lang.ts
160324
160328
  init_base$2();
@@ -162987,6 +162991,10 @@ var object_init_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
162987
162991
  const { docInst } = useDocPubApiContext();
162988
162992
  const modelKey = toRef(docInst.value, "mainModelKey");
162989
162993
  const { fields } = useModelData(modelKey);
162994
+ const showConsumePolicy = computed(() => {
162995
+ var _docInst$value$device;
162996
+ return ((_docInst$value$device = docInst.value.deviceConfig) === null || _docInst$value$device === void 0 ? void 0 : _docInst$value$device.materialSourceType) === "line_side_inventory";
162997
+ });
162990
162998
  const filledObjectFieldKeys = computed(() => {
162991
162999
  var _props$objects;
162992
163000
  return ((_props$objects = props.objects) === null || _props$objects === void 0 ? void 0 : _props$objects.map((obj) => obj.objectField)) || [];
@@ -163056,7 +163064,8 @@ var object_init_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
163056
163064
  Ir("MATERIAL_CONSUME_OBJECT_CONFIG", {
163057
163065
  allFields,
163058
163066
  objectFields: objectFields.filter((f) => !filledObjectFieldKeys.value.includes(f.key)),
163059
- RenderFieldWrapper
163067
+ RenderFieldWrapper,
163068
+ showConsumePolicy: showConsumePolicy.value
163060
163069
  }, { title: "添加初始化对象" }).then(({ success, result }) => {
163061
163070
  if (!success || !result) return;
163062
163071
  emit("update:objects", [...props.objects, normalizeObjectConfig(result)]);
@@ -163070,7 +163079,8 @@ var object_init_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
163070
163079
  Ir("MATERIAL_CONSUME_OBJECT_CONFIG", {
163071
163080
  ...baseParam.value,
163072
163081
  editingItem: obj,
163073
- RenderFieldWrapper
163082
+ RenderFieldWrapper,
163083
+ showConsumePolicy: showConsumePolicy.value
163074
163084
  }, { title: "配置" }).then(({ success, result }) => {
163075
163085
  if (!success || !result) return;
163076
163086
  const objects = [...props.objects];
@@ -163117,7 +163127,7 @@ var object_init_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
163117
163127
  //#endregion
163118
163128
  //#region src/suites/edhr/panel-schema/data-init/object-init/object-init.vue
163119
163129
  init__plugin_vue_export_helper();
163120
- var object_init_default = /*#__PURE__*/ _plugin_vue_export_helper_default(object_init_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-d86e8222"]]);
163130
+ var object_init_default = /*#__PURE__*/ _plugin_vue_export_helper_default(object_init_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-79a4a3de"]]);
163121
163131
  //#endregion
163122
163132
  //#region src/suites/edhr/panel-schema/data-init/DataInitPanel.vue?vue&type=script&setup=true&name=panel-data-init&lang.ts
163123
163133
  init_core$1();
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 未选择物料时,已消耗数量与当前行消耗数量保持一致。
3
+ * 空值统一写为 null,避免数值字段向提交接口传递空字符串。
4
+ */
5
+ export declare function resolveConsumedQtyWithoutProduct(value: unknown): number | null;
@@ -1,10 +1,10 @@
1
1
  import { FormChangeRowDetailMeta } from '../../../interface/form-change-row';
2
+ import { SubRenderer } from '../../../../core/view/TableCell';
2
3
  import { Cell } from '../types/table';
3
4
  interface RowChangeStyle {
4
5
  fill?: string;
5
6
  wmText?: string;
6
7
  wmColor?: string;
7
- textColor?: string;
8
8
  cellLocation?: string;
9
9
  }
10
10
  interface RowWatermark {
@@ -16,15 +16,19 @@ interface RowWatermark {
16
16
  fill: string;
17
17
  }
18
18
  export declare function tableKeyFromValuePath(valuePath?: string): string | undefined;
19
- /** 按行解析增删预览样式 */
19
+ /** 是否为动态表/业务子表区域内的数据格(不含区域外列、表头) */
20
+ export declare function isFormChangeSubTableRegionCell(cell: {
21
+ subRenderer?: SubRenderer;
22
+ }): boolean;
23
+ /** 按行解析增删预览样式:锚点取动态表区域内的数据格 */
20
24
  export declare function resolveRowChangeStyle(cells: readonly Cell[], annRowDetails: FormChangeRowDetailMeta[] | null | undefined, rawData: Record<string, any> | null | undefined, focusAnnotationId?: string | null): RowChangeStyle | null;
25
+ /** 水印/底色包围盒:只包动态表区域内单元格(跨页后同样只覆盖区域内列) */
21
26
  export declare function resolveRowWatermark(cells: Array<{
22
27
  mergeFromId?: string;
28
+ subRenderer?: SubRenderer;
23
29
  roundX: number;
24
30
  roundY: number;
25
31
  roundWidth: number;
26
32
  roundHeight: number;
27
33
  }>, style: RowChangeStyle | null | undefined): RowWatermark | null;
28
- /** 字段所在数据行的变更文字色 */
29
- export declare function resolveRowTextColor(valuePath: string | undefined, annRowDetails: FormChangeRowDetailMeta[] | null | undefined, rawData: Record<string, any> | null | undefined): string | undefined;
30
34
  export {};
@@ -4,7 +4,6 @@ type FormChangeRowWmKind = 'ADD' | 'DEL' | 'ORPHAN';
4
4
  /** 行变更样式色板 */
5
5
  export declare const FORM_CHANGE_ROW_PALETTE: Record<FormChangeRowWmKind, {
6
6
  wmText: string;
7
- text: string;
8
7
  bg: string;
9
8
  bgSelected: string;
10
9
  wm: string;
@@ -1,4 +1,26 @@
1
1
  import { FieldMeta } from '../../../../../../capabilities/model-field-runtime';
2
+ /** 设备状态(enu_device_status) */
3
+ export declare const DeviceStatus: {
4
+ /** 使用中 */
5
+ readonly IN_USE: "IN_USE";
6
+ /** 维修中 */
7
+ readonly REPAIRING: "REPAIRING";
8
+ /** 保养中 */
9
+ readonly MAINTAINING: "MAINTAINING";
10
+ /** 点检中 */
11
+ readonly INSPECTING: "INSPECTING";
12
+ /** 校准中 */
13
+ readonly CALIBRATING: "CALIBRATING";
14
+ /** 验证中 */
15
+ readonly VERIFYING: "VERIFYING";
16
+ /** 备用 */
17
+ readonly STANDBY: "STANDBY";
18
+ /** 停用 */
19
+ readonly DEACTIVATED: "DEACTIVATED";
20
+ /** 报废 */
21
+ readonly SCRAPPED: "SCRAPPED";
22
+ };
23
+ export type DeviceStatus = (typeof DeviceStatus)[keyof typeof DeviceStatus];
2
24
  export declare function fillDefaultSearchField(fields?: string[]): string[];
3
25
  export declare function buildQuickSearchFieldOptions(fields?: FieldMeta[]): {
4
26
  label: string;
@@ -16,6 +38,8 @@ export declare function buildLikeQuery(searchFields: string[], keyword: string,
16
38
  queryData: Record<string, any>;
17
39
  exp: string;
18
40
  };
41
+ /** 设备可选过滤:使用中 + 校准有效期未过(next_calibration_date_ >= 当前时间) */
42
+ export declare function buildDeviceBaseQuery(extraQuery?: Record<string, any>): Record<string, any>;
19
43
  /** 设备下拉:默认搜 code/name + 设备类型过滤 */
20
44
  export declare function buildDeviceQuickSearchQuery(quickSearchField: string[] | undefined, keyword: string, extraQuery?: Record<string, any>): {
21
45
  queryData: Record<string, any>;
@@ -24,6 +24,8 @@ export interface IDeviceConfig {
24
24
  defaultProductSearchFields: string;
25
25
  /** 是否启用人员字段 false: 不使用 true: 使用;先留着扩展,后续如果需要在字段列表过滤才使用 */
26
26
  enableUserField: boolean;
27
+ /** 物料管理模式的数据来源 */
28
+ materialSourceType?: 'line_receive_material' | 'line_side_inventory';
27
29
  }
28
30
  /** 文档模型层子表元信息 */
29
31
  export interface SubTableInfo {
package/dist/word.css CHANGED
@@ -11663,11 +11663,11 @@ svg.portrait-icon[data-v-8bdb451e] {
11663
11663
  height: 32px;
11664
11664
  font-size: 14px;
11665
11665
  }
11666
- .add-button[data-v-b6651102] {
11666
+ .add-button[data-v-c8fea9fa] {
11667
11667
  height: 32px;
11668
11668
  margin-bottom: 8px;
11669
11669
  }
11670
- .bom-entry-item[data-v-b6651102] {
11670
+ .bom-entry-item[data-v-c8fea9fa] {
11671
11671
  padding: 10px 0;
11672
11672
  border: 1px dashed #e0e3eb;
11673
11673
  border-radius: 4px;
@@ -11675,26 +11675,26 @@ svg.portrait-icon[data-v-8bdb451e] {
11675
11675
  color: #1a1d23;
11676
11676
  font-size: 12px;
11677
11677
  }
11678
- .bom-entry-item + .bom-entry-item[data-v-b6651102] {
11678
+ .bom-entry-item + .bom-entry-item[data-v-c8fea9fa] {
11679
11679
  margin-top: 8px;
11680
11680
  }
11681
- .bom-entry-item[data-v-b6651102]:hover {
11681
+ .bom-entry-item[data-v-c8fea9fa]:hover {
11682
11682
  border-color: var(--ant-primary-color);
11683
11683
  background-color: rgb(from var(--ant-primary-color) r g b / 2%);
11684
11684
  }
11685
- .bom-entry-item-content[data-v-b6651102] {
11685
+ .bom-entry-item-content[data-v-c8fea9fa] {
11686
11686
  width: 1px;
11687
11687
  }
11688
- .bom-entry-item .iconfont[data-v-b6651102] {
11688
+ .bom-entry-item .iconfont[data-v-c8fea9fa] {
11689
11689
  color: #a6a6a6;
11690
11690
  font-size: 14px;
11691
11691
  cursor: pointer;
11692
11692
  }
11693
- .bom-entry-item .iconfont.mover[data-v-b6651102] {
11693
+ .bom-entry-item .iconfont.mover[data-v-c8fea9fa] {
11694
11694
  padding: 0 4px;
11695
11695
  color: #c6c6c6;
11696
11696
  }
11697
- .bom-entry-item .iconfont.btn-item[data-v-b6651102] {
11697
+ .bom-entry-item .iconfont.btn-item[data-v-c8fea9fa] {
11698
11698
  margin-right: 8px;
11699
11699
  }
11700
11700
  .panel-material-consume-table[data-v-9a20d3b9] {
@@ -12379,35 +12379,35 @@ svg.portrait-icon[data-v-8bdb451e] {
12379
12379
  cursor: pointer;
12380
12380
  color: #797a7d;
12381
12381
  }
12382
- .object-item[data-v-d86e8222] {
12382
+ .object-item[data-v-79a4a3de] {
12383
12383
  margin-bottom: 16px;
12384
12384
  padding: 12px;
12385
12385
  border: 1px dashed #e4e4e4;
12386
12386
  border-radius: 8px;
12387
12387
  background: #f6f8fa;
12388
12388
  }
12389
- .object-item.is-filled[data-v-d86e8222] {
12389
+ .object-item.is-filled[data-v-79a4a3de] {
12390
12390
  border-color: #a7cae6;
12391
12391
  background: #ecf3fc;
12392
12392
  }
12393
- .object-item .item-info[data-v-d86e8222] {
12393
+ .object-item .item-info[data-v-79a4a3de] {
12394
12394
  display: flex;
12395
12395
  }
12396
- .object-item .item-info .info-text[data-v-d86e8222] {
12396
+ .object-item .item-info .info-text[data-v-79a4a3de] {
12397
12397
  flex-grow: 1;
12398
12398
  margin-right: 8px;
12399
12399
  overflow: hidden;
12400
12400
  }
12401
- .object-item .item-info .info-text .text-row[data-v-d86e8222] {
12401
+ .object-item .item-info .info-text .text-row[data-v-79a4a3de] {
12402
12402
  margin-bottom: 4px;
12403
12403
  overflow: hidden;
12404
12404
  text-overflow: ellipsis;
12405
12405
  white-space: nowrap;
12406
12406
  }
12407
- .object-item .item-info .info-text .text-row .row-label[data-v-d86e8222] {
12407
+ .object-item .item-info .info-text .text-row .row-label[data-v-79a4a3de] {
12408
12408
  color: #76777e;
12409
12409
  }
12410
- .object-item .item-info .info-button[data-v-d86e8222] {
12410
+ .object-item .item-info .info-button[data-v-79a4a3de] {
12411
12411
  display: flex;
12412
12412
  flex-shrink: 0;
12413
12413
  align-items: center;
@@ -12417,16 +12417,16 @@ svg.portrait-icon[data-v-8bdb451e] {
12417
12417
  border-radius: 4px;
12418
12418
  cursor: pointer;
12419
12419
  }
12420
- .object-item .item-info .info-button[data-v-d86e8222]:hover {
12420
+ .object-item .item-info .info-button[data-v-79a4a3de]:hover {
12421
12421
  background: #fff;
12422
12422
  }
12423
- .object-item .item-info .info-button:hover .gct-icon[data-v-d86e8222] {
12423
+ .object-item .item-info .info-button:hover .gct-icon[data-v-79a4a3de] {
12424
12424
  color: #1c1e20;
12425
12425
  }
12426
- .object-item .item-info .info-button .gct-icon[data-v-d86e8222] {
12426
+ .object-item .item-info .info-button .gct-icon[data-v-79a4a3de] {
12427
12427
  color: #a4aaaf;
12428
12428
  }
12429
- .object-item .item-button[data-v-d86e8222] {
12429
+ .object-item .item-button[data-v-79a4a3de] {
12430
12430
  margin-top: 8px;
12431
12431
  }
12432
12432
  .panel-data-init[data-v-004e3ce4] {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/word",
3
- "version": "0.1.74-beta.21",
3
+ "version": "0.1.74-beta.24",
4
4
  "description": "GCT 在线 word",
5
5
  "keywords": [
6
6
  "vue",