index.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <!-- 删除客户资料-->
  3. <a-modal class="recover-custom"
  4. title="删除客户资料"
  5. v-model:visible="visible"
  6. @cancel="cancel"
  7. centered
  8. width="890px">
  9. <template #footer>
  10. <a-button key="submit"
  11. type="primary"
  12. :loading="loading"
  13. @click="submit">删除客户资料
  14. </a-button>
  15. </template>
  16. <a-form class="inlineForm"
  17. :form="form"
  18. @submit="handleSearch">
  19. <a-row :gutter="24">
  20. <a-col :span="12">
  21. <a-form-item label="客户类型">
  22. <span class="white">{{ selectedRow.userinfotype === '2' ? '企业' : '个人' }}</span>
  23. </a-form-item>
  24. </a-col>
  25. <a-col :span="12">
  26. <a-form-item label="企业名称">
  27. <span class="white">{{ formatValue(selectedRow.customername) }}</span>
  28. </a-form-item>
  29. </a-col>
  30. </a-row>
  31. <a-row :gutter="24">
  32. <a-col :span="12">
  33. <a-form-item label="企业简称">
  34. <span class="white">{{ formatValue(selectedRow.nickname) }}</span>
  35. </a-form-item>
  36. </a-col>
  37. <a-col :span="12">
  38. <a-form-item label="证件类型">
  39. <span class="white">{{ formatValue(selectedRow.cardtypename) }}</span>
  40. </a-form-item>
  41. </a-col>
  42. </a-row>
  43. <a-row :gutter="24">
  44. <a-col :span="12">
  45. <a-form-item label="法定代表人">
  46. <span class="white">{{ formatValue(selectedRow.legalpersonname) }}</span>
  47. </a-form-item>
  48. </a-col>
  49. <a-col :span="12">
  50. <a-form-item label="证件号码">
  51. <span class="white">{{ formatValue(selectedRow.cardnum) }}</span>
  52. </a-form-item>
  53. </a-col>
  54. </a-row>
  55. <a-row :gutter="24">
  56. <a-col :span="12">
  57. <a-form-item label="纳税人识别号">
  58. <span class="white">{{ formatValue(selectedRow.taxpayernum) }}</span>
  59. </a-form-item>
  60. </a-col>
  61. <a-col :span="12">
  62. <a-form-item label="营业执照">
  63. <a class="blue">查看附件</a>
  64. </a-form-item>
  65. </a-col>
  66. </a-row>
  67. <a-row :gutter="24">
  68. <a-col :span="12">
  69. <a-form-item label="联系人">
  70. <span class="white">{{ formatValue(selectedRow.contactname) }}</span>
  71. </a-form-item>
  72. </a-col>
  73. <a-col :span="12">
  74. <a-form-item label="联系人手机号">
  75. <span class="white">{{ formatValue(selectedRow.mobile) }}</span>
  76. </a-form-item>
  77. </a-col>
  78. </a-row>
  79. <a-row :gutter="24">
  80. <a-col :span="12">
  81. <a-form-item label="联系电话">
  82. <span class="white">{{ formatValue(selectedRow.telphone) }}</span>
  83. </a-form-item>
  84. </a-col>
  85. <a-col :span="12">
  86. <a-form-item label="状态">
  87. <span class="green">{{ formatValue(getStatusName(selectedRow.status)) }}</span>
  88. </a-form-item>
  89. </a-col>
  90. </a-row>
  91. <a-row :gutter="24">
  92. <a-col :span="24">
  93. <a-form-item label="通讯地址">
  94. <span class="white">{{ formatValue(selectedRow.address) }}</span>
  95. </a-form-item>
  96. </a-col>
  97. </a-row>
  98. <a-row :gutter="24">
  99. <a-col :span="24">
  100. <a-form-item label="备注">
  101. <span class="white">{{ formatValue(selectedRow.remark) }}</span>
  102. </a-form-item>
  103. </a-col>
  104. </a-row>
  105. </a-form>
  106. </a-modal>
  107. </template>
  108. <script lang="ts">
  109. import {defineComponent, PropType, ref} from 'vue';
  110. import {closeModal} from '@/common/setup/modal/index';
  111. import {DeleteUserReq, QueryCustomInfoType} from '@/services/go/ermcp/customInfo/interface';
  112. import {formatValue} from '@/common/methods';
  113. import { getStatusName } from '@/common/constants/enumsName';
  114. import { Modal} from 'ant-design-vue';
  115. import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
  116. import {QueryDeleteUserInfoApply} from "@/services/go/ermcp/customInfo";
  117. export default defineComponent({
  118. name: 'recover-custom',
  119. components: {},
  120. props: {
  121. selectedRow: {
  122. type: Object as PropType<QueryCustomInfoType>,
  123. default: {},
  124. },
  125. },
  126. setup(props, context) {
  127. const {visible, cancel} = closeModal('custom_info_btn_delete');
  128. const loading = ref<boolean>(false);
  129. function submit() {
  130. Modal.confirm({
  131. title: '是否确认删除客户资料',
  132. okText: '确认删除',
  133. cancelText: '取消',
  134. onOk() {
  135. let reqParams: DeleteUserReq = {
  136. userID: props.selectedRow.userid
  137. }
  138. requestResultLoadingAndInfo(QueryDeleteUserInfoApply, reqParams, loading, ['删除成功', '删除失败:']).then(() => {
  139. cancel();
  140. context.emit('refresh');
  141. });
  142. },
  143. onCancel() {
  144. console.log('Cancel');
  145. },
  146. });
  147. }
  148. return {
  149. visible,
  150. cancel,
  151. submit,
  152. loading,
  153. formatValue,
  154. getStatusName,
  155. };
  156. },
  157. });
  158. </script>
  159. <style lang="less">
  160. .recover-custom {
  161. }
  162. </style
  163. >;