orderAfterSale.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. <template>
  2. <view class="">
  3. <view class="applyAfterSale-top">
  4. <view class="l">
  5. <view class="" style="font-size: 36rpx;font-weight: 600;color: #333333;">
  6. {{order.good_name?order.good_name:''}}
  7. </view>
  8. <view class="" style="font-size: 22rpx;margin: 24rpx 0;">
  9. 出行日期:{{order.start_at?order.start_at:''}}
  10. </view>
  11. <view class="" style="font-size: 22rpx;">
  12. 数量 {{order.number?order.number:''}}
  13. </view>
  14. </view>
  15. <view class="r">
  16. <image :src="order.cover_picture" mode="aspectFill"></image>
  17. <view class="" style="margin-top: 20rpx;">
  18. <text style="font-size: 22rpx;">订单金额</text><text
  19. style="font-size: 32rpx;font-weight: 600;">¥{{order.amount?order.amount:''}}</text>
  20. </view>
  21. </view>
  22. </view>
  23. <!-- 待退款 -->
  24. <view :class="state==0?'afterSale-center':'afterSale-center-success'">
  25. <view class="" style="font-size: 26rpx;">
  26. 申请时间:{{orderinfo.created_at.slice(0,10)?orderinfo.created_at.slice(0,10):''}}
  27. </view>
  28. <view class="form-item">
  29. <view class="">
  30. 退款原因
  31. </view>
  32. <view class="r">
  33. {{orderinfo.reason?orderinfo.reason:''}}
  34. </view>
  35. </view>
  36. <view class="form-item">
  37. <view class="">
  38. 退款金额
  39. </view>
  40. <view class="r">
  41. ¥{{orderinfo.amount?orderinfo.amount:''}}
  42. </view>
  43. </view>
  44. <view class="form-item">
  45. <view class="">
  46. 联系方式
  47. </view>
  48. <view class="r">
  49. {{orderinfo.phone?orderinfo.phone:''}}
  50. </view>
  51. </view>
  52. <view class="" style="margin: 32rpx 0;">
  53. 备注信息
  54. </view>
  55. <view class="" style="color: #101010;">
  56. {{orderinfo.memo?orderinfo.memo:"暂无"}}
  57. </view>
  58. <view class="image" style="margin: 30rpx 0;margin-top: 40rpx;">
  59. <view class="">
  60. 图片凭证
  61. </view>
  62. <view v-if="orderinfo.picture.length==0" style="margin: 30rpx 0;">暂无</view>
  63. <view class="imagebox">
  64. <view v-for="(item,index) in orderinfo.picture" :key="index" >
  65. <image :src="item" mode="aspectFill"></image>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. <!-- 成功退款 -->
  71. <view class="afterSale-center" v-if="orderinfo.status==2">
  72. <view class="" style="font-size: 26rpx;">
  73. 申请时间:{{orderinfo.created_at.slice(0,10)?orderinfo.created_at.slice(0,10):''}}
  74. </view>
  75. <view class="form-item">
  76. <view class="">
  77. 处理结果
  78. </view>
  79. <view class="r">
  80. {{orderinfo.feedback_status_text?orderinfo.feedback_status_text:''}}
  81. </view>
  82. </view>
  83. <view class="form-item">
  84. <view class="">
  85. 结果反馈
  86. </view>
  87. <view class="r">
  88. {{orderinfo.feedback_content?orderinfo.feedback_content:''}}
  89. </view>
  90. </view>
  91. <view class="image" style="margin: 40rpx 0;">
  92. <view class="">
  93. 反馈截图
  94. </view>
  95. <view class="imagebox">
  96. <view v-for="(item,index) in feedback_picture" :key="index">
  97. <image :src="item" mode="aspectFill"></image>
  98. </view>
  99. </view>
  100. <view v-if="feedback_picture.length==0" style="margin: 30rpx 0;">暂无</view>
  101. </view>
  102. </view>
  103. <view style="padding-bottom: 140rpx;"></view>
  104. <view class="call" v-if="orderinfo.status==2" @click="open">
  105. 联系客服
  106. </view>
  107. <view class="navbar" v-if="orderinfo.status==1">
  108. 待平台处理
  109. </view>
  110. <u-popup :show="show" @close="close" @open="open" mode="bottom" >
  111. <view class="servierbox">
  112. <view @click="tabCopymsg(1)" class="tx bor">
  113. <text>电话:{{service.phone?service.phone:""}}</text>
  114. </view>
  115. <view @click="tabCopymsg(2)" class="tx">
  116. <text>微信:{{service.weixin?service.weixin:""}}</text>
  117. </view>
  118. </view>
  119. </u-popup>
  120. </view>
  121. </template>
  122. <script>
  123. export default {
  124. data() {
  125. return {
  126. // 退款进度 0待退框 1已退框
  127. state: 0,
  128. id: 0,
  129. orderinfo: '',
  130. order: '',
  131. feedback_picture: '',
  132. service: '',
  133. show: false
  134. }
  135. },
  136. onLoad(options) {
  137. let data = uni.getStorageSync("data")
  138. this.service = data[5].value.service
  139. if (options.id) {
  140. this.id = options.id
  141. }
  142. this.init()
  143. // if(options.id==0){
  144. // this.state=0
  145. // }else if(options.id==1){
  146. // this.state=1
  147. // }
  148. },
  149. methods: {
  150. open(){
  151. this.show=true
  152. },
  153. close(){
  154. this.show=false
  155. },
  156. tabCopymsg(i){
  157. if(i==1){
  158. uni.makePhoneCall({
  159. phoneNumber: this.service.phone,
  160. });
  161. }else if(i==2){
  162. uni.setClipboardData({
  163. data: this.service.weixin,
  164. success: function () {
  165. }
  166. });
  167. }
  168. },
  169. init() {
  170. uni.$u.http.post('/api/refund/show', {
  171. id: Number(this.id)
  172. }, {
  173. custom: {
  174. auth: true
  175. }
  176. }).then((res) => {
  177. this.orderinfo = res
  178. this.order = res.order
  179. this.feedback_picture = res.feedback_picture.split(",")
  180. console.log(this.feedback_picture)
  181. }).catch((err) => {
  182. console.log(err)
  183. })
  184. },
  185. }
  186. }
  187. </script>
  188. <style lang="less">
  189. button {
  190. padding: 0;
  191. margin: 0;
  192. }
  193. button::after {
  194. padding: 0;
  195. margin: 0;
  196. border: none;
  197. }
  198. .servierbox{
  199. padding: 20rpx 0;
  200. .tx{
  201. padding: 40rpx 0;
  202. text-align: center;
  203. }
  204. .bor{
  205. border-bottom: 1rpx solid #F4F4F4;
  206. }
  207. }
  208. page {
  209. background-color: #F4F4F4;
  210. color: #666666;
  211. font-size: 30rpx;
  212. }
  213. .applyAfterSale-top {
  214. margin: 24rpx 0 0;
  215. padding: 40rpx 30rpx;
  216. background: #FFFFFF;
  217. box-shadow: 0px 2rpx 4px 0px rgba(0, 0, 0, 0.02);
  218. border-radius: 16rpx 56rpx 8rpx 8rpx;
  219. display: flex;
  220. justify-content: space-between;
  221. align-items: center;
  222. .r {
  223. text-align: right;
  224. }
  225. image {
  226. width: 140rpx;
  227. height: 91rpx;
  228. border-radius: 6rpx;
  229. }
  230. }
  231. .afterSale-center {
  232. border-radius: 8rpx 8rpx 16rpx 56rpx;
  233. background-color: #FFFFFF;
  234. padding: 30rpx;
  235. margin: 24rpx 0;
  236. .form-item {
  237. display: flex;
  238. justify-content: space-between;
  239. align-items: center;
  240. // margin: 20rpx 0;
  241. border-bottom: 1rpx solid #E3E3E3;
  242. padding: 40rpx 0;
  243. .r {
  244. width: 50%;
  245. text-align: left;
  246. color: #101010;
  247. }
  248. }
  249. .image {
  250. .imagebox {
  251. display: inline-block;
  252. display: flex;
  253. flex-direction: row;
  254. }
  255. image {
  256. margin-right: 20rpx;
  257. width: 217rpx;
  258. height: 217rpx;
  259. border-radius: 8rpx 24rpx 8rpx 24rpx;
  260. margin-top: 20rpx;
  261. }
  262. }
  263. }
  264. .afterSale-center-success {
  265. border-radius: 8rpx;
  266. background-color: #FFFFFF;
  267. padding: 30rpx;
  268. margin: 24rpx 0;
  269. .form-item {
  270. display: flex;
  271. justify-content: space-between;
  272. align-items: center;
  273. // margin: 20rpx 0;
  274. border-bottom: 1rpx solid #E3E3E3;
  275. padding: 40rpx 0;
  276. .r {
  277. width: 50%;
  278. text-align: left;
  279. color: #101010;
  280. }
  281. }
  282. .image {
  283. image {
  284. width: 217rpx;
  285. height: 217rpx;
  286. border-radius: 8rpx 24rpx 8rpx 24rpx;
  287. margin-top: 20rpx;
  288. }
  289. }
  290. }
  291. .navbar {
  292. // margin-top: 104rpx;
  293. width: 100%;
  294. height: 104rpx;
  295. line-height: 104rpx;
  296. background: #FFFFFF;
  297. border-radius: 16rpx 16rpx 0px 0px;
  298. position: fixed;
  299. left: 0;
  300. bottom: 0;
  301. text-align: center;
  302. // margin: 0 auto;
  303. }
  304. .call {
  305. width: 100%;
  306. height: 104rpx;
  307. line-height: 104rpx;
  308. background: #FFFFFF;
  309. border-radius: 16rpx 16rpx 0px 0px;
  310. text-align: center;
  311. // margin: 40rpx 0;
  312. position: fixed;
  313. bottom: 0;
  314. }
  315. </style>