1
0

order-detail.vue 51 KB

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