n20-common-lib 2.9.13 → 2.9.14

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.
Files changed (130) hide show
  1. package/nstc-g6/components/NstcCharts/NstcCharts.vue +16 -8
  2. package/package.json +8 -5
  3. package/src/assets/css/approve-card.scss +1 -1
  4. package/src/assets/css/date-quarter.scss +8 -0
  5. package/src/assets/css/expandable-pane.scss +7 -0
  6. package/src/assets/css/file-upload-table.scss +2 -3
  7. package/src/assets/css/font-icon.scss +3 -1
  8. package/src/assets/css/message.scss +6 -6
  9. package/src/assets/css/normalize.scss +4 -1
  10. package/src/assets/css/table.scss +16 -11
  11. package/src/assets/iconFont/SIMSUN.ttf +0 -0
  12. package/src/assets/iconFont/font.css +4 -0
  13. package/src/components/AIButton/index.vue +101 -0
  14. package/src/components/AdvancedFilter/formItemRender.vue +7 -4
  15. package/src/components/AdvancedFilter/index.vue +6 -7
  16. package/src/components/Anchor/index.vue +1 -0
  17. package/src/components/ApprovalButtons/index.vue +404 -82
  18. package/src/components/ApprovalButtons/indexApp.vue +1102 -0
  19. package/src/components/ApprovalButtons/selectSpr.vue +128 -0
  20. package/src/components/ApprovalButtons/setCarboncopyProp.vue +1 -1
  21. package/src/components/ApprovalButtons/setRejectToProp.vue +45 -5
  22. package/src/components/ApprovalButtons/showAppOpi.vue +265 -8
  23. package/src/components/ApprovalButtons/showOtherAttrNew.vue +161 -0
  24. package/src/components/ApprovalCard/index.vue +190 -44
  25. package/src/components/ApprovalCard/indexApp.vue +592 -0
  26. package/src/components/ApprovalRecord/approvalImgPro/child.vue +1 -1
  27. package/src/components/ApprovalRecord/approvalImgPro/index.vue +42 -5
  28. package/src/components/ApprovalRecord/index.vue +23 -6
  29. package/src/components/ApprovalRecord/indexApp.vue +79 -0
  30. package/src/components/AttachmentPass/index.vue +286 -0
  31. package/src/components/Button/button-group.vue +3 -1
  32. package/src/components/CascaderArea/index.vue +5 -6
  33. package/src/components/DatePicker/por.vue +31 -1
  34. package/src/components/DateSelect/quarterDatePicker.vue +23 -1
  35. package/src/components/Descriptions/index.vue +7 -3
  36. package/src/components/Dialog/index.vue +4 -0
  37. package/src/components/Diff/index.vue +4 -2
  38. package/src/components/DynamicField/DynamicField.vue +29 -6
  39. package/src/components/DynamicField/DynamicFieldMixin.js +13 -5
  40. package/src/components/DynamicField/DynamicFieldOptions.vue +135 -62
  41. package/src/components/DynamicField/DynamicTable.vue +11 -1
  42. package/src/components/DynamicField/contentPop.vue +110 -0
  43. package/src/components/DynamicField/tableList.vue +5 -1
  44. package/src/components/DynamicField/tableView.vue +143 -0
  45. package/src/components/ECharts/index.vue +15 -9
  46. package/src/components/Expandable/main.vue +17 -2
  47. package/src/components/FileImport/index.vue +4 -5
  48. package/src/components/FileUploadTable/FileUploadTableV3.vue +937 -0
  49. package/src/components/FileUploadTable/aiCheckDialog.vue +139 -0
  50. package/src/components/FileUploadTable/index.vue +251 -33
  51. package/src/components/FileUploadTable/jytg.svg +6 -0
  52. package/src/components/FileUploadTable/wsc.svg +3 -0
  53. package/src/components/FileUploadTable/ysc.svg +3 -0
  54. package/src/components/HandlingAdvice/index.vue +191 -0
  55. package/src/components/InputAccount/index.vue +105 -0
  56. package/src/components/InputNumber/index.vue +16 -4
  57. package/src/components/InputNumber/numberRange.vue +14 -0
  58. package/src/components/InputSearch/index.vue +8 -0
  59. package/src/components/Layout/HeaderWrap/changePwd.vue +50 -23
  60. package/src/components/Layout/HeaderWrap/index.vue +2 -2
  61. package/src/components/Layout/HeaderWrap/indexN.vue +296 -119
  62. package/src/components/Layout/SubContent/index.vue +45 -14
  63. package/src/components/Layout/indexN.vue +26 -5
  64. package/src/components/LoginTemporary/form.vue +126 -34
  65. package/src/components/LoginTemporary/index.vue +14 -3
  66. package/src/components/LoginTemporary/indexN.vue +35 -13
  67. package/src/components/Preview/index.vue +199 -0
  68. package/src/components/SelectDatePickerPro/customDatePicker.vue +7 -0
  69. package/src/components/SelectDatePickerPro/halfYearPicker.vue +165 -0
  70. package/src/components/SelectDatePickerPro/index.vue +44 -4
  71. package/src/components/SelectDatePickerPro/quarterDatePicker.vue +32 -10
  72. package/src/components/SelectTree/index.vue +10 -4
  73. package/src/components/SelectTree/pro.vue +3 -0
  74. package/src/components/ShowColumn/index copy 2.vue +545 -0
  75. package/src/components/ShowColumn/index copy.vue +566 -0
  76. package/src/components/ShowColumn/index.vue +11 -7
  77. package/src/components/Statis/statisItem.vue +8 -7
  78. package/src/components/Table/filters.js +13 -0
  79. package/src/components/Table/index.vue +4 -4
  80. package/src/components/TablePro/filterContent.vue +18 -8
  81. package/src/components/TablePro/index.js +41 -1
  82. package/src/components/TablePro/index.vue +117 -6
  83. package/src/components/TableProOperateColumn/OperateBtns.vue +11 -53
  84. package/src/components/TableProOperateColumn/OperateBtns_copy.vue +141 -0
  85. package/src/components/TableProOperateColumn/childrenOperateBtn.vue +108 -0
  86. package/src/components/TableProOperateColumn/index.vue +3 -6
  87. package/src/components/TableSetSize/index.vue +1 -1
  88. package/src/components/Tree/index.vue +21 -5
  89. package/src/components/Upload/index.vue +25 -10
  90. package/src/components/Upload/uploadMsg.vue +30 -25
  91. package/src/components/operatingStatus/index.vue +3 -4
  92. package/src/directives/VTitle/index.js +15 -5
  93. package/src/directives/watermark/index.js +140 -56
  94. package/src/i18n.json +146 -18
  95. package/src/index.js +31 -3
  96. package/src/plugins/Sign/CaMap.js +47 -8
  97. package/src/plugins/Sign/Itrus/index.js +1 -1
  98. package/src/plugins/Sign/Itrus/sign_3720.js +2 -1
  99. package/src/plugins/Sign/NetSM3/index.js +20 -11
  100. package/src/plugins/Sign/NetV3/index.js +163 -22
  101. package/src/plugins/Sign/SkfSign/index.js +55 -52
  102. package/src/plugins/Sign/bjca/index.js +229 -9
  103. package/src/plugins/Sign/hnca/index.js +5064 -0
  104. package/src/plugins/Sign/index.js +155 -103
  105. package/src/plugins/Sign/kySign/base64.js +160 -0
  106. package/src/plugins/Sign/kySign/hex.js +92 -0
  107. package/src/plugins/Sign/kySign/index.js +186 -0
  108. package/src/plugins/Sign/kySign/skf.js +937 -0
  109. package/src/plugins/Sign/kySign/test.html +463 -0
  110. package/src/plugins/Sign/sdca/index.js +73 -0
  111. package/src/plugins/Sign/sign.js +72 -52
  112. package/src/plugins/Sign/signV3/InfosecNetSignCNGAgent.min.js +1 -0
  113. package/src/plugins/Sign/signV3/sign.js +187 -0
  114. package/src/plugins/Sign/sign_back.js +172 -0
  115. package/src/utils/accountFormat.js +7 -0
  116. package/src/utils/asyncGetRelaNos.js +79 -46
  117. package/src/utils/axios.js +3 -5
  118. package/src/utils/i18n/index.js +1 -1
  119. package/src/utils/importGlobal.js +23 -12
  120. package/style/fonts/SIMSUN.5e0c362c.ttf +0 -0
  121. package/style/index.css +2 -2
  122. package/theme/blue.css +2 -2
  123. package/theme/cctcRed.css +2 -2
  124. package/theme/fonts/SIMSUN.5e0c362c.ttf +0 -0
  125. package/theme/green.css +2 -2
  126. package/theme/lightBlue.css +2 -2
  127. package/theme/orange.css +2 -2
  128. package/theme/purple.css +2 -2
  129. package/theme/red.css +2 -2
  130. package/theme/yellow.css +2 -2
