delivery.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. <template>
  2. <view class="container">
  3. <view class="search-user flex-y-center ">
  4. <view class="search-content flex-y-center">
  5. <icon type="search" size="18" />
  6. <input confirm-type="search" v-model="seTval" @confirm="confirm" @input="getSearch" class="flex-grow-1"
  7. type="text" placeholder-style="font-size:26rpx" placeholder="请输入订单编号" />
  8. <view class="flex-center" style="margin-left: 10rpx;" @click.stop="onDel" v-if="seTval">
  9. <icon type="clear" size="18" />
  10. </view>
  11. </view>
  12. <view class="search-btn" @click="search">
  13. 搜索
  14. </view>
  15. </view>
  16. <view class="box-pack-between headerScreen flex-y-center ">
  17. <view class="flex-y-center flex-grow-1 ft26 header-text">
  18. <view style="padding: 0 20px;" class="flex-grow-1 flex-center box-pack-between" data-text="1" :class="act_index==1?'act':''"
  19. @click="onTopBtnTap(1)">
  20. <view class="text-1" style="width: auto; max-width: 300rpx;">
  21. {{level_text}}
  22. </view>
  23. <view class="d3"></view>
  24. </view>
  25. <!-- <view style="width: 50%;" class="flex-grow-1 flex-center text-1" data-text="2"
  26. :class="act_index==2?'act':''" @click="onTopBtnTap(2)">
  27. <view class="text-1" style="width: auto; max-width: 300rpx;">
  28. {{type_text}}
  29. </view>
  30. <view class="d3"></view>
  31. </view> -->
  32. </view>
  33. </view>
  34. <view class="header-hg200"></view>
  35. <uni-popup-top ref="popup" type="top" :top="top" :maskClass="maskClass">
  36. <view class="showpay">
  37. <block v-if='act_index==1'>
  38. <view class="box-li" :class="store_id==0?'active':''" @click="Onlevel(0,'全部')" data-text='全部'>全部
  39. </view>
  40. <scroll-view scroll-y="true" style="height: 400rpx;">
  41. <view class="box-li" v-for="(item,index) of tableTypeList" :key='index'
  42. :class="item.id==store_id?'active':''" @click="Onlevel(item.id,item.title)">
  43. {{item.title}}
  44. </view>
  45. </scroll-view>
  46. </block>
  47. <block v-if='act_index==2'>
  48. <view class="box-li" :class="status==0?'active':''" @click="onStatus(0,'全部')" data-text='全部'>全部
  49. </view>
  50. <view class="box-li" :class="status==1?'active':''" @click="onStatus(1,'微信')" data-text='微信'>微信
  51. </view>
  52. <view class="box-li" :class="status==2?'active':''" @click="onStatus(2,'支付宝')" data-text='支付宝'>支付宝
  53. </view>
  54. </block>
  55. </view>
  56. </uni-popup-top>
  57. <no-none v-if='list.length<=0'></no-none>
  58. <view class="list" v-else>
  59. <view class="item" style="border: none;" v-for="(item,index) in list" :key="index">
  60. <view class="box-pack-between">
  61. <view class="name box-pack-between flex-grow-1">
  62. <text>{{item.order_no}}</text>
  63. <view class="flex-center ft28" style="padding-right: 20rpx;color: #247EFF;">
  64. {{item.type==1?'扣除':item.type==2?'返还':''}}
  65. </view>
  66. </view>
  67. </view>
  68. <view class="content">
  69. <view class="flex flex-y-center">
  70. <view class="cell flex flex-y-center">
  71. <view class="title">说明:</view>
  72. <view class="desc">{{item.content}}</view>
  73. </view>
  74. </view>
  75. <view class="flex flex-y-center" style="margin-top: 16rpx;">
  76. <view class="cell flex flex-y-center " style="width:100%">
  77. <view class="title">所属门店:</view>
  78. <view class="desc">{{item.title}}</view>
  79. </view>
  80. </view>
  81. <view class="flex flex-y-center" style="margin-top: 16rpx;">
  82. <view class="cell flex flex-y-center " style="width:100%">
  83. <view class="title">时间:</view>
  84. <view class="desc">{{item.create_time}}</view>
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. </template>
  92. <script>
  93. import uniPopupTop from '@/components/zx-uni-popup/uni-popup-top.vue'
  94. export default {
  95. components: {
  96. uniPopupTop
  97. },
  98. data() {
  99. return {
  100. act_index: 1,
  101. type_text: '支付方式',
  102. level_text: '选择门店',
  103. store_id: "",
  104. admin_id: '',
  105. list: [],
  106. page: 1,
  107. is_bottom: false,
  108. keywords: "",
  109. status: 0,
  110. type: 2,
  111. tableTypeList: [],
  112. top: "200rpx",
  113. maskClass: {
  114. 'position': 'fixed',
  115. 'bottom': 0,
  116. 'top': "100rpx",
  117. 'left': 0,
  118. 'right': 0,
  119. 'backgroundColor': 'rgba(0, 0, 0, 0.4)'
  120. },
  121. }
  122. },
  123. onLoad(e) {
  124. this.type = e.type || 2;
  125. this.store_id =e.type==1?'':uni.getStorageSync("store_id");
  126. this.admin_id = uni.getStorageSync("admin_id");
  127. this.shop_store_index();
  128. },
  129. onShow() {
  130. this.getData(1)
  131. },
  132. onReachBottom() {
  133. if (!this.is_bottom) {
  134. this.getData(this.page + 1)
  135. }
  136. },
  137. methods: {
  138. shop_store_index() {
  139. let storeinfo = uni.getStorageSync("storeinfo");
  140. this.request({
  141. url: 'Smdcshop/shop_store_index',
  142. data: {
  143. admin_id: this.admin_id,
  144. }
  145. }).then(res => {
  146. if (res.code == 200) {
  147. if (res.data.length > 0) {
  148. this.tableTypeList = res.data;
  149. } else {
  150. this.tableTypeList = [{
  151. title: storeinfo.title,
  152. id: storeinfo.id,
  153. }];
  154. this.level_text= storeinfo.title;
  155. }
  156. }
  157. })
  158. },
  159. onStatus(e, text) {
  160. this.status = e;
  161. this.type_text = text;
  162. this.list = [];
  163. this.getData(1);
  164. this.$refs.popup.close();
  165. },
  166. Onlevel(e, text) {
  167. this.store_id = e;
  168. this.level_text = text;
  169. this.list = [];
  170. this.getData(1);
  171. this.$refs.popup.close();
  172. },
  173. getSearch(e) {
  174. if (!e.detail.value) {
  175. this.page = 1;
  176. this.list = [];
  177. this.keywords = "";
  178. this.getData(1);
  179. }
  180. this.keywords = e.detail.value;
  181. },
  182. onDel() {
  183. this.seTval = '';
  184. this.page = 1;
  185. this.list = [];
  186. this.keywords = "";
  187. this.getData(1);
  188. },
  189. confirm(e) {
  190. this.page = 1;
  191. this.list = [];
  192. this.keywords = e.detail.value;
  193. this.getData(1);
  194. },
  195. search(e) {
  196. this.page = 1;
  197. this.list = [];
  198. this.getData(1);
  199. },
  200. onTopBtnTap(e) {
  201. this.act_index = e;
  202. this.$refs.popup.open();
  203. },
  204. getData(page) {
  205. if (page == 1) {
  206. this.list = []
  207. this.page = 1
  208. this.is_bottom = false
  209. }
  210. this.request({
  211. url: 'Smdcshop/peisong_log',
  212. data: {
  213. page,
  214. limit: 10,
  215. // pay_type: this.status,
  216. keywords: this.keywords,
  217. admin_id: this.admin_id,
  218. store_id:this.store_id,
  219. }
  220. }).then(res => {
  221. if (res.code == 200 && res.data.length) {
  222. this.list = this.list.concat(res.data)
  223. this.page = page
  224. } else {
  225. this.is_bottom = true
  226. }
  227. })
  228. }
  229. }
  230. }
  231. </script>
  232. <style>
  233. @import url("../static/css/common.css");
  234. page {
  235. background-color: #F4F5F7;
  236. }
  237. .list {
  238. padding: 10rpx 25rpx;
  239. }
  240. .list .item {
  241. border-radius: 8rpx;
  242. overflow: hidden;
  243. padding-left: 30rpx;
  244. border-left: 8rpx solid #247EFF;
  245. background-color: #fff;
  246. margin-bottom: 30rpx;
  247. }
  248. .list .item .name {
  249. height: 80rpx;
  250. border-bottom: 1rpx solid #f5f5f5;
  251. font-size: 30rpx;
  252. line-height: 80rpx;
  253. font-weight: bold;
  254. }
  255. .list .item .content {
  256. padding: 20rpx 0 24rpx;
  257. }
  258. .list .item .content .cell {
  259. /* flex: none; */
  260. /* width: 50%; */
  261. box-sizing: border-box;
  262. padding-right: 30rpx;
  263. font-size: 26rpx;
  264. line-height: 37rpx;
  265. color: #666;
  266. }
  267. .list .item .content .cell .title {
  268. color: #99A0AD;
  269. }
  270. .headerScreen {
  271. height: 100rpx;
  272. position: fixed;
  273. top: 100rpx;
  274. width: 100%;
  275. z-index: 999;
  276. background: #fff;
  277. border-bottom: 1rpx solid #F1F1F1;
  278. }
  279. .header-hg200 {
  280. height: 200rpx;
  281. }
  282. .header-text {
  283. text-align: center;
  284. }
  285. .d3 {
  286. width: 0;
  287. height: 0;
  288. border-width: 12rpx;
  289. border-style: solid;
  290. border-color: #000 transparent transparent transparent;
  291. margin-top: 14rpx;
  292. margin-left: 6rpx;
  293. }
  294. .showpay {
  295. width: 100%;
  296. z-index: 10;
  297. background: #FFFFFF;
  298. }
  299. .search-user {
  300. z-index: 999;
  301. position: fixed;
  302. left: 0;
  303. width: 100%;
  304. height: 100rpx;
  305. background: #FFFFFF;
  306. padding-left: 15rpx;
  307. margin: 0;
  308. }
  309. .search-user .search-content {
  310. width: 83%;
  311. height: 70rpx;
  312. background: #F1F1F1;
  313. border-radius: 100rpx;
  314. padding: 0 20rpx;
  315. }
  316. .search-user .search-content icon {
  317. margin-right: 10rpx;
  318. }
  319. .search-user .search-btn {
  320. margin-left: 20rpx;
  321. font-size: 28rpx;
  322. }
  323. .box-li {
  324. background-color: #fff;
  325. text-align: center;
  326. border-bottom: 1rpx solid #f1f1f1;
  327. height: 80rpx;
  328. line-height: 80rpx;
  329. font-size: 26rpx;
  330. }
  331. page .active {
  332. color: #007AFF;
  333. }
  334. </style>