index.vue 27 KB

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