list.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919
  1. <template>
  2. <view class="app-container">
  3. <view class="tab-container">
  4. <view
  5. class="item"
  6. :class="tabCurrent == '' ? 'current' : ''"
  7. @tap="changeTab('')"
  8. ><text>全部</text></view
  9. >
  10. <view
  11. class="item"
  12. :class="tabCurrent == 'NOPAY' ? 'current' : ''"
  13. @tap="changeTab('NOPAY')"
  14. ><text>待付款</text></view
  15. >
  16. <view
  17. class="item"
  18. :class="tabCurrent == 'DFH' ? 'current' : ''"
  19. @tap="changeTab('DFH')"
  20. ><text>待发货</text></view
  21. >
  22. <view
  23. class="item"
  24. :class="tabCurrent == 'YFH' ? 'current' : ''"
  25. @tap="changeTab('YFH')"
  26. ><text>待收货</text></view
  27. >
  28. <view
  29. class="item"
  30. :class="tabCurrent == 'OVER' ? 'current' : ''"
  31. @tap="changeTab('OVER')"
  32. ><text>已完成</text></view
  33. >
  34. <view
  35. class="item"
  36. :class="tabCurrent == 'REFUND' ? 'current' : ''"
  37. @tap="changeTab('REFUND')"
  38. ><text>售后中</text></view
  39. >
  40. </view>
  41. <view class="list-container">
  42. <block v-for="(item, index) in orderList" :key="index">
  43. <view
  44. class="item"
  45. @tap="toOrderDetail(item.orderId, item.orderRefundId)"
  46. >
  47. <!-- 普通订单 -->
  48. <block v-if="tabCurrent != 'REFUND'">
  49. <view class="top">
  50. <view class="left">{{ item.orderId }}</view>
  51. <view class="right">{{ item.orderStatus | statusFilter }}</view>
  52. </view>
  53. <block
  54. v-for="(goodsItem, goodsIndex) in item.orderDetails"
  55. :key="goodsIndex"
  56. >
  57. <view class="goods" :class="'goods' + goodsIndex">
  58. <image
  59. v-if="
  60. goodsItem.goods &&
  61. goodsItem.goods.logo &&
  62. $compareTime(
  63. goodsItem.goods.logoStartTime,
  64. goodsItem.goods.logoEndTime
  65. ) &&
  66. goodsItem.goods.mergeImage
  67. "
  68. :src="goodsItem.goods.mergeImage"
  69. ></image>
  70. <image v-else :src="goodsItem.imgUrl" mode="aspectFill"></image>
  71. <view class="main">
  72. <view class="row1">
  73. <view class="name ellipsis-2">{{
  74. goodsItem.goodsName
  75. }}</view>
  76. <view class="price">¥{{ goodsItem.price }}</view>
  77. </view>
  78. <view class="row2">
  79. <view>{{ goodsItem.goodsSpecValue }}</view>
  80. <view>x{{ goodsItem.num }}</view>
  81. </view>
  82. </view>
  83. </view>
  84. </block>
  85. <view class="bottom">
  86. <view class="left">{{ item.createTime }}</view>
  87. <view class="total"
  88. >共{{ item.totalNum }}件 订单总额:<text
  89. >¥{{ item.payAmount | numToFixed }}</text
  90. ></view
  91. >
  92. </view>
  93. </block>
  94. <!-- 售后订单 -->
  95. <block v-if="tabCurrent == 'REFUND'">
  96. <view class="top">
  97. <view class="left">{{ item.orderId }}</view>
  98. <view class="right">{{ item.orderStatus | statusFilter2 }}</view>
  99. </view>
  100. <!-- 拒绝申请 -->
  101. <block v-if="item.examineStatus === 'FAIL'">
  102. <block
  103. v-for="(goodsItem, goodsIndex) in item.orderDetails"
  104. :key="goodsIndex"
  105. >
  106. <view class="goods" :class="'goods' + goodsIndex">
  107. <image
  108. v-if="
  109. goodsItem.goods &&
  110. goodsItem.goods.logo &&
  111. $compareTime(
  112. goodsItem.goods.logoStartTime,
  113. goodsItem.goods.logoEndTime
  114. ) &&
  115. goodsItem.goods.mergeImage
  116. "
  117. :src="goodsItem.goods.mergeImage"
  118. ></image>
  119. <image
  120. v-else
  121. :src="goodsItem.imgUrl"
  122. mode="aspectFill"
  123. ></image>
  124. <view class="main">
  125. <view class="row1">
  126. <view class="name ellipsis-2">{{
  127. goodsItem.goodsName
  128. }}</view>
  129. <view class="price">¥{{ goodsItem.price }}</view>
  130. </view>
  131. <view class="row2">
  132. <view>{{ goodsItem.goodsSpecValue }}</view>
  133. <view>x{{ goodsItem.refundNum }}</view>
  134. </view>
  135. </view>
  136. </view>
  137. </block>
  138. <view class="bottom">
  139. <view class="left">{{ item.createTime }}</view>
  140. <view class="total"
  141. >共{{ item.totalNum }}件
  142. {{ item.orderStatus == 'NOPAY' ? '应付' : '实付' }}总额:<text
  143. >¥{{ item.payAmount | numToFixed }}</text
  144. ></view
  145. >
  146. </view>
  147. </block>
  148. <!-- 其他 -->
  149. <block v-else>
  150. <block
  151. v-for="(goodsItem, goodsIndex) in item.orderDetails"
  152. :key="goodsIndex"
  153. >
  154. <view
  155. class="goods"
  156. :class="'goods' + goodsIndex"
  157. v-if="goodsItem.refund"
  158. >
  159. <image
  160. v-if="
  161. goodsItem.goods &&
  162. goodsItem.goods.logo &&
  163. $compareTime(
  164. goodsItem.goods.logoStartTime,
  165. goodsItem.goods.logoEndTime
  166. ) &&
  167. goodsItem.goods.mergeImage
  168. "
  169. :src="goodsItem.goods.mergeImage"
  170. ></image>
  171. <image
  172. v-else
  173. :src="goodsItem.imgUrl"
  174. mode="aspectFill"
  175. ></image>
  176. <view class="main">
  177. <view class="row1">
  178. <view class="name ellipsis-2">{{
  179. goodsItem.goodsName
  180. }}</view>
  181. <view class="price">¥{{ goodsItem.price }}</view>
  182. </view>
  183. <view class="row2">
  184. <view>{{ goodsItem.goodsSpecValue }}</view>
  185. <view>x{{ goodsItem.refundNum }}</view>
  186. </view>
  187. </view>
  188. </view>
  189. </block>
  190. <view class="bottom">
  191. <view class="left">{{ item.createTime }}</view>
  192. <view class="total"
  193. >共{{ getRefundNum(item.orderDetails) }}件
  194. {{ item.orderStatus == 'OVER' ? '实退' : '应退' }}总额:<text
  195. >¥{{ item.refundAmount | numToFixed }}</text
  196. ></view
  197. >
  198. </view>
  199. </block>
  200. </block>
  201. <!-- 按钮:待付款 -->
  202. <view class="btn-group btn-group2" v-if="item.orderStatus == 'NOPAY'">
  203. <div class="tips">请在30分钟内付款</div>
  204. <div class="btns">
  205. <div class="button gray" @tap.stop="cancelOrder(item.orderId)">
  206. 取消订单
  207. </div>
  208. <div class="button red" @tap.stop="submitOrder(item)">
  209. 立即付款
  210. </div>
  211. </div>
  212. </view>
  213. <!-- 按钮:待发货 -->
  214. <view class="btn-group" v-if="item.orderStatus == 'DFH'">
  215. <div class="button white" @tap.stop="remindShipment(item.orderId)">
  216. 提醒发货
  217. </div>
  218. <div
  219. class="button white"
  220. v-if="checkCanReturn(item.orderShareStatus)"
  221. @tap.stop="toApplyReturn(item.orderId)"
  222. >
  223. 申请售后
  224. </div>
  225. </view>
  226. <!-- 按钮:待收货 -->
  227. <view class="btn-group" v-if="item.orderStatus == 'YFH'">
  228. <div
  229. class="button gray"
  230. @tap.stop="toLogistics(item.companyCode, item.logisticsNo)"
  231. >
  232. 查看物流
  233. </div>
  234. <div
  235. class="button red"
  236. @tap.stop="clickConfirmReceipt(item.orderId)"
  237. >
  238. 确认收货
  239. </div>
  240. <div
  241. class="button white"
  242. v-if="checkCanReturn(item.orderShareStatus)"
  243. @tap.stop="toApplyReturn(item.orderId)"
  244. >
  245. 申请售后
  246. </div>
  247. </view>
  248. <!-- 按钮:已完成 -->
  249. <view
  250. class="btn-group"
  251. v-if="item.orderStatus == 'OVER' && tabCurrent != 'REFUND'"
  252. >
  253. <div
  254. class="button gray"
  255. @tap.stop="toLogistics(item.companyCode, item.logisticsNo)"
  256. >
  257. 查看物流
  258. </div>
  259. <div
  260. class="button white"
  261. v-if="checkCanReturn(item.orderShareStatus)"
  262. @tap.stop="toApplyReturn(item.orderId)"
  263. >
  264. 申请售后
  265. </div>
  266. </view>
  267. <!-- 按钮:已关闭 -->
  268. <view class="btn-group" v-if="item.orderStatus == 'CLOSE'">
  269. <div class="button gray">查看详情</div>
  270. </view>
  271. <!-- 按钮:超时未支付 -->
  272. <view class="btn-group" v-if="item.orderStatus == 'TIMEOUT'">
  273. <div class="button gray">查看详情</div>
  274. </view>
  275. <!-- 按钮:售后中 -->
  276. <view class="btn-group" v-if="item.orderStatus == 'REFUND'">
  277. <div class="button gray">查看详情</div>
  278. </view>
  279. <!-- 按钮:售后中 待商家处理 -->
  280. <view class="btn-group" v-if="item.orderStatus == 'DSJCL'">
  281. <div
  282. class="button gray"
  283. @tap.stop="toReturnDetail(item.orderRefundId)"
  284. >
  285. 售后详情
  286. </div>
  287. </view>
  288. <!-- 按钮:售后中 待买家处理 -->
  289. <view class="btn-group" v-if="item.orderStatus == 'DMJCL'">
  290. <div
  291. class="button red"
  292. @tap.stop="toReturnDetail(item.orderRefundId)"
  293. v-if="item.examineStatus == 'OK'"
  294. >
  295. 提交资料
  296. </div>
  297. <div
  298. class="button white"
  299. @tap.stop="toApplyReturn(item.orderId)"
  300. v-if="item.examineStatus == 'FAIL'"
  301. >
  302. 重新申请
  303. </div>
  304. </view>
  305. <!-- 按钮:售后中 待商家收货 -->
  306. <view class="btn-group" v-if="item.orderStatus == 'DSJSH'">
  307. <div
  308. class="button gray"
  309. @tap.stop="toReturnDetail(item.orderRefundId)"
  310. >
  311. 售后详情
  312. </div>
  313. </view>
  314. <!-- 按钮:售后中 退款成功 -->
  315. <view
  316. class="btn-group"
  317. v-if="item.orderStatus == 'OVER' && tabCurrent == 'REFUND'"
  318. >
  319. <div
  320. class="button gray"
  321. @tap.stop="toReturnDetail(item.orderRefundId)"
  322. >
  323. 售后详情
  324. </div>
  325. </view>
  326. </view>
  327. </block>
  328. </view>
  329. <no-data v-if="!orderList.length" :showText="'暂无订单'"></no-data>
  330. <loading-text
  331. v-if="orderList.length"
  332. :loading="loading"
  333. :noMore="noMore"
  334. ></loading-text>
  335. <!-- 取消订单 -->
  336. <modal-dialog
  337. showText="确定要取消订单吗?"
  338. :isShowDialog="isCancelDialog"
  339. @cancel="isCancelDialog = false"
  340. @confirm="confirmCancelOrder"
  341. ></modal-dialog>
  342. <!-- 确认收货 -->
  343. <modal-dialog
  344. showText="确定要确认收货吗?"
  345. :isShowDialog="isConfirmDialog"
  346. @cancel="isConfirmDialog = false"
  347. @confirm="confirmReceipt"
  348. ></modal-dialog>
  349. <zhifutanchuan
  350. v-if="detail_"
  351. :orderInfo="orderInfo"
  352. @PAY_TYPE_STR="PAY_TYPE_STR"
  353. />
  354. </view>
  355. </template>
  356. <script>
  357. import { mapState } from 'vuex';
  358. import modalDialog from '@/components/modalDialog.vue';
  359. import zhifutanchuan from '@/components/zhifutanchuan.vue';
  360. export default {
  361. components: {
  362. modalDialog,
  363. zhifutanchuan,
  364. },
  365. filters: {
  366. statusFilter(val) {
  367. const statusMap = {
  368. NOPAY: '待付款',
  369. DFH: '待发货',
  370. YFH: '待收货',
  371. OVER: '已完成',
  372. CLOSE: '已关闭',
  373. REFUND: '售后中',
  374. TIMEOUT: '超时未支付',
  375. };
  376. return statusMap[val];
  377. },
  378. statusFilter2(val) {
  379. const statusMap = {
  380. DSJCL: '待商家处理',
  381. DSJSH: '待商家收货',
  382. DMJCL: '待买家处理',
  383. OVER: '退款成功',
  384. CANCEL: '已取消',
  385. };
  386. return statusMap[val];
  387. },
  388. },
  389. data() {
  390. return {
  391. detail_: null,
  392. orderInfo: null,
  393. configInfo: uni.getStorageSync('configInfo'),
  394. tabCurrent: '', // 当前tab状态
  395. orderList: [], // 订单列表
  396. pageNum: 1,
  397. pageSize: 8,
  398. noMore: false,
  399. loading: false,
  400. isCancelDialog: false, // 是否显示取消订单弹窗
  401. cancelOrderId: null, // 取消订单id
  402. isConfirmDialog: false, // 是否显示确认收货弹窗
  403. confirmReceiptId: null, // 确认收货id
  404. autoDetailId: null, // 自动跳转到详情页id
  405. canRemindShipment: true, // 能否点击提醒发货
  406. };
  407. },
  408. computed: {
  409. ...mapState(['userInfo', 'isLogin', 'userId']),
  410. },
  411. onLoad({ tab, orderId }) {
  412. this.tabCurrent = tab || '';
  413. console.log(this.tabCurrent);
  414. if (orderId) {
  415. this.autoDetailId = orderId;
  416. }
  417. this.getOrderList();
  418. uni.$on('refreshOrderList', (data) => {
  419. if (data) {
  420. this.tabCurrent = 'REFUND';
  421. }
  422. this.getOrderList();
  423. });
  424. },
  425. // 下拉刷新
  426. onPullDownRefresh() {
  427. this.pageNum = 1;
  428. this.getOrderList();
  429. },
  430. // 上拉加载
  431. onReachBottom() {
  432. this.getOrderList(1);
  433. },
  434. methods: {
  435. getOrderList(loadMore) {
  436. if (this.noMore && loadMore) return;
  437. this.noMore = false;
  438. if (!loadMore) {
  439. this.pageNum = 1;
  440. } else {
  441. this.loading = true;
  442. }
  443. let url = '';
  444. let orderStatus = '';
  445. if (this.tabCurrent == 'REFUND') {
  446. url = '/order/refund/list';
  447. orderStatus = '';
  448. } else {
  449. url = '/order/my/order';
  450. orderStatus = this.tabCurrent;
  451. }
  452. this.$axios({
  453. url: url,
  454. method: 'get',
  455. params: {
  456. pageNo: this.pageNum,
  457. pageSize: this.pageSize,
  458. orderStatus: orderStatus,
  459. userId: this.userId,
  460. },
  461. isLoading: !loadMore,
  462. }).then((res) => {
  463. let _list = res.data.records;
  464. let pageTotal = res.data.pages;
  465. if (this.pageNum >= pageTotal) {
  466. this.noMore = true;
  467. }
  468. if (_list.length) {
  469. this.pageNum += 1;
  470. }
  471. if (loadMore) {
  472. this.orderList = this.orderList.concat(_list);
  473. this.loading = false;
  474. } else {
  475. this.orderList = _list;
  476. }
  477. uni.stopPullDownRefresh();
  478. if (this.autoDetailId) {
  479. this.toOrderDetail(this.autoDetailId);
  480. }
  481. });
  482. },
  483. getRefundNum(orderDetails) {
  484. let refundNum = 0;
  485. orderDetails.forEach((item) => {
  486. if (item.refund) {
  487. refundNum = refundNum + item.refundNum;
  488. }
  489. });
  490. return refundNum;
  491. },
  492. // 检查是否可以申请售后(根据orderShareStatus)
  493. checkCanReturn(status) {
  494. if (!status || status === 'OVER' || status === 'CANCEL') {
  495. return false;
  496. } else {
  497. return true;
  498. }
  499. },
  500. // 切换类型
  501. changeTab(current) {
  502. this.orderList = [];
  503. this.tabCurrent = current;
  504. this.pageNum = 1;
  505. this.getOrderList();
  506. },
  507. // 申请退款
  508. toApplyReturn(orderId) {
  509. uni.navigateTo({
  510. url: '/pages/mine/order/return/apply?orderId=' + orderId,
  511. });
  512. },
  513. // 去订单详情
  514. toOrderDetail(orderId, orderRefundId) {
  515. this.autoDetailId = null;
  516. if (orderRefundId) {
  517. return uni.navigateTo({
  518. url:
  519. '/pages/mine/order/return/detail?orderRefundId=' +
  520. (orderRefundId || ''),
  521. });
  522. }
  523. uni.navigateTo({
  524. url:
  525. '/pages/mine/order/detail?orderId=' +
  526. (orderId || '') +
  527. '&orderRefundId=' +
  528. (orderRefundId || ''),
  529. });
  530. },
  531. // 取消订单
  532. cancelOrder(orderId) {
  533. this.cancelOrderId = orderId;
  534. this.isCancelDialog = true;
  535. },
  536. // 确认取消订单
  537. confirmCancelOrder() {
  538. this.$axios({
  539. url: '/order/cancel',
  540. method: 'get',
  541. params: {
  542. orderId: this.cancelOrderId,
  543. },
  544. }).then((res) => {
  545. this.isCancelDialog = false;
  546. this.pageNum = 1;
  547. this.getOrderList();
  548. this.$successToast('取消订单成功');
  549. });
  550. },
  551. // 确认收货
  552. clickConfirmReceipt(orderId) {
  553. this.confirmReceiptId = orderId;
  554. this.isConfirmDialog = true;
  555. },
  556. // 确定 确认收货
  557. confirmReceipt() {
  558. this.$axios({
  559. url: '/order/ack',
  560. params: {
  561. orderId: this.confirmReceiptId,
  562. },
  563. }).then((res) => {
  564. this.isConfirmDialog = false;
  565. this.pageNum = 1;
  566. this.getOrderList();
  567. this.$successToast('确认收货成功');
  568. });
  569. },
  570. PAY_TYPE_STR(ewPam) {
  571. this.payOrder(ewPam);
  572. },
  573. submitOrder(item) {
  574. let that = this;
  575. this.orderInfo = item;
  576. this.detail_ = true;
  577. },
  578. // 立即付款
  579. payOrder(ewPam = {}) {
  580. let that = this;
  581. this.$axios({
  582. url: '/order/wait/pay',
  583. params: {
  584. ...ewPam,
  585. userId: this.userId,
  586. orderId: this.orderInfo.orderId,
  587. },
  588. isLoading: 1,
  589. }).then((res) => {
  590. that.orderId = res.data.id;
  591. if (ewPam.payType == '微信支付') {
  592. uni.getProvider({
  593. service: 'payment',
  594. success: (e) => {
  595. uni.requestPayment({
  596. provider: e.provider[0],
  597. orderInfo: res.data,
  598. timeStamp: res.data.timeStamp,
  599. nonceStr: res.data.nonceStr,
  600. package: res.data.payPackage,
  601. signType: 'MD5',
  602. paySign: res.data.paySign,
  603. success: (payRes) => {
  604. this.detail_ = false;
  605. this.orderInfo = null;
  606. that.$successToast('支付成功');
  607. that.pageNum = 1;
  608. that.getOrderList();
  609. that.requestMessage();
  610. },
  611. fail: (err) => {
  612. this.detail_ = false;
  613. this.orderInfo = null;
  614. that.$toast('支付失败');
  615. that.pageNum = 1;
  616. that.getOrderList();
  617. that.requestMessage();
  618. },
  619. });
  620. },
  621. });
  622. } else if (
  623. ewPam.payType == '云闪付' &&
  624. res?.data?.umsMiniRep?.miniPayRequest?.cqpMpAppId
  625. ) {
  626. uni.navigateToMiniProgram({
  627. appId: res.data?.umsMiniRep?.miniPayRequest?.cqpMpAppId,
  628. path: res.data?.umsMiniRep?.miniPayRequest?.cqpMpPath,
  629. success(res) {
  630. uni.onAppShow(({ scene }) => {
  631. // if (scene == 1038) {
  632. // that.$successToast('支付成功');
  633. // }
  634. this.detail_ = false;
  635. this.orderInfo = null;
  636. that.pageNum = 1;
  637. that.getOrderList();
  638. that.requestMessage();
  639. uni.reLaunch({
  640. url: '/pages/mine/order/detail?orderId=' + that.orderId,
  641. });
  642. uni.offAppShow();
  643. });
  644. },
  645. fail() {
  646. }
  647. });
  648. }
  649. });
  650. },
  651. // 消息推送
  652. requestMessage() {
  653. let that = this;
  654. uni.showModal({
  655. title: '温馨提示',
  656. content: '为更好的促进您与买家的交流,需要在您的订单成交时向您发送消息',
  657. confirmText: '同意',
  658. cancelText: '拒绝',
  659. success: function (res) {
  660. if (res.confirm) {
  661. let tmplIds = [that.configInfo.template];
  662. uni.requestSubscribeMessage({
  663. tmplIds: tmplIds,
  664. success(res) {
  665. let status = null;
  666. tmplIds.map((item, index) => {
  667. if (res[item] == 'accept') {
  668. status = 'accept';
  669. }
  670. });
  671. if (status == 'accept') {
  672. that.$successToast('订阅成功');
  673. } else {
  674. that.$toast('订阅取消');
  675. }
  676. },
  677. fail(res) {
  678. console.log(res);
  679. that.$toast('订阅失败');
  680. },
  681. });
  682. } else if (res.cancel) {
  683. uni.showModal({
  684. title: '温馨提示',
  685. content: '拒绝后您将无法获取实时的与卖家(买家)的交易消息',
  686. confirmText: '知道了',
  687. showCancel: false,
  688. success: function (res) {},
  689. });
  690. }
  691. },
  692. });
  693. },
  694. // 去售后详情
  695. toReturnDetail(orderRefundId) {
  696. uni.navigateTo({
  697. url: '/pages/mine/order/return/detail?orderRefundId=' + orderRefundId,
  698. });
  699. },
  700. // 去查看物流
  701. toLogistics(companyCode, logisticsNo) {
  702. uni.navigateTo({
  703. url:
  704. '/pages/mine/order/logistics?companyCode=' +
  705. companyCode +
  706. '&logisticsNo=' +
  707. logisticsNo,
  708. });
  709. },
  710. // 提醒发货
  711. remindShipment(orderId) {
  712. if (!this.canRemindShipment) {
  713. return this.$toast('请勿频繁操作');
  714. }
  715. this.canRemindShipment = false;
  716. setTimeout(() => {
  717. this.canRemindShipment = true;
  718. }, 3000);
  719. this.$axios({
  720. url: '/order/notice',
  721. params: {
  722. orderId: orderId,
  723. userId: this.userId,
  724. },
  725. }).then((res) => {
  726. this.$successToast('提醒发货成功');
  727. });
  728. },
  729. },
  730. };
  731. </script>
  732. <style lang="scss">
  733. .app-container {
  734. background: #f4f2f2;
  735. box-sizing: border-box;
  736. }
  737. .tab-container {
  738. position: fixed;
  739. top: 0;
  740. left: 0;
  741. width: 100%;
  742. background: #ffffff;
  743. display: flex;
  744. .item {
  745. width: 20%;
  746. text-align: center;
  747. text {
  748. display: inline-block;
  749. padding: 0 10rpx;
  750. line-height: 80rpx;
  751. padding-top: 8rpx;
  752. }
  753. &.current {
  754. text {
  755. color: #ff3f42;
  756. border-bottom: 6rpx solid #ff3f42;
  757. }
  758. }
  759. }
  760. }
  761. .list-container {
  762. padding: 110rpx 20rpx 0;
  763. .item {
  764. margin-bottom: 20rpx;
  765. background: #ffffff;
  766. border-radius: 20rpx;
  767. padding: 0 20rpx;
  768. .top {
  769. height: 70rpx;
  770. display: flex;
  771. justify-content: space-between;
  772. align-items: center;
  773. .left {
  774. font-size: 28rpx;
  775. color: #666666;
  776. }
  777. .right {
  778. font-size: 28rpx;
  779. color: #fe781f;
  780. }
  781. }
  782. .goods {
  783. display: flex;
  784. justify-content: space-between;
  785. margin-top: 20rpx;
  786. &.goods0 {
  787. margin-top: 0;
  788. }
  789. image {
  790. width: 140rpx;
  791. height: 140rpx;
  792. display: block;
  793. flex-shrink: 0;
  794. margin-right: 20rpx;
  795. }
  796. .main {
  797. width: 510rpx;
  798. .row1 {
  799. display: flex;
  800. justify-content: space-between;
  801. .name {
  802. font-size: 28rpx;
  803. line-height: 36rpx;
  804. }
  805. .price {
  806. font-size: 28rpx;
  807. margin-left: 20rpx;
  808. color: #666666;
  809. }
  810. }
  811. .row2 {
  812. display: flex;
  813. justify-content: space-between;
  814. font-size: 28rpx;
  815. color: #999999;
  816. margin-top: 10rpx;
  817. }
  818. }
  819. }
  820. .bottom {
  821. display: flex;
  822. align-items: center;
  823. justify-content: space-between;
  824. height: 50rpx;
  825. .left {
  826. font-size: 24rpx;
  827. color: #999999;
  828. }
  829. .total {
  830. font-size: 24rpx;
  831. color: #666666;
  832. text {
  833. color: #ff3f42;
  834. font-size: 28rpx;
  835. }
  836. }
  837. }
  838. .btn-group {
  839. border-top: 1px solid #eaeaea;
  840. height: 100rpx;
  841. display: flex;
  842. justify-content: flex-end;
  843. align-items: center;
  844. &.btn-group2 {
  845. justify-content: space-between;
  846. .tips {
  847. font-size: 28rpx;
  848. color: #ff3f42;
  849. }
  850. .btns {
  851. display: flex;
  852. }
  853. }
  854. .button {
  855. width: 140rpx;
  856. height: 48rpx;
  857. border-radius: 48rpx;
  858. text-align: center;
  859. line-height: 48rpx;
  860. font-size: 24rpx;
  861. margin-left: 20rpx;
  862. flex-shrink: 0;
  863. &:first-child {
  864. margin-left: 0;
  865. }
  866. &.gray {
  867. color: #999999;
  868. border: 1px solid #999999;
  869. }
  870. &.white {
  871. color: #ff3f42;
  872. border: 1px solid #ff3f42;
  873. }
  874. &.red {
  875. color: #ffffff;
  876. border: 1px solid #ff3f42;
  877. background: #ff3f42;
  878. }
  879. }
  880. }
  881. }
  882. }
  883. </style>