@gct-paas/word 0.2.24-beta.3 → 0.2.24-beta.4

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.
@@ -1,4 +1,6 @@
1
1
  import { Doc } from '../../../../../../core';
2
2
  export declare function handleTargetMaterialNoChange(doc: Doc, subFieldKey: string, rowIndex: number): void;
3
+ /** 工序切换或清空后,清除原工序下选择的被替换物料及历史消耗信息。 */
4
+ export declare function handleRoutingOperationChange(doc: Doc, subFieldKey: string, rowIndex: number): void;
3
5
  export declare function handleSourceProductChange(doc: Doc, subFieldKey: string, rowIndex: number): void;
4
6
  export declare function handleTargetProductChange(doc: Doc, subFieldKey: string, rowIndex: number): void;
@@ -16,6 +16,8 @@ export interface IBomEntry {
16
16
  product_spec_: string;
17
17
  /** 单位用量 */
18
18
  qty_required_: number;
19
+ /** 需求数量单位 */
20
+ uom_id_?: string;
19
21
  /** 删除标记 */
20
22
  deleted_?: boolean;
21
23
  /** 上料方式 */
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @gct-paas/word v0.2.24-beta.3 */
1
+ /*! @gct-paas/word v0.2.24-beta.4 */
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";
@@ -126161,6 +126161,11 @@ var init_profile$6 = __esmMin((() => {
126161
126161
  },
126162
126162
  fields: fields$5,
126163
126163
  rowHandlers: [
126164
+ {
126165
+ when: "onFieldChange",
126166
+ watch: [F$5.routingOperation],
126167
+ handler: "on-routing-operation-change"
126168
+ },
126164
126169
  {
126165
126170
  when: "onFieldChange",
126166
126171
  watch: [F$5.targetProduct],
@@ -126216,6 +126221,12 @@ function handleProductChange$1(doc, subFieldKey, rowIndex, productField, clearFi
126216
126221
  function handleTargetMaterialNoChange(doc, subFieldKey, rowIndex) {
126217
126222
  handleMaterialNoChange(doc, subFieldKey, rowIndex, F$5.targetMaterialNo, CLEAR_ON_TARGET_MATERIAL_NO_EMPTY);
126218
126223
  }
126224
+ /** 工序切换或清空后,清除原工序下选择的被替换物料及历史消耗信息。 */
126225
+ function handleRoutingOperationChange(doc, subFieldKey, rowIndex) {
126226
+ const ctx = getRowChangeCtx(doc, subFieldKey, rowIndex);
126227
+ if (!ctx) return;
126228
+ applyRowClears(ctx, [F$5.sourceProduct, ...CLEAR_ON_SOURCE_PRODUCT_EMPTY]);
126229
+ }
126219
126230
  function handleSourceProductChange(doc, subFieldKey, rowIndex) {
126220
126231
  handleProductChange$1(doc, subFieldKey, rowIndex, F$5.sourceProduct, CLEAR_ON_SOURCE_PRODUCT_EMPTY);
126221
126232
  }
@@ -126243,6 +126254,7 @@ var init_register_handlers$3 = __esmMin((() => {
126243
126254
  init_profile$6();
126244
126255
  init_row_change_handlers$3();
126245
126256
  registerStaticLabelEnricher((doc) => createProductionContainerHyperlinkEnricher(doc, TABLE_TYPE$4));
126257
+ registerRowHandler(TABLE_TYPE$4, "on-routing-operation-change", handleRoutingOperationChange);
126246
126258
  registerRowHandler(TABLE_TYPE$4, "on-target-material-no-change", handleTargetMaterialNoChange);
126247
126259
  registerRowHandler(TABLE_TYPE$4, "on-source-product-change", handleSourceProductChange);
126248
126260
  registerRowHandler(TABLE_TYPE$4, "on-target-product-change", handleTargetProductChange);
@@ -149784,6 +149796,7 @@ var init_material_consume_table_controller = __esmMin((() => {
149784
149796
  return this.actualBomEntries.map((i) => {
149785
149797
  return {
149786
149798
  product_id_: i.product_id_,
149799
+ qty_required_uom_id_: i.uom_id_,
149787
149800
  ...materialNoNum === void 0 ? {} : { qty_required_: i.qty_required_ * materialNoNum },
149788
149801
  bom_entry_id_: i.id_
149789
149802
  };
@@ -150490,6 +150503,7 @@ var init_material_consume_table_controller = __esmMin((() => {
150490
150503
  const util = this.isCustomRequiredQty ? this.getMatchingBomGroupForRow(row) : this.bomEntriesValidator.findUtilByProductId(row.product_id_);
150491
150504
  if (util) {
150492
150505
  if (this.tmplBom.required_qty_calc_rule_ !== RequiredQtyCalcRule.Custom) row.qty_required_ = util.total;
150506
+ row.qty_required_uom_id_ = util.bomEntry.uom_id_;
150493
150507
  row.qty_consumed_ = util.hasConsumed;
150494
150508
  row.bom_entry_id_ = util.bomEntry.id_;
150495
150509
  }
@@ -150503,6 +150517,7 @@ var init_material_consume_table_controller = __esmMin((() => {
150503
150517
  const util = this.isCustomRequiredQty ? this.getMatchingBomGroupForRow(row) : this.bomEntriesValidator.findUtilByProductId(row.product_id_);
150504
150518
  if (util) {
150505
150519
  if (this.tmplBom.required_qty_calc_rule_ !== RequiredQtyCalcRule.Custom) value.qty_required_ = util.total;
150520
+ value.qty_required_uom_id_ = util.bomEntry.uom_id_;
150506
150521
  value.qty_consumed_ = util.hasConsumed;
150507
150522
  value.bom_entry_id_ = util.bomEntry.id_;
150508
150523
  }
@@ -150519,6 +150534,10 @@ var init_material_consume_table_controller = __esmMin((() => {
150519
150534
  if (fieldKey === "product_id_") {
150520
150535
  var _doc$dataManager$getR;
150521
150536
  const row = doc.dataManager.get(rowPath);
150537
+ if (!row.product_id_) doc.dataManager.setMultiple({
150538
+ [`${rowPath}.qty_required_uom_id_`]: void 0,
150539
+ [`${rowPath}.qty_required_uom_id__lb_`]: void 0
150540
+ }, "user");
150522
150541
  if (row._scanFallback) {
150523
150542
  try {
150524
150543
  await this.validateReinspectionDate({
@@ -150529,7 +150548,9 @@ var init_material_consume_table_controller = __esmMin((() => {
150529
150548
  } catch (e) {
150530
150549
  doc.dataManager.setMultiple({
150531
150550
  [`${rowPath}.product_id_`]: void 0,
150532
- [`${rowPath}.product_id__lb_`]: void 0
150551
+ [`${rowPath}.product_id__lb_`]: void 0,
150552
+ [`${rowPath}.qty_required_uom_id_`]: void 0,
150553
+ [`${rowPath}.qty_required_uom_id__lb_`]: void 0
150533
150554
  }, "user");
150534
150555
  this.error(e.message);
150535
150556
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/word",
3
- "version": "0.2.24-beta.3",
3
+ "version": "0.2.24-beta.4",
4
4
  "description": "GCT 在线 word",
5
5
  "keywords": [
6
6
  "vue",