apply-status - 副本.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. <template>
  2. <view class="content">
  3. <view class="statusDesc">
  4. <view class="status">
  5. {{applyInfo.refund_type==1?'仅退款':applyInfo.refund_type==2?'退货退款':''}}
  6. </view>
  7. <view class="applyDesc">
  8. <template v-if="applyInfo.status == 10">
  9. <view class="title">审核中</view>
  10. </template>
  11. <template v-if="applyInfo.status == 21">
  12. <view class="title">审核通过,正在退款中</view>
  13. </template>
  14. <template v-if="applyInfo.status == 22">
  15. <view class="title">审核失败</view>
  16. </template>
  17. <template v-if="applyInfo.status == 211">
  18. <view class="title">退款成功</view>
  19. </template>
  20. <template v-if="applyInfo.status == 31">
  21. <view class="title">审核通过,请填写退货快递单号</view>
  22. </template>
  23. <template v-if="applyInfo.status == 32">
  24. <view class="title">审核未通过</view>
  25. <view class="">
  26. 如有疑问,可联系客服
  27. </view>
  28. </template>
  29. <template v-if="applyInfo.status == 33">
  30. <view class="title">等待卖家收货确认</view>
  31. </template>
  32. <template v-if="applyInfo.status == 34">
  33. <view class="title">卖家已确认收货,退款中</view>
  34. </template>
  35. <template v-if="applyInfo.status == 344">
  36. <view class="title">退款成功</view>
  37. </template>
  38. </view>
  39. </view>
  40. <!-- 退货退款,输入运单号 -->
  41. <setExpress :refundId="applyInfo.id" v-if="applyInfo.status == 31" @done="setExpressSuccess"></setExpress>
  42. <view class="conD">
  43. <!-- <u-button class="returnBtn" :custom-style="returnBtnStyle" @click="goBack()">返回</u-button> -->
  44. <!--
  45. 10=待审核,21=卖家同意等待退款中,211=退款成功,
  46. 22=卖家驳回,31=卖家同意(用户填写退货单号),32=卖家驳回,33=等待卖家收货确认中,
  47. 34=卖家确认收货,验货没问题同意退款,344=退款成功
  48. -->
  49. <!-- <TitleOperate title="申请类型" padding="10rpx 30rpx 24rpx 30rpx"></TitleOperate> -->
  50. <!-- <view class="baseP">
  51. 申请类型:{{applyInfo.refund_type==1?'仅退款':applyInfo.refund_type==2?'退货退款':''}}
  52. </view> -->
  53. <view class="conbox">
  54. <TitleOperate title="售后商品" padding="30rpx 0 0"></TitleOperate>
  55. <template>
  56. <orderDetailGoodsCard v-for="(goods, index) in applyInfo.order_detail" :data="goods" :key="index"></orderDetailGoodsCard>
  57. </template>
  58. </view>
  59. <view class="conbox">
  60. <TitleOperate title="退款信息" padding="30rpx 0 30rpx"></TitleOperate>
  61. <view class="binfo">
  62. <view class="cell">
  63. <view class="label">服务编号</view>
  64. <view class="value">{{ applyInfo.refund_no}}</view>
  65. <view class="operate">
  66. <text class="copy" @click="$copyByUniappApi(applyInfo.refund_no)">复制</text>
  67. </view>
  68. </view>
  69. <view class="cell">
  70. <view class="label">退款原因</view>
  71. <view class="value">{{ applyInfo.reason}}</view>
  72. </view>
  73. <view class="cell">
  74. <view class="label">退款金额</view>
  75. <view class="value money">&yen;{{ applyInfo.refundFee}}</view>
  76. </view>
  77. <view class="cell">
  78. <view class="label">申请时间</view>
  79. <view class="value">{{ formatDateF(applyInfo.createtime*1000)}}</view>
  80. </view>
  81. <view class="contact">
  82. <button class="item serviceBtn" open-type="contact" >
  83. 联系客服
  84. </button>
  85. </view>
  86. </view>
  87. </view>
  88. <!-- <u-steps direction="column" :list="statusList[status]" :current="current" :active-color="activeColor"></u-steps> -->
  89. </view>
  90. </view>
  91. </template>
  92. <script>
  93. import { orderOperate } from '@/pages-mall/mixins/order-operate.js';
  94. import orderDetailGoodsCard from '@/pages-mall/components/order/orderdetail-goods-card.vue';
  95. import setExpress from './components/setExpress.vue'
  96. import { formatDate } from '@/utils/tools.js'
  97. // 组件
  98. export default {
  99. mixins: [orderOperate],
  100. components: {
  101. orderDetailGoodsCard,
  102. setExpress
  103. },
  104. data() {
  105. return {
  106. status: '1',
  107. current: 1,
  108. expressCode:null,
  109. activeColor:'#22ac38',
  110. applyInfo:{
  111. refund_type:null,
  112. status:null,
  113. order_detail:[],
  114. },
  115. returnBtnStyle: {
  116. marginTop: '30rpx',
  117. },
  118. statusList: {
  119. '1': [{
  120. name: '提交申请'
  121. }, {
  122. name: '审核中'
  123. },{
  124. name: '退款中'
  125. }, {
  126. name: '退款成功'
  127. }, ],
  128. '2': [{
  129. name: '提交申请'
  130. }, {
  131. name: '审核中'
  132. }, {
  133. name: '买家寄件'
  134. }, {
  135. name: '卖家处理'
  136. }, {
  137. name: '退款中'
  138. }, {
  139. name: '完成'
  140. }, ],
  141. },
  142. };
  143. },
  144. onLoad(opt) {
  145. console.log(opt);
  146. if(opt.refund_type){
  147. // if(opt.status=='all'){
  148. // this.status = '2'
  149. // this.refund_type = '2'
  150. // }else if(opt.status=='money'){
  151. // this.status = '1'
  152. // }else{
  153. // this.status = opt.status;
  154. // }
  155. this.applyInfo.refund_type = opt.refund_type;
  156. }
  157. if(opt.status){
  158. this.applyInfo.status = opt.status;
  159. }
  160. if(opt.applyInfo){
  161. console.log('applyInfo.refund_id>>>>>',this.applyInfo.order_refund_id);
  162. // 申请详情
  163. try{
  164. this.applyInfo = JSON.parse(decodeURIComponent(opt.applyInfo))
  165. console.log(this.applyInfo);
  166. console.log('》》》applyInfo.order_detail',this.applyInfo.order_detail);
  167. this.status = this.applyInfo.refund_type;
  168. /*
  169. 10=待审核,21=卖家同意等待退款中,211=退款成功,
  170. 22=卖家驳回,31=卖家同意(用户填写退货单号),32=卖家驳回,33=等待卖家收货确认中,
  171. 34=卖家确认收货,验货没问题同意退款,344=退款成功
  172. */
  173. if(['10'].includes(this.applyInfo.status+'')){
  174. this.current = 1;
  175. }
  176. if(['21'].includes(this.applyInfo.status+'')){
  177. this.current = 2;
  178. }
  179. if(['211'].includes(this.applyInfo.status+'')){
  180. this.current = 3;
  181. }
  182. if(['22'].includes(this.applyInfo.status+'')){
  183. this.statusList[this.status][1].name='审核未通过';
  184. this.activeColor = 'red';
  185. }
  186. if(['31'].includes(this.applyInfo.status+'')){
  187. this.current = 2;
  188. }
  189. if(['32'].includes(this.applyInfo.status+'')){
  190. this.statusList[this.status][1].name='审核未通过';
  191. this.activeColor = 'red';
  192. }
  193. if(this.applyInfo.status=='33'){
  194. this.current = 3;
  195. }
  196. if(this.applyInfo.status=='34'){
  197. this.current = 4;
  198. }
  199. if(this.applyInfo.status=='344'){
  200. this.current = 5;
  201. }
  202. console.log('this.current>>>>',this.current)
  203. }catch(e){
  204. console.log(e);
  205. uni.navigateBack({
  206. delta:1
  207. })
  208. }
  209. }
  210. },
  211. onBackPress() {
  212. uni.navigateBack({
  213. delta:-2
  214. })
  215. },
  216. methods: {
  217. formatDateF(v){
  218. return formatDate(v,'all');
  219. },
  220. goBack() {
  221. uni.navigateBack({
  222. delta: 1
  223. });
  224. },
  225. setExpressSuccess(){
  226. this.applyInfo.status = 33;
  227. this.current = 3;
  228. },
  229. /* expressCodeConfirm(){
  230. if(!this.expressCode){
  231. this.$u.toast('请输入物流单号')
  232. }else{
  233. this.$u.api.setExpressCodeAjax({
  234. expressCode:this.expressCode,
  235. refund_id:this.applyInfo.id,
  236. }).then(({code,data})=>{
  237. if(code==1){
  238. this.applyInfo.status = 33;
  239. this.current = 3;
  240. }
  241. })
  242. }
  243. }, */
  244. }
  245. };
  246. </script>
  247. <style lang="scss" scoped>
  248. .content {
  249. // padding: 30rpx;
  250. }
  251. .conbox {
  252. background-color: #fff;
  253. margin-bottom: 30rpx;
  254. padding: 0 30rpx;
  255. }
  256. .selgoodsb {
  257. text-align: center;
  258. .t {
  259. margin-bottom: 20rpx;
  260. color: #666;
  261. }
  262. }
  263. // .baseP{
  264. // font-size: 32rpx;
  265. // padding: 30rpx 50rpx;
  266. // color: $app-theme-color;
  267. // }
  268. .returnBtn{
  269. margin-top: 30rpx;
  270. }
  271. .statusDesc{
  272. position: relative;
  273. padding: 30rpx;
  274. background-color: $app-theme-color;
  275. color: $app-theme-text-white-color;
  276. margin-bottom: 24rpx;
  277. .title{
  278. font-size: 36rpx;
  279. margin-bottom: 50rpx;
  280. }
  281. .status {
  282. margin-bottom: 20rpx;
  283. font-size: 30rpx;
  284. }
  285. .desc {
  286. font-size: 26rpx;
  287. }
  288. }
  289. .binfo{
  290. // padding: 30rpx;
  291. }
  292. .cell {
  293. display: flex;
  294. justify-content: space-between;
  295. align-items: center;
  296. padding: 20rpx 0;
  297. .label {
  298. width: 204rpx;
  299. font-size: 28rpx;
  300. color: $app-theme-text-color;
  301. }
  302. .value {
  303. width: 320rpx;
  304. text-align: right;
  305. font-size: 28rpx;
  306. color: $app-theme-text-color;
  307. }
  308. .price{
  309. color: $app-theme-text-money-color;
  310. }
  311. .operate {
  312. width: 80rpx;
  313. text-align: right;
  314. .copy {
  315. font-size: 28rpx;
  316. color: $app-theme-color;
  317. }
  318. }
  319. }
  320. .contact{
  321. border-top: 1rpx solid #eee;
  322. padding: 20rpx;
  323. color: $app-theme-color;
  324. }
  325. .serviceBtn{
  326. background-color: transparent;
  327. padding: 0;
  328. border: none;
  329. line-height: 1.2;
  330. font-size: 30rpx;
  331. &::after{
  332. content: '';
  333. border: none;
  334. display: none;
  335. }
  336. }
  337. </style>