refundList.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. <template>
  2. <view>
  3. <ujp-navbar title="退费记录"></ujp-navbar>
  4. <view class="balance">
  5. <view class="balanceHead">
  6. <view>
  7. <view class="payPrice">
  8. <font>{{account.availableAmountSubIncome!=null ? account.availableAmountSubIncome.toFixed(2) : '0.00'}}</font><span>元</span>
  9. </view>
  10. <view class="tips">
  11. <p>充值退款(元)</p><u-icon name="question-line" custom-prefix="custom-icon" color="#00B962" size="32" @click="showtip = true"></u-icon>
  12. </view>
  13. </view>
  14. <view v-if="account.availableAmountIncome">
  15. <view class="payPrice">
  16. <font>{{account.availableAmountIncome!=null ? account.availableAmountIncome.toFixed(2) : '0.00'}}</font><span>元</span>
  17. </view>
  18. <view class="tips">
  19. <p>现金分红(元)</p><u-icon name="question-line" custom-prefix="custom-icon" color="#00B962" size="32" @click="showtip2 = true"></u-icon>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="balanceMain">
  24. <view class="balanceMain-title">
  25. <view class="title">
  26. <u-icon name="todo-fill" custom-prefix="custom-icon" color="#6BC6A7" size="40"></u-icon>
  27. <span>退费记录</span>
  28. </view>
  29. </view>
  30. <view class="refundList">
  31. <view class="refundList-item" v-for="(item,index) in items" :key="index" @click="refundItem(item)">
  32. <view class="refundList-row">
  33. <font>原路退回</font>
  34. <span :class=" 'state'+item.status ">{{item.statusText}}</span>
  35. </view>
  36. <view class="refundList-row" >
  37. <p>{{item.applicationTime}}</p>
  38. <p>{{item.refundAmount!=null ? item.refundAmount.toFixed(2) : '0.00'}}元</p>
  39. </view>
  40. </view>
  41. <!-- <view class="refundList-none">
  42. <u-image width="200px" height="200px" src="/static/img/none.svg"></u-image>
  43. </view> -->
  44. </view>
  45. </view>
  46. </view>
  47. <view>
  48. <u-modal v-model="show" :title="title" :content="content" :show-confirm-button="true" :show-cancel-button='true' @confirm="confirm"></u-modal>
  49. </view>
  50. <view>
  51. <u-modal v-model="showtip" :title="title" :show-confirm-button="true" confirm-text="知道了" confirm-color="#00B962">
  52. <view class="slot-content">
  53. <rich-text :nodes="content1"></rich-text>
  54. </view>
  55. </u-modal>
  56. <u-modal v-model="showtip2" :title="title" :show-confirm-button="true" confirm-text="知道了" confirm-color="#00B962">
  57. <view class="slot-content">
  58. <rich-text :nodes="content2"></rich-text>
  59. </view>
  60. </u-modal>
  61. </view>
  62. <view style="bottom:0;position:absolute;width: 100%;padding: 40rpx;" v-show="account.availableAmount>0">
  63. <u-button shape="circle" v-if="account.availableAmountIncome"
  64. style="background-color:#00b962;color:white" @click="gotoRefundInfo()">申请退款</u-button>
  65. <u-button shape="circle" v-else style="background-color:#00b962;color:white" @click="show=true">申请退款</u-button>
  66. </view>
  67. </view>
  68. </template>
  69. <script>
  70. let _self;
  71. import * as api from "@/apis/refund.js"
  72. export default {
  73. data() {
  74. return {
  75. elderMode:false,
  76. content2:`首次申请现金分红退费需填写收款人账户信息,申请成功后工作人员将在5~10个工作日内完成转账打款。`,
  77. content1:`本平台仅支持充值金额全额退费,申请成功后退费金额将于5个工作日内退还至您的充值账户.在本平台,三个月内的支付宝充值,微信支付可申请退费.<br />退费成功后,您可以在退费记录查看退费信息和审核进度.`,
  78. title:'提示',
  79. content:'是否确定提交退费申请?申请成功后退费金额将于5个工作日内退还至您的充值账户',
  80. show:false,
  81. showtip:false,
  82. showtip2:false,
  83. userId:'',
  84. account:{},
  85. items:[],
  86. }
  87. },
  88. onLoad(){
  89. _self = this;
  90. },
  91. onShow(){
  92. api.personAccount().then(function(res){
  93. if(res.result)
  94. {
  95. _self.account = res.data;
  96. }
  97. //('个人余额信息'+JSON.stringify(res));
  98. },function(err){
  99. uni.showToast({
  100. title: err,
  101. icon: "none"
  102. })
  103. ////('err'+JSON.stringify(err));
  104. });
  105. },
  106. onReady(){
  107. this.elderMode = this.carhelp.get('getElderModeClass') == '长辈模式';
  108. if(this.elderMode)
  109. this.theme('elder')
  110. else
  111. this.theme('standard')
  112. if (this.carhelp.getPersonInfo()) {
  113. this.userId = this.carhelp.getPersonInfo().id;
  114. //('userId'+this.userId)
  115. }
  116. let data = {pageIndex:1,pageSize:10};
  117. api.personAccountRefundList(data).then(function(res){
  118. if(res.result){
  119. //('res'+JSON.stringify(res));
  120. _self.items = res.data.data;
  121. for(let i = 0;i< _self.items.length;i++){
  122. if(_self.items[i].refundChannel == 'wechat')
  123. _self.items[i].refundChannelText = "微信"
  124. else if (_self.items[i].refundChannel == 'alipay')
  125. _self.items[i].refundChannelText = "支付宝"
  126. if(_self.items[i].status == '0')
  127. _self.items[i].statusText = "退款中"
  128. else if (_self.items[i].status == '1')
  129. _self.items[i].statusText = "退款成功"
  130. else if (_self.items[i].status == '2')
  131. _self.items[i].statusText = "退款拒绝"
  132. else if (_self.items[i].status == '3')
  133. _self.items[i].statusText = "退款失败"
  134. }
  135. // //('res'+JSON.stringify(_self.items));
  136. }
  137. },function(err){
  138. uni.showToast({
  139. title: err,
  140. icon: "none"
  141. })
  142. ////('err'+JSON.stringify(err));
  143. });
  144. },
  145. methods: {
  146. gotoRefundInfo(){
  147. uni.redirectTo({
  148. url:'/pages/user/finance/refundInfo'
  149. })
  150. },
  151. theme(type) {
  152. if(type == 'elder')
  153. {
  154. document.getElementsByTagName('body')[0].setAttribute('data-theme',type);
  155. }
  156. else
  157. {
  158. document.getElementsByTagName('body')[0].setAttribute('data-theme',type);
  159. }
  160. },
  161. refundItem(item){
  162. uni.navigateTo({
  163. url:'refundDet?id='+item.id
  164. })
  165. },
  166. confirm(){
  167. uni.showLoading({
  168. })
  169. let data = {
  170. amount:_self.account.availableAmount
  171. ,refundChannel:'wechat',
  172. applicationChannel:"E"
  173. }
  174. api.personAccountRefundApplication(data).then(function(res){
  175. uni.hideLoading()
  176. if(res.result){
  177. //('personAccountRefundApplication'+JSON.stringify(res));
  178. uni.redirectTo({
  179. url:'refundApp'
  180. })
  181. }
  182. },function(err){
  183. // uni.showToast({
  184. // title:err
  185. // })
  186. uni.hideLoading();
  187. uni.showModal({
  188. content:err,
  189. title:'提示',
  190. showCancel:false,
  191. confirmText:'知道了'
  192. })
  193. }
  194. );
  195. ////('confirm')
  196. },
  197. showTips(){
  198. }
  199. }
  200. }
  201. </script>
  202. <style lang="scss" scoped>
  203. @import "@/_theme.scss";
  204. .slot-content {
  205. @include themeify{
  206. font-size:themed('font-size2');
  207. }
  208. /* font-size: 28rpx;*/
  209. color: $u-content-color;
  210. padding-left: 30rpx;
  211. padding-right: 30rpx;
  212. padding-top: 40rpx;
  213. padding-bottom: 40rpx;
  214. }
  215. .refundList-none{
  216. display: flex;
  217. align-items: center;
  218. justify-content: center;
  219. }
  220. .balanceHead{
  221. background-color: #fff;
  222. padding: 48rpx 0;
  223. display: flex;
  224. flex-direction: row;
  225. align-items: center;
  226. justify-content: space-around;
  227. .payPrice{
  228. display: flex;
  229. align-items: flex-end;
  230. justify-content: center;
  231. font{
  232. /* font-size: 36px;
  233. line-height: 36px;*/
  234. @include themeify{
  235. font-size:themed('font-size13');
  236. line-height:themed('font-size13');
  237. }
  238. }
  239. }
  240. .tips{
  241. display: flex;
  242. align-items: center;
  243. margin-top: 8rpx;
  244. p{
  245. color:#999;
  246. margin-right: 8rpx;
  247. }
  248. }
  249. }
  250. .balanceMain{
  251. background-color: #fff;
  252. margin-top: 24rpx;
  253. .balanceMain-title{
  254. display: flex;
  255. align-items: center;
  256. justify-content: space-between;
  257. height: 96rpx;
  258. border-bottom: 2rpx solid #f7f7f7;
  259. padding: 0 32rpx;
  260. .title{
  261. display: flex;
  262. align-items: center;
  263. span{
  264. margin-left: 16rpx;
  265. /* font-size: 16px;*/
  266. @include themeify{
  267. font-size:themed('font-size3');
  268. font-weight: themed('fontWeight');
  269. letter-spacing: themed('letterSpacing');
  270. }
  271. }
  272. }
  273. }
  274. .refundList-item{
  275. padding: 12px 16px;
  276. .refundList-row{
  277. display: flex;
  278. align-items: center;
  279. justify-content: space-between;
  280. p{
  281. @include themeify{
  282. font-size:themed('font-size1');
  283. }
  284. /* font-size: 12px;*/
  285. color:#888;
  286. margin-top: 6rpx;
  287. }
  288. .state0{
  289. color:#FF9600;
  290. }
  291. .state1{
  292. color:#00B962;
  293. }
  294. .state2{
  295. color:red;
  296. }
  297. .state3{
  298. color:red;
  299. }
  300. }
  301. }
  302. }
  303. </style>