@gct-paas/word 0.1.74-beta.53 → 0.1.74-beta.54
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/core/data/submit/form-state.d.ts +1 -1
- package/dist/index.es.js +220 -128
- package/dist/sdk/doc-runtime/factories/useDocumentFactory.d.ts +2 -0
- package/dist/suites/edhr/panel-schema/data-init/material-consume-object/linkage.d.ts +2 -0
- package/dist/word.css +23 -23
- package/package.json +1 -1
|
@@ -26,4 +26,4 @@ export declare function conversionFormState(payload: {
|
|
|
26
26
|
/** 从模型子表元信息解析二维/检验表交叉区 key;无元信息时回退为 formData 中含 `:` 的 key */
|
|
27
27
|
export declare function resolveSubmitCrossKeys(formData: Record<string, any>, subTableInfoList?: SubTableInfo[]): string[];
|
|
28
28
|
/** 数据转成真实提交数据 */
|
|
29
|
-
export declare function getSubmitFormData(formData: any, subTableInfoList?: SubTableInfo[]): any;
|
|
29
|
+
export declare function getSubmitFormData(formData: any, subTableInfoList?: SubTableInfo[], fieldList?: FieldMeta[]): any;
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @gct-paas/word v0.1.74-beta.
|
|
1
|
+
/*! @gct-paas/word v0.1.74-beta.54 */
|
|
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 Rt, { PopperWrapper } from "floating-vue";
|
|
4
4
|
import VueKonva from "vue-konva";
|
|
@@ -97707,8 +97707,26 @@ function resolveSubmitCrossKeys(formData, subTableInfoList) {
|
|
|
97707
97707
|
}
|
|
97708
97708
|
return Object.keys(formData).filter((k) => k.includes(":"));
|
|
97709
97709
|
}
|
|
97710
|
+
function normalizeSubmitFieldValues(data, fieldList) {
|
|
97711
|
+
const fieldMap = new Map(fieldList.map((field) => [field.key, field]));
|
|
97712
|
+
const normalizeRecord = (record) => {
|
|
97713
|
+
Object.entries(record).forEach(([key, value]) => {
|
|
97714
|
+
if (Array.isArray(value)) {
|
|
97715
|
+
value.forEach((row) => row && typeof row === "object" && normalizeRecord(row));
|
|
97716
|
+
return;
|
|
97717
|
+
}
|
|
97718
|
+
if (typeof value !== "string" || value === "") return;
|
|
97719
|
+
const field = fieldMap.get(key);
|
|
97720
|
+
if (!field) return;
|
|
97721
|
+
if (!NUMBER_FIELD_TYPES.has(resolveFieldManifestType(field))) return;
|
|
97722
|
+
const normalized = Number(value);
|
|
97723
|
+
if (Number.isFinite(normalized)) record[key] = normalized;
|
|
97724
|
+
});
|
|
97725
|
+
};
|
|
97726
|
+
normalizeRecord(data);
|
|
97727
|
+
}
|
|
97710
97728
|
/** 数据转成真实提交数据 */
|
|
97711
|
-
function getSubmitFormData(formData, subTableInfoList) {
|
|
97729
|
+
function getSubmitFormData(formData, subTableInfoList, fieldList = []) {
|
|
97712
97730
|
const _formData = { ...formData };
|
|
97713
97731
|
const checkTableFieldList = (subTableInfoList || []).filter((o) => o.subType === "check-table-2d").map((o) => o.field);
|
|
97714
97732
|
resolveSubmitCrossKeys(_formData, subTableInfoList).forEach((crossKey) => {
|
|
@@ -97745,19 +97763,22 @@ function getSubmitFormData(formData, subTableInfoList) {
|
|
|
97745
97763
|
return reducedData;
|
|
97746
97764
|
}, {});
|
|
97747
97765
|
console.log("数据转成真实提交数据", realFormData);
|
|
97766
|
+
normalizeSubmitFieldValues(realFormData, fieldList);
|
|
97748
97767
|
return stripHrefDerivedData(omitSubmitExcludedTopLevel(realFormData));
|
|
97749
97768
|
}
|
|
97750
|
-
var handleSyncCheckValue;
|
|
97769
|
+
var handleSyncCheckValue, NUMBER_FIELD_TYPES;
|
|
97751
97770
|
var init_form_state = __esmMin((() => {
|
|
97752
97771
|
init_field_paths();
|
|
97753
97772
|
init_fields$14();
|
|
97754
97773
|
init_check_table();
|
|
97774
|
+
init_field_type();
|
|
97755
97775
|
handleSyncCheckValue = (row) => {
|
|
97756
97776
|
const { type_, value_ } = row;
|
|
97757
97777
|
const valueFieldKey = CHECK_TABLE_TYPE_TO_VALUE_FIELD[type_];
|
|
97758
97778
|
if (!valueFieldKey) return;
|
|
97759
97779
|
row[valueFieldKey] = value_;
|
|
97760
97780
|
};
|
|
97781
|
+
NUMBER_FIELD_TYPES = /* @__PURE__ */ new Set([FIELD_TYPE.QTY]);
|
|
97761
97782
|
}));
|
|
97762
97783
|
//#endregion
|
|
97763
97784
|
//#region src/runtime/interface/fetchers.ts
|
|
@@ -128059,7 +128080,10 @@ function getGroupProductIds(entry) {
|
|
|
128059
128080
|
*/
|
|
128060
128081
|
function findEntryByProductId(entries, productId) {
|
|
128061
128082
|
const versionId = parseFormTmplRefId(productId).id || productId;
|
|
128062
|
-
return entries.find((entry) => getGroupProductIds(entry).
|
|
128083
|
+
return entries.find((entry) => getGroupProductIds(entry).some((candidate) => {
|
|
128084
|
+
const candidateVersionId = parseFormTmplRefId(candidate).id || candidate;
|
|
128085
|
+
return candidate === productId || candidateVersionId === versionId;
|
|
128086
|
+
}));
|
|
128063
128087
|
}
|
|
128064
128088
|
var init_scan_validator = __esmMin((() => {
|
|
128065
128089
|
init_core$1();
|
|
@@ -128274,6 +128298,23 @@ var init_bom_validator = __esmMin((() => {
|
|
|
128274
128298
|
}));
|
|
128275
128299
|
//#endregion
|
|
128276
128300
|
//#region src/suites/edhr/panel-schema/data-init/material-consume-object/linkage.ts
|
|
128301
|
+
/** 提交前按当前产品值补齐所有物料消耗对象的 BOM 明细 ID。 */
|
|
128302
|
+
function buildConsumeObjectBomSubmitUpdates(doc, formInstBom) {
|
|
128303
|
+
if (!formInstBom) return {};
|
|
128304
|
+
return (doc.fieldModelQuery.getFieldList(doc.mainModelKey) ?? []).filter((field) => !field.belongingObject && resolveFieldManifestType(field) === FIELD_TYPE.MATERIAL_CONSUME).map((field) => field.key).reduce((updates, belongingObject) => {
|
|
128305
|
+
const { productPath, bomEntryIdPath } = collectConsumeObjectPaths(doc, belongingObject);
|
|
128306
|
+
if (!productPath || !bomEntryIdPath) return updates;
|
|
128307
|
+
const productId = doc.dataManager.get(productPath);
|
|
128308
|
+
if (isBlank$1(productId)) return updates;
|
|
128309
|
+
const entry = resolveObjectBomEntry({
|
|
128310
|
+
formInstBom,
|
|
128311
|
+
belongingObject,
|
|
128312
|
+
productId: String(productId)
|
|
128313
|
+
});
|
|
128314
|
+
if (entry === null || entry === void 0 ? void 0 : entry.id_) updates[bomEntryIdPath] = entry.id_;
|
|
128315
|
+
return updates;
|
|
128316
|
+
}, {});
|
|
128317
|
+
}
|
|
128277
128318
|
function widgetFieldKey$1(field) {
|
|
128278
128319
|
return (field.fieldLink ? getLastSegment$1(field.fieldLink) : field.key) || void 0;
|
|
128279
128320
|
}
|
|
@@ -128286,17 +128327,26 @@ function isMaterialConsumeObject(doc, belongingObject) {
|
|
|
128286
128327
|
function collectConsumeObjectPaths(doc, belongingObject) {
|
|
128287
128328
|
var _doc$model, _doc$model$getWidgetI;
|
|
128288
128329
|
const paths = {};
|
|
128330
|
+
const assignPath = (field) => {
|
|
128331
|
+
const key = widgetFieldKey$1(field);
|
|
128332
|
+
const path = key ? generateValuePath(key, "") : void 0;
|
|
128333
|
+
if (!path) return;
|
|
128334
|
+
const fieldType = field.fieldType ?? resolveFieldManifestType(field);
|
|
128335
|
+
if (fieldType === FIELD_TYPE.PRODUCT) paths.productPath = path;
|
|
128336
|
+
if (fieldType === FIELD_TYPE.MATERIAL_NO) paths.materialNoPath = path;
|
|
128337
|
+
if (fieldType === FIELD_TYPE.BOM_ENTRY_ID) paths.bomEntryIdPath = path;
|
|
128338
|
+
};
|
|
128289
128339
|
const widgets = ((_doc$model = doc.model) === null || _doc$model === void 0 || (_doc$model$getWidgetI = _doc$model.getWidgetInstances) === null || _doc$model$getWidgetI === void 0 ? void 0 : _doc$model$getWidgetI.call(_doc$model)) ?? [];
|
|
128290
128340
|
for (const widget of widgets) {
|
|
128291
128341
|
var _widget$widgetMeta;
|
|
128292
128342
|
const field = (_widget$widgetMeta = widget.widgetMeta) === null || _widget$widgetMeta === void 0 ? void 0 : _widget$widgetMeta.field;
|
|
128293
128343
|
if (!field || field.belongingObject !== belongingObject) continue;
|
|
128294
|
-
|
|
128295
|
-
|
|
128296
|
-
|
|
128297
|
-
|
|
128298
|
-
if (field.
|
|
128299
|
-
|
|
128344
|
+
assignPath(field);
|
|
128345
|
+
}
|
|
128346
|
+
const modelFields = doc.fieldModelQuery.getFieldList(doc.mainModelKey) ?? [];
|
|
128347
|
+
for (const field of modelFields) {
|
|
128348
|
+
if (field.belongingObject !== belongingObject) continue;
|
|
128349
|
+
assignPath(field);
|
|
128300
128350
|
}
|
|
128301
128351
|
return paths;
|
|
128302
128352
|
}
|
|
@@ -128352,10 +128402,11 @@ async function buildConsumeObjectSelectUpdates(opts) {
|
|
|
128352
128402
|
if (bomEntryIdPath) {
|
|
128353
128403
|
updates[bomEntryIdPath] = null;
|
|
128354
128404
|
if (formInstBom && selectedOption) {
|
|
128405
|
+
const pendingProduct = productPath ? pending[productPath] : void 0;
|
|
128355
128406
|
const entry = resolveObjectBomEntry({
|
|
128356
128407
|
formInstBom,
|
|
128357
128408
|
belongingObject,
|
|
128358
|
-
productId: selectedOption.id_ ? String(selectedOption.id_) : void 0
|
|
128409
|
+
productId: !isBlank$1(pendingProduct) ? String(pendingProduct) : selectedOption.id_ ? String(selectedOption.id_) : void 0
|
|
128359
128410
|
});
|
|
128360
128411
|
if (entry) updates[bomEntryIdPath] = entry.id_;
|
|
128361
128412
|
}
|
|
@@ -137089,6 +137140,7 @@ function useDocumentFactory(props, payload) {
|
|
|
137089
137140
|
docInteraction,
|
|
137090
137141
|
hasData,
|
|
137091
137142
|
loading: computed(() => fetchLoading.value || loading.value),
|
|
137143
|
+
tmplBomCRef,
|
|
137092
137144
|
isRefreshingData,
|
|
137093
137145
|
ctx: payload.ctx,
|
|
137094
137146
|
reload() {
|
|
@@ -140976,17 +141028,24 @@ function useTableDropdown(props, searchFilters) {
|
|
|
140976
141028
|
const tableType = subFieldKey ? (_TableRuntimeContext$2 = TableRuntimeContext.find(docInst.value, subFieldKey)) === null || _TableRuntimeContext$2 === void 0 ? void 0 : _TableRuntimeContext$2.profile.type : void 0;
|
|
140977
141029
|
return showDisplayAndSearchConfig(fieldInfo.value, tableType);
|
|
140978
141030
|
});
|
|
141031
|
+
const isMaterialConsumeObjectProduct = computed(() => {
|
|
141032
|
+
var _fieldMeta$value8, _fieldMeta$value9;
|
|
141033
|
+
const belongingObject = (_fieldMeta$value8 = fieldMeta.value) === null || _fieldMeta$value8 === void 0 ? void 0 : _fieldMeta$value8.belongingObject;
|
|
141034
|
+
if (((_fieldMeta$value9 = fieldMeta.value) === null || _fieldMeta$value9 === void 0 ? void 0 : _fieldMeta$value9.fieldType) !== FIELD_TYPE.PRODUCT || !belongingObject) return false;
|
|
141035
|
+
const objectField = fieldList.value.find((item) => item.key === belongingObject);
|
|
141036
|
+
return !!objectField && resolveFieldManifestType(objectField) === FIELD_TYPE.MATERIAL_CONSUME;
|
|
141037
|
+
});
|
|
140979
141038
|
/**
|
|
140980
141039
|
* 搜索字段以设计端配置为准。
|
|
140981
141040
|
* 工序历史模板未写入搜索字段时,回退为按名称搜索;有值才显示搜索框。
|
|
140982
141041
|
*/
|
|
140983
141042
|
const quickSearchFields = computed(() => {
|
|
140984
|
-
var _fieldMeta$
|
|
141043
|
+
var _fieldMeta$value10;
|
|
140985
141044
|
if (isSubtableMfgOrder.value) return SEARCHABLE_FIELD_DEFAULT_FIELDS_MAP.subtableMfgOrder;
|
|
140986
141045
|
if (isInventoryProductField.value) return INVENTORY_QUICK_SEARCH_FIELDS;
|
|
140987
141046
|
const configured = widgetProps.value.searchField;
|
|
140988
141047
|
if (Array.isArray(configured) && configured.length) return configured;
|
|
140989
|
-
const fieldType = (_fieldMeta$
|
|
141048
|
+
const fieldType = (_fieldMeta$value10 = fieldMeta.value) === null || _fieldMeta$value10 === void 0 ? void 0 : _fieldMeta$value10.fieldType;
|
|
140990
141049
|
if (fieldType === FIELD_TYPE.MFG_ORDER) return SEARCHABLE_FIELD_DEFAULT_FIELDS_MAP.mfgOrder;
|
|
140991
141050
|
if (fieldType === FIELD_TYPE.OPERATION || fieldType === FIELD_TYPE.ROUTING_OPERATION) return ["name_.iLike"];
|
|
140992
141051
|
if (fieldType === FIELD_TYPE.PRODUCT || fieldType === FIELD_TYPE.SCRAP_MATERIAL) return SEARCHABLE_FIELD_DEFAULT_FIELDS_MAP.material;
|
|
@@ -140994,23 +141053,25 @@ function useTableDropdown(props, searchFilters) {
|
|
|
140994
141053
|
});
|
|
140995
141054
|
/** 不开放快速搜索配置,但业务上仍需提供固定搜索能力的字段。 */
|
|
140996
141055
|
const basicSearchEnabled = computed(() => {
|
|
140997
|
-
var _fieldMeta$
|
|
140998
|
-
if (
|
|
140999
|
-
|
|
141056
|
+
var _fieldMeta$value11;
|
|
141057
|
+
if (!fieldInfo.value) return false;
|
|
141058
|
+
if (isMaterialConsumeObjectProduct.value) return true;
|
|
141059
|
+
if (showFieldConfig.value) return false;
|
|
141060
|
+
return fieldInfo.value.key === "part_id_" || BASIC_SEARCH_FIELD_TYPES.has(((_fieldMeta$value11 = fieldMeta.value) === null || _fieldMeta$value11 === void 0 ? void 0 : _fieldMeta$value11.fieldType) ?? fieldInfo.value.type);
|
|
141000
141061
|
});
|
|
141001
141062
|
const querySearchFields = computed(() => {
|
|
141002
|
-
var _fieldMeta$
|
|
141063
|
+
var _fieldMeta$value12, _fieldInfo$value2;
|
|
141003
141064
|
if (quickSearchFields.value.length) return quickSearchFields.value;
|
|
141004
|
-
const fieldType = ((_fieldMeta$
|
|
141065
|
+
const fieldType = ((_fieldMeta$value12 = fieldMeta.value) === null || _fieldMeta$value12 === void 0 ? void 0 : _fieldMeta$value12.fieldType) ?? ((_fieldInfo$value2 = fieldInfo.value) === null || _fieldInfo$value2 === void 0 ? void 0 : _fieldInfo$value2.type);
|
|
141005
141066
|
return fieldType && BASIC_SEARCH_FIELDS[fieldType] || [];
|
|
141006
141067
|
});
|
|
141007
141068
|
const columns = computed(() => {
|
|
141008
|
-
var _props$widget, _fieldMeta$
|
|
141069
|
+
var _props$widget, _fieldMeta$value13;
|
|
141009
141070
|
const displayFields = isSubtableMfgOrder.value ? [{
|
|
141010
141071
|
key: "code_",
|
|
141011
141072
|
name: "工单编号"
|
|
141012
141073
|
}] : showFieldConfig.value ? ((_props$widget = props.widget) === null || _props$widget === void 0 || (_props$widget = _props$widget.widgetMeta) === null || _props$widget === void 0 || (_props$widget = _props$widget.props) === null || _props$widget === void 0 ? void 0 : _props$widget.displayFields) || [] : [];
|
|
141013
|
-
const effectiveDisplayFields = ((_fieldMeta$
|
|
141074
|
+
const effectiveDisplayFields = ((_fieldMeta$value13 = fieldMeta.value) === null || _fieldMeta$value13 === void 0 ? void 0 : _fieldMeta$value13.fieldType) === FIELD_TYPE.MFG_ORDER && !displayFields.length ? [{
|
|
141014
141075
|
key: "code_",
|
|
141015
141076
|
name: "工单编号"
|
|
141016
141077
|
}] : displayFields;
|
|
@@ -141041,17 +141102,17 @@ function useTableDropdown(props, searchFilters) {
|
|
|
141041
141102
|
});
|
|
141042
141103
|
/** 是否需要数据联动 */
|
|
141043
141104
|
const businessLinkage = computed(() => {
|
|
141044
|
-
var _fieldMeta$
|
|
141105
|
+
var _fieldMeta$value14, _fieldMeta$value15;
|
|
141045
141106
|
return new TableRuntime(docInst.value).resolveSelectLinkage({
|
|
141046
|
-
subFieldKey: (_fieldMeta$
|
|
141047
|
-
fieldKey: (_fieldMeta$
|
|
141107
|
+
subFieldKey: (_fieldMeta$value14 = fieldMeta.value) === null || _fieldMeta$value14 === void 0 ? void 0 : _fieldMeta$value14.subFieldKey,
|
|
141108
|
+
fieldKey: (_fieldMeta$value15 = fieldMeta.value) === null || _fieldMeta$value15 === void 0 ? void 0 : _fieldMeta$value15.fieldLink,
|
|
141048
141109
|
runtimeValuePath: runtimeValuePath.value
|
|
141049
141110
|
});
|
|
141050
141111
|
});
|
|
141051
141112
|
const enableLinkage = computed(() => {
|
|
141052
|
-
var _businessLinkage$valu, _fieldMeta$
|
|
141113
|
+
var _businessLinkage$valu, _fieldMeta$value16, _fieldMeta$value17, _fieldMeta$value18;
|
|
141053
141114
|
if ((_businessLinkage$valu = businessLinkage.value) === null || _businessLinkage$valu === void 0 ? void 0 : _businessLinkage$valu.enabled) return true;
|
|
141054
|
-
return shouldEnableLinkage(docInst.value, (_fieldMeta$
|
|
141115
|
+
return shouldEnableLinkage(docInst.value, (_fieldMeta$value16 = fieldMeta.value) === null || _fieldMeta$value16 === void 0 ? void 0 : _fieldMeta$value16.fieldType, ((_fieldMeta$value17 = fieldMeta.value) === null || _fieldMeta$value17 === void 0 ? void 0 : _fieldMeta$value17.subFieldKey) || ((_fieldMeta$value18 = fieldMeta.value) === null || _fieldMeta$value18 === void 0 ? void 0 : _fieldMeta$value18.modelLink));
|
|
141055
141116
|
});
|
|
141056
141117
|
/** 严格级联:上游无值时阻断;可选过滤(requireLinkValue: false)不阻断 */
|
|
141057
141118
|
const linkageRequiresUpstreamValue = computed(() => {
|
|
@@ -141063,8 +141124,8 @@ function useTableDropdown(props, searchFilters) {
|
|
|
141063
141124
|
var _businessLinkage$valu3;
|
|
141064
141125
|
if ((_businessLinkage$valu3 = businessLinkage.value) === null || _businessLinkage$valu3 === void 0 ? void 0 : _businessLinkage$valu3.enabled) return businessLinkage.value.linkValue;
|
|
141065
141126
|
if (enableLinkage.value) {
|
|
141066
|
-
var _fieldMeta$
|
|
141067
|
-
const linkValuePath = generateValuePath(strategy.value.linkFieldId, (_fieldMeta$
|
|
141127
|
+
var _fieldMeta$value19;
|
|
141128
|
+
const linkValuePath = generateValuePath(strategy.value.linkFieldId, (_fieldMeta$value19 = fieldMeta.value) === null || _fieldMeta$value19 === void 0 ? void 0 : _fieldMeta$value19.subFieldKey);
|
|
141068
141129
|
const realLinkValuePath = replacePathIndexPlaceholders({
|
|
141069
141130
|
refPath: runtimeValuePath.value,
|
|
141070
141131
|
templatePath: linkValuePath
|
|
@@ -141074,8 +141135,8 @@ function useTableDropdown(props, searchFilters) {
|
|
|
141074
141135
|
});
|
|
141075
141136
|
const clearValuePath = computed(() => {
|
|
141076
141137
|
if (strategy.value.clearFieldId) {
|
|
141077
|
-
var _fieldMeta$
|
|
141078
|
-
const valuePath = generateValuePath(strategy.value.clearFieldId, (_fieldMeta$
|
|
141138
|
+
var _fieldMeta$value20;
|
|
141139
|
+
const valuePath = generateValuePath(strategy.value.clearFieldId, (_fieldMeta$value20 = fieldMeta.value) === null || _fieldMeta$value20 === void 0 ? void 0 : _fieldMeta$value20.subFieldKey);
|
|
141079
141140
|
return replacePathIndexPlaceholders({
|
|
141080
141141
|
refPath: runtimeValuePath.value,
|
|
141081
141142
|
templatePath: valuePath
|
|
@@ -141094,7 +141155,7 @@ function useTableDropdown(props, searchFilters) {
|
|
|
141094
141155
|
/** 非联动场景、可选过滤、或联动已选择关联值时,才展示搜索栏 */
|
|
141095
141156
|
const showSearch = computed(() => !enableLinkage.value || !linkageRequiresUpstreamValue.value || !!linkDataValue.value);
|
|
141096
141157
|
const fetcher = async ({ keyword = "", pageNo, pageSize, deviceTypeId }) => {
|
|
141097
|
-
var _fieldMeta$
|
|
141158
|
+
var _fieldMeta$value21, _fieldMeta$value22, _window$TMPL_BOM_CONT, _fieldMeta$value23, _fieldMeta$value24, _parsedValuePath$segm, _docInst$value$params;
|
|
141098
141159
|
if (!fieldInfo.value) return {
|
|
141099
141160
|
data: [],
|
|
141100
141161
|
totalPage: 0,
|
|
@@ -141110,19 +141171,19 @@ function useTableDropdown(props, searchFilters) {
|
|
|
141110
141171
|
const { buildQuery, fetcher, transform, optionMapping, api, flatRequestBody } = strategy.value;
|
|
141111
141172
|
const isLinkQuery = enableLinkage.value;
|
|
141112
141173
|
const filters = unref(searchFilters);
|
|
141113
|
-
const valuePath = (_fieldMeta$
|
|
141174
|
+
const valuePath = (_fieldMeta$value21 = fieldMeta.value) === null || _fieldMeta$value21 === void 0 ? void 0 : _fieldMeta$value21.valuePath;
|
|
141114
141175
|
const subFieldConfig = getSubFieldConfig(docInst.value.paramsConfig);
|
|
141115
141176
|
const assocFilterParams = await buildAssocFilterExtraParams(docInst.value, widgetProps.value, runtimeValuePath.value);
|
|
141116
|
-
const belongingObject = (_fieldMeta$
|
|
141177
|
+
const belongingObject = (_fieldMeta$value22 = fieldMeta.value) === null || _fieldMeta$value22 === void 0 ? void 0 : _fieldMeta$value22.belongingObject;
|
|
141117
141178
|
const formTmplBomController = (_window$TMPL_BOM_CONT = window[TMPL_BOM_CONTROLLER]) === null || _window$TMPL_BOM_CONT === void 0 ? void 0 : _window$TMPL_BOM_CONT.value;
|
|
141118
|
-
const objectBomParams = getObjectBomDropdownQuery((_fieldMeta$
|
|
141179
|
+
const objectBomParams = getObjectBomDropdownQuery((_fieldMeta$value23 = fieldMeta.value) === null || _fieldMeta$value23 === void 0 ? void 0 : _fieldMeta$value23.fieldType, {
|
|
141119
141180
|
formInstBom: formTmplBomController === null || formTmplBomController === void 0 ? void 0 : formTmplBomController.formInstBom,
|
|
141120
141181
|
belongingObject
|
|
141121
141182
|
});
|
|
141122
141183
|
const lotProductParams = getConsumeObjectLotProductQuery({
|
|
141123
141184
|
doc: docInst.value,
|
|
141124
141185
|
belongingObject,
|
|
141125
|
-
fieldType: (_fieldMeta$
|
|
141186
|
+
fieldType: (_fieldMeta$value24 = fieldMeta.value) === null || _fieldMeta$value24 === void 0 ? void 0 : _fieldMeta$value24.fieldType
|
|
141126
141187
|
});
|
|
141127
141188
|
const parsedValuePath = parseValuePath(runtimeValuePath.value);
|
|
141128
141189
|
const rowIndexMatch = (_parsedValuePath$segm = parsedValuePath.segments[0]) === null || _parsedValuePath$segm === void 0 ? void 0 : _parsedValuePath$segm.match(/\[(\d+)\]/);
|
|
@@ -141131,9 +141192,9 @@ function useTableDropdown(props, searchFilters) {
|
|
|
141131
141192
|
const materialConsumeRow = rowIndex != null ? materialConsumeTableController === null || materialConsumeTableController === void 0 ? void 0 : materialConsumeTableController.actualTableData[rowIndex] : void 0;
|
|
141132
141193
|
let materialConsumeRowParams;
|
|
141133
141194
|
if (materialConsumeTableController && materialConsumeRow) {
|
|
141134
|
-
var _fieldMeta$
|
|
141135
|
-
if (((_fieldMeta$
|
|
141136
|
-
else if (((_fieldMeta$
|
|
141195
|
+
var _fieldMeta$value25, _fieldMeta$value26;
|
|
141196
|
+
if (((_fieldMeta$value25 = fieldMeta.value) === null || _fieldMeta$value25 === void 0 ? void 0 : _fieldMeta$value25.fieldType) === FIELD_TYPE.PRODUCT) materialConsumeRowParams = materialConsumeTableController.getProductQueryForRow(materialConsumeRow, rowIndex);
|
|
141197
|
+
else if (((_fieldMeta$value26 = fieldMeta.value) === null || _fieldMeta$value26 === void 0 ? void 0 : _fieldMeta$value26.fieldType) === FIELD_TYPE.MATERIAL_NO) materialConsumeRowParams = materialConsumeTableController.getMaterialNoQueryForRow(materialConsumeRow, rowIndex);
|
|
141137
141198
|
}
|
|
141138
141199
|
const extraParams = {
|
|
141139
141200
|
...subFieldConfig.get(valuePath),
|
|
@@ -144318,6 +144379,7 @@ var init_overlay_render_vue_vue_type_script_setup_true_lang = __esmMin((() => {
|
|
|
144318
144379
|
const props = __props;
|
|
144319
144380
|
const isTargetReady = ref(false);
|
|
144320
144381
|
const isMenuShown = ref(false);
|
|
144382
|
+
let isMaterialObjectScanOpen = false;
|
|
144321
144383
|
const pickerTriggerRef = ref(null);
|
|
144322
144384
|
const dropdownPlacement = ref("bottom-start");
|
|
144323
144385
|
const dropdownAvailableHeight = ref(390);
|
|
@@ -144584,91 +144646,115 @@ var init_overlay_render_vue_vue_type_script_setup_true_lang = __esmMin((() => {
|
|
|
144584
144646
|
isMenuShown.value = false;
|
|
144585
144647
|
}
|
|
144586
144648
|
});
|
|
144587
|
-
|
|
144588
|
-
|
|
144589
|
-
|
|
144590
|
-
|
|
144591
|
-
|
|
144592
|
-
if (!(objectBom === null || objectBom === void 0 ? void 0 : objectBom.disable_barcode_parsing_) && (objectBom === null || objectBom === void 0 ? void 0 : objectBom.barcode_parsing_rules_id_)) try {
|
|
144593
|
-
objectParseRules = JSON.parse(objectBom.barcode_parsing_rules_id_);
|
|
144649
|
+
/** 解析规则配置字符串转成对象(与物料消耗表一致) */
|
|
144650
|
+
function toParseRuleConfig(value) {
|
|
144651
|
+
if (!value) return void 0;
|
|
144652
|
+
try {
|
|
144653
|
+
return JSON.parse(value);
|
|
144594
144654
|
} catch {
|
|
144595
|
-
|
|
144596
|
-
}
|
|
144597
|
-
|
|
144598
|
-
|
|
144599
|
-
|
|
144600
|
-
|
|
144601
|
-
|
|
144602
|
-
|
|
144603
|
-
|
|
144604
|
-
|
|
144605
|
-
|
|
144606
|
-
|
|
144607
|
-
|
|
144608
|
-
|
|
144609
|
-
|
|
144610
|
-
|
|
144611
|
-
|
|
144612
|
-
|
|
144613
|
-
|
|
144614
|
-
|
|
144615
|
-
|
|
144616
|
-
|
|
144617
|
-
|
|
144618
|
-
|
|
144619
|
-
|
|
144620
|
-
|
|
144621
|
-
|
|
144622
|
-
|
|
144623
|
-
|
|
144624
|
-
|
|
144625
|
-
|
|
144626
|
-
|
|
144627
|
-
|
|
144628
|
-
|
|
144629
|
-
|
|
144630
|
-
|
|
144631
|
-
|
|
144632
|
-
|
|
144633
|
-
|
|
144634
|
-
|
|
144635
|
-
|
|
144636
|
-
|
|
144637
|
-
|
|
144638
|
-
|
|
144639
|
-
|
|
144640
|
-
|
|
144641
|
-
|
|
144642
|
-
|
|
144643
|
-
|
|
144644
|
-
|
|
144645
|
-
|
|
144646
|
-
|
|
144647
|
-
|
|
144648
|
-
|
|
144649
|
-
|
|
144650
|
-
|
|
144651
|
-
|
|
144652
|
-
|
|
144653
|
-
|
|
144654
|
-
|
|
144655
|
-
|
|
144656
|
-
|
|
144657
|
-
|
|
144658
|
-
|
|
144659
|
-
|
|
144660
|
-
|
|
144661
|
-
|
|
144662
|
-
|
|
144663
|
-
|
|
144664
|
-
|
|
144665
|
-
|
|
144666
|
-
|
|
144655
|
+
return { parsingRuleId: value };
|
|
144656
|
+
}
|
|
144657
|
+
}
|
|
144658
|
+
async function openMaterialObjectScan() {
|
|
144659
|
+
if (isMaterialObjectScanOpen) return;
|
|
144660
|
+
isMaterialObjectScanOpen = true;
|
|
144661
|
+
try {
|
|
144662
|
+
var _fieldMeta$value3, _tmplBomCRef$value, _objectBom$value, _objectBom$value2;
|
|
144663
|
+
const belongingObject = (_fieldMeta$value3 = fieldMeta.value) === null || _fieldMeta$value3 === void 0 ? void 0 : _fieldMeta$value3.belongingObject;
|
|
144664
|
+
const objectBom = tmplBomCRef === null || tmplBomCRef === void 0 || (_tmplBomCRef$value = tmplBomCRef.value) === null || _tmplBomCRef$value === void 0 || (_tmplBomCRef$value = _tmplBomCRef$value.formInstBom) === null || _tmplBomCRef$value === void 0 || (_tmplBomCRef$value = _tmplBomCRef$value.formTmplObjectBomList) === null || _tmplBomCRef$value === void 0 ? void 0 : _tmplBomCRef$value.find((item) => item.object_key_ === belongingObject);
|
|
144665
|
+
const scanRules = !!((_objectBom$value = objectBom.value) === null || _objectBom$value === void 0 ? void 0 : _objectBom$value.disable_barcode_parsing_) ? void 0 : toParseRuleConfig((_objectBom$value2 = objectBom.value) === null || _objectBom$value2 === void 0 ? void 0 : _objectBom$value2.barcode_parsing_rules_id_);
|
|
144666
|
+
const objectFields = fieldList.value.filter((item) => item.belongingObject === belongingObject);
|
|
144667
|
+
await Jr("COMMON_SCAN", {
|
|
144668
|
+
title: "扫码录入",
|
|
144669
|
+
ruleTip: "扫码解析后按字段映射写入表单",
|
|
144670
|
+
scanRules,
|
|
144671
|
+
scanParam: (objectBom === null || objectBom === void 0 ? void 0 : objectBom.disable_barcode_parsing_) ? objectBom.scan_param_type_ : void 0,
|
|
144672
|
+
formFieldsLabel: "对象字段",
|
|
144673
|
+
formFieldOptions: objectFields.map((item) => ({
|
|
144674
|
+
...item,
|
|
144675
|
+
label: `${item.name}`,
|
|
144676
|
+
value: `${item.modelKey}.${item.key}`
|
|
144677
|
+
})),
|
|
144678
|
+
onScan: async ({ str, parsedValue, transformedData }) => {
|
|
144679
|
+
if (!str || !parsedValue || !Object.keys(parsedValue).length) return;
|
|
144680
|
+
try {
|
|
144681
|
+
var _tmplBomCRef$value2, _tmplBomCRef$value3, _tmplBomCRef$value4;
|
|
144682
|
+
if (parsedValue.expiration && dayjs(parsedValue.expiration).endOf("day").isBefore(dayjs())) throw new Error("物料批次已过期");
|
|
144683
|
+
const rows = await materialCheck({
|
|
144684
|
+
material_no_: parsedValue.materialCode,
|
|
144685
|
+
production_identification_name_: parsedValue.lot,
|
|
144686
|
+
qty_: parsedValue.qty,
|
|
144687
|
+
validate_: parsedValue.expiration,
|
|
144688
|
+
bom_entries_: (objectBom === null || objectBom === void 0 ? void 0 : objectBom.material_consumption_pattern_) === MaterialConsumptionPatternEnum.RECORD ? null : tmplBomCRef === null || tmplBomCRef === void 0 || (_tmplBomCRef$value2 = tmplBomCRef.value) === null || _tmplBomCRef$value2 === void 0 || (_tmplBomCRef$value2 = _tmplBomCRef$value2.formInstBom) === null || _tmplBomCRef$value2 === void 0 ? void 0 : _tmplBomCRef$value2.bomEntries,
|
|
144689
|
+
operation_id_: tmplBomCRef === null || tmplBomCRef === void 0 || (_tmplBomCRef$value3 = tmplBomCRef.value) === null || _tmplBomCRef$value3 === void 0 ? void 0 : _tmplBomCRef$value3.operationId,
|
|
144690
|
+
unique_code_: parsedValue.uniqueCode,
|
|
144691
|
+
bar_code_enabled_: !(objectBom === null || objectBom === void 0 ? void 0 : objectBom.disable_barcode_parsing_)
|
|
144692
|
+
}) ?? [];
|
|
144693
|
+
if (!rows.length) throw new Error("匹配不到对应物料,请按规则上料或新增物料");
|
|
144694
|
+
let material = rows[0];
|
|
144695
|
+
if (rows.length > 1) {
|
|
144696
|
+
const selected = await Jr("SCAN_MULTI_ROWS_MODAL", { rows: rows.map((e) => {
|
|
144697
|
+
return {
|
|
144698
|
+
...e,
|
|
144699
|
+
productId: e.materialName
|
|
144700
|
+
};
|
|
144701
|
+
}) });
|
|
144702
|
+
if (!selected.success || !selected.result) return;
|
|
144703
|
+
material = selected.result;
|
|
144704
|
+
} else if (material.productionIdentificationIsLocked) throw new Error(await getLotLockedReason(material.productionIdentificationId));
|
|
144705
|
+
validateObjectBomForScan({
|
|
144706
|
+
formInstBom: tmplBomCRef === null || tmplBomCRef === void 0 || (_tmplBomCRef$value4 = tmplBomCRef.value) === null || _tmplBomCRef$value4 === void 0 ? void 0 : _tmplBomCRef$value4.formInstBom,
|
|
144707
|
+
belongingObject,
|
|
144708
|
+
productId: material.materialId
|
|
144709
|
+
});
|
|
144710
|
+
await assertReinspectionDate({
|
|
144711
|
+
product_id_: material.materialId,
|
|
144712
|
+
material_no_: material.productionIdentificationName,
|
|
144713
|
+
material_no_id_: material.productionIdentificationId
|
|
144714
|
+
});
|
|
144715
|
+
const productUpdates = await buildConsumeObjectScanProductUpdate({
|
|
144716
|
+
doc: props.doc,
|
|
144717
|
+
belongingObject,
|
|
144718
|
+
material
|
|
144719
|
+
});
|
|
144720
|
+
const byBiz = (bizType) => objectFields.find((item) => (item.bizType || item.type) === bizType);
|
|
144721
|
+
const qtyField = byBiz(FIELD_TYPE.QTY);
|
|
144722
|
+
const expirationField = objectFields.find((item) => {
|
|
144723
|
+
var _item$key;
|
|
144724
|
+
return (_item$key = item.key) === null || _item$key === void 0 ? void 0 : _item$key.startsWith("expiration_date_");
|
|
144725
|
+
});
|
|
144726
|
+
const bomEntryIdField = byBiz(FIELD_TYPE.BOM_ENTRY_ID);
|
|
144727
|
+
const rootPath = (key) => key.startsWith("$") ? key : `$.${key}`;
|
|
144728
|
+
const updates = {};
|
|
144729
|
+
updates[runtimeValuePath.value] = material.productionIdentificationName;
|
|
144730
|
+
updates[getIdPath(runtimeValuePath.value)] = material.productionIdentificationId;
|
|
144731
|
+
Object.assign(updates, productUpdates);
|
|
144732
|
+
if (qtyField && parsedValue.qty != null) updates[rootPath(qtyField.key)] = parsedValue.qty;
|
|
144733
|
+
if (expirationField && parsedValue.expiration !== void 0) updates[rootPath(expirationField.key)] = parsedValue.expiration;
|
|
144734
|
+
if (bomEntryIdField) {
|
|
144735
|
+
var _tmplBomCRef$value5;
|
|
144736
|
+
const bomEntry = resolveObjectBomEntry({
|
|
144737
|
+
formInstBom: tmplBomCRef === null || tmplBomCRef === void 0 || (_tmplBomCRef$value5 = tmplBomCRef.value) === null || _tmplBomCRef$value5 === void 0 ? void 0 : _tmplBomCRef$value5.formInstBom,
|
|
144738
|
+
belongingObject,
|
|
144739
|
+
productId: material.materialId
|
|
144740
|
+
});
|
|
144741
|
+
if (bomEntry) updates[rootPath(bomEntryIdField.key)] = bomEntry.id_;
|
|
144742
|
+
}
|
|
144743
|
+
if (transformedData && typeof transformedData === "object") Object.assign(updates, Object.fromEntries(Object.entries(transformedData).map(([key, value]) => [rootPath(key), value])));
|
|
144744
|
+
if (updates[runtimeValuePath.value] !== material.productionIdentificationName) updates[getIdPath(runtimeValuePath.value)] = null;
|
|
144745
|
+
props.doc.dataManager.setMultiple(updates, "user");
|
|
144746
|
+
await props.doc.dataManager.whenEmitSettled();
|
|
144747
|
+
return true;
|
|
144748
|
+
} catch (e) {
|
|
144749
|
+
GctMessage.error((e === null || e === void 0 ? void 0 : e.message) || String(e));
|
|
144750
|
+
}
|
|
144667
144751
|
}
|
|
144668
|
-
|
|
144669
|
-
|
|
144670
|
-
|
|
144671
|
-
}
|
|
144752
|
+
});
|
|
144753
|
+
} catch (e) {
|
|
144754
|
+
GctMessage.error((e === null || e === void 0 ? void 0 : e.message) || String(e));
|
|
144755
|
+
} finally {
|
|
144756
|
+
isMaterialObjectScanOpen = false;
|
|
144757
|
+
}
|
|
144672
144758
|
}
|
|
144673
144759
|
function openDialog(options) {
|
|
144674
144760
|
var _fieldInfo$value;
|
|
@@ -144927,8 +145013,8 @@ var init_overlay_render_vue_vue_type_script_setup_true_lang = __esmMin((() => {
|
|
|
144927
145013
|
//#region src/runtime/canvas/__common__/widget-container/overlay-render.vue?vue&type=style&index=0&lang.less
|
|
144928
145014
|
var init_overlay_render_vue_vue_type_style_index_0_lang = __esmMin((() => {}));
|
|
144929
145015
|
//#endregion
|
|
144930
|
-
//#region src/runtime/canvas/__common__/widget-container/overlay-render.vue?vue&type=style&index=1&scoped=
|
|
144931
|
-
var
|
|
145016
|
+
//#region src/runtime/canvas/__common__/widget-container/overlay-render.vue?vue&type=style&index=1&scoped=7b8fc726&lang.less
|
|
145017
|
+
var init_overlay_render_vue_vue_type_style_index_1_scoped_7b8fc726_lang = __esmMin((() => {}));
|
|
144932
145018
|
//#endregion
|
|
144933
145019
|
//#region src/runtime/canvas/__common__/widget-container/overlay-render.vue
|
|
144934
145020
|
var overlay_render_default;
|
|
@@ -144936,9 +145022,9 @@ var init_overlay_render = __esmMin((() => {
|
|
|
144936
145022
|
init_overlay_render_vue_vue_type_script_setup_true_lang();
|
|
144937
145023
|
init_overlay_render_vue_vue_type_script_setup_true_lang();
|
|
144938
145024
|
init_overlay_render_vue_vue_type_style_index_0_lang();
|
|
144939
|
-
|
|
145025
|
+
init_overlay_render_vue_vue_type_style_index_1_scoped_7b8fc726_lang();
|
|
144940
145026
|
init__plugin_vue_export_helper();
|
|
144941
|
-
overlay_render_default = /*#__PURE__*/ _plugin_vue_export_helper_default(overlay_render_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
145027
|
+
overlay_render_default = /*#__PURE__*/ _plugin_vue_export_helper_default(overlay_render_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-7b8fc726"]]);
|
|
144942
145028
|
}));
|
|
144943
145029
|
//#endregion
|
|
144944
145030
|
//#region src/utils/composables/useHoverDelay.ts
|
|
@@ -149832,6 +149918,7 @@ function useDocOperations(docRef) {
|
|
|
149832
149918
|
//#region src/sdk/doc-runtime/composables/useDocController.ts
|
|
149833
149919
|
init_form_state();
|
|
149834
149920
|
init_form_change_row();
|
|
149921
|
+
init_material_consume_object();
|
|
149835
149922
|
/**
|
|
149836
149923
|
* 将加载层(factory)与操作层(ops)组合为受控文档句柄 DocController
|
|
149837
149924
|
*
|
|
@@ -149890,11 +149977,14 @@ function useDocController(factory, ops) {
|
|
|
149890
149977
|
return readDocRawData(doc, options);
|
|
149891
149978
|
},
|
|
149892
149979
|
async getSubmitFormData() {
|
|
149893
|
-
var _doc$model;
|
|
149980
|
+
var _factory$tmplBomCRef$, _doc$model;
|
|
149894
149981
|
ops.clearFormChangeRowPreview();
|
|
149982
|
+
const bomUpdates = buildConsumeObjectBomSubmitUpdates(doc, (_factory$tmplBomCRef$ = factory.tmplBomCRef.value) === null || _factory$tmplBomCRef$ === void 0 ? void 0 : _factory$tmplBomCRef$.formInstBom);
|
|
149983
|
+
if (Object.keys(bomUpdates).length) doc.dataManager.setMultiple(bomUpdates, "hydrate");
|
|
149895
149984
|
await doc.dataManager.prepareForSubmit();
|
|
149896
149985
|
const subTableInfoList = ((_doc$model = doc.model) === null || _doc$model === void 0 ? void 0 : _doc$model.getSubTableInfoList()) ?? [];
|
|
149897
|
-
|
|
149986
|
+
const fieldList = doc.fieldModelQuery.getFieldList(doc.mainModelKey) ?? [];
|
|
149987
|
+
return getSubmitFormData(doc.dataManager.getRawData(), subTableInfoList, fieldList);
|
|
149898
149988
|
},
|
|
149899
149989
|
async setRawData(data, defaultDataMap) {
|
|
149900
149990
|
ops.clearFormChangeRowPreview();
|
|
@@ -166380,6 +166470,8 @@ var object_init_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
166380
166470
|
"parseRuleProps"
|
|
166381
166471
|
]),
|
|
166382
166472
|
barcode_parsing_rules_id_: Object.keys(parseRuleProps).length ? JSON.stringify(parseRuleProps) : "",
|
|
166473
|
+
disable_barcode_parsing_: result.disableBarcodeParsing,
|
|
166474
|
+
scan_param_type_: result.scanParamType,
|
|
166383
166475
|
object_key_: result.objectField,
|
|
166384
166476
|
entries_: result.personal_bom_enabled_ ? [bomEntry] : []
|
|
166385
166477
|
}
|
|
@@ -166459,7 +166551,7 @@ var object_init_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
166459
166551
|
//#endregion
|
|
166460
166552
|
//#region src/suites/edhr/panel-schema/data-init/object-init/object-init.vue
|
|
166461
166553
|
init__plugin_vue_export_helper();
|
|
166462
|
-
var object_init_default = /*#__PURE__*/ _plugin_vue_export_helper_default(object_init_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
166554
|
+
var object_init_default = /*#__PURE__*/ _plugin_vue_export_helper_default(object_init_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-d8f43bdd"]]);
|
|
166463
166555
|
//#endregion
|
|
166464
166556
|
//#region src/suites/edhr/panel-schema/data-init/DataInitPanel.vue?vue&type=script&setup=true&name=panel-data-init&lang.ts
|
|
166465
166557
|
init_core$1();
|
|
@@ -174931,7 +175023,7 @@ var assoc_filter_editor_vue_vue_type_script_setup_true_name_assoc_filter_editor_
|
|
|
174931
175023
|
//#endregion
|
|
174932
175024
|
//#region src/suites/shared/panel/config/editor/assoc-filter-editor/assoc-filter-editor.vue
|
|
174933
175025
|
init__plugin_vue_export_helper();
|
|
174934
|
-
var assoc_filter_editor_default = /*#__PURE__*/ _plugin_vue_export_helper_default(assoc_filter_editor_vue_vue_type_script_setup_true_name_assoc_filter_editor_lang_default, [["__scopeId", "data-v-
|
|
175026
|
+
var assoc_filter_editor_default = /*#__PURE__*/ _plugin_vue_export_helper_default(assoc_filter_editor_vue_vue_type_script_setup_true_name_assoc_filter_editor_lang_default, [["__scopeId", "data-v-81133a7f"]]);
|
|
174935
175027
|
//#endregion
|
|
174936
175028
|
//#region src/suites/edhr/panel-config/field/trace/device-group-select.vue?vue&type=script&setup=true&lang.ts
|
|
174937
175029
|
init_base$2();
|
|
@@ -58,6 +58,8 @@ export interface DocumentFactory {
|
|
|
58
58
|
hasData: ComputedRef<boolean>;
|
|
59
59
|
/** 是否正在加载 */
|
|
60
60
|
loading: ComputedRef<boolean>;
|
|
61
|
+
/** 当前实例 BOM 控制器。 */
|
|
62
|
+
tmplBomCRef: Ref<FormTmplBomController | null>;
|
|
61
63
|
/**
|
|
62
64
|
* refreshData() 执行期间为 true。
|
|
63
65
|
* 供 useDocLooperAutoSaveNotify 读取以抑制通知,防止循环触发。
|
|
@@ -25,6 +25,8 @@ export interface ConsumeObjectSelectUpdatesOpts {
|
|
|
25
25
|
/** 表单实例 BOM 信息,用于 BOM 模式下写入 bom_entry_id_ */
|
|
26
26
|
formInstBom?: FormInstBomResponse | null;
|
|
27
27
|
}
|
|
28
|
+
/** 提交前按当前产品值补齐所有物料消耗对象的 BOM 明细 ID。 */
|
|
29
|
+
export declare function buildConsumeObjectBomSubmitUpdates(doc: ConsumeObjectDoc, formInstBom?: FormInstBomResponse | null): Record<string, unknown>;
|
|
28
30
|
/**
|
|
29
31
|
* 消耗对象批次下拉:同组物料有值时按该物料版本过滤,替换 BOM versionIn。
|
|
30
32
|
*/
|
package/dist/word.css
CHANGED
|
@@ -9735,7 +9735,7 @@ textarea[data-v-a7d89044]::placeholder {
|
|
|
9735
9735
|
/**
|
|
9736
9736
|
* 字段态配色 —— DOM 控件子集(input / select / overlay)
|
|
9737
9737
|
*/
|
|
9738
|
-
.widget-container-action[data-v-
|
|
9738
|
+
.widget-container-action[data-v-7b8fc726] {
|
|
9739
9739
|
position: absolute;
|
|
9740
9740
|
inset: 0;
|
|
9741
9741
|
z-index: 999;
|
|
@@ -9743,7 +9743,7 @@ textarea[data-v-a7d89044]::placeholder {
|
|
|
9743
9743
|
height: 0;
|
|
9744
9744
|
pointer-events: all;
|
|
9745
9745
|
}
|
|
9746
|
-
.picker-trigger[data-v-
|
|
9746
|
+
.picker-trigger[data-v-7b8fc726] {
|
|
9747
9747
|
display: flex;
|
|
9748
9748
|
box-sizing: border-box;
|
|
9749
9749
|
align-items: center;
|
|
@@ -9755,19 +9755,19 @@ textarea[data-v-a7d89044]::placeholder {
|
|
|
9755
9755
|
outline: none;
|
|
9756
9756
|
background-color: #fff;
|
|
9757
9757
|
}
|
|
9758
|
-
.picker-trigger.disabled[data-v-
|
|
9758
|
+
.picker-trigger.disabled[data-v-7b8fc726] {
|
|
9759
9759
|
border: 1px solid rgba(13, 13, 13, 0.12);
|
|
9760
9760
|
cursor: not-allowed;
|
|
9761
9761
|
}
|
|
9762
|
-
.picker-trigger.disabled .gct-icon[data-v-
|
|
9762
|
+
.picker-trigger.disabled .gct-icon[data-v-7b8fc726] {
|
|
9763
9763
|
color: rgba(0, 0, 0, 0.25);
|
|
9764
9764
|
}
|
|
9765
|
-
.picker-trigger.readonly[data-v-
|
|
9765
|
+
.picker-trigger.readonly[data-v-7b8fc726] {
|
|
9766
9766
|
border-color: #d9d9d9;
|
|
9767
9767
|
background-color: #f5f6f8;
|
|
9768
9768
|
cursor: default;
|
|
9769
9769
|
}
|
|
9770
|
-
.picker-trigger.readonly .gct-icon[data-v-
|
|
9770
|
+
.picker-trigger.readonly .gct-icon[data-v-7b8fc726] {
|
|
9771
9771
|
color: rgba(0, 0, 0, 0.65);
|
|
9772
9772
|
}
|
|
9773
9773
|
.resize-box[data-v-788ab62c] {
|
|
@@ -12620,35 +12620,35 @@ svg.portrait-icon[data-v-8bdb451e] {
|
|
|
12620
12620
|
cursor: pointer;
|
|
12621
12621
|
color: #797a7d;
|
|
12622
12622
|
}
|
|
12623
|
-
.object-item[data-v-
|
|
12623
|
+
.object-item[data-v-d8f43bdd] {
|
|
12624
12624
|
margin-bottom: 16px;
|
|
12625
12625
|
padding: 12px;
|
|
12626
12626
|
border: 1px dashed #e4e4e4;
|
|
12627
12627
|
border-radius: 8px;
|
|
12628
12628
|
background: #f6f8fa;
|
|
12629
12629
|
}
|
|
12630
|
-
.object-item.is-filled[data-v-
|
|
12630
|
+
.object-item.is-filled[data-v-d8f43bdd] {
|
|
12631
12631
|
border-color: #a7cae6;
|
|
12632
12632
|
background: #ecf3fc;
|
|
12633
12633
|
}
|
|
12634
|
-
.object-item .item-info[data-v-
|
|
12634
|
+
.object-item .item-info[data-v-d8f43bdd] {
|
|
12635
12635
|
display: flex;
|
|
12636
12636
|
}
|
|
12637
|
-
.object-item .item-info .info-text[data-v-
|
|
12637
|
+
.object-item .item-info .info-text[data-v-d8f43bdd] {
|
|
12638
12638
|
flex-grow: 1;
|
|
12639
12639
|
margin-right: 8px;
|
|
12640
12640
|
overflow: hidden;
|
|
12641
12641
|
}
|
|
12642
|
-
.object-item .item-info .info-text .text-row[data-v-
|
|
12642
|
+
.object-item .item-info .info-text .text-row[data-v-d8f43bdd] {
|
|
12643
12643
|
margin-bottom: 4px;
|
|
12644
12644
|
overflow: hidden;
|
|
12645
12645
|
text-overflow: ellipsis;
|
|
12646
12646
|
white-space: nowrap;
|
|
12647
12647
|
}
|
|
12648
|
-
.object-item .item-info .info-text .text-row .row-label[data-v-
|
|
12648
|
+
.object-item .item-info .info-text .text-row .row-label[data-v-d8f43bdd] {
|
|
12649
12649
|
color: #76777e;
|
|
12650
12650
|
}
|
|
12651
|
-
.object-item .item-info .info-button[data-v-
|
|
12651
|
+
.object-item .item-info .info-button[data-v-d8f43bdd] {
|
|
12652
12652
|
display: flex;
|
|
12653
12653
|
flex-shrink: 0;
|
|
12654
12654
|
align-items: center;
|
|
@@ -12658,16 +12658,16 @@ svg.portrait-icon[data-v-8bdb451e] {
|
|
|
12658
12658
|
border-radius: 4px;
|
|
12659
12659
|
cursor: pointer;
|
|
12660
12660
|
}
|
|
12661
|
-
.object-item .item-info .info-button[data-v-
|
|
12661
|
+
.object-item .item-info .info-button[data-v-d8f43bdd]:hover {
|
|
12662
12662
|
background: #fff;
|
|
12663
12663
|
}
|
|
12664
|
-
.object-item .item-info .info-button:hover .gct-icon[data-v-
|
|
12664
|
+
.object-item .item-info .info-button:hover .gct-icon[data-v-d8f43bdd] {
|
|
12665
12665
|
color: #1c1e20;
|
|
12666
12666
|
}
|
|
12667
|
-
.object-item .item-info .info-button .gct-icon[data-v-
|
|
12667
|
+
.object-item .item-info .info-button .gct-icon[data-v-d8f43bdd] {
|
|
12668
12668
|
color: #a4aaaf;
|
|
12669
12669
|
}
|
|
12670
|
-
.object-item .item-button[data-v-
|
|
12670
|
+
.object-item .item-button[data-v-d8f43bdd] {
|
|
12671
12671
|
margin-top: 8px;
|
|
12672
12672
|
}
|
|
12673
12673
|
.panel-data-init[data-v-d6dda95c] {
|
|
@@ -14330,24 +14330,24 @@ svg.portrait-icon[data-v-8bdb451e] {
|
|
|
14330
14330
|
.panel-field-text-config[data-v-af8de84d] {
|
|
14331
14331
|
padding: 16px;
|
|
14332
14332
|
}
|
|
14333
|
-
.form-item.default.assoc-filter-editor.is-content-hidden[data-v-
|
|
14333
|
+
.form-item.default.assoc-filter-editor.is-content-hidden[data-v-81133a7f] .form-item__label {
|
|
14334
14334
|
margin-bottom: 0 !important;
|
|
14335
14335
|
}
|
|
14336
|
-
.assoc-filter-editor__extra[data-v-
|
|
14336
|
+
.assoc-filter-editor__extra[data-v-81133a7f] {
|
|
14337
14337
|
display: inline-flex;
|
|
14338
14338
|
align-items: center;
|
|
14339
14339
|
}
|
|
14340
|
-
.assoc-filter-editor__source[data-v-
|
|
14340
|
+
.assoc-filter-editor__source[data-v-81133a7f] {
|
|
14341
14341
|
display: flex;
|
|
14342
14342
|
flex-direction: column;
|
|
14343
14343
|
gap: 8px;
|
|
14344
14344
|
}
|
|
14345
|
-
.assoc-filter-editor__source-label[data-v-
|
|
14345
|
+
.assoc-filter-editor__source-label[data-v-81133a7f] {
|
|
14346
14346
|
color: rgba(0, 0, 0, 0.85);
|
|
14347
|
-
font-size:
|
|
14347
|
+
font-size: 12px;
|
|
14348
14348
|
line-height: 22px;
|
|
14349
14349
|
}
|
|
14350
|
-
.assoc-filter-editor__tip[data-v-
|
|
14350
|
+
.assoc-filter-editor__tip[data-v-81133a7f] {
|
|
14351
14351
|
margin-top: 8px;
|
|
14352
14352
|
color: #8c8c8c;
|
|
14353
14353
|
font-size: 12px;
|