order-detail.vue 48 KB

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