MemberPayLog.vue 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <div class="flex1 ov-hd">
  3. <vxe-table :loading="loading" border :data="list">
  4. <vxe-column title="订单号" field="id" min-width="100" :formatter="colNoData" />
  5. <vxe-column title="会员名称" field="cpyName" min-width="100" :formatter="colNoData" />
  6. <vxe-column title="会员级别" field="vipLevelDesc" width="100" :formatter="colNoData" />
  7. <vxe-column title="缴费金额" width="120" :formatter="colNoData">
  8. <template #default="{ row }">{{ row.paymentAmount }}元</template>
  9. </vxe-column>
  10. <vxe-column title="邮箱" field="email" min-width="100" :formatter="colNoData" />
  11. <vxe-column title="缴费人" field="createName" min-width="100" :formatter="colNoData" />
  12. <vxe-column title="缴费时间" field="createTime" width="170" :formatter="colNoData" />
  13. <vxe-column title="发票" width="100" :formatter="colNoData">
  14. <template #default="{ row }">{{ +row.invoiceStatus ? '已开票' : '待开票' }}</template>
  15. </vxe-column>
  16. <vxe-column title="操作" class-name="small-padding fixed-width">
  17. <template #default="{ row }">
  18. <el-button v-if="+row.invoiceStatus" style="color: #999;" tag="a" text :underline="false" type="primary" :href="row.invoiceUrlAddr" target="_blank">查看发票</el-button>
  19. <el-button v-else type="primary" text @click="clickRowEdit(row)">上传发票</el-button>
  20. </template>
  21. </vxe-column>
  22. </vxe-table>
  23. </div>
  24. <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
  25. <uploadInvoiceForm v-if="showInvoice" v-model:show="showInvoice" :info="rowInfo"></uploadInvoiceForm>
  26. </template>
  27. <script setup name="Pay-log" lang="ts">
  28. import { colNoData } from '@/utils/noData';
  29. import { listVipPayment } from '@/api/dgtmedicine/vipPayment/index';
  30. import { DateRange } from '@/views/models/index';
  31. import { uploadInvoiceForm } from '../model/index';
  32. const { query }: any = useRoute()
  33. const router = useRouter();
  34. const { proxy } = getCurrentInstance() as ComponentInternalInstance;
  35. const list = ref<any[]>([]);
  36. const loading = ref(true);
  37. const showSearch = ref(true);
  38. const showInvoice = ref(false);
  39. const total = ref(0);
  40. const queryFormRef = ref<ElFormInstance>();
  41. const data = reactive<any>({
  42. queryParams: {
  43. pageNum: 1,
  44. pageSize: 10,
  45. dateRange: [],
  46. id: '',
  47. startDate: '',
  48. endDate: '',
  49. }
  50. });
  51. const { queryParams } = toRefs(data);
  52. /** 点击行上传发票 */
  53. const rowInfo = ref<any>({});
  54. const clickRowEdit = (row: any) => {
  55. rowInfo.value = row;
  56. showInvoice.value = true;
  57. };
  58. /** 查询会员信息列表 */
  59. const getList = async () => {
  60. loading.value = true;
  61. const res = await listVipPayment({ ...queryParams.value, memberId: query?.memberId });
  62. list.value = res.rows;
  63. total.value = res.total;
  64. loading.value = false;
  65. };
  66. /** 搜索按钮操作 */
  67. const handleQuery = (level?: any) => {
  68. queryParams.value.pageNum = 1;
  69. getList();
  70. };
  71. /** 重置按钮操作 */
  72. const resetQuery = () => {
  73. queryFormRef.value?.resetFields();
  74. queryParams.value.startDate = '';
  75. queryParams.value.endDate = '';
  76. handleQuery();
  77. };
  78. onMounted(() => {
  79. getList();
  80. });
  81. </script>