You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1109 lines
30 KiB

3 months ago
  1. <template>
  2. <view :data-theme="theme">
  3. <view class='order-details'>
  4. <!-- 给header上与data上加on为退款订单-->
  5. <view class='header bg_color' :class='isGoodsReturn ? "on":""'>
  6. <view class='picTxt acea-row row-middle'>
  7. <view class='pictrue' v-if="isGoodsReturn==false">
  8. <image :src="orderInfo.statusPic"></image>
  9. </view>
  10. <view class='data' :class='isGoodsReturn ? "on":""'>
  11. <view class='state'>{{orderInfo.orderStatusMsg}}</view>
  12. <view v-if="orderInfo.refundReasonTime !== null">{{orderInfo.refundReasonTime}}</view>
  13. <view v-else>{{orderInfo.payTime ? orderInfo.payTime :''}}</view>
  14. </view>
  15. </view>
  16. </view>
  17. <view v-if="isGoodsReturn==false" class="pad30">
  18. <view class='nav'>
  19. <view class='navCon acea-row row-between-wrapper'>
  20. <view :class="!orderInfo.paid ? 'on':''">待付款</view>
  21. <view :class="orderInfo.paid && orderInfo.status == 0 ? 'on':''">
  22. {{orderInfo.shippingType==1 ? '待发货':'待核销'}}</view>
  23. <view :class="orderInfo.status == 1 ? 'on':''" v-if="orderInfo.shippingType == 1">待收货</view>
  24. <view :class="orderInfo.status == 2 ? 'on':''">待评价</view>
  25. <view :class="orderInfo.status == 3 ? 'on':''">已完成</view>
  26. </view>
  27. <view class='progress acea-row row-between-wrapper'>
  28. <view class='iconfont'
  29. :class='(!orderInfo.paid ? "icon-webicon318":"icon-yuandianxiao") + " " + ("font_color")'>
  30. </view>
  31. <view class='line' :class='orderInfo.paid > 0 ? "bg_color":""'></view>
  32. <view class='iconfont'
  33. :class='(orderInfo.status == 0 ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.paid&&orderInfo.status >= 0 ? "font_color":"")'>
  34. </view>
  35. <view class='line' :class='orderInfo.status > 0 ? "bg_color":""'
  36. v-if="orderInfo.shippingType == 1"></view>
  37. <view class='iconfont'
  38. :class='(orderInfo.status == 1 ? "icon-webicon318":"icon-yuandianxiao") + " " +(orderInfo.status >= 1 ? "font_color":"")'
  39. v-if="orderInfo.shippingType == 1"></view>
  40. <view class='line' :class='orderInfo.status > 1 ? "bg_color":""'></view>
  41. <view class='iconfont'
  42. :class='(orderInfo.status == 2 ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 2 ? "font_color":"")'>
  43. </view>
  44. <view class='line' :class='orderInfo.status > 2 ? "bg_color":""'></view>
  45. <view class='iconfont'
  46. :class='(orderInfo.status == 3 ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 3 ? "font_color":"")'>
  47. </view>
  48. </view>
  49. </view>
  50. <view v-if="orderInfo.shippingType == 2 && orderInfo.paid" class="writeOff borRadius14">
  51. <view class="title">核销信息</view>
  52. <view class="grayBg">
  53. <view class="pictrue">
  54. <!-- <div class="qrcode" ref="qrcode"></div> -->
  55. <!-- <canvas canvas-id="qrcode" :style="{width: `${qrcodeSize}100%`, height: `${qrcodeSize}100%`}"/> -->
  56. <image :src="codeImg"></image>
  57. </view>
  58. </view>
  59. <view class="gear">
  60. <image :src="urlDomain+'crmebimage/perset/staticImg/writeOff.jpg'"></image>
  61. </view>
  62. <view class="num">{{orderInfo.verifyCode}}</view>
  63. <view class="rules" v-if='orderInfo.systemStore'>
  64. <view class="item">
  65. <view class="rulesTitle acea-row row-middle">
  66. <text class="iconfont icon-shijian"></text>核销时间
  67. </view>
  68. <view class="info">
  69. 每日<text class="time">{{orderInfo.systemStore.dayTime.replace(',','-')}}</text>
  70. </view>
  71. </view>
  72. <view class="item">
  73. <view class="rulesTitle acea-row row-middle">
  74. <text class="iconfont icon-shuoming1"></text>使用说明
  75. </view>
  76. <view class="info">可将二维码出示给店员扫描或提供数字核销码</view>
  77. </view>
  78. </view>
  79. </view>
  80. <view class="refund borRadius14" v-if="orderInfo.refundReason">
  81. <view class="title">
  82. <image :src="urlDomain+'crmebimage/perset/staticImg/shuoming.png'" mode=""></image>
  83. 商家拒绝退款
  84. </view>
  85. <view class="con">拒绝原因{{orderInfo.refundReason}}</view>
  86. </view>
  87. <view v-if="orderInfo.shippingType == 2" class="map acea-row row-between-wrapper borRadius14">
  88. <view>自提地址信息</view>
  89. <view class="place cart-color acea-row row-center-wrapper" @tap="showMaoLocation">
  90. <text class="iconfont icon-weizhi"></text>查看位置
  91. </view>
  92. </view>
  93. <view v-if="orderInfo.shippingType === 1" class='address borRadius14'>
  94. <view class='name'>{{orderInfo.realName}}<text class='phone'>{{orderInfo.userPhone}}</text></view>
  95. <view>{{orderInfo.userAddress}}</view>
  96. </view>
  97. <view v-else class='address' style="margin-top:15rpx;">
  98. <view class='name' @tap="makePhone">{{orderInfo.systemStore?orderInfo.systemStore.name:''}}<text
  99. class='phone'>{{orderInfo.systemStore?orderInfo.systemStore.phone:''}}</text><text
  100. class="iconfont icon-tonghua font-color"></text></view>
  101. <view>{{orderInfo.systemStore?orderInfo.systemStore.address + orderInfo.systemStore.detailedAddress:''}}</view>
  102. </view>
  103. <orderGoods :evaluate='evaluate' :productType="orderInfo.type" :orderId="order_id" :ids="id" :uniId="uniId" :cartInfo="cartInfo"
  104. :jump="true"></orderGoods>
  105. <!-- #ifndef MP -->
  106. <div class="goodCall borRadius14" @click="onClickService">
  107. <span class="iconfont icon-kefu"></span><span>联系客服</span>
  108. </div>
  109. <!-- #endif -->
  110. <!-- #ifdef MP -->
  111. <div class="goodCall borRadius14">
  112. <button hover-class='none' class='item skeleton-rect' @click="onClickService"
  113. v-if="chatConfig.telephone_service_switch === 'open'">
  114. <view class='iconfont icon-kefu'></view>
  115. <view>客服</view>
  116. </button>
  117. <template v-else>
  118. <button open-type="contact" hover-class='none' class='item skeleton-rect' v-if="chatConfig.wx_chant_independent=='open'">
  119. <view class='iconfont icon-kefu'></view>
  120. <view>客服</view>
  121. </button>
  122. <button class="item" hover-class='none' @click="wxChatService" v-else>
  123. <view class='iconfont icon-kefu'></view>
  124. <text>联系客服</text>
  125. </button>
  126. </template>
  127. </div>
  128. <!-- #endif -->
  129. </view>
  130. <view class="pad30">
  131. <!-- <view class='nav refund' v-if="orderInfo.refundStatus>0">
  132. <view class="title">
  133. <image src="/static/images/shuoming.png" mode=""></image>
  134. {{orderInfo.refundStatus==1?'商家审核中':orderInfo.refundStatus==2?'商家已退款':'商家拒绝退款'}}
  135. </view>
  136. <view class="con pad30">{{orderInfo.refundStatus==1 ? "您已成功发起退款申请,请耐心等待商家处理;退款前请与商家协商一致,有助于更好的处理售后问题": orderInfo.refundStatus==2? "退款已成功受理,如商家已寄出商品请尽快退回;感谢您的支持": "拒绝原因:" + orderInfo.refundReason}}</view>
  137. </view> -->
  138. <view class='wrapper borRadius14'>
  139. <view class='item acea-row row-between'>
  140. <view>订单编号</view>
  141. <view class='conter acea-row row-middle row-right'><text class="text-overflow">{{orderInfo.orderId}}</text>
  142. <!-- #ifndef H5 -->
  143. <text class='copy' @tap='copy'>复制</text>
  144. <!-- #endif -->
  145. <!-- #ifdef H5 -->
  146. <text class='copy copy-data' :data-clipboard-text="orderInfo.orderId">复制</text>
  147. <!-- #endif -->
  148. </view>
  149. </view>
  150. <view class='item acea-row row-between'>
  151. <view>下单时间</view>
  152. <view class='conter'>{{(orderInfo.createTime || 0)}}</view>
  153. </view>
  154. <view class='item acea-row row-between'>
  155. <view>支付状态</view>
  156. <view class='conter' v-if="orderInfo.paid">已支付</view>
  157. <view class='conter' v-else>未支付</view>
  158. </view>
  159. <view class='item acea-row row-between'>
  160. <view>支付方式</view>
  161. <view class='conter'>{{orderInfo.payTypeStr}}</view>
  162. </view>
  163. <view class='item flex justify-between align-center' v-if="orderInfo.mark && orderInfo.mark.length <= 15">
  164. <view>买家留言</view>
  165. <view class='conter' >{{orderInfo.mark}}</view>
  166. </view>
  167. <view class='item flex justify-between' v-if="orderInfo.mark && orderInfo.mark.length > 15">
  168. <view>买家留言</view>
  169. <view class="flex align-center" v-show="isShow" @click="isShow=!isShow">
  170. <view class='conter' >{{orderInfo.mark}}</view>
  171. <text class="iconfont icon-xiangyou" style="font-size: 12px;"></text>
  172. </view>
  173. <view v-show="!isShow" @click="isShow=!isShow">
  174. <view class='mark_show' >{{orderInfo.mark}}</view>
  175. </view>
  176. </view>
  177. </view>
  178. <!-- 退款订单详情 "-->
  179. <view v-if="isGoodsReturn" class='wrapper borRadius14' >
  180. <view class='item acea-row row-between'>
  181. <view>收货人</view>
  182. <view class='conter'>{{orderInfo.realName}}</view>
  183. </view>
  184. <view class='item acea-row row-between'>
  185. <view>联系电话</view>
  186. <view class='conter'>{{orderInfo.userPhone}}</view>
  187. </view>
  188. <view class='item acea-row row-between'>
  189. <view>收货地址</view>
  190. <view class='conter'>{{orderInfo.userAddress}}</view>
  191. </view>
  192. <view class='item acea-row row-between' v-if="orderInfo.refundReasonWap">
  193. <view>退款原因</view>
  194. <view class='conter'>{{orderInfo.refundReasonWap}}</view>
  195. </view>
  196. <view class='item acea-row row-between' v-if="orderInfo.refundReasonWapExplain">
  197. <view>退款说明</view>
  198. <view class='conter'>{{orderInfo.refundReasonWapExplain}}</view>
  199. </view>
  200. </view>
  201. <view v-if="orderInfo.status>0">
  202. <view class='wrapper borRadius14' v-if='orderInfo.deliveryType=="express"'>
  203. <view class='item acea-row row-between'>
  204. <view>配送方式</view>
  205. <view class='conter'>发货</view>
  206. </view>
  207. <view class='item acea-row row-between'>
  208. <view>快递公司</view>
  209. <view class='conter'>{{orderInfo.deliveryName || ''}}</view>
  210. </view>
  211. <view class='item acea-row row-between'>
  212. <view>快递号</view>
  213. <view class='conter'>{{orderInfo.deliveryId || ''}}</view>
  214. </view>
  215. </view>
  216. <view class='wrapper borRadius14' v-else-if='orderInfo.deliveryType=="send"'>
  217. <view class='item acea-row row-between'>
  218. <view>配送方式</view>
  219. <view class='conter'>送货</view>
  220. </view>
  221. <view class='item acea-row row-between'>
  222. <view>配送人姓名</view>
  223. <view class='conter'>{{orderInfo.deliveryName || ''}}</view>
  224. </view>
  225. <view class='item acea-row row-between'>
  226. <view>联系电话</view>
  227. <view class='conter acea-row row-middle row-right'>{{orderInfo.deliveryId || ''}}<text
  228. class='copy' @tap='goTel'>拨打</text></view>
  229. </view>
  230. </view>
  231. <view class='wrapper borRadius14' v-else-if='orderInfo.deliveryType=="fictitious"'>
  232. <view class='item acea-row row-between'>
  233. <view>虚拟发货</view>
  234. <view class='conter'>已发货请注意查收</view>
  235. </view>
  236. </view>
  237. </view>
  238. <view class='wrapper borRadius14'>
  239. <view class='item acea-row row-between'>
  240. <view>商品总价</view>
  241. <view class='conter'>{{orderInfo.proTotalPrice}}</view>
  242. </view>
  243. <view class='item acea-row row-between' v-if="orderInfo.payPostage > 0">
  244. <view>运费</view>
  245. <view class='conter'>{{orderInfo.payPostage}}</view>
  246. </view>
  247. <view class='item acea-row row-between' v-if='orderInfo.couponId'>
  248. <view>优惠券抵扣</view>
  249. <view class='conter'>-{{orderInfo.couponPrice}}</view>
  250. </view>
  251. <view class='item acea-row row-between' v-if="orderInfo.useIntegral > 0">
  252. <view>积分抵扣</view>
  253. <view class='conter'>-{{orderInfo.deductionPrice}}</view>
  254. </view>
  255. <view class='actualPay acea-row row-right'>实付款<text
  256. class='money'>{{orderInfo.payPrice}}</text></view>
  257. </view>
  258. <view style='height:120rpx;'></view>
  259. <view class='footer acea-row row-right row-middle' v-if="isGoodsReturn==false">
  260. <view class="qs-btn" v-if="!orderInfo.paid" @click.stop="cancelOrder">取消订单</view>
  261. <view class='bnt bg_color' v-if="!orderInfo.paid" @tap='pay_open(orderInfo.orderId,orderInfo.payPrice)'>立即付款</view>
  262. <navigator hover-class="none" :url="'/pages/goods/goods_return/index?orderId='+orderInfo.orderId"
  263. class='bnt cancel' v-else-if="orderInfo.paid === true && orderInfo.refundStatus === 0 && orderInfo.type!==1">申请退款
  264. </navigator>
  265. <view class='bnt bg_color' v-if="orderInfo.combinationId > 0&&orderInfo.paid" @tap='goJoinPink'>查看拼团</view>
  266. <navigator class='bnt cancel' v-if="orderInfo.deliveryType == 'express' && orderInfo.status >0"
  267. hover-class='none' :url="'/pages/goods/goods_logistics/index?orderId='+ orderInfo.orderId">查看物流
  268. </navigator>
  269. <view class='bnt bg_color' v-if="orderInfo.status==1" @tap='confirmOrder'>确认收货</view>
  270. <view class='bnt cancel' v-if="orderInfo.status==3" @tap='delOrder'>删除订单</view>
  271. <view class='bnt bg_color' v-if="orderInfo.status==3 && orderInfo.type!==1 && againStatus !== 1 " @tap='goOrderConfirm'>再次购买</view>
  272. </view>
  273. </view>
  274. </view>
  275. <payment :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id"
  276. :totalPrice='totalPrice'></payment>
  277. </view>
  278. </template>
  279. <script>
  280. import {
  281. getOrderDetail,
  282. orderTake,
  283. orderDel,
  284. orderCancel,
  285. qrcodeApi
  286. } from '@/api/order.js';
  287. import payment from '@/components/payment';
  288. import orderGoods from "@/components/orderGoods";
  289. import ClipboardJS from "@/plugin/clipboard/clipboard.js";
  290. import {toLogin} from '@/libs/login.js';
  291. import {mapGetters} from "vuex";
  292. // #ifdef MP
  293. import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js'
  294. // #endif
  295. import {setThemeColor} from '@/utils/setTheme.js'
  296. import {Debounce} from '@/utils/validate.js'
  297. const app = getApp();
  298. export default {
  299. components: {
  300. payment,
  301. orderGoods
  302. },
  303. data() {
  304. return {
  305. urlDomain: this.$Cache.get("imgHost"),
  306. codeImg: '',
  307. qrcodeSize: 100,
  308. order_id: '',
  309. evaluate: 0,
  310. cartInfo: [], //购物车产品
  311. orderInfo: {
  312. systemStore: {},
  313. pstatus: {}
  314. }, //订单详情
  315. system_store: {},
  316. isGoodsReturn: false, //是否为退款订单
  317. status: {}, //订单底部按钮状态
  318. isClose: false,
  319. payMode: [{
  320. name: "微信支付",
  321. icon: "icon-weixinzhifu",
  322. value: 'weixin',
  323. title: '微信快捷支付',
  324. payStatus: 1,
  325. },
  326. {
  327. name: "余额支付",
  328. icon: "icon-yuezhifu",
  329. value: 'yue',
  330. title: '可用余额:',
  331. number: 0,
  332. payStatus: 1,
  333. }
  334. ],
  335. pay_close: false,
  336. pay_order_id: '',
  337. totalPrice: '0',
  338. isAuto: false, //没有授权的不会自动授权
  339. isShowAuth: false, //是否隐藏授权
  340. id: 0, //订单id
  341. uniId: '',
  342. utils: this.$util,
  343. againStatus:0,
  344. type: 'normal',
  345. isShow:true,
  346. theme:app.globalData.theme,
  347. bgColor:'#e93323',
  348. chatConfig:{
  349. consumer_hotline:'',
  350. telephone_service_switch:'close',
  351. wx_chant_independent:'open'
  352. } //客服配置
  353. };
  354. },
  355. computed: mapGetters(['isLogin', 'chatUrl', 'userInfo']),
  356. onLoad: function(options) {
  357. options.type == undefined || options.type == null ? this.type = 'normal' : this.type = options.type;
  358. if (!options.order_id && !options.uniId) return this.$util.Tips({
  359. title: '缺少参数'
  360. }, {
  361. tab: 3,
  362. url: 1
  363. });
  364. this.$set(this, 'order_id', options.order_id);
  365. let that = this;
  366. that.bgColor = setThemeColor();
  367. uni.setNavigationBarColor({
  368. frontColor: '#ffffff',
  369. backgroundColor:that.bgColor,
  370. });
  371. that.$set(that,'chatConfig',that.$Cache.getItem('chatConfig'));
  372. },
  373. onShow() {
  374. if (this.isLogin) {
  375. this.getOrderInfo();
  376. this.payMode[1].number = this.userInfo.nowMoney;
  377. this.$set(this, 'payMode', this.payMode);
  378. } else {
  379. toLogin();
  380. }
  381. },
  382. onHide: function() {
  383. this.isClose = true;
  384. },
  385. onReady: function() {
  386. // #ifdef H5
  387. this.$nextTick(function() {
  388. const clipboard = new ClipboardJS(".copy-data");
  389. clipboard.on("success", () => {
  390. this.$util.Tips({
  391. title: '复制成功'
  392. });
  393. });
  394. });
  395. // #endif
  396. },
  397. mounted() {
  398. // #ifdef H5
  399. if(this.$wechat.isWeixin()) this.payMode.pop();
  400. // #endif
  401. },
  402. methods: {
  403. wxChatService(){
  404. let chatUrlArr = this.chatUrl.split('?')
  405. uni.navigateTo({
  406. url:`/pages/users/web_page/index?webUel=${chatUrlArr[0]}&title=客服&${chatUrlArr[1]}`
  407. })
  408. },
  409. onClickService() {
  410. if(this.chatConfig.telephone_service_switch === 'open'){
  411. uni.makePhoneCall({
  412. phoneNumber: this.chatConfig.consumer_hotline //仅为示例
  413. });
  414. }else{
  415. // #ifdef APP-PLUS
  416. uni.navigateTo({
  417. url: '/pages/users/web_page/index?webUel=' + this.chatUrl + '&title=客服'
  418. })
  419. // #endif
  420. // #ifndef APP-PLUS
  421. location.href = this.chatUrl;
  422. // #endif
  423. }
  424. },
  425. /**
  426. * 事件回调
  427. *
  428. */
  429. onChangeFun: function(e) {
  430. let opt = e;
  431. let action = opt.action || null;
  432. let value = opt.value != undefined ? opt.value : null;
  433. (action && this[action]) && this[action](value);
  434. },
  435. /**
  436. * 拨打电话
  437. */
  438. makePhone: function() {
  439. uni.makePhoneCall({
  440. phoneNumber: this.system_store.phone
  441. })
  442. },
  443. /**
  444. * 打开地图
  445. *
  446. */
  447. showMaoLocation: function() {
  448. if (!this.system_store.latitude || !this.system_store.longitude) return this.$util.Tips({
  449. title: '缺少经纬度信息无法查看地图!'
  450. });
  451. uni.openLocation({
  452. latitude: parseFloat(this.system_store.latitude),
  453. longitude: parseFloat(this.system_store.longitude),
  454. scale: 8,
  455. name: this.system_store.name,
  456. address: this.system_store.address + this.system_store.detailedAddress,
  457. success: function() {
  458. },
  459. });
  460. },
  461. /**
  462. * 关闭支付组件
  463. *
  464. */
  465. payClose: function() {
  466. this.pay_close = false;
  467. },
  468. /**
  469. * 打开支付组件
  470. *
  471. */
  472. pay_open: function(order_id,pay_price) {
  473. // this.pay_close = true;
  474. // this.pay_order_id = this.orderInfo.orderId;
  475. // this.totalPrice = this.orderInfo.payPrice;
  476. uni.navigateTo({
  477. url:`/pages/order/order_payment/index?orderNo=${order_id}&payPrice=${pay_price}`
  478. })
  479. },
  480. /**
  481. * 支付成功回调
  482. *
  483. */
  484. pay_complete: function() {
  485. this.pay_close = false;
  486. this.pay_order_id = '';
  487. this.getOrderInfo();
  488. },
  489. /**
  490. * 支付失败回调
  491. *
  492. */
  493. pay_fail: function() {
  494. this.pay_close = false;
  495. this.pay_order_id = '';
  496. },
  497. /**
  498. * 获取订单详细信息
  499. *
  500. */
  501. getOrderInfo: function() {
  502. let that = this;
  503. uni.showLoading({
  504. title: "正在加载中"
  505. });
  506. getOrderDetail(that.order_id).then(res => {
  507. uni.hideLoading();
  508. that.$set(that, 'orderInfo', res.data);
  509. that.$set(that, 'evaluate', res.data.status == 2 ? 2 : 0);
  510. that.$set(that, 'system_store', res.data.systemStore);
  511. that.$set(that, 'id', res.data.id);
  512. that.$set(that, 'cartInfo', res.data.orderInfoList);
  513. if (res.data.refundStatus != 0) {
  514. that.isGoodsReturn = true;
  515. };
  516. if (that.orderInfo.shippingType == 2 && that.orderInfo.paid) that.markCode(res.data
  517. .verifyCode);
  518. if(that.orderInfo.refundStatus>0){
  519. uni.setNavigationBarColor({
  520. frontColor: '#fff',
  521. backgroundColor: '#666666'
  522. })
  523. }
  524. if(res.data.combinationId > 0 || res.data.bargainId > 0 ||res.data.seckillId > 0 ){
  525. this.againStatus = 1;
  526. }
  527. }).catch(err => {
  528. that.$util.Tips({
  529. title: err
  530. },{
  531. tab: 4,
  532. url: '/pages/user/index'
  533. });
  534. });
  535. },
  536. /**
  537. *
  538. * 生成二维码
  539. */
  540. markCode(text) {
  541. qrcodeApi({
  542. height: '145',
  543. text: text,
  544. width: '145'
  545. }).then(res => {
  546. this.codeImg = res.data.code
  547. });
  548. },
  549. /**
  550. *
  551. * 剪切订单号
  552. */
  553. // #ifndef H5
  554. copy: function() {
  555. let that = this;
  556. uni.setClipboardData({
  557. data: this.orderInfo.orderId
  558. });
  559. },
  560. // #endif
  561. /**
  562. * 打电话
  563. */
  564. goTel: function() {
  565. uni.makePhoneCall({
  566. phoneNumber: this.orderInfo.deliveryId
  567. })
  568. },
  569. /**
  570. * 设置底部按钮
  571. *
  572. */
  573. getOrderStatus: function() {
  574. let orderInfo = this.orderInfo || {},
  575. _status = orderInfo.pstatus || {
  576. type: 0
  577. },
  578. status = {};
  579. let type = parseInt(_status.type),
  580. delivery_type = orderInfo.deliveryType,
  581. seckill_id = orderInfo.seckillId ? parseInt(orderInfo.seckillId) : 0,
  582. bargain_id = orderInfo.bargainId ? parseInt(orderInfo.bargainId) : 0,
  583. combination_id = orderInfo.combinationId ? parseInt(orderInfo.combinationId) : 0;
  584. status = {
  585. type: type == 9 ? -9 : type,
  586. class_status: 0
  587. };
  588. if (type == 1 && combination_id > 0) status.class_status = 1; //查看拼团
  589. if (type == 2 && delivery_type == 'express') status.class_status = 2; //查看物流
  590. if (type == 2) status.class_status = 3; //确认收货
  591. if (type == 4 || type == 0) status.class_status = 4; //删除订单
  592. if (!seckill_id && !bargain_id && !combination_id && (type == 3 || type == 4)) status.class_status =
  593. 5; //再次购买
  594. this.$set(this, 'status', status);
  595. },
  596. /**
  597. * 去拼团详情
  598. *
  599. */
  600. goJoinPink: function() {
  601. uni.navigateTo({
  602. url: '/pages/activity/goods_combination_status/index?id=' + this.orderInfo.pinkId,
  603. });
  604. },
  605. /**
  606. * 再此购买
  607. *
  608. */
  609. goOrderConfirm: Debounce(function() {
  610. this.$Order.getPreOrder("again",[{
  611. orderNo: this.order_id
  612. }]);
  613. }),
  614. confirmOrder: Debounce(function() {
  615. let that = this;
  616. uni.showModal({
  617. title: '确认收货',
  618. content: '为保障权益,请收到货确认无误后,再确认收货',
  619. success: function(res) {
  620. if (res.confirm) {
  621. orderTake(that.id).then(res => {
  622. return that.$util.Tips({
  623. title: '操作成功',
  624. icon: 'success'
  625. }, function() {
  626. that.getOrderInfo();
  627. });
  628. }).catch(err => {
  629. return that.$util.Tips({
  630. title: err
  631. });
  632. })
  633. }
  634. }
  635. })
  636. }),
  637. /**
  638. *
  639. * 删除订单
  640. */
  641. delOrder: Debounce(function() {
  642. uni.showModal({
  643. content: '确定删除该订单',
  644. cancelText: "取消",
  645. confirmText: "确定",
  646. showCancel: true,
  647. confirmColor: '#f55850',
  648. success: (res) => {
  649. if(res.confirm) {
  650. let that = this;
  651. orderDel(this.id).then(res => {
  652. return that.$util.Tips({
  653. title: '删除成功',
  654. icon: 'success'
  655. }, {
  656. tab: 4,
  657. url: '/pages/user/index'
  658. });
  659. }).catch(err => {
  660. return that.$util.Tips({
  661. title: err
  662. });
  663. });
  664. } else {
  665. }
  666. }
  667. })
  668. }),
  669. cancelOrder:Debounce(function(){
  670. let self = this
  671. uni.showModal({
  672. title: '提示',
  673. content: '确认取消该订单?',
  674. success: function(res) {
  675. if (res.confirm) {
  676. orderCancel(self.orderInfo.id)
  677. .then((data) => {
  678. self.$util.Tips({
  679. title: '取消成功'
  680. }, {
  681. tab: 4,
  682. url: '/pages/user/index'
  683. })
  684. }).catch((err) => {
  685. self.$util.Tips({
  686. title: err
  687. })
  688. self.getDetail();
  689. });
  690. } else if (res.cancel) {
  691. console.log('用户点击取消');
  692. }
  693. }
  694. });
  695. })
  696. }
  697. }
  698. </script>
  699. <style scoped lang="scss">
  700. .qs-btn {
  701. width: auto;
  702. height: 60rpx;
  703. text-align: center;
  704. line-height: 60rpx;
  705. border-radius: 50rpx;
  706. color: #fff;
  707. font-size: 27rpx;
  708. padding: 0 3%;
  709. color: #aaa;
  710. border: 1px solid #ddd;
  711. margin-right: 20rpx;
  712. }
  713. .text-overflow{
  714. width: 300rpx;
  715. overflow: hidden;
  716. text-overflow: ellipsis;
  717. white-space: nowrap;
  718. }
  719. .shuoming{
  720. width: 32rpx;
  721. height: 32rpx;
  722. }
  723. .mp-header{
  724. width: 100%;
  725. @include main_bg_color(theme);
  726. }
  727. .goodCall {
  728. @include main_color(theme);
  729. text-align: center;
  730. width: 100%;
  731. height: 86rpx;
  732. padding: 0 30rpx;
  733. border-bottom: 1rpx solid #eee;
  734. font-size: 30rpx;
  735. line-height: 86rpx;
  736. background: #fff;
  737. .icon-kefu {
  738. font-size: 36rpx;
  739. margin-right: 15rpx;
  740. }
  741. /* #ifdef MP */
  742. button {
  743. display: flex;
  744. align-items: center;
  745. justify-content: center;
  746. height: 86rpx;
  747. font-size: 30rpx;
  748. @include main_color(theme);
  749. }
  750. /* #endif */
  751. }
  752. .justify-between {
  753. justify-content: space-between;
  754. }
  755. .align-center{
  756. align-items: center;
  757. }
  758. .order-details .header {
  759. height: 250rpx;
  760. padding: 0 30rpx;
  761. }
  762. .bg_color{
  763. @include main_bg_color(theme);
  764. }
  765. .order-details .header.on {
  766. background-color: #666 !important;
  767. }
  768. .order-details .header .pictrue {
  769. width: 110rpx;
  770. height: 110rpx;
  771. }
  772. .order-details .header .pictrue image {
  773. width: 100%;
  774. height: 100%;
  775. }
  776. .order-details .header .data {
  777. color: rgba(255, 255, 255, 0.8);
  778. font-size: 24rpx;
  779. margin-left: 27rpx;
  780. }
  781. .order-details .header .data.on {
  782. margin-left: 0;
  783. }
  784. .order-details .header .data .state {
  785. font-size: 30rpx;
  786. font-weight: bold;
  787. color: #fff;
  788. margin-bottom: 7rpx;
  789. }
  790. .order-details .header .data .time {
  791. margin-left: 20rpx;
  792. }
  793. .picTxt {
  794. height: 150rpx;
  795. }
  796. .order-details .nav {
  797. background-color: #fff;
  798. font-size: 26rpx;
  799. color: #282828;
  800. padding: 27rpx 0;
  801. width: 100%;
  802. border-radius: 14rpx;
  803. margin: -100rpx auto 0 auto;
  804. }
  805. .order-details .nav .navCon {
  806. padding: 0 40rpx;
  807. }
  808. .order-details .nav .on {
  809. @include main_color(theme);
  810. }
  811. .font_color{
  812. @include main_color(theme);
  813. }
  814. .order-details .nav .progress {
  815. padding: 0 65rpx;
  816. margin-top: 10rpx;
  817. }
  818. .order-details .nav .progress .line {
  819. width: 100rpx;
  820. height: 2rpx;
  821. background-color: #939390;
  822. }
  823. .order-details .nav .progress .iconfont {
  824. font-size: 25rpx;
  825. color: #939390;
  826. margin-top: -2rpx;
  827. }
  828. .order-details .address {
  829. font-size: 26rpx;
  830. color: #868686;
  831. background-color: #fff;
  832. margin-top: 15rpx;
  833. padding: 30rpx 24rpx;
  834. }
  835. .order-details .address .name {
  836. font-size: 30rpx;
  837. color: #282828;
  838. margin-bottom: 15rpx;
  839. }
  840. .order-details .address .name .phone {
  841. margin-left: 40rpx;
  842. }
  843. .order-details .line {
  844. width: 100%;
  845. height: 3rpx;
  846. }
  847. .order-details .line image {
  848. width: 100%;
  849. height: 100%;
  850. display: block;
  851. }
  852. .order-details .wrapper {
  853. background-color: #fff;
  854. margin-top: 12rpx;
  855. padding: 30rpx 24rpx;
  856. }
  857. .order-details .wrapper .item {
  858. font-size: 28rpx;
  859. color: #282828;
  860. }
  861. .order-details .wrapper .item~.item {
  862. margin-top: 20rpx;
  863. }
  864. .order-details .wrapper .item .conter {
  865. color: #868686;
  866. width: 470rpx;
  867. text-align: right;
  868. overflow: hidden;
  869. text-overflow: ellipsis;
  870. white-space: nowrap;
  871. }
  872. .mark_show{
  873. color: #868686;
  874. width: 470rpx;
  875. text-align: right;
  876. }
  877. .order-details .wrapper .item .conter .copy {
  878. font-size: 20rpx;
  879. color: #333;
  880. border-radius: 20rpx;
  881. border: 1rpx solid #666;
  882. padding: 3rpx 15rpx;
  883. margin-left: 24rpx;
  884. }
  885. .order-details .wrapper .actualPay {
  886. border-top: 1rpx solid #eee;
  887. margin-top: 30rpx;
  888. padding-top: 30rpx;
  889. }
  890. .order-details .wrapper .actualPay .money {
  891. font-weight: bold;
  892. font-size: 30rpx;
  893. @include price_color(theme);
  894. }
  895. .order-details .footer {
  896. width: 100%;
  897. height: 100rpx;
  898. position: fixed;
  899. bottom: 0;
  900. left: 0;
  901. background-color: #fff;
  902. padding-right: 30rpx;
  903. box-sizing: border-box;
  904. }
  905. .order-details .footer .bnt {
  906. width: 158rpx;
  907. height: 54rpx;
  908. text-align: center;
  909. line-height: 54rpx;
  910. border-radius: 50rpx;
  911. color: #fff;
  912. font-size: 27rpx;
  913. }
  914. .order-details .footer .bnt.cancel {
  915. color: #aaa;
  916. border: 1rpx solid #ddd;
  917. }
  918. .order-details .footer .bnt~.bnt {
  919. margin-left: 18rpx;
  920. }
  921. .order-details .writeOff {
  922. background-color: #fff;
  923. margin-top: 15rpx;
  924. padding-bottom: 50rpx;
  925. }
  926. .order-details .writeOff .title {
  927. font-size: 30rpx;
  928. color: #282828;
  929. height: 87rpx;
  930. border-bottom: 1px solid #f0f0f0;
  931. padding: 0 24rpx;
  932. line-height: 87rpx;
  933. }
  934. .order-details .writeOff .grayBg {
  935. background-color: #f2f5f7;
  936. width: 590rpx;
  937. height: 384rpx;
  938. border-radius: 20rpx 20rpx 0 0;
  939. margin: 50rpx auto 0 auto;
  940. padding-top: 55rpx;
  941. }
  942. .order-details .writeOff .grayBg .pictrue {
  943. width: 290rpx;
  944. height: 290rpx;
  945. margin: 0 auto;
  946. }
  947. .order-details .writeOff .grayBg .pictrue image {
  948. width: 100%;
  949. height: 100%;
  950. display: block;
  951. }
  952. .order-details .writeOff .gear {
  953. width: 590rpx;
  954. height: 30rpx;
  955. margin: 0 auto;
  956. }
  957. .order-details .writeOff .gear image {
  958. width: 100%;
  959. height: 100%;
  960. display: block;
  961. }
  962. .order-details .writeOff .num {
  963. background-color: #f0c34c;
  964. width: 590rpx;
  965. height: 84rpx;
  966. color: #282828;
  967. font-size: 48rpx;
  968. margin: 0 auto;
  969. border-radius: 0 0 20rpx 20rpx;
  970. text-align: center;
  971. padding-top: 4rpx;
  972. }
  973. .order-details .writeOff .rules {
  974. margin: 46rpx 30rpx 0 30rpx;
  975. border-top: 1px solid #f0f0f0;
  976. padding-top: 10rpx;
  977. }
  978. .order-details .writeOff .rules .item {
  979. margin-top: 20rpx;
  980. }
  981. .order-details .writeOff .rules .item .rulesTitle {
  982. font-size: 28rpx;
  983. color: #282828;
  984. }
  985. .order-details .writeOff .rules .item .rulesTitle .iconfont {
  986. font-size: 30rpx;
  987. color: #333;
  988. margin-right: 8rpx;
  989. margin-top: 5rpx;
  990. }
  991. .order-details .writeOff .rules .item .info {
  992. font-size: 28rpx;
  993. color: #999;
  994. margin-top: 7rpx;
  995. }
  996. .order-details .writeOff .rules .item .info .time {
  997. margin-left: 20rpx;
  998. }
  999. .order-details .map {
  1000. height: 86rpx;
  1001. font-size: 30rpx;
  1002. color: #282828;
  1003. line-height: 86rpx;
  1004. border-bottom: 1px solid #f0f0f0;
  1005. margin-top: 15rpx;
  1006. background-color: #fff;
  1007. padding: 0 24rpx;
  1008. }
  1009. .order-details .map .place {
  1010. font-size: 26rpx;
  1011. width: 176rpx;
  1012. height: 50rpx;
  1013. border-radius: 25rpx;
  1014. line-height: 50rpx;
  1015. text-align: center;
  1016. }
  1017. .order-details .map .place .iconfont {
  1018. font-size: 27rpx;
  1019. height: 27rpx;
  1020. line-height: 27rpx;
  1021. margin: 2rpx 3rpx 0 0;
  1022. }
  1023. .order-details .address .name .iconfont {
  1024. font-size: 34rpx;
  1025. margin-left: 10rpx;
  1026. }
  1027. .refund {
  1028. padding: 0 !important;
  1029. margin-top: 15rpx;
  1030. background-color: #fff;
  1031. .title {
  1032. display: flex;
  1033. align-items: center;
  1034. font-size: 30rpx;
  1035. color: #333;
  1036. height: 86rpx;
  1037. border-bottom: 1px solid #f5f5f5;
  1038. font-weight: 400;
  1039. padding: 0 24rpx;
  1040. image {
  1041. width: 32rpx;
  1042. height: 32rpx;
  1043. margin-right: 10rpx;
  1044. }
  1045. }
  1046. .con {
  1047. font-size: 26rpx;
  1048. color: #666666;
  1049. padding: 30rpx 24rpx;
  1050. }
  1051. }
  1052. </style>