refundDetail.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. <template>
  2. <view class="content">
  3. <view class="box">
  4. <view class="hflex acenter jbetween">
  5. <view class="box_title" v-if="pageData.refund_status == 2">退款成功</view>
  6. <view class="box_title" v-if="pageData.refund_status == 3">退款关闭</view>
  7. <view class="box_title" v-if="pageData.refund_status == 1">申请中,等待商家审核</view>
  8. <view class="box_title" v-if="pageData.refund_status == 0">撤销退款申请</view>
  9. <view class="box_title" v-if="pageData.refund_status == 2">¥{{pageData.refund_money}}</view>
  10. <view class="hflex acenter blue_bg2" v-if="pageData.refund_status == 1">
  11. <view class="blue_bg">剩余审核时间</view>
  12. <view class="">
  13. <u-count-down autoStart :time="time" format="mm:ss" @change="onChange">
  14. <view class="time">
  15. <!-- <text class="time__item">{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}&nbsp;小时</text> -->
  16. <text class="time__item">{{ timeData.minutes>10?timeData.minutes:'0'+timeData.minutes }}&nbsp;分钟</text>
  17. <text class="time__item">{{ timeData.seconds>10?timeData.seconds:'0'+timeData.seconds }}&nbsp;秒</text>
  18. </view>
  19. </u-count-down>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="box_subtitle">{{pageData.refund_time}}</view>
  24. <view class="hflex acenter jbetween" style="padding-top: 32rpx;" v-if="pageData.refund_status == 2">
  25. <view class="left">退回银行卡</view>
  26. <view class="left">¥{{pageData.refund_money}}</view>
  27. </view>
  28. </view>
  29. <view class="box hflex acenter jbetween" @click="toNegotiation">
  30. <view class="box_title">协商历史</view>
  31. <u-icon name="arrow-right" size="20" color="000"></u-icon>
  32. </view>
  33. <view class="box">
  34. <view class="title">退款信息</view>
  35. <view class="hflex acenter jbetween" v-for="(item,index) in pageData.goods_item" :key="index">
  36. <view class="img_box">
  37. <image class="img" :src="item.goods_cover" mode="aspectFill"></image>
  38. </view>
  39. <view class="vflex img_right">
  40. <view class="hflex acenter">
  41. <view class="name text_hide">{{item.goods_name}}</view>
  42. <view class="name">¥{{item.price_selling}}</view>
  43. </view>
  44. <view class="hflex jbetween" style="padding: 20rpx 0 0;">
  45. <view class="norm">{{item.goods_spec}}</view>
  46. <view class="left_text">X{{item.stock_sales}}</view>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="hflex acenter jbetween cell">
  51. <view class="left">退款原因</view>
  52. <view class="right">{{pageData.refund_reason}}</view>
  53. </view>
  54. <view class="hflex acenter jbetween cell">
  55. <view class="left">退款备注</view>
  56. <view class="right">{{pageData.refund_desc ? pageData.refund_desc : '-'}}</view>
  57. </view>
  58. <view class="hflex acenter jbetween cell">
  59. <view class="left">退款金额</view>
  60. <view class="right">¥{{pageData.refund_money}}</view>
  61. </view>
  62. <view class="hflex acenter jbetween cell">
  63. <view class="left">申请时间</view>
  64. <view class="right">{{pageData.refund_time}}</view>
  65. </view>
  66. <view class="hflex acenter jbetween cell">
  67. <view class="left">退款编号</view>
  68. <view class="hflex acenter">
  69. <view class="right">{{pageData.order_no}}</view>
  70. <view style="margin: 0 8rpx;">|</view>
  71. <view class="text_red" @click="copy(pageData.order_no)">复制</view>
  72. </view>
  73. </view>
  74. <view class="vflex cell">
  75. <view class="left">退款凭证</view>
  76. <view class="hflex acenter">
  77. <block v-for="(item,index) in pageData.refund_nr" :key="index">
  78. <image :src="item" class="img" mode="aspectFill"></image>
  79. </block>
  80. </view>
  81. </view>
  82. </view>
  83. <u-popup :show="show" :round="10" mode="center" @close="close">
  84. <view class="popu">
  85. <view class="hflex acenter jbetween popu_top">
  86. <view></view>
  87. <view class="popu_title">填写快递信息</view>
  88. <image src="https://ship.shipcc.cn/common/close.png" style="width: 48rpx;height: 48rpx;"></image>
  89. </view>
  90. <u-input v-model="company.express_name" border="none" placeholder="请填写快递公司名称"></u-input>
  91. <u-input v-model="company.express_no" border="none" placeholder="请填写快递单号"></u-input>
  92. <view class="popu_btn hflex acenter jbetween" @click="save">保存</view>
  93. </view>
  94. </u-popup>
  95. </view>
  96. </template>
  97. <script>
  98. import $api from '@/static/js/api.js'
  99. var that = ''
  100. export default {
  101. data() {
  102. return {
  103. id: '',
  104. pageData: {
  105. },
  106. timeData: {},
  107. time: 0,
  108. show: false,
  109. company: {
  110. express_name: '',
  111. express_no: ''
  112. }
  113. }
  114. },
  115. onLoad(options) {
  116. that = this
  117. that.id = options.id
  118. that.getData()
  119. },
  120. methods: {
  121. getData() {
  122. $api.req({
  123. url: '/data/api.Order/order_info',
  124. method: 'POST',
  125. data: {
  126. order_id: that.id
  127. }
  128. }, function(res) {
  129. if(res.code == 1) {
  130. that.pageData = res.data
  131. for(var i=0;i<that.pageData.goods_item.length;i++) {
  132. that.pageData.goods_item[i].goods_spec = $api.resetspec(that.pageData.goods_item[0].goods_spec)
  133. }
  134. that.pageData.refund_nr = that.pageData.refund_nr.split("|")
  135. that.computTime()
  136. }
  137. })
  138. },
  139. // 倒计时
  140. onChange(e) {
  141. that.timeData = e
  142. },
  143. // 计算倒计时
  144. computTime() {
  145. var date = new Date(that.pageData.refund_time).getTime() + ( that.pageData.refund_time_ing * 1000);
  146. console.log(date);
  147. var nowDate = new Date().getTime()
  148. console.log(nowDate);
  149. that.time = date - nowDate
  150. console.log(that.time);
  151. },
  152. // 复制订单号
  153. copy(value) {
  154. uni.setClipboardData({
  155. data: value,
  156. success: function () {
  157. $api.info('复制成功')
  158. }
  159. });
  160. },
  161. cancel() {
  162. $api.req({
  163. url: '/data/api.Order/cancel_refund',
  164. method: 'POST',
  165. data: {
  166. order_id: that.pageData.id
  167. }
  168. }, function(res) {
  169. if(res.code == 1) {
  170. $api.info(res.info)
  171. that.getData()
  172. }
  173. })
  174. },
  175. open() {
  176. that.show = true
  177. },
  178. close() {
  179. that.show = false
  180. },
  181. save() {
  182. var data = that.company
  183. $api.req({
  184. url: '/data/api.Order/refund_return',
  185. method: 'POST',
  186. data: data
  187. }, function(res) {
  188. if(res.code == 1) {
  189. $api.info(res.info)
  190. that.close()
  191. }
  192. })
  193. },
  194. toNegotiation() {
  195. $api.jump('/page_shop/pages/order/negotiation?id=' + that.id)
  196. }
  197. },
  198. }
  199. </script>
  200. <style lang="scss" scoped>
  201. .content::v-deep {
  202. background: #F4F4F4;
  203. padding: 20rpx 30rpx;
  204. .box {
  205. margin-top: 20rpx;
  206. width: 100%;
  207. background: #FFFFFF;
  208. border-radius: 24rpx;
  209. box-sizing: border-box;
  210. padding: 24rpx 20rpx;
  211. .box_title {
  212. font-size: 32rpx;
  213. font-weight: 500;
  214. color: #222222;
  215. line-height: 44rpx;
  216. }
  217. .blue_bg {
  218. width: 124rpx;
  219. height: 32rpx;
  220. background: #506DFF;
  221. border-radius: 18rpx 0px 18rpx 18rpx;
  222. font-size: 16rpx;
  223. text-align: center;
  224. font-weight: 400;
  225. color: #FFFFFF;
  226. line-height: 32rpx;
  227. }
  228. .blue_bg2 {
  229. /* width: 256rpx;
  230. height: 32rpx; */
  231. background: #E7EBFF;
  232. border-radius: 18rpx;
  233. font-size: 16rpx;
  234. font-weight: bold;
  235. color: #222222;
  236. line-height: 32rpx;
  237. box-sizing: border-box;
  238. padding: 10rpx 24rpx 0 0;
  239. }
  240. .time {
  241. padding-left: 16rpx;
  242. }
  243. .subTitle {
  244. font-size: 24rpx;
  245. font-weight: 400;
  246. color: #888888;
  247. line-height: 34rpx;
  248. }
  249. .box_subtitle {
  250. font-size: 22rpx;
  251. font-weight: 400;
  252. color: #999999;
  253. line-height: 26rpx;
  254. padding: 8rpx 0 0;
  255. }
  256. .statue {
  257. padding: 24rpx 0;
  258. font-size: 32rpx;
  259. font-weight: 500;
  260. line-height: 44rpx;
  261. color: #FF5050;
  262. }
  263. .title {
  264. font-size: 30rpx;
  265. font-weight: 500;
  266. color: #333333;
  267. line-height: 42rpx;
  268. padding: 24rpx 0 14rpx;
  269. }
  270. .img_box {
  271. margin-right: 20rpx;
  272. .img {
  273. width: 180rpx;
  274. height: 180rpx;
  275. border-radius: 16rpx;
  276. }
  277. }
  278. .img_right {
  279. width: calc(100% - 200rpx);
  280. }
  281. .name {
  282. font-size: 30rpx;
  283. font-weight: 500;
  284. color: #222222;
  285. line-height: 42rpx;
  286. }
  287. .norm {
  288. max-width: 400rpx;
  289. width: max-content;
  290. // height: max-content;
  291. background: #F5F5F5;
  292. border-radius: 12rpx;
  293. box-sizing: border-box;
  294. padding: 12rpx 12rpx 6rpx;
  295. font-size: 20rpx;
  296. font-weight: 400;
  297. color: #888888;
  298. line-height: 28rpx;
  299. text-overflow: ellipsis;
  300. overflow: hidden;
  301. display: -webkit-box;
  302. -webkit-box-orient: vertical;
  303. box-orient: vertical;
  304. line-clamp: 2;
  305. -webkit-line-clamp: 2;
  306. }
  307. .left_text {
  308. font-size: 24rpx;
  309. font-weight: 500;
  310. color: #888888;
  311. line-height: 28rpx;
  312. }
  313. .cell {
  314. padding: 15rpx 0;
  315. .left {
  316. font-size: 26rpx;
  317. font-weight: 400;
  318. color: #232323;
  319. line-height: 36rpx;
  320. white-space: nowrap;
  321. }
  322. .right {
  323. font-size: 26rpx;
  324. font-weight: 400;
  325. color: #888888;
  326. line-height: 36rpx;
  327. }
  328. .text_red {
  329. color: #EE5850;
  330. }
  331. .img {
  332. width: 180rpx;
  333. height: 180rpx;
  334. border-radius: 16rpx;
  335. margin: 0 18rpx 18rpx 0;
  336. }
  337. }
  338. .box_bg {
  339. background: #F4F4F4;
  340. border-radius: 20px;
  341. box-sizing: border-box;
  342. padding: 22rpx 20rpx 32rpx;
  343. .bg_text {
  344. font-size: 24rpx;
  345. font-weight: 400;
  346. color: #555555;
  347. line-height: 34rpx;
  348. }
  349. .box_btn1 {
  350. height: 60rpx;
  351. background: #FFFFFF;
  352. border-radius: 30rpx;
  353. border: 1px solid #9B9B9B;
  354. padding: 0 36rpx;
  355. font-size: 26rpx;
  356. font-weight: 400;
  357. color: #222222;
  358. line-height: 36rpx;
  359. }
  360. .box_btn2 {
  361. border: 1px solid #9B9B9B;
  362. color: #999999;
  363. }
  364. }
  365. }
  366. .popu {
  367. background: #FFFFFF;
  368. border-radius: 28px;
  369. width: 610rpx;
  370. margin: 0 auto;
  371. box-sizing: border-box;
  372. padding: 0 30rpx;
  373. .popu_top {
  374. padding: 36rpx 0 52rpx;
  375. .popu_title {
  376. font-size: 36rpx;
  377. font-weight: 500;
  378. color: #222222;
  379. line-height: 50rpx;
  380. }
  381. }
  382. .u-input {
  383. width: 100%;
  384. height: 84rpx;
  385. background: #F4F4F4;
  386. border-radius: 12rpx;
  387. padding: 0 20rpx !important;
  388. margin-bottom: 36rpx;
  389. }
  390. .popu_btn {
  391. margin: 24rpx auto 58rpx;
  392. width: 310rpx;
  393. height: 80rpx;
  394. background: #506DFF;
  395. border-radius: 42rpx;
  396. font-size: 32rpx;
  397. font-weight: 500;
  398. color: #FFFFFF;
  399. line-height: 44rpx;
  400. }
  401. }
  402. }
  403. </style>