You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

qingfen.vue 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <view class="content">
  3. <view class="title">请选择查询条件:</view>
  4. <view class="choice_wrap">
  5. <uni-datetime-picker type="date" :clear-icon="false" v-model="state.dateTime" @change="changeTime" />
  6. <view class="card">
  7. <uni-data-select v-model="state.cardType" :localdata="state.cardRange" @change="changeCard"
  8. :clear="false"></uni-data-select>
  9. </view>
  10. <uni-data-select v-model="state.qingType" :localdata="state.qingRange" @change="changeQing"
  11. :clear="false"></uni-data-select>
  12. </view>
  13. <view class="uni-container">
  14. <uni-table ref="table" border stripe emptyText="暂无更多数据">
  15. <uni-tr>
  16. <uni-th v-for="(item,index) in state.listData" :key="index" align="center"
  17. :width="item.width">{{item.name}}</uni-th>
  18. </uni-tr>
  19. <uni-tr>
  20. <uni-td align="center" v-for="(item,index) in state.listData" :key="index">{{item.value}}</uni-td>
  21. </uni-tr>
  22. </uni-table>
  23. </view>
  24. </view>
  25. </template>
  26. <script setup lang="ts">
  27. import { reactive } from "vue";
  28. const state = reactive({
  29. isJi: true, //是不是记账卡
  30. dateTime: Date.now(), //日期
  31. cardType: 0,
  32. cardRange: [{
  33. value: 0,
  34. text: "记账卡"
  35. },
  36. {
  37. value: 1,
  38. text: "储值卡"
  39. }],
  40. qingType: 0,
  41. qingRange: [{
  42. value: 0,
  43. text: "省内通行"
  44. },
  45. {
  46. value: 1,
  47. text: "省外通行"
  48. }, {
  49. value: 3,
  50. text: "省内小额"
  51. },
  52. {
  53. value: 4,
  54. text: "省外小额"
  55. }],
  56. // listData: ["2023/09/10", "记账卡", "省内通行", "100", "100", "100", "100", "100", "100"]
  57. listData: [
  58. { "value": "2023/09/10", "name": "清分日期", "width": 70 },
  59. { "value": "记账卡", "name": "卡类型", "width": 60 },
  60. { "value": "省内通行", "name": "清分类型", "width": 70 },
  61. { "value": "100", "name": "清分金额(应推金额)", "width": 120 },
  62. { "value": "100", "name": "实际推送时间", "width": 100 },
  63. { "value": "100", "name": "实际推送金额", "width": 100 },
  64. { "value": "100", "name": "延迟推送原因", "width": 100 },
  65. { "value": "100", "name": "回盘时间", "width": 70 },
  66. { "value": "100", "name": "回盘金额", "width": 70 }
  67. ]
  68. })
  69. const changeTime = (e) => {
  70. console.log(e)
  71. }
  72. const changeCard = (e) => {
  73. if (e == 1) {
  74. // 储值卡
  75. state.isJi = false;
  76. state.listData = [
  77. { "value": "2023/09/10", "name": "清分日期", "width": 70 },
  78. { "value": "储值卡", "name": "卡类型", "width": 60 },
  79. { "value": "省内通行", "name": "清分类型", "width": 70 },
  80. { "value": "100", "name": "清分金额(应推金额)", "width": 120 }
  81. ]
  82. } else {
  83. // 记账卡
  84. state.isJi = true;
  85. state.listData = [
  86. { "value": "2023/09/10", "name": "清分日期", "width": 70 },
  87. { "value": "记账卡", "name": "卡类型", "width": 60 },
  88. { "value": "省内通行", "name": "清分类型", "width": 70 },
  89. { "value": "100", "name": "清分金额(应推金额)", "width": 120 },
  90. { "value": "100", "name": "实际推送时间", "width": 100 },
  91. { "value": "100", "name": "实际推送金额", "width": 100 },
  92. { "value": "100", "name": "延迟推送原因", "width": 100 },
  93. { "value": "100", "name": "回盘时间", "width": 70 },
  94. { "value": "100", "name": "回盘金额", "width": 70 }
  95. ]
  96. }
  97. console.log(e)
  98. }
  99. const changeQing = (e) => {
  100. console.log(e)
  101. }
  102. </script>
  103. <style scoped>
  104. .content {
  105. font-size: 32rpx;
  106. padding: 20rpx 30rpx;
  107. }
  108. .choice_wrap {
  109. display: flex;
  110. justify-content: space-between;
  111. }
  112. .card {
  113. margin: 0 20rpx;
  114. }
  115. .title {
  116. margin-bottom: 20rpx;
  117. }
  118. .uni-container {
  119. margin: 50rpx 0;
  120. }
  121. /deep/.uni-table-th,
  122. /deep/.uni-table-td {
  123. padding: 0 !important;
  124. font-size: 12px !important;
  125. }
  126. /deep/.uni-date__x-input,
  127. /deep/.uni-select {
  128. font-size: 13px;
  129. height: 30px;
  130. line-height: 30px;
  131. }
  132. </style>