verifyModal.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <a-modal
  3. centered
  4. :footer="null"
  5. :maskClosable="false"
  6. title="人工录入单审核进度"
  7. v-model="isShow"
  8. @cancel="isShow=false"
  9. width="50%">
  10. <p>说明:以下信息来自钉钉</p>
  11. <p>提审时间:{{ auditDate }}</p>
  12. <a-spin :spinning="spinning" tip="Loading...">
  13. <s-table
  14. class="sTable fixPagination"
  15. ref="table"
  16. size="small"
  17. :rowKey="(record) => record.id"
  18. :columns="columns"
  19. :data="loadData"
  20. :scroll="{ y: 500 }"
  21. :showPagination="false"
  22. :defaultLoadData="true"
  23. bordered>
  24. </s-table>
  25. </a-spin>
  26. </a-modal>
  27. </template>
  28. <script>
  29. import { STable } from '@/components'
  30. import { getProcessInstance } from '@/api/expenseManagement'
  31. export default {
  32. name: 'VerifyModal',
  33. components: { STable },
  34. props: {
  35. openModal: {
  36. type: Boolean,
  37. default: false
  38. },
  39. itemSn: {
  40. type: [Number, String],
  41. default: ''
  42. }
  43. },
  44. data () {
  45. return {
  46. spinning: false,
  47. isShow: this.openModal,
  48. auditDate: '',
  49. columns: [{ title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
  50. { title: '人员姓名', width: '12%', dataIndex: 'approvalName', align: 'center', customRender: function (text) { return text || '--' } },
  51. { title: '人员类型', dataIndex: 'processTaskType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
  52. { title: '状态', dataIndex: 'approvalStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
  53. { title: '审批意见', dataIndex: 'approvalOpinion', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  54. { title: '附件', dataIndex: 'attachmentNames', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
  55. { title: '操作时间', dataIndex: 'approvalTime', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
  56. // 加载数据方法 必须为 Promise 对象
  57. loadData: parameter => {
  58. this.spinning = true
  59. delete parameter.tableId
  60. delete parameter.index
  61. return getProcessInstance({ businessType: 'VERIFY_ACCOUNT_CHANGE', businessSn: this.itemSn }).then(res => {
  62. let data
  63. if (res.status == 200) {
  64. data = res.data ? res.data[0] ? res.data[0].opinionList ? res.data[0].opinionList : [] : [] : []
  65. const no = 0
  66. for (var i = 0; i < data.length; i++) {
  67. data[i].no = no + i + 1
  68. }
  69. this.disabled = false
  70. }
  71. this.spinning = false
  72. this.auditDate = res.data[data.length - 1].createDate
  73. return data
  74. })
  75. }
  76. }
  77. },
  78. watch: {
  79. openModal (nVal, oVal) {
  80. this.isShow = nVal
  81. },
  82. isShow (nVal, oVal) {
  83. if (!nVal) {
  84. this.$emit('close')
  85. this.$refs.table.clearTable()
  86. } else {
  87. this.$nextTick(() => {
  88. this.$refs.table.refresh()
  89. })
  90. }
  91. },
  92. itemSn (nVal, oVal) {
  93. }
  94. }
  95. }
  96. </script>
  97. <style>
  98. </style>