sendCancelWriteOff.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <script setup lang="ts">
  2. import { ref } from "vue";
  3. import { getImageUrl } from "@/utils/imageUtil";
  4. import PopupLayer from "@/components/popupLayer/index.vue";
  5. import FilterSelect from "@/components/filter/filter.vue";
  6. const type = ref()
  7. definePage({
  8. style: {
  9. navigationBarTitleText: "累计待核销",
  10. navigationStyle: "custom",
  11. },
  12. });
  13. // 生命周期
  14. onLoad(async (options) => {
  15. type.value = options.type
  16. })
  17. // 当前选中的tab
  18. const currentTab = ref("0");
  19. // 点击tab事件
  20. const handleTabClick = (value) => {
  21. currentTab.value = value;
  22. console.log("选中tab:", value);
  23. };
  24. const keyword = ref("");
  25. async function search() {}
  26. async function clear() {}
  27. const isOpen = ref(false);
  28. const popupRef = ref();
  29. function clickSelect() {
  30. isOpen.value = !isOpen.value;
  31. isOpen.value ? popupRef.value?.show() : popupRef.value?.close();
  32. }
  33. const rewardTabs = ref([
  34. { label: "全部", type: "0" },
  35. { label: "折扣券", type: "1" },
  36. { label: "兑换券", type: "2" },
  37. { label: "满减券", type: "3" },
  38. ]);
  39. const classIndex = ref(-1);
  40. const classItem = ref({
  41. label: "",
  42. type: "",
  43. });
  44. function classClick(index, item) {
  45. classIndex.value = index;
  46. classItem.value = item;
  47. clickSelect();
  48. }
  49. const filter = ["type", "date", "dataFilter"];
  50. function selectValue(item) {
  51. console.log(item);
  52. }
  53. </script>
  54. <template>
  55. <view class="income-cumulative-container">
  56. <u-navbar :title="type==1?'累计待核销':'累计已核销'" :autoBack="true" :placeholder="true" :border-bottom="false"
  57. :title-style="{ fontWeight: 'bold', color: '#000' }" leftIconColor="#000"></u-navbar>
  58. <FilterSelect :filter='filter' @selectValue='selectValue'></FilterSelect>
  59. <view class="send-content">
  60. <view class="send-card">
  61. <view class="send-header">
  62. <view class="coupon-info">
  63. <text class="coupon-name">满100减50优惠券</text>
  64. <view class="coupon-tag">折扣券</view>
  65. </view>
  66. <!-- <text class="send-count send-red">免费兑换</text> -->
  67. <!-- <text class="send-number-box">
  68. <text class="send-number">9</text>
  69. <text class="send-unit">折</text>
  70. </text> -->
  71. <view class="send-number-box">
  72. <text class='add-title'>满100减</text>
  73. <text class="send-number-box">
  74. <text class="send-number">30</text>
  75. <text class="send-unit">元</text>
  76. </text>
  77. </view>
  78. </view>
  79. <view class="send-divider"></view>
  80. <view class="send-detail">
  81. <template v-if="type==2">
  82. <view class="detail-row">
  83. <text class="detail-label">核销门店</text>
  84. <text class="detail-value">微信朋友圈</text>
  85. </view>
  86. <view class="detail-row">
  87. <text class="detail-label">我的佣金</text>
  88. <text class="detail-value">预计<text class="highlight">20元</text></text>
  89. </view>
  90. </template>
  91. <view class="detail-row">
  92. <text class="detail-label">领取人</text>
  93. <view class="income-person">
  94. <u--image class='income-phone' :src="getImageUrl('@img/me/head.png')" width="42rpx" height="42rpx"
  95. shape="circle">
  96. </u--image>
  97. <view>林雨欣</view>
  98. </view>
  99. </view>
  100. <view class="detail-row">
  101. <text class="detail-label">联系方式</text>
  102. <text class="detail-value">微信朋友圈</text>
  103. </view>
  104. <view class="detail-row">
  105. <text class="detail-label">领取日期</text>
  106. <text class="detail-value">微信朋友圈</text>
  107. </view>
  108. </view>
  109. </view>
  110. </view>
  111. </view>
  112. </template>
  113. <style lang="scss" scoped>
  114. .income-cumulative-container {
  115. min-height: 100vh;
  116. background: #f8f8fa;
  117. ::v-deep.u-search__content {
  118. border-radius: 40rpx;
  119. background-color: #f7f8fa;
  120. }
  121. .invite-content-search {
  122. background: #fff;
  123. padding: 0 32rpx 16rpx 32rpx;
  124. }
  125. .send-content {
  126. padding: 32rpx;
  127. display: flex;
  128. flex-direction: column;
  129. gap: 32rpx;
  130. }
  131. .send-card {
  132. background: #ffffff;
  133. border-radius: 32rpx;
  134. padding: 32rpx;
  135. position: relative;
  136. .send-header {
  137. display: flex;
  138. justify-content: space-between;
  139. align-items: flex-start;
  140. margin-bottom: 32rpx;
  141. .coupon-info {
  142. display: flex;
  143. align-items: center;
  144. gap: 16rpx;
  145. .coupon-tag {
  146. padding: 4rpx 16rpx;
  147. background: #fff7e8;
  148. color: #ff7d00;
  149. font-size: 22rpx;
  150. border-radius: 4rpx;
  151. }
  152. .coupon-name {
  153. font-weight: 600;
  154. font-size: 32rpx;
  155. color: #2c2c2c;
  156. }
  157. }
  158. .send-count {
  159. font-size: 30rpx;
  160. color: #333333;
  161. }
  162. .send-red {
  163. font-size: 30rpx;
  164. color: #ff5365;
  165. font-weight: 600;
  166. }
  167. .send-number-box {
  168. display: flex;
  169. align-items: baseline;
  170. }
  171. .send-number {
  172. font-size: 42rpx;
  173. color: #ff5365;
  174. }
  175. .send-unit {
  176. font-size: 26rpx;
  177. color: #ff5365;
  178. margin-left: 2rpx;
  179. }
  180. .add-title {
  181. font-size: 26rpx;
  182. margin-right: 6rpx;
  183. }
  184. }
  185. .send-divider {
  186. width: 100%;
  187. height: 2rpx;
  188. background: #eaeaea;
  189. margin-bottom: 32rpx;
  190. }
  191. .send-detail {
  192. .detail-row {
  193. display: flex;
  194. justify-content: space-between;
  195. align-items: center;
  196. margin-bottom: 24rpx;
  197. &:last-child {
  198. margin-bottom: 0;
  199. }
  200. .detail-label {
  201. font-weight: 400;
  202. font-size: 30rpx;
  203. color: #86909c;
  204. }
  205. .detail-value {
  206. font-weight: 400;
  207. font-size: 30rpx;
  208. color: #333333;
  209. }
  210. }
  211. .highlight {
  212. color: #ff5365;
  213. }
  214. .income-person {
  215. display: flex;
  216. align-items: center;
  217. }
  218. .income-phone {
  219. margin-right: 12rpx;
  220. }
  221. }
  222. .coupon1-icon {
  223. position: absolute;
  224. top: 0;
  225. left: 0;
  226. }
  227. .write-off-icon {
  228. position: absolute;
  229. right: 168rpx;
  230. bottom: 49rpx;
  231. }
  232. }
  233. }
  234. </style>