info.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925
  1. <template>
  2. <view class="order-detail padding-lr-sm" v-if="fetch && fetch.info" @click="Dever.close()">
  3. <use-tabbar :tabbar="false"></use-tabbar>
  4. <!-- 订单状态 -->
  5. <view class="state-area margin-tb-sm">
  6. <view class="padding border-radius bg-base">
  7. <view v-if="fetch.info.refund_status == 1">
  8. <view class="dflex-c fs-lg">
  9. <text class="iconfont icondaifukuan- fs-lg fwb"></text>
  10. <text class="fwb margin-left-sm">已申请售后</text>
  11. </view>
  12. <view class="dflex-c" v-if="fetch.info.refund && fetch.info.refund.status == 2">审核已通过,请您填写退货单号
  13. </view>
  14. <view class="dflex-c" v-else-if="fetch.info.refund && fetch.info.refund.status == 3">
  15. 您已填写退货单号,请等待工作人员验收</view>
  16. <view class="dflex-c" v-else-if="fetch.info.refund && fetch.info.refund.status == 4">已完成退款,感谢您的支持
  17. </view>
  18. <view class="dflex-c" v-else>请耐心等待工作人员处理</view>
  19. </view>
  20. <view v-else-if="fetch.info.status == 1">
  21. <view class="dflex-c fs-lg">
  22. <text class="iconfont icondaifukuan- fs-lg fwb"></text>
  23. <text class="fwb margin-left-sm">订单待支付</text>
  24. </view>
  25. <view class="dflex-c">
  26. 剩余时间:
  27. <u-count-down :time="fetch.info.time" format="HH:mm:ss" @change="onTime" @finish="finishTime">
  28. <view class="time">
  29. <view class="time__custom">
  30. <text
  31. class="time__custom__item">{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}</text>
  32. </view>
  33. <text class="time__doc">:</text>
  34. <view class="time__custom">
  35. <text class="time__custom__item">{{ timeData.minutes }}</text>
  36. </view>
  37. <text class="time__doc">:</text>
  38. <view class="time__custom">
  39. <text class="time__custom__item">{{ timeData.seconds }}</text>
  40. </view>
  41. </view>
  42. </u-count-down>
  43. </view>
  44. </view>
  45. <view v-else-if="fetch.info.status == 2 && fetch.info.method == 3">
  46. <view class="dflex-c fs-lg">
  47. <text class="iconfont icondaifahuo- fs-lg fwb"></text>
  48. <text class="fwb margin-left-sm">自提订单</text>
  49. </view>
  50. <view class="dflex-c">请出示自提码:{{fetch.info.method_code}}</view>
  51. </view>
  52. <view v-else-if="fetch.info.status == 2">
  53. <view class="dflex-c fs-lg">
  54. <text class="iconfont icondaifahuo- fs-lg fwb"></text>
  55. <text class="fwb margin-left-sm">订单备货中</text>
  56. </view>
  57. <view class="dflex-c">感谢您的支持,请等待发货</view>
  58. </view>
  59. <view v-else-if="fetch.info.status == 3">
  60. <view class="dflex-c fs-lg">
  61. <text class="iconfont icondaishouhuo- fs-lg fwb"></text>
  62. <text class="fwb margin-left-sm">订单已发货</text>
  63. </view>
  64. <view class="dflex-c">感谢您的支持,请等待收货</view>
  65. </view>
  66. <view v-else-if="fetch.info.status == 4">
  67. <view class="dflex-c fs-lg">
  68. <text class="iconfont iconyiwancheng- fs-lg fwb"></text>
  69. <text class="fwb margin-left-sm">订单已收货</text>
  70. </view>
  71. <view class="dflex-c">请尽快确认收货,期待您的真实评价</view>
  72. </view>
  73. <view v-else-if="fetch.info.status == 5 || fetch.info.status == 6">
  74. <view class="dflex-c fs-lg">
  75. <text class="iconfont iconyiwancheng- fs-lg fwb"></text>
  76. <text class="fwb margin-left-sm">订单已完成</text>
  77. </view>
  78. <view class="dflex-c">感谢您的支持,期待下次购买</view>
  79. </view>
  80. <view v-else-if="fetch.info.status >= 7">
  81. <view class="dflex-c fs-lg">
  82. <text class="iconfont icondaifukuan- fs-lg fwb"></text>
  83. <text class="fwb margin-left-sm">订单已关闭</text>
  84. </view>
  85. <view class="dflex-c">感谢您的支持,期待下次购买</view>
  86. </view>
  87. </view>
  88. </view>
  89. <!-- 收货人 -->
  90. <view class="address-area margin-tb-sm" v-if="fetch.info.address">
  91. <view class="dflex padding border-radius bg-main">
  92. <view class="iconfont icondizhi- margin-right ft-main"></view>
  93. <view class="flex1">
  94. <view class="w-full dflex-wrap-w">
  95. <view class="margin-bottom-xs desc">
  96. <text>{{ fetch.info.address.area_string }}
  97. {{ fetch.info.address.address }}</text>
  98. </view>
  99. <view>
  100. <text>{{ fetch.info.address.name }}</text>
  101. <text class="margin-left">{{ fetch.info.address.phone }}</text>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. <!-- 订单商品明细 -->
  108. <view class="padding margin-tb-sm bg-main border-radius">
  109. <view class="goods-area" :class="{ 'margin-top': index > 0 }" v-for="(item, index) in fetch.info.detail"
  110. :key="index" @click="Dever.location('source/info?id=' + item.source_id + '&title=' + item.name)">
  111. <view class="dflex pos-r" style="align-items: flex-start;">
  112. <view class="img">
  113. <image :src="item.pic" mode="aspectFit"></image>
  114. </view>
  115. <view class="margin-left-sm" style="width: 100%;">
  116. <text class="clamp-2">{{ item.name }}</text>
  117. <view class="ft-dark fs-xs padding-top-xs">
  118. <text class="margin-right">× {{item.num}}</text>
  119. {{ item.sku_name || '&nbsp;&nbsp;' }}
  120. </view>
  121. <view class="margin-top-sm dflex-b">
  122. <text class="price">{{ item.cash_text }}</text>
  123. <view class="action-btn-group">
  124. <button v-if="item.delivery && item.delivery.title"
  125. class="action-btn border-radius-big bg-main"
  126. @click.stop="showDelivery(item.delivery)">{{item.delivery.title}}</button>
  127. <!--
  128. <button v-if="item.source_type == 2 && fetch.info.status > 1 && fetch.info.status < 5" class="action-btn border-radius-big bg-main">退款</button>-->
  129. </view>
  130. </view>
  131. </view>
  132. </view>
  133. </view>
  134. </view>
  135. <!-- 订单数据 -->
  136. <view class="order-area padding margin-tb-sm bg-main border-radius">
  137. <view class="item dflex-b" @click="copy(fetch.info.order_num)">
  138. <text>订单编号:</text>
  139. <text class="ft-dark">{{ fetch.info.order_num }}</text>
  140. </view>
  141. <view class="item dflex-b" v-if="fetch.info.method_name">
  142. <text>发货方式:</text>
  143. <text class="ft-dark">{{ fetch.info.method_name }}</text>
  144. </view>
  145. <view class="item dflex-b">
  146. <text>下单时间:</text>
  147. <text class="ft-dark">{{ fetch.info.cdate_str }}</text>
  148. </view>
  149. <view class="item dflex-b">
  150. <text>留言备注:</text>
  151. <text class="ft-dark">{{ fetch.info.buy_info ? fetch.info.buy_info : '无' }}</text>
  152. </view>
  153. </view>
  154. <!-- 退款数据 -->
  155. <view class="order-area padding margin-tb-sm bg-main border-radius" v-if="fetch.info.refund">
  156. <view class="item dflex-b">
  157. <text>退款类型:</text>
  158. <text class="ft-dark">{{ fetch.info.refund.type_name }}</text>
  159. </view>
  160. <view class="item dflex-b">
  161. <text>退款金额:</text>
  162. <text class="ft-dark">{{ fetch.info.refund.cash_text }}</text>
  163. </view>
  164. <view class="item dflex-b">
  165. <text>退款状态:</text>
  166. <text class="ft-dark">{{ fetch.info.refund.status_name }}</text>
  167. </view>
  168. <view class="item dflex-b">
  169. <text>申请时间:</text>
  170. <text class="ft-dark">{{ fetch.info.refund.cdate_str }}</text>
  171. </view>
  172. <view class="item dflex-b">
  173. <text>申请原因:</text>
  174. <text class="ft-dark">{{ fetch.info.refund.desc_type_name }}</text>
  175. </view>
  176. <view class="item dflex-b">
  177. <text>申请说明:</text>
  178. <text class="ft-dark">{{ fetch.info.refund.desc }}</text>
  179. </view>
  180. <view class="item dflex-b" v-if="fetch.info.refund.detail_str">
  181. <text>退款明细:</text>
  182. <text class="ft-dark">{{ fetch.info.refund.detail_str }}</text>
  183. </view>
  184. <view class="item dflex-b" v-if="fetch.info.refund.audit_desc">
  185. <text>申请审核:</text>
  186. <text class="ft-dark">{{ fetch.info.refund.audit_desc }}</text>
  187. </view>
  188. <view class="item dflex-b" v-if="fetch.info.refund.delivery && fetch.info.refund.delivery.name">
  189. <text>退货类型:</text>
  190. <text class="ft-dark">{{ fetch.info.refund.delivery.name }}</text>
  191. </view>
  192. <view class="item dflex-b" v-if="fetch.info.refund.delivery && fetch.info.refund.delivery.content">
  193. <text>退货单号:</text>
  194. <text class="ft-dark">{{ fetch.info.refund.delivery.content }}</text>
  195. </view>
  196. <view class="item dflex-b" v-if="fetch.info.refund.delivery_audit_desc">
  197. <text>退货审核:</text>
  198. <text class="ft-dark">{{ fetch.info.refund.delivery_audit_desc }}</text>
  199. </view>
  200. </view>
  201. <!-- 统计数据 -->
  202. <view class="total-area padding margin-tb-sm bg-main border-radius">
  203. <view class="ft-dark">
  204. <view class="item dflex-b">
  205. <text>总计金额</text>
  206. <text class="">{{ fetch.info.cash_text }}</text>
  207. </view>
  208. <view class="item dflex-b">
  209. <text>优惠券抵扣</text>
  210. <text class="">{{ fetch.info.coupon_cash_text }}</text>
  211. </view>
  212. <view class="item dflex-b">
  213. <text>礼品卡抵扣</text>
  214. <text class="">{{ fetch.info.gift_cash_text }}</text>
  215. </view>
  216. <view class="item dflex-b">
  217. <text>{{fetch.info.score.name}}抵扣</text>
  218. <text class="">{{ fetch.info.wallet_cash_text }}</text>
  219. </view>
  220. </view>
  221. <view class="item dflex-b">
  222. <u-popover position="right" width="200px">
  223. <text>支付金额</text>
  224. <!--
  225. <view style="display: inline-block;">
  226. <u-icon name="question-circle"
  227. v-if="fetch.info.pay_money_cash_text != fetch.info.pay_cash_text"></u-icon>
  228. </view>-->
  229. <template v-slot:content>
  230. <view style="color: white;">
  231. <u-parse :content="fetch.info.pay_money_cash_text"></u-parse>
  232. </view>
  233. </template>
  234. </u-popover>
  235. <text class="price">{{ fetch.info.pay_cash_text }}</text>
  236. </view>
  237. </view>
  238. <view style="height: 100rpx;"></view>
  239. <!-- 底部操作区 -->
  240. <view class="oper-area dflex-b padding-right padding-left-sm">
  241. <view class="dflex">
  242. <view class="btn-area dflex dflex-flow-c" @click="Dever.goHome()">
  243. <text class="iconfont iconshouye-1"></text>
  244. <text>首页</text>
  245. </view>
  246. <!-- #ifndef H5 || MP-360 || MP-ALIPAY -->
  247. <!--
  248. <button class="btn no-border" open-type="contact">
  249. <view class="btn-area dflex dflex-flow-c">
  250. <text class="iconfont iconkefu-01"></text>
  251. <text>客服</text>
  252. </view>
  253. </button>
  254. -->
  255. <!-- #endif -->
  256. </view>
  257. <view class="dflex-e">
  258. <view class="dflex" v-if="fetch.info.status == 1">
  259. <button class="action-btn" @click="cancelOrder" :disabled="option.submit" :loading="option.submit">取消订单</button>
  260. <button class="action-btn main-btn" @click="payment" :disabled="option.submit" :loading="option.submit">立即支付</button>
  261. </view>
  262. <view class="dflex" v-if="fetch.info.status == 3 || fetch.info.status == 4">
  263. <button class="action-btn main-btn" @click="finish" :disabled="option.submit" :loading="option.submit">确认收货</button>
  264. </view>
  265. <view class="dflex" v-if="fetch.info.status >= 2 && fetch.info.status < 5 && !fetch.info.refund">
  266. <button class="action-btn main-btn" @click="open('applyRefund')">申请退款</button>
  267. </view>
  268. <view class="dflex"
  269. v-if="fetch.info.refund && fetch.info.refund.type == 1 && fetch.info.refund.status == 2 && fetch.info.refund_status == 1">
  270. <button class="action-btn main-btn" @click="open('applyRefundNumber')">退货单号</button>
  271. </view>
  272. <view class="dflex" v-if="fetch.info.review_status == 2">
  273. <button class="action-btn main-btn" @click="evaluate">我要评价</button>
  274. </view>
  275. <!--
  276. <view v-if="fetch.info.status >= 7"><button @click="delorder" class="action-btn main-btn">删除订单</button>
  277. </view>
  278. -->
  279. <view class="dflex" v-if="fetch.info.refund_list && fetch.info.refund_list.length > 0">
  280. <button class="action-btn border-radius-big bg-main" @click="open('refund')">退款记录</button>
  281. </view>
  282. </view>
  283. </view>
  284. <u-popup :show="show.delivery" mode="bottom" @close="close('delivery')" :closeable="true" round="25">
  285. <scroll-view scroll-y="true" class="bg-drak border-radius" style="min-height: 66vh; max-height: 80vh;">
  286. <view class="padding">
  287. <view class="border-radius padding margin-bottom-sm bg-main">
  288. <view class="fs-lg fwb">{{delivery.name}}</view>
  289. <view v-if="delivery.type == 1">运单号:{{delivery.content}}<text class="copy"
  290. @click="copy(delivery.content)">复制</text></view>
  291. <view v-if="delivery.type == 2">内容:{{delivery.content}}<text class="copy"
  292. @click="copy(delivery.content)">复制</text></view>
  293. </view>
  294. </view>
  295. <view v-if="delivery.log && delivery.log.length > 0" class="padding-lr">
  296. <view class="product border-radius padding margin-bottom-sm bg-main" style="padding-bottom: 15rpx;">
  297. <view :class="{ 'active': index == 0, 'fwb': index == 0 }" class="dflex item pos-r"
  298. v-for="(item, index) in delivery.log" :key="index">
  299. <view :class="{ 'active': index == 0 }" class="circle"></view>
  300. <view :class="{ 'ft-dark': index > 0 }" class="margin-left-lg pos-r w-full margin-bottom">
  301. <view>{{item.status}}</view>
  302. <view class="margin-top-xs fs-xs">{{item.time}}</view>
  303. </view>
  304. </view>
  305. </view>
  306. </view>
  307. </scroll-view>
  308. </u-popup>
  309. <u-popup :show="show.applyRefund" mode="bottom" @close="close('applyRefund')" :closeable="true" round="25">
  310. <view class="bg-drak border-radius">
  311. <!--
  312. <view class="refund-area padding margin-lr margin-tb-sm bg-main border-radius">
  313. <view class="dflex-b">
  314. <text class="item margin-right-sm">退款金额:</text>
  315. <u--input
  316. placeholder="请输入金额"
  317. border="none"
  318. type="number"
  319. v-model="applyRefund.cash"
  320. ></u--input>
  321. </view>
  322. </view>
  323. -->
  324. <view class="refund-area padding margin-lr margin-tb-sm bg-main border-radius">
  325. <view class="dflex-b" @click="open('applyRefundType')">
  326. <text class="item margin-right-sm">退款类型:</text>
  327. <view class="dflex margin-left-xl">
  328. <text class="tip line-height-1 margin-right-xs">{{applyType}}</text>
  329. <view class="iconfont fs-sm iconjiantou-01" style="color: rgb(192, 192, 192);"></view>
  330. </view>
  331. </view>
  332. <u-action-sheet :actions="fetch.refund_type" :closeOnClickAction="true" :closeOnClickOverlay="true"
  333. :show="show.applyRefundType" @select="setRefundType" @close="close('applyRefundType')"
  334. :round="14"></u-action-sheet>
  335. </view>
  336. <view class="refund-area padding margin-lr margin-tb-sm bg-main border-radius">
  337. <view class="dflex-b" @click="open('applyRefundDescType')">
  338. <text class="item margin-right-sm">退款原因:</text>
  339. <view class="dflex margin-left-xl">
  340. <text class="tip line-height-1 margin-right-xs">{{applyDescType}}</text>
  341. <view class="iconfont fs-sm iconjiantou-01" style="color: rgb(192, 192, 192);"></view>
  342. </view>
  343. </view>
  344. <u-action-sheet :actions="fetch.refund_desc_type" :closeOnClickAction="true"
  345. :closeOnClickOverlay="true" :show="show.applyRefundDescType" @select="setRefundDescType"
  346. @close="close('applyRefundDescType')" :round="14"></u-action-sheet>
  347. </view>
  348. <!-- 上传凭证 -->
  349. <view class="padding margin-lr margin-tb-sm bg-main border-radius">
  350. <!-- 退款说明 -->
  351. <textarea v-model="applyRefund.desc" class="ft-black w-full margin-0 padding-0 fs-sm"
  352. placeholder="请填写退款说明(选填)"></textarea>
  353. <!-- 上传图片 -->
  354. <!--
  355. <use-upload class="pos-r" @upload="refundImgs"></use-upload>
  356. -->
  357. </view>
  358. <!-- 提交操作 -->
  359. <view class="padding w-full margin-top">
  360. <view class="dflex-b border-radius-big">
  361. <view class="tac padding-tb-sm flex1 bg-base" @click="submitRefund">提交申请</view>
  362. </view>
  363. </view>
  364. </view>
  365. </u-popup>
  366. <u-popup :show="show.applyRefundNumber" mode="bottom" @close="close('applyRefundNumber')" :closeable="true"
  367. round="25">
  368. <view class="bg-drak border-radius">
  369. <view class="padding margin-lr margin-tb-sm bg-main border-radius"
  370. v-if="fetch.info && fetch.info.refund && fetch.info.refund.address"
  371. @click="copy(fetch.info.refund.address)">
  372. <text>退货地址:{{fetch.info.refund.address}}</text>
  373. </view>
  374. <view class="refund-area padding margin-lr margin-tb-sm bg-main border-radius">
  375. <view class="dflex-b" @click="open('applyRefundDelivery')">
  376. <text class="item margin-right-sm">快递公司:</text>
  377. <view class="dflex margin-left-xl">
  378. <text class="tip line-height-1 margin-right-xs">{{applyDelivery}}</text>
  379. <view class="iconfont fs-sm iconjiantou-01" style="color: rgb(192, 192, 192);"></view>
  380. </view>
  381. </view>
  382. <u-picker :show="show.applyRefundDelivery" :columns="fetch.refund_delivery" keyName="name"
  383. @confirm="setRefundDeliveryConfirm" @close="setRefundDeliveryCancel"
  384. @cancel="setRefundDeliveryCancel" v-if="fetch.refund_delivery"></u-picker>
  385. </view>
  386. <view class="padding margin-lr margin-tb-sm bg-main border-radius">
  387. <!-- 退款说明 -->
  388. <textarea v-model="applyRefund.number" class="ft-black w-full margin-0 padding-0 fs-sm"
  389. placeholder="请填写退货单号,自提请写您的下单手机号"></textarea>
  390. </view>
  391. <!-- 提交操作 -->
  392. <view class="padding w-full margin-top">
  393. <view class="dflex-b border-radius-big">
  394. <view class="tac padding-tb-sm flex1 bg-base" @click="submitRefundNumber">提交单号</view>
  395. </view>
  396. </view>
  397. </view>
  398. </u-popup>
  399. <u-popup :show="show.refund" mode="bottom" @close="close('refund')" :closeable="true" round="25">
  400. <scroll-view scroll-y="true" class="bg-drak border-radius" style="min-height: 66vh; max-height: 80vh;"
  401. v-if="fetch && fetch.info && fetch.info.refund_list && fetch.info.refund_list.length > 0">
  402. <view class="refund-area">
  403. <view class="order-area padding margin-tb-sm bg-main border-radius">
  404. <view class="item dflex-b">
  405. <text>退款类型:</text>
  406. <text class="ft-dark">{{ fetch.info.refund_list[refund].type_name }}</text>
  407. </view>
  408. <view class="item dflex-b">
  409. <text>退款金额:</text>
  410. <text class="ft-dark">{{ fetch.info.refund_list[refund].cash_text }}</text>
  411. </view>
  412. <view class="item dflex-b">
  413. <text>退款状态:</text>
  414. <text class="ft-dark">{{ fetch.info.refund_list[refund].status_name }}</text>
  415. </view>
  416. <view class="item dflex-b">
  417. <text>申请时间:</text>
  418. <text class="ft-dark">{{ fetch.info.refund_list[refund].cdate_str }}</text>
  419. </view>
  420. <view class="item dflex-b">
  421. <text>申请原因:</text>
  422. <text class="ft-dark">{{ fetch.info.refund_list[refund].desc_type_name }}</text>
  423. </view>
  424. <view class="item dflex-b">
  425. <text>申请说明:</text>
  426. <text class="ft-dark">{{ fetch.info.refund_list[refund].desc }}</text>
  427. </view>
  428. <view class="item dflex-b" v-if="fetch.info.refund_list[refund].detail_str">
  429. <text>退款明细:</text>
  430. <text class="ft-dark">{{ fetch.info.refund_list[refund].detail_str }}</text>
  431. </view>
  432. <view class="item dflex-b" v-if="fetch.info.refund_list[refund].audit_desc">
  433. <text>申请审核:</text>
  434. <text class="ft-dark">{{ fetch.info.refund_list[refund].audit_desc }}</text>
  435. </view>
  436. <view class="item dflex-b"
  437. v-if="fetch.info.refund_list[refund].delivery && fetch.info.refund_list[refund].delivery.name">
  438. <text>退货类型:</text>
  439. <text class="ft-dark">{{ fetch.info.refund_list[refund].delivery.name }}</text>
  440. </view>
  441. <view class="item dflex-b"
  442. v-if="fetch.info.refund_list[refund].delivery && fetch.info.refund_list[refund].delivery.content">
  443. <text>退货单号:</text>
  444. <text class="ft-dark">{{ fetch.info.refund_list[refund].delivery.content }}</text>
  445. </view>
  446. <view class="item dflex-b" v-if="fetch.info.refund_list[refund].delivery_audit_desc">
  447. <text>退货审核:</text>
  448. <text class="ft-dark">{{ fetch.info.refund_list[refund].delivery_audit_desc }}</text>
  449. </view>
  450. </view>
  451. </view>
  452. <view class="padding-lr">
  453. <view class="product border-radius padding margin-bottom-sm bg-main">
  454. <view :class="{ 'active': refund == index, 'fwb': refund == index }" class="dflex item pos-r"
  455. v-for="(item, index) in fetch.info.refund_list" :key="index" @click="setRefund(index)">
  456. <view :class="{ 'active': refund == index }" class="circle"></view>
  457. <view :class="{ 'ft-dark': refund != index }"
  458. class="margin-left-lg pos-r w-full margin-bottom">
  459. <view>{{item.status_name}}:{{item.cash_text}}</view>
  460. <view class="margin-top-xs fs-xs">{{item.cdate_str}}</view>
  461. </view>
  462. </view>
  463. </view>
  464. </view>
  465. </scroll-view>
  466. </u-popup>
  467. </view>
  468. </template>
  469. <script>
  470. import Pay from '@/lib/dever/pay.js'
  471. export default {
  472. components: {
  473. // share
  474. },
  475. data() {
  476. return {
  477. fetch: {},
  478. show: {
  479. delivery: false,
  480. refund: false,
  481. applyRefund: false,
  482. applyRefundDescType: false,
  483. applyRefundType: false,
  484. applyRefundNumber: false,
  485. applyRefundDelivery: false,
  486. },
  487. delivery: {},
  488. refund: 0,
  489. applyRefund: {
  490. desc_type: 0,
  491. type: 0,
  492. desc: '',
  493. cash: '',
  494. number: '',
  495. delivery_id: '',
  496. },
  497. applyType: '请选择',
  498. applyDescType: '请选择',
  499. applyDelivery: '请选择',
  500. timeData: {},
  501. option: {
  502. id: 0,
  503. order: '',
  504. submit: false,
  505. }
  506. };
  507. },
  508. onLoad(options) {
  509. if (options.id) {
  510. this.option.id = options.id;
  511. }
  512. if (options.order) {
  513. this.option.order = options.order;
  514. }
  515. },
  516. //下拉刷新
  517. onPullDownRefresh() {
  518. this.loadData();
  519. },
  520. onShow() {
  521. this.loadData();
  522. },
  523. methods: {
  524. loadData() {
  525. this.DeverApi.get(this, 'order.info', this.option);
  526. },
  527. // 立即支付
  528. payment() {
  529. this.DeverApi.post('order.pay', this.option, r => {
  530. Pay.payment(r.order_num, r.pay, res => {
  531. this.Dever.success('支付成功', () => {
  532. this.loadData();
  533. })
  534. })
  535. });
  536. },
  537. open(key) {
  538. this.show[key] = true;
  539. },
  540. close(key) {
  541. this.show[key] = false;
  542. },
  543. showDelivery(item) {
  544. if (item.content) {
  545. this.delivery = item;
  546. this.open('delivery');
  547. }
  548. },
  549. // 确认发货
  550. finish() {
  551. this.Dever.confirm('确认已收到货?', () => {
  552. this.DeverApi.post('order.finish', this.option, r => {
  553. this.loadData();
  554. this.Dever.success('收货成功');
  555. });
  556. });
  557. },
  558. setRefund(index) {
  559. this.refund = index;
  560. },
  561. setRefundType(e) {
  562. this.applyRefund.type = e.id;
  563. this.applyType = e.name;
  564. },
  565. setRefundDescType(e) {
  566. this.applyRefund.desc_type = e.id;
  567. this.applyDescType = e.name;
  568. },
  569. setRefundDeliveryConfirm(e) {
  570. this.applyRefund.delivery_id = e.value[0].id;
  571. this.applyDelivery = e.value[0].name;
  572. this.setRefundDeliveryCancel()
  573. },
  574. setRefundDeliveryCancel() {
  575. this.show.applyRefundDelivery = false;
  576. },
  577. submitRefund() {
  578. /*
  579. if (this.applyRefund.cash <= 0) {
  580. return this.Dever.alert('请输入退款金额');
  581. }*/
  582. if (!this.applyRefund.type && this.applyRefund.type <= 0) {
  583. return this.Dever.alert('请选择退款类型');
  584. }
  585. if (!this.applyRefund.desc_type && this.applyRefund.desc_type <= 0) {
  586. return this.Dever.alert('请选择退款原因');
  587. }
  588. this.Dever.confirm('确认提交退款申请?', () => {
  589. this.DeverApi.post('order.refund', {
  590. id: this.option.id,
  591. cash: this.applyRefund.cash,
  592. type: this.applyRefund.type,
  593. desc_type: this.applyRefund.desc_type,
  594. desc: this.applyRefund.desc
  595. }, r => {
  596. this.show.applyRefund = false;
  597. this.Dever.success('提交成功,请等待工作人员审核');
  598. this.loadData();
  599. });
  600. });
  601. },
  602. submitRefundNumber() {
  603. if (!this.applyRefund.delivery_id) {
  604. return this.Dever.alert('请选择快递公司');
  605. }
  606. if (!this.applyRefund.number) {
  607. return this.Dever.alert('请输入退货单号');
  608. }
  609. this.Dever.confirm('确认提交退货单号?', () => {
  610. this.DeverApi.post('order.refundExpress', {
  611. id: this.option.id,
  612. refund_id: this.fetch.info.refund.id,
  613. delivery_id: this.applyRefund.delivery_id,
  614. number: this.applyRefund.number
  615. }, r => {
  616. this.show.applyRefundNumber = false;
  617. this.Dever.success('提交成功');
  618. this.loadData();
  619. });
  620. });
  621. },
  622. // 删除订单
  623. delorder() {
  624. return;
  625. this.Dever.confirm('确认删除订单?', res => {
  626. this.DeverApi.post('order.refundExpress', {
  627. id: this.option.id,
  628. refund_id: this.fetch.info.refund.id,
  629. delivery_id: this.applyRefund.delivery_id,
  630. number: this.applyRefund.number
  631. }, r => {
  632. this.show.applyRefundNumber = false;
  633. this.Dever.success('提交成功');
  634. this.loadData();
  635. });
  636. })
  637. },
  638. // 取消订单
  639. cancelOrder() {
  640. this.Dever.confirm('确认取消订单?', res => {
  641. this.DeverApi.post('order.cancel', this.option, r => {
  642. this.Dever.success('取消成功');
  643. this.loadData();
  644. });
  645. })
  646. },
  647. // 点击复制
  648. copy(content) {
  649. this.Dever.copy(content)
  650. },
  651. // 评价
  652. evaluate() {
  653. this.Dever.location('order/review?id=' + this.option.id);
  654. },
  655. onTime(e) {
  656. this.timeData = e
  657. },
  658. finishTime() {
  659. this.fetch.info.status = 9
  660. }
  661. },
  662. }
  663. </script>
  664. <style lang="scss">
  665. page {
  666. background: $page-color-base;
  667. }
  668. .order-detail .item text:first-child {
  669. width: 168rpx;
  670. text-align: right;
  671. display: inline-block;
  672. }
  673. /* 状态区 */
  674. .state-area {}
  675. /* 收货人 */
  676. .address-area {}
  677. /* 商品区 */
  678. .goods-area {
  679. &:last-child {
  680. margin-bottom: 0;
  681. }
  682. image {
  683. width: 180rpx;
  684. height: 180rpx;
  685. }
  686. .action-btn-group {
  687. display: flex;
  688. }
  689. .action-btn {
  690. width: 152rpx;
  691. height: inherit;
  692. line-height: inherit;
  693. margin: 0;
  694. margin-left: 20rpx;
  695. padding: 12rpx 0;
  696. font-size: $font-sm + 2upx;
  697. color: $font-color-dark;
  698. background: #fff;
  699. border-radius: 100px;
  700. /* #ifdef MP-QQ || MP-ALIPAY */
  701. border: 1px solid;
  702. /* #endif */
  703. &:after {
  704. border-radius: 100px;
  705. }
  706. &.main-btn {
  707. background: #fff9f9;
  708. color: $base-color;
  709. &:after {
  710. border-color: #f7bcc8;
  711. }
  712. }
  713. }
  714. }
  715. /* 订单数据区 */
  716. .order-area {
  717. .item {
  718. line-height: 66rpx;
  719. .copy {
  720. margin-left: 20rpx;
  721. padding: 10rpx 40rpx;
  722. background-color: #f1f1f1;
  723. border-radius: 40rpx;
  724. font-size: 24rpx;
  725. }
  726. }
  727. }
  728. /* 数据统计区 */
  729. .total-area {
  730. .item {
  731. line-height: 48rpx;
  732. text {
  733. padding-right: 16rpx;
  734. }
  735. }
  736. }
  737. /* 操作区 */
  738. .oper-area {
  739. width: 100%;
  740. height: 100rpx;
  741. background-color: #fff;
  742. position: fixed;
  743. z-index: 1;
  744. bottom: 0;
  745. left: 0;
  746. border-top: 1px solid #f0f0f0;
  747. .btn-area {
  748. font-size: $font-sm;
  749. color: $font-color-base;
  750. width: 96rpx;
  751. .iconfont {
  752. font-size: 40rpx;
  753. line-height: 48rpx;
  754. }
  755. }
  756. /* 操作按钮 */
  757. .action-btn {
  758. width: 156rpx;
  759. height: inherit;
  760. line-height: inherit;
  761. margin: 0;
  762. margin-left: 20rpx;
  763. padding: 12rpx 0;
  764. font-size: $font-sm + 2upx;
  765. color: $font-color-dark;
  766. background: #fff;
  767. border-radius: 100px;
  768. /* #ifdef MP-QQ || MP-ALIPAY */
  769. border: 1px solid;
  770. /* #endif */
  771. &:after {
  772. border-radius: 100px;
  773. }
  774. &.main-btn {
  775. background: #fff9f9;
  776. color: $base-color;
  777. &:after {
  778. border-color: #f7bcc8;
  779. }
  780. }
  781. }
  782. }
  783. .copy {
  784. margin-left: 30rpx;
  785. padding: 10rpx 40rpx;
  786. background-color: #f1f1f1;
  787. border-radius: 40rpx;
  788. font-size: 24rpx;
  789. }
  790. .circle {
  791. width: 20rpx;
  792. height: 20rpx;
  793. position: absolute;
  794. background: #d3d3d3;
  795. border-radius: 50%;
  796. top: 14rpx;
  797. }
  798. .circle.active {
  799. background: #ff6a6c !important;
  800. transform: scale(1.1);
  801. }
  802. .circle.active::after {
  803. content: ' ';
  804. background: rgba(255, 106, 108, 0.5) !important;
  805. -webkit-transform: scale(1.6);
  806. transform: scale(1.6);
  807. width: 20rpx;
  808. height: 20rpx;
  809. position: absolute;
  810. border-radius: 50%;
  811. }
  812. .refund-area {
  813. padding-top: 28rpx;
  814. padding-left: 28rpx;
  815. padding-right: 28rpx;
  816. }
  817. .time {
  818. display: inline-flex;
  819. align-items: center;
  820. &__custom {
  821. width: 22px;
  822. height: 22px;
  823. border-radius: 4px;
  824. /* #ifndef APP-NVUE */
  825. display: flex;
  826. /* #endif */
  827. justify-content: center;
  828. align-items: center;
  829. &__item {
  830. color: #fff;
  831. font-size: 12px;
  832. text-align: center;
  833. }
  834. }
  835. &__doc {
  836. padding: 0px 4px;
  837. }
  838. &__item {
  839. color: #606266;
  840. font-size: 15px;
  841. margin-right: 4px;
  842. }
  843. }
  844. </style>