search.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820
  1. <template>
  2. <view :style="viewColor">
  3. <view class='my-order'>
  4. <view class='header'>
  5. <view class="search acea-row row-middle">
  6. <text class="iconfont icon-sousuo"></text>
  7. <input v-model="store_name" :focus="focus" confirm-type="search" placeholder="搜索我的订单" class="input" @confirm="handleSearch" />
  8. </view>
  9. </view>
  10. <view class='list'>
  11. <!-- 代付款 -->
  12. <view v-if="orderList.length > 0">
  13. <block v-if="orderStatus == 0">
  14. <view class='item' v-for="(item,index) in orderList" :key="index">
  15. <view @click='goOrderDetails(item.group_order_id)'>
  16. <view class='title acea-row row-between-wrapper'>
  17. <view class="acea-row row-middle left-wrapper">
  18. {{item.group_order_sn}}
  19. </view>
  20. <view class='t-color'>{{ item.orderList[0].activity_type === 2 && item.orderList[0].orderProduct[0].cart_info.productPresell.presell_type ==2 ? "待付定金" : "待付款" }}</view>
  21. </view>
  22. <view v-for="(order,j) in item.orderList" :key="order.order_id+j">
  23. <!--预售-->
  24. <view v-if="order.activity_type === 2">
  25. <block v-for="(goods,g) in order.orderProduct">
  26. <view class='item-info acea-row row-between row-top'>
  27. <view class='pictrue'>
  28. <image :src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'></image>
  29. </view>
  30. <view class='text acea-row row-between'>
  31. <view class='name line1'>
  32. <text class="event_name event_bg">预售</text><text>{{goods.cart_info.product.store_name}}</text>
  33. <view class="event_ship event_color">发货时间:
  34. <!--全款预售-->
  35. <text v-if="goods.cart_info.productPresell.presell_type === 1">
  36. {{ goods.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内
  37. </text>
  38. <!--定金预售-->
  39. <text v-if="goods.cart_info.productPresell.presell_type === 2">{{ goods.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内</text>
  40. </view>
  41. </view>
  42. <view class='money'>
  43. <view>{{goods.cart_info.productPresellAttr.presell_price}}</view>
  44. <view>x{{goods.product_num}}</view>
  45. </view>
  46. </view>
  47. <view v-if="goods.cart_info.productPresell.presell_type === 2" class="event_price">
  48. 定金待支付 <text class="t-color">{{ order.pay_price }}</text>
  49. 尾款待支付 <text class="t-color">{{ order.presellOrder.pay_price }}</text>
  50. </view>
  51. </view>
  52. </block>
  53. </view>
  54. <view v-else>
  55. <block v-for="(goods,g) in order.orderProduct">
  56. <view class='item-info acea-row row-between row-top'>
  57. <view class='pictrue'>
  58. <image :src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'></image>
  59. </view>
  60. <view class='text acea-row row-between'>
  61. <view class='name line2'>{{goods.cart_info.product.store_name}}</view>
  62. <view class='money' v-if="item.orderList[0].activity_type == 4">
  63. <view v-if="goods.cart_info.activeSku">{{goods.cart_info.activeSku.active_price}}</view>
  64. <view>x{{goods.product_num}}</view>
  65. </view>
  66. <view v-else class='money'>
  67. <view>{{goods.cart_info.productAttr.price}}</view>
  68. <view>x{{goods.product_num}}</view>
  69. </view>
  70. </view>
  71. </view>
  72. </block>
  73. </view>
  74. </view>
  75. <view class='totalPrice' v-if="item.orderList[0].activity_type !== 2">{{item.total_num || 0}}件商品,总金额
  76. <text class='money p-color'>{{item.pay_price}}</text>
  77. </view>
  78. <view class='bottom acea-row row-right row-middle'>
  79. <!-- <view class='bnt cancelBnt' @click.stop='cancelOrder(index,item.group_order_id)'>取消订单</view> -->
  80. <view class='bnt b-color' @click.stop='goPay(item.pay_price,item.group_order_id)'>立即付款</view>
  81. </view>
  82. </view>
  83. </view>
  84. </block>
  85. <!-- 待发货 待收货 待评价 已完成 -->
  86. <block v-else>
  87. <view class='item' v-for="(item,index) in orderList" :key="index">
  88. <view @click='goOrderDetails(item.order_id)'>
  89. <view class='title acea-row row-between-wrapper'>
  90. <view class="acea-row row-middle left-wrapper" @click.stop="goMall(item)">
  91. <text class="iconfont icon-shangjiadingdan"></text>
  92. <view class="store-name">{{item.merchant.mer_name}}</view>
  93. <text class="iconfont icon-xiangyou"></text>
  94. </view>
  95. <view v-if="item.status == 0" class='t-color'>待发货</view>
  96. <view v-if="item.status == 1" class='t-color'>待收货</view>
  97. <view v-if="item.status == 2" class='t-color'>待评价</view>
  98. <view v-if="item.status == 3" class='t-color'>已完成</view>
  99. <view v-if="item.status == -1" class='t-color'>已退款</view>
  100. </view>
  101. <view v-if="item.activity_type === 2">
  102. <view class='item-info acea-row row-between row-top' v-for="(goods,index) in item.orderProduct" :key="index">
  103. <view class='pictrue'>
  104. <image :src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'></image>
  105. </view>
  106. <view class='text acea-row row-between'>
  107. <view class='name '>
  108. <view class='name' :class="item.status === 0 ? 'line1' : 'line2'">
  109. <text class="event_name event_bg">预售</text><text>{{goods.cart_info.product.store_name}}</text>
  110. <view v-if="item.status == 0" class="event_ship event_color">发货时间:
  111. <!--全款预售-->
  112. <text v-if="goods.cart_info.productPresell.presell_type === 1">{{ goods.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内</text>
  113. <!--定金预售-->
  114. <text v-if="goods.cart_info.productPresell.presell_type === 2">{{ goods.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内</text>
  115. </view>
  116. </view>
  117. <view style="margin-top: 10rpx;" class="t-color">{{goods.is_refund==1?'退款中':goods.is_refund==2?'部分退款':goods.is_refund==3?'全部退款':''}}</view>
  118. </view>
  119. <view class='money'>
  120. <view>{{goods.cart_info.productPresellAttr.presell_price}}</view>
  121. <view>x{{goods.product_num}}</view>
  122. </view>
  123. </view>
  124. </view>
  125. </view>
  126. <view v-else>
  127. <view class='item-info acea-row row-between row-top' v-for="(goods,index) in item.orderProduct" :key="index">
  128. <view class='pictrue'>
  129. <image :src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'></image>
  130. </view>
  131. <view class='text acea-row row-between'>
  132. <view class='name '>
  133. <view class='name line2'>
  134. <text>{{goods.cart_info.product.store_name}}</text>
  135. </view>
  136. <view style="margin-top: 10rpx;" class="t-color">{{goods.is_refund==1?'退款中':goods.is_refund==2?'部分退款':goods.is_refund==3?'全部退款':''}}</view>
  137. </view>
  138. <view class='money' v-if="item.activity_type == 3">
  139. <view v-if="goods.cart_info.productAssistAttr">{{goods.cart_info.productAssistAttr.assist_price}}</view>
  140. <view>x{{goods.product_num}}</view>
  141. </view>
  142. <view class='money' v-else-if="item.activity_type == 4">
  143. <view v-if="goods.cart_info.activeSku">{{goods.cart_info.activeSku.active_price}}</view>
  144. <view>x{{goods.product_num}}</view>
  145. </view>
  146. <view class='money' v-else>
  147. <view>{{goods.cart_info.productAttr.price}}</view>
  148. <view>x{{goods.product_num}}</view>
  149. </view>
  150. </view>
  151. </view>
  152. </view>
  153. <view class='totalPrice' v-if="item.activity_type == 2">{{item.orderNum || 0}}件商品,总金额
  154. <text class='money p-color'>{{item.presell_price}}</text>
  155. </view>
  156. <view class='totalPrice' v-else>{{item.orderNum || 0}}件商品,总金额
  157. <text class='money p-color'>{{item.pay_price}}</text>
  158. </view>
  159. </view>
  160. <view class='bottom acea-row row-right row-middle'>
  161. <block v-if="item.status == 0 || item.status == 9 || item.status == -1">
  162. <!-- <view class='bnt cancelBnt' @click='goOrderDetails(item.order_id)'>申请退款</view> -->
  163. <view class='bnt b-color' @click='goOrderDetails(item.order_id)'>查看详情</view>
  164. </block>
  165. <block v-if="item.status == 1">
  166. <view class='bnt cancelBnt' v-if="item.delivery_type == 1 || item.delivery_type == 2" @click='goOrderDetails(item.order_id)'>查看物流</view>
  167. <view class='bnt b-color' @tap='confirmOrder(item,index)'>确认收货</view>
  168. </block>
  169. <block v-if="item.status == 2">
  170. <navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id" class='bnt colorBnt' hover-class="none">
  171. <text class="iconfont icon-fabu"></text>
  172. 发布种草
  173. </navigator>
  174. <view class='bnt b-color' @click='goOrderDetails_Evaluation(item.order_id)'>去评价</view>
  175. </block>
  176. <block v-if="item.status == 3">
  177. <view class='bnt b-color' @click='goOrderDetails(item.order_id)' v-if="item.activity_type == 2 || item.activity_type == 3 || item.activity_type == 10">查看详情</view>
  178. <navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id" class='bnt colorBnt' hover-class="none">
  179. <text class="iconfont icon-fabu"></text>
  180. 发布种草
  181. </navigator>
  182. <view class='bnt b-color' @click='goOrderDetails(item.order_id)' v-else>再次购买</view>
  183. </block>
  184. </view>
  185. </view>
  186. </block>
  187. </view>
  188. </view>
  189. <view class='loadingicon acea-row row-center-wrapper' v-if="orderList.length>5">
  190. <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
  191. </view>
  192. <view v-if="orderList.length == 0 && page > 1">
  193. <emptyPage title="暂无订单~"></emptyPage>
  194. </view>
  195. </view>
  196. <home></home>
  197. <payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
  198. </view>
  199. </template>
  200. <script>
  201. // +----------------------------------------------------------------------
  202. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  203. // +----------------------------------------------------------------------
  204. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  205. // +----------------------------------------------------------------------
  206. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  207. // +----------------------------------------------------------------------
  208. // | Author: CRMEB Team <admin@crmeb.com>
  209. // +----------------------------------------------------------------------
  210. let app = getApp();
  211. import {
  212. getOrderList,
  213. orderData,
  214. unOrderCancel,
  215. orderDel,
  216. orderPay,
  217. groupOrderList,
  218. orderTake
  219. } from '@/api/order.js';
  220. import { getUserInfo } from '@/api/user.js';
  221. import { openOrderSubscribe } from '@/utils/SubscribeMessage.js';
  222. import payment from '@/components/payment';
  223. import home from '@/components/home/index.vue';
  224. import { mapGetters } from "vuex";
  225. import emptyPage from '@/components/emptyPage.vue'
  226. import { configMap } from '@/utils'
  227. import { toLogin } from '@/libs/login.js';
  228. export default {
  229. components: {
  230. payment,
  231. emptyPage,
  232. home,
  233. },
  234. data() {
  235. return {
  236. loading: false, //是否加载中
  237. loadend: false, //是否加载完毕
  238. loadTitle: '加载更多', //提示语
  239. orderList: [], //订单数组
  240. presellProList: [], //定金预售订单
  241. presellOrderCount: 0,
  242. orderData: {}, //订单详细统计
  243. orderStatus: -1, //订单状态
  244. page: 1,
  245. limit: 20,
  246. focus: true,
  247. payMode: [{
  248. name: "微信支付",
  249. icon: "icon-weixinzhifu",
  250. value: 'wechat',
  251. title: '微信快捷支付',
  252. payStatus: 1
  253. },
  254. {
  255. name: "支付宝支付",
  256. icon: "icon-zhifubao",
  257. value: 'alipay',
  258. title: '支付宝支付',
  259. payStatus: this.$store.getters.globalData.alipay_open
  260. },
  261. {
  262. name: "余额支付",
  263. icon: "icon-yuezhifu",
  264. value: 'balance',
  265. title: '可用余额:',
  266. number: 0,
  267. payStatus: this.$store.getters.globalData.yue_pay_status
  268. }
  269. ],
  270. pay_close: false,
  271. pay_order_id: '',
  272. totalPrice: '0',
  273. isReady: true,
  274. store_name: ''
  275. };
  276. },
  277. computed: {
  278. ...mapGetters(['isLogin','viewColor']),
  279. ...configMap(['hide_mer_status', 'community_status', 'alipay_open', 'yue_pay_status']),
  280. },
  281. watch: {
  282. alipay_open(n){
  283. this.payMode[1].payStatus = n
  284. },
  285. yue_pay_status(n){
  286. this.payMode[2].payStatus = n
  287. }
  288. },
  289. onShow() {
  290. if (this.isLogin) {
  291. this.page = 1;
  292. this.loadend = false;
  293. this.loading = false;
  294. } else {
  295. toLogin()
  296. }
  297. },
  298. onReady(){
  299. },
  300. mounted: function() {
  301. },
  302. methods: {
  303. // 去商铺
  304. goMall(item){
  305. if(this.hide_mer_status == 0){
  306. uni.navigateTo({
  307. url:'/pages/store/home/index?id='+item.mer_id
  308. })
  309. }
  310. },
  311. /**
  312. * 事件回调
  313. *
  314. */
  315. onChangeFun: function(e) {
  316. let opt = e;
  317. let action = opt.action || null;
  318. let value = opt.value != undefined ? opt.value : null;
  319. (action && this[action]) && this[action](value);
  320. },
  321. /**
  322. * 获取用户信息
  323. *
  324. */
  325. getUserInfo: function() {
  326. let that = this;
  327. getUserInfo().then(res => {
  328. that.payMode[2].number = res.data.now_money;
  329. // that.$set(that, 'payMode', that.payMode);
  330. });
  331. },
  332. /**
  333. * 关闭支付组件
  334. *
  335. */
  336. payClose: function() {
  337. this.pay_close = false;
  338. },
  339. /**
  340. * 生命周期函数--监听页面加载
  341. */
  342. onLoad: function(options) {
  343. if (options.status) this.orderStatus = options.status;
  344. },
  345. /**
  346. * 获取订单统计数据
  347. *
  348. */
  349. getOrderData: function() {
  350. let that = this;
  351. orderData().then(res => {
  352. that.$set(that, 'orderData', res.data);
  353. })
  354. },
  355. /**
  356. * 取消订单
  357. *
  358. */
  359. cancelOrder: function(index, order_id) {
  360. let that = this;
  361. if (!order_id) return that.$util.Tips({
  362. title: '缺少订单号无法取消订单'
  363. });
  364. unOrderCancel(order_id).then(res => {
  365. return that.$util.Tips({
  366. title: res.message,
  367. icon: 'success'
  368. }, function() {
  369. that.orderList.splice(index, 1);
  370. that.$set(that, 'orderList', that.orderList);
  371. that.$set(that.orderData, 'unpaid_count', that.orderData.unpaid_count - 1);
  372. that.getOrderData();
  373. });
  374. }).catch(err => {
  375. return that.$util.Tips({
  376. title: err
  377. });
  378. });
  379. },
  380. /**
  381. * 打开支付组件
  382. *
  383. */
  384. goPay: function(pay_price, order_id) {
  385. console.log(order_id)
  386. this.$set(this, 'pay_close', true);
  387. this.order_id = order_id;
  388. this.pay_order_id = order_id.toString()
  389. // this.$set(this, 'pay_order_id', );
  390. this.$set(this, 'totalPrice', pay_price);
  391. },
  392. /**
  393. * 支付成功回调
  394. *
  395. */
  396. pay_complete: function() {
  397. this.loadend = false;
  398. this.page = 1;
  399. this.$set(this, 'orderList', []);
  400. this.pay_close = false;
  401. this.pay_order_id = '';
  402. this.getOrderData();
  403. this.getOrderList();
  404. },
  405. /**
  406. * 支付失败回调
  407. *
  408. */
  409. pay_fail: function() {
  410. this.pay_close = false;
  411. this.pay_order_id = '';
  412. },
  413. /**
  414. * 去订单详情
  415. */
  416. goOrderDetails: function(order_id) {
  417. let self = this
  418. if (!order_id) return that.$util.Tips({
  419. title: '缺少订单号无法查看订单详情'
  420. });
  421. // #ifdef MP
  422. uni.showLoading({
  423. title: '正在加载',
  424. })
  425. openOrderSubscribe().then(() => {
  426. uni.hideLoading();
  427. if (self.orderStatus == 0) {
  428. uni.navigateTo({
  429. url: '/pages/order_details/stay?order_id=' + order_id
  430. })
  431. } else {
  432. uni.navigateTo({
  433. url: '/pages/order_details/index?order_id=' + order_id
  434. })
  435. }
  436. }).catch(() => {
  437. uni.hideLoading();
  438. })
  439. // #endif
  440. // #ifndef MP
  441. if (self.orderStatus == 0) {
  442. uni.navigateTo({
  443. url: '/pages/order_details/stay?order_id=' + order_id
  444. })
  445. } else {
  446. uni.navigateTo({
  447. url: '/pages/order_details/index?order_id=' + order_id
  448. })
  449. }
  450. // #endif
  451. },
  452. /**
  453. * 点击去评价
  454. */
  455. goOrderDetails_Evaluation: function(order_id) {
  456. let self = this
  457. if (!order_id) return that.$util.Tips({
  458. title: '缺少订单号无法查看订单详情和评价'
  459. });
  460. // #ifdef MP
  461. if (self.orderStatus == 0) {
  462. uni.navigateTo({
  463. url: '/pages/order_details/stay?order_id=' + order_id
  464. })
  465. } else {
  466. uni.navigateTo({
  467. url: '/pages/order_details/index?order_id=' + order_id
  468. })
  469. }
  470. // #endif
  471. // #ifndef MP
  472. if (self.orderStatus == 0) {
  473. uni.navigateTo({
  474. url: '/pages/order_details/stay?order_id=' + order_id
  475. })
  476. } else {
  477. uni.navigateTo({
  478. url: '/pages/order_details/index?order_id=' + order_id
  479. })
  480. }
  481. // #endif
  482. },
  483. /**
  484. * 切换类型
  485. */
  486. statusClick: function(status) {
  487. if (status == this.orderStatus) return;
  488. this.orderStatus = status;
  489. this.loadend = false;
  490. this.loading = false;
  491. this.page = 1;
  492. this.$set(this, 'orderList', []);
  493. this.getOrderList();
  494. },
  495. /**
  496. * 获取订单列表
  497. */
  498. getOrderList: function() {
  499. let that = this;
  500. if (that.loadend) return;
  501. if (that.loading) return;
  502. that.loading = true;
  503. that.loadTitle = "加载更多";
  504. console.log(that.store_name);
  505. getOrderList({
  506. page: that.page,
  507. limit: that.limit,
  508. store_name: that.store_name
  509. }).then(res => {
  510. let list = res.data.list || [];
  511. let loadend = list.length < that.limit;
  512. that.orderList = that.page == 1 ? list : that.$util.SplitArray(list, that.orderList);
  513. that.$set(that, 'orderList', that.orderList);
  514. that.getProductCount();
  515. that.loadend = loadend;
  516. that.loading = false;
  517. that.loadTitle = loadend ? "我也是有底线的" : '加载更多';
  518. that.page = that.page + 1;
  519. // that.isReady = true;
  520. }).catch(err => {
  521. that.loading = false;
  522. that.loadTitle = "加载更多";
  523. })
  524. },
  525. /**
  526. * 获取定金预售订单列表
  527. */
  528. getpreSellOrderList: function() {
  529. let that = this;
  530. getOrderList({
  531. status: 10,
  532. page: 1,
  533. limit: 1,
  534. }).then(res => {
  535. let list = res.data.list || [];
  536. that.presellOrderCount = res.data.count;
  537. that.$set(that, 'presellProList', list);
  538. })
  539. },
  540. /**
  541. * 获取单个订单商品数量
  542. */
  543. getProductCount: function(){
  544. if(this.orderStatus !== 0){
  545. this.orderList.forEach((item,i) => {
  546. let orderNum = 0
  547. if(item.orderProduct){
  548. item.orderProduct.forEach((val) => {
  549. orderNum += val.product_num
  550. })
  551. this.orderList[i]['orderNum']=orderNum;
  552. }
  553. })
  554. }
  555. },
  556. /**
  557. * 删除订单
  558. */
  559. delOrder: function(order_id, index) {
  560. let that = this;
  561. orderDel(order_id).then(res => {
  562. that.orderList.splice(index, 1);
  563. that.$set(that, 'orderList', that.orderList);
  564. that.$set(that.orderData, 'unpaid_count', that.orderData.unpaid_count - 1);
  565. that.getOrderData();
  566. return that.$util.Tips({
  567. title: '删除成功',
  568. icon: 'success'
  569. });
  570. }).catch(err => {
  571. return that.$util.Tips({
  572. title: err
  573. });
  574. })
  575. },
  576. // 确认收货
  577. confirmOrder: function(item, index) {
  578. let that = this;
  579. uni.showModal({
  580. title: '确认收货',
  581. content: '为保障权益,请收到货确认无误后,再确认收货',
  582. success: function(res) {
  583. if (res.confirm) {
  584. orderTake(item.order_id).then(res => {
  585. return that.$util.Tips({
  586. title: '操作成功',
  587. icon: 'success'
  588. }, function() {
  589. that.orderList.splice(index, 1);
  590. that.getOrderData();
  591. });
  592. }).catch(err => {
  593. return that.$util.Tips({
  594. title: err
  595. });
  596. })
  597. }
  598. }
  599. })
  600. },
  601. handleSearch() {
  602. this.loadend = false;
  603. this.page = 1;
  604. this.orderList = [];
  605. if (!this.store_name) {
  606. return this.$util.Tips({
  607. title: '请输入搜索内容'
  608. });
  609. return;
  610. }
  611. this.getOrderList();
  612. }
  613. },
  614. onReachBottom: function() {
  615. this.getOrderList();
  616. },
  617. }
  618. </script>
  619. <style scoped lang="scss">
  620. .my-order .header {
  621. padding: 17rpx 30rpx;
  622. background-color: var(--view-theme);
  623. }
  624. .t-color{color: var(--view-theme);}
  625. .p-color{color: var(--view-priceColor);}
  626. .b-color{background-color:var(--view-theme);}
  627. .my-order .header .picTxt {
  628. height: 190rpx;
  629. }
  630. .my-order .header .picTxt .text {
  631. color: rgba(255, 255, 255, 0.8);
  632. font-size: 26rpx;
  633. }
  634. .my-order .header .picTxt .text .name {
  635. font-size: 34rpx;
  636. font-weight: bold;
  637. color: #fff;
  638. margin-bottom: 20rpx;
  639. }
  640. .my-order .header .picTxt .pictrue {
  641. width: 122rpx;
  642. height: 109rpx;
  643. }
  644. .my-order .header .picTxt .pictrue image {
  645. width: 100%;
  646. height: 100%;
  647. }
  648. .my-order .nav {
  649. background-color: #fff;
  650. width: 690rpx;
  651. height: 140rpx;
  652. border-radius: 16rpx;
  653. margin: -73rpx auto 0 auto;
  654. }
  655. .my-order .nav .item {
  656. text-align: center;
  657. font-size: 26rpx;
  658. color: #282828;
  659. padding: 29rpx 0;
  660. }
  661. .my-order .nav .item.on {
  662. font-weight: bold;
  663. border-bottom: 5rpx solid var(--view-theme);
  664. }
  665. .my-order .nav .item .num {
  666. margin-top: 18rpx;
  667. }
  668. .my-order .list {
  669. width: 690rpx;
  670. margin: 14rpx auto 0 auto;
  671. }
  672. .my-order .list .item {
  673. background-color: #fff;
  674. border-radius: 16rpx;
  675. margin-bottom: 14rpx;
  676. }
  677. .my-order .list .item .title {
  678. height: 84rpx;
  679. padding: 0 30rpx;
  680. border-bottom: 1px solid #eee;
  681. font-size: 28rpx;
  682. color: #282828;
  683. .left-wrapper {
  684. .iconfont {
  685. margin-top: 5rpx;
  686. }
  687. .store-name {
  688. margin: 0 10rpx;
  689. }
  690. .icon-xiangyou {
  691. font-size: 20rpx;
  692. }
  693. }
  694. }
  695. .my-order .list .item .title .sign {
  696. font-size: 24rpx;
  697. padding: 0 7rpx;
  698. height: 36rpx;
  699. margin-right: 15rpx;
  700. }
  701. .my-order .list .item .item-info {
  702. padding: 0 30rpx;
  703. margin-top: 22rpx;
  704. }
  705. .my-order .list .item .item-info .pictrue {
  706. width: 120rpx;
  707. height: 120rpx;
  708. }
  709. .my-order .list .item .item-info .pictrue image {
  710. width: 100%;
  711. height: 100%;
  712. border-radius: 6rpx;
  713. }
  714. .my-order .list .item .item-info .text {
  715. width: 486rpx;
  716. font-size: 28rpx;
  717. color: #999;
  718. margin-top: 6rpx;
  719. }
  720. .my-order .list .item .item-info .text .name {
  721. width: 320rpx;
  722. color: #282828;
  723. }
  724. .event_bg{
  725. background: #FF7F00;
  726. }
  727. .event_color{
  728. color: #FF7F00;
  729. }
  730. .my-order .list .item .event_name{
  731. display: inline-block;
  732. margin-right: 9rpx;
  733. color: #fff;
  734. font-size: 20rpx;
  735. padding: 0 8rpx;
  736. line-height: 30rpx;
  737. text-align: center;
  738. border-radius: 6rpx;
  739. }
  740. .my-order .list .item .event_ship{
  741. font-size: 20rpx;
  742. margin-top: 10rpx;
  743. }
  744. .my-order .list .event_price{
  745. margin: 0 0 50rpx 120rpx;
  746. }
  747. .my-order .list .item .item-info .text .money {
  748. text-align: right;
  749. }
  750. .my-order .list .item .totalPrice {
  751. font-size: 26rpx;
  752. color: #282828;
  753. text-align: right;
  754. margin: 27rpx 0 0 30rpx;
  755. padding: 0 30rpx 30rpx 0;
  756. }
  757. .my-order .list .item .totalPrice .money {
  758. font-size: 28rpx;
  759. font-weight: bold;
  760. }
  761. .my-order .list .item .bottom {
  762. height: 107rpx;
  763. padding: 0 30rpx;
  764. border-top: 1px solid #f0f0f0;
  765. }
  766. .my-order .list .item .bottom .bnt {
  767. width: 176rpx;
  768. height: 60rpx;
  769. text-align: center;
  770. line-height: 60rpx;
  771. color: #fff;
  772. border-radius: 50rpx;
  773. font-size: 27rpx;
  774. }
  775. .my-order .list .item .bottom .bnt.cancelBnt {
  776. border: 1px solid #ddd;
  777. color: #aaa;
  778. }
  779. .my-order .list .item .bottom .bnt.colorBnt {
  780. border: 1px solid var(--view-theme);
  781. color: var(--view-theme);
  782. }
  783. .my-order .list .item .bottom .bnt .icon-fabu{
  784. font-size: 26rpx;
  785. margin-right: 10rpx;
  786. }
  787. .my-order .list .item .bottom .bnt~.bnt {
  788. margin-left: 17rpx;
  789. }
  790. .search {
  791. height: 60rpx;
  792. padding: 0 30rpx;
  793. border-radius: 30rpx;
  794. background-color: #FFFFFF;
  795. font-size: 26rpx;
  796. .iconfont {
  797. margin-right: 10rpx;
  798. font-size: 26rpx;
  799. color: #999999;
  800. }
  801. .input-placeholder {
  802. font-size: 26rpx;
  803. color: #999999;
  804. }
  805. .input {
  806. flex: 1;
  807. }
  808. }
  809. </style>