jfDetail.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  1. <template>
  2. <view class="container">
  3. <view class="bgf pof">
  4. <view class="flex-center search-content">
  5. <view class="search flex-y-center" style="margin-bottom: 0;">
  6. <icon type="search" size="16" />
  7. <input placeholder="请输入搜索内容" class="flex-grow-1" type="text" value="" @confirm="firmSeach"
  8. @input="putSeach" />
  9. </view>
  10. <text @click="bindSeach">搜索</text>
  11. </view>
  12. <view class="box-pack-between header-hg100 flex-y-center ">
  13. <view class="flex-y-center flex-grow-1 ft26 header-text">
  14. <view class="flex-grow-1 flex-center" data-text="4" :class="act_index==4?'act':''"
  15. @click="onTopBtnTap(4)">
  16. {{start_text}}
  17. <view class="d3"></view>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="list">
  23. <!-- <navigator :url="`/saomaDiancan/orderDetail/orderDetail?id=${item.id}`" class="item"
  24. v-for="(item,index) in list" :key="index"> -->
  25. <navigator url="" class="item"
  26. v-for="(item,index) in list" :key="index">
  27. <view class="content" style="border-bottom: 1rpx solid #f1f1f1;">
  28. <view class="box-pack-between">
  29. <view class=" cell flex flex-y-center">
  30. <view class="title">用户昵称:</view>
  31. <view class="desc" style="color:#FEAF44">{{item.nickname}}</view>
  32. </view>
  33. <view class="pay-info flex flex-y-center"></view>
  34. </view>
  35. <view class="cell flex flex-y-center">
  36. <view class="title">手机号:</view>
  37. <view class="desc" style="color:#FEAF44">{{item.mobile?item.mobile:''}}</view>
  38. </view>
  39. <view class="cell flex flex-y-center">
  40. <view class="title">积分类型:</view>
  41. <view class="desc" style="color:#FEAF44">{{item.type == 1?'增加':'减少'}}</view>
  42. </view>
  43. <view class="cell flex flex-y-center">
  44. <view class="title">积分数:</view>
  45. <view class="desc" style="color:#FEAF44">{{item.score}}</view>
  46. </view>
  47. <view class="cell flex flex-y-center">
  48. <view class="title">时间:</view>
  49. <view class="desc" style="color:#FEAF44">{{item.cerated_time}}</view>
  50. </view>
  51. <view class="cell flex flex-y-center">
  52. <view class="title" style="min-width: 100rpx;">详情:</view>
  53. <view class="desc" style="color:#FEAF44">{{item.note}}</view>
  54. </view>
  55. </view>
  56. </navigator>
  57. <view class="no-more" v-if="is_bottom">
  58. ---没有更多了---
  59. </view>
  60. </view>
  61. <uni-popup-top ref="popup" type="top" :top="top" :maskClass="maskClass">
  62. <view class="showpay">
  63. <block v-if='act_index==4'>
  64. <view class="model">
  65. <view class="flex-center model-date box-pack-between">
  66. <view class="model-item" :class="time_index==1?'act':''">
  67. <picker mode='date' :value="start" :start="startDate" :end="endDate"
  68. @change="bindDateChange1" data-index="1">
  69. <view class="flex-center">
  70. <text>{{start}}</text>
  71. </view>
  72. </picker>
  73. </view>
  74. <view class="model-item" :class="time_index==2?'act':''">
  75. <picker mode='date' :value="end" :start="startDate" :end="endDate"
  76. @change="bindDateChange2" data-index="1">
  77. <view class="flex-center">
  78. <text>{{end}}</text>
  79. </view>
  80. </picker>
  81. </view>
  82. </view>
  83. <view class="flex">
  84. <view class="model-btn-close model-btn flex-center" @click="clear">
  85. 清空
  86. </view>
  87. <view class="model-btn-success flex-center model-btn" @click="sure">
  88. 确定
  89. </view>
  90. </view>
  91. </view>
  92. </block>
  93. </view>
  94. </uni-popup-top>
  95. </view>
  96. </template>
  97. <script>
  98. import uniPopupTop from '@/components/zx-uni-popup/uni-popup-top.vue'
  99. export default {
  100. components: {
  101. uniPopupTop
  102. },
  103. data() {
  104. return {
  105. URL: getApp().globalData.URL,
  106. list: [],
  107. page: 1,
  108. is_bottom: false,
  109. act_index: 1,
  110. time_index: 0,
  111. time_index2: 0,
  112. start: "开始时间",
  113. end: "结束时间",
  114. top: "200rpx",
  115. maskClass: {
  116. 'position': 'fixed',
  117. 'bottom': 0,
  118. 'top': "100rpx",
  119. 'left': 0,
  120. 'right': 0,
  121. 'backgroundColor': 'rgba(0, 0, 0, 0.4)'
  122. },
  123. start_text: '日期查找',
  124. status: 1
  125. }
  126. },
  127. onLoad(options) {
  128. if (options.day) {
  129. this.end = options.day;
  130. this.start = options.day;
  131. this.start_text = options.day;
  132. }
  133. },
  134. onShow() {
  135. this.getData(1);
  136. },
  137. onReachBottom() {
  138. if (!this.is_bottom) {
  139. this.getData(this.page + 1)
  140. }
  141. },
  142. methods: {
  143. // 键盘完成事件
  144. firmSeach(e) {
  145. this.serch = e.detail.value;
  146. this.getData(1);
  147. this.$refs.popup.close();
  148. },
  149. // 监听input
  150. putSeach(e) {
  151. this.serch = e.detail.value;
  152. if (!e.detail.value) {
  153. this.getData(1);
  154. }
  155. },
  156. // 搜索
  157. bindSeach(e) {
  158. this.getData(1);
  159. this.$refs.popup.close();
  160. },
  161. // 订单状态
  162. // payStatus(e, text) {
  163. // this.status = e;
  164. // this.status_text = text;
  165. // this.getData(1);
  166. // this.$refs.popup.close();
  167. // },
  168. bindDateChange1(e) {
  169. this.time_index = e.currentTarget.dataset.index;
  170. this.start = e.target.value;
  171. },
  172. bindDateChange2(e) {
  173. this.time_index2 = e.currentTarget.dataset.index;
  174. this.end = e.target.value;
  175. },
  176. sure(e) {
  177. this.getData(1);
  178. this.$refs.popup.close();
  179. this.start_text = this.end;
  180. },
  181. clear() {
  182. this.start = '开始时间';
  183. this.start_text = '日期查找';
  184. this.end = '结束时间';
  185. this.getData(1);
  186. this.$refs.popup.close();
  187. },
  188. onTopBtnTap(e) {
  189. this.act_index = e;
  190. this.$refs.popup.open();
  191. },
  192. getData(page) {
  193. if (page == 1) {
  194. this.list = []
  195. this.page = 1
  196. this.is_bottom = false
  197. }
  198. this.request({
  199. url: 'Smdcshop/integral_data',
  200. data: {
  201. admin_id: uni.getStorageSync("admin_id")?uni.getStorageSync("admin_id"):'',
  202. page,
  203. limit: 10,
  204. serch: this.serch?this.serch:'',
  205. start: this.start == '开始时间' ? '' : this.start,
  206. end: this.end == '结束时间' ? '' : this.end,
  207. }
  208. }).then(res => {
  209. if (res.code == 200 && res.data.length) {
  210. this.list = this.list.concat(res.data)
  211. this.page = page
  212. if (res.data.is_dd == 1 && res.data.is_send == 1) {
  213. this.GetDadaInfo(res.data.info.id);
  214. }
  215. } else {
  216. this.is_bottom = true
  217. }
  218. })
  219. },
  220. GetDadaInfo(id) {
  221. this.request({
  222. url: 'Smdcshop/GetDadaInfo',
  223. data: {
  224. id: id
  225. }
  226. }).then(res => {
  227. this.obj = res.data;
  228. })
  229. },
  230. },
  231. }
  232. </script>
  233. <style lang="scss">
  234. .header-text .act {
  235. color: #FEAF44;
  236. }
  237. .header-text .act .d3 {
  238. border-color: #FEAF44 transparent transparent transparent;
  239. }
  240. .pof {
  241. position: fixed;
  242. left: 0;
  243. z-index: 999;
  244. background: #fff;
  245. width: 100%;
  246. }
  247. .search-content {
  248. width: 100%;
  249. height: 100rpx;
  250. font-size: 28rpx;
  251. top:
  252. 0;
  253. .search {
  254. width: 80%;
  255. border: 1rpx solid #F1F1F1;
  256. margin-right: 15rpx;
  257. padding: 10rpx;
  258. border-radius: 50rpx;
  259. icon {
  260. margin-right: 15rpx;
  261. }
  262. }
  263. }
  264. .model {
  265. width: 100%;
  266. z-index: 10;
  267. background: #FFFFFF;
  268. padding-bottom: 20rpx;
  269. .model-date {
  270. width: 100%;
  271. padding: 20rpx 80rpx;
  272. border-bottom: 1rpx solid #F1F1F1;
  273. .model-item {
  274. width: 270rpx;
  275. text-align: center;
  276. font-size: 28rpx;
  277. color: #999;
  278. position: relative;
  279. padding: 10rpx 0;
  280. text-align: center;
  281. border-radius: 8rpx;
  282. border: 1rpx solid #999;
  283. }
  284. .act {
  285. // color: #FFFFFF;
  286. // background: #FFBE2C;
  287. // border: 1rpx solid #FFBE2C;
  288. }
  289. }
  290. .model-btn {
  291. border-radius: 8rpx;
  292. box-shadow: 0px 0px 8rpx 0px rgba(51, 135, 255, 0.20);
  293. margin: 0 auto;
  294. margin-top: 20rpx;
  295. text-align: center;
  296. width: 41%;
  297. height: 80rpx;
  298. border-radius: none;
  299. }
  300. .model-btn-close {
  301. border: 1rpx solid #F1F1F1;
  302. color: #000;
  303. }
  304. .model-btn-success {
  305. color: #FFFFFF;
  306. background: linear-gradient(315deg, #3387ff 2%, #569bff 99%);
  307. }
  308. }
  309. page {
  310. background-color: #F4F5F7;
  311. }
  312. .showpay .active {
  313. color: #FEAF44
  314. }
  315. .header-hg100 {
  316. height: 100rpx;
  317. top: 100rpx;
  318. width: 100%;
  319. }
  320. .list {
  321. padding: 210rpx 25rpx 0;
  322. }
  323. .list .item {
  324. background-color: #fff;
  325. border-radius: 8rpx;
  326. overflow: hidden;
  327. padding: 0 25rpx;
  328. margin-bottom: 30rpx;
  329. box-shadow: 0rpx 6rpx 10rpx 0rpx rgba(213, 213, 213, 0.04);
  330. }
  331. .list .item .top {
  332. height: 80rpx;
  333. border-bottom: 1rpx solid #f5f5f5;
  334. }
  335. .list .item .top .pay-info {
  336. flex: none;
  337. }
  338. .pay-type-icon {
  339. display: block;
  340. width: 28rpx;
  341. height: 28rpx;
  342. flex: none;
  343. margin-right: 8rpx;
  344. }
  345. .pay-status {
  346. font-size: 28rpx;
  347. color: #464646;
  348. }
  349. .list .item .content {
  350. padding: 20rpx 0;
  351. }
  352. .list .content .cell {
  353. margin-bottom: 16rpx;
  354. font-size: 26rpx;
  355. color: #99A0AD;
  356. }
  357. .list .content .cell:last-child {
  358. margin-bottom: 0;
  359. }
  360. .list .content .cell .title {
  361. color: #99A0AD;
  362. }
  363. .list .content .cell .desc {
  364. color: #666;
  365. }
  366. .header-text {
  367. text-align: center;
  368. }
  369. .box-li {
  370. background-color: #fff;
  371. text-align: center;
  372. border-bottom: 1rpx solid #f1f1f1;
  373. height: 80rpx;
  374. line-height: 80rpx;
  375. font-size: 26rpx;
  376. }
  377. .goods_list {
  378. font-size: 28rpx;
  379. }
  380. .goods_list-title {
  381. padding: 20rpx 0;
  382. }
  383. .goods_list-price {
  384. font-size: 26rpx;
  385. color: red;
  386. }
  387. .goods_list-num {
  388. font-size: 26rpx;
  389. }
  390. .d3 {
  391. width: 0;
  392. height: 0;
  393. border-width: 12rpx;
  394. border-style: solid;
  395. border-color: #000 transparent transparent transparent;
  396. margin-top: 14rpx;
  397. margin-left: 6rpx;
  398. }
  399. </style>