@gct-paas/word 0.1.49 → 0.1.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -53897,21 +53897,6 @@ const getSubFieldConfig = (paramsConfig) => {
|
|
|
53897
53897
|
};
|
|
53898
53898
|
};
|
|
53899
53899
|
class MCDataUtil {
|
|
53900
|
-
static allFields = [
|
|
53901
|
-
"product_id_",
|
|
53902
|
-
"material_no_",
|
|
53903
|
-
"qty_consumed_",
|
|
53904
|
-
"qty_",
|
|
53905
|
-
"qty_required_",
|
|
53906
|
-
"routing_operation_id_",
|
|
53907
|
-
"expiration_date_"
|
|
53908
|
-
];
|
|
53909
|
-
static editMCTable(row, data) {
|
|
53910
|
-
if (!row._MCTABLE) {
|
|
53911
|
-
row._MCTABLE = {};
|
|
53912
|
-
}
|
|
53913
|
-
merge(row, { _MCTABLE: data });
|
|
53914
|
-
}
|
|
53915
53900
|
/**
|
|
53916
53901
|
* 数组转对象并付统一的值
|
|
53917
53902
|
* @static
|
|
@@ -53926,14 +53911,8 @@ class MCDataUtil {
|
|
|
53926
53911
|
}, keyVal);
|
|
53927
53912
|
}
|
|
53928
53913
|
/**
|
|
53929
|
-
*
|
|
53930
|
-
* @static
|
|
53931
|
-
* @param opts 参数
|
|
53914
|
+
* 更新字段禁用工具函数
|
|
53932
53915
|
*/
|
|
53933
|
-
static setFieldsDisabled(opts) {
|
|
53934
|
-
const { row, keys: keys2 = this.allFields, disabled = true } = opts;
|
|
53935
|
-
this.editMCTable(row, { fieldDisabled: this.arrToObj(keys2, disabled) });
|
|
53936
|
-
}
|
|
53937
53916
|
static _updateDisablement(option) {
|
|
53938
53917
|
const { dataManager, rowPath, fields, disabled } = option;
|
|
53939
53918
|
const config = { newDisabled: disabled };
|
|
@@ -53942,7 +53921,8 @@ class MCDataUtil {
|
|
|
53942
53921
|
});
|
|
53943
53922
|
}
|
|
53944
53923
|
/**
|
|
53945
|
-
*
|
|
53924
|
+
* [需求数量、已消耗数量]一直禁用
|
|
53925
|
+
* 参顶部[物料消耗表字段控制]
|
|
53946
53926
|
* @param rowPath $.f_sub[n] n 必须为数字
|
|
53947
53927
|
*/
|
|
53948
53928
|
static disableQtyFields(dataManager, rowPath) {
|
|
@@ -53950,36 +53930,33 @@ class MCDataUtil {
|
|
|
53950
53930
|
this._updateDisablement({ dataManager, rowPath, fields, disabled: true });
|
|
53951
53931
|
}
|
|
53952
53932
|
/**
|
|
53953
|
-
*
|
|
53933
|
+
* 物料类型 是否选择[查看物料]时,需要更新指定字段是否禁用
|
|
53934
|
+
* 参顶部[物料消耗表字段控制]
|
|
53954
53935
|
* @param rowPath $.f_sub[n] n 必须为数字
|
|
53955
53936
|
*/
|
|
53956
53937
|
static updateViewFieldsDisablement(option) {
|
|
53957
|
-
const fields = ["material_no_", "qty_"];
|
|
53938
|
+
const fields = ["material_no_", "qty_", "routing_operation_id_"];
|
|
53958
53939
|
this._updateDisablement({ ...option, fields });
|
|
53959
53940
|
}
|
|
53960
53941
|
/**
|
|
53961
|
-
*
|
|
53942
|
+
* 校验通过后,更新指定字段是否禁用
|
|
53943
|
+
* 参顶部[物料消耗表字段控制]
|
|
53962
53944
|
* @param rowPath $.f_sub[n] n 必须为数字
|
|
53963
53945
|
*/
|
|
53964
|
-
static
|
|
53965
|
-
const fields = ["product_id_", "material_no_", "routing_operation_id_"];
|
|
53946
|
+
static updateConfirmableFieldsDisablement(option) {
|
|
53947
|
+
const fields = ["product_id_", "material_no_", "qty_", "routing_operation_id_"];
|
|
53966
53948
|
this._updateDisablement({ ...option, fields });
|
|
53967
53949
|
}
|
|
53968
53950
|
/**
|
|
53969
53951
|
* 设置行数据的编辑状态
|
|
53970
53952
|
*/
|
|
53971
53953
|
static updateRow(option, isConfirmed) {
|
|
53972
|
-
const {
|
|
53973
|
-
row,
|
|
53974
|
-
rowIndex,
|
|
53975
|
-
dataManager,
|
|
53976
|
-
subFieldKey
|
|
53977
|
-
} = option;
|
|
53954
|
+
const { row, rowIndex, dataManager, subFieldKey } = option;
|
|
53978
53955
|
row.is_confirmed_ = isConfirmed;
|
|
53979
53956
|
const rows = dataManager.getRawData()[subFieldKey] ?? [];
|
|
53980
53957
|
rows[rowIndex] = row;
|
|
53981
53958
|
dataManager.set(subFieldKey, rows);
|
|
53982
|
-
MCDataUtil.
|
|
53959
|
+
MCDataUtil.updateConfirmableFieldsDisablement({
|
|
53983
53960
|
dataManager,
|
|
53984
53961
|
rowPath: `$.${subFieldKey}[${rowIndex}]`,
|
|
53985
53962
|
disabled: isConfirmed
|
|
@@ -54140,8 +54117,8 @@ class MaterialConsumeTableController {
|
|
|
54140
54117
|
}
|
|
54141
54118
|
/**
|
|
54142
54119
|
* 获取是否是 物料查看
|
|
54143
|
-
* @param product_id_
|
|
54144
|
-
* @returns
|
|
54120
|
+
* @param product_id_
|
|
54121
|
+
* @returns
|
|
54145
54122
|
*/
|
|
54146
54123
|
getMaterialTypeIsView(product_id_) {
|
|
54147
54124
|
if (product_id_) {
|
|
@@ -54199,7 +54176,6 @@ class MaterialConsumeTableController {
|
|
|
54199
54176
|
if (!find) {
|
|
54200
54177
|
throw new Error(
|
|
54201
54178
|
"表格数据里没有匹配的物料,请选择该物料后再扫码"
|
|
54202
|
-
/*$t('sys.edhr.mcTable.noMatchMaterial')*/
|
|
54203
54179
|
);
|
|
54204
54180
|
}
|
|
54205
54181
|
materialData = find;
|
|
@@ -54377,7 +54353,6 @@ class MaterialConsumeTableController {
|
|
|
54377
54353
|
if (this.enableSequenceLoading && !isLast) {
|
|
54378
54354
|
this.error(
|
|
54379
54355
|
"顺序投料时只能最后一条数据开启编辑状态"
|
|
54380
|
-
/*$t('sys.edhr.mcTable.onlyLastRowCanEdit')*/
|
|
54381
54356
|
);
|
|
54382
54357
|
return;
|
|
54383
54358
|
}
|
|
@@ -54415,6 +54390,9 @@ class MaterialConsumeTableController {
|
|
|
54415
54390
|
}
|
|
54416
54391
|
return value;
|
|
54417
54392
|
}
|
|
54393
|
+
/**
|
|
54394
|
+
* 处理[物料消耗表]下拉字段变更
|
|
54395
|
+
*/
|
|
54418
54396
|
handleSelectChange({
|
|
54419
54397
|
changedData,
|
|
54420
54398
|
selectedOption,
|
|
@@ -54547,9 +54525,9 @@ class FormTmplBomController {
|
|
|
54547
54525
|
/**
|
|
54548
54526
|
* 根据字段key获取子表控制器
|
|
54549
54527
|
*/
|
|
54550
|
-
|
|
54551
|
-
|
|
54552
|
-
|
|
54528
|
+
findTableControllerByField(tableKey) {
|
|
54529
|
+
return this.tableControllers[tableKey];
|
|
54530
|
+
}
|
|
54553
54531
|
// 方法废弃,word 里改在初始化时记录到 paramsConfig
|
|
54554
54532
|
/**
|
|
54555
54533
|
* 处理字段组件
|
|
@@ -103583,10 +103561,25 @@ async function initializeDocumentEngine(props, payload, result) {
|
|
|
103583
103561
|
MCDataUtil.disableQtyFields(doc.dataManager, `${table_key_}[${index2}]`);
|
|
103584
103562
|
});
|
|
103585
103563
|
rows.forEach((row, rowIndex) => {
|
|
103564
|
+
const rowPath = `${table_key_}[${rowIndex}]`;
|
|
103565
|
+
const tableController = tmplBomC?.findTableControllerByField(table_key_);
|
|
103566
|
+
if (row.product_id_) {
|
|
103567
|
+
const versionId = row.product_id_.split(":").pop();
|
|
103568
|
+
if (versionId) {
|
|
103569
|
+
subConfig[`${rowPath}.material_no_`] = {
|
|
103570
|
+
"product_id_.versionIn": [versionId]
|
|
103571
|
+
};
|
|
103572
|
+
}
|
|
103573
|
+
}
|
|
103574
|
+
MCDataUtil.updateViewFieldsDisablement({
|
|
103575
|
+
dataManager: doc.dataManager,
|
|
103576
|
+
rowPath,
|
|
103577
|
+
disabled: !!tableController?.getMaterialTypeIsView(row.product_id_)
|
|
103578
|
+
});
|
|
103586
103579
|
if (row.is_confirmed_) {
|
|
103587
|
-
MCDataUtil.
|
|
103580
|
+
MCDataUtil.updateConfirmableFieldsDisablement({
|
|
103588
103581
|
dataManager: doc.dataManager,
|
|
103589
|
-
rowPath
|
|
103582
|
+
rowPath,
|
|
103590
103583
|
disabled: true
|
|
103591
103584
|
});
|
|
103592
103585
|
}
|
|
@@ -130146,7 +130139,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
130146
130139
|
renderSlot(_ctx.$slots, "rdo_version_render", normalizeProps(guardReactiveProps({ record, column, rowIndex })), void 0, true)
|
|
130147
130140
|
]),
|
|
130148
130141
|
empty: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
130149
|
-
createElementVNode("div", { class: "vxe-grid-empty" }, [
|
|
130142
|
+
createElementVNode("div", { class: "vxe-grid-empty-word" }, [
|
|
130150
130143
|
createElementVNode("img", {
|
|
130151
130144
|
src: _imports_0,
|
|
130152
130145
|
alt: ""
|
|
@@ -130160,7 +130153,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
130160
130153
|
};
|
|
130161
130154
|
}
|
|
130162
130155
|
});
|
|
130163
|
-
const BaseVxeTable = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-
|
|
130156
|
+
const BaseVxeTable = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-8ae65aef"]]);
|
|
130164
130157
|
const DEVICE_TYPE_MODEL_KEY = "em_device_type";
|
|
130165
130158
|
const ENTITY_CATEGORY = "entity";
|
|
130166
130159
|
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
package/dist/runtime/canvas/table/render/material-consume/material-consume-table-controller.d.ts
CHANGED
|
@@ -18,9 +18,14 @@ export interface UpdateRowOption {
|
|
|
18
18
|
dataManager: DataManager;
|
|
19
19
|
subFieldKey: string;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* 物料消耗表字段控制 v2026.6.15
|
|
23
|
+
* - [需求数量、已消耗数量] 始终只读
|
|
24
|
+
* - [有效期、唯一标识、自定义字段] 始终可填(不做控制)
|
|
25
|
+
* - 选择的物料类型是[查看物料]时 [批次、上料数量、工序] 只读
|
|
26
|
+
* - 单行校验通过后(包括暂存后再次编辑)[物料、批次、上料数量、工序] 只读
|
|
27
|
+
*/
|
|
21
28
|
export declare class MCDataUtil {
|
|
22
|
-
static allFields: Array<keyof IMaterialConsumeData>;
|
|
23
|
-
static editMCTable(row: IMaterialConsumeData, data: IMaterialConsumeData['_MCTABLE']): void;
|
|
24
29
|
/**
|
|
25
30
|
* 数组转对象并付统一的值
|
|
26
31
|
* @static
|
|
@@ -30,26 +35,18 @@ export declare class MCDataUtil {
|
|
|
30
35
|
*/
|
|
31
36
|
static arrToObj(arr: string[], keyVal?: any): any;
|
|
32
37
|
/**
|
|
33
|
-
*
|
|
34
|
-
|
|
35
|
-
* @param opts 参数
|
|
36
|
-
*/
|
|
37
|
-
static setFieldsDisabled(opts: {
|
|
38
|
-
/** 数据 */
|
|
39
|
-
row: IMaterialConsumeData;
|
|
40
|
-
/** 属性key集合(不给则默认全部) */
|
|
41
|
-
keys?: Array<keyof IMaterialConsumeData>;
|
|
42
|
-
/** 设置的值(不给则true) */
|
|
43
|
-
disabled?: boolean;
|
|
44
|
-
}): void;
|
|
38
|
+
* 更新字段禁用工具函数
|
|
39
|
+
*/
|
|
45
40
|
private static _updateDisablement;
|
|
46
41
|
/**
|
|
47
|
-
*
|
|
42
|
+
* [需求数量、已消耗数量]一直禁用
|
|
43
|
+
* 参顶部[物料消耗表字段控制]
|
|
48
44
|
* @param rowPath $.f_sub[n] n 必须为数字
|
|
49
45
|
*/
|
|
50
46
|
static disableQtyFields(dataManager: DataManager, rowPath: string): void;
|
|
51
47
|
/**
|
|
52
|
-
*
|
|
48
|
+
* 物料类型 是否选择[查看物料]时,需要更新指定字段是否禁用
|
|
49
|
+
* 参顶部[物料消耗表字段控制]
|
|
53
50
|
* @param rowPath $.f_sub[n] n 必须为数字
|
|
54
51
|
*/
|
|
55
52
|
static updateViewFieldsDisablement(option: {
|
|
@@ -58,10 +55,11 @@ export declare class MCDataUtil {
|
|
|
58
55
|
disabled: boolean;
|
|
59
56
|
}): void;
|
|
60
57
|
/**
|
|
61
|
-
*
|
|
58
|
+
* 校验通过后,更新指定字段是否禁用
|
|
59
|
+
* 参顶部[物料消耗表字段控制]
|
|
62
60
|
* @param rowPath $.f_sub[n] n 必须为数字
|
|
63
61
|
*/
|
|
64
|
-
static
|
|
62
|
+
static updateConfirmableFieldsDisablement(option: {
|
|
65
63
|
dataManager: DataManager;
|
|
66
64
|
rowPath: string;
|
|
67
65
|
disabled: boolean;
|
|
@@ -232,6 +230,9 @@ export declare class MaterialConsumeTableController {
|
|
|
232
230
|
*/
|
|
233
231
|
setDefaultValue(row: IMaterialConsumeData): void;
|
|
234
232
|
getDefaultValue(row: IMaterialConsumeData): any;
|
|
233
|
+
/**
|
|
234
|
+
* 处理[物料消耗表]下拉字段变更
|
|
235
|
+
*/
|
|
235
236
|
handleSelectChange({ changedData, selectedOption, doc, parsed, dataIndex, }: {
|
|
236
237
|
changedData: any;
|
|
237
238
|
selectedOption: any;
|
package/dist/word.css
CHANGED
|
@@ -12267,7 +12267,7 @@ svg.portrait-icon[data-v-8bdb451e] {
|
|
|
12267
12267
|
width: 100%;
|
|
12268
12268
|
height: 248px;
|
|
12269
12269
|
}
|
|
12270
|
-
.base-vxe-table-wrapper[data-v-
|
|
12270
|
+
.base-vxe-table-wrapper[data-v-8ae65aef] {
|
|
12271
12271
|
display: flex;
|
|
12272
12272
|
flex-direction: column;
|
|
12273
12273
|
flex: 1;
|
|
@@ -12275,9 +12275,21 @@ svg.portrait-icon[data-v-8bdb451e] {
|
|
|
12275
12275
|
width: 800px;
|
|
12276
12276
|
height: 360px;
|
|
12277
12277
|
}
|
|
12278
|
-
.base-vxe-table-wrapper[data-v-
|
|
12278
|
+
.base-vxe-table-wrapper[data-v-8ae65aef] .dropdown-vxe-table .row--active {
|
|
12279
12279
|
background: #e6f7ff;
|
|
12280
12280
|
}
|
|
12281
|
+
.base-vxe-table-wrapper .vxe-grid-empty-word[data-v-8ae65aef] {
|
|
12282
|
+
display: flex;
|
|
12283
|
+
flex-direction: column;
|
|
12284
|
+
align-items: center;
|
|
12285
|
+
justify-content: center;
|
|
12286
|
+
color: rgba(0, 0, 0, 0.45);
|
|
12287
|
+
margin: 32px 0;
|
|
12288
|
+
}
|
|
12289
|
+
.base-vxe-table-wrapper .vxe-grid-empty-word > img[data-v-8ae65aef] {
|
|
12290
|
+
width: 60px;
|
|
12291
|
+
margin-bottom: 12px;
|
|
12292
|
+
}
|
|
12281
12293
|
.pagination-container[data-v-7a947e96] {
|
|
12282
12294
|
position: relative;
|
|
12283
12295
|
display: flex;
|