@steedos-labs/plugin-workflow 3.0.0-beta.29 → 3.0.0-beta.31
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/main/default/client/instance.client.js +2 -2
- package/main/default/manager/import.js +16 -1
- package/main/default/manager/push_manager.js +14 -6
- package/main/default/methods/trace_approve_cc.js +568 -0
- package/main/default/objectTranslations/instances.en/instances.en.objectTranslation.yml +212 -0
- package/main/default/objectTranslations/instances.zh-CN/instances.zh-CN.objectTranslation.yml +209 -0
- package/main/default/objects/flows/buttons/newexport.button.yml +1 -1
- package/main/default/objects/flows/buttons/newimport.button.yml +2 -1
- package/main/default/objects/flows/flows.object.yml +1 -0
- package/main/default/objects/instances/buttons/instance_cc.button.yml +1 -1
- package/main/default/objects/instances/buttons/instance_distribute.button.yml +3 -2
- package/main/default/objects/instances/buttons/instance_forward.button.yml +1 -1
- package/main/default/objects/instances/buttons/instance_reassign.button.yml +1 -16
- package/main/default/objects/instances/buttons/instance_relocate.button.yml +1 -1
- package/main/default/objects/instances/buttons/instance_retrieve.button.yml +106 -2
- package/main/default/objects/instances/buttons/instance_save.button.yml +1 -1
- package/main/default/objects/instances/listviews/monitor.listview.yml +0 -1
- package/main/default/pages/instance_tasks_list.page.amis.json +6 -99
- package/main/default/pages/instances_list.page.amis.json +6 -100
- package/main/default/routes/api_cc.router.js +5 -12
- package/main/default/routes/api_flow_permission.router.js +7 -2
- package/main/default/routes/api_workflow_instance_return.router.js +164 -167
- package/main/default/routes/api_workflow_reassign.router.js +200 -196
- package/main/default/routes/api_workflow_relocate.router.js +1 -1
- package/main/default/routes/api_workflow_retrieve.router.js +246 -237
- package/main/default/routes/export.router.js +5 -4
- package/main/default/routes/flow_form_design.ejs +2 -0
- package/main/default/routes/import.router.js +6 -7
- package/main/default/triggers/amis_form_design.trigger.js +1 -1
- package/main/default/utils/designerManager.js +1 -0
- package/package.json +3 -2
- package/package.service.js +20 -6
- package/src/webhook_queue.js +283 -0
- package/main/default/manager/index.js +0 -23
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
name: instances
|
|
2
|
+
label: Request
|
|
3
|
+
description:
|
|
4
|
+
fields:
|
|
5
|
+
name:
|
|
6
|
+
label: Name
|
|
7
|
+
help:
|
|
8
|
+
description:
|
|
9
|
+
flow:
|
|
10
|
+
label: Workflow
|
|
11
|
+
help:
|
|
12
|
+
description:
|
|
13
|
+
flow_version:
|
|
14
|
+
label: Workflow Version
|
|
15
|
+
help:
|
|
16
|
+
description:
|
|
17
|
+
form:
|
|
18
|
+
label: Form
|
|
19
|
+
help:
|
|
20
|
+
description:
|
|
21
|
+
form_version:
|
|
22
|
+
label: Form Version
|
|
23
|
+
help:
|
|
24
|
+
description:
|
|
25
|
+
submitter:
|
|
26
|
+
label: Submitter
|
|
27
|
+
help:
|
|
28
|
+
description:
|
|
29
|
+
submitter_name:
|
|
30
|
+
label: Submitter's Name
|
|
31
|
+
help:
|
|
32
|
+
description:
|
|
33
|
+
submit_date:
|
|
34
|
+
label: Submit Date
|
|
35
|
+
help:
|
|
36
|
+
description:
|
|
37
|
+
applicant:
|
|
38
|
+
label: Applicant
|
|
39
|
+
help:
|
|
40
|
+
description:
|
|
41
|
+
applicant_name:
|
|
42
|
+
label: Applicant's Name
|
|
43
|
+
help:
|
|
44
|
+
description:
|
|
45
|
+
applicant_organization:
|
|
46
|
+
label: Applicant Department
|
|
47
|
+
help:
|
|
48
|
+
description:
|
|
49
|
+
applicant_organization_name:
|
|
50
|
+
label: Applicant Department's Name
|
|
51
|
+
help:
|
|
52
|
+
description:
|
|
53
|
+
applicant_organization_fullname:
|
|
54
|
+
label: Applicant Department's Fullname
|
|
55
|
+
help:
|
|
56
|
+
description:
|
|
57
|
+
code:
|
|
58
|
+
label: Code
|
|
59
|
+
help:
|
|
60
|
+
description:
|
|
61
|
+
values:
|
|
62
|
+
label: Field Values
|
|
63
|
+
help:
|
|
64
|
+
description:
|
|
65
|
+
inbox_users:
|
|
66
|
+
label: Inbox Users
|
|
67
|
+
help:
|
|
68
|
+
description:
|
|
69
|
+
outbox_users:
|
|
70
|
+
label: Outbox Users
|
|
71
|
+
help:
|
|
72
|
+
description:
|
|
73
|
+
traces:
|
|
74
|
+
label: Processing Traces
|
|
75
|
+
help:
|
|
76
|
+
description:
|
|
77
|
+
attachments:
|
|
78
|
+
label: Attachments
|
|
79
|
+
help:
|
|
80
|
+
description:
|
|
81
|
+
flow_name:
|
|
82
|
+
label: Workflow Name
|
|
83
|
+
help:
|
|
84
|
+
description:
|
|
85
|
+
category_name:
|
|
86
|
+
label: Category Name
|
|
87
|
+
help:
|
|
88
|
+
description:
|
|
89
|
+
category:
|
|
90
|
+
label: Category
|
|
91
|
+
help:
|
|
92
|
+
description:
|
|
93
|
+
state:
|
|
94
|
+
label: Processing State
|
|
95
|
+
help:
|
|
96
|
+
options:
|
|
97
|
+
- label: Draft
|
|
98
|
+
value: draft
|
|
99
|
+
- label: Pending
|
|
100
|
+
value: pending
|
|
101
|
+
- label: Completed
|
|
102
|
+
value: completed
|
|
103
|
+
description:
|
|
104
|
+
is_archived:
|
|
105
|
+
label: Archived
|
|
106
|
+
help:
|
|
107
|
+
description:
|
|
108
|
+
is_deleted:
|
|
109
|
+
label: Deleted
|
|
110
|
+
help:
|
|
111
|
+
description:
|
|
112
|
+
related_instances:
|
|
113
|
+
label: Related Instances
|
|
114
|
+
help:
|
|
115
|
+
description:
|
|
116
|
+
record_ids:
|
|
117
|
+
label: Record IDs
|
|
118
|
+
help:
|
|
119
|
+
description:
|
|
120
|
+
record_ids.$.o:
|
|
121
|
+
label:
|
|
122
|
+
help:
|
|
123
|
+
description:
|
|
124
|
+
record_ids.$.ids:
|
|
125
|
+
label:
|
|
126
|
+
help:
|
|
127
|
+
description:
|
|
128
|
+
current_step_auto_submit:
|
|
129
|
+
label: Auto Submit if Time Out
|
|
130
|
+
help:
|
|
131
|
+
description:
|
|
132
|
+
current_step_name:
|
|
133
|
+
label: Current Step Name
|
|
134
|
+
help:
|
|
135
|
+
description:
|
|
136
|
+
applicant_company:
|
|
137
|
+
label: Applicant's Division
|
|
138
|
+
help:
|
|
139
|
+
description:
|
|
140
|
+
cc_count:
|
|
141
|
+
label: CC Count
|
|
142
|
+
help:
|
|
143
|
+
description:
|
|
144
|
+
listviews:
|
|
145
|
+
all:
|
|
146
|
+
label: All
|
|
147
|
+
inbox:
|
|
148
|
+
label: Inbox
|
|
149
|
+
outbox:
|
|
150
|
+
label: Outbox
|
|
151
|
+
draft:
|
|
152
|
+
label: Draft
|
|
153
|
+
pending:
|
|
154
|
+
label: In Progress
|
|
155
|
+
completed:
|
|
156
|
+
label: Finished
|
|
157
|
+
monitor:
|
|
158
|
+
label: Monitor
|
|
159
|
+
actions:
|
|
160
|
+
view_instance:
|
|
161
|
+
label: View Instance
|
|
162
|
+
instance_terminate:
|
|
163
|
+
label: Cancel Request
|
|
164
|
+
instance_save:
|
|
165
|
+
label: Save
|
|
166
|
+
instance_related:
|
|
167
|
+
label: Linked requests
|
|
168
|
+
instance_distribute:
|
|
169
|
+
label: Distribute
|
|
170
|
+
instance_submit:
|
|
171
|
+
label: Submit
|
|
172
|
+
instance_forward:
|
|
173
|
+
label: Request Forward
|
|
174
|
+
instance_cc:
|
|
175
|
+
label: Carbon Copy
|
|
176
|
+
instance_relocate:
|
|
177
|
+
label: Relocate
|
|
178
|
+
instance_new:
|
|
179
|
+
label: New Request
|
|
180
|
+
instance_delete:
|
|
181
|
+
label: Delete
|
|
182
|
+
instance_delete_many:
|
|
183
|
+
label: Delete
|
|
184
|
+
CustomLabels:
|
|
185
|
+
instance_action_new_dialog_title: Please select the process
|
|
186
|
+
instance_action_new_dialog_msg_success: Created successfully!
|
|
187
|
+
instance_action_new_dialog_msg_failed: Created failed!
|
|
188
|
+
instance_action_delete_many_msg_not_select: Please select at least one record
|
|
189
|
+
instance_action_instance_save_msg_success: Temporary storage successful
|
|
190
|
+
instance_action_instance_save_msg_failed: Temporary storage failed
|
|
191
|
+
instance_action_instance_distribute_dialog_sub_title: Distribute the currently selected file to the new process and continue to execute the approval operation
|
|
192
|
+
instance_action_instance_distribute_dialog_field_process: Process name
|
|
193
|
+
instance_action_instance_distribute_dialog_field_users: Distribute to
|
|
194
|
+
instance_action_instance_distribute_dialog_field_description: Description
|
|
195
|
+
instance_action_instance_distribute_dialog_field_to_self: Distribute it to yourself too
|
|
196
|
+
instance_action_instance_distribute_dialog_field_to_attachment: Save the original form as an attachment
|
|
197
|
+
instance_action_instance_distribute_dialog_field_related: Automatically create associated files
|
|
198
|
+
instance_action_instance_cc_dialog_title_prefix: "Current Step:"
|
|
199
|
+
instance_action_instance_cc_dialog_field_users: Carbon Copy To
|
|
200
|
+
instance_action_instance_cc_dialog_field_description: Carbon Copy Description
|
|
201
|
+
instance_action_instance_cc_dialog_sub_title: Forward the currently selected file to the new process and continue to execute the approval operation.
|
|
202
|
+
instance_action_terminate_dialog_title: Cancel Request
|
|
203
|
+
instance_action_terminate_dialog_content: Please fill in the reasons for canceling the application
|
|
204
|
+
instance_action_terminate_dialog_msg_success: The cancellation application has been successful!
|
|
205
|
+
instance_action_terminate_dialog_msg_failed: The cancellation application failed.
|
|
206
|
+
instance_action_instance_relocate_dialog_title: Relocate
|
|
207
|
+
instance_action_instance_relocate_dialog_title_prefix: "Current Step:"
|
|
208
|
+
instance_action_instance_relocate_dialog_field_reason: Please fill in the reasons for the Relocating
|
|
209
|
+
instance_action_relocate_dialog_msg_success: Relocated successful
|
|
210
|
+
instance_action_relocate_dialog_msg_failed: Relocated failed
|
|
211
|
+
instance_action_instance_save_msg_upgraded: The workflow has been upgraded. The page will refresh automatically.
|
|
212
|
+
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
name: instances
|
|
2
|
+
label: 审批单
|
|
3
|
+
description:
|
|
4
|
+
fields:
|
|
5
|
+
name:
|
|
6
|
+
label: 文件标题
|
|
7
|
+
help:
|
|
8
|
+
description:
|
|
9
|
+
flow:
|
|
10
|
+
label: 流程
|
|
11
|
+
help:
|
|
12
|
+
description:
|
|
13
|
+
flow_version:
|
|
14
|
+
label: 流程版本号
|
|
15
|
+
help:
|
|
16
|
+
description:
|
|
17
|
+
form:
|
|
18
|
+
label: 表单
|
|
19
|
+
help:
|
|
20
|
+
description:
|
|
21
|
+
form_version:
|
|
22
|
+
label: 表单版本号
|
|
23
|
+
help:
|
|
24
|
+
description:
|
|
25
|
+
submitter:
|
|
26
|
+
label: 提交人
|
|
27
|
+
help:
|
|
28
|
+
description:
|
|
29
|
+
submitter_name:
|
|
30
|
+
label: 提交人姓名
|
|
31
|
+
help:
|
|
32
|
+
description:
|
|
33
|
+
submit_date:
|
|
34
|
+
label: 提交日期
|
|
35
|
+
help:
|
|
36
|
+
description:
|
|
37
|
+
applicant:
|
|
38
|
+
label: 申请人
|
|
39
|
+
help:
|
|
40
|
+
description:
|
|
41
|
+
applicant_name:
|
|
42
|
+
label: 申请人姓名
|
|
43
|
+
help:
|
|
44
|
+
description:
|
|
45
|
+
applicant_organization:
|
|
46
|
+
label: 申请人部门
|
|
47
|
+
help:
|
|
48
|
+
description:
|
|
49
|
+
applicant_organization_name:
|
|
50
|
+
label: 申请人部门名称
|
|
51
|
+
help:
|
|
52
|
+
description:
|
|
53
|
+
applicant_organization_fullname:
|
|
54
|
+
label: 申请人部门全称
|
|
55
|
+
help:
|
|
56
|
+
description:
|
|
57
|
+
code:
|
|
58
|
+
label: 公式
|
|
59
|
+
help:
|
|
60
|
+
description:
|
|
61
|
+
values:
|
|
62
|
+
label: 审批单字段
|
|
63
|
+
help:
|
|
64
|
+
description:
|
|
65
|
+
inbox_users:
|
|
66
|
+
label: 待办处理人
|
|
67
|
+
help:
|
|
68
|
+
description:
|
|
69
|
+
outbox_users:
|
|
70
|
+
label: 已办处理人
|
|
71
|
+
help:
|
|
72
|
+
description:
|
|
73
|
+
traces:
|
|
74
|
+
label: 步骤审批
|
|
75
|
+
help:
|
|
76
|
+
description:
|
|
77
|
+
attachments:
|
|
78
|
+
label: 附件
|
|
79
|
+
help:
|
|
80
|
+
description:
|
|
81
|
+
flow_name:
|
|
82
|
+
label: 流程名
|
|
83
|
+
help:
|
|
84
|
+
description:
|
|
85
|
+
category_name:
|
|
86
|
+
label: 流程分类
|
|
87
|
+
help:
|
|
88
|
+
description:
|
|
89
|
+
category:
|
|
90
|
+
label: 流程分类
|
|
91
|
+
help:
|
|
92
|
+
description:
|
|
93
|
+
state:
|
|
94
|
+
label: 审批单状态
|
|
95
|
+
help:
|
|
96
|
+
options:
|
|
97
|
+
- label: 草稿
|
|
98
|
+
value: draft
|
|
99
|
+
- label: 进行中
|
|
100
|
+
value: pending
|
|
101
|
+
- label: 已完成
|
|
102
|
+
value: completed
|
|
103
|
+
description:
|
|
104
|
+
is_archived:
|
|
105
|
+
label: 已归档
|
|
106
|
+
help:
|
|
107
|
+
description:
|
|
108
|
+
is_deleted:
|
|
109
|
+
label: 已删除
|
|
110
|
+
help:
|
|
111
|
+
description:
|
|
112
|
+
related_instances:
|
|
113
|
+
label: 相关审批单
|
|
114
|
+
help:
|
|
115
|
+
description:
|
|
116
|
+
record_ids:
|
|
117
|
+
label: 记录ID
|
|
118
|
+
help:
|
|
119
|
+
description:
|
|
120
|
+
record_ids.$.o:
|
|
121
|
+
label:
|
|
122
|
+
help:
|
|
123
|
+
description:
|
|
124
|
+
record_ids.$.ids:
|
|
125
|
+
label:
|
|
126
|
+
help:
|
|
127
|
+
description:
|
|
128
|
+
current_step_auto_submit:
|
|
129
|
+
label: 当前步骤超时自动流转
|
|
130
|
+
help:
|
|
131
|
+
description:
|
|
132
|
+
current_step_name:
|
|
133
|
+
label: 当前步骤
|
|
134
|
+
help:
|
|
135
|
+
description:
|
|
136
|
+
applicant_company:
|
|
137
|
+
label: 申请人所属分部
|
|
138
|
+
help:
|
|
139
|
+
description:
|
|
140
|
+
cc_count:
|
|
141
|
+
label: 传阅数
|
|
142
|
+
help:
|
|
143
|
+
description:
|
|
144
|
+
listviews:
|
|
145
|
+
all:
|
|
146
|
+
label: 所有
|
|
147
|
+
inbox:
|
|
148
|
+
label: 待办文件
|
|
149
|
+
outbox:
|
|
150
|
+
label: 已办文件
|
|
151
|
+
draft:
|
|
152
|
+
label: 草稿
|
|
153
|
+
pending:
|
|
154
|
+
label: 进行中
|
|
155
|
+
completed:
|
|
156
|
+
label: 已完成
|
|
157
|
+
monitor:
|
|
158
|
+
label: 监控箱
|
|
159
|
+
actions:
|
|
160
|
+
view_instance:
|
|
161
|
+
label: 查看审批单
|
|
162
|
+
instance_terminate:
|
|
163
|
+
label: 取消申请
|
|
164
|
+
instance_save:
|
|
165
|
+
label: 保存
|
|
166
|
+
instance_related:
|
|
167
|
+
label: 关联文件
|
|
168
|
+
instance_distribute:
|
|
169
|
+
label: 分发
|
|
170
|
+
instance_submit:
|
|
171
|
+
label: 发送
|
|
172
|
+
instance_forward:
|
|
173
|
+
label: 转发
|
|
174
|
+
instance_cc:
|
|
175
|
+
label: 传阅
|
|
176
|
+
instance_relocate:
|
|
177
|
+
label: 重定位
|
|
178
|
+
instance_new:
|
|
179
|
+
label: 新建
|
|
180
|
+
instance_delete_many:
|
|
181
|
+
label: 删除
|
|
182
|
+
CustomLabels:
|
|
183
|
+
instance_action_new_dialog_title: 请选择流程
|
|
184
|
+
instance_action_new_dialog_msg_success: 创建成功!
|
|
185
|
+
instance_action_new_dialog_msg_failed: 创建失败!
|
|
186
|
+
instance_action_delete_many_msg_not_select: 请至少选择一条记录
|
|
187
|
+
instance_action_instance_save_msg_success: 暂存成功
|
|
188
|
+
instance_action_instance_save_msg_failed: 暂存失败
|
|
189
|
+
instance_action_instance_distribute_dialog_sub_title: 将当前选中的文件分发到新的流程,继续执行审批操作
|
|
190
|
+
instance_action_instance_distribute_dialog_field_process: 流程名称
|
|
191
|
+
instance_action_instance_distribute_dialog_field_users: 分发对象
|
|
192
|
+
instance_action_instance_distribute_dialog_field_description: 备注
|
|
193
|
+
instance_action_instance_distribute_dialog_field_to_self: 同时分发给自己
|
|
194
|
+
instance_action_instance_distribute_dialog_field_to_attachment: 将原表单存储为附件
|
|
195
|
+
instance_action_instance_distribute_dialog_field_related: 自动创建关联文件
|
|
196
|
+
instance_action_instance_cc_dialog_title_prefix: 当前步骤:
|
|
197
|
+
instance_action_instance_cc_dialog_field_users: 传阅对象
|
|
198
|
+
instance_action_instance_cc_dialog_field_description: 传阅说明
|
|
199
|
+
instance_action_instance_cc_dialog_sub_title: 将当前选中的文件转发到新的流程,继续执行审批操作
|
|
200
|
+
instance_action_terminate_dialog_title: 取消申请
|
|
201
|
+
instance_action_terminate_dialog_content: 请填写取消申请的理由
|
|
202
|
+
instance_action_terminate_dialog_msg_success: 取消申请成功!
|
|
203
|
+
instance_action_terminate_dialog_msg_failed: 取消申请失败
|
|
204
|
+
instance_action_instance_relocate_dialog_title: 重定位
|
|
205
|
+
instance_action_instance_relocate_dialog_title_prefix: 当前步骤:
|
|
206
|
+
instance_action_instance_relocate_dialog_field_reason: 请填写重定位的理由
|
|
207
|
+
instance_action_relocate_dialog_msg_success: 重定位成功
|
|
208
|
+
instance_action_relocate_dialog_msg_failed: 重定位失败
|
|
209
|
+
instance_action_instance_save_msg_upgraded: 流程已升级,页面将自动刷新。
|
|
@@ -12,7 +12,7 @@ amis_schema: |-
|
|
|
12
12
|
"weight": 0,
|
|
13
13
|
"actions": [
|
|
14
14
|
{
|
|
15
|
-
"script": "// SteedosUI.refs(\"flows-listview-undefined\")\n
|
|
15
|
+
"script": "// SteedosUI.refs(\"flows-listview-undefined\")\n debugger;\nconst ids = event.data._scoped.parent.getComponentById(\"listview_flows\").props.store.selectedItems.toJSON();\n\nif (ids && ids.length > 0) {\n \n window.open(Steedos.absoluteUrl(\"/api/workflow/export/form?flows=\" + _.map(ids,\"_id\").join(',')), '_blank');\n \n} else {\n \n alert(t('flows.newexport.alert'))\n \n }\n\n\n",
|
|
16
16
|
"actionType": "custom"
|
|
17
17
|
}
|
|
18
18
|
]
|
|
@@ -63,7 +63,8 @@ amis_schema: |-
|
|
|
63
63
|
"messages": {},
|
|
64
64
|
"requestAdaptor": "api.url += api.body.global.spaceId\n\nif (api.body.company_id) {\n api.url += \"&company_id=\" + api.body.company_id\n}\n\nreturn api;",
|
|
65
65
|
"dataType": "json"
|
|
66
|
-
}
|
|
66
|
+
},
|
|
67
|
+
"reload": "listview_flows"
|
|
67
68
|
}
|
|
68
69
|
],
|
|
69
70
|
"showCloseButton": true,
|
|
@@ -18,7 +18,7 @@ amis_schema: |-
|
|
|
18
18
|
"title": {
|
|
19
19
|
"type": "tpl",
|
|
20
20
|
"id": "u:0bce3c33b6e5",
|
|
21
|
-
"tpl": "<p>${'CustomAction.instances.instance_cc' | t}
|
|
21
|
+
"tpl": "<p>${'CustomAction.instances.instance_cc' | t}</p>"
|
|
22
22
|
},
|
|
23
23
|
"body": [
|
|
24
24
|
{
|
|
@@ -26,7 +26,7 @@ amis_schema: |-
|
|
|
26
26
|
"title": {
|
|
27
27
|
"type": "tpl",
|
|
28
28
|
"id": "u:0bce3c33b6e5",
|
|
29
|
-
"tpl": "<p>${'CustomAction.instances.instance_distribute' | t}
|
|
29
|
+
"tpl": "<p>${'CustomAction.instances.instance_distribute' | t}</p>"
|
|
30
30
|
},
|
|
31
31
|
"body": [
|
|
32
32
|
{
|
|
@@ -298,7 +298,8 @@ amis_schema: |-
|
|
|
298
298
|
],
|
|
299
299
|
"weight": 0
|
|
300
300
|
}
|
|
301
|
-
}
|
|
301
|
+
},
|
|
302
|
+
"hiddenOn": "!(record.box === 'inbox' && record.step.allowDistribute == true)"
|
|
302
303
|
}
|
|
303
304
|
],
|
|
304
305
|
"regions": [
|
|
@@ -17,7 +17,7 @@ amis_schema: |-
|
|
|
17
17
|
"title": {
|
|
18
18
|
"type": "tpl",
|
|
19
19
|
"id": "u:4733f85da58b",
|
|
20
|
-
"tpl": "<p>${'CustomAction.instances.instance_forward' | t}
|
|
20
|
+
"tpl": "<p>${'CustomAction.instances.instance_forward' | t}</p>"
|
|
21
21
|
},
|
|
22
22
|
"body": [
|
|
23
23
|
{
|
|
@@ -17,7 +17,7 @@ amis_schema: |-
|
|
|
17
17
|
"type": "button",
|
|
18
18
|
"label": "转签核",
|
|
19
19
|
"id": "u:instance_reassign",
|
|
20
|
-
"hiddenOn": "!(this.record.box === 'monitor' && this.record.state == 'pending' && this.flowPermissions.includes('admin'))",
|
|
20
|
+
"hiddenOn": "!(this.record.box === 'monitor' && this.record.state == 'pending' && this.record.flowPermissions.includes('admin'))",
|
|
21
21
|
"onEvent": {
|
|
22
22
|
"click": {
|
|
23
23
|
"weight": 0,
|
|
@@ -104,20 +104,5 @@ amis_schema: |-
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
],
|
|
107
|
-
"data": {
|
|
108
|
-
"context": {
|
|
109
|
-
"rootUrl": "http://127.0.0.1:5300",
|
|
110
|
-
"tenantId": "63ed8fb288feeecd0165843d",
|
|
111
|
-
"userId": "1852bcb9-a3cb-4d04-905b-1cd12e4cdb3b",
|
|
112
|
-
"authToken": "4c6a0b7d705b6fcab7f09d08006e644e30a37d3b5e198a056e85d7383ced3f492a097a30b63ad8e42d1c08"
|
|
113
|
-
},
|
|
114
|
-
"app_id": "",
|
|
115
|
-
"tab_id": "",
|
|
116
|
-
"object_name": "",
|
|
117
|
-
"dataComponentId": "",
|
|
118
|
-
"record_id": "",
|
|
119
|
-
"record": {},
|
|
120
|
-
"permissions": {}
|
|
121
|
-
},
|
|
122
107
|
"id": "u:fbe25e9811ea"
|
|
123
108
|
}
|
|
@@ -16,7 +16,7 @@ amis_schema: |-
|
|
|
16
16
|
{
|
|
17
17
|
"type": "button",
|
|
18
18
|
"label": "${'CustomAction.instances.instance_relocate' | t}",
|
|
19
|
-
"hiddenOn": "!(this.record.box === 'monitor' && this.record.state != 'draft' && this.flowPermissions.includes('admin'))",
|
|
19
|
+
"hiddenOn": "!(this.record.box === 'monitor' && this.record.state != 'draft' && this.record.flowPermissions.includes('admin'))",
|
|
20
20
|
"onEvent": {
|
|
21
21
|
"click": {
|
|
22
22
|
"weight": 0,
|
|
@@ -1,7 +1,111 @@
|
|
|
1
1
|
name: instance_retrieve
|
|
2
|
-
|
|
2
|
+
amis_schema: |-
|
|
3
|
+
{
|
|
4
|
+
"type": "service",
|
|
5
|
+
"body": [
|
|
6
|
+
{
|
|
7
|
+
"type": "button",
|
|
8
|
+
"label": "取回",
|
|
9
|
+
"id": "u:instance_retrieve",
|
|
10
|
+
"editorState": "default",
|
|
11
|
+
"onEvent": {
|
|
12
|
+
"click": {
|
|
13
|
+
"weight": 0,
|
|
14
|
+
"actions": [
|
|
15
|
+
{
|
|
16
|
+
"ignoreError": false,
|
|
17
|
+
"actionType": "dialog",
|
|
18
|
+
"dialog": {
|
|
19
|
+
"type": "dialog",
|
|
20
|
+
"title": "取回",
|
|
21
|
+
"body": [
|
|
22
|
+
{
|
|
23
|
+
"type": "input-text",
|
|
24
|
+
"label": "备注",
|
|
25
|
+
"name": "retrieve_comment",
|
|
26
|
+
"id": "u:c7fa318c8af1",
|
|
27
|
+
"editorState": "default"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"id": "u:b05694926b78",
|
|
31
|
+
"actions": [
|
|
32
|
+
{
|
|
33
|
+
"type": "button",
|
|
34
|
+
"actionType": "cancel",
|
|
35
|
+
"label": "取消",
|
|
36
|
+
"id": "u:76960d34d658"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "button",
|
|
40
|
+
"actionType": "confirm",
|
|
41
|
+
"label": "确定",
|
|
42
|
+
"primary": true,
|
|
43
|
+
"id": "u:907978324dc2",
|
|
44
|
+
"editorState": "default",
|
|
45
|
+
"onEvent": {
|
|
46
|
+
"click": {
|
|
47
|
+
"weight": 0,
|
|
48
|
+
"actions": [
|
|
49
|
+
{
|
|
50
|
+
"ignoreError": false,
|
|
51
|
+
"actionType": "ajax",
|
|
52
|
+
"outputVar": "responseResult",
|
|
53
|
+
"options": {},
|
|
54
|
+
"api": {
|
|
55
|
+
"url": "${context.rootUrl}/api/workflow/retrieve",
|
|
56
|
+
"method": "post",
|
|
57
|
+
"requestAdaptor": "debugger;\nconsole.log(\"api:\", api);\napi.data = {\n \"_id\": api.body.record._id,\n \"retrieve_comment\": api.body.retrieve_comment\n};\nreturn api;",
|
|
58
|
+
"adaptor": "console.log('payload', payload);\nreturn payload;",
|
|
59
|
+
"messages": {},
|
|
60
|
+
"headers": {
|
|
61
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
62
|
+
},
|
|
63
|
+
"data": {
|
|
64
|
+
"&": "$$",
|
|
65
|
+
"record": "${record}"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"actionType": "broadcast",
|
|
71
|
+
"args": {
|
|
72
|
+
"eventName": "@data.@instanceDetail.changed"
|
|
73
|
+
},
|
|
74
|
+
"data": {}
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"showCloseButton": true,
|
|
82
|
+
"closeOnOutside": false,
|
|
83
|
+
"closeOnEsc": false,
|
|
84
|
+
"showErrorMsg": true,
|
|
85
|
+
"showLoading": true,
|
|
86
|
+
"draggable": false,
|
|
87
|
+
"actionType": "dialog"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"hiddenOn": "!(record.box === 'outbox' && record.state === 'pending')"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"regions": [
|
|
97
|
+
"body"
|
|
98
|
+
],
|
|
99
|
+
"data": {
|
|
100
|
+
},
|
|
101
|
+
"id": "u:5b9a5a685ac9",
|
|
102
|
+
"bodyClassName": "p-0",
|
|
103
|
+
"dsType": "api",
|
|
104
|
+
"definitions": {}
|
|
105
|
+
}
|
|
106
|
+
is_enable: true
|
|
3
107
|
label: 取回
|
|
4
108
|
'on': record_only
|
|
109
|
+
sort: 40
|
|
5
110
|
type: amis_button
|
|
6
111
|
visible: true
|
|
7
|
-
sort: 40
|
|
@@ -18,7 +18,7 @@ amis_schema: |-
|
|
|
18
18
|
"method": "post",
|
|
19
19
|
"sendOn": "",
|
|
20
20
|
"requestAdaptor": "var _SteedosUI$getRef$get, _approveValues$next_s;\nconst formValues = context._scoped.getComponentById(\"instance_form\").getValues();\nconst approveValues = (_SteedosUI$getRef$get = context._scoped.getComponentById(\"instance_approval\")) === null || _SteedosUI$getRef$get === void 0 ? void 0 : _SteedosUI$getRef$get.getValues();\nlet nextUsers = approveValues === null || approveValues === void 0 ? void 0 : approveValues.next_users;\nif (_.isString(nextUsers)) {\n nextUsers = [approveValues.next_users];\n}\nconst instance = context.record;\nconst body = {\n instance: {\n _id: instance._id,\n applicant: formValues.applicant,\n submitter: formValues.submitter,\n traces: [{\n _id: instance.trace._id,\n step: instance.step._id,\n approves: [{\n _id: instance.approve._id,\n next_steps: [{\n step: approveValues === null || approveValues === void 0 || (_approveValues$next_s = approveValues.next_step) === null || _approveValues$next_s === void 0 ? void 0 : _approveValues$next_s._id,\n users: nextUsers\n }],\n description: approveValues === null || approveValues === void 0 ? void 0 : approveValues.suggestion,\n values: formValues\n }]\n }]\n }\n};\napi.data = body;\nreturn api;",
|
|
21
|
-
"adaptor": "return payload.instance === true ? {...payload, status: 0, msg: t('instance_action_instance_save_msg_success')} : {...payload, status: 1, msg: t('instance_action_instance_save_msg_failed')};",
|
|
21
|
+
"adaptor": "if (payload.instance == \"upgraded\") { window.setTimeout(function(){ window.location.reload(); }, 2000); return {...payload, status: 1, msg: t('instance_action_instance_save_msg_upgraded')}; } \n return payload.instance === true ? {...payload, status: 0, msg: t('instance_action_instance_save_msg_success')} : {...payload, status: 1, msg: t('instance_action_instance_save_msg_failed')};",
|
|
22
22
|
"headers": {
|
|
23
23
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
24
24
|
},
|