index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <!-- 审核客户资料-->
  3. <a-modal class="commonModal custom_info_btn_check"
  4. title="审核客户资料"
  5. v-model:visible="visible"
  6. @cancel="cancel"
  7. centered
  8. width="890px">
  9. <template #footer>
  10. <a-button key="submit"
  11. class="cancelBtn"
  12. @click="cancel">取消
  13. </a-button>
  14. <a-button key="submit"
  15. type="primary"
  16. :loading="loading"
  17. @click="submit">审核通过
  18. </a-button>
  19. <a-button key="submit"
  20. type="primary"
  21. :loading="loading"
  22. @click="refuseSubmit">审核拒绝
  23. </a-button>
  24. </template>
  25. <Detail :selectedRow="selectedRow" />
  26. </a-modal>
  27. </template>
  28. <script lang="ts">
  29. import { defineComponent, PropType, ref } from 'vue';
  30. import { closeModal } from '@/common/setup/modal/index';
  31. import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
  32. import {AuditWskhUserInfoReq, UserInfoCheckMangeReq} from '@/services/proto/accountinfo/interface';
  33. import { getUserId } from '@/services/bus/account';
  34. import { Modal } from 'ant-design-vue';
  35. import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
  36. import {auditWskhUserInfo, userInfoCheck} from '@/services/proto/accountinfo';
  37. import Detail from '../common-detail/index.vue';
  38. export default defineComponent({
  39. name: 'custom_info_btn_check',
  40. components: { Detail },
  41. props: {
  42. selectedRow: {
  43. type: Object as PropType<QueryCustomInfoType>,
  44. default: {},
  45. },
  46. },
  47. setup(props, context) {
  48. const loading = ref<boolean>(false);
  49. const { visible, cancel } = closeModal('custom_info_btn_check');
  50. // 审核通过
  51. function submit() {
  52. Modal.confirm({
  53. title: '是否确认审核通过',
  54. okText: '确认通过',
  55. cancelText: '取消',
  56. onOk() {
  57. let reqParam: AuditWskhUserInfoReq = {
  58. UserID: props.selectedRow.userid, // uint64 用户ID(自增ID)SEQ_WSKH_USERINFO
  59. UserState: 4, // uint32 审核状态:4-审核通过,5-审核拒绝
  60. AuditedBy: getUserId(),// uint64 审核人
  61. AuditRemark: ""
  62. };
  63. requestResultLoadingAndInfo(auditWskhUserInfo, reqParam, loading, ['审核成功', '审核失败:']).then(() => {
  64. cancel();
  65. context.emit('refresh');
  66. });
  67. },
  68. onCancel() {},
  69. });
  70. }
  71. // 审核拒绝
  72. function refuseSubmit() {
  73. Modal.confirm({
  74. title: '是否确认审核拒绝',
  75. okText: '审核拒绝',
  76. cancelText: '取消',
  77. onOk() {
  78. let reqParam: AuditWskhUserInfoReq = {
  79. UserID: props.selectedRow.userid, // uint64 用户ID(自增ID)SEQ_WSKH_USERINFO
  80. UserState: 5, // uint32 审核状态:4-审核通过,5-审核拒绝
  81. AuditedBy: getUserId(),// uint64 审核人
  82. AuditRemark: ""
  83. };
  84. requestResultLoadingAndInfo(auditWskhUserInfo, reqParam, loading, ['审核拒绝成功', '审核拒绝失败:']).then(() => {
  85. cancel();
  86. context.emit('refresh');
  87. });
  88. },
  89. onCancel() {},
  90. });
  91. }
  92. return {
  93. visible,
  94. cancel,
  95. submit,
  96. loading,
  97. refuseSubmit,
  98. };
  99. },
  100. });
  101. </script>
  102. <style lang="less">
  103. .custom_info_btn_check {
  104. .upload {
  105. .look {
  106. margin-left: 0;
  107. }
  108. }
  109. }
  110. </style
  111. >;