@@ -0,0 +1,1102 @@
1
+ /* 审批按钮组 */
2
+ <template>
3
+ <div :class="prefixCls">
4
+ <!-- 自定义项 -->
5
+ <ExpandablePane
6
+ v-if="taskId && showBtn && authList.includes('isShowOtherAtt')"
7
+ title="自定义项"
8
+ :default-expand="false"
9
+ >
10
+ <el-form ref="approveBtnGroup" label-position="right" :label-width="_lang === 'zh' ? '12em' : '12em'">
11
+ <div
12
+ class="p-b-lg p-t-lg p-r-lg"
13
+ style="max-height: 150px; overflow-y: auto; border: 1px dashed var(--border-color-base); border-radius: 5px"
14
+ >
15
+ <show-other-att-new ref="showOtherAttNew" :task-id="taskId" :form="customizationDtos" :required="true" />
16
+ </div>
17
+ </el-form>
18
+ </ExpandablePane>
19
+ <!-- <div class="n20-form-expandable-pane">
20
+ <div class="n20-title flex-box flex-lr flex-v" :class="titleClass">
21
+ <span class="n20-tips flex-item">
22
+ <slot name="title">
23
+ <span>{{ $lc('流程处理') }}</span>
24
+ </slot>
25
+ </span>
26
+ </div>
27
+ </div> -->
28
+ <!-- 抄送加签 -->
29
+ <el-form ref="approveBtnGroup" label-position="right" :label-width="_lang === 'zh' ? '6em' : '12em'">
30
+ <div v-if="taskId && showBtn" class="flex-box">
31
+ <el-form-item v-if="authList.includes('isCarboncopy')" :label="'抄送' | $lc" class="flex-1 m-b-s">
32
+ <el-input
33
+ :value="carbonCopyList.map((c) => c.uname).join(', ')"
34
+ type="textarea"
35
+ :autosize="{ minRows: 1 }"
36
+ @focus="setCarboncopyV = true"
37
+ />
38
+ </el-form-item>
39
+ <el-form-item
40
+ v-if="authList.includes('isAddtask') || authList.includes('isAddForwardTask') || preAddTask"
41
+ :label="'加签' | $lc"
42
+ :error="addMsg"
43
+ class="flex-1 m-b-s"
44
+ >
45
+ <label slot="label">
46
+ <span>{{ '加签' | $lc }}</span>
47
+ <!-- <el-tooltip placement="top">
48
+ <span class="n20-icon-xinxitishi m-l-ss" style="position: static"></span>
49
+ <div slot="content" style="width: 16em; line-height: 1.6">
50
+ {{ '会签并行:增加一个会签节点,全部审批人同意才可通过审批' | $lc }}<br />
51
+ {{ '普通串行:按照加签人数增加节点,每个节点审批通过才可完成当前加签流程' | $lc }}
52
+ </div>
53
+ </el-tooltip> -->
54
+ </label>
55
+ <div class="flex-box">
56
+ <el-select
57
+ v-if="authList.includes('isAddtask') || authList.includes('isAddForwardTask') || preAddTask"
58
+ v-model="addTaskWay"
59
+ class="m-r-ss"
60
+ clearable
61
+ :placeholder="'请选择加签类型' | $lc"
62
+ style="width: 10em"
63
+ >
64
+ <template>
65
+ <el-option
66
+ v-if="authList.includes('isAddForwardTask') || preAddTask"
67
+ :label="'向前加签' | $lc"
68
+ value="2"
69
+ />
70
+ <el-option v-if="authList.includes('isAddtask') || preAddTask" :label="'向后加签' | $lc" value="1" />
71
+ </template>
72
+ </el-select>
73
+
74
+ <el-select
75
+ v-if="addTaskMode === '0' || addTaskWay === '2'"
76
+ v-model="addTaskType"
77
+ disabled
78
+ clearable
79
+ :placeholder="'请选择审批方式' | $lc"
80
+ style="width: 10em"
81
+ >
82
+ <el-option :label="'普通节点' | $lc" value="1" />
83
+ </el-select>
84
+ <el-select v-else v-model="addTaskType" clearable :placeholder="'请选择审批方式' | $lc" style="width: 10em">
85
+ <el-option :label="'普通节点' | $lc" value="1" />
86
+ <el-option :label="'会签并行' | $lc" value="2" />
87
+ <el-option :label="'普通串行' | $lc" value="3" />
88
+ </el-select>
89
+
90
+ <el-input
91
+ class="flex-item"
92
+ type="textarea"
93
+ :value="addTaskList.map((c) => c.uname).join(', ')"
94
+ :autosize="{ minRows: 1 }"
95
+ clearable
96
+ @focus="setAddtaskV = true"
97
+ />
98
+ <el-select v-model="addTaskTag" class="m-l-ss" clearable>
99
+ <el-option v-for="item in remarkOpt" :key="item.code" :label="item.name" :value="item.code" />
100
+ </el-select>
101
+ </div>
102
+ </el-form-item>
103
+ </div>
104
+ <el-form-item v-if="approveBtns" :label="'审批意见' | $lc" :error="errMsg" :required="requiredC" class="m-t-s">
105
+ <el-input
106
+ ref="msg-input"
107
+ v-model="messageC"
108
+ type="textarea"
109
+ placeholder="请输入审批意见"
110
+ :maxlength="messageMax"
111
+ show-word-limit
112
+ :autosize="{ minRows: 2 }"
113
+ />
114
+ <!-- <template v-if="taskId && showBtn">
115
+ <show-app-opi
116
+ v-if="opiAndUser || authList.includes('showAppOpi')"
117
+ :task-id="taskId"
118
+ :message.sync="messageC"
119
+ :and-user="opiAndUser"
120
+ />
121
+ <show-other-att
122
+ v-if="authList.includes('showOtherAtt')"
123
+ class="flex-1 m-l"
124
+ :task-id="taskId"
125
+ :other-att="otherAtt"
126
+ style="width: 18%"
127
+ />
128
+ </template> -->
129
+ </el-form-item>
130
+ </el-form>
131
+ <!-- 加签按钮 -->
132
+ <div v-if="authList.includes('byAddTask') && addTaskList.length > 0" class="text-c">
133
+ <el-button v-if="authList.includes('approval')" type="primary" @click="checkFlowFn">{{
134
+ '加 签' | $lc
135
+ }}</el-button>
136
+ </div>
137
+ <!-- 审批按钮 -->
138
+ <div v-if="authList.includes('byAddTask') && !addTaskList.length" class="text-c">
139
+ <el-button type="primary" @click="showAdvancePop">{{ btnsNames['approval'] }}</el-button>
140
+ <!-- <el-button type="primary" @click="approvalToV = true">{{ btnsNames['approval'] }}{{ '至' | $lc }}</el-button>
141
+ <el-button plain @click="rejectToB">{{ btnsNames['rejectTo'] }}</el-button> -->
142
+ <el-button plain @click="rejectFn">{{ btnsNames['reject'] }}</el-button>
143
+ <!-- <el-button type="danger" plain @click="discardFn">{{ btnsNames['discard'] }}</el-button>
144
+ <el-button plain @click="goFrom">{{ '返 回' | $lc }}</el-button> -->
145
+ </div>
146
+
147
+ <div v-else-if="!authList.includes('byAddTask')" class="text-c">
148
+ <div v-if="!approveBtns" style="text-align: center; font-size: 18px">请点击左上角返回处,进入OA待办页面</div>
149
+ <!-- 特殊会签按钮 START -->
150
+ <el-button v-if="authList.includes('pass')" type="primary" @click="checkFlowFn">{{
151
+ btnsNames['pass']
152
+ }}</el-button>
153
+ <el-button v-if="authList.includes('refuse')" plain @click="rejectFn">{{ btnsNames['refuse'] }}</el-button>
154
+ <el-button v-if="authList.includes('takeOff')" plain @click="qjFn">{{ btnsNames['takeOff'] }}</el-button>
155
+ <!-- END -->
156
+ <el-button v-if="authList.includes('approval') && approveBtns" type="primary" @click="showAdvancePop">{{
157
+ btnsNames['approval']
158
+ }}</el-button>
159
+ <!-- <el-button v-if="authList.includes('approval') && nextApproval && nextBtn" type="primary" @click="approvalNext">
160
+ {{ btnsNames['approval'] }}{{ '并审批下一条' | $lc }}</el-button
161
+ >
162
+ <el-button v-if="showApprovalTo" type="primary" @click="approvalToV = true"
163
+ >{{ btnsNames['approval'] }}{{ '至' | $lc }}</el-button
164
+ >
165
+ <el-button v-if="authList.includes('rejectTo')" plain @click="rejectToB">{{ btnsNames['rejectTo'] }}</el-button> -->
166
+ <el-button v-if="authList.includes('reject') && approveBtns" plain @click="rejectFn">{{
167
+ btnsNames['reject']
168
+ }}</el-button>
169
+ <!-- <el-button v-if="authList.includes('rejectPre')" plain @click="rejectPreFn">{{
170
+ btnsNames['rejectPre']
171
+ }}</el-button>
172
+
173
+ <el-button v-if="authList.includes('discard')" type="danger" plain @click="discardFn">{{
174
+ btnsNames['discard']
175
+ }}</el-button>
176
+ <el-button plain @click="goFrom">{{ '返 回' | $lc }}</el-button> -->
177
+ </div>
178
+ <!-- 设置抄送用户 -->
179
+ <cl-dialog
180
+ v-drag
181
+ :visible.sync="setCarboncopyV"
182
+ :title="'设置抄送用户' | $lc"
183
+ width="960px"
184
+ append-to-body
185
+ top="7.5vh"
186
+ >
187
+ <carboncopy-prop :carbon-copy-list="carbonCopyList" @close="setCarboncopyV = false" @confirm="setCarboncopyOk" />
188
+ </cl-dialog>
189
+ <!-- 设置加签用户 -->
190
+ <cl-dialog
191
+ v-drag
192
+ :visible.sync="setAddtaskV"
193
+ :title="'设置加签用户' | $lc"
194
+ width="960px"
195
+ append-to-body
196
+ top="7.5vh"
197
+ >
198
+ <carboncopy-prop
199
+ type="addtask"
200
+ :carbon-copy-list="addTaskList"
201
+ @close="setAddtaskV = false"
202
+ @confirm="setAddtaskOk"
203
+ />
204
+ </cl-dialog>
205
+ <!-- 驳回至节点 -->
206
+ <cl-dialog v-drag :visible.sync="rejectToV" :title="'驳回至节点' | $lc" width="960px" append-to-body top="7.5vh">
207
+ <reject-to-prop
208
+ :task-id="taskId"
209
+ :show-retrace-flow="isShowRetrace"
210
+ @close="rejectToV = false"
211
+ @confirm="rejectToFn"
212
+ />
213
+ </cl-dialog>
214
+ <!-- 批准至节点 -->
215
+ <cl-dialog v-drag :visible.sync="approvalToV" :title="'批准至节点' | $lc" width="960px" append-to-body top="7.5vh">
216
+ <reject-to-prop :task-id="taskId" type="approvalTo" @close="approvalToV = false" @confirm="approvalToFn" />
217
+ </cl-dialog>
218
+ <!-- 驳回发起人是否重走流程 -->
219
+ <cl-dialog
220
+ v-drag
221
+ :visible.sync="showFlowDialog"
222
+ :title="'驳回发起人是否重走流程' | $lc"
223
+ width="400px"
224
+ append-to-body
225
+ center-dialog
226
+ >
227
+ <el-radio-group v-model="isJump">
228
+ <el-radio label="0">{{ '重走流程' | $lc }}</el-radio>
229
+ <el-radio label="1"
230
+ >{{ '不重走流程' | $lc }}
231
+ <i v-title="tips" class="n20-icon-xinxitishi" style="color: var(--color-warning)"></i
232
+ ></el-radio>
233
+ </el-radio-group>
234
+ <div slot="footer">
235
+ <el-button type="primary" @click="handleIsJumpSave">{{ '确定' | $lc }}</el-button>
236
+ <el-button @click="showFlowDialog = false">{{ '取消' | $lc }}</el-button>
237
+ </div>
238
+ </cl-dialog>
239
+ <!-- 校验结果 -->
240
+ <cl-dialog
241
+ v-drag
242
+ :visible.sync="verifyV"
243
+ :title="isWyfk ? '异常提醒' : '校验结果' | $lc"
244
+ width="960px"
245
+ append-to-body
246
+ top="7.5vh"
247
+ >
248
+ <div class="m-t m-b">
249
+ <span class="m-r-ss">{{ '结果统计:' | $lc }}</span>
250
+ {{ '共计校验' | $lc }}<span>{{ verifyMsg.checkSum }}</span
251
+ >{{ '条,其中通过' | $lc }}<span class="color-success">{{ verifyMsg.sucessCount }}</span> {{ $l('条,待确认')
252
+ }}<span class="color-warning">{{ verifyMsg.tobeConfirmedCount }}</span> {{ '条,未通过' | $lc
253
+ }}<span class="color-danger">{{ verifyMsg.errorCount }}</span
254
+ >{{ '条,未通过详情如下:' | $lc }}
255
+ </div>
256
+ <el-tag v-if="isWyfk && verifyMsg.tobeConfirmedCount > 0" type="warning" size="small" class="m-b-s">
257
+ {{ '风险指令' | $lc }}
258
+ </el-tag>
259
+ <el-tag v-if="isWyfk && verifyMsg.errorCount > 0" size="small" type="danger" class="m-b-s"
260
+ >{{ '异常指令' | $lc }}
261
+ </el-tag>
262
+ <el-table :data="verifyMsg.checkFlowVoList" border max-height="400">
263
+ <el-table-column type="index" :label="'序号' | $lc" align="center" width="50" />
264
+ <el-table-column prop="businessId" :label="'业务流水号' | $lc" align="center" width="120" />
265
+ <el-table-column prop="typeName" :label="'交易类型' | $lc" align="center" width="120">
266
+ <template slot-scope="{ row }">
267
+ {{ row.typeName }}
268
+ </template>
269
+ </el-table-column>
270
+ <el-table-column prop="status" :label="'校验状态' | $lc" align="center" width="120">
271
+ <template slot-scope="{ row }">
272
+ <div
273
+ :class="
274
+ row.status === 'PASS' ? 'color-success' : row.status === 'PROMPT' ? 'color-warning' : 'color-danger'
275
+ "
276
+ >
277
+ {{ row.statusName }}
278
+ </div>
279
+ </template>
280
+ </el-table-column>
281
+ <el-table-column
282
+ v-if="isWyfk"
283
+ prop="errorMsg"
284
+ :label="verifyMsg.tobeConfirmedCount > 0 ? '风险命中原因' : '异常原因' | $lc"
285
+ />
286
+ <el-table-column v-else prop="errorMsg" :label="'不通过原因' | $lc" />
287
+ </el-table>
288
+ <span slot="footer">
289
+ <div v-if="promptType === '1'">
290
+ <el-button v-if="checkSum !== errorCount" type="primary" @click="onContinue">{{
291
+ $l(isWyfk ? '核实无误' : '继续审批')
292
+ }}</el-button>
293
+ <el-button plain @click="onceCancelFn">{{ $l('取消') }}</el-button>
294
+ <div v-if="checkSum !== errorCount" class="m-t-s color-danger f-s-s">
295
+ <span v-if="isWyfk">
296
+ {{ $l('*点击【核实无误】将提交校验通过和待确认数据,未通过数据需要到待审核详情页处理。') }}</span
297
+ >
298
+ <span v-else>{{
299
+ $l('*点击【继续审批】将提交校验通过和待确认数据,未通过数据需要到待审核详情页处理。')
300
+ }}</span>
301
+ </div>
302
+ </div>
303
+ <div v-if="promptType === '2'">
304
+ <el-button v-if="checkSum !== errorCount" type="primary" @click="onContinue">{{
305
+ $l(isWyfk ? '核实无误' : '继续审批')
306
+ }}</el-button>
307
+ <el-button plain @click="onceCancelFn">{{ $l('取消') }}</el-button>
308
+ </div>
309
+ </span>
310
+ </cl-dialog>
311
+ <!-- 选择审批人 -->
312
+ <cl-dialog v-drag :visible.sync="setSpr" :title="'设置下一步' | $lc" width="1100px" append-to-body top="7.5vh">
313
+ <selectSpr :select-spr-list="selectSprList" @close="setSpr = false" @confirm="selectSprListFn" />
314
+ </cl-dialog>
315
+ </div>
316
+ </template>
317
+ <script src="http://cmp/v1.0.0/js/cordova/__CMPSHELL_PLATFORM__/cordova.js"></script>
318
+ <script src="http://cmp/v1.0.0/js/cordova/cordova-plugins.js"></script>
319
+ <!--导入cmp.js-->
320
+ <script src="http://cmp/v/js/cmp-i18n.js"></script>
321
+ <script src="http://cmp/v/js/cmp.js"></script>
322
+ <script>
323
+ import selectSpr from './selectSpr.vue'
324
+ import getJsonc from '../../assets/getJsonc.js'
325
+ import { closeTagsForBackPage } from '../../plugins/CompatibleOld'
326
+ import axios from '../../utils/axios'
327
+ import { $lc } from '../../utils/i18n/index'
328
+ import { linkGo, linkPush } from '../../utils/urlToGo'
329
+ import ClDialog from '../Dialog'
330
+ import ClUpload from '../Upload'
331
+ import dCloumn from './getDCloumn'
332
+ import CarboncopyProp from './setCarboncopyProp.vue'
333
+ import RejectToProp from './setRejectToProp.vue'
334
+ import ShowAppOpi from './showAppOpi.vue'
335
+ import ShowOtherAtt from './showOtherAttr.vue'
336
+ import ShowOtherAttNew from './showOtherAttrNew.vue'
337
+ import ExpandablePane from '../Expandable/main.vue'
338
+ import { toExaminePath } from './specialHandle'
339
+ const prefixCls = 'n20-approval-Button'
340
+ // window._approvalExtend = { 'addtask.chdUserInfo.extend': {}, 'appOpi.queryAppOpiAndUser.exist': undefined, 'card.countermand.suggestion': false }
341
+ if (!window._approvalExtend) window._approvalExtend = {}
342
+ if (!window._approvalExtend['addtask.chdUserInfo.extend']) {
343
+ window._approvalExtend['addtask.chdUserInfo.extend'] = window._isAddtask_get_userlist_extend_data_ || {}
344
+ }
345
+
346
+ export default {
347
+ name: 'ApprovalButtons',
348
+ components: {
349
+ selectSpr,
350
+ ClDialog,
351
+ ClUpload,
352
+ CarboncopyProp,
353
+ RejectToProp,
354
+ ShowAppOpi,
355
+ ShowOtherAtt,
356
+ ShowOtherAttNew,
357
+ ExpandablePane
358
+ },
359
+ props: {
360
+ // 是否需要校验
361
+ isCheck: {
362
+ type: Boolean,
363
+ default: true
364
+ },
365
+ message: {
366
+ type: String,
367
+ default: ''
368
+ },
369
+ messageMax: {
370
+ type: Number,
371
+ default: 500
372
+ },
373
+ formData: {
374
+ type: Object,
375
+ default: () => ({})
376
+ },
377
+ required: {
378
+ type: Boolean,
379
+ default: false
380
+ },
381
+ signText: {
382
+ type: String,
383
+ default: undefined
384
+ },
385
+ plainText: {
386
+ type: String,
387
+ default: undefined
388
+ },
389
+ nextApproval: {
390
+ type: Boolean,
391
+ default: false
392
+ },
393
+ btnList: {
394
+ type: Array,
395
+ default: () => {
396
+ return ['reject', 'rejectPre', 'approval', 'discard']
397
+ }
398
+ },
399
+ fileData: {
400
+ type: Object,
401
+ default: () => {
402
+ return {
403
+ data: JSON.stringify({
404
+ syscode: '010000000',
405
+ appno: 'abcd',
406
+ bussValue: '006001001',
407
+ cltno: '001',
408
+ creator: 'jz'
409
+ })
410
+ }
411
+ }
412
+ },
413
+ apiPrefix: {
414
+ type: String
415
+ },
416
+ /**
417
+ * 是否上传审批附件
418
+ */
419
+ fileKit: {
420
+ type: Boolean,
421
+ default: false
422
+ },
423
+ beforeRatify: {
424
+ type: Function,
425
+ default: undefined
426
+ },
427
+ beforeReject: {
428
+ type: Function,
429
+ default: undefined
430
+ },
431
+ beforeRejectPre: {
432
+ type: Function,
433
+ default: undefined
434
+ },
435
+ beforeDiscard: {
436
+ type: Function,
437
+ default: undefined
438
+ }
439
+ },
440
+ data() {
441
+ this.msgisSync = !!this.$listeners['update:message']
442
+ return {
443
+ attributes: undefined,
444
+ isWyfk: false,
445
+ nextEgwOutgoingNodeId: undefined,
446
+ nextNodeApproveUnos: undefined,
447
+ selectSprList: undefined,
448
+ setSpr: false,
449
+ requiredC: false,
450
+ prefixCls,
451
+ messageIn: '',
452
+ errMsg: undefined,
453
+ taskId: '',
454
+ taskDefKey: '',
455
+ authList: [],
456
+ showBtn: true,
457
+ setCarboncopyV: false,
458
+ carbonCopyList: [],
459
+ addMsg: undefined,
460
+ setAddtaskV: false,
461
+ addTaskList: [],
462
+ addTaskType: '1',
463
+ addTaskTag: '',
464
+ preAddTask: false,
465
+ addTaskWay: undefined,
466
+ rejectToV: false,
467
+ approvalToV: false,
468
+ showApprovalTo: false,
469
+ opiAndUser: false,
470
+ addTaskMode: '0',
471
+ otherAtt: {},
472
+ customizationDtos: {},
473
+ fileDtos: [],
474
+ fileName: '',
475
+ fileUrl: '',
476
+ todoList: [],
477
+ verifyV: false,
478
+ verifyMsg: {},
479
+ promptType: '0',
480
+ remarkOpt: [],
481
+ isShowRetrace: undefined,
482
+ isJump: undefined,
483
+ showFlowDialog: false,
484
+ IsShowUploadWidget: false,
485
+ showCustomItem: false,
486
+ isTakeOff: undefined,
487
+ sucessCount: 0,
488
+ errorCount: 0,
489
+ tobeConfirmedCount: 0,
490
+ checkSum: 0,
491
+ mustUploadWidget: false,
492
+ btnsNames: {
493
+ pass: this.$l('通过'),
494
+ refuse: this.$l('拒绝'),
495
+ takeOff: this.$l('请假'),
496
+ reject: this.$l('驳回'),
497
+ rejectPre: this.$l('驳回至上一节点'),
498
+ approval: this.$l('批 准'),
499
+ discard: this.$l('作 废'),
500
+ rejectTo: this.$l('驳回至')
501
+ },
502
+ approveBtns: true
503
+ }
504
+ },
505
+ computed: {
506
+ messageC: {
507
+ get() {
508
+ return this.msgisSync ? this.message : this.messageIn
509
+ },
510
+ set(val) {
511
+ if (this.msgisSync) {
512
+ this.$emit('update:message', val)
513
+ } else {
514
+ this.messageIn = val
515
+ }
516
+ }
517
+ },
518
+ nextBtn() {
519
+ return this.todoList.length > 1
520
+ },
521
+ fileKitT: {
522
+ get() {
523
+ return this.IsShowUploadWidget || this.fileKit || window.fileKit
524
+ }
525
+ },
526
+ tips() {
527
+ return $lc(`此模式下被回退节点提交后将绕过中间已办节点,造成流程不严谨,谨慎使用!`)
528
+ }
529
+ },
530
+ created() {
531
+ this.taskId = this.$route.query.taskId || this.$route.params.taskId
532
+ this.showBtn = this.$route.query.habtn !== 'true'
533
+ this.getBtns()
534
+ this.getAddTaskMode()
535
+ this.getShowApprovalTo()
536
+ this.getHasQueryAppOpiAndUser()
537
+ this.nextApproval && this.getTodoList()
538
+ this.getConfiguration()
539
+ this.getIsShowUploadWidget()
540
+ },
541
+ methods: {
542
+ // 查询选择审批人
543
+ async showAdvancePop() {
544
+ this.checkFlowFn()
545
+ },
546
+ // 选择审批人
547
+ selectSprListFn(data) {
548
+ console.log(data)
549
+ this.nextEgwOutgoingNodeId = data.nextEgwOutgoingNodeId
550
+ this.nextNodeApproveUnos = data.nextNodeApproveUnos
551
+ this.setSpr = false
552
+ this.checkFlowFn()
553
+ },
554
+ async getIsShowUploadWidget() {
555
+ const { processInstanceId: procInstId, taskId } = this.$route.query
556
+ let { code, data } = await this.$axios.get(
557
+ `/bems/activiti/admin/todo/isShowUploadWidget/${procInstId}/${taskId}`,
558
+ null,
559
+ {
560
+ loading: false,
561
+ noMsg: true
562
+ }
563
+ )
564
+ if (code === 200) {
565
+ if (Object.prototype.toString.call(data) === '[object Object]') {
566
+ this.IsShowUploadWidget = data.showUploadWidget
567
+ this.mustUploadWidget = data.mustUploadWidget
568
+ } else {
569
+ this.IsShowUploadWidget = data
570
+ }
571
+ }
572
+ console.log(code, data)
573
+ },
574
+ // 意见是否必填
575
+ getConfiguration() {
576
+ getJsonc('portal/server-config.jsonc', null, true)
577
+ .then(({ opinionRequired }) => {
578
+ this.requiredC = opinionRequired ?? this.required
579
+ // 读取该工作流是否意见必填
580
+ if (this.$route.query.remarkIsMust !== undefined) {
581
+ this.requiredC = this.$route.query.remarkIsMust === '1'
582
+ }
583
+ })
584
+ .catch(() => {
585
+ this.requiredC = this.required
586
+ // 读取该工作流是否意见必填
587
+ if (this.$route.query.remarkIsMust !== undefined) {
588
+ this.requiredC = this.$route.query.remarkIsMust === '1'
589
+ }
590
+ })
591
+ },
592
+ getTodoList() {
593
+ return new Promise((resolve, reject) => {
594
+ const dto = JSON.parse(sessionStorage.getItem(`approvalDto`))
595
+ axios.post('/bems/activiti/admin/todo/todo', dto).then(({ data, code }) => {
596
+ if (code === 200) {
597
+ const { list } = data
598
+ this.todoList = list || []
599
+ resolve({ data, code })
600
+ }
601
+ })
602
+ })
603
+ },
604
+ // 获取加签方式的模式
605
+ getAddTaskMode() {
606
+ axios
607
+ .get(`/bems/activiti/sample/getAddTaskMode`, null, {
608
+ loading: false,
609
+ noMsg: true
610
+ })
611
+ .then(({ data, code }) => {
612
+ if (code === 200) {
613
+ this.addTaskMode = data
614
+ }
615
+ })
616
+ },
617
+ // 换回到发起页
618
+ goFrom() {
619
+ let pathname = location.pathname
620
+ if (this.nextApproval && this.nextBtn) {
621
+ window.location.href = window.location.origin + '/activiti/toExamine'
622
+ } else {
623
+ linkGo()
624
+ }
625
+ // linkGo()
626
+ this.$nextTick(() => {
627
+ closeTagsForBackPage(pathname)
628
+ })
629
+ },
630
+ // 动态获取按钮
631
+ getBtns() {
632
+ if (!this.taskId || !this.showBtn) return false
633
+ axios
634
+ .get('/bems/activiti/admin/todo/authList/' + this.taskId, null, {
635
+ loading: false,
636
+ noMsg: true
637
+ })
638
+ .then(({ data = {} }) => {
639
+ // 自定义按钮
640
+ if (data.customBtnName && data.customBtnName.length > 0) {
641
+ data.customBtnName.forEach((item) => {
642
+ this.btnsNames[item.key] = item.optionName
643
+ })
644
+ }
645
+ let { taskDefKey, menuAuthority } = data
646
+
647
+ this.taskDefKey = taskDefKey
648
+
649
+ if (menuAuthority) {
650
+ this.authList = menuAuthority.split('|')
651
+ } else {
652
+ this.authList = this.btnList
653
+ }
654
+ if (!(this.authList.includes('isAddtask') || this.authList.includes('isAddForwardTask'))) {
655
+ this.getHasPreAddTask()
656
+ }
657
+ if (this.authList.includes('isAddtask') || this.authList.includes('isAddForwardTask') || this.preAddTask) {
658
+ this.getMdmDataDoc()
659
+ }
660
+ })
661
+ .catch(() => {
662
+ this.authList = this.btnList
663
+ if (!(this.authList.includes('isAddtask') || this.authList.includes('isAddForwardTask'))) {
664
+ this.getHasPreAddTask()
665
+ }
666
+ })
667
+ },
668
+ // 获取是否显示驳回至按钮
669
+ getShowApprovalTo() {
670
+ if (this.showBtn && this.$route.query.state === '2') {
671
+ axios
672
+ .get(`/bems/activiti/sample/getTaskMoveVos/${this.$route.query.taskId}/1`, null, {
673
+ noMsg: true
674
+ })
675
+ .then(() => {
676
+ this.showApprovalTo = true
677
+ })
678
+ }
679
+ },
680
+ // 刺探是否具有向前加签功能
681
+ getHasPreAddTask() {
682
+ if (this.showBtn && window._approvalExtend['appOpi.addTaskWay.exist'] === undefined) {
683
+ axios
684
+ .get('/bems/activiti/online/addTaskWay', null, {
685
+ loading: false,
686
+ noMsg: true
687
+ })
688
+ .then(() => {
689
+ this.preAddTask = window._approvalExtend['appOpi.addTaskWay.exist'] = true
690
+ })
691
+ .catch(() => {
692
+ window._approvalExtend['appOpi.addTaskWay.exist'] = false
693
+ })
694
+ } else {
695
+ this.preAddTask = window._approvalExtend['appOpi.addTaskWay.exist']
696
+ }
697
+ },
698
+ // 刺探审批意见接口是否存在
699
+ getHasQueryAppOpiAndUser() {
700
+ if (this.showBtn && window._approvalExtend['appOpi.queryAppOpiAndUser.exist'] === undefined) {
701
+ axios
702
+ .post('/bems/activiti/actAppOpi/queryAppOpiAndUser', null, {
703
+ loading: false,
704
+ noMsg: true
705
+ })
706
+ .then(() => {
707
+ this.opiAndUser = window._approvalExtend['appOpi.queryAppOpiAndUser.exist'] = true
708
+ })
709
+ .catch(() => {
710
+ window._approvalExtend['appOpi.queryAppOpiAndUser.exist'] = false
711
+ })
712
+ } else {
713
+ this.opiAndUser = window._approvalExtend['appOpi.queryAppOpiAndUser.exist']
714
+ }
715
+ },
716
+ // 获取提交参数
717
+ getParam() {
718
+ let { typeCode, taskId, groupNo, isAgentcy, isCheck } = this.$route.query
719
+ let customizationDtos
720
+ if (this.authList.includes('isShowOtherAtt')) {
721
+ customizationDtos = this.$refs['showOtherAttNew']?.getOtherAttData()
722
+ }
723
+ return [
724
+ {
725
+ attributes: this.attributes,
726
+ nextNodeApproveUnos: this.nextNodeApproveUnos,
727
+ nextEgwOutgoingNodeId: this.nextEgwOutgoingNodeId,
728
+ isTakeOff: this.isTakeOff,
729
+ typeCode,
730
+ taskId,
731
+ groupNo,
732
+ isAgentcy,
733
+ isCheck,
734
+ taskDefKey: this.taskDefKey,
735
+ message: this.messageC,
736
+ formData: JSON.stringify(this.formData),
737
+ signText: this.signText,
738
+ plainText: this.plainText,
739
+ fileDtos: this.fileDtos,
740
+ carbonCopyUserDtoList: this.carbonCopyList.map((c) => ({
741
+ userNo: c.uno,
742
+ userName: c.uname
743
+ })),
744
+ addTaskList: this.addTaskList.map((c) => ({
745
+ userNo: c.uno,
746
+ userName: c.uname
747
+ })),
748
+ addTaskType: this.addTaskType,
749
+ addTaskTag: this.addTaskTag,
750
+ addTaskWay: this.addTaskWay,
751
+ customizationDtos,
752
+ isJump: this.isJump,
753
+ ...this.otherAtt
754
+ }
755
+ ]
756
+ },
757
+ // 添加自定义参数
758
+ setParam(obj) {
759
+ Object.assign(this.otherAtt, obj)
760
+ },
761
+ // 提交后的提示
762
+ thenMsg(data = {}, str = $lc('操作')) {
763
+ let { failCount, failList = {} } = data
764
+ if (failCount > 0) {
765
+ if (Array.isArray(failList)) {
766
+ let _failList = {}
767
+ failList.forEach((f = {}) => {
768
+ Object.assign(_failList, f)
769
+ })
770
+ failList = _failList
771
+ }
772
+ let errArr = Object.values(failList)
773
+ if (errArr.length > 0) {
774
+ this.$message.error(errArr.join('、'))
775
+ } else {
776
+ this.$message.error(str + $lc('失败'))
777
+ }
778
+ } else {
779
+ this.$emit('afterFn', str)
780
+ this.$message.success(str + $lc('成功'))
781
+ this.approveBtns = false
782
+ }
783
+ },
784
+ addErrFn() {
785
+ this.addMsg = $lc('审批方式不能为空')
786
+ setTimeout(() => {
787
+ this.addMsg = undefined
788
+ }, 1000)
789
+ },
790
+ errMsgFn(str = '') {
791
+ this.$refs['msg-input'].focus()
792
+ this.errMsg = str + $lc('操作,意见不能为空')
793
+ setTimeout(() => {
794
+ this.errMsg = undefined
795
+ }, 1000)
796
+ },
797
+ // 如果有前置处理,先执行前置处理
798
+ beforeFn(bFn, callFn) {
799
+ if (!bFn) {
800
+ callFn()
801
+ } else {
802
+ let F = bFn(callFn)
803
+ F.then && F.then(callFn)
804
+ }
805
+ },
806
+ // 查询是否配置 允许不重走流程
807
+ async getIsShowRetraceFlow() {
808
+ try {
809
+ let { processInstanceId: procInstId } = this.$route.query
810
+ const { code, data } = await axios.get(
811
+ `/bems/activiti/admin/todo/isShowRetraceFlowOptions/${procInstId}/${this.taskId}`,
812
+ null,
813
+ {
814
+ loading: false,
815
+ noMsg: true
816
+ }
817
+ )
818
+ return code === 200 && data
819
+ } catch (error) {
820
+ console.error('查询是否配置允许不重走流程接口错误:', error)
821
+ return false
822
+ }
823
+ },
824
+ // 驳回
825
+ async rejectFn() {
826
+ if (!this.messageC) {
827
+ return this.errMsgFn(this.authList.includes('refuse') ? $lc('拒绝') : $lc('驳回'))
828
+ }
829
+ this.showFlowDialog = await this.getIsShowRetraceFlow()
830
+
831
+ if (!this.showFlowDialog) {
832
+ this.beforeFn(this.beforeReject, () => {
833
+ axios.post('/bems/activiti/admin/todo/reject', this.getParam()).then(({ data }) => {
834
+ this.thenMsg(data, this.authList.includes('refuse') ? $lc('拒绝') : $lc('驳回至发起人'))
835
+ })
836
+ })
837
+ }
838
+ },
839
+ handleIsJumpSave() {
840
+ this.showFlowDialog = false
841
+ this.beforeFn(this.beforeReject, () => {
842
+ axios.post('/bems/activiti/admin/todo/reject', this.getParam()).then(({ data }) => {
843
+ this.thenMsg(data, $lc('驳回至发起人'))
844
+ })
845
+ })
846
+ },
847
+ async rejectToB() {
848
+ if (!this.messageC) {
849
+ return this.errMsgFn($lc('驳回'))
850
+ }
851
+ this.isShowRetrace = await this.getIsShowRetraceFlow()
852
+ this.rejectToV = true
853
+ },
854
+ rejectToFn(taskId, isJump) {
855
+ this.isJump = isJump
856
+ this.rejectToV = false
857
+ let param = this.getParam()
858
+ param.forEach((item) => {
859
+ item.taskMoveVo = { taskId }
860
+ })
861
+ this.beforeFn(this.beforeRejectPre, () => {
862
+ axios.post('/bems/activiti/admin/todo/rejectpre', param).then(({ data }) => {
863
+ this.thenMsg(data, $lc('驳回至'))
864
+ })
865
+ })
866
+ },
867
+ // 驳回到上一步
868
+ rejectPreFn(list) {
869
+ if (!this.messageC) {
870
+ return this.errMsgFn($lc('驳回'))
871
+ }
872
+ this.beforeFn(this.beforeRejectPre, () => {
873
+ axios.post('/bems/activiti/admin/todo/rejectpre', this.getParam()).then(({ data }) => {
874
+ this.thenMsg(data, $lc('驳回至上一节'))
875
+ })
876
+ })
877
+ },
878
+ onContinue() {
879
+ if (this.isWyfk) {
880
+ this.attributes = {
881
+ ebsPaymentRiskWarning: '核实无误'
882
+ }
883
+ } else {
884
+ this.attributes = undefined
885
+ }
886
+ this.verifyV = false
887
+ this.approvalFn()
888
+ },
889
+ qjFn() {
890
+ this.isTakeOff = '1'
891
+ this.checkFlowFn()
892
+ },
893
+
894
+ async checkFlowFn() {
895
+ if (this.requiredC && !this.messageC) {
896
+ return this.errMsgFn(
897
+ this.authList.includes('byAddTask') && this.addTaskList.length > 0 ? $lc('加签') : $lc('批准')
898
+ )
899
+ }
900
+ if (this.addTaskList.length > 0 && !this.addTaskType) {
901
+ return this.addErrFn()
902
+ }
903
+ let { isCheck, taskId, appNo, groupNo, typeCode, orderId, isAgentcy } = this.$route.query
904
+ this.isWyfk = ['PUBLIC_PAYMENT', 'BATCH_PERSON_PAYMENT'].includes(typeCode)
905
+ if (isCheck === '1' && this.isCheck) {
906
+ let params = {
907
+ plainText: '',
908
+ signText: '',
909
+ isCheck,
910
+ auditAdvanceDtos: [
911
+ {
912
+ isTakeOff: this.isTakeOff,
913
+ nextNodeApproveUnos: this.nextNodeApproveUnos,
914
+ nextEgwOutgoingNodeId: this.nextEgwOutgoingNodeId,
915
+ appNo,
916
+ taskId,
917
+ groupNo,
918
+ typeCode,
919
+ isAgentcy,
920
+ isCheck,
921
+ businessId: orderId,
922
+ attributes: {
923
+ appOrPc: '3'
924
+ }
925
+ }
926
+ ]
927
+ }
928
+ const { code, data } = await this.$axios.post(`/bems/activiti/admin/todo/checkFlowNew`, params)
929
+ if (code === 200) {
930
+ this.promptType = data.promptType
931
+ // 成功 失败 待确认 提交数据
932
+ this.sucessCount = data.sucessCount
933
+ this.errorCount = data.errorCount
934
+ this.tobeConfirmedCount = data.tobeConfirmedCount
935
+ this.checkSum = data.checkSum
936
+ switch (data.promptType) {
937
+ case '0':
938
+ this.approvalFn()
939
+ break
940
+ case '1':
941
+ case '2':
942
+ // 只有通过的数据
943
+ if (this.sucessCount === this.checkSum) {
944
+ this.approvalFn()
945
+ } else {
946
+ this.verifyV = true
947
+ this.verifyMsg = data
948
+ }
949
+ break
950
+ }
951
+ }
952
+ } else {
953
+ this.approvalFn()
954
+ }
955
+ },
956
+ onceCancelFn() {
957
+ this.verifyV = false
958
+ },
959
+ // 审批
960
+ approvalFn() {
961
+ if (this.requiredC && !this.messageC) {
962
+ return this.errMsgFn(
963
+ this.authList.includes('byAddTask') && this.addTaskList.length > 0 ? $lc('加签') : $lc('批准')
964
+ )
965
+ }
966
+ if (this.addTaskList.length > 0 && !this.addTaskType) {
967
+ return this.addErrFn()
968
+ }
969
+ axios.post('/bems/activiti/admin/todo/advance', this.getParam()).then(({ data }) => {
970
+ this.thenMsg(
971
+ data,
972
+ this.authList.includes('byAddTask') && this.addTaskList.length > 0 ? $lc('加签') : $lc('批准')
973
+ )
974
+ })
975
+ },
976
+ approvalNext() {
977
+ if (this.requiredC && !this.messageC) {
978
+ return this.errMsgFn(
979
+ this.authList.includes('byAddTask') && this.addTaskList.length > 0 ? $lc('加签') : $lc('批准')
980
+ )
981
+ }
982
+ if (this.addTaskList.length > 0 && !this.addTaskType) {
983
+ return this.addErrFn()
984
+ }
985
+
986
+ this.beforeFn(this.beforeRatify, () => {
987
+ axios.post('/bems/activiti/admin/todo/advance', this.getParam()).then(({ data }) => {
988
+ let { failCount, failList = {} } = data
989
+ if (failCount > 0) {
990
+ if (Array.isArray(failList)) {
991
+ let _failList = {}
992
+ failList.forEach((f = {}) => {
993
+ Object.assign(_failList, f)
994
+ })
995
+ failList = _failList
996
+ }
997
+ let errArr = Object.values(failList)
998
+ if (errArr.length > 0) {
999
+ this.$message.error(errArr.join('、'))
1000
+ } else {
1001
+ this.$message.error($lc('审批失败'))
1002
+ }
1003
+ } else {
1004
+ this.$message.success($lc('审批成功'))
1005
+ closeTagsForBackPage()
1006
+ this.getTodoList().finally(() => {
1007
+ this.goApproval(this.todoList[0])
1008
+ })
1009
+ }
1010
+ })
1011
+ })
1012
+ },
1013
+ async goApproval(row) {
1014
+ const { appUrl = {} } = await getJsonc('activiti/server-config.jsonc', null, true)
1015
+ if (appUrl[row.appNo]) {
1016
+ let path = toExaminePath(row, appUrl) || appUrl[row.appNo] + $lc('/') + row.typeCode
1017
+ linkPush(path, {
1018
+ orderId: row.businessId,
1019
+ taskId: row.taskId,
1020
+ typeCode: row.typeCode,
1021
+ processInstanceId: row.processInstanceId,
1022
+ state: row.state,
1023
+ appNo: row.appNo,
1024
+ parent: $lc('审核'),
1025
+ groupNo: row.groupNo,
1026
+ signflag: row.signflag,
1027
+ isAgentcy: row.isAgentcy,
1028
+ ...dCloumn(row)
1029
+ })
1030
+ } else {
1031
+ this.$message.warning($lc('该业务跳转路径没有配置,请联系工作流相关前端人员配置'))
1032
+ }
1033
+ },
1034
+ approvalToFn(taskId) {
1035
+ this.approvalToV = false
1036
+ let param = this.getParam()
1037
+ param.forEach((item) => {
1038
+ item.taskMoveVo = { taskId }
1039
+ })
1040
+ this.beforeFn(this.beforeRatify, () => {
1041
+ axios.post('/bems/activiti/admin/todo/advance', param).then(({ data }) => {
1042
+ this.thenMsg(data, $lc('批准至'))
1043
+ })
1044
+ })
1045
+ },
1046
+ // 获取数据字典加签备注
1047
+ async getMdmDataDoc() {
1048
+ const { code, data } = await this.$axios.get(`/bems/1.0/mdmDataDoc`, {
1049
+ typeCode: 'ADD_TASK_TAG'
1050
+ })
1051
+ if (code === 200) {
1052
+ this.remarkOpt = data || []
1053
+ }
1054
+ },
1055
+
1056
+ // 作废
1057
+ discardFn() {
1058
+ if (!this.messageC) {
1059
+ return this.errMsgFn($lc('作废'))
1060
+ }
1061
+ this.beforeFn(this.beforeDiscard, () => {
1062
+ axios.post('/bems/activiti/admin/todo/cancle', this.getParam()).then(({ data }) => {
1063
+ this.thenMsg(data, $lc('作废'))
1064
+ })
1065
+ })
1066
+ },
1067
+ setCarboncopyOk(list) {
1068
+ this.carbonCopyList = list
1069
+
1070
+ this.setCarboncopyV = false
1071
+ },
1072
+ setAddtaskOk(list) {
1073
+ this.addTaskList = list
1074
+ if (this.addTaskList.length > 0 && !this.addTaskType) {
1075
+ if (this.addTaskWay === '2') {
1076
+ this.addTaskType = '3'
1077
+ } else {
1078
+ this.addTaskType = '2'
1079
+ }
1080
+ }
1081
+
1082
+ this.setAddtaskV = false
1083
+ },
1084
+ getFileDtos(fileList) {
1085
+ return fileList.map((file) => {
1086
+ return {
1087
+ fileName: file.name,
1088
+ beid: file.response?.data
1089
+ }
1090
+ })
1091
+ },
1092
+ onRemove(file, fileList) {
1093
+ this.fileName = ''
1094
+ this.fileDtos = this.getFileDtos(fileList)
1095
+ },
1096
+ onSuccess(response, file, fileList) {
1097
+ this.fileDtos = this.getFileDtos(fileList)
1098
+ this.fileName = file.name || ''
1099
+ }
1100
+ }
1101
+ }
1102
+ </script>