@steedos-widgets/amis-lib 6.10.1-beta.48 → 6.10.1-beta.50
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 +239 -47
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +240 -48
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +223 -202
- 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
|
|
|
@@ -18119,6 +18199,8 @@ const getFieldEditTpl = async (field, label)=>{
|
|
|
18119
18199
|
tpl.editable = tpl.addable;
|
|
18120
18200
|
tpl.copyable = tpl.addable;
|
|
18121
18201
|
tpl.removable = tpl.addable;
|
|
18202
|
+
// tpl.fieldPrefix = field.name + "_";
|
|
18203
|
+
tpl.autoGeneratePrimaryKeyValue = true;
|
|
18122
18204
|
tpl.fields = [];
|
|
18123
18205
|
if(tpl.editable){
|
|
18124
18206
|
tpl.className = `${tpl.className || ''} steedos-input-table-editable`;
|
|
@@ -18360,6 +18442,95 @@ const getFormTableView = async (instance) => {
|
|
|
18360
18442
|
return formSchema;
|
|
18361
18443
|
};
|
|
18362
18444
|
|
|
18445
|
+
const getFormSteps = async (instance) => {
|
|
18446
|
+
const stepsSchema = [];
|
|
18447
|
+
let stepFields = [];
|
|
18448
|
+
let fields = [];
|
|
18449
|
+
let unGroupFields = [];
|
|
18450
|
+
_$1.each(instance.fields, (field) => {
|
|
18451
|
+
if (field.type === "section") {
|
|
18452
|
+
fields.push(field);
|
|
18453
|
+
}
|
|
18454
|
+
else {
|
|
18455
|
+
unGroupFields.push(field);
|
|
18456
|
+
}
|
|
18457
|
+
});
|
|
18458
|
+
if (unGroupFields.length > 0) {
|
|
18459
|
+
fields = [{
|
|
18460
|
+
type: "section",
|
|
18461
|
+
name: "General",
|
|
18462
|
+
code: "General",
|
|
18463
|
+
fields: unGroupFields
|
|
18464
|
+
}].concat(fields);
|
|
18465
|
+
}
|
|
18466
|
+
|
|
18467
|
+
for (const field of fields) {
|
|
18468
|
+
if (field.type === "section" && field.fields) {
|
|
18469
|
+
stepFields = [];
|
|
18470
|
+
let fieldSchema;
|
|
18471
|
+
for (const childField of field.fields) {
|
|
18472
|
+
fieldSchema = await getTdInputTpl(childField, true);
|
|
18473
|
+
stepFields.push(fieldSchema);
|
|
18474
|
+
}
|
|
18475
|
+
stepsSchema.push({
|
|
18476
|
+
"title": field.name,
|
|
18477
|
+
"mode": "horizontal",
|
|
18478
|
+
"body": stepFields
|
|
18479
|
+
});
|
|
18480
|
+
}
|
|
18481
|
+
}
|
|
18482
|
+
var isReadonlyBox = instance.box !== 'inbox' && instance.box !== 'draft';
|
|
18483
|
+
if (isReadonlyBox) {
|
|
18484
|
+
// 只读的审批箱中最后一步的保存按钮要隐藏
|
|
18485
|
+
if (stepsSchema.length == 1) {
|
|
18486
|
+
stepsSchema[stepsSchema.length - 1].actions = [];
|
|
18487
|
+
}
|
|
18488
|
+
else if (stepsSchema.length > 1) {
|
|
18489
|
+
stepsSchema[stepsSchema.length - 1].actions = [
|
|
18490
|
+
{
|
|
18491
|
+
"label": "Prev",
|
|
18492
|
+
"type": "button",
|
|
18493
|
+
"actionType": "prev"
|
|
18494
|
+
}
|
|
18495
|
+
];
|
|
18496
|
+
}
|
|
18497
|
+
}
|
|
18498
|
+
return stepsSchema;
|
|
18499
|
+
};
|
|
18500
|
+
|
|
18501
|
+
const getFormWizardView = async (instance) => {
|
|
18502
|
+
const formSchema = {
|
|
18503
|
+
type: "wizard",
|
|
18504
|
+
className: "instance-form-view-wizard pt-4",
|
|
18505
|
+
steps: await getFormSteps(instance),
|
|
18506
|
+
actionFinishLabel: "${'CustomAction.instances.instance_save' | t}",//"保存",
|
|
18507
|
+
id: "u:instance_wizard",
|
|
18508
|
+
target: "instance_form",
|
|
18509
|
+
"onEvent": {
|
|
18510
|
+
"change": {
|
|
18511
|
+
"actions": [
|
|
18512
|
+
{
|
|
18513
|
+
"actionType": "setValue",
|
|
18514
|
+
"componentId": "instance_form",
|
|
18515
|
+
"args": {
|
|
18516
|
+
"value": "${event.data}"
|
|
18517
|
+
}
|
|
18518
|
+
}
|
|
18519
|
+
]
|
|
18520
|
+
},
|
|
18521
|
+
"finished": { //点最后一步完成按钮触发暂存按钮事件保存数据
|
|
18522
|
+
"actions": [
|
|
18523
|
+
{
|
|
18524
|
+
"actionType": "click",
|
|
18525
|
+
"componentId": "u:instance_save"
|
|
18526
|
+
}
|
|
18527
|
+
]
|
|
18528
|
+
}
|
|
18529
|
+
},
|
|
18530
|
+
};
|
|
18531
|
+
return formSchema;
|
|
18532
|
+
};
|
|
18533
|
+
|
|
18363
18534
|
const getApplicantTableView = async (instance) => {
|
|
18364
18535
|
let applicantInput = null;
|
|
18365
18536
|
if(instance.state === 'draft'){
|
|
@@ -18410,7 +18581,7 @@ const getApplicantTableView = async (instance) => {
|
|
|
18410
18581
|
body: [
|
|
18411
18582
|
{
|
|
18412
18583
|
type: "tpl",
|
|
18413
|
-
tpl: "<div class='inline-left'
|
|
18584
|
+
tpl: "<div class='inline-left'>" + amisLib.i18next.t('frontend_workflow_instances_applicant_name_prefix') + "</div>",
|
|
18414
18585
|
id: "u:ee62634201bf",
|
|
18415
18586
|
},
|
|
18416
18587
|
applicantInput
|
|
@@ -18429,7 +18600,7 @@ const getApplicantTableView = async (instance) => {
|
|
|
18429
18600
|
body: [
|
|
18430
18601
|
{
|
|
18431
18602
|
type: "tpl",
|
|
18432
|
-
tpl: "<div class='inline-left'
|
|
18603
|
+
tpl: "<div class='inline-left'>" + amisLib.i18next.t('frontend_workflow_instance_submit_date_prefix') + "</div>",
|
|
18433
18604
|
id: "u:6d0a7763d527",
|
|
18434
18605
|
},
|
|
18435
18606
|
{
|
|
@@ -18468,7 +18639,7 @@ const getApproveButton = async (instance)=>{
|
|
|
18468
18639
|
}
|
|
18469
18640
|
return {
|
|
18470
18641
|
type: "button",
|
|
18471
|
-
label:
|
|
18642
|
+
label: amisLib.i18next.t('frontend_workflow_instance_button_sign'),
|
|
18472
18643
|
onEvent: {
|
|
18473
18644
|
click: {
|
|
18474
18645
|
actions: [
|
|
@@ -18489,6 +18660,14 @@ const getApproveButton = async (instance)=>{
|
|
|
18489
18660
|
};
|
|
18490
18661
|
|
|
18491
18662
|
const getFlowFormSchema = async (instance, box) => {
|
|
18663
|
+
const formStyle = instance.form.current.style || "table";
|
|
18664
|
+
let formContentSchema;
|
|
18665
|
+
if (formStyle === "wizard") {
|
|
18666
|
+
formContentSchema = await getFormWizardView(instance);
|
|
18667
|
+
}
|
|
18668
|
+
else {
|
|
18669
|
+
formContentSchema = await getFormTableView(instance);
|
|
18670
|
+
}
|
|
18492
18671
|
return {
|
|
18493
18672
|
type: "page",
|
|
18494
18673
|
name: "instancePage",
|
|
@@ -18565,7 +18744,7 @@ const getFlowFormSchema = async (instance, box) => {
|
|
|
18565
18744
|
textAlign: "center",
|
|
18566
18745
|
},
|
|
18567
18746
|
},
|
|
18568
|
-
|
|
18747
|
+
formContentSchema,
|
|
18569
18748
|
await getApplicantTableView(instance),
|
|
18570
18749
|
|
|
18571
18750
|
],
|
|
@@ -18618,7 +18797,19 @@ const getFlowFormSchema = async (instance, box) => {
|
|
|
18618
18797
|
actionType: "reload"
|
|
18619
18798
|
}
|
|
18620
18799
|
]
|
|
18621
|
-
}
|
|
18800
|
+
},
|
|
18801
|
+
"inited": {
|
|
18802
|
+
"actions": [
|
|
18803
|
+
{
|
|
18804
|
+
"actionType": "setValue",
|
|
18805
|
+
"componentId": "instance_form",
|
|
18806
|
+
"args": {
|
|
18807
|
+
"value": "${event.data.context.approveValues}"
|
|
18808
|
+
},
|
|
18809
|
+
"expression": "${event.data.context.form.current.style === 'wizard'}"// 表单为 wizard 样式时需要初始同步表单数据,否则直接点击暂存按钮会清空数据
|
|
18810
|
+
}
|
|
18811
|
+
]
|
|
18812
|
+
},
|
|
18622
18813
|
// inited: {
|
|
18623
18814
|
// weight: 0,
|
|
18624
18815
|
// actions: [
|
|
@@ -18746,8 +18937,8 @@ const getOpinionFieldStepsName = (field, top_keywords) => {
|
|
|
18746
18937
|
/*
|
|
18747
18938
|
* @Author: baozhoutao@steedos.com
|
|
18748
18939
|
* @Date: 2022-09-09 17:47:37
|
|
18749
|
-
* @LastEditors:
|
|
18750
|
-
* @LastEditTime:
|
|
18940
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
18941
|
+
* @LastEditTime: 2025-08-28 01:47:42
|
|
18751
18942
|
* @Description:
|
|
18752
18943
|
*/
|
|
18753
18944
|
|
|
@@ -18922,7 +19113,8 @@ const getInstanceInfo = async (props) => {
|
|
|
18922
19113
|
form_version,
|
|
18923
19114
|
form:form__expand{
|
|
18924
19115
|
_id,
|
|
18925
|
-
name
|
|
19116
|
+
name,
|
|
19117
|
+
style,
|
|
18926
19118
|
current,
|
|
18927
19119
|
historys
|
|
18928
19120
|
},
|
|
@@ -19036,7 +19228,7 @@ const getInstanceInfo = async (props) => {
|
|
|
19036
19228
|
opinion = approve.cc_description;
|
|
19037
19229
|
}
|
|
19038
19230
|
if (!finishDate) {
|
|
19039
|
-
finishDate = approve.is_read ?
|
|
19231
|
+
finishDate = approve.is_read ? amisLib.i18next.t('frontend_workflow_approval_history_read') : amisLib.i18next.t('frontend_workflow_approval_history_unprocessed');
|
|
19040
19232
|
judge = null;
|
|
19041
19233
|
} else {
|
|
19042
19234
|
finishDate = moment && moment(finishDate).format("YYYY-MM-DD HH:mm");
|
|
@@ -19047,34 +19239,34 @@ const getInstanceInfo = async (props) => {
|
|
|
19047
19239
|
judge = "";
|
|
19048
19240
|
break;
|
|
19049
19241
|
case "returned":
|
|
19050
|
-
judge = "已退回"
|
|
19242
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_returned');//"已退回"
|
|
19051
19243
|
break;
|
|
19052
19244
|
case "terminated":
|
|
19053
|
-
judge = "被取回";
|
|
19245
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_terminated');//"被取回";
|
|
19054
19246
|
break;
|
|
19055
19247
|
case "pending":
|
|
19056
|
-
judge = "审核中";
|
|
19248
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_pending');//"审核中";
|
|
19057
19249
|
break;
|
|
19058
19250
|
case "approved":
|
|
19059
|
-
judge = "已核准";
|
|
19251
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_approved');//"已核准";
|
|
19060
19252
|
break;
|
|
19061
19253
|
case "rejected":
|
|
19062
|
-
judge = "已驳回";
|
|
19254
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_rejected');//"已驳回";
|
|
19063
19255
|
break;
|
|
19064
19256
|
case "finished":
|
|
19065
|
-
judge = "已完成";
|
|
19257
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_finished');//"已完成";
|
|
19066
19258
|
break;
|
|
19067
19259
|
case "reassigned":
|
|
19068
|
-
judge = "转签核";
|
|
19260
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_reassigned');//"转签核";
|
|
19069
19261
|
break;
|
|
19070
19262
|
case "inhand":
|
|
19071
|
-
judge = "处理中";
|
|
19263
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_inhand');//"处理中";
|
|
19072
19264
|
break;
|
|
19073
19265
|
case "relocated":
|
|
19074
|
-
judge = "重定位";
|
|
19266
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_relocated');//"重定位";
|
|
19075
19267
|
break;
|
|
19076
19268
|
case "readed":
|
|
19077
|
-
judge = "已阅";
|
|
19269
|
+
judge = amisLib.i18next.t('frontend_workflow_approval_judge_readed');//"已阅";
|
|
19078
19270
|
break;
|
|
19079
19271
|
}
|
|
19080
19272
|
return {
|
|
@@ -19151,7 +19343,7 @@ var en_us = {
|
|
|
19151
19343
|
"CRUD.exportExcel": "Export Excel",
|
|
19152
19344
|
"CRUD.fetchFailed": "Fetch failed",
|
|
19153
19345
|
"CRUD.filter": "Filter",
|
|
19154
|
-
"CRUD.selected": "selected {{total}} items
|
|
19346
|
+
"CRUD.selected": "selected {{total}} items",
|
|
19155
19347
|
"CRUD.invalidArray": "data.items must be an array",
|
|
19156
19348
|
"CRUD.invalidData": "data is empty",
|
|
19157
19349
|
"CRUD.loadMore": "Load more",
|
|
@@ -19526,7 +19718,7 @@ var zh_cn = {
|
|
|
19526
19718
|
"CRUD.exportExcel": "导出 Excel",
|
|
19527
19719
|
"CRUD.fetchFailed": "获取失败",
|
|
19528
19720
|
"CRUD.filter": "筛选",
|
|
19529
|
-
"CRUD.selected": "已选{{total}}
|
|
19721
|
+
"CRUD.selected": "已选{{total}}条:",
|
|
19530
19722
|
"CRUD.invalidArray": "data.items 必须是数组",
|
|
19531
19723
|
"CRUD.invalidData": "返回数据格式不正确,data 没有数据",
|
|
19532
19724
|
"CRUD.loadMore": "加载更多",
|