index.vue 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <view>
  3. <wd-tabs v-model="tab" swipeable sticky @change="handleChange">
  4. <block v-for="(item, idx) in tabList" :key="idx">
  5. <wd-tab :title="item.title">
  6. <view class="bg-#F6F6F6 px32rpx pt-24rpx bottom-safe-area" v-if="data">
  7. <view class="p24rpx box-border bg-white mb24rpx rounded-32rpx" v-for="it in data" :key="it.id">
  8. <view class="flex items-center justify-between">
  9. <view class="font-semibold text-32rpx text-#222222">{{
  10. it.useUserName
  11. }}</view>
  12. <commonbtn bg-color="#0074FF" v-if="it.verifyStatus == 0 && it.orPostpone != 1">未核销</commonbtn>
  13. <commonbtn bg-color="rgba(0,0,0,0.3)" v-if="it.verifyStatus == 1">已核销</commonbtn>
  14. <commonbtn bg-color="#FB5B5B" v-if="it.orPostpone == 1">延课</commonbtn>
  15. </view>
  16. <view class="flex items-center justify-between text-28rpx mt24rpx">
  17. <view class="text-[rgb(0,0,0,0.3)]">手机号码</view>
  18. <view>{{ it.useUserPhone }}</view>
  19. </view>
  20. <view class="text-[rgb(0,0,0,0.3)] mt24rpx"> 人脸照片 </view>
  21. <view class="mt24rpx">
  22. <image :src="it.useUserImage" class="w-160rpx h-160rpx rounded-32rpx" />
  23. </view>
  24. <view class="mt24rpx flex items-center justify-between" v-if="it.orPostpone == 1">
  25. <view class="text-28rpx text-[rgb(0,0,0,0.3)]">延课原因</view>
  26. <view>{{ it.postponeReason }}</view>
  27. </view>
  28. </view>
  29. </view>
  30. </wd-tab>
  31. </block>
  32. </wd-tabs>
  33. </view>
  34. </template>
  35. <script setup lang="ts">
  36. const tab = ref(0);
  37. const tabList = ref([
  38. { title: "全部" },
  39. { title: "延课(2)" },
  40. { title: "已核销(12)" },
  41. { title: "未核销(12)" },
  42. ]);
  43. const coursePriceRulesId = ref();
  44. onLoad(async (query: any) => {
  45. coursePriceRulesId.value = query.id;
  46. tabList.value[1].title = `延课(${query.postponeNum})`;
  47. tabList.value[2].title = `已核销(${query.writtenOffNum})`;
  48. tabList.value[3].title = `未核销(${query.unwrittenOffNum})`;
  49. await getList({ coursePriceRulesId: query.id });
  50. });
  51. const { data, send: getList } = useRequest(
  52. (data) =>
  53. Apis.app.courseQueryUsers({
  54. data,
  55. }),
  56. { immediate: false },
  57. );
  58. function handleChange(e: { index: number }) {
  59. console.log(e, '菜单标签');
  60. const { index } = e;
  61. getList({
  62. coursePriceRulesId: coursePriceRulesId.value,
  63. verifyStatus: index == 2 ? 1 : index == 3 ? 0 : null,
  64. orPostpone: index === 3 ? 0 : (index != 1 ? null : index),
  65. });
  66. }
  67. onReachBottom(() => {
  68. console.log("页面触底");
  69. });
  70. </script>
  71. <style scoped></style>
  72. <route lang="json">{
  73. "name": "personnelView",
  74. "style": {
  75. "navigationBarTitleText": "人员查看"
  76. }
  77. }</route>