@gct-paas/word 0.1.52-beta.11 → 0.1.52-beta.13
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
|
@@ -355,116 +355,85 @@ function setupGlobDirectives(app) {
|
|
|
355
355
|
}
|
|
356
356
|
const apiConfig$2 = [
|
|
357
357
|
{
|
|
358
|
-
name: "
|
|
359
|
-
entityName: "
|
|
358
|
+
name: "ai",
|
|
359
|
+
entityName: "ai",
|
|
360
360
|
apis: [
|
|
361
361
|
{
|
|
362
362
|
mode: "post",
|
|
363
|
-
method: "
|
|
364
|
-
path: "
|
|
363
|
+
method: "postFormConvertBatchAddFormTmpl",
|
|
364
|
+
path: "form-convert/batch-add-form-tmpl",
|
|
365
365
|
hasData: true
|
|
366
366
|
},
|
|
367
|
-
{
|
|
368
|
-
mode: "get",
|
|
369
|
-
method: "getModelMetaGetSysConfig",
|
|
370
|
-
path: "modelMeta/getSysConfig",
|
|
371
|
-
hasQuery: true
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
mode: "get",
|
|
375
|
-
method: "getModelMetaHasDataAssociation",
|
|
376
|
-
path: "modelMeta/hasDataAssociation",
|
|
377
|
-
hasQuery: true
|
|
378
|
-
},
|
|
379
|
-
{
|
|
380
|
-
mode: "get",
|
|
381
|
-
method: "getModelMetaModelDataAssociation",
|
|
382
|
-
path: "modelMeta/modelDataAssociation",
|
|
383
|
-
hasQuery: true
|
|
384
|
-
},
|
|
385
367
|
{
|
|
386
368
|
mode: "post",
|
|
387
|
-
method: "
|
|
388
|
-
path: "
|
|
369
|
+
method: "postFormConvertBatchFailReasons",
|
|
370
|
+
path: "form-convert/batch/fail-reasons",
|
|
389
371
|
hasData: true
|
|
390
372
|
},
|
|
391
373
|
{
|
|
392
374
|
mode: "post",
|
|
393
|
-
method: "
|
|
394
|
-
path: "
|
|
375
|
+
method: "postFormConvertBatchList",
|
|
376
|
+
path: "form-convert/batch/list",
|
|
395
377
|
hasData: true
|
|
396
378
|
},
|
|
397
379
|
{
|
|
398
380
|
mode: "post",
|
|
399
|
-
method: "
|
|
400
|
-
path: "
|
|
381
|
+
method: "postFormConvertBatchUpload",
|
|
382
|
+
path: "form-convert/batch/upload",
|
|
401
383
|
hasData: true
|
|
402
384
|
},
|
|
403
385
|
{
|
|
404
|
-
mode: "
|
|
405
|
-
method: "
|
|
406
|
-
path: "
|
|
407
|
-
|
|
386
|
+
mode: "get",
|
|
387
|
+
method: "getFormConvertBatchId",
|
|
388
|
+
path: "form-convert/batch/{id}",
|
|
389
|
+
hasPathParams: true
|
|
408
390
|
},
|
|
409
391
|
{
|
|
410
|
-
mode: "
|
|
411
|
-
method: "
|
|
412
|
-
path: "
|
|
413
|
-
|
|
392
|
+
mode: "delete",
|
|
393
|
+
method: "deleteFormConvertBatchId",
|
|
394
|
+
path: "form-convert/batch/{id}",
|
|
395
|
+
hasPathParams: true
|
|
414
396
|
},
|
|
415
397
|
{
|
|
416
398
|
mode: "post",
|
|
417
|
-
method: "
|
|
418
|
-
path: "
|
|
399
|
+
method: "postFormConvertFailReasons",
|
|
400
|
+
path: "form-convert/fail-reasons",
|
|
419
401
|
hasData: true
|
|
420
402
|
},
|
|
421
|
-
{
|
|
422
|
-
mode: "get",
|
|
423
|
-
method: "getEdhrAttachmentGetEdhrAttachment",
|
|
424
|
-
path: "edhrAttachment/getEdhrAttachment",
|
|
425
|
-
hasQuery: true
|
|
426
|
-
},
|
|
427
403
|
{
|
|
428
404
|
mode: "post",
|
|
429
|
-
method: "
|
|
430
|
-
path: "
|
|
431
|
-
hasQuery: true
|
|
432
|
-
},
|
|
433
|
-
{
|
|
434
|
-
mode: "post",
|
|
435
|
-
method: "postFormChangeProcessApprove",
|
|
436
|
-
path: "form/change/process/approve",
|
|
405
|
+
method: "postFormConvertList",
|
|
406
|
+
path: "form-convert/list",
|
|
437
407
|
hasData: true
|
|
438
408
|
},
|
|
439
409
|
{
|
|
440
410
|
mode: "post",
|
|
441
|
-
method: "
|
|
442
|
-
path: "form/
|
|
443
|
-
hasData: true
|
|
411
|
+
method: "postFormConvertRefresh",
|
|
412
|
+
path: "form-convert/refresh"
|
|
444
413
|
},
|
|
445
414
|
{
|
|
446
415
|
mode: "post",
|
|
447
|
-
method: "
|
|
448
|
-
path: "form/
|
|
416
|
+
method: "postFormConvertSave",
|
|
417
|
+
path: "form-convert/save",
|
|
449
418
|
hasData: true
|
|
450
419
|
},
|
|
451
420
|
{
|
|
452
|
-
mode: "
|
|
453
|
-
method: "
|
|
454
|
-
path: "form/
|
|
421
|
+
mode: "put",
|
|
422
|
+
method: "putFormConvertUpdate",
|
|
423
|
+
path: "form-convert/update",
|
|
455
424
|
hasData: true
|
|
456
425
|
},
|
|
457
426
|
{
|
|
458
|
-
mode: "
|
|
459
|
-
method: "
|
|
460
|
-
path: "form/
|
|
461
|
-
|
|
427
|
+
mode: "get",
|
|
428
|
+
method: "getFormConvertId",
|
|
429
|
+
path: "form-convert/{id}",
|
|
430
|
+
hasPathParams: true
|
|
462
431
|
},
|
|
463
432
|
{
|
|
464
|
-
mode: "
|
|
465
|
-
method: "
|
|
466
|
-
path: "form/
|
|
467
|
-
|
|
433
|
+
mode: "delete",
|
|
434
|
+
method: "deleteFormConvertId",
|
|
435
|
+
path: "form-convert/{id}",
|
|
436
|
+
hasPathParams: true
|
|
468
437
|
}
|
|
469
438
|
]
|
|
470
439
|
},
|
|
@@ -563,6 +532,12 @@ const apiConfig$2 = [
|
|
|
563
532
|
path: "batch",
|
|
564
533
|
hasData: true
|
|
565
534
|
},
|
|
535
|
+
{
|
|
536
|
+
mode: "get",
|
|
537
|
+
method: "getCheckUserNeedTransfer",
|
|
538
|
+
path: "checkUserNeedTransfer",
|
|
539
|
+
hasQuery: true
|
|
540
|
+
},
|
|
566
541
|
{
|
|
567
542
|
mode: "get",
|
|
568
543
|
method: "getGrantedStatistic",
|
|
@@ -4801,36 +4776,6 @@ const apiConfig$2 = [
|
|
|
4801
4776
|
path: "appendix/form/list",
|
|
4802
4777
|
hasQuery: true
|
|
4803
4778
|
},
|
|
4804
|
-
{
|
|
4805
|
-
mode: "post",
|
|
4806
|
-
method: "postDataCollectionAbandon",
|
|
4807
|
-
path: "data-collection/abandon",
|
|
4808
|
-
hasData: true
|
|
4809
|
-
},
|
|
4810
|
-
{
|
|
4811
|
-
mode: "post",
|
|
4812
|
-
method: "postDataCollectionCreate",
|
|
4813
|
-
path: "data-collection/create",
|
|
4814
|
-
hasData: true
|
|
4815
|
-
},
|
|
4816
|
-
{
|
|
4817
|
-
mode: "get",
|
|
4818
|
-
method: "getDataCollectionListAll",
|
|
4819
|
-
path: "data-collection/listAll",
|
|
4820
|
-
hasQuery: true
|
|
4821
|
-
},
|
|
4822
|
-
{
|
|
4823
|
-
mode: "post",
|
|
4824
|
-
method: "postDataCollectionUpdateAlias",
|
|
4825
|
-
path: "data-collection/update-alias",
|
|
4826
|
-
hasData: true
|
|
4827
|
-
},
|
|
4828
|
-
{
|
|
4829
|
-
mode: "post",
|
|
4830
|
-
method: "postDataCollectionUpdateStatus",
|
|
4831
|
-
path: "data-collection/update-status",
|
|
4832
|
-
hasData: true
|
|
4833
|
-
},
|
|
4834
4779
|
{
|
|
4835
4780
|
mode: "get",
|
|
4836
4781
|
method: "getDataIds",
|
|
@@ -7689,34 +7634,6 @@ const apiConfig$2 = [
|
|
|
7689
7634
|
}
|
|
7690
7635
|
]
|
|
7691
7636
|
},
|
|
7692
|
-
{
|
|
7693
|
-
name: "ss",
|
|
7694
|
-
entityName: "ss",
|
|
7695
|
-
apis: [
|
|
7696
|
-
{
|
|
7697
|
-
mode: "post",
|
|
7698
|
-
method: "postUploadExcel",
|
|
7699
|
-
path: "upload/excel",
|
|
7700
|
-
hasUpload: true,
|
|
7701
|
-
hasQuery: true,
|
|
7702
|
-
hasData: true
|
|
7703
|
-
},
|
|
7704
|
-
{
|
|
7705
|
-
mode: "post",
|
|
7706
|
-
method: "postUploadImportSerialWorkflow",
|
|
7707
|
-
path: "upload/importSerialWorkflow",
|
|
7708
|
-
hasUpload: true,
|
|
7709
|
-
hasData: true
|
|
7710
|
-
},
|
|
7711
|
-
{
|
|
7712
|
-
mode: "post",
|
|
7713
|
-
method: "postUploadZip",
|
|
7714
|
-
path: "upload/zip",
|
|
7715
|
-
hasUpload: true,
|
|
7716
|
-
hasData: true
|
|
7717
|
-
}
|
|
7718
|
-
]
|
|
7719
|
-
},
|
|
7720
7637
|
{
|
|
7721
7638
|
name: "stash",
|
|
7722
7639
|
entityName: "stash",
|
|
@@ -8397,6 +8314,18 @@ const apiConfig$2 = [
|
|
|
8397
8314
|
name: "api",
|
|
8398
8315
|
entityName: "api",
|
|
8399
8316
|
apis: [
|
|
8317
|
+
{
|
|
8318
|
+
mode: "post",
|
|
8319
|
+
method: "postAiFormConvertCallbackRestore",
|
|
8320
|
+
path: "ai/form-convert/callback/restore",
|
|
8321
|
+
hasData: true
|
|
8322
|
+
},
|
|
8323
|
+
{
|
|
8324
|
+
mode: "post",
|
|
8325
|
+
method: "postAiFormConvertCallbackStatus",
|
|
8326
|
+
path: "ai/form-convert/callback/status",
|
|
8327
|
+
hasData: true
|
|
8328
|
+
},
|
|
8400
8329
|
{
|
|
8401
8330
|
mode: "post",
|
|
8402
8331
|
method: "postAppCreateBranch",
|
|
@@ -33231,7 +33160,7 @@ function toFormatValue(fieldType, value) {
|
|
|
33231
33160
|
if ([FIELD_TYPE.INTEGER, FIELD_TYPE.LONG].includes(fieldType)) {
|
|
33232
33161
|
const _val_ = parseInt(value);
|
|
33233
33162
|
return isNaN(_val_) ? null : _val_;
|
|
33234
|
-
} else if (
|
|
33163
|
+
} else if ([FIELD_TYPE.DOUBLE, FIELD_TYPE.DECIMAL].includes(fieldType)) {
|
|
33235
33164
|
const _val_ = parseFloat(value);
|
|
33236
33165
|
return isNaN(_val_) ? null : _val_;
|
|
33237
33166
|
} else if (fieldType === FIELD_TYPE.BOOLEAN) {
|
|
@@ -82882,10 +82811,19 @@ const fieldNameMap = {
|
|
|
82882
82811
|
product_check_qty: "产品检验数量",
|
|
82883
82812
|
material_check_qty: "材料检验数量",
|
|
82884
82813
|
external_reference_no: "外部参考号",
|
|
82814
|
+
order_no: "订单号",
|
|
82815
|
+
related_lot_no: "关联批次",
|
|
82885
82816
|
warehouse_receipt_no: "单据编号",
|
|
82886
82817
|
warehouse_receipt_date: "单据日期",
|
|
82887
82818
|
warehouse_manager: "仓管员",
|
|
82888
82819
|
warehouse: "仓库",
|
|
82820
|
+
location: "库位",
|
|
82821
|
+
production_identifier: "物料批次(生产标识)",
|
|
82822
|
+
object_type: "对象",
|
|
82823
|
+
material_consume: "物料消耗",
|
|
82824
|
+
qty: "数量",
|
|
82825
|
+
qty_consumed: "已消耗数量",
|
|
82826
|
+
qty_required: "需求数量",
|
|
82889
82827
|
device_ref: "设备关联",
|
|
82890
82828
|
device_ref_multi: "设备多选",
|
|
82891
82829
|
number: "数值",
|
|
@@ -83013,12 +82951,23 @@ const getField2Operators = (fieldType) => {
|
|
|
83013
82951
|
case FIELD_TYPE.RELATED_LOT_NO:
|
|
83014
82952
|
case FIELD_TYPE.SCRAP_MATERIAL_NO:
|
|
83015
82953
|
case FIELD_TYPE.EXTERNAL_REF_NO:
|
|
82954
|
+
case FIELD_TYPE.ORDER_NO:
|
|
82955
|
+
case FIELD_TYPE.WAREHOUSE_RECEIPT_NO:
|
|
83016
82956
|
options = StringOperators.slice();
|
|
83017
82957
|
break;
|
|
83018
82958
|
case FIELD_TYPE.INTEGER:
|
|
83019
82959
|
case FIELD_TYPE.LONG:
|
|
83020
82960
|
case FIELD_TYPE.DOUBLE:
|
|
83021
82961
|
case FIELD_TYPE.DECIMAL:
|
|
82962
|
+
case FIELD_TYPE.QTY:
|
|
82963
|
+
case FIELD_TYPE.QTY_CONSUMED:
|
|
82964
|
+
case FIELD_TYPE.QTY_REQUIRED:
|
|
82965
|
+
case FIELD_TYPE.GOOD_QTY:
|
|
82966
|
+
case FIELD_TYPE.NOT_GOOD_QTY:
|
|
82967
|
+
case FIELD_TYPE.SCRAP_QTY:
|
|
82968
|
+
case FIELD_TYPE.DESTRUCTIVE_TEST_QTY:
|
|
82969
|
+
case FIELD_TYPE.PRODUCT_CHECK_QTY:
|
|
82970
|
+
case FIELD_TYPE.MATERIAL_CHECK_QTY:
|
|
83022
82971
|
options = NumberOperators.slice();
|
|
83023
82972
|
break;
|
|
83024
82973
|
case FIELD_TYPE.BOOLEAN:
|
|
@@ -83027,6 +82976,9 @@ const getField2Operators = (fieldType) => {
|
|
|
83027
82976
|
case FIELD_TYPE.DATE:
|
|
83028
82977
|
case FIELD_TYPE.TIME:
|
|
83029
82978
|
case FIELD_TYPE.DATE_TIME:
|
|
82979
|
+
case FIELD_TYPE.TRACE_DATE:
|
|
82980
|
+
case FIELD_TYPE.WAREHOUSE_RECEIPT_DATE:
|
|
82981
|
+
case FIELD_TYPE.PRODUCTION_DATE:
|
|
83030
82982
|
options = TimeOperators.slice();
|
|
83031
82983
|
break;
|
|
83032
82984
|
case FIELD_TYPE.OPTION:
|
|
@@ -83036,6 +82988,7 @@ const getField2Operators = (fieldType) => {
|
|
|
83036
82988
|
case FIELD_TYPE.REF:
|
|
83037
82989
|
case FIELD_TYPE.RDO_REF:
|
|
83038
82990
|
case FIELD_TYPE.WAREHOUSE:
|
|
82991
|
+
case FIELD_TYPE.LOCATION:
|
|
83039
82992
|
options = OptionOperators.slice();
|
|
83040
82993
|
break;
|
|
83041
82994
|
case FIELD_TYPE.OPTION_MULTI:
|
|
@@ -85228,7 +85181,7 @@ const DYN_CONFIG_BY_TYPE = {
|
|
|
85228
85181
|
attrsTransform: [...basicAttrs.required, ...basicAttrs.placeholder]
|
|
85229
85182
|
}
|
|
85230
85183
|
};
|
|
85231
|
-
const FIELD_TYPE_TO_FW
|
|
85184
|
+
const FIELD_TYPE_TO_FW = {
|
|
85232
85185
|
[FIELD_TYPE.TEXT]: "fw:input",
|
|
85233
85186
|
[FIELD_TYPE.LONG_TEXT]: "fw:input",
|
|
85234
85187
|
[FIELD_TYPE.INTEGER]: "fw:number",
|
|
@@ -85281,7 +85234,7 @@ function buildPropsFromRow(row, config2, baseProps = {}) {
|
|
|
85281
85234
|
return patch;
|
|
85282
85235
|
}
|
|
85283
85236
|
function resolveFwType(fieldType, props) {
|
|
85284
|
-
return FIELD_TYPE_TO_FW
|
|
85237
|
+
return FIELD_TYPE_TO_FW[fieldType] ?? "fw:input";
|
|
85285
85238
|
}
|
|
85286
85239
|
function parseCrossIndices(path) {
|
|
85287
85240
|
const m = path.match(/\[(\d+)\]\[(\d+)\](?:\.[^[]+)?$/);
|
|
@@ -95817,27 +95770,13 @@ class FieldBaseHandler extends RunHandlerBase {
|
|
|
95817
95770
|
context.addRun(run);
|
|
95818
95771
|
}
|
|
95819
95772
|
}
|
|
95820
|
-
|
|
95821
|
-
|
|
95822
|
-
|
|
95823
|
-
|
|
95824
|
-
|
|
95825
|
-
|
|
95826
|
-
|
|
95827
|
-
[FIELD_TYPE.DATE]: "fw:date",
|
|
95828
|
-
[FIELD_TYPE.DATE_TIME]: "fw:date-time",
|
|
95829
|
-
[FIELD_TYPE.TIME]: "fw:time",
|
|
95830
|
-
[FIELD_TYPE.ENUM]: "fw:enum",
|
|
95831
|
-
[FIELD_TYPE.ENUM_MULTI]: "fw:enum-multiple",
|
|
95832
|
-
[FIELD_TYPE.MATERIAL_NO]: "fw:table-select",
|
|
95833
|
-
[FIELD_TYPE.RELATED_LOT_NO]: "fw:table-select",
|
|
95834
|
-
[FIELD_TYPE.PRODUCT]: "fw:rdo-table-select",
|
|
95835
|
-
[FIELD_TYPE.DEVICE]: "fw:table-select",
|
|
95836
|
-
[FIELD_TYPE.MFG_ORDER]: "fw:table-select",
|
|
95837
|
-
[FIELD_TYPE.RECORD_NO]: "fw:input",
|
|
95838
|
-
[FIELD_TYPE.ORDER_NO]: "fw:input",
|
|
95839
|
-
[FIELD_TYPE.TRACE_DATE]: "fw:date"
|
|
95840
|
-
};
|
|
95773
|
+
function resolveAttachFieldComponent(ctx, fieldType) {
|
|
95774
|
+
const component = ctx.context.doc.fieldModelQuery.getFieldManifest(fieldType)?.component;
|
|
95775
|
+
if (component && component !== "cascade") {
|
|
95776
|
+
return component;
|
|
95777
|
+
}
|
|
95778
|
+
return "fw:input";
|
|
95779
|
+
}
|
|
95841
95780
|
class AttachFieldHandler extends FieldBaseHandler {
|
|
95842
95781
|
static layoutOptionAttachFields(ctx, option, layoutStyle) {
|
|
95843
95782
|
const items = option.attachFields;
|
|
@@ -95864,7 +95803,7 @@ class AttachFieldHandler extends FieldBaseHandler {
|
|
|
95864
95803
|
}
|
|
95865
95804
|
static buildWidgetMeta(ctx, item, parentWr, parentRuntimeValuePath, parentOptionValue, runtimePath) {
|
|
95866
95805
|
const fieldType = item.fieldData.fieldType;
|
|
95867
|
-
const type4 =
|
|
95806
|
+
const type4 = resolveAttachFieldComponent(ctx, fieldType);
|
|
95868
95807
|
const parentMeta = parentWr.widgetMeta;
|
|
95869
95808
|
const attachFieldParent = {
|
|
95870
95809
|
parentModelRefId: this.getModelRefId(ctx.context, parentWr),
|
|
@@ -108203,25 +108142,56 @@ async function prepareDocumentFieldContext(options) {
|
|
|
108203
108142
|
if (loadSubModels) {
|
|
108204
108143
|
await addSubModelsToFieldScope(mainModelKey, payload.ctx);
|
|
108205
108144
|
}
|
|
108145
|
+
const fieldList = payload.ctx.runtime.getFieldList(mainModelKey);
|
|
108206
108146
|
const masterSlaveList = payload.ctx.runtime.getMasterSlaveFieldList(mainModelKey);
|
|
108207
|
-
return { mainModelKey, masterSlaveList };
|
|
108208
|
-
}
|
|
108209
|
-
const initObjectTypeFieldDefaultValue = (
|
|
108147
|
+
return { mainModelKey, fieldList, masterSlaveList };
|
|
108148
|
+
}
|
|
108149
|
+
const initObjectTypeFieldDefaultValue = (rawData, instances, fieldList, runtimeJson) => {
|
|
108150
|
+
const usingObjectFieldMap = instances.map((i) => {
|
|
108151
|
+
const { belongingObject, fieldLink } = i.widgetMeta.field;
|
|
108152
|
+
return belongingObject ? { belongingObject, fieldLink } : null;
|
|
108153
|
+
}).reduce((map, cur) => {
|
|
108154
|
+
if (!cur) return map;
|
|
108155
|
+
const { belongingObject, fieldLink } = cur;
|
|
108156
|
+
if (!map[belongingObject]) {
|
|
108157
|
+
map[belongingObject] = [];
|
|
108158
|
+
}
|
|
108159
|
+
map[belongingObject].push(fieldLink);
|
|
108160
|
+
return map;
|
|
108161
|
+
}, {});
|
|
108162
|
+
const allObjectFieldMap = groupBy$1(fieldList.filter((f) => !!f.belongingObject), "belongingObject");
|
|
108163
|
+
Object.entries(allObjectFieldMap).forEach(([belongingObject, fields2]) => {
|
|
108164
|
+
const allFieldKeys = fields2.map((f) => f.key);
|
|
108165
|
+
const isNotUsed = allFieldKeys.every((fk) => !usingObjectFieldMap[belongingObject]?.includes(fk));
|
|
108166
|
+
if (isNotUsed) {
|
|
108167
|
+
delete rawData[belongingObject];
|
|
108168
|
+
}
|
|
108169
|
+
});
|
|
108210
108170
|
const res = JSON.parse(runtimeJson);
|
|
108211
108171
|
const { objectInitialValues } = res?.document?.config?.dataInit || {};
|
|
108212
108172
|
if (!objectInitialValues?.length) return;
|
|
108213
|
-
objectInitialValues.forEach(({ values }) => {
|
|
108214
|
-
if (!values) return;
|
|
108173
|
+
objectInitialValues.forEach(({ objectField, values }) => {
|
|
108174
|
+
if (!objectField || !values) return;
|
|
108215
108175
|
for (const [key, value] of Object.entries(values)) {
|
|
108216
108176
|
if (value === void 0 || value === null) continue;
|
|
108217
108177
|
const existing = rawData[key];
|
|
108218
108178
|
if (existing !== void 0 && existing !== null) continue;
|
|
108219
108179
|
rawData[key] = value;
|
|
108220
108180
|
}
|
|
108181
|
+
rawData[objectField] = null;
|
|
108221
108182
|
});
|
|
108222
108183
|
};
|
|
108223
108184
|
async function prepareDocumentRenderData(options) {
|
|
108224
|
-
const {
|
|
108185
|
+
const {
|
|
108186
|
+
requestInfo,
|
|
108187
|
+
payload,
|
|
108188
|
+
materialNo,
|
|
108189
|
+
query,
|
|
108190
|
+
instances,
|
|
108191
|
+
subTableInfoList,
|
|
108192
|
+
fieldList,
|
|
108193
|
+
masterSlaveList
|
|
108194
|
+
} = options;
|
|
108225
108195
|
const interfaceData = await fetchRenderData({
|
|
108226
108196
|
info: requestInfo,
|
|
108227
108197
|
fetchConfig: { _gct_materialNo_: materialNo },
|
|
@@ -108234,7 +108204,7 @@ async function prepareDocumentRenderData(options) {
|
|
|
108234
108204
|
interfaceData,
|
|
108235
108205
|
subTableInfoList
|
|
108236
108206
|
});
|
|
108237
|
-
initObjectTypeFieldDefaultValue(requestInfo.runtimeJson
|
|
108207
|
+
initObjectTypeFieldDefaultValue(rawData, instances, fieldList, requestInfo.runtimeJson);
|
|
108238
108208
|
return rawData;
|
|
108239
108209
|
}
|
|
108240
108210
|
async function loadDocumentInitMappings(options) {
|
|
@@ -108268,7 +108238,7 @@ async function initializeDocumentEngine(props, payload, result) {
|
|
|
108268
108238
|
configurePipelineLoggingForDev();
|
|
108269
108239
|
const { id, requestInfo, fillModeType, paramsConfig, tmplBomC } = result;
|
|
108270
108240
|
const materialNo = paramsConfig?.materialNo || requestInfo.materialNo;
|
|
108271
|
-
const { mainModelKey, masterSlaveList } = await prepareDocumentFieldContext({
|
|
108241
|
+
const { mainModelKey, fieldList, masterSlaveList } = await prepareDocumentFieldContext({
|
|
108272
108242
|
requestInfo,
|
|
108273
108243
|
payload,
|
|
108274
108244
|
loadSubModels: true
|
|
@@ -108332,6 +108302,7 @@ async function initializeDocumentEngine(props, payload, result) {
|
|
|
108332
108302
|
query: result.query,
|
|
108333
108303
|
instances,
|
|
108334
108304
|
subTableInfoList: docModel.getSubTableInfoList() ?? [],
|
|
108305
|
+
fieldList,
|
|
108335
108306
|
masterSlaveList
|
|
108336
108307
|
});
|
|
108337
108308
|
const docRuntimeMeta = {
|
|
@@ -108500,7 +108471,7 @@ function useDocumentFactory(props, payload) {
|
|
|
108500
108471
|
bpmnFieldAuthMap
|
|
108501
108472
|
} = freshExecute;
|
|
108502
108473
|
const materialNo = paramsConfig?.materialNo || props.materialNo;
|
|
108503
|
-
const { masterSlaveList } = await prepareDocumentFieldContext({
|
|
108474
|
+
const { fieldList, masterSlaveList } = await prepareDocumentFieldContext({
|
|
108504
108475
|
requestInfo,
|
|
108505
108476
|
payload,
|
|
108506
108477
|
loadSubModels: false
|
|
@@ -108528,6 +108499,7 @@ function useDocumentFactory(props, payload) {
|
|
|
108528
108499
|
query,
|
|
108529
108500
|
instances: doc.model?.getWidgetInstances() ?? [],
|
|
108530
108501
|
subTableInfoList: doc.model?.getSubTableInfoList() ?? [],
|
|
108502
|
+
fieldList,
|
|
108531
108503
|
masterSlaveList
|
|
108532
108504
|
});
|
|
108533
108505
|
doc.dataManager.setRawData(rawData);
|
|
@@ -108918,6 +108890,9 @@ class SuiteRuntime {
|
|
|
108918
108890
|
getMasterSlaveFieldList(modelKey) {
|
|
108919
108891
|
return this.fieldService.getFieldList(modelKey)?.filter((i) => i.type === FIELD_TYPE.MASTERSLAVE) || [];
|
|
108920
108892
|
}
|
|
108893
|
+
getFieldManifest(type4) {
|
|
108894
|
+
return this.fieldManifestService.getManifestByType(type4);
|
|
108895
|
+
}
|
|
108921
108896
|
reloadFields(modelKey) {
|
|
108922
108897
|
this.fieldService.clear(modelKey);
|
|
108923
108898
|
return this.loadFieldList(modelKey);
|
|
@@ -130384,7 +130359,10 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
130384
130359
|
FIELD_TYPE.MFG_ORDER,
|
|
130385
130360
|
FIELD_TYPE.RECORD_NO,
|
|
130386
130361
|
FIELD_TYPE.ORDER_NO,
|
|
130387
|
-
FIELD_TYPE.
|
|
130362
|
+
FIELD_TYPE.EXTERNAL_REF_NO,
|
|
130363
|
+
FIELD_TYPE.TRACE_DATE,
|
|
130364
|
+
FIELD_TYPE.WAREHOUSE_RECEIPT_NO,
|
|
130365
|
+
FIELD_TYPE.WAREHOUSE_RECEIPT_DATE
|
|
130388
130366
|
];
|
|
130389
130367
|
if (!allowFieldTypes.includes(meta.field.fieldType)) {
|
|
130390
130368
|
GctMessage.warning(props.customFieldMsg ?? "能绑定数值、文本、日期和追溯类型的字段");
|
|
@@ -130434,7 +130412,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
130434
130412
|
};
|
|
130435
130413
|
}
|
|
130436
130414
|
});
|
|
130437
|
-
const AttachFieldEditor = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-
|
|
130415
|
+
const AttachFieldEditor = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-fc484054"]]);
|
|
130438
130416
|
const _hoisted_1$Q = { class: "option-container" };
|
|
130439
130417
|
const _hoisted_2$q = { class: "option-item" };
|
|
130440
130418
|
const _hoisted_3$f = { class: "option" };
|
|
@@ -136252,6 +136230,22 @@ const selectStrategyMap = {
|
|
|
136252
136230
|
},
|
|
136253
136231
|
transform: transformLotData
|
|
136254
136232
|
},
|
|
136233
|
+
[FIELD_TYPE.WAREHOUSE]: {
|
|
136234
|
+
columnsKey: "ref",
|
|
136235
|
+
fetcher: "ref",
|
|
136236
|
+
buildQuery({ keyword, searchField, extraParams }) {
|
|
136237
|
+
return buildRefQuickSearchQuery(searchField, keyword, extraParams);
|
|
136238
|
+
},
|
|
136239
|
+
transform: transformLotData
|
|
136240
|
+
},
|
|
136241
|
+
[FIELD_TYPE.LOCATION]: {
|
|
136242
|
+
columnsKey: "ref",
|
|
136243
|
+
fetcher: "ref",
|
|
136244
|
+
buildQuery({ keyword, searchField, extraParams }) {
|
|
136245
|
+
return buildRefQuickSearchQuery(searchField, keyword, extraParams);
|
|
136246
|
+
},
|
|
136247
|
+
transform: transformLotData
|
|
136248
|
+
},
|
|
136255
136249
|
[FIELD_TYPE.REF]: {
|
|
136256
136250
|
columnsKey: "ref",
|
|
136257
136251
|
fetcher: "ref",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FieldScope, FieldService, ModelService, FieldMeta, ModelMeta } from '../../../capabilities/model-field-runtime';
|
|
2
|
+
import { FIELD_TYPE } from '../../../domain/field/field-type';
|
|
2
3
|
import { ComponentService } from '../../../capabilities/component-registry';
|
|
3
4
|
import { PanelRouterService } from '../../../capabilities/panel/router/service';
|
|
4
5
|
import { PanelSchemaService } from '../../../capabilities/panel/schema/service';
|
|
@@ -33,6 +34,7 @@ export declare class SuiteRuntime implements FieldModelQuery {
|
|
|
33
34
|
*/
|
|
34
35
|
ensureModelFieldsReady(modelKey: ModelKey): Promise<void>;
|
|
35
36
|
getMasterSlaveFieldList(modelKey: ModelKey): FieldMeta[];
|
|
37
|
+
getFieldManifest(type: FIELD_TYPE): import('../../../capabilities/field-manifest').FieldManifest | undefined;
|
|
36
38
|
reloadFields(modelKey: ModelKey): Promise<import('../../../capabilities/model-field-runtime').FieldListResult>;
|
|
37
39
|
reloadModel(modelKey: ModelKey): Promise<[ModelMeta | undefined, import('../../../capabilities/model-field-runtime').FieldListResult]>;
|
|
38
40
|
dispose(): void;
|
|
@@ -22,6 +22,7 @@ export interface PrepareFieldContextOptions {
|
|
|
22
22
|
}
|
|
23
23
|
export interface DocumentFieldContext {
|
|
24
24
|
mainModelKey: string;
|
|
25
|
+
fieldList: FieldMeta[];
|
|
25
26
|
masterSlaveList: FieldMeta[];
|
|
26
27
|
}
|
|
27
28
|
export declare function prepareDocumentFieldContext(options: PrepareFieldContextOptions): Promise<DocumentFieldContext>;
|
|
@@ -32,6 +33,7 @@ export interface PrepareRenderDataOptions {
|
|
|
32
33
|
query: Record<string, any>;
|
|
33
34
|
instances: any[];
|
|
34
35
|
subTableInfoList: any[];
|
|
36
|
+
fieldList: FieldMeta[];
|
|
35
37
|
masterSlaveList: FieldMeta[];
|
|
36
38
|
}
|
|
37
39
|
export declare function prepareDocumentRenderData(options: PrepareRenderDataOptions): Promise<any>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { FieldListResult, FieldMeta, FieldScope, ModelMeta } from '../../capabilities/model-field-runtime';
|
|
2
|
+
import { FieldManifest } from '../../capabilities/field-manifest';
|
|
3
|
+
import { FIELD_TYPE } from '../../domain/field/field-type';
|
|
2
4
|
/**
|
|
3
5
|
* 字段/模型查询能力(不依赖 Vue provide/inject)。
|
|
4
6
|
* 由 {@link SuiteRuntime} 实现。
|
|
@@ -18,4 +20,5 @@ export interface FieldModelQuery {
|
|
|
18
20
|
ensureModelFieldsReady(modelKey: ModelKey): Promise<void>;
|
|
19
21
|
reloadFields(modelKey: ModelKey): Promise<FieldListResult>;
|
|
20
22
|
reloadModel(modelKey: ModelKey): Promise<[ModelMeta | undefined, FieldListResult]>;
|
|
23
|
+
getFieldManifest(type: FIELD_TYPE): FieldManifest | undefined;
|
|
21
24
|
}
|
package/dist/word.css
CHANGED
|
@@ -11478,13 +11478,13 @@ svg.portrait-icon[data-v-8bdb451e] {
|
|
|
11478
11478
|
color: #ff7875;
|
|
11479
11479
|
}
|
|
11480
11480
|
|
|
11481
|
-
.fill-fields-area[data-v-
|
|
11481
|
+
.fill-fields-area[data-v-fc484054] {
|
|
11482
11482
|
padding: 4px;
|
|
11483
11483
|
background: #f0f0f0;
|
|
11484
11484
|
border-radius: 4px;
|
|
11485
11485
|
margin-top: 6px;
|
|
11486
11486
|
}
|
|
11487
|
-
.attach-fields-editor[data-v-
|
|
11487
|
+
.attach-fields-editor[data-v-fc484054] {
|
|
11488
11488
|
padding: 4px;
|
|
11489
11489
|
border-color: transparent;
|
|
11490
11490
|
}
|