@gct-paas/word 0.2.25-beta.0 → 0.2.27-beta.0
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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @gct-paas/word v0.2.
|
|
1
|
+
/*! @gct-paas/word v0.2.27-beta.0 */
|
|
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, shallowReactive, shallowRef, toDisplayString, toHandlers, toRaw, toRef, toValue, unref, useAttrs, useCssVars, useModel, useSlots, vModelRadio, vModelSelect, vModelText, vShow, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
3
3
|
import fa, { PopperWrapper } from "floating-vue";
|
|
4
4
|
import VueKonva from "vue-konva";
|
|
@@ -148134,7 +148134,7 @@ var init_bom_validator$1 = __esmMin((() => {
|
|
|
148134
148134
|
}
|
|
148135
148135
|
/** 需求总量 = 数量倍数 × BOM 单位用量 */
|
|
148136
148136
|
get total() {
|
|
148137
|
-
return this.materialNoNum * this.bomEntry.qty_required_;
|
|
148137
|
+
return this.materialNoNum * Number(this.bomEntry.qty_required_);
|
|
148138
148138
|
}
|
|
148139
148139
|
constructor(bomEntry, enableSequenceLoading, getMaterialNoNum, historyData, mainMaterialNo, noBomMode, isCustomRequiredQty = false) {
|
|
148140
148140
|
_defineProperty(this, "bomEntry", void 0);
|
|
@@ -148234,7 +148234,7 @@ var init_bom_validator$1 = __esmMin((() => {
|
|
|
148234
148234
|
if (!this.bomEntry.lot_mixing_enabled_) return;
|
|
148235
148235
|
if (this.bomEntry.type_ !== "by_lot") return;
|
|
148236
148236
|
const groupData = this.filterGroupData(arr);
|
|
148237
|
-
const maxTimes = this.bomEntry.lot_mixing_times_;
|
|
148237
|
+
const maxTimes = Number(this.bomEntry.lot_mixing_times_);
|
|
148238
148238
|
const set = /* @__PURE__ */ new Set();
|
|
148239
148239
|
let errorMsg = "";
|
|
148240
148240
|
groupData.find((i) => {
|
|
@@ -148260,7 +148260,7 @@ var init_bom_validator$1 = __esmMin((() => {
|
|
|
148260
148260
|
if (i.product_id_ && i.material_no_) lots.add(i.material_no_);
|
|
148261
148261
|
});
|
|
148262
148262
|
if (row.material_no_) lots.add(row.material_no_);
|
|
148263
|
-
const maxTimes = this.bomEntry.lot_mixing_times_;
|
|
148263
|
+
const maxTimes = Number(this.bomEntry.lot_mixing_times_);
|
|
148264
148264
|
if (lots.size > maxTimes) throw new Error(`超过允许的混批次数:${maxTimes}`);
|
|
148265
148265
|
}
|
|
148266
148266
|
/** 指定物料批次:material_no_ 须在 specified_material_entries_ 的 name_ 范围内 */
|
|
@@ -148330,7 +148330,7 @@ var init_bom_validator$1 = __esmMin((() => {
|
|
|
148330
148330
|
if (!str) return;
|
|
148331
148331
|
try {
|
|
148332
148332
|
const json = JSON.parse(str);
|
|
148333
|
-
if (json.expr) return await window.gct_expression.execute(json.expr, { qty_required_: data.qty_required_ });
|
|
148333
|
+
if (json.expr) return Number(await window.gct_expression.execute(json.expr, { qty_required_: Number(data.qty_required_) }));
|
|
148334
148334
|
else console.warn("没有配置表达式");
|
|
148335
148335
|
} catch (error) {
|
|
148336
148336
|
console.error("parse expression error", error);
|
|
@@ -148477,7 +148477,7 @@ var init_bom_validator$1 = __esmMin((() => {
|
|
|
148477
148477
|
}
|
|
148478
148478
|
if (util.bomEntry.type_ === "view") return;
|
|
148479
148479
|
if (util.bomEntry.type_ === "by_lot" && !row.material_no_) errors.push(new McRowValidateError(`物料${this.translateProductCode(row.product_id_)}批次不能为空`, "material_no_", row));
|
|
148480
|
-
if (!row.qty_) errors.push(new McRowValidateError(`物料${this.translateProductCode(row.product_id_)}数量不能为空`, "qty_", row));
|
|
148480
|
+
if (!Number(row.qty_)) errors.push(new McRowValidateError(`物料${this.translateProductCode(row.product_id_)}数量不能为空`, "qty_", row));
|
|
148481
148481
|
if (row.expiration_date_ && dayjs(row.expiration_date_).endOf("day").isBefore(dayjs())) errors.push(new McRowValidateError(`${row.product_id__lb_} 的批次 ${row.material_no_} 已过期`, "expiration_date_", row));
|
|
148482
148482
|
try {
|
|
148483
148483
|
util.validateSpecifiedMaterialNo(row);
|
|
@@ -148759,7 +148759,7 @@ var init_bom_validator$1 = __esmMin((() => {
|
|
|
148759
148759
|
const { type_ } = this.findUtilByProductId(row.product_id_).bomEntry;
|
|
148760
148760
|
if (type_ === "view") return;
|
|
148761
148761
|
if (type_ === "by_lot" && !row.material_no_) throw new Error(`物料${this.translateProductCode(row.product_id_)}批次不能为空`);
|
|
148762
|
-
if (!row.qty_) throw new Error(`物料${this.translateProductCode(row.product_id_)}数量不能为空`);
|
|
148762
|
+
if (!Number(row.qty_)) throw new Error(`物料${this.translateProductCode(row.product_id_)}数量不能为空`);
|
|
148763
148763
|
}
|
|
148764
148764
|
/**
|
|
148765
148765
|
* 校验替代料校验
|
|
@@ -148877,7 +148877,7 @@ var init_bom_validator$1 = __esmMin((() => {
|
|
|
148877
148877
|
});
|
|
148878
148878
|
if (sameIndex >= 0) {
|
|
148879
148879
|
var _newArr$sameIndex;
|
|
148880
|
-
const newQty = (((_newArr$sameIndex = newArr[sameIndex]) === null || _newArr$sameIndex === void 0 ? void 0 : _newArr$sameIndex.qty_) ?? 0) + (row.qty_ ?? 0);
|
|
148880
|
+
const newQty = Number(((_newArr$sameIndex = newArr[sameIndex]) === null || _newArr$sameIndex === void 0 ? void 0 : _newArr$sameIndex.qty_) ?? 0) + Number(row.qty_ ?? 0);
|
|
148881
148881
|
merge(newArr[sameIndex], row, { qty_: newQty });
|
|
148882
148882
|
return newArr;
|
|
148883
148883
|
}
|
|
@@ -148983,12 +148983,12 @@ function buildFormulaValues(rule, row, mainData) {
|
|
|
148983
148983
|
for (const map of fieldMaps) {
|
|
148984
148984
|
if (map.key === "formulaRuleInput") {
|
|
148985
148985
|
const fieldKey = map.formField || DEFAULT_INPUT_FIELD;
|
|
148986
|
-
values[FORMULA_RULE_INPUT_KEY] = row[fieldKey];
|
|
148986
|
+
values[FORMULA_RULE_INPUT_KEY] = Number(row[fieldKey]);
|
|
148987
148987
|
continue;
|
|
148988
148988
|
}
|
|
148989
148989
|
if (!isParamMap(map) || !map.formField) continue;
|
|
148990
|
-
if (map.formSubModel === 1) values[map.key] = row[map.formField];
|
|
148991
|
-
else values[map.key] = mainData[map.formField];
|
|
148990
|
+
if (map.formSubModel === 1) values[map.key] = Number(row[map.formField]);
|
|
148991
|
+
else values[map.key] = Number(mainData[map.formField]);
|
|
148992
148992
|
}
|
|
148993
148993
|
return values;
|
|
148994
148994
|
}
|
|
@@ -149006,7 +149006,8 @@ async function applyUnitConversionRules(options) {
|
|
|
149006
149006
|
for (const rule of rules) {
|
|
149007
149007
|
if (!rule.expressionStr || !matchRule(rule, row, subFieldKey)) continue;
|
|
149008
149008
|
const values = buildFormulaValues(rule, row, mainData);
|
|
149009
|
-
|
|
149009
|
+
const result = await serviceUtil.formulaCalculate(rule.expressionStr, values);
|
|
149010
|
+
row.qty_transfer_ = Number(result);
|
|
149010
149011
|
row.qty_transfer_uom_id_ = getTargetUomId(rule.fieldMaps);
|
|
149011
149012
|
row.transfer_formula_ = rule.expressionStr;
|
|
149012
149013
|
return true;
|
|
@@ -149612,7 +149613,10 @@ var init_material_consume_table_controller = __esmMin((() => {
|
|
|
149612
149613
|
get materialNoNum() {
|
|
149613
149614
|
const { required_qty_calc_rule_, product_qty_field_ } = this.tmplBom;
|
|
149614
149615
|
if (required_qty_calc_rule_ === RequiredQtyCalcRule.Custom) return;
|
|
149615
|
-
if (required_qty_calc_rule_ === RequiredQtyCalcRule.ProductQty)
|
|
149616
|
+
if (required_qty_calc_rule_ === RequiredQtyCalcRule.ProductQty) {
|
|
149617
|
+
const qty = product_qty_field_ ? this.mainFormState.value[product_qty_field_] : 0;
|
|
149618
|
+
return qty === void 0 ? void 0 : Number(qty);
|
|
149619
|
+
}
|
|
149616
149620
|
return this.tmplBomController.materialNoNum;
|
|
149617
149621
|
}
|
|
149618
149622
|
/** 物料消耗模式(自身没有配置的话取环境的默认值) */
|
|
@@ -149800,7 +149804,7 @@ var init_material_consume_table_controller = __esmMin((() => {
|
|
|
149800
149804
|
* @readonly
|
|
149801
149805
|
*/
|
|
149802
149806
|
get actualBomEntries() {
|
|
149803
|
-
return ((this.isPersonalBom ? this.tmplBom.entries_ : this.tmplBomController.bomEntries) ?? []).sort((a, b) => (a.operation_sort_num_ ?? 0) - (b.operation_sort_num_ ?? 0));
|
|
149807
|
+
return ((this.isPersonalBom ? this.tmplBom.entries_ : this.tmplBomController.bomEntries) ?? []).sort((a, b) => Number(a.operation_sort_num_ ?? 0) - Number(b.operation_sort_num_ ?? 0));
|
|
149804
149808
|
}
|
|
149805
149809
|
/**
|
|
149806
149810
|
* 根据bom明细构造子表数据(初始化时)
|
|
@@ -149812,7 +149816,7 @@ var init_material_consume_table_controller = __esmMin((() => {
|
|
|
149812
149816
|
return {
|
|
149813
149817
|
product_id_: i.product_id_,
|
|
149814
149818
|
qty_required_uom_id_: i.uom_id_,
|
|
149815
|
-
...materialNoNum === void 0 ? {} : { qty_required_: i.qty_required_ * materialNoNum },
|
|
149819
|
+
...materialNoNum === void 0 ? {} : { qty_required_: Number(i.qty_required_) * materialNoNum },
|
|
149816
149820
|
bom_entry_id_: i.id_
|
|
149817
149821
|
};
|
|
149818
149822
|
});
|
|
@@ -150705,7 +150709,7 @@ var init_tmpl_bom_controller = __esmMin((() => {
|
|
|
150705
150709
|
*/
|
|
150706
150710
|
get materialNoNum() {
|
|
150707
150711
|
var _this$formInstBom;
|
|
150708
|
-
return ((_this$formInstBom = this.formInstBom) === null || _this$formInstBom === void 0 ? void 0 : _this$formInstBom.qty) ?? 1;
|
|
150712
|
+
return Number(((_this$formInstBom = this.formInstBom) === null || _this$formInstBom === void 0 ? void 0 : _this$formInstBom.qty) ?? 1);
|
|
150709
150713
|
}
|
|
150710
150714
|
/**
|
|
150711
150715
|
* bom模块配置关联过来的bom明细集合
|
|
@@ -192398,6 +192402,7 @@ var object_init_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
192398
192402
|
var _existing$objectBomCo;
|
|
192399
192403
|
const bomEntry = {
|
|
192400
192404
|
...pick(result, BOM_ENTRY_KEYS),
|
|
192405
|
+
force_loading_enabled_: false,
|
|
192401
192406
|
id_: existing === null || existing === void 0 || (_existing$objectBomCo = existing.objectBomConfig) === null || _existing$objectBomCo === void 0 || (_existing$objectBomCo = _existing$objectBomCo.entries_) === null || _existing$objectBomCo === void 0 || (_existing$objectBomCo = _existing$objectBomCo[0]) === null || _existing$objectBomCo === void 0 ? void 0 : _existing$objectBomCo.id_
|
|
192402
192407
|
};
|
|
192403
192408
|
const parseRuleProps = result.parseRuleProps ?? {};
|
|
@@ -192494,7 +192499,7 @@ var object_init_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
192494
192499
|
//#endregion
|
|
192495
192500
|
//#region src/suites/edhr/panel-schema/data-init/object-init/object-init.vue
|
|
192496
192501
|
init__plugin_vue_export_helper();
|
|
192497
|
-
var object_init_default = /*#__PURE__*/ _plugin_vue_export_helper_default(object_init_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
192502
|
+
var object_init_default = /*#__PURE__*/ _plugin_vue_export_helper_default(object_init_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-0da62edd"]]);
|
|
192498
192503
|
//#endregion
|
|
192499
192504
|
//#region src/suites/edhr/panel-schema/data-init/DataInitPanel.vue?vue&type=script&setup=true&name=panel-data-init&lang.ts
|
|
192500
192505
|
init_core$1();
|
|
@@ -118,8 +118,8 @@ export declare class BomEntryValidator {
|
|
|
118
118
|
* @return {*}
|
|
119
119
|
*/
|
|
120
120
|
calcCustomNumberLimit(data: IMaterialConsumeData): Promise<{
|
|
121
|
-
max:
|
|
122
|
-
min:
|
|
121
|
+
max: number | undefined;
|
|
122
|
+
min: number | undefined;
|
|
123
123
|
}>;
|
|
124
124
|
/**
|
|
125
125
|
* 通用校验 5:本组上料数量是否满足 qty_validation_rule_。
|
package/dist/runtime/canvas/table/render/material-consume/material-consume-table-controller.d.ts
CHANGED
|
@@ -110,7 +110,7 @@ export declare class MaterialConsumeTableController {
|
|
|
110
110
|
private setupDataUnsubscribe?;
|
|
111
111
|
private setupUomUnsubscribe?;
|
|
112
112
|
/** 批次数量或生产数量 */
|
|
113
|
-
get materialNoNum():
|
|
113
|
+
get materialNoNum(): number | undefined;
|
|
114
114
|
/** 物料消耗模式(自身没有配置的话取环境的默认值) */
|
|
115
115
|
get mcPattern(): MaterialConsumptionPatternEnum;
|
|
116
116
|
/**
|
package/dist/word.css
CHANGED
|
@@ -13179,35 +13179,35 @@ svg.portrait-icon[data-v-8bdb451e] {
|
|
|
13179
13179
|
cursor: pointer;
|
|
13180
13180
|
color: #797a7d;
|
|
13181
13181
|
}
|
|
13182
|
-
.object-item[data-v-
|
|
13182
|
+
.object-item[data-v-0da62edd] {
|
|
13183
13183
|
margin-bottom: 16px;
|
|
13184
13184
|
padding: 12px;
|
|
13185
13185
|
border: 1px dashed #e4e4e4;
|
|
13186
13186
|
border-radius: 8px;
|
|
13187
13187
|
background: #f6f8fa;
|
|
13188
13188
|
}
|
|
13189
|
-
.object-item.is-filled[data-v-
|
|
13189
|
+
.object-item.is-filled[data-v-0da62edd] {
|
|
13190
13190
|
border-color: #a7cae6;
|
|
13191
13191
|
background: #ecf3fc;
|
|
13192
13192
|
}
|
|
13193
|
-
.object-item .item-info[data-v-
|
|
13193
|
+
.object-item .item-info[data-v-0da62edd] {
|
|
13194
13194
|
display: flex;
|
|
13195
13195
|
}
|
|
13196
|
-
.object-item .item-info .info-text[data-v-
|
|
13196
|
+
.object-item .item-info .info-text[data-v-0da62edd] {
|
|
13197
13197
|
flex-grow: 1;
|
|
13198
13198
|
margin-right: 8px;
|
|
13199
13199
|
overflow: hidden;
|
|
13200
13200
|
}
|
|
13201
|
-
.object-item .item-info .info-text .text-row[data-v-
|
|
13201
|
+
.object-item .item-info .info-text .text-row[data-v-0da62edd] {
|
|
13202
13202
|
margin-bottom: 4px;
|
|
13203
13203
|
overflow: hidden;
|
|
13204
13204
|
text-overflow: ellipsis;
|
|
13205
13205
|
white-space: nowrap;
|
|
13206
13206
|
}
|
|
13207
|
-
.object-item .item-info .info-text .text-row .row-label[data-v-
|
|
13207
|
+
.object-item .item-info .info-text .text-row .row-label[data-v-0da62edd] {
|
|
13208
13208
|
color: #76777e;
|
|
13209
13209
|
}
|
|
13210
|
-
.object-item .item-info .info-button[data-v-
|
|
13210
|
+
.object-item .item-info .info-button[data-v-0da62edd] {
|
|
13211
13211
|
display: flex;
|
|
13212
13212
|
flex-shrink: 0;
|
|
13213
13213
|
align-items: center;
|
|
@@ -13217,16 +13217,16 @@ svg.portrait-icon[data-v-8bdb451e] {
|
|
|
13217
13217
|
border-radius: 4px;
|
|
13218
13218
|
cursor: pointer;
|
|
13219
13219
|
}
|
|
13220
|
-
.object-item .item-info .info-button[data-v-
|
|
13220
|
+
.object-item .item-info .info-button[data-v-0da62edd]:hover {
|
|
13221
13221
|
background: #fff;
|
|
13222
13222
|
}
|
|
13223
|
-
.object-item .item-info .info-button:hover .gct-icon[data-v-
|
|
13223
|
+
.object-item .item-info .info-button:hover .gct-icon[data-v-0da62edd] {
|
|
13224
13224
|
color: #1c1e20;
|
|
13225
13225
|
}
|
|
13226
|
-
.object-item .item-info .info-button .gct-icon[data-v-
|
|
13226
|
+
.object-item .item-info .info-button .gct-icon[data-v-0da62edd] {
|
|
13227
13227
|
color: #a4aaaf;
|
|
13228
13228
|
}
|
|
13229
|
-
.object-item .item-button[data-v-
|
|
13229
|
+
.object-item .item-button[data-v-0da62edd] {
|
|
13230
13230
|
margin-top: 8px;
|
|
13231
13231
|
}
|
|
13232
13232
|
.panel-data-init[data-v-72b435b3] {
|