order-detail.vue 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156
  1. <template>
  2. <app-layout>
  3. <view v-if="is_show && orderDetail" class='order-detail-box'>
  4. <app-order-banner :title='orderDetail.status_text'></app-order-banner>
  5. <view>
  6. <template v-if='orderDetail.is_send == 1 && orderDetail.detailExpress.length == 1 && orderDetail.send_type != 2'>
  7. <view class='express-box'>
  8. <template v-if="orderDetail.detailExpress[0].send_type == 1">
  9. <app-order-express :pageUrl='getPageUrl' :express='orderDetail.detailExpress[0].express'
  10. :express_no='orderDetail.detailExpress[0].express_no'
  11. :merchant_remark='orderDetail.detailExpress[0].merchant_remark'>
  12. </app-order-express>
  13. </template>
  14. <template v-else>
  15. 物流信息: 其它方式({{ orderDetail.detailExpress[0].express_content }})
  16. </template>
  17. </view>
  18. </template>
  19. <template
  20. v-else-if='orderDetail.detailExpress.length > 1 || (orderDetail.is_send == 0 && orderDetail.detailExpress.length >= 1)'>
  21. <app-jump-button :url="getPageUrl">
  22. <view class='e-box dir-left-nowrap cross-center'>
  23. <view class='dir-top-nowrap box-grow-1 text'>
  24. 该订单已拆成多个包裹发货,点击查看详情
  25. </view>
  26. <image class='box-grow-0 img' src='/static/image/icon/arrow-right.png'></image>
  27. </view>
  28. </app-jump-button>
  29. </template>
  30. <view v-if="orderDetail.sign !== 'vip_card'" class="order-label">配送信息</view>
  31. <view v-if="orderDetail.sign !== 'vip_card'" class='order-list dir-top-nowrap'>
  32. <view v-if="orderDetail.send_type != 3" class='dir-left-nowrap'>
  33. <view class='box-grow-0'>联系人:</view>
  34. <view class="box-grow-1">{{ orderDetail.name }}</view>
  35. <view class='box-grow-0'>{{ orderDetail.mobile }}</view>
  36. </view>
  37. <view
  38. v-if="orderDetail.goods_type === 'ecard' || orderDetail.goods_type === 'scan_code_pay'
  39. || (orderDetail.is_send && orderDetail.is_show_send_type == 1)"
  40. >
  41. <block v-if="orderDetail.send_type == 0">发货方式:快递发货</block>
  42. <block v-if="orderDetail.send_type == 1">发货方式:上门自提</block>
  43. <block v-if="orderDetail.send_type == 2">发货方式:同城配送</block>
  44. <block v-if="orderDetail.send_type == 3">发货方式:自动发货</block>
  45. <!-- <block v-if="orderDetail.goods_type === 'ecard'">发货方式:自动发货</block>-->
  46. </view>
  47. <!-- 快递 -->
  48. <view v-if="orderDetail.send_type != 1 && orderDetail.address" class="dir-left-nowrap">
  49. <view class="box-grow-0">收货地址:</view>
  50. <view class="box-grow-1 text">{{ orderDetail.address }}</view>
  51. </view>
  52. <!-- 门店 -->
  53. <block v-if="orderDetail.send_type == 1 && orderDetail.goods_type === 'goods'">
  54. <view class="dir-left-nowrap">
  55. <view class="box-grow-0">门店名称:</view>
  56. <view class="box-grow-1 text">{{ orderDetail.store.name }}</view>
  57. </view>
  58. <view class="dir-left-nowrap">
  59. <view class="box-grow-0">联系方式:</view>
  60. <view class="box-grow-1">{{ orderDetail.store.mobile }}</view>
  61. </view>
  62. <view class="dir-left-nowrap">
  63. <view class="box-grow-0">门店地址:</view>
  64. <view class="box-grow-1 text">{{ orderDetail.store.address }}</view>
  65. </view>
  66. <view @click="navigation(orderDetail.store)"
  67. class="order-list-btn">导航
  68. </view>
  69. </block>
  70. <!-- 同城配送 -->
  71. <block v-if="orderDetail.delivery_config">
  72. <view class="dir-left-nowrap">
  73. <view class="box-grow-0">发货地址:</view>
  74. <view class="box-grow-1">{{ orderDetail.delivery_config.address.address }}</view>
  75. </view>
  76. <view class="dir-left-nowrap" v-if="orderDetail.delivery_config.contact_way">
  77. <view class="box-grow-0">联系方式:</view>
  78. <view class="box-grow-1">{{ orderDetail.delivery_config.contact_way }}</view>
  79. </view>
  80. <view class="dir-left-nowrap" v-if="orderDetail.delivery_config.explain">
  81. <view class="box-grow-0">配送说明:</view>
  82. <view class="box-grow-1">{{ orderDetail.delivery_config.explain }}</view>
  83. </view>
  84. </block>
  85. </view>
  86. <!-- 电子卡密 -->
  87. <template v-if="orderDetail.type_data && orderDetail.type_data.ecard && orderDetail.type_data.ecard.length > 0">
  88. <view style="margin:24rpx 0;">
  89. <view class="preferential-box dir-left-nowrap main-between">
  90. <view>
  91. 卡密信息
  92. </view>
  93. <view @click="go_eCard">
  94. <text>使用说明</text>
  95. <image src="/static/image/icon/arrow-right.png" class="instructions"></image>
  96. </view>
  97. </view>
  98. <view class="ecard dir-top-wrap" :style="{paddingBottom: ecard.length >= 1 ? '20rpx' : '0'}">
  99. <view class="item dir-top-nowrap" v-for="(item, key) in ecard" :key="key">
  100. <view style="margin-bottom: 10rpx;">【{{ key + 1 }}】</view>
  101. <view class="dir-left-nowrap cross-center">
  102. <view class='box-grow-1'>
  103. <view class="text" v-for="(n, d) in item" :key="d">{{ n.key }}:{{ n.value }}
  104. </view>
  105. </view>
  106. <view @click='copyTextEcard(item)' class='box-grow-0 detail-btn' size='mini'>复制全部
  107. </view>
  108. </view>
  109. </view>
  110. <view @click="ecard = orderDetail.type_data.ecard"
  111. class="expand dir-left-nowrap main-center cross-center"
  112. v-if="ecard.length === 1 && orderDetail.type_data && orderDetail.type_data.ecard && orderDetail.type_data.ecard.length > 1">
  113. <text>点击展开</text>
  114. <image src="/static/image/icon/icon-down.png"></image>
  115. </view>
  116. </view>
  117. </view>
  118. </template>
  119. <template
  120. v-if="orderDetail.send_type == 2
  121. && ((orderDetail.detailExpress.length == 1 || orderDetail.city_name)
  122. && orderDetail.is_send == 1)">
  123. <view class="order-info-box dir-top-nowrap delivery"
  124. style="margin-top: -20rpx;border-top: 1rpx solid #e2e2e2"
  125. v-if="orderDetail.send_type == 2">
  126. <view class="dir-left-nowrap cross-center city-service">
  127. <image class="head" src="/static/image/icon/deliveryman.png"></image>
  128. <template v-if="orderDetail.detailExpress[0].city_name && orderDetail.detailExpress[0].city_mobile">
  129. <view class="info-box dir-top-nowrap box-grow-1">
  130. <view class="info-label">配送员</view>
  131. <view class="info">
  132. {{
  133. orderDetail.city_name ? orderDetail.city_name : orderDetail.detailExpress[0].city_name
  134. }}
  135. {{
  136. orderDetail.city_mobile ? orderDetail.city_mobile : orderDetail.detailExpress[0].city_mobile
  137. }}
  138. </view>
  139. </view>
  140. <view class="icon-box">
  141. <app-jump-button open_type="tel"
  142. :number="orderDetail.city_mobile ? orderDetail.city_mobile : orderDetail.detailExpress[0].city_mobile">
  143. <image class="icon" src="/static/image/icon/store-tel.png"></image>
  144. </app-jump-button>
  145. </view>
  146. <!-- 第三方配送才有地图信息 -->
  147. <view v-if="orderDetail.detailExpress[0].send_type == 1" class="icon-box">
  148. <app-jump-button open_type="navigate"
  149. :url="'/pages/order/city-map/city-map?express_id=' + orderDetail.detailExpress[0].id">
  150. <image class="icon" src="/static/image/icon/shipping-address.png"></image>
  151. </app-jump-button>
  152. </view>
  153. </template>
  154. <template v-else>
  155. <view class="await-man">等待分配骑手</view>
  156. </template>
  157. </view>
  158. <block v-if="orderDetail.detailExpress[0].status != 101">
  159. <view class="dir-left-wrap">
  160. <view class="goods-image"
  161. v-for="erItem in orderDetail.detailExpress[0].expressRelation" :key="erItem.id">
  162. <app-image width="120rpx" height="120rpx"
  163. :imgSrc="erItem.orderDetail.goods_info.goods_attr.cover_pic"
  164. ></app-image>
  165. </view>
  166. </view>
  167. <view class="goods-num">共{{ orderDetail.detailExpress[0].goods_num }}件商品</view>
  168. </block>
  169. </view>
  170. </template>
  171. <!--------------订单信息---------------->
  172. <view class="order-label">订单信息</view>
  173. <view class="order-list dir-top-nowrap">
  174. <view class="dir-left-nowrap cross-center">
  175. <view class="box-grow-0">订单编号:</view>
  176. <view class="box-grow-1">{{ orderDetail.order_no }}</view>
  177. <view @click="copyText(orderDetail.order_no)"
  178. style="position: absolute;right: 24rpx"
  179. class="box-grow-0 detail-btn">复制
  180. </view>
  181. </view>
  182. <view>下单时间:{{ orderDetail.created_at }}</view>
  183. <view v-if="orderDetail.pay_type == 1">支付方式:线上支付</view>
  184. <view v-if="orderDetail.pay_type == 2">支付方式:货到付款</view>
  185. <view v-if="orderDetail.pay_type == 3">支付方式:余额支付</view>
  186. <view v-if="orderDetail.pay_type == 4">支付方式:现金</view>
  187. <view v-if="orderDetail.pay_type == 5">支付方式:pos机</view>
  188. <view v-if="orderDetail.sign == 'exchange'">兑换码:{{orderDetail.exchange_code.code}}</view>
  189. </view>
  190. <template v-if="orderDetail.sign === 'advance'">
  191. <view class="preferential-box dir-top-nowrap">
  192. <view class='dir-left-nowrap item' style="margin-bottom: 28rpx;">
  193. <text class='box-grow-1' style="font-size: 28rpx;">
  194. 商品总价:¥{{
  195. orderDetail.total_goods_original_price
  196. }},定金¥{{
  197. orderDetail.advance_order.deposit
  198. }}抵扣¥{{ orderDetail.advance_order.swell_deposit }}
  199. </text>
  200. </view>
  201. <view class="item-box">
  202. <view class="dir-left-nowrap item ">
  203. <text class='box-grow-1' style="color: #ff4544;font-size: 24rpx;">阶段一</text>
  204. </view>
  205. <view class="dir-left-nowrap item " style="margin-top: 20rpx;">
  206. <text class='box-grow-1' style="color: #666666;font-size: 28rpx;">
  207. 定金
  208. </text>
  209. <text class='box-grow-0'>¥{{ orderDetail.advance_order.deposit }}</text>
  210. </view>
  211. </view>
  212. <view class="item-box" style="margin-top:24rpx;">
  213. <view class="dir-left-nowrap item ">
  214. <text class='box-grow-1' style="color: #ff4544;font-size: 24rpx;">阶段二</text>
  215. </view>
  216. <view class="dir-left-nowrap item " style="margin-top: 20rpx;">
  217. <text class='box-grow-1' style="color: #666666;font-size: 28rpx;">
  218. 尾款
  219. </text>
  220. <text class='box-grow-0'>¥{{ orderDetail.final_price }}</text>
  221. </view>
  222. <view class="dir-left-nowrap item " style="margin-top: 20rpx;">
  223. <text class='box-grow-1' style="color: #666666;font-size: 28rpx;">
  224. 运费
  225. </text>
  226. <text class='box-grow-0'>¥{{ orderDetail.express_price }}</text>
  227. </view>
  228. <view class="dir-left-nowrap item " style="margin-top: 20rpx;"
  229. v-if="orderDetail.member_discount_price > 0">
  230. <text class='box-grow-1' style="color: #666666;font-size: 28rpx;">
  231. 会员折扣
  232. </text>
  233. <text class='box-grow-0'>-¥{{ orderDetail.member_discount_price }}</text>
  234. </view>
  235. <view class="dir-left-nowrap item " style="margin-top: 20rpx;"
  236. v-if="orderDetail.integral_deduction_price > 0">
  237. <text class='box-grow-1' style="color: #666666;font-size: 28rpx;">
  238. 积分抵扣
  239. </text>
  240. <text class='box-grow-0'>-¥{{ orderDetail.integral_deduction_price }}</text>
  241. </view>
  242. <view class="dir-left-nowrap item " style="margin-top: 20rpx;"
  243. v-if="orderDetail.coupon_discount_price > 0">
  244. <text class='box-grow-1' style="color: #666666;font-size: 28rpx;">
  245. 优惠券抵扣
  246. </text>
  247. <text class='box-grow-0'>-¥{{ orderDetail.coupon_discount_price }}</text>
  248. </view>
  249. <view class="dir-left-nowrap item " style="margin-top: 20rpx;"
  250. v-if="orderDetail.advance_order.preferential_price > 0">
  251. <text class='box-grow-1' style="color: #666666;font-size: 28rpx;">
  252. 活动优惠
  253. </text>
  254. <text class='box-grow-0'>-¥{{ orderDetail.advance_order.preferential_price }}</text>
  255. </view>
  256. <view class="dir-left-nowrap item " style="margin-top: 20rpx;"
  257. v-if="orderDetail.plugin_data.discount_list.vip_discount">
  258. <text class='box-grow-1' style="color: #666666;font-size: 28rpx;">
  259. {{orderDetail.plugin_data.discount_list.vip_discount.label}}
  260. </text>
  261. <text class='box-grow-0'>-¥{{ orderDetail.plugin_data.discount_list.vip_discount.value }}</text>
  262. </view>
  263. </view>
  264. <view class="dir-left-nowrap item main-right" style="margin:28rpx 0 ;">
  265. 合计:
  266. <span>
  267. <text v-if="orderDetail.plugin_data.exchange_count"
  268. class='price'>{{
  269. orderDetail.plugin_data.exchange_count
  270. }}{{ orderDetail.plugin_data.price_name }}+</text>
  271. <text class='box-grow-0'
  272. style="font-size: 28rpx;">¥{{ orderDetail.total_pay_price }}</text>
  273. </span>
  274. </view>
  275. </view>
  276. </template>
  277. <!-- ----------------退款状态--------- -->
  278. <view v-if="orderDetail.words!=''">
  279. <view class='order-label'>退款进度</view>
  280. <view class='order-list dir-top-nowrap'>
  281. <view v-if="orderDetail.status_text==='待发货'" class='dir-left-nowrap item'>
  282. <view class='box-grow-0'>拒绝原因:</view>
  283. <view class='box-grow-1 becu'>{{ orderDetail.words }}</view>
  284. </view>
  285. <view v-else class='dir-left-nowrap item'>
  286. <view class='box-grow-0'>退款进度:</view>
  287. <view class='box-grow-1 becu'>{{ orderDetail.words }}</view>
  288. </view>
  289. </view>
  290. </view>
  291. <!------------商品信息------------------>
  292. <view class="order-label">商品信息</view>
  293. <view class='preferential-box dir-top-wrap' v-if="orderDetail.sign !== 'advance'">
  294. <view v-if="orderDetail.plugin_data.exchange_count == null" class='dir-left-nowrap item'>
  295. <view class='box-grow-1'>商品总价</view>
  296. <view class='box-grow-0'>¥{{ orderDetail.total_goods_original_price }}</view>
  297. </view>
  298. <view v-if="orderDetail.plugin_data.exchange_count" class='dir-left-nowrap item'>
  299. <view class='box-grow-1'>兑换{{ orderDetail.plugin_data.price_name }}</view>
  300. <view class='box-grow-0'>{{ orderDetail.plugin_data.exchange_count }}</view>
  301. </view>
  302. <view v-if="orderDetail.plugin_data.exchange_count >= 0" class='dir-left-nowrap item'>
  303. <view class='box-grow-1'>兑换金额</view>
  304. <view class='box-grow-0'>¥{{ orderDetail.total_goods_original_price }}</view>
  305. </view>
  306. <view class='dir-left-nowrap item' v-if="orderDetail.sign !== 'advance' && orderDetail.goods_type === 'goods'">
  307. <view class='box-grow-1'>运费</view>
  308. <view class='box-grow-0'>¥{{ orderDetail.express_price }}</view>
  309. </view>
  310. <view class='dir-left-nowrap item'
  311. v-if="orderDetail.total_sku_tax_amount*1 > 0">
  312. <view class='box-grow-1'>综合税费</view>
  313. <view class='box-grow-0'>¥{{ orderDetail.total_sku_tax_amount }}</view>
  314. </view>
  315. <view v-if="orderDetail.member_deduction_price_count > 0 && sign !== 'advance'"
  316. class='dir-left-nowrap item'>
  317. <view class='box-grow-1'>会员折扣</view>
  318. <view class='box-grow-0'>-¥{{ orderDetail.member_deduction_price_count }}</view>
  319. </view>
  320. <view v-if='orderDetail.integral_deduction_price > 0' class='dir-left-nowrap item'>
  321. <view class='box-grow-1'>积分抵扣</view>
  322. <view class='box-grow-0'>-¥{{ orderDetail.integral_deduction_price }}</view>
  323. </view>
  324. <view v-if='orderDetail.coupon_discount_price > 0' class='dir-left-nowrap item'>
  325. <view class='box-grow-1'>优惠券抵扣</view>
  326. <view class='box-grow-0'>-¥{{ orderDetail.coupon_discount_price }}</view>
  327. </view>
  328. <!-- 插件额外优惠 -->
  329. <view v-if="orderDetail.plugin_data && orderDetail.plugin_data.discount_list && sign !== 'advance'">
  330. <view v-for='item in orderDetail.plugin_data.discount_list' :key="item.id"
  331. class='dir-left-nowrap item'>
  332. <view class='box-grow-1'>{{ item.label }}</view>
  333. <view class='box-grow-0' v-if="item.value > 0">-¥{{ item.value }}</view>
  334. <view class='box-grow-0' v-if="item.value < 0">+¥{{ -item.value }}</view>
  335. </view>
  336. </view>
  337. <view v-if="orderDetail.full_reduce_price > 0 && sign !== 'advance'" class='dir-left-nowrap item'>
  338. <view class='box-grow-1'>满减优惠</view>
  339. <view class='box-grow-0'>-¥{{orderDetail.full_reduce_price}}</view>
  340. </view>
  341. <view v-if="orderDetail.back_price > 0" class='dir-left-nowrap item'>
  342. <view class='box-grow-1'>订单改价</view>
  343. <view class='box-grow-0' v-if="orderDetail.back_price > 0">-¥{{ orderDetail.back_price }}</view>
  344. <view class='box-grow-0' v-if="orderDetail.back_price < 0">+¥{{ -orderDetail.back_price }}</view>
  345. </view>
  346. <view v-if="orderDetail.remark && orderDetail.goods_type === 'goods'" class='dir-top-nowrap item'>
  347. <view class='box-grow-1'>买家留言:</view>
  348. <view style="word-break: break-all" class='box-grow-0 t-extra-small-color'>{{
  349. orderDetail.remark
  350. }}
  351. </view>
  352. </view>
  353. </view>
  354. <view class='order-price-box cross-center dir-right-nowrap' v-if="orderDetail.sign !== 'advance'">
  355. <view>
  356. 合计:
  357. <span>
  358. <text v-if="orderDetail.plugin_data.exchange_count"
  359. class='price'>{{
  360. orderDetail.plugin_data.exchange_count
  361. }}{{ orderDetail.plugin_data.price_name }}+</text>
  362. <text class='price'>¥{{ orderDetail.total_pay_price }}</text>
  363. </span>
  364. </view>
  365. </view>
  366. <!--------------商品信息 end 商品列表---------------->
  367. <view v-if="orderDetail.platform" class="order-label"
  368. style="font-weight: normal;border-top: 1rpx solid #E2E2E2;padding: 30rpx 24rpx">
  369. {{ orderDetail.platform }}
  370. </view>
  371. <view class='goods-box composition' v-if="sign == 'composition'">
  372. <view class="composition-item" v-for='(list, idx) in orderDetail.composition_list' :key='idx'>
  373. <view class="main-between composition-title">
  374. <view class="composition-type" v-if="list.type == 1">固定套餐</view>
  375. <view class="composition-type" v-else>搭配套餐</view>
  376. <view>套餐总价 ¥{{ list.total_price }}</view>
  377. </view>
  378. <view class="goods-list" v-for='(item, index) in list.goods_list' :key='index'>
  379. <app-order-goods-info :plugin="list.type == 2 ?sign : ''" v-if="list.show || index == 0"
  380. :type="2"
  381. style="width:100%;" :goods='item'
  382. :plugin-data="orderDetail.plugin_data"
  383. :plugin-index="index"></app-order-goods-info>
  384. <block v-if='orderDetail.is_send == 1 && (list.show || index == 0)'>
  385. <view class='dir-left-nowrap sale-box'>
  386. <view class='box-grow-1'></view>
  387. <view class='box-grow-0 dir-top-nowrap'>
  388. <!-- 无售后记录 且 未超过售后时间 才可申请售后 -->
  389. <block
  390. v-if="orderDetail.detail[index].is_show_apply_refund && orderDetail.goods_type !== 'ecard'">
  391. <app-jump-button
  392. :url="`/pages/order/refund/select-refund-type?id=${orderDetail.detail[index].id}&sign=${orderDetail.sign}`">
  393. <view size='mini' class='sale-server detail-btn'>申请售后</view>
  394. </app-jump-button>
  395. </block>
  396. <block v-else-if="orderDetail.detail[index].refund">
  397. <text class='refund-status'>
  398. 已申请售后({{ orderDetail.detail[index].refund.status_text }})
  399. </text>
  400. </block>
  401. </view>
  402. </view>
  403. </block>
  404. </view>
  405. <view class="composition-open main-center">
  406. <view @click="toggle(idx)" class="composition-btn">
  407. <text>{{ list.show ? '点击收起套餐详情' : '点击展开套餐详情' }}</text>
  408. <image v-if="!list.show" src="/static/image/icon/icon-down.png"></image>
  409. <image v-else src="/static/image/icon/icon-up.png"></image>
  410. </view>
  411. </view>
  412. </view>
  413. </view>
  414. <view class='goods-box' v-else>
  415. <view v-for='(item, index) in orderDetail.detail' :key='index'>
  416. <app-jump-button :url="item.goods_info.page_url">
  417. <app-order-goods-info style="width:100%;" :goods='item.goods_info'
  418. :type="2"
  419. :plugin-data="orderDetail.plugin_data"
  420. :plugin-index="index"></app-order-goods-info>
  421. </app-jump-button>
  422. <block v-if='orderDetail.is_send == 1'>
  423. <view class='dir-left-nowrap sale-box'>
  424. <view class='box-grow-1'></view>
  425. <view class='box-grow-0 dir-top-nowrap'>
  426. <!-- 无售后记录 且 未超过售后时间 才可申请售后 -->
  427. <block v-if="item.is_show_apply_refund && orderDetail.goods_type !== 'ecard'">
  428. <app-jump-button
  429. :url="`/pages/order/refund/select-refund-type?id=${item.id}&sign=${orderDetail.sign}`">
  430. <view size='mini' class='sale-server detail-btn'>申请售后</view>
  431. </app-jump-button>
  432. </block>
  433. <block v-else-if="item.refund">
  434. <text class='refund-status'>已申请售后({{ item.refund.status_text }})</text>
  435. </block>
  436. </view>
  437. </view>
  438. </block>
  439. </view>
  440. </view>
  441. <!-------------其他信息----------------->
  442. <block v-if="(orderDetail.sign === 'booking' || orderDetail.sign === 'vip_card') && orderDetail.order_form && orderDetail.order_form.length ">
  443. <view class="order-label">其他信息</view>
  444. <view class="order-form order-list">
  445. <view v-for="(formItem, k) in orderDetail.order_form" :key="k" class="order-form-box">
  446. <view v-if="formItem.key === 'img_upload'" class="dir-top-nowrap">
  447. <view class="box-grow-0">{{ formItem.label }}:</view>
  448. <view class="dir-left-wrap">
  449. <block v-if="Array.isArray(formItem.value)">
  450. <image v-for="(img, l) in formItem.value"
  451. :key="l"
  452. v-if="img"
  453. @click="look(img)"
  454. :src="img"
  455. style="margin-right:16rpx;margin-bottom:16rpx"
  456. ></image>
  457. </block>
  458. <image v-else-if="formItem.value"
  459. @click="look(formItem.value)"
  460. :src="formItem.value"
  461. ></image>
  462. </view>
  463. </view>
  464. <view v-else class="dir-left-nowrap">
  465. <view class="box-grow-0">{{ formItem.label ? formItem.label : formItem.key_name }}:</view>
  466. <view class="box-grow-1 text">{{ formItem.value ? formItem.value : '' }}</view>
  467. </view>
  468. </view>
  469. </view>
  470. </block>
  471. <block v-else-if="orderDetail.sign !== 'teller' && formList && formList.length">
  472. <view class="order-label">其他信息</view>
  473. <view v-for="(formAll, i) in formList" :key="i" class="order-form order-list">
  474. <app-order-goods-info v-if="isShowFormGoods"
  475. v-for="(goods,j) in formAll"
  476. :key="j"
  477. style="width:100%;"
  478. :goods='goods.goods_info'
  479. :plugin-data="orderDetail.plugin_data"
  480. :plugin-index="i"
  481. ></app-order-goods-info>
  482. <view v-for="(formItem, k) in formAll[0]['form_data']" :key="k" class="order-form-box">
  483. <view v-if="formItem.key === 'img_upload'" class="dir-top-nowrap">
  484. <view class="box-grow-0">{{ formItem.label }}:</view>
  485. <view class="dir-left-wrap">
  486. <block v-if="Array.isArray(formItem.value)">
  487. <image v-for="(img, l) in formItem.value"
  488. :key="l"
  489. v-if="img"
  490. @click="look(img)"
  491. :src="img"
  492. style="margin-right:16rpx;margin-bottom:16rpx"
  493. ></image>
  494. </block>
  495. <image v-else-if="formItem.value"
  496. @click="look(formItem.value)"
  497. :src="formItem.value"
  498. ></image>
  499. </view>
  500. </view>
  501. <view v-else class="dir-left-nowrap">
  502. <view class="box-grow-0">{{ formItem.label }}:</view>
  503. <view class="box-grow-1 text">{{ formItem.value ? formItem.value : '' }}</view>
  504. </view>
  505. </view>
  506. </view>
  507. </block>
  508. <block v-if="(orderDetail.is_pay == 1 || orderDetail.pay_type == 2)
  509. && orderDetail.is_send == 0
  510. && orderDetail.status == 1
  511. && orderDetail.detailExpressRelation.length == 0
  512. && orderDetail.cancel_status != 1">
  513. <view v-if="orderDetail.sign !='gift'" class='action-box dir-left-nowrap main-right'>
  514. <view @click='cancel(orderDetail)' class='box-grow-0 btn'>申请退款</view>
  515. </view>
  516. </block>
  517. </view>
  518. </view>
  519. </app-layout>
  520. </template>
  521. <script>
  522. import appOrderGoodsInfo from "../../../components/page-component/app-order-goods-info/app-order-goods-info.vue";
  523. import appOrderExpress from "../../../components/page-component/app-order-express/app-order-express.vue";
  524. import appOrderBanner from "../../../components/page-component/app-order-banner/app-order-banner.vue";
  525. export default {
  526. components: {
  527. "app-order-goods-info": appOrderGoodsInfo,
  528. "app-order-express": appOrderExpress,
  529. "app-order-banner": appOrderBanner,
  530. },
  531. data() {
  532. return {
  533. order_id: null,
  534. orderDetail: {
  535. detailExpressRelation: [],
  536. detailExpress: [],
  537. },
  538. is_show: false,
  539. advance_order: {
  540. goods_num: 0
  541. },
  542. detail: [],
  543. sign: '',
  544. ecard: [],
  545. isShowFormGoods: false,
  546. }
  547. },
  548. computed: {
  549. formList() {
  550. const self = this;
  551. let orderDetail = self.orderDetail.detail;
  552. let newArr = {};
  553. let form_ids = [];
  554. if (orderDetail && orderDetail.length) {
  555. for (let goods of orderDetail) {
  556. if (goods.form_id == '0') {
  557. continue;
  558. }
  559. if (form_ids.indexOf(goods.form_id) === -1) {
  560. form_ids.push(goods.form_id);
  561. newArr[goods.form_id] = [goods];
  562. } else {
  563. newArr[goods.form_id].push(goods);
  564. }
  565. }
  566. }
  567. self.isShowFormGoods = form_ids.length > 1;
  568. return Object.values(newArr);
  569. },
  570. getPageUrl() {
  571. let orderDetail = this.orderDetail;
  572. if (orderDetail.is_send == 1 && orderDetail.detailExpress.length == 0) {
  573. let coverPic = '';
  574. orderDetail.detail.forEach(function (item, index) {
  575. if (index === 0) {
  576. coverPic = item.goods_info.pic_url;
  577. }
  578. });
  579. return `/pages/order/express-detail/express-detail?express=${orderDetail.express}&customer_name=${orderDetail.customer_name}&express_no=${orderDetail.express_no}&cover_pic=${coverPic}`
  580. } else if (orderDetail.is_send == 1 && orderDetail.detailExpress.length == 1) {
  581. let express = orderDetail.detailExpress[0].express;
  582. let express_no = orderDetail.detailExpress[0].express_no;
  583. let customer_name = orderDetail.detailExpress[0].customer_name;
  584. let cover_pic = orderDetail.detailExpress[0].expressRelation[0].orderDetail.goods_info.goods_attr.cover_pic;
  585. return `/pages/order/express-detail/express-detail?express=` + express + `&customer_name=` + customer_name + `&express_no=` + express_no + `&cover_pic=` + cover_pic
  586. } else if (orderDetail.detailExpress.length >= 1) {
  587. return '/pages/order/express-list/express-list?order_id=' + orderDetail.id;
  588. }
  589. }
  590. },
  591. methods: {
  592. look(e) {
  593. uni.previewImage({
  594. current: e, // 当前显示图片的http链接
  595. urls: [e] // 需要预览的图片http链接列表
  596. })
  597. },
  598. toggle(index) {
  599. this.orderDetail.composition_list[index].show = !this.orderDetail.composition_list[index].show;
  600. this.$forceUpdate();
  601. },
  602. getOrderDetail() {
  603. let self = this;
  604. self.$showLoading();
  605. self.$request({
  606. url: self.$api.order.detail,
  607. data: {
  608. id: self.order_id,
  609. }
  610. }).then(response => {
  611. self.$hideLoading();
  612. self.is_show = true;
  613. if (response.code == 0) {
  614. self.orderDetail = response.data.detail;
  615. self.ecard = [self.orderDetail.type_data.ecard[0]];
  616. if (self.sign == 'composition') {
  617. for (let i in self.orderDetail.composition_list) {
  618. self.orderDetail.composition_list[i].show = false;
  619. }
  620. }
  621. } else {
  622. uni.showModal({
  623. title: '',
  624. content: response.msg,
  625. showCancel: false,
  626. });
  627. }
  628. }).catch(() => {
  629. self.$hideLoading();
  630. });
  631. },
  632. copyText(orderNo) {
  633. this.$utils.uniCopy({
  634. data: orderNo,
  635. success: function () {
  636. uni.showToast({
  637. title: '复制成功',
  638. icon: 'none',
  639. })
  640. }
  641. });
  642. },
  643. copyTextEcard(item) {
  644. let str = ``;
  645. for (let i = 0; i < item.length; i++) {
  646. str += `${item[i].key}:${item[i].value}\n`
  647. }
  648. this.$utils.uniCopy({
  649. data: str,
  650. success: function () {
  651. uni.showToast({
  652. title: '复制成功',
  653. icon: 'none',
  654. })
  655. }
  656. });
  657. },
  658. navigation(store) {
  659. uni.openLocation({
  660. latitude: parseFloat(store.latitude),
  661. longitude: parseFloat(store.longitude),
  662. name: store.name,
  663. address: store.address,
  664. })
  665. },
  666. // 取消 | 申请退款
  667. cancel(e) {
  668. let self = this;
  669. uni.navigateTo({
  670. url: '/pages/order/refund/order-refund?id=' + e.id
  671. });
  672. },
  673. cancelAction(e) {
  674. let self = this;
  675. uni.showLoading({title: '取消中'});
  676. self.$request({
  677. url: self.$api.order.cancel,
  678. data: {
  679. id: e.id
  680. }
  681. }).then(response => {
  682. uni.hideLoading();
  683. if (response.code === 0) {
  684. if (self.sign === 'advance') {
  685. self.$request({
  686. url: self.$api.advance.order_detail,
  687. method: 'get',
  688. data: {
  689. id: self.order_id,
  690. }
  691. }).then(response => {
  692. self.is_show = true;
  693. if (response.code === 0) {
  694. self.orderDetail = response.data.detail;
  695. } else {
  696. uni.showModal({
  697. title: '',
  698. content: response.msg,
  699. showCancel: false,
  700. });
  701. }
  702. })
  703. } else {
  704. self.getOrderDetail();
  705. }
  706. } else {
  707. uni.showModal({
  708. title: '',
  709. content: response.msg,
  710. showCancel: false,
  711. });
  712. }
  713. }).catch(() => {
  714. uni.hideLoading();
  715. });
  716. },
  717. mobile: function () {
  718. uni.makePhoneCall({
  719. phoneNumber: this.orderDetail.city.mobile,
  720. })
  721. },
  722. // 电子卡密使用说明
  723. go_eCard() {
  724. uni.navigateTo({
  725. url: `/pages/rules/index?url=${encodeURIComponent(this.$api.ecard.index)}&key=content&data=${JSON.stringify({
  726. order_id: this.orderDetail.id
  727. })}`,
  728. });
  729. }
  730. },
  731. onLoad(options) { this.$commonLoad.onload(options);
  732. this.order_id = options.id;
  733. this.sign = options.sign;
  734. },
  735. onShow() {
  736. let self = this;
  737. let interval = setInterval(function () {
  738. if (self.sign === 'advance') {
  739. self.$request({
  740. url: self.$api.advance.order_detail,
  741. method: 'get',
  742. data: {
  743. id: self.order_id,
  744. }
  745. }).then(response => {
  746. self.is_show = true;
  747. if (response.code === 0) {
  748. self.orderDetail = response.data.detail;
  749. } else {
  750. uni.showModal({
  751. title: '',
  752. content: response.msg,
  753. showCancel: false,
  754. });
  755. }
  756. })
  757. } else {
  758. self.getOrderDetail();
  759. }
  760. clearInterval(interval);
  761. }, 300);
  762. }
  763. }
  764. </script>
  765. <style scoped lang="scss">
  766. .order-detail-box {
  767. font-size: $uni-font-size-general-one;
  768. color: $uni-general-color-one;
  769. position: relative;
  770. width: 100%;
  771. height: 100%;
  772. }
  773. .order-label {
  774. padding: #{32rpx} #{24rpx};
  775. font-size: #{30rpx};
  776. color: #353535;
  777. font-weight: bold;
  778. background: #FFFFFF;
  779. border-bottom: #{1rpx} solid #e2e2e2;
  780. }
  781. .goods-image {
  782. margin-right: #{20rpx};
  783. margin-bottom: #{20rpx};
  784. }
  785. .goods-num {
  786. font-size: #{24rpx};
  787. color: #999999;
  788. margin: #{20rpx} 0;
  789. }
  790. .order-form {
  791. background: #FFFFFF;
  792. .order-form-box {
  793. padding: #{5rpx} 0;
  794. span {
  795. }
  796. image {
  797. height: #{174rpx};
  798. width: #{174rpx};
  799. display: block;
  800. margin-top: #{15rpx};
  801. }
  802. }
  803. }
  804. .order-list {
  805. background: #FFFFFF;
  806. padding: #{32rpx} #{24rpx};
  807. margin-bottom: #{20rpx};
  808. > view {
  809. margin-bottom: #{10rpx};
  810. }
  811. .text {
  812. word-wrap: break-word;
  813. }
  814. > view:last-child {
  815. margin-bottom: 0;
  816. }
  817. .order-list-btn {
  818. border: 1#{rpx} solid #bbbbbb;
  819. border-radius: 30#{rpx};
  820. padding: 10#{rpx} 30#{rpx};
  821. display: inline-block;
  822. margin-left: calc(100vw - #{170rpx});
  823. }
  824. }
  825. .order-form:last-child {
  826. border-bottom: none;
  827. }
  828. .express-box {
  829. background: #fff;
  830. padding: 32#{rpx} 24#{rpx};
  831. margin-bottom: 20#{rpx};
  832. }
  833. .address-box {
  834. background: #fff;
  835. padding: 32#{rpx} 24#{rpx};
  836. margin-bottom: 20#{rpx};
  837. .address {
  838. word-wrap: break-word;
  839. }
  840. }
  841. .address-box .text {
  842. margin-top: 10#{rpx};
  843. }
  844. .delivery {
  845. .deliveryman {
  846. width: #{72rpx};
  847. height: #{72rpx};
  848. display: block;
  849. margin-right: #{24rpx};
  850. }
  851. .delivery-tips {
  852. font-size: $uni-font-size-weak-one;
  853. color: $uni-general-color-two;
  854. margin-bottom: #{16rpx};
  855. }
  856. .mr-16 {
  857. margin-right: #{16rpx};
  858. }
  859. .delivery-mobile {
  860. width: #{96rpx};
  861. border-left: #{1rpx} solid #e2e2e2;
  862. .mobile {
  863. width: #{40rpx};
  864. height: #{40rpx};
  865. display: block;
  866. margin-right: #{16rpx};
  867. }
  868. }
  869. .content {
  870. width: #{500rpx};
  871. }
  872. }
  873. .order-info-box {
  874. background: #fff;
  875. padding: 32#{rpx} 24#{rpx};
  876. margin-bottom: 20#{rpx};
  877. }
  878. .store-info-box {
  879. background: #fff;
  880. padding: 32#{rpx} 24#{rpx};
  881. margin-bottom: 20#{rpx};
  882. }
  883. .preferential-box {
  884. background: #fff;
  885. padding: 32#{rpx} 24#{rpx};
  886. border-bottom: 1#{rpx} solid $uni-weak-color-one;
  887. }
  888. .preferential-box .item {
  889. margin: 5#{rpx} 0;
  890. }
  891. .order-price-box {
  892. height: 100#{rpx};
  893. background: #fff;
  894. padding: 32#{rpx} 24#{rpx};
  895. //margin-bottom: 20#{rpx};
  896. }
  897. .goods-box {
  898. background: #fff;
  899. padding: 32#{rpx} 24#{rpx};
  900. margin-bottom: 20#{rpx};
  901. &.composition {
  902. padding: 0;
  903. padding-bottom: #{8rpx};
  904. margin-bottom: 0;
  905. background-color: #f7f7f7;
  906. }
  907. .composition-item {
  908. margin-bottom: #{20rpx};
  909. background-color: #fff;
  910. .composition-open {
  911. text-align: center;
  912. background-color: #fff;
  913. height: #{84rpx};
  914. .composition-btn {
  915. display: inline-block;
  916. border: #{2rpx} solid #bbbbbb;
  917. font-size: #{24rpx};
  918. color: #999999;
  919. padding: 0 #{24rpx};
  920. margin: #{12rpx} 0 #{16rpx};
  921. height: #{56rpx};
  922. line-height: #{54rpx};
  923. border-radius: #{28rpx};
  924. image {
  925. width: #{22rpx};
  926. height: #{12rpx};
  927. margin-left: #{16rpx};
  928. }
  929. }
  930. }
  931. .goods-list {
  932. padding: 0 #{24rpx};
  933. }
  934. .composition-title {
  935. height: #{80rpx};
  936. line-height: #{80rpx};
  937. padding: 0 #{24rpx};
  938. font-size: #{28rpx};
  939. color: #353535;
  940. margin-bottom: #{24rpx};
  941. border-bottom: #{2rpx} solid #e2e2e2;
  942. .composition-type {
  943. color: #f39800;
  944. }
  945. }
  946. }
  947. }
  948. .goods-box .sale-server {
  949. margin-top: 20#{rpx};
  950. }
  951. .goods-box .sale-box {
  952. padding-bottom: 15#{rpx};
  953. }
  954. .goods-box .refund-status {
  955. margin-top: 15#{rpx};
  956. color: $uni-important-color-black;
  957. }
  958. .action-box {
  959. background: #fff;
  960. padding: 32#{rpx} 24#{rpx};
  961. .cancel-text {
  962. font-size: $uni-font-size-import-two;
  963. }
  964. .btn {
  965. border: 1#{rpx} solid #bbbbbb;
  966. border-radius: 30#{rpx};
  967. padding: 10#{rpx} 30#{rpx};
  968. }
  969. }
  970. .detail-btn {
  971. border: 1#{rpx} solid #bbbbbb;
  972. border-radius: 30#{rpx};
  973. padding: 10#{rpx} 30#{rpx};
  974. }
  975. .e-box {
  976. width: 100%;
  977. height: #{100rpx};
  978. padding: 0 #{24rpx};
  979. background: #ffffff;
  980. margin-bottom: #{20rpx};
  981. .img {
  982. width: 12#{rpx};
  983. height: 24#{rpx};
  984. }
  985. .express-name {
  986. margin-bottom: 15#{rpx};
  987. }
  988. .text {
  989. color: #353535;
  990. font-size: #{28rpx};
  991. }
  992. }
  993. .advance {
  994. width: #{702rpx};
  995. border-radius: #{16rpx};
  996. background-color: #f7f7f7;
  997. padding: #{32rpx 24rpx};
  998. .title {
  999. font-size: #{24rpx};
  1000. color: #ff4544;
  1001. margin-bottom: #{15rpx};
  1002. }
  1003. }
  1004. .item-box {
  1005. border: #{1rpx} solid #c2c2c2;
  1006. padding: #{24rpx};
  1007. border-radius: #{16rpx};
  1008. width: #{702rpx};
  1009. }
  1010. .ecard {
  1011. background-color: #ffffff;
  1012. .item {
  1013. padding: #{32upx 24upx 0 24upx};
  1014. .text {
  1015. font-size: #{23upx};
  1016. line-height: 1.5;
  1017. padding-left: #{15upx};
  1018. word-break: break-all;
  1019. }
  1020. }
  1021. .expand {
  1022. height: #{70upx};
  1023. margin-top: #{20upx};
  1024. border-top: #{1upx} solid #e2e2e2;
  1025. > image {
  1026. width: #{20upx};
  1027. height: #{12upx};
  1028. }
  1029. > text {
  1030. font-size: #{23upx};
  1031. color: #919191;
  1032. }
  1033. }
  1034. }
  1035. .instructions {
  1036. width: #{12upx};
  1037. height: #{22upx};
  1038. margin-left: #{18upx};
  1039. }
  1040. .ecard-info {
  1041. height: #{90upx};
  1042. line-height: #{90upx};
  1043. background-color: #ffffff;
  1044. padding: #{0 22upx};
  1045. margin-bottom: #{13upx};
  1046. }
  1047. .city-service {
  1048. width: 100%;
  1049. margin-bottom: 10#{rpx};
  1050. .await-man {
  1051. margin-left: #{12rpx};
  1052. font-size: #{28rpx};
  1053. color:#666666;
  1054. }
  1055. .info-box {
  1056. margin-left: #{12rpx};
  1057. .info-label {
  1058. margin-bottom: #{10rpx};
  1059. color: #999999;
  1060. font-size: #{28rpx};
  1061. }
  1062. }
  1063. .head {
  1064. width: #{75rpx};
  1065. height: #{75rpx};
  1066. }
  1067. .icon-box {
  1068. padding: 0 #{30rpx};
  1069. border-left: #{1rpx} solid #f7f7f7;
  1070. .icon {
  1071. width: #{45rpx};
  1072. height: #{45rpx};
  1073. }
  1074. }
  1075. }
  1076. </style>