@steedos-widgets/amis-lib 6.10.1-beta.48 → 6.10.1-beta.49
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/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +237 -47
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +238 -48
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +220 -200
- package/dist/index.umd.js.map +1 -1
- package/dist/types/workflow/approve.d.ts +2 -2
- package/dist/types/workflow/attachment.d.ts +4 -4
- package/dist/types/workflow/flow.d.ts +50 -7
- package/dist/types/workflow/history.d.ts +1 -1
- package/dist/types/workflow/related.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -1599,6 +1599,21 @@ var frontend_app_launcher_dialog_new_app_title$1 = "New App";
|
|
|
1599
1599
|
var frontend_app_launcher_dialog_new_app_code_label$1 = "App ID";
|
|
1600
1600
|
var frontend_app_launcher_dialog_new_app_name_label$1 = "Label";
|
|
1601
1601
|
var frontend_app_launcher_dialog_new_app_icon_label$1 = "Icon";
|
|
1602
|
+
var frontend_crud_toolbar_quick_search_placeholder$1 = "Quick Search";
|
|
1603
|
+
var frontend_crud_toolbar_quick_search_tooltip_prefix$1 = "Searchable fields:";
|
|
1604
|
+
var frontend_workflow_instances_applicant_name_prefix$1 = "Applicant name:";
|
|
1605
|
+
var frontend_workflow_instance_submit_date_prefix$1 = "Submission date:";
|
|
1606
|
+
var frontend_workflow_instance_button_sign$1 = "Sign";
|
|
1607
|
+
var frontend_workflow_approval_history$1 = "Approval History";
|
|
1608
|
+
var frontend_workflow_approval_history_read$1 = "Read";
|
|
1609
|
+
var frontend_workflow_approval_history_unprocessed$1 = "Unprocessed";
|
|
1610
|
+
var frontend_workflow_attachment$1 = "Attachment";
|
|
1611
|
+
var frontend_workflow_attachment_upload$1 = "Upload";
|
|
1612
|
+
var frontend_workflow_related_file$1 = "Related File";
|
|
1613
|
+
var frontend_workflow_judge_option_approved$1 = "Approved";
|
|
1614
|
+
var frontend_workflow_judge_option_rejected$1 = "Rejected";
|
|
1615
|
+
var frontend_workflow_judge_option_readed$1 = "Readed";
|
|
1616
|
+
var frontend_workflow_next_step$1 = "Next Step";
|
|
1602
1617
|
var en_us$1 = {
|
|
1603
1618
|
frontend_field_group_generalization: frontend_field_group_generalization$1,
|
|
1604
1619
|
frontend_download: frontend_download$1,
|
|
@@ -1715,7 +1730,22 @@ var en_us$1 = {
|
|
|
1715
1730
|
frontend_app_launcher_dialog_new_app_title: frontend_app_launcher_dialog_new_app_title$1,
|
|
1716
1731
|
frontend_app_launcher_dialog_new_app_code_label: frontend_app_launcher_dialog_new_app_code_label$1,
|
|
1717
1732
|
frontend_app_launcher_dialog_new_app_name_label: frontend_app_launcher_dialog_new_app_name_label$1,
|
|
1718
|
-
frontend_app_launcher_dialog_new_app_icon_label: frontend_app_launcher_dialog_new_app_icon_label$1
|
|
1733
|
+
frontend_app_launcher_dialog_new_app_icon_label: frontend_app_launcher_dialog_new_app_icon_label$1,
|
|
1734
|
+
frontend_crud_toolbar_quick_search_placeholder: frontend_crud_toolbar_quick_search_placeholder$1,
|
|
1735
|
+
frontend_crud_toolbar_quick_search_tooltip_prefix: frontend_crud_toolbar_quick_search_tooltip_prefix$1,
|
|
1736
|
+
frontend_workflow_instances_applicant_name_prefix: frontend_workflow_instances_applicant_name_prefix$1,
|
|
1737
|
+
frontend_workflow_instance_submit_date_prefix: frontend_workflow_instance_submit_date_prefix$1,
|
|
1738
|
+
frontend_workflow_instance_button_sign: frontend_workflow_instance_button_sign$1,
|
|
1739
|
+
frontend_workflow_approval_history: frontend_workflow_approval_history$1,
|
|
1740
|
+
frontend_workflow_approval_history_read: frontend_workflow_approval_history_read$1,
|
|
1741
|
+
frontend_workflow_approval_history_unprocessed: frontend_workflow_approval_history_unprocessed$1,
|
|
1742
|
+
frontend_workflow_attachment: frontend_workflow_attachment$1,
|
|
1743
|
+
frontend_workflow_attachment_upload: frontend_workflow_attachment_upload$1,
|
|
1744
|
+
frontend_workflow_related_file: frontend_workflow_related_file$1,
|
|
1745
|
+
frontend_workflow_judge_option_approved: frontend_workflow_judge_option_approved$1,
|
|
1746
|
+
frontend_workflow_judge_option_rejected: frontend_workflow_judge_option_rejected$1,
|
|
1747
|
+
frontend_workflow_judge_option_readed: frontend_workflow_judge_option_readed$1,
|
|
1748
|
+
frontend_workflow_next_step: frontend_workflow_next_step$1
|
|
1719
1749
|
};
|
|
1720
1750
|
|
|
1721
1751
|
var frontend_field_group_generalization = "通用";
|
|
@@ -1835,6 +1865,31 @@ var frontend_app_launcher_dialog_new_app_title = "新建应用";
|
|
|
1835
1865
|
var frontend_app_launcher_dialog_new_app_code_label = "应用唯一标识";
|
|
1836
1866
|
var frontend_app_launcher_dialog_new_app_name_label = "显示名称";
|
|
1837
1867
|
var frontend_app_launcher_dialog_new_app_icon_label = "图标";
|
|
1868
|
+
var frontend_crud_toolbar_quick_search_placeholder = "快捷搜索";
|
|
1869
|
+
var frontend_crud_toolbar_quick_search_tooltip_prefix = "可搜索字段:";
|
|
1870
|
+
var frontend_workflow_instances_applicant_name_prefix = "提交人:";
|
|
1871
|
+
var frontend_workflow_instance_submit_date_prefix = "提交日期:";
|
|
1872
|
+
var frontend_workflow_approval_judge_returned = "已退回";
|
|
1873
|
+
var frontend_workflow_approval_judge_terminated = "被取回";
|
|
1874
|
+
var frontend_workflow_approval_judge_pending = "审核中";
|
|
1875
|
+
var frontend_workflow_approval_judge_approved = "已核准";
|
|
1876
|
+
var frontend_workflow_approval_judge_rejected = "已驳回";
|
|
1877
|
+
var frontend_workflow_approval_judge_finished = "已完成";
|
|
1878
|
+
var frontend_workflow_approval_judge_reassigned = "转签核";
|
|
1879
|
+
var frontend_workflow_approval_judge_inhand = "处理中";
|
|
1880
|
+
var frontend_workflow_approval_judge_relocated = "重定位";
|
|
1881
|
+
var frontend_workflow_approval_judge_readed = "已阅";
|
|
1882
|
+
var frontend_workflow_instance_button_sign = "签批";
|
|
1883
|
+
var frontend_workflow_approval_history = "签批历程";
|
|
1884
|
+
var frontend_workflow_approval_history_read = "已读";
|
|
1885
|
+
var frontend_workflow_approval_history_unprocessed = "未处理";
|
|
1886
|
+
var frontend_workflow_attachment = "附件";
|
|
1887
|
+
var frontend_workflow_attachment_upload = "上传";
|
|
1888
|
+
var frontend_workflow_related_file = "相关文件";
|
|
1889
|
+
var frontend_workflow_judge_option_approved = "核准";
|
|
1890
|
+
var frontend_workflow_judge_option_rejected = "驳回";
|
|
1891
|
+
var frontend_workflow_judge_option_readed = "已阅";
|
|
1892
|
+
var frontend_workflow_next_step = "下一步";
|
|
1838
1893
|
var zh_cn$1 = {
|
|
1839
1894
|
frontend_field_group_generalization: frontend_field_group_generalization,
|
|
1840
1895
|
frontend_download: frontend_download,
|
|
@@ -1952,7 +2007,32 @@ var zh_cn$1 = {
|
|
|
1952
2007
|
frontend_app_launcher_dialog_new_app_title: frontend_app_launcher_dialog_new_app_title,
|
|
1953
2008
|
frontend_app_launcher_dialog_new_app_code_label: frontend_app_launcher_dialog_new_app_code_label,
|
|
1954
2009
|
frontend_app_launcher_dialog_new_app_name_label: frontend_app_launcher_dialog_new_app_name_label,
|
|
1955
|
-
frontend_app_launcher_dialog_new_app_icon_label: frontend_app_launcher_dialog_new_app_icon_label
|
|
2010
|
+
frontend_app_launcher_dialog_new_app_icon_label: frontend_app_launcher_dialog_new_app_icon_label,
|
|
2011
|
+
frontend_crud_toolbar_quick_search_placeholder: frontend_crud_toolbar_quick_search_placeholder,
|
|
2012
|
+
frontend_crud_toolbar_quick_search_tooltip_prefix: frontend_crud_toolbar_quick_search_tooltip_prefix,
|
|
2013
|
+
frontend_workflow_instances_applicant_name_prefix: frontend_workflow_instances_applicant_name_prefix,
|
|
2014
|
+
frontend_workflow_instance_submit_date_prefix: frontend_workflow_instance_submit_date_prefix,
|
|
2015
|
+
frontend_workflow_approval_judge_returned: frontend_workflow_approval_judge_returned,
|
|
2016
|
+
frontend_workflow_approval_judge_terminated: frontend_workflow_approval_judge_terminated,
|
|
2017
|
+
frontend_workflow_approval_judge_pending: frontend_workflow_approval_judge_pending,
|
|
2018
|
+
frontend_workflow_approval_judge_approved: frontend_workflow_approval_judge_approved,
|
|
2019
|
+
frontend_workflow_approval_judge_rejected: frontend_workflow_approval_judge_rejected,
|
|
2020
|
+
frontend_workflow_approval_judge_finished: frontend_workflow_approval_judge_finished,
|
|
2021
|
+
frontend_workflow_approval_judge_reassigned: frontend_workflow_approval_judge_reassigned,
|
|
2022
|
+
frontend_workflow_approval_judge_inhand: frontend_workflow_approval_judge_inhand,
|
|
2023
|
+
frontend_workflow_approval_judge_relocated: frontend_workflow_approval_judge_relocated,
|
|
2024
|
+
frontend_workflow_approval_judge_readed: frontend_workflow_approval_judge_readed,
|
|
2025
|
+
frontend_workflow_instance_button_sign: frontend_workflow_instance_button_sign,
|
|
2026
|
+
frontend_workflow_approval_history: frontend_workflow_approval_history,
|
|
2027
|
+
frontend_workflow_approval_history_read: frontend_workflow_approval_history_read,
|
|
2028
|
+
frontend_workflow_approval_history_unprocessed: frontend_workflow_approval_history_unprocessed,
|
|
2029
|
+
frontend_workflow_attachment: frontend_workflow_attachment,
|
|
2030
|
+
frontend_workflow_attachment_upload: frontend_workflow_attachment_upload,
|
|
2031
|
+
frontend_workflow_related_file: frontend_workflow_related_file,
|
|
2032
|
+
frontend_workflow_judge_option_approved: frontend_workflow_judge_option_approved,
|
|
2033
|
+
frontend_workflow_judge_option_rejected: frontend_workflow_judge_option_rejected,
|
|
2034
|
+
frontend_workflow_judge_option_readed: frontend_workflow_judge_option_readed,
|
|
2035
|
+
frontend_workflow_next_step: frontend_workflow_next_step
|
|
1956
2036
|
};
|
|
1957
2037
|
|
|
1958
2038
|
/*
|
|
@@ -9270,7 +9350,7 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
9270
9350
|
"id": "steedos_crud_toolbar_quick_search",
|
|
9271
9351
|
"align": "right",
|
|
9272
9352
|
"title": "",
|
|
9273
|
-
"content": "
|
|
9353
|
+
"content": i18next__default["default"].t('frontend_crud_toolbar_quick_search_tooltip_prefix') + searchableFieldsLabel.join(","),
|
|
9274
9354
|
"placement": "bottom",
|
|
9275
9355
|
"tooltipTheme": "dark",
|
|
9276
9356
|
"trigger": "click",
|
|
@@ -9280,7 +9360,7 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
9280
9360
|
{
|
|
9281
9361
|
"type": "search-box",
|
|
9282
9362
|
"name": keywordsSearchBoxName,
|
|
9283
|
-
"placeholder": "快捷搜索",
|
|
9363
|
+
"placeholder": i18next__default["default"].t('frontend_crud_toolbar_quick_search_placeholder'),//"快捷搜索",
|
|
9284
9364
|
"value": crudKeywords,
|
|
9285
9365
|
"mini": true,
|
|
9286
9366
|
"clearable": true,//因为清除并不会触发失去焦点事件,只有禁用,但是它会触发change事件,所以等升级到amis 3.4+后可以重新放开
|
|
@@ -16927,11 +17007,11 @@ const getJudgeOptions = async (instance) => {
|
|
|
16927
17007
|
const options = [];
|
|
16928
17008
|
if (step.step_type === "sign") {
|
|
16929
17009
|
options.push({
|
|
16930
|
-
label: "核准",
|
|
17010
|
+
label: amisLib.i18next.t('frontend_workflow_judge_option_approved'),//"核准",
|
|
16931
17011
|
value: "approved",
|
|
16932
17012
|
});
|
|
16933
17013
|
options.push({
|
|
16934
|
-
label: "驳回",
|
|
17014
|
+
label: amisLib.i18next.t('frontend_workflow_judge_option_rejected'),//"驳回",
|
|
16935
17015
|
value: "rejected",
|
|
16936
17016
|
});
|
|
16937
17017
|
} else if (
|
|
@@ -16939,15 +17019,15 @@ const getJudgeOptions = async (instance) => {
|
|
|
16939
17019
|
HIDE_COUNTER_SIGN_JUDGE_OPTIONS != true
|
|
16940
17020
|
) {
|
|
16941
17021
|
options.push({
|
|
16942
|
-
label: "核准",
|
|
17022
|
+
label: amisLib.i18next.t('frontend_workflow_judge_option_approved'),//"核准",
|
|
16943
17023
|
value: "approved",
|
|
16944
17024
|
});
|
|
16945
17025
|
options.push({
|
|
16946
|
-
label: "驳回",
|
|
17026
|
+
label: amisLib.i18next.t('frontend_workflow_judge_option_rejected'),//"驳回",
|
|
16947
17027
|
value: "rejected",
|
|
16948
17028
|
});
|
|
16949
17029
|
options.push({
|
|
16950
|
-
label: "已阅",
|
|
17030
|
+
label: amisLib.i18next.t('frontend_workflow_judge_option_readed'),//"已阅",
|
|
16951
17031
|
value: "readed",
|
|
16952
17032
|
});
|
|
16953
17033
|
}
|
|
@@ -17008,7 +17088,7 @@ const getNextStepInput = async (instance) => {
|
|
|
17008
17088
|
body: [
|
|
17009
17089
|
{
|
|
17010
17090
|
type: "tpl",
|
|
17011
|
-
tpl: "下一步",
|
|
17091
|
+
tpl: amisLib.i18next.t('frontend_workflow_next_step'),//"下一步",
|
|
17012
17092
|
inline: true,
|
|
17013
17093
|
wrapperComponent: "",
|
|
17014
17094
|
id: "u:0a85de51480f",
|
|
@@ -17486,7 +17566,7 @@ const getApprovalDrawerSchema = async (instance) => {
|
|
|
17486
17566
|
actions: [
|
|
17487
17567
|
{
|
|
17488
17568
|
type: "button",
|
|
17489
|
-
label: "
|
|
17569
|
+
label: "${'Submit' | t}",
|
|
17490
17570
|
onEvent: {
|
|
17491
17571
|
click: {
|
|
17492
17572
|
actions: await getSubmitActions(instance),
|
|
@@ -17497,7 +17577,7 @@ const getApprovalDrawerSchema = async (instance) => {
|
|
|
17497
17577
|
},
|
|
17498
17578
|
{
|
|
17499
17579
|
type: "button",
|
|
17500
|
-
label: "
|
|
17580
|
+
label: "${'Cancel' | t}",
|
|
17501
17581
|
onEvent: {
|
|
17502
17582
|
click: {
|
|
17503
17583
|
actions: [
|
|
@@ -17518,8 +17598,8 @@ const getApprovalDrawerSchema = async (instance) => {
|
|
|
17518
17598
|
/*
|
|
17519
17599
|
* @Author: baozhoutao@steedos.com
|
|
17520
17600
|
* @Date: 2022-09-16 17:27:24
|
|
17521
|
-
* @LastEditors:
|
|
17522
|
-
* @LastEditTime:
|
|
17601
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
17602
|
+
* @LastEditTime: 2025-08-28 01:24:26
|
|
17523
17603
|
* @Description:
|
|
17524
17604
|
*/
|
|
17525
17605
|
// TODO attachments
|
|
@@ -17591,11 +17671,11 @@ const getAttachmentUploadInput = async (instance)=>{
|
|
|
17591
17671
|
"type": "input-file",
|
|
17592
17672
|
labelClassName: "antd-List-heading",
|
|
17593
17673
|
className: "flex items-center",
|
|
17594
|
-
"label":
|
|
17674
|
+
"label": amisLib.i18next.t('frontend_workflow_attachment'),
|
|
17595
17675
|
mode:"inline",
|
|
17596
17676
|
"name": "file",
|
|
17597
17677
|
"id": "u:a58d02614e04",
|
|
17598
|
-
"btnLabel":
|
|
17678
|
+
"btnLabel": amisLib.i18next.t('frontend_workflow_attachment_upload'),
|
|
17599
17679
|
"btnClassName": "m-0",
|
|
17600
17680
|
"multiple": true,
|
|
17601
17681
|
"maxLength": 10,
|
|
@@ -17663,8 +17743,8 @@ const getAttachmentUploadInput = async (instance)=>{
|
|
|
17663
17743
|
/*
|
|
17664
17744
|
* @Author: baozhoutao@steedos.com
|
|
17665
17745
|
* @Date: 2022-09-16 17:26:12
|
|
17666
|
-
* @LastEditors:
|
|
17667
|
-
* @LastEditTime:
|
|
17746
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
17747
|
+
* @LastEditTime: 2025-08-28 01:23:32
|
|
17668
17748
|
* @Description:
|
|
17669
17749
|
*/
|
|
17670
17750
|
const getRelatedRecords = async (instance)=>{
|
|
@@ -17690,7 +17770,7 @@ const getRelatedInstances = async (instance)=>{
|
|
|
17690
17770
|
"type": "list",
|
|
17691
17771
|
"name": "relatedInstances",
|
|
17692
17772
|
"source": "${related_instances}",
|
|
17693
|
-
title:
|
|
17773
|
+
title: amisLib.i18next.t('frontend_workflow_related_file'),
|
|
17694
17774
|
"listItem": {
|
|
17695
17775
|
"body": [
|
|
17696
17776
|
{
|
|
@@ -17710,8 +17790,8 @@ const getRelatedInstances = async (instance)=>{
|
|
|
17710
17790
|
/*
|
|
17711
17791
|
* @Author: baozhoutao@steedos.com
|
|
17712
17792
|
* @Date: 2022-09-24 16:48:28
|
|
17713
|
-
* @LastEditors:
|
|
17714
|
-
* @LastEditTime:
|
|
17793
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
17794
|
+
* @LastEditTime: 2025-08-28 01:38:39
|
|
17715
17795
|
* @Description:
|
|
17716
17796
|
*/
|
|
17717
17797
|
|
|
@@ -17719,7 +17799,7 @@ const getInstanceApprovalHistory = async ()=>{
|
|
|
17719
17799
|
return {
|
|
17720
17800
|
"type": "table",
|
|
17721
17801
|
"headerClassName": "hidden",
|
|
17722
|
-
"title":
|
|
17802
|
+
"title": amisLib.i18next.t('frontend_workflow_approval_history'),
|
|
17723
17803
|
"source": "${historyApproves}",
|
|
17724
17804
|
"className": "m-b-none instance-approve-history",
|
|
17725
17805
|
"columnsTogglable": false,
|
|
@@ -17740,14 +17820,14 @@ const getInstanceApprovalHistory = async ()=>{
|
|
|
17740
17820
|
{
|
|
17741
17821
|
"name": "finish_date",
|
|
17742
17822
|
"label": "finish_date",
|
|
17743
|
-
"classNameExpr": "<%= data.finish_date == '
|
|
17823
|
+
"classNameExpr": "<%= data.finish_date == i18next.t('frontend_workflow_approval_history_read') ? 'text-[blue]' : (data.finish_date == i18next.t('frontend_workflow_approval_history_unprocessed') ? 'text-[red]' : '') %>"
|
|
17744
17824
|
// "type": "datetime",
|
|
17745
17825
|
// "format": "YYYY-MM-DD HH:mm"
|
|
17746
17826
|
},
|
|
17747
17827
|
{
|
|
17748
17828
|
"name": "judge",
|
|
17749
17829
|
"label": "judge",
|
|
17750
|
-
"classNameExpr": "<%= data.judge == '
|
|
17830
|
+
"classNameExpr": "<%= data.judge == i18next.t('frontend_workflow_approval_judge_approved') ? 'text-green-600' : (data.judge == i18next.t('frontend_workflow_approval_judge_rejected') ? 'text-[red]' : '') %>"
|
|
17751
17831
|
}
|
|
17752
17832
|
]
|
|
17753
17833
|
}
|
|
@@ -17756,8 +17836,8 @@ const getInstanceApprovalHistory = async ()=>{
|
|
|
17756
17836
|
/*
|
|
17757
17837
|
* @Author: baozhoutao@steedos.com
|
|
17758
17838
|
* @Date: 2022-09-07 16:20:45
|
|
17759
|
-
* @LastEditors:
|
|
17760
|
-
* @LastEditTime:
|
|
17839
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
17840
|
+
* @LastEditTime: 2025-08-28 02:36:59
|
|
17761
17841
|
* @Description:
|
|
17762
17842
|
*/
|
|
17763
17843
|
|
|
@@ -18360,6 +18440,95 @@ const getFormTableView = async (instance) => {
|
|
|
18360
18440
|
return formSchema;
|
|
18361
18441
|
};
|
|
18362
18442
|
|
|
18443
|
+
const getFormSteps = async (instance) => {
|
|
18444
|
+
const stepsSchema = [];
|
|
18445
|
+
let stepFields = [];
|
|
18446
|
+
let fields = [];
|
|
18447
|
+
let unGroupFields = [];
|
|
18448
|
+
_$1.each(instance.fields, (field) => {
|
|
18449
|
+
if (field.type === "section") {
|
|
18450
|
+
fields.push(field);
|
|
18451
|
+
}
|
|
18452
|
+
else {
|
|
18453
|
+
unGroupFields.push(field);
|
|
18454
|
+
}
|
|
18455
|
+
});
|
|
18456
|
+
if (unGroupFields.length > 0) {
|
|
18457
|
+
fields = [{
|
|
18458
|
+
type: "section",
|
|
18459
|
+
name: "General",
|
|
18460
|
+
code: "General",
|
|
18461
|
+
fields: unGroupFields
|
|
18462
|
+
}].concat(fields);
|
|
18463
|
+
}
|
|
18464
|
+
|
|
18465
|
+
for (const field of fields) {
|
|
18466
|
+
if (field.type === "section" && field.fields) {
|
|
18467
|
+
stepFields = [];
|
|
18468
|
+
let fieldSchema;
|
|
18469
|
+
for (const childField of field.fields) {
|
|
18470
|
+
fieldSchema = await getTdInputTpl(childField, true);
|
|
18471
|
+
stepFields.push(fieldSchema);
|
|
18472
|
+
}
|
|
18473
|
+
stepsSchema.push({
|
|
18474
|
+
"title": field.name,
|
|
18475
|
+
"mode": "horizontal",
|
|
18476
|
+
"body": stepFields
|
|
18477
|
+
});
|
|
18478
|
+
}
|
|
18479
|
+
}
|
|
18480
|
+
var isReadonlyBox = instance.box !== 'inbox' && instance.box !== 'draft';
|
|
18481
|
+
if (isReadonlyBox) {
|
|
18482
|
+
// 只读的审批箱中最后一步的保存按钮要隐藏
|
|
18483
|
+
if (stepsSchema.length == 1) {
|
|
18484
|
+
stepsSchema[stepsSchema.length - 1].actions = [];
|
|
18485
|
+
}
|
|
18486
|
+
else if (stepsSchema.length > 1) {
|
|
18487
|
+
stepsSchema[stepsSchema.length - 1].actions = [
|
|
18488
|
+
{
|
|
18489
|
+
"label": "Prev",
|
|
18490
|
+
"type": "button",
|
|
18491
|
+
"actionType": "prev"
|
|
18492
|
+
}
|
|
18493
|
+
];
|
|
18494
|
+
}
|
|
18495
|
+
}
|
|
18496
|
+
return stepsSchema;
|
|
18497
|
+
};
|
|
18498
|
+
|
|
18499
|
+
const getFormWizardView = async (instance) => {
|
|
18500
|
+
const formSchema = {
|
|
18501
|
+
type: "wizard",
|
|
18502
|
+
className: "instance-form-view-wizard pt-4",
|
|
18503
|
+
steps: await getFormSteps(instance),
|
|
18504
|
+
actionFinishLabel: "${'CustomAction.instances.instance_save' | t}",//"保存",
|
|
18505
|
+
id: "u:instance_wizard",
|
|
18506
|
+
target: "instance_form",
|
|
18507
|
+
"onEvent": {
|
|
18508
|
+
"change": {
|
|
18509
|
+
"actions": [
|
|
18510
|
+
{
|
|
18511
|
+
"actionType": "setValue",
|
|
18512
|
+
"componentId": "instance_form",
|
|
18513
|
+
"args": {
|
|
18514
|
+
"value": "${event.data}"
|
|
18515
|
+
}
|
|
18516
|
+
}
|
|
18517
|
+
]
|
|
18518
|
+
},
|
|
18519
|
+
"finished": { //点最后一步完成按钮触发暂存按钮事件保存数据
|
|
18520
|
+
"actions": [
|
|
18521
|
+
{
|
|
18522
|
+
"actionType": "click",
|
|
18523
|
+
"componentId": "u:instance_save"
|
|
18524
|
+
}
|
|
18525
|
+
]
|
|
18526
|
+
}
|
|
18527
|
+
},
|
|
18528
|
+
};
|
|
18529
|
+
return formSchema;
|
|
18530
|
+
};
|
|
18531
|
+
|
|
18363
18532
|
const getApplicantTableView = async (instance) => {
|
|
18364
18533
|
let applicantInput = null;
|
|
18365
18534
|
if(instance.state === 'draft'){
|
|
@@ -18410,7 +18579,7 @@ const getApplicantTableView = async (instance) => {
|
|
|
18410
18579
|
body: [
|
|
18411
18580
|
{
|
|
18412
18581
|
type: "tpl",
|
|
18413
|
-
tpl: "<div class='inline-left'
|
|
18582
|
+
tpl: "<div class='inline-left'>" + amisLib.i18next.t('frontend_workflow_instances_applicant_name_prefix') + "</div>",
|
|
18414
18583
|
id: "u:ee62634201bf",
|
|
18415
18584
|
},
|
|
18416
18585
|
applicantInput
|
|
@@ -18429,7 +18598,7 @@ const getApplicantTableView = async (instance) => {
|
|
|
18429
18598
|
body: [
|
|
18430
18599
|
{
|
|
18431
18600
|
type: "tpl",
|
|
18432
|
-
tpl: "<div class='inline-left'
|
|
18601
|
+
tpl: "<div class='inline-left'>" + amisLib.i18next.t('frontend_workflow_instance_submit_date_prefix') + "</div>",
|
|
18433
18602
|
id: "u:6d0a7763d527",
|
|
18434
18603
|
},
|
|
18435
18604
|
{
|
|
@@ -18468,7 +18637,7 @@ const getApproveButton = async (instance)=>{
|
|
|
18468
18637
|
}
|
|
18469
18638
|
return {
|
|
18470
18639
|
type: "button",
|
|
18471
|
-
label:
|
|
18640
|
+
label: amisLib.i18next.t('frontend_workflow_instance_button_sign'),
|
|
18472
18641
|
onEvent: {
|
|
18473
18642
|
click: {
|
|
18474
18643
|
actions: [
|
|
@@ -18489,6 +18658,14 @@ const getApproveButton = async (instance)=>{
|
|
|
18489
18658
|
};
|
|
18490
18659
|
|
|
18491
18660
|
const getFlowFormSchema = async (instance, box) => {
|
|
18661
|
+
const formStyle = instance.form.current.style || "table";
|
|
18662
|
+
let formContentSchema;
|
|
18663
|
+
if (formStyle === "wizard") {
|
|
18664
|
+
formContentSchema = await getFormWizardView(instance);
|
|
18665
|
+
}
|
|
18666
|
+
else {
|
|
18667
|
+
formContentSchema = await getFormTableView(instance);
|
|
18668
|
+
}
|
|
18492
18669
|
return {
|
|
18493
18670
|
type: "page",
|
|
18494
18671
|
name: "instancePage",
|
|
@@ -18565,7 +18742,7 @@ const getFlowFormSchema = async (instance, box) => {
|
|
|
18565
18742
|
textAlign: "center",
|
|
18566
18743
|
},
|
|
18567
18744
|
},
|
|
18568
|
-
|
|
18745
|
+
formContentSchema,
|
|
18569
18746
|
await getApplicantTableView(instance),
|
|
18570
18747
|
|
|
18571
18748
|
],
|
|
@@ -18618,7 +18795,19 @@ const getFlowFormSchema = async (instance, box) => {
|
|
|
18618
18795
|
actionType: "reload"
|
|
18619
18796
|
}
|
|
18620
18797
|
]
|
|
18621
|
-
}
|
|
18798
|
+
},
|
|
18799
|
+
"inited": {
|
|
18800
|
+
"actions": [
|
|
18801
|
+
{
|
|
18802
|
+
"actionType": "setValue",
|
|
18803
|
+
"componentId": "instance_form",
|
|
18804
|
+
"args": {
|
|
18805
|
+
"value": "${event.data.context.approveValues}"
|
|
18806
|
+
},
|
|
18807
|
+
"expression": "${event.data.context.form.current.style === 'wizard'}"// 表单为 wizard 样式时需要初始同步表单数据,否则直接点击暂存按钮会清空数据
|
|
18808
|
+
}
|
|
18809
|
+
]
|
|
18810
|
+
},
|
|
18622
18811
|
// inited: {
|
|
18623
18812
|
// weight: 0,
|
|
18624
18813
|
// actions: [
|
|
@@ -18746,8 +18935,8 @@ const getOpinionFieldStepsName = (field, top_keywords) => {
|
|
|
18746
18935
|
/*
|
|
18747
18936
|
* @Author: baozhoutao@steedos.com
|
|
18748
18937
|
* @Date: 2022-09-09 17:47:37
|
|
18749
|
-
* @LastEditors:
|
|
18750
|
-
* @LastEditTime:
|
|
18938
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
18939
|
+
* @LastEditTime: 2025-08-28 01:47:42
|
|
18751
18940
|
* @Description:
|
|
18752
18941
|
*/
|
|
18753
18942
|
|
|
@@ -18922,7 +19111,8 @@ const getInstanceInfo = async (props) => {
|
|
|
18922
19111
|
form_version,
|
|
18923
19112
|
form:form__expand{
|
|
18924
19113
|
_id,
|
|
18925
|
-
name
|
|
19114
|
+
name,
|
|
19115
|
+
style,
|
|
18926
19116
|
current,
|
|
18927
19117
|
historys
|
|
18928
19118
|
},
|
|
@@ -19036,7 +19226,7 @@ const getInstanceInfo = async (props) => {
|
|
|
19036
19226
|
opinion = approve.cc_description;
|
|
19037
19227
|
}
|
|
19038
19228
|
if (!finishDate) {
|
|
19039
|
-
finishDate = approve.is_read ?
|
|
19229
|
+
finishDate = approve.is_read ? amisLib.i18next.t('frontend_workflow_approval_history_read') : amisLib.i18next.t('frontend_workflow_approval_history_unprocessed');
|
|
19040
19230
|
judge = null;
|
|
19041
19231
|
} else {
|
|
19042
19232
|
finishDate = moment && moment(finishDate).format("YYYY-MM-DD HH:mm");
|
|
@@ -19047,34 +19237,34 @@ const getInstanceInfo = async (props) => {
|
|
|
19047
19237
|
judge = "";
|
|
19048
19238
|
break;
|
|
19049
19239
|
case "returned":
|
|
19050
|
-
judge = "已退回"
|
|
19240
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_returned');//"已退回"
|
|
19051
19241
|
break;
|
|
19052
19242
|
case "terminated":
|
|
19053
|
-
judge = "被取回";
|
|
19243
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_terminated');//"被取回";
|
|
19054
19244
|
break;
|
|
19055
19245
|
case "pending":
|
|
19056
|
-
judge = "审核中";
|
|
19246
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_pending');//"审核中";
|
|
19057
19247
|
break;
|
|
19058
19248
|
case "approved":
|
|
19059
|
-
judge = "已核准";
|
|
19249
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_approved');//"已核准";
|
|
19060
19250
|
break;
|
|
19061
19251
|
case "rejected":
|
|
19062
|
-
judge = "已驳回";
|
|
19252
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_rejected');//"已驳回";
|
|
19063
19253
|
break;
|
|
19064
19254
|
case "finished":
|
|
19065
|
-
judge = "已完成";
|
|
19255
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_finished');//"已完成";
|
|
19066
19256
|
break;
|
|
19067
19257
|
case "reassigned":
|
|
19068
|
-
judge = "转签核";
|
|
19258
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_reassigned');//"转签核";
|
|
19069
19259
|
break;
|
|
19070
19260
|
case "inhand":
|
|
19071
|
-
judge = "处理中";
|
|
19261
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_inhand');//"处理中";
|
|
19072
19262
|
break;
|
|
19073
19263
|
case "relocated":
|
|
19074
|
-
judge = "重定位";
|
|
19264
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_relocated');//"重定位";
|
|
19075
19265
|
break;
|
|
19076
19266
|
case "readed":
|
|
19077
|
-
judge = "已阅";
|
|
19267
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_readed');//"已阅";
|
|
19078
19268
|
break;
|
|
19079
19269
|
}
|
|
19080
19270
|
return {
|
|
@@ -19151,7 +19341,7 @@ var en_us = {
|
|
|
19151
19341
|
"CRUD.exportExcel": "Export Excel",
|
|
19152
19342
|
"CRUD.fetchFailed": "Fetch failed",
|
|
19153
19343
|
"CRUD.filter": "Filter",
|
|
19154
|
-
"CRUD.selected": "selected {{total}} items
|
|
19344
|
+
"CRUD.selected": "selected {{total}} items",
|
|
19155
19345
|
"CRUD.invalidArray": "data.items must be an array",
|
|
19156
19346
|
"CRUD.invalidData": "data is empty",
|
|
19157
19347
|
"CRUD.loadMore": "Load more",
|
|
@@ -19526,7 +19716,7 @@ var zh_cn = {
|
|
|
19526
19716
|
"CRUD.exportExcel": "导出 Excel",
|
|
19527
19717
|
"CRUD.fetchFailed": "获取失败",
|
|
19528
19718
|
"CRUD.filter": "筛选",
|
|
19529
|
-
"CRUD.selected": "已选{{total}}
|
|
19719
|
+
"CRUD.selected": "已选{{total}}条:",
|
|
19530
19720
|
"CRUD.invalidArray": "data.items 必须是数组",
|
|
19531
19721
|
"CRUD.invalidData": "返回数据格式不正确,data 没有数据",
|
|
19532
19722
|
"CRUD.loadMore": "加载更多",
|