@gct-paas/word 0.1.56 → 0.1.57
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 +96 -18
- package/dist/runtime/canvas/table/render/material-consume/bom-validator.d.ts +11 -3
- package/dist/runtime/canvas/table/render/material-consume/material-consume-table-controller.d.ts +5 -2
- package/dist/runtime/canvas/table/render/material-consume/service.d.ts +2 -0
- package/dist/runtime/canvas/table/render/material-consume/tmpl-bom-controller.d.ts +3 -1
- package/dist/types/material.type.d.ts +9 -0
- package/dist/word.css +6 -6
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -105944,6 +105944,11 @@ function deduplicateFields(data) {
|
|
|
105944
105944
|
});
|
|
105945
105945
|
return [...map.values()];
|
|
105946
105946
|
}
|
|
105947
|
+
var MaterialConsumptionPatternEnum = /* @__PURE__ */ ((MaterialConsumptionPatternEnum2) => {
|
|
105948
|
+
MaterialConsumptionPatternEnum2["RECORD"] = "record";
|
|
105949
|
+
MaterialConsumptionPatternEnum2["BOM"] = "bom";
|
|
105950
|
+
return MaterialConsumptionPatternEnum2;
|
|
105951
|
+
})(MaterialConsumptionPatternEnum || {});
|
|
105947
105952
|
const postApi = api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey;
|
|
105948
105953
|
async function materialCheck(params) {
|
|
105949
105954
|
const res = await postApi(
|
|
@@ -106013,6 +106018,18 @@ async function judgeUnique(opts) {
|
|
|
106013
106018
|
);
|
|
106014
106019
|
return res;
|
|
106015
106020
|
}
|
|
106021
|
+
async function queryIsBomGranted() {
|
|
106022
|
+
try {
|
|
106023
|
+
const res = await api.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey({
|
|
106024
|
+
modelKey: "em_product_bom",
|
|
106025
|
+
bsKey: "biz_bom_granted",
|
|
106026
|
+
modelCategory: "entity"
|
|
106027
|
+
}, {});
|
|
106028
|
+
return res ?? false;
|
|
106029
|
+
} catch (error) {
|
|
106030
|
+
return false;
|
|
106031
|
+
}
|
|
106032
|
+
}
|
|
106016
106033
|
function findLastIndex(array4, predicate) {
|
|
106017
106034
|
if (!Array.isArray(array4)) {
|
|
106018
106035
|
throw new TypeError("Expected an array");
|
|
@@ -106028,12 +106045,13 @@ function findLastIndex(array4, predicate) {
|
|
|
106028
106045
|
return -1;
|
|
106029
106046
|
}
|
|
106030
106047
|
class BomEntryValidator {
|
|
106031
|
-
constructor(bomEntry, enableSequenceLoading, materialNoNum, historyData, mainMaterialNo) {
|
|
106048
|
+
constructor(bomEntry, enableSequenceLoading, materialNoNum, historyData, mainMaterialNo, mcPattern) {
|
|
106032
106049
|
this.bomEntry = bomEntry;
|
|
106033
106050
|
this.enableSequenceLoading = enableSequenceLoading;
|
|
106034
106051
|
this.materialNoNum = materialNoNum;
|
|
106035
106052
|
this.historyData = historyData;
|
|
106036
106053
|
this.mainMaterialNo = mainMaterialNo;
|
|
106054
|
+
this.mcPattern = mcPattern;
|
|
106037
106055
|
this.productIds.push(this.bomEntry.product_id_);
|
|
106038
106056
|
this.productCodes[this.bomEntry.product_id_] = this.bomEntry.product_code_;
|
|
106039
106057
|
if (this.bomEntry.substitute_material_enabled_ && this.bomEntry.substitute_material_entries_) {
|
|
@@ -106243,14 +106261,22 @@ class BomEntryValidator {
|
|
|
106243
106261
|
}
|
|
106244
106262
|
}
|
|
106245
106263
|
class BomEntriesValidator {
|
|
106246
|
-
constructor(entries, enableSequenceLoading, materialNoNum, historyData, mainMaterialNo) {
|
|
106264
|
+
constructor(entries, enableSequenceLoading, materialNoNum, historyData, mainMaterialNo, mcPattern) {
|
|
106247
106265
|
this.entries = entries;
|
|
106248
106266
|
this.enableSequenceLoading = enableSequenceLoading;
|
|
106249
106267
|
this.materialNoNum = materialNoNum;
|
|
106250
106268
|
this.historyData = historyData;
|
|
106251
106269
|
this.mainMaterialNo = mainMaterialNo;
|
|
106270
|
+
this.mcPattern = mcPattern;
|
|
106252
106271
|
this.bomEntryValidators = entries.map(
|
|
106253
|
-
(i) => new BomEntryValidator(
|
|
106272
|
+
(i) => new BomEntryValidator(
|
|
106273
|
+
i,
|
|
106274
|
+
enableSequenceLoading,
|
|
106275
|
+
materialNoNum,
|
|
106276
|
+
historyData,
|
|
106277
|
+
mainMaterialNo,
|
|
106278
|
+
mcPattern
|
|
106279
|
+
)
|
|
106254
106280
|
);
|
|
106255
106281
|
}
|
|
106256
106282
|
bomEntryValidators;
|
|
@@ -106413,6 +106439,9 @@ class BomEntriesValidator {
|
|
|
106413
106439
|
/*$t('sys.edhr.mcTable.noEditingRow')*/
|
|
106414
106440
|
);
|
|
106415
106441
|
}
|
|
106442
|
+
if (this.mcPattern === MaterialConsumptionPatternEnum.RECORD) {
|
|
106443
|
+
return;
|
|
106444
|
+
}
|
|
106416
106445
|
this.validateInBom(editRow);
|
|
106417
106446
|
await this.validateSequenceLoading(editRow, arr);
|
|
106418
106447
|
this.validateSubstitute(arr);
|
|
@@ -106425,7 +106454,9 @@ class BomEntriesValidator {
|
|
|
106425
106454
|
* @return {*}
|
|
106426
106455
|
*/
|
|
106427
106456
|
mergeRowInArr(row, arr) {
|
|
106428
|
-
this.
|
|
106457
|
+
if (this.mcPattern !== MaterialConsumptionPatternEnum.RECORD) {
|
|
106458
|
+
this.validateInBom(row);
|
|
106459
|
+
}
|
|
106429
106460
|
const newArr = cloneDeep(arr).filter((i) => i.product_id_);
|
|
106430
106461
|
const util = this.findUtilByProductId(row.product_id_);
|
|
106431
106462
|
const sameIndex = findLastIndex(newArr, (i) => {
|
|
@@ -106558,7 +106589,8 @@ class MaterialConsumeTableController {
|
|
|
106558
106589
|
this.enableSequenceLoading,
|
|
106559
106590
|
this.materialNoNum,
|
|
106560
106591
|
this.tmplBomController.historyData,
|
|
106561
|
-
this.tmplBomController.materialNo
|
|
106592
|
+
this.tmplBomController.materialNo,
|
|
106593
|
+
this.mcPattern
|
|
106562
106594
|
);
|
|
106563
106595
|
}
|
|
106564
106596
|
/**
|
|
@@ -106580,6 +106612,10 @@ class MaterialConsumeTableController {
|
|
|
106580
106612
|
get materialNoNum() {
|
|
106581
106613
|
return this.tmplBomController.materialNoNum;
|
|
106582
106614
|
}
|
|
106615
|
+
/** 物料消耗模式(自身没有配置的话取环境的默认值) */
|
|
106616
|
+
get mcPattern() {
|
|
106617
|
+
return this.tmplBom.material_consumption_pattern_ ?? this.tmplBomController.defaultMCPattern;
|
|
106618
|
+
}
|
|
106583
106619
|
/**
|
|
106584
106620
|
* 解析规则数据对象
|
|
106585
106621
|
*/
|
|
@@ -106715,6 +106751,7 @@ class MaterialConsumeTableController {
|
|
|
106715
106751
|
if (!this.isFirstBlankRow() && this.hasEditingRow()) {
|
|
106716
106752
|
return;
|
|
106717
106753
|
}
|
|
106754
|
+
const isRecordPattern = this.mcPattern === MaterialConsumptionPatternEnum.RECORD;
|
|
106718
106755
|
const data = getParseRuleValue(str, this.scanRules);
|
|
106719
106756
|
console.log("parseScanStr", data);
|
|
106720
106757
|
const arr = await materialCheck({
|
|
@@ -106722,7 +106759,8 @@ class MaterialConsumeTableController {
|
|
|
106722
106759
|
production_identification_name_: data.lot,
|
|
106723
106760
|
qty_: data.qty,
|
|
106724
106761
|
validate_: data.expiration,
|
|
106725
|
-
|
|
106762
|
+
// 记录模式传null,后台就不校验了
|
|
106763
|
+
bom_entries_bom: isRecordPattern ? null : this.actualBomEntries,
|
|
106726
106764
|
operation_id_: this.tmplBomController.operationId
|
|
106727
106765
|
});
|
|
106728
106766
|
if (!arr) {
|
|
@@ -106832,13 +106870,27 @@ class MaterialConsumeTableController {
|
|
|
106832
106870
|
this.tableDataRef = opts.tableDataRef;
|
|
106833
106871
|
this.subTableInfo = opts.subTableInfo;
|
|
106834
106872
|
}
|
|
106873
|
+
/** 校验有效期 */
|
|
106874
|
+
validateExpiration(row) {
|
|
106875
|
+
if (row.expiration_date_) {
|
|
106876
|
+
if (dayjs(row.expiration_date_).isBefore(dayjs())) {
|
|
106877
|
+
throw new Error("有效期不能早于当前日期");
|
|
106878
|
+
}
|
|
106879
|
+
}
|
|
106880
|
+
}
|
|
106835
106881
|
/**
|
|
106836
106882
|
* 校验数据,并退出编辑
|
|
106837
|
-
* @param row
|
|
106838
106883
|
*/
|
|
106839
106884
|
async confirm(option, subModelKey) {
|
|
106840
106885
|
try {
|
|
106841
|
-
|
|
106886
|
+
if (this.mcPattern === MaterialConsumptionPatternEnum.RECORD) {
|
|
106887
|
+
const { dataManager, rowIndex, subFieldKey } = option;
|
|
106888
|
+
const rows = dataManager.getRawData()[subFieldKey] ?? [];
|
|
106889
|
+
const row = rows[rowIndex];
|
|
106890
|
+
this.validateExpiration(row);
|
|
106891
|
+
} else {
|
|
106892
|
+
await this.bomEntriesValidator.validate(this.actualTableData);
|
|
106893
|
+
}
|
|
106842
106894
|
const isUnique = await judgeUnique({
|
|
106843
106895
|
modelKey: subModelKey,
|
|
106844
106896
|
data: this.actualTableData
|
|
@@ -107018,6 +107070,8 @@ class FormTmplBomController {
|
|
|
107018
107070
|
tableControllers = {};
|
|
107019
107071
|
/** 字段key和tableKey的映射 */
|
|
107020
107072
|
field2TableMap = {};
|
|
107073
|
+
/** 默认物料消耗模式 */
|
|
107074
|
+
defaultMCPattern = MaterialConsumptionPatternEnum.RECORD;
|
|
107021
107075
|
constructor() {
|
|
107022
107076
|
}
|
|
107023
107077
|
/**
|
|
@@ -107062,7 +107116,6 @@ class FormTmplBomController {
|
|
|
107062
107116
|
* @readonly
|
|
107063
107117
|
*/
|
|
107064
107118
|
get enableSequenceLoading() {
|
|
107065
|
-
console.log("enableSequenceLoading", this.formInstBom?.sequenceEntries);
|
|
107066
107119
|
return !!this.formInstBom?.sequenceEntries?.[0]?.enabled_;
|
|
107067
107120
|
}
|
|
107068
107121
|
/**
|
|
@@ -107079,6 +107132,8 @@ class FormTmplBomController {
|
|
|
107079
107132
|
production_identification_id_: this.formInstBom.productionIdentificationId,
|
|
107080
107133
|
routing_operation_id_: this.operationId
|
|
107081
107134
|
});
|
|
107135
|
+
const isGranted = await queryIsBomGranted();
|
|
107136
|
+
this.defaultMCPattern = isGranted ? MaterialConsumptionPatternEnum.BOM : MaterialConsumptionPatternEnum.RECORD;
|
|
107082
107137
|
this.tableControllers = {};
|
|
107083
107138
|
this.tmplBomList.forEach((cur) => {
|
|
107084
107139
|
const controller = new MaterialConsumeTableController(this, cur);
|
|
@@ -126637,6 +126692,10 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
|
|
|
126637
126692
|
active: {}
|
|
126638
126693
|
},
|
|
126639
126694
|
setup(__props) {
|
|
126695
|
+
const patternOptions = [
|
|
126696
|
+
{ label: "BOM 模式", value: MaterialConsumptionPatternEnum.BOM },
|
|
126697
|
+
{ label: "记录模式", value: MaterialConsumptionPatternEnum.RECORD }
|
|
126698
|
+
];
|
|
126640
126699
|
const props = __props;
|
|
126641
126700
|
const regionRef = computed(
|
|
126642
126701
|
() => props.widget.findRegionById(props.active.context.regionId)
|
|
@@ -126652,6 +126711,12 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
|
|
|
126652
126711
|
active: props.active,
|
|
126653
126712
|
regionType: "material-consume-table"
|
|
126654
126713
|
});
|
|
126714
|
+
onMounted(async () => {
|
|
126715
|
+
const isGranted = await queryIsBomGranted();
|
|
126716
|
+
if (isGranted && regionProps.value && !regionProps.value.material_consumption_pattern_) {
|
|
126717
|
+
regionProps.value.material_consumption_pattern_ = MaterialConsumptionPatternEnum.BOM;
|
|
126718
|
+
}
|
|
126719
|
+
});
|
|
126655
126720
|
return (_ctx, _cache) => {
|
|
126656
126721
|
return openBlock(), createElementBlock("div", _hoisted_1$1c, [
|
|
126657
126722
|
createVNode(SubTableBasicInfo, {
|
|
@@ -126681,37 +126746,50 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
|
|
|
126681
126746
|
]),
|
|
126682
126747
|
_: 1
|
|
126683
126748
|
}),
|
|
126684
|
-
createVNode(unref(GctFormItem),
|
|
126685
|
-
|
|
126749
|
+
createVNode(unref(GctFormItem), {
|
|
126750
|
+
inline: false,
|
|
126751
|
+
label: "物料消耗模式"
|
|
126752
|
+
}, {
|
|
126753
|
+
default: withCtx(() => [
|
|
126754
|
+
createVNode(unref(GctSelect), {
|
|
126755
|
+
modelValue: unref(regionProps).material_consumption_pattern_,
|
|
126756
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(regionProps).material_consumption_pattern_ = $event),
|
|
126757
|
+
options: patternOptions
|
|
126758
|
+
}, null, 8, ["modelValue"])
|
|
126759
|
+
]),
|
|
126760
|
+
_: 1
|
|
126761
|
+
}),
|
|
126762
|
+
unref(regionProps).material_consumption_pattern_ === unref(MaterialConsumptionPatternEnum).BOM ? (openBlock(), createBlock(unref(GctFormItem), { key: 0 }, {
|
|
126763
|
+
label: withCtx(() => [..._cache[5] || (_cache[5] = [
|
|
126686
126764
|
createElementVNode("div", { class: "form-custom-label" }, " 人为指定物料 ", -1)
|
|
126687
126765
|
])]),
|
|
126688
126766
|
default: withCtx(() => [
|
|
126689
126767
|
createElementVNode("div", _hoisted_3$v, [
|
|
126690
126768
|
createVNode(unref(GctSwitch), {
|
|
126691
126769
|
modelValue: unref(regionProps).personal_bom_enabled_,
|
|
126692
|
-
"onUpdate:modelValue": _cache[
|
|
126770
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(regionProps).personal_bom_enabled_ = $event),
|
|
126693
126771
|
size: "small"
|
|
126694
126772
|
}, null, 8, ["modelValue"])
|
|
126695
126773
|
])
|
|
126696
126774
|
]),
|
|
126697
126775
|
_: 1
|
|
126698
|
-
}),
|
|
126699
|
-
unref(regionProps).personal_bom_enabled_ ? (openBlock(), createElementBlock(Fragment, { key:
|
|
126776
|
+
})) : createCommentVNode("", true),
|
|
126777
|
+
unref(regionProps).personal_bom_enabled_ ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
126700
126778
|
createElementVNode("div", _hoisted_4$o, [
|
|
126701
126779
|
createVNode(BomEntryEditor, {
|
|
126702
126780
|
list: unref(regionProps).entries_,
|
|
126703
|
-
"onUpdate:list": _cache[
|
|
126781
|
+
"onUpdate:list": _cache[3] || (_cache[3] = ($event) => unref(regionProps).entries_ = $event)
|
|
126704
126782
|
}, null, 8, ["list"])
|
|
126705
126783
|
]),
|
|
126706
126784
|
createVNode(unref(GctFormItem), null, {
|
|
126707
|
-
label: withCtx(() => [..._cache[
|
|
126785
|
+
label: withCtx(() => [..._cache[6] || (_cache[6] = [
|
|
126708
126786
|
createElementVNode("div", { class: "form-custom-label" }, " 按顺序投料 ", -1)
|
|
126709
126787
|
])]),
|
|
126710
126788
|
default: withCtx(() => [
|
|
126711
126789
|
createElementVNode("div", _hoisted_5$i, [
|
|
126712
126790
|
createVNode(unref(GctSwitch), {
|
|
126713
126791
|
modelValue: unref(regionProps).sequence_loading_enabled_,
|
|
126714
|
-
"onUpdate:modelValue": _cache[
|
|
126792
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(regionProps).sequence_loading_enabled_ = $event),
|
|
126715
126793
|
size: "small"
|
|
126716
126794
|
}, null, 8, ["modelValue"])
|
|
126717
126795
|
])
|
|
@@ -126727,7 +126805,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
|
|
|
126727
126805
|
};
|
|
126728
126806
|
}
|
|
126729
126807
|
});
|
|
126730
|
-
const MaterialConsumeTablePanel = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["__scopeId", "data-v-
|
|
126808
|
+
const MaterialConsumeTablePanel = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["__scopeId", "data-v-0dd8e3b3"]]);
|
|
126731
126809
|
const schema$9 = createTablePanelSchema("material-consume-table.basic", MaterialConsumeTablePanel);
|
|
126732
126810
|
const schema$8 = createTablePanelSchema("fixed-table.basic", BoundedSubTablePanel);
|
|
126733
126811
|
const _sfc_main$1u = /* @__PURE__ */ defineComponent({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBomEntry, IMaterialConsumeData } from '../../../../../types/material.type';
|
|
1
|
+
import { IBomEntry, IMaterialConsumeData, MaterialConsumptionPatternEnum } from '../../../../../types/material.type';
|
|
2
2
|
export declare class BomEntryValidator {
|
|
3
3
|
bomEntry: IBomEntry;
|
|
4
4
|
/** 是否启用顺序投料 */
|
|
@@ -9,6 +9,8 @@ export declare class BomEntryValidator {
|
|
|
9
9
|
historyData: IMaterialConsumeData[];
|
|
10
10
|
/** 表单实例的批次号 */
|
|
11
11
|
mainMaterialNo: string;
|
|
12
|
+
/** 物料消耗模式 */
|
|
13
|
+
mcPattern: MaterialConsumptionPatternEnum;
|
|
12
14
|
/** 该明细使用到的产品的id集合 */
|
|
13
15
|
productIds: string[];
|
|
14
16
|
/** 物料和code的映射 */
|
|
@@ -27,7 +29,9 @@ export declare class BomEntryValidator {
|
|
|
27
29
|
/** 历史填报数据 */
|
|
28
30
|
historyData: IMaterialConsumeData[],
|
|
29
31
|
/** 表单实例的批次号 */
|
|
30
|
-
mainMaterialNo: string
|
|
32
|
+
mainMaterialNo: string,
|
|
33
|
+
/** 物料消耗模式 */
|
|
34
|
+
mcPattern: MaterialConsumptionPatternEnum);
|
|
31
35
|
/**
|
|
32
36
|
* 翻译物料的code
|
|
33
37
|
* @param productId
|
|
@@ -85,6 +89,8 @@ export declare class BomEntriesValidator {
|
|
|
85
89
|
historyData: IMaterialConsumeData[];
|
|
86
90
|
/** 表单实例的批次号 */
|
|
87
91
|
mainMaterialNo: string;
|
|
92
|
+
/** 物料消耗模式 */
|
|
93
|
+
mcPattern: MaterialConsumptionPatternEnum;
|
|
88
94
|
bomEntryValidators: BomEntryValidator[];
|
|
89
95
|
constructor(entries: IBomEntry[],
|
|
90
96
|
/** 是否启用顺序投料 */
|
|
@@ -94,7 +100,9 @@ export declare class BomEntriesValidator {
|
|
|
94
100
|
/** 历史填报数据 */
|
|
95
101
|
historyData: IMaterialConsumeData[],
|
|
96
102
|
/** 表单实例的批次号 */
|
|
97
|
-
mainMaterialNo: string
|
|
103
|
+
mainMaterialNo: string,
|
|
104
|
+
/** 物料消耗模式 */
|
|
105
|
+
mcPattern: MaterialConsumptionPatternEnum);
|
|
98
106
|
/**
|
|
99
107
|
* 翻译物料的code
|
|
100
108
|
* @param productId
|
package/dist/runtime/canvas/table/render/material-consume/material-consume-table-controller.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IFormTmplBom, IMaterialConsumeData, ParseRuleProps } from '../../../../../types/material.type';
|
|
1
|
+
import { MaterialConsumptionPatternEnum, IFormTmplBom, IMaterialConsumeData, ParseRuleProps } from '../../../../../types/material.type';
|
|
2
2
|
import { FormTmplBomController } from './tmpl-bom-controller';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
4
|
import { BomEntriesValidator } from './bom-validator';
|
|
@@ -85,6 +85,8 @@ export declare class MaterialConsumeTableController {
|
|
|
85
85
|
/** 表单模型控制器 */
|
|
86
86
|
/** 批次数量 */
|
|
87
87
|
get materialNoNum(): number;
|
|
88
|
+
/** 物料消耗模式(自身没有配置的话取环境的默认值) */
|
|
89
|
+
get mcPattern(): MaterialConsumptionPatternEnum;
|
|
88
90
|
/**
|
|
89
91
|
* 解析规则数据对象
|
|
90
92
|
*/
|
|
@@ -191,9 +193,10 @@ export declare class MaterialConsumeTableController {
|
|
|
191
193
|
tableDataRef: Ref<any>;
|
|
192
194
|
subTableInfo: ISubTableInfo;
|
|
193
195
|
}): Promise<void>;
|
|
196
|
+
/** 校验有效期 */
|
|
197
|
+
validateExpiration(row: IMaterialConsumeData): void;
|
|
194
198
|
/**
|
|
195
199
|
* 校验数据,并退出编辑
|
|
196
|
-
* @param row
|
|
197
200
|
*/
|
|
198
201
|
confirm(option: UpdateRowOption, subModelKey: string): Promise<void>;
|
|
199
202
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MaterialConsumeTableController } from './material-consume-table-controller';
|
|
2
|
-
import { IBomEntry, IFormTmplBom, IMaterialConsumeData } from '../../../../../types/material.type';
|
|
2
|
+
import { IBomEntry, IFormTmplBom, IMaterialConsumeData, MaterialConsumptionPatternEnum } from '../../../../../types/material.type';
|
|
3
3
|
interface FormInstBomResponse {
|
|
4
4
|
bomEntries?: any[];
|
|
5
5
|
formTmplBomList?: IFormTmplBom[];
|
|
@@ -25,6 +25,8 @@ export declare class FormTmplBomController {
|
|
|
25
25
|
tableControllers: Record<string, MaterialConsumeTableController>;
|
|
26
26
|
/** 字段key和tableKey的映射 */
|
|
27
27
|
field2TableMap: Record<string, string>;
|
|
28
|
+
/** 默认物料消耗模式 */
|
|
29
|
+
defaultMCPattern: MaterialConsumptionPatternEnum;
|
|
28
30
|
constructor();
|
|
29
31
|
/**
|
|
30
32
|
* 判断使用场景,不符合的报错提示
|
|
@@ -78,6 +78,8 @@ export interface IFormTmplBom {
|
|
|
78
78
|
entries_: IBomEntry[];
|
|
79
79
|
/** 删除标记 */
|
|
80
80
|
deleted_?: boolean;
|
|
81
|
+
/** 物料消耗模式, record:记录模式,bom: BOM模式 */
|
|
82
|
+
material_consumption_pattern_?: MaterialConsumptionPatternEnum;
|
|
81
83
|
}
|
|
82
84
|
/**
|
|
83
85
|
* 物料消耗表子模型的数据结构
|
|
@@ -130,3 +132,10 @@ export interface ParseRuleProps {
|
|
|
130
132
|
formFields?: string[];
|
|
131
133
|
}>;
|
|
132
134
|
}
|
|
135
|
+
/** 物料消耗模式 */
|
|
136
|
+
export declare enum MaterialConsumptionPatternEnum {
|
|
137
|
+
/** 记录模式 */
|
|
138
|
+
RECORD = "record",
|
|
139
|
+
/** bom模式 */
|
|
140
|
+
BOM = "bom"
|
|
141
|
+
}
|
package/dist/word.css
CHANGED
|
@@ -10539,22 +10539,22 @@ svg.portrait-icon[data-v-8bdb451e] {
|
|
|
10539
10539
|
.bom-entry-item .iconfont.btn-item[data-v-f070d621] {
|
|
10540
10540
|
margin-right: 8px;
|
|
10541
10541
|
}
|
|
10542
|
-
.panel-material-consume-table[data-v-
|
|
10542
|
+
.panel-material-consume-table[data-v-0dd8e3b3] {
|
|
10543
10543
|
position: relative;
|
|
10544
10544
|
}
|
|
10545
|
-
.panel-material-consume-table .container[data-v-
|
|
10545
|
+
.panel-material-consume-table .container[data-v-0dd8e3b3] {
|
|
10546
10546
|
padding: 16px;
|
|
10547
10547
|
}
|
|
10548
|
-
.panel-material-consume-table .form-custom-label[data-v-
|
|
10548
|
+
.panel-material-consume-table .form-custom-label[data-v-0dd8e3b3] {
|
|
10549
10549
|
display: inline-flex;
|
|
10550
10550
|
align-items: center;
|
|
10551
10551
|
gap: 4px;
|
|
10552
10552
|
}
|
|
10553
|
-
.panel-material-consume-table .form-custom-label .icon[data-v-
|
|
10553
|
+
.panel-material-consume-table .form-custom-label .icon[data-v-0dd8e3b3] {
|
|
10554
10554
|
cursor: pointer;
|
|
10555
10555
|
vertical-align: text-top;
|
|
10556
10556
|
}
|
|
10557
|
-
.panel-material-consume-table .content[data-v-
|
|
10557
|
+
.panel-material-consume-table .content[data-v-0dd8e3b3] {
|
|
10558
10558
|
display: flex;
|
|
10559
10559
|
align-items: center;
|
|
10560
10560
|
justify-content: flex-end;
|
|
@@ -10562,7 +10562,7 @@ svg.portrait-icon[data-v-8bdb451e] {
|
|
|
10562
10562
|
line-height: 22px;
|
|
10563
10563
|
width: 100%;
|
|
10564
10564
|
}
|
|
10565
|
-
.panel-material-consume-table .entries-container[data-v-
|
|
10565
|
+
.panel-material-consume-table .entries-container[data-v-0dd8e3b3] {
|
|
10566
10566
|
padding: 6px 0;
|
|
10567
10567
|
}
|
|
10568
10568
|
.add-ds-btn[data-v-444003bd] {
|