阅行客电子档案
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

437 lines
16 KiB

3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
​
​
​
​
​
​
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
3 years ago
3 years ago
​
2 years ago
​
3 years ago
​
​
​
​
​
​
3 years ago
4 weeks ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
​
​
​
​
​
​
​
​
2 years ago
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
3 years ago
​
​
3 years ago
​
​
​
​
5 months ago
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
3 years ago
3 years ago
3 years ago
3 years ago
​
3 years ago
​
​
​
3 years ago
​
​
3 years ago
​
​
3 years ago
​
3 years ago
3 years ago
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
3 years ago
2 years ago
​
​
​
​
3 years ago
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
3 years ago
​
3 years ago
​
​
3 years ago
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 weeks ago
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
2 years ago
​
3 years ago
​
​
3 years ago
​
​
​
2 years ago
​
3 years ago
3 years ago
​
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
  1. <template>
  2. <el-dialog class="detail-dialog" :visible.sync="formVisible" :modal-append-to-body="false" :close-on-click-modal="false" append-to-body title="流程处理">
  3. <div class="setting-dialog">
  4. <div class="detail-tab tab-content">
  5. <ul class="tab-nav">
  6. <li :class="{'active-tab-nav': activeIndex == 0 }" @click="changeActiveTab(0)">流程表单</li>
  7. <li :class="{'active-tab-nav': activeIndex == 1 }" @click="changeActiveTab(1)">流程图</li>
  8. <!-- <li :class="{'active-tab-nav': activeIndex == 2 }" @click="changeActiveTab(2)">业务详情</li> -->
  9. </ul>
  10. </div>
  11. <div v-if="activeIndex == 0">
  12. <div class="detail-info">
  13. <p style="width: 60%;"><span>流程名称:</span>{{ baseInfo && baseInfo.title }}</p>
  14. <p><span>启动时间:</span>{{ baseInfo && baseInfo.createTime | parseTime }}</p>
  15. <p style="width: 60%;"><span>实例ID:</span>{{ baseInfo && baseInfo.procInstId }}</p>
  16. <p><span>发起人:</span>{{ baseInfo && baseInfo.createBy }}</p>
  17. </div>
  18. <!-- 1.归档 index=1 2.退回 index=2 3.开放 index=6 4.销毁index=7 5.利用index=3 6.内部移交index=4 7.外部移交index=5 -->
  19. <div class="detail-list">
  20. <p><span>业务类型:</span>{{ businessTypeText }}</p>
  21. <p v-if="baseInfo && baseInfo.businessType === 6"><span>目标全宗:</span>{{ baseInfo && baseInfo.targetFondsNo }}</p>
  22. <p v-if="baseInfo && baseInfo.businessType !== 6"><span>原始位置:</span>{{ baseInfo && baseInfo.businessType === 1 ? '收集库' : baseInfo && baseInfo.businessType === 2 ? '管理库' : '-' }}</p>
  23. <p v-if="baseInfo && baseInfo.businessType !== 6"><span>目标位置:</span>{{ baseInfo && baseInfo.businessType === 1 ? '管理库' : baseInfo && baseInfo.businessType === 2 ? '收集库' : '-' }}</p>
  24. <!-- <p><span>赋权类型:</span>-</p> -->
  25. <p v-if="baseInfo && baseInfo.giveStartTime"><span>起始时间:</span>{{ baseInfo && baseInfo.giveStartTime | parseTime }}</p>
  26. <p v-else><span>起始时间:</span>-</p>
  27. <p v-if="baseInfo && baseInfo.giveEndTime"><span>终止时间:</span>{{ baseInfo && baseInfo.giveEndTime | parseTime }}</p>
  28. <p v-else><span>终止时间:</span>-</p>
  29. <p v-if="baseInfo && baseInfo.businessType !== 5"><span>申请缘由:</span>{{ baseInfo && baseInfo.remarks ? baseInfo.remarks : baseInfo.reason }}</p>
  30. <p v-else><span>利用目的:</span>{{ baseInfo && baseInfo.borrowReason }}</p>
  31. <!-- <p><span>利用次数:</span>-</p> -->
  32. </div>
  33. <div class="opinion">
  34. <!-- <h5>归档审批</h5> -->
  35. <div class="opinion-form">
  36. <!-- <span>审批意见</span>
  37. <el-input v-model="opinionTxt" placeholder="请输入" type="textarea" :rows="2" /> -->
  38. <el-form ref="form" :model="form" inline label-width="100px">
  39. <el-form-item label="审批意见" prop="opinion" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
  40. <el-input v-model="form.opinion" type="textarea" :rows="3" style="width: 700px;" />
  41. </el-form-item>
  42. </el-form>
  43. </div>
  44. </div>
  45. <businessDetails :base-info="baseInfo" :table-data="tableData" :is-utilize="isUtilize" :is-flowable-form="true" :set-page="setPage" @select-change="handleSelectChange" @page-change="pageChangeHandler" @size-change="sizeChangeHandler" />
  46. </div>
  47. <div v-if="activeIndex == 1" class="detail-img">
  48. <img :src="'data:image/jpeg;base64,'+ srcImg" alt="" :onerror="defaultImg">
  49. </div>
  50. <div slot="footer" class="dialog-footer">
  51. <el-button :loading="submitLoading" @click="submitOpinion(false)">驳回</el-button>
  52. <el-button :loading="submitLoading2" type="primary" @click="submitOpinion(true)">审批</el-button>
  53. </div>
  54. </div>
  55. </el-dialog>
  56. </template>
  57. <script>
  58. import { FetchBecomeDocumentConfirm } from '@/api/collect/collect'
  59. import { FetchMergeToFileConfirm, FetchBatchToFileConfirm } from '@/api/prearchiveLibrary/prearchiveLibrary'
  60. import { FetchGenProcessDiagram } from '@/api/system/flowable'
  61. // FetchBusinessFlowDetails,
  62. import { FetchHandBusinessFlowDetails, FetchUtilizeConfirm, FetchArchivesReturnConfirm, FetchArchivesOpenConfirm, FetchArchivesDestructionConfirm, FetchTransferConfirm, FetchOfflineTransferConfirm, FetchMoveToFileConfirm } from '@/api/archivesManage/library'
  63. import businessDetails from '@/views/system/processManage/runningProcess/module/businessDetails/index.vue'
  64. export default {
  65. name: 'Form',
  66. components: {
  67. businessDetails
  68. },
  69. data() {
  70. return {
  71. formVisible: false,
  72. activeIndex: 0,
  73. form: {
  74. opinion: null
  75. },
  76. selectRow: null,
  77. selectCenterRow: null,
  78. srcImg: '',
  79. defaultImg: 'this.src="' + require('@/assets/images/system/default-img.jpg') + '"',
  80. tableData: [],
  81. baseInfo: null,
  82. isUtilize: false,
  83. selectedValues: {},
  84. setPage: {
  85. total: 0,
  86. size: 10,
  87. page: 0
  88. },
  89. isMessage: false,
  90. submitLoading: false,
  91. submitLoading2: false
  92. }
  93. },
  94. computed: {
  95. businessTypeText() {
  96. const businessType = this.baseInfo && this.baseInfo.businessType
  97. // 1.归档 index=1 2.退回 index=2 3.开放 index=6 4.销毁index=7 5.利用index=3 6.内部移交index=4 7.外部移交index=5
  98. switch (businessType) {
  99. case 1 :
  100. return '归档审批'
  101. case 2 :
  102. return '退回审批'
  103. case 3:
  104. return '开放鉴定'
  105. case 4:
  106. return '销毁鉴定'
  107. case 5:
  108. return '赋权审批'
  109. case 6:
  110. return '内部移交'
  111. case 7:
  112. return '外部移交'
  113. case 8:
  114. return '预归档批量成件'
  115. case 9:
  116. return '预归档合并成件'
  117. case 10:
  118. return '预归档移动'
  119. default:
  120. return '-'
  121. }
  122. }
  123. },
  124. methods: {
  125. changeActiveTab(data) {
  126. this.activeIndex = data
  127. if (data === 1) {
  128. this.getProcessImg()
  129. } else {
  130. this.setPage.page = 0
  131. this.getBusinessFlowDetails()
  132. }
  133. },
  134. getProcessImg() {
  135. this.srcImg = ''
  136. FetchGenProcessDiagram({ 'processId': this.isMessage ? (this.baseInfo && this.baseInfo.procInstId) : this.selectRow.procInstId }).then((res) => {
  137. if (res.code !== 500) {
  138. this.srcImg = res
  139. } else {
  140. this.srcImg = ''
  141. }
  142. }).catch(err => {
  143. console.log(err)
  144. })
  145. },
  146. handleSelectChange({ id, value }) {
  147. if (value === -1) {
  148. this.$message.error('请选择有效实体借阅状态!')
  149. }
  150. this.$set(this.selectedValues, id, value)
  151. },
  152. getBusinessFlowDetails() {
  153. this.tableData = []
  154. this.selectedValues = {}
  155. const params = {
  156. 'businessId': this.isMessage ? this.selectCenterRow.businessId : this.selectRow.id,
  157. 'page': this.setPage.page,
  158. 'size': this.setPage.size
  159. }
  160. FetchHandBusinessFlowDetails(params).then((res) => {
  161. if (res.code !== 500) {
  162. this.formVisible = true
  163. this.baseInfo = res.businessFlow
  164. this.selectRow = res.businessFlow
  165. if (this.selectRow.businessType === 5) {
  166. this.isUtilize = true
  167. res.details.content.forEach(item => {
  168. item.utilizeType = item.utilizeType.split(',').map(Number)
  169. })
  170. } else {
  171. this.isUtilize = false
  172. res.details.content.forEach(item => {
  173. item.utilizeType = []
  174. })
  175. }
  176. this.tableData = res.details.content
  177. this.tableData.forEach(item => {
  178. if (item.utilizeState === -1) {
  179. item.utilizeState = 1
  180. }
  181. this.$set(this.selectedValues, item.archivesId, item.utilizeState)
  182. })
  183. this.setPage.total = res.details.totalElements
  184. } else {
  185. this.$message({ message: res.message, type: 'error', offset: 8 })
  186. }
  187. }).catch(err => {
  188. console.log(err)
  189. })
  190. },
  191. // 当前页改变
  192. pageChangeHandler(e) {
  193. this.setPage.page = e - 1
  194. console.log('this.setPage.page', this.setPage.page)
  195. this.getBusinessFlowDetails()
  196. },
  197. // 每页条数改变
  198. sizeChangeHandler(e) {
  199. this.setPage.size = e
  200. this.setPage.page = 0
  201. this.getBusinessFlowDetails()
  202. },
  203. submitOpinion(type) {
  204. if (type) {
  205. this.submitLoading2 = true
  206. } else {
  207. this.submitLoading = true
  208. }
  209. this.$refs['form'].validate((valid) => {
  210. if (valid) {
  211. if (this.selectRow.businessType === 5) {
  212. if (Object.keys(this.selectedValues).length === 0) {
  213. this.$message.error('请选择有效实体借阅状态!')
  214. return false
  215. } else {
  216. const hasInvalidSelection = Object.values(this.selectedValues).some(value => value === -1)
  217. if (hasInvalidSelection) {
  218. this.$message.error('请选择有效实体借阅状态!')
  219. return false
  220. }
  221. }
  222. }
  223. const params = {
  224. 'id': this.selectRow.id,
  225. 'isPass': type,
  226. 'opinion': this.form.opinion,
  227. 'map': this.selectedValues
  228. }
  229. console.log(params)
  230. if (this.selectRow.businessType === 1) {
  231. // 归档
  232. FetchBecomeDocumentConfirm(params).then((res) => {
  233. if (res.code !== 500) {
  234. this.$message({ message: res, type: 'success', offset: 8 })
  235. } else {
  236. this.$message({ message: '操作提交失败', type: 'error', offset: 8 })
  237. }
  238. this.closedDialog()
  239. }).catch(err => {
  240. console.log(err)
  241. })
  242. } else if (this.selectRow.businessType === 2) {
  243. // 退回
  244. FetchArchivesReturnConfirm(params).then((res) => {
  245. if (res.code !== 500) {
  246. this.$message({ message: res, type: 'success', offset: 8 })
  247. } else {
  248. this.$message({ message: '操作提交失败', type: 'error', offset: 8 })
  249. }
  250. this.closedDialog()
  251. }).catch(err => {
  252. console.log(err)
  253. })
  254. } else if (this.selectRow.businessType === 3) {
  255. // 开放
  256. FetchArchivesOpenConfirm(params).then((res) => {
  257. if (res.code !== 500) {
  258. this.$message({ message: res, type: 'success', offset: 8 })
  259. } else {
  260. this.$message({ message: '操作提交失败', type: 'error', offset: 8 })
  261. }
  262. this.closedDialog()
  263. }).catch(err => {
  264. console.log(err)
  265. })
  266. } else if (this.selectRow.businessType === 4) {
  267. // 销毁
  268. FetchArchivesDestructionConfirm(params).then((res) => {
  269. if (res.code !== 500) {
  270. this.$message({ message: res, type: 'success', offset: 8 })
  271. } else {
  272. this.$message({ message: '操作提交失败', type: 'error', offset: 8 })
  273. }
  274. this.closedDialog()
  275. }).catch(err => {
  276. console.log(err)
  277. })
  278. } else if (this.selectRow.businessType === 5) {
  279. // 利用
  280. FetchUtilizeConfirm(params).then((res) => {
  281. if (res.code !== 500) {
  282. this.$message({ message: res, type: 'success', offset: 8 })
  283. } else {
  284. this.$message({ message: '操作提交失败', type: 'error', offset: 8 })
  285. }
  286. this.closedDialog()
  287. }).catch(err => {
  288. console.log(err)
  289. })
  290. } else if (this.selectRow.businessType === 6) {
  291. // 在线移交
  292. FetchTransferConfirm(params).then((res) => {
  293. if (res.code !== 500) {
  294. this.$message({ message: res, type: 'success', offset: 8 })
  295. } else {
  296. this.$message({ message: '操作提交失败', type: 'error', offset: 8 })
  297. }
  298. this.closedDialog()
  299. }).catch(err => {
  300. console.log(err)
  301. })
  302. } else if (this.selectRow.businessType === 7) {
  303. // 离线移交
  304. FetchOfflineTransferConfirm(params).then((res) => {
  305. if (res.code !== 500) {
  306. this.$message({ message: res, type: 'success', offset: 8 })
  307. } else {
  308. this.$message({ message: '操作提交失败', type: 'error', offset: 8 })
  309. }
  310. this.closedDialog()
  311. }).catch(err => {
  312. this.$message({ message: '操作提交失败', type: 'error', offset: 8 })
  313. console.log(err)
  314. })
  315. } else if (this.selectRow.businessType === 8) {
  316. // 批量成件
  317. FetchBatchToFileConfirm(params).then((res) => {
  318. if (res.code !== 500) {
  319. this.$message({ message: res, type: 'success', offset: 8 })
  320. } else {
  321. this.$message({ message: '操作提交失败', type: 'error', offset: 8 })
  322. }
  323. this.closedDialog()
  324. }).catch(err => {
  325. console.log(err)
  326. })
  327. } else if (this.selectRow.businessType === 9) {
  328. // 合并成件
  329. FetchMergeToFileConfirm(params).then((res) => {
  330. if (res.code !== 500) {
  331. this.$message({ message: res, type: 'success', offset: 8 })
  332. } else {
  333. this.$message({ message: '操作提交失败', type: 'error', offset: 8 })
  334. }
  335. this.closedDialog()
  336. }).catch(err => {
  337. console.log(err)
  338. })
  339. } else if (this.selectRow.businessType === 10) {
  340. // 预归档移动
  341. FetchMoveToFileConfirm(params).then((res) => {
  342. if (res.code !== 500) {
  343. this.$message({ message: res, type: 'success', offset: 8 })
  344. } else {
  345. this.$message({ message: '操作提交失败', type: 'error', offset: 8 })
  346. }
  347. this.closedDialog()
  348. }).catch(err => {
  349. console.log(err)
  350. })
  351. }
  352. // this.closedDialog()
  353. } else {
  354. this.submitLoading = false
  355. this.submitLoading2 = false
  356. return false
  357. }
  358. })
  359. },
  360. closedDialog() {
  361. this.formVisible = false
  362. this.form.opinion = null
  363. this.submitLoading = false
  364. this.submitLoading2 = false
  365. this.$emit('refresh')
  366. }
  367. }
  368. }
  369. </script>
  370. <style lang='scss' scoped>
  371. .detail-dialog{
  372. .detail-info,
  373. .detail-list{
  374. display: flex;
  375. justify-content: space-between;
  376. flex-wrap: wrap;
  377. padding: 4px 18px;
  378. font-size: 14px;
  379. line-height: 30px;
  380. color: #545B65;
  381. background-color: #F6F8FC;
  382. p{
  383. width: 40%;
  384. span{
  385. display: inline-block;
  386. width: 75px;
  387. text-align: right;
  388. color: #0C0E1E;
  389. }
  390. }
  391. }
  392. .opinion{
  393. margin: 10px 0;
  394. h5{
  395. margin-bottom: 18px;
  396. font-size: 16px;
  397. color: #0C0E1E;
  398. text-align: center;
  399. }
  400. .opinion-form{
  401. display: flex;
  402. justify-content: space-between;
  403. span{
  404. display: block;
  405. width: 83px;
  406. margin-right: 12px;
  407. line-height: 30px;
  408. text-align: right;
  409. color: #545B65;
  410. }
  411. ::v-deep .el-textarea__inner{
  412. border-color: #E6E8ED;
  413. }
  414. }
  415. }
  416. .detail-img{
  417. width: 818px;
  418. height: 404px;
  419. overflow: hidden;
  420. overflow-y: scroll;
  421. img{
  422. display: block;
  423. // width: 100%;
  424. }
  425. }
  426. .detail-list{
  427. // margin-bottom: 16px;
  428. padding: 0 18px 4px 18px;
  429. p{
  430. width: 33%;
  431. }
  432. }
  433. }
  434. </style>