index.vue 3.6 KB

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