order-detail.vue 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136
  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 class="order-label">商品信息</view>
  279. <view class='preferential-box dir-top-wrap' v-if="orderDetail.sign !== 'advance'">
  280. <view v-if="orderDetail.plugin_data.exchange_count == null" class='dir-left-nowrap item'>
  281. <view class='box-grow-1'>商品总价</view>
  282. <view class='box-grow-0'>¥{{ orderDetail.total_goods_original_price }}</view>
  283. </view>
  284. <view v-if="orderDetail.plugin_data.exchange_count" class='dir-left-nowrap item'>
  285. <view class='box-grow-1'>兑换{{ orderDetail.plugin_data.price_name }}</view>
  286. <view class='box-grow-0'>{{ orderDetail.plugin_data.exchange_count }}</view>
  287. </view>
  288. <view v-if="orderDetail.plugin_data.exchange_count >= 0" class='dir-left-nowrap item'>
  289. <view class='box-grow-1'>兑换金额</view>
  290. <view class='box-grow-0'>¥{{ orderDetail.total_goods_original_price }}</view>
  291. </view>
  292. <view class='dir-left-nowrap item' v-if="orderDetail.sign !== 'advance' && orderDetail.goods_type === 'goods'">
  293. <view class='box-grow-1'>运费</view>
  294. <view class='box-grow-0'>¥{{ orderDetail.express_price }}</view>
  295. </view>
  296. <view v-if="orderDetail.member_deduction_price_count > 0 && sign !== 'advance'"
  297. class='dir-left-nowrap item'>
  298. <view class='box-grow-1'>会员折扣</view>
  299. <view class='box-grow-0'>-¥{{ orderDetail.member_deduction_price_count }}</view>
  300. </view>
  301. <view v-if='orderDetail.integral_deduction_price > 0' class='dir-left-nowrap item'>
  302. <view class='box-grow-1'>积分抵扣</view>
  303. <view class='box-grow-0'>-¥{{ orderDetail.integral_deduction_price }}</view>
  304. </view>
  305. <view v-if='orderDetail.coupon_discount_price > 0' class='dir-left-nowrap item'>
  306. <view class='box-grow-1'>优惠券抵扣</view>
  307. <view class='box-grow-0'>-¥{{ orderDetail.coupon_discount_price }}</view>
  308. </view>
  309. <!-- 插件额外优惠 -->
  310. <view v-if="orderDetail.plugin_data && orderDetail.plugin_data.discount_list && sign !== 'advance'">
  311. <view v-for='item in orderDetail.plugin_data.discount_list' :key="item.id"
  312. class='dir-left-nowrap item'>
  313. <view class='box-grow-1'>{{ item.label }}</view>
  314. <view class='box-grow-0' v-if="item.value > 0">-¥{{ item.value }}</view>
  315. <view class='box-grow-0' v-if="item.value < 0">+¥{{ -item.value }}</view>
  316. </view>
  317. </view>
  318. <view v-if="orderDetail.full_reduce_price > 0 && sign !== 'advance'" class='dir-left-nowrap item'>
  319. <view class='box-grow-1'>满减优惠</view>
  320. <view class='box-grow-0'>-¥{{orderDetail.full_reduce_price}}</view>
  321. </view>
  322. <view v-if="orderDetail.back_price > 0" class='dir-left-nowrap item'>
  323. <view class='box-grow-1'>订单改价</view>
  324. <view class='box-grow-0' v-if="orderDetail.back_price > 0">-¥{{ orderDetail.back_price }}</view>
  325. <view class='box-grow-0' v-if="orderDetail.back_price < 0">+¥{{ -orderDetail.back_price }}</view>
  326. </view>
  327. <view v-if="orderDetail.remark && orderDetail.goods_type === 'goods'" class='dir-top-nowrap item'>
  328. <view class='box-grow-1'>买家留言:</view>
  329. <view style="word-break: break-all" class='box-grow-0 t-extra-small-color'>{{
  330. orderDetail.remark
  331. }}
  332. </view>
  333. </view>
  334. </view>
  335. <view class='order-price-box cross-center dir-right-nowrap' v-if="orderDetail.sign !== 'advance'">
  336. <view>
  337. 合计:
  338. <span>
  339. <text v-if="orderDetail.plugin_data.exchange_count"
  340. class='price'>{{
  341. orderDetail.plugin_data.exchange_count
  342. }}{{ orderDetail.plugin_data.price_name }}+</text>
  343. <text class='price'>¥{{ orderDetail.total_pay_price }}</text>
  344. </span>
  345. </view>
  346. </view>
  347. <!--------------商品信息 end 商品列表---------------->
  348. <view v-if="orderDetail.platform" class="order-label"
  349. style="font-weight: normal;border-top: 1rpx solid #E2E2E2;padding: 30rpx 24rpx">
  350. {{ orderDetail.platform }}
  351. </view>
  352. <view class='goods-box composition' v-if="sign == 'composition'">
  353. <view class="composition-item" v-for='(list, idx) in orderDetail.composition_list' :key='idx'>
  354. <view class="main-between composition-title">
  355. <view class="composition-type" v-if="list.type == 1">固定套餐</view>
  356. <view class="composition-type" v-else>搭配套餐</view>
  357. <view>套餐总价 ¥{{ list.total_price }}</view>
  358. </view>
  359. <view class="goods-list" v-for='(item, index) in list.goods_list' :key='index'>
  360. <app-order-goods-info :plugin="list.type == 2 ?sign : ''" v-if="list.show || index == 0"
  361. :type="2"
  362. style="width:100%;" :goods='item'
  363. :plugin-data="orderDetail.plugin_data"
  364. :plugin-index="index"></app-order-goods-info>
  365. <block v-if='orderDetail.is_send == 1 && (list.show || index == 0)'>
  366. <view class='dir-left-nowrap sale-box'>
  367. <view class='box-grow-1'></view>
  368. <view class='box-grow-0 dir-top-nowrap'>
  369. <!-- 无售后记录 且 未超过售后时间 才可申请售后 -->
  370. <block
  371. v-if="orderDetail.detail[index].is_show_apply_refund && orderDetail.goods_type !== 'ecard'">
  372. <app-jump-button
  373. :url="`/pages/order/refund/select-refund-type?id=${orderDetail.detail[index].id}&sign=${orderDetail.sign}`">
  374. <view size='mini' class='sale-server detail-btn'>申请售后</view>
  375. </app-jump-button>
  376. </block>
  377. <block v-else-if="orderDetail.detail[index].refund">
  378. <text class='refund-status'>
  379. 已申请售后({{ orderDetail.detail[index].refund.status_text }})
  380. </text>
  381. </block>
  382. </view>
  383. </view>
  384. </block>
  385. </view>
  386. <view class="composition-open main-center">
  387. <view @click="toggle(idx)" class="composition-btn">
  388. <text>{{ list.show ? '点击收起套餐详情' : '点击展开套餐详情' }}</text>
  389. <image v-if="!list.show" src="/static/image/icon/icon-down.png"></image>
  390. <image v-else src="/static/image/icon/icon-up.png"></image>
  391. </view>
  392. </view>
  393. </view>
  394. </view>
  395. <view class='goods-box' v-else>
  396. <view v-for='(item, index) in orderDetail.detail' :key='index'>
  397. <app-jump-button :url="item.goods_info.page_url">
  398. <app-order-goods-info style="width:100%;" :goods='item.goods_info'
  399. :type="2"
  400. :plugin-data="orderDetail.plugin_data"
  401. :plugin-index="index"></app-order-goods-info>
  402. </app-jump-button>
  403. <block v-if='orderDetail.is_send == 1'>
  404. <view class='dir-left-nowrap sale-box'>
  405. <view class='box-grow-1'></view>
  406. <view class='box-grow-0 dir-top-nowrap'>
  407. <!-- 无售后记录 且 未超过售后时间 才可申请售后 -->
  408. <block v-if="item.is_show_apply_refund && orderDetail.goods_type !== 'ecard'">
  409. <app-jump-button
  410. :url="`/pages/order/refund/select-refund-type?id=${item.id}&sign=${orderDetail.sign}`">
  411. <view size='mini' class='sale-server detail-btn'>申请售后</view>
  412. </app-jump-button>
  413. </block>
  414. <block v-else-if="item.refund">
  415. <text class='refund-status'>已申请售后({{ item.refund.status_text }})</text>
  416. </block>
  417. </view>
  418. </view>
  419. </block>
  420. </view>
  421. </view>
  422. <!-------------其他信息----------------->
  423. <block v-if="(orderDetail.sign === 'booking' || orderDetail.sign === 'vip_card') && orderDetail.order_form && orderDetail.order_form.length ">
  424. <view class="order-label">其他信息</view>
  425. <view class="order-form order-list">
  426. <view v-for="(formItem, k) in orderDetail.order_form" :key="k" class="order-form-box">
  427. <view v-if="formItem.key === 'img_upload'" class="dir-top-nowrap">
  428. <view class="box-grow-0">{{ formItem.label }}:</view>
  429. <view class="dir-left-wrap">
  430. <block v-if="Array.isArray(formItem.value)">
  431. <image v-for="(img, l) in formItem.value"
  432. :key="l"
  433. v-if="img"
  434. @click="look(img)"
  435. :src="img"
  436. style="margin-right:16rpx;margin-bottom:16rpx"
  437. ></image>
  438. </block>
  439. <image v-else-if="formItem.value"
  440. @click="look(formItem.value)"
  441. :src="formItem.value"
  442. ></image>
  443. </view>
  444. </view>
  445. <view v-else class="dir-left-nowrap">
  446. <view class="box-grow-0">{{ formItem.label ? formItem.label : formItem.key_name }}:</view>
  447. <view class="box-grow-1 text">{{ formItem.value ? formItem.value : '' }}</view>
  448. </view>
  449. </view>
  450. </view>
  451. </block>
  452. <block v-else-if="orderDetail.sign !== 'teller' && formList && formList.length">
  453. <view class="order-label">其他信息</view>
  454. <view v-for="(formAll, i) in formList" :key="i" class="order-form order-list">
  455. <app-order-goods-info v-if="isShowFormGoods"
  456. v-for="(goods,j) in formAll"
  457. :key="j"
  458. style="width:100%;"
  459. :goods='goods.goods_info'
  460. :plugin-data="orderDetail.plugin_data"
  461. :plugin-index="i"
  462. ></app-order-goods-info>
  463. <view v-for="(formItem, k) in formAll[0]['form_data']" :key="k" class="order-form-box">
  464. <view v-if="formItem.key === 'img_upload'" class="dir-top-nowrap">
  465. <view class="box-grow-0">{{ formItem.label }}:</view>
  466. <view class="dir-left-wrap">
  467. <block v-if="Array.isArray(formItem.value)">
  468. <image v-for="(img, l) in formItem.value"
  469. :key="l"
  470. v-if="img"
  471. @click="look(img)"
  472. :src="img"
  473. style="margin-right:16rpx;margin-bottom:16rpx"
  474. ></image>
  475. </block>
  476. <image v-else-if="formItem.value"
  477. @click="look(formItem.value)"
  478. :src="formItem.value"
  479. ></image>
  480. </view>
  481. </view>
  482. <view v-else class="dir-left-nowrap">
  483. <view class="box-grow-0">{{ formItem.label }}:</view>
  484. <view class="box-grow-1 text">{{ formItem.value ? formItem.value : '' }}</view>
  485. </view>
  486. </view>
  487. </view>
  488. </block>
  489. <block v-if="(orderDetail.is_pay == 1 || orderDetail.pay_type == 2)
  490. && orderDetail.is_send == 0
  491. && orderDetail.status == 1
  492. && orderDetail.detailExpressRelation.length == 0
  493. && orderDetail.cancel_status != 1">
  494. <view v-if="orderDetail.sign !='gift'" class='action-box dir-left-nowrap main-right'>
  495. <view @click='cancel(orderDetail)' class='box-grow-0 btn'>申请退款</view>
  496. </view>
  497. </block>
  498. </view>
  499. </view>
  500. </app-layout>
  501. </template>
  502. <script>
  503. import appOrderGoodsInfo from "../../../components/page-component/app-order-goods-info/app-order-goods-info.vue";
  504. import appOrderExpress from "../../../components/page-component/app-order-express/app-order-express.vue";
  505. import appOrderBanner from "../../../components/page-component/app-order-banner/app-order-banner.vue";
  506. export default {
  507. components: {
  508. "app-order-goods-info": appOrderGoodsInfo,
  509. "app-order-express": appOrderExpress,
  510. "app-order-banner": appOrderBanner,
  511. },
  512. data() {
  513. return {
  514. order_id: null,
  515. orderDetail: {
  516. detailExpressRelation: [],
  517. detailExpress: [],
  518. },
  519. is_show: false,
  520. advance_order: {
  521. goods_num: 0
  522. },
  523. detail: [],
  524. sign: '',
  525. ecard: [],
  526. isShowFormGoods: false,
  527. }
  528. },
  529. computed: {
  530. formList() {
  531. const self = this;
  532. let orderDetail = self.orderDetail.detail;
  533. let newArr = {};
  534. let form_ids = [];
  535. if (orderDetail && orderDetail.length) {
  536. for (let goods of orderDetail) {
  537. if (goods.form_id == '0') {
  538. continue;
  539. }
  540. if (form_ids.indexOf(goods.form_id) === -1) {
  541. form_ids.push(goods.form_id);
  542. newArr[goods.form_id] = [goods];
  543. } else {
  544. newArr[goods.form_id].push(goods);
  545. }
  546. }
  547. }
  548. self.isShowFormGoods = form_ids.length > 1;
  549. return Object.values(newArr);
  550. },
  551. getPageUrl() {
  552. let orderDetail = this.orderDetail;
  553. if (orderDetail.is_send == 1 && orderDetail.detailExpress.length == 0) {
  554. let coverPic = '';
  555. orderDetail.detail.forEach(function (item, index) {
  556. if (index === 0) {
  557. coverPic = item.goods_info.pic_url;
  558. }
  559. });
  560. return `/pages/order/express-detail/express-detail?express=${orderDetail.express}&customer_name=${orderDetail.customer_name}&express_no=${orderDetail.express_no}&cover_pic=${coverPic}`
  561. } else if (orderDetail.is_send == 1 && orderDetail.detailExpress.length == 1) {
  562. let express = orderDetail.detailExpress[0].express;
  563. let express_no = orderDetail.detailExpress[0].express_no;
  564. let customer_name = orderDetail.detailExpress[0].customer_name;
  565. let cover_pic = orderDetail.detailExpress[0].expressRelation[0].orderDetail.goods_info.goods_attr.cover_pic;
  566. return `/pages/order/express-detail/express-detail?express=` + express + `&customer_name=` + customer_name + `&express_no=` + express_no + `&cover_pic=` + cover_pic
  567. } else if (orderDetail.detailExpress.length >= 1) {
  568. return '/pages/order/express-list/express-list?order_id=' + orderDetail.id;
  569. }
  570. }
  571. },
  572. methods: {
  573. look(e) {
  574. uni.previewImage({
  575. current: e, // 当前显示图片的http链接
  576. urls: [e] // 需要预览的图片http链接列表
  577. })
  578. },
  579. toggle(index) {
  580. this.orderDetail.composition_list[index].show = !this.orderDetail.composition_list[index].show;
  581. this.$forceUpdate();
  582. },
  583. getOrderDetail() {
  584. let self = this;
  585. self.$showLoading();
  586. self.$request({
  587. url: self.$api.order.detail,
  588. data: {
  589. id: self.order_id,
  590. }
  591. }).then(response => {
  592. self.$hideLoading();
  593. self.is_show = true;
  594. if (response.code == 0) {
  595. self.orderDetail = response.data.detail;
  596. self.ecard = [self.orderDetail.type_data.ecard[0]];
  597. if (self.sign == 'composition') {
  598. for (let i in self.orderDetail.composition_list) {
  599. self.orderDetail.composition_list[i].show = false;
  600. }
  601. }
  602. } else {
  603. uni.showModal({
  604. title: '',
  605. content: response.msg,
  606. showCancel: false,
  607. });
  608. }
  609. }).catch(() => {
  610. self.$hideLoading();
  611. });
  612. },
  613. copyText(orderNo) {
  614. this.$utils.uniCopy({
  615. data: orderNo,
  616. success: function () {
  617. uni.showToast({
  618. title: '复制成功',
  619. icon: 'none',
  620. })
  621. }
  622. });
  623. },
  624. copyTextEcard(item) {
  625. let str = ``;
  626. for (let i = 0; i < item.length; i++) {
  627. str += `${item[i].key}:${item[i].value}\n`
  628. }
  629. this.$utils.uniCopy({
  630. data: str,
  631. success: function () {
  632. uni.showToast({
  633. title: '复制成功',
  634. icon: 'none',
  635. })
  636. }
  637. });
  638. },
  639. navigation(store) {
  640. uni.openLocation({
  641. latitude: parseFloat(store.latitude),
  642. longitude: parseFloat(store.longitude),
  643. name: store.name,
  644. address: store.address,
  645. })
  646. },
  647. // 取消 | 申请退款
  648. cancel(e) {
  649. let self = this;
  650. uni.navigateTo({
  651. url: '/pages/order/refund/order-refund?id=' + e.id
  652. });
  653. },
  654. cancelAction(e) {
  655. let self = this;
  656. uni.showLoading({title: '取消中'});
  657. self.$request({
  658. url: self.$api.order.cancel,
  659. data: {
  660. id: e.id
  661. }
  662. }).then(response => {
  663. uni.hideLoading();
  664. if (response.code === 0) {
  665. if (self.sign === 'advance') {
  666. self.$request({
  667. url: self.$api.advance.order_detail,
  668. method: 'get',
  669. data: {
  670. id: self.order_id,
  671. }
  672. }).then(response => {
  673. self.is_show = true;
  674. if (response.code === 0) {
  675. self.orderDetail = response.data.detail;
  676. } else {
  677. uni.showModal({
  678. title: '',
  679. content: response.msg,
  680. showCancel: false,
  681. });
  682. }
  683. })
  684. } else {
  685. self.getOrderDetail();
  686. }
  687. } else {
  688. uni.showModal({
  689. title: '',
  690. content: response.msg,
  691. showCancel: false,
  692. });
  693. }
  694. }).catch(() => {
  695. uni.hideLoading();
  696. });
  697. },
  698. mobile: function () {
  699. uni.makePhoneCall({
  700. phoneNumber: this.orderDetail.city.mobile,
  701. })
  702. },
  703. // 电子卡密使用说明
  704. go_eCard() {
  705. uni.navigateTo({
  706. url: `/pages/rules/index?url=${encodeURIComponent(this.$api.ecard.index)}&key=content&data=${JSON.stringify({
  707. order_id: this.orderDetail.id
  708. })}`,
  709. });
  710. }
  711. },
  712. onLoad(options) { this.$commonLoad.onload(options);
  713. this.order_id = options.id;
  714. this.sign = options.sign;
  715. },
  716. onShow() {
  717. let self = this;
  718. let interval = setInterval(function () {
  719. if (self.sign === 'advance') {
  720. self.$request({
  721. url: self.$api.advance.order_detail,
  722. method: 'get',
  723. data: {
  724. id: self.order_id,
  725. }
  726. }).then(response => {
  727. self.is_show = true;
  728. if (response.code === 0) {
  729. self.orderDetail = response.data.detail;
  730. } else {
  731. uni.showModal({
  732. title: '',
  733. content: response.msg,
  734. showCancel: false,
  735. });
  736. }
  737. })
  738. } else {
  739. self.getOrderDetail();
  740. }
  741. clearInterval(interval);
  742. }, 300);
  743. }
  744. }
  745. </script>
  746. <style scoped lang="scss">
  747. .order-detail-box {
  748. font-size: $uni-font-size-general-one;
  749. color: $uni-general-color-one;
  750. position: relative;
  751. width: 100%;
  752. height: 100%;
  753. }
  754. .order-label {
  755. padding: #{32rpx} #{24rpx};
  756. font-size: #{30rpx};
  757. color: #353535;
  758. font-weight: bold;
  759. background: #FFFFFF;
  760. border-bottom: #{1rpx} solid #e2e2e2;
  761. }
  762. .goods-image {
  763. margin-right: #{20rpx};
  764. margin-bottom: #{20rpx};
  765. }
  766. .goods-num {
  767. font-size: #{24rpx};
  768. color: #999999;
  769. margin: #{20rpx} 0;
  770. }
  771. .order-form {
  772. background: #FFFFFF;
  773. .order-form-box {
  774. padding: #{5rpx} 0;
  775. span {
  776. }
  777. image {
  778. height: #{174rpx};
  779. width: #{174rpx};
  780. display: block;
  781. margin-top: #{15rpx};
  782. }
  783. }
  784. }
  785. .order-list {
  786. background: #FFFFFF;
  787. padding: #{32rpx} #{24rpx};
  788. margin-bottom: #{20rpx};
  789. > view {
  790. margin-bottom: #{10rpx};
  791. }
  792. .text {
  793. word-wrap: break-word;
  794. }
  795. > view:last-child {
  796. margin-bottom: 0;
  797. }
  798. .order-list-btn {
  799. border: 1#{rpx} solid #bbbbbb;
  800. border-radius: 30#{rpx};
  801. padding: 10#{rpx} 30#{rpx};
  802. display: inline-block;
  803. margin-left: calc(100vw - #{170rpx});
  804. }
  805. }
  806. .order-form:last-child {
  807. border-bottom: none;
  808. }
  809. .express-box {
  810. background: #fff;
  811. padding: 32#{rpx} 24#{rpx};
  812. margin-bottom: 20#{rpx};
  813. }
  814. .address-box {
  815. background: #fff;
  816. padding: 32#{rpx} 24#{rpx};
  817. margin-bottom: 20#{rpx};
  818. .address {
  819. word-wrap: break-word;
  820. }
  821. }
  822. .address-box .text {
  823. margin-top: 10#{rpx};
  824. }
  825. .delivery {
  826. .deliveryman {
  827. width: #{72rpx};
  828. height: #{72rpx};
  829. display: block;
  830. margin-right: #{24rpx};
  831. }
  832. .delivery-tips {
  833. font-size: $uni-font-size-weak-one;
  834. color: $uni-general-color-two;
  835. margin-bottom: #{16rpx};
  836. }
  837. .mr-16 {
  838. margin-right: #{16rpx};
  839. }
  840. .delivery-mobile {
  841. width: #{96rpx};
  842. border-left: #{1rpx} solid #e2e2e2;
  843. .mobile {
  844. width: #{40rpx};
  845. height: #{40rpx};
  846. display: block;
  847. margin-right: #{16rpx};
  848. }
  849. }
  850. .content {
  851. width: #{500rpx};
  852. }
  853. }
  854. .order-info-box {
  855. background: #fff;
  856. padding: 32#{rpx} 24#{rpx};
  857. margin-bottom: 20#{rpx};
  858. }
  859. .store-info-box {
  860. background: #fff;
  861. padding: 32#{rpx} 24#{rpx};
  862. margin-bottom: 20#{rpx};
  863. }
  864. .preferential-box {
  865. background: #fff;
  866. padding: 32#{rpx} 24#{rpx};
  867. border-bottom: 1#{rpx} solid $uni-weak-color-one;
  868. }
  869. .preferential-box .item {
  870. margin: 5#{rpx} 0;
  871. }
  872. .order-price-box {
  873. height: 100#{rpx};
  874. background: #fff;
  875. padding: 32#{rpx} 24#{rpx};
  876. //margin-bottom: 20#{rpx};
  877. }
  878. .goods-box {
  879. background: #fff;
  880. padding: 32#{rpx} 24#{rpx};
  881. margin-bottom: 20#{rpx};
  882. &.composition {
  883. padding: 0;
  884. padding-bottom: #{8rpx};
  885. margin-bottom: 0;
  886. background-color: #f7f7f7;
  887. }
  888. .composition-item {
  889. margin-bottom: #{20rpx};
  890. background-color: #fff;
  891. .composition-open {
  892. text-align: center;
  893. background-color: #fff;
  894. height: #{84rpx};
  895. .composition-btn {
  896. display: inline-block;
  897. border: #{2rpx} solid #bbbbbb;
  898. font-size: #{24rpx};
  899. color: #999999;
  900. padding: 0 #{24rpx};
  901. margin: #{12rpx} 0 #{16rpx};
  902. height: #{56rpx};
  903. line-height: #{54rpx};
  904. border-radius: #{28rpx};
  905. image {
  906. width: #{22rpx};
  907. height: #{12rpx};
  908. margin-left: #{16rpx};
  909. }
  910. }
  911. }
  912. .goods-list {
  913. padding: 0 #{24rpx};
  914. }
  915. .composition-title {
  916. height: #{80rpx};
  917. line-height: #{80rpx};
  918. padding: 0 #{24rpx};
  919. font-size: #{28rpx};
  920. color: #353535;
  921. margin-bottom: #{24rpx};
  922. border-bottom: #{2rpx} solid #e2e2e2;
  923. .composition-type {
  924. color: #f39800;
  925. }
  926. }
  927. }
  928. }
  929. .goods-box .sale-server {
  930. margin-top: 20#{rpx};
  931. }
  932. .goods-box .sale-box {
  933. padding-bottom: 15#{rpx};
  934. }
  935. .goods-box .refund-status {
  936. margin-top: 15#{rpx};
  937. color: $uni-important-color-black;
  938. }
  939. .action-box {
  940. background: #fff;
  941. padding: 32#{rpx} 24#{rpx};
  942. .cancel-text {
  943. font-size: $uni-font-size-import-two;
  944. }
  945. .btn {
  946. border: 1#{rpx} solid #bbbbbb;
  947. border-radius: 30#{rpx};
  948. padding: 10#{rpx} 30#{rpx};
  949. }
  950. }
  951. .detail-btn {
  952. border: 1#{rpx} solid #bbbbbb;
  953. border-radius: 30#{rpx};
  954. padding: 10#{rpx} 30#{rpx};
  955. }
  956. .e-box {
  957. width: 100%;
  958. height: #{100rpx};
  959. padding: 0 #{24rpx};
  960. background: #ffffff;
  961. margin-bottom: #{20rpx};
  962. .img {
  963. width: 12#{rpx};
  964. height: 24#{rpx};
  965. }
  966. .express-name {
  967. margin-bottom: 15#{rpx};
  968. }
  969. .text {
  970. color: #353535;
  971. font-size: #{28rpx};
  972. }
  973. }
  974. .advance {
  975. width: #{702rpx};
  976. border-radius: #{16rpx};
  977. background-color: #f7f7f7;
  978. padding: #{32rpx 24rpx};
  979. .title {
  980. font-size: #{24rpx};
  981. color: #ff4544;
  982. margin-bottom: #{15rpx};
  983. }
  984. }
  985. .item-box {
  986. border: #{1rpx} solid #c2c2c2;
  987. padding: #{24rpx};
  988. border-radius: #{16rpx};
  989. width: #{702rpx};
  990. }
  991. .ecard {
  992. background-color: #ffffff;
  993. .item {
  994. padding: #{32upx 24upx 0 24upx};
  995. .text {
  996. font-size: #{23upx};
  997. line-height: 1.5;
  998. padding-left: #{15upx};
  999. word-break: break-all;
  1000. }
  1001. }
  1002. .expand {
  1003. height: #{70upx};
  1004. margin-top: #{20upx};
  1005. border-top: #{1upx} solid #e2e2e2;
  1006. > image {
  1007. width: #{20upx};
  1008. height: #{12upx};
  1009. }
  1010. > text {
  1011. font-size: #{23upx};
  1012. color: #919191;
  1013. }
  1014. }
  1015. }
  1016. .instructions {
  1017. width: #{12upx};
  1018. height: #{22upx};
  1019. margin-left: #{18upx};
  1020. }
  1021. .ecard-info {
  1022. height: #{90upx};
  1023. line-height: #{90upx};
  1024. background-color: #ffffff;
  1025. padding: #{0 22upx};
  1026. margin-bottom: #{13upx};
  1027. }
  1028. .city-service {
  1029. width: 100%;
  1030. margin-bottom: 10#{rpx};
  1031. .await-man {
  1032. margin-left: #{12rpx};
  1033. font-size: #{28rpx};
  1034. color:#666666;
  1035. }
  1036. .info-box {
  1037. margin-left: #{12rpx};
  1038. .info-label {
  1039. margin-bottom: #{10rpx};
  1040. color: #999999;
  1041. font-size: #{28rpx};
  1042. }
  1043. }
  1044. .head {
  1045. width: #{75rpx};
  1046. height: #{75rpx};
  1047. }
  1048. .icon-box {
  1049. padding: 0 #{30rpx};
  1050. border-left: #{1rpx} solid #f7f7f7;
  1051. .icon {
  1052. width: #{45rpx};
  1053. height: #{45rpx};
  1054. }
  1055. }
  1056. }
  1057. </style>