refundList.vue 9.1 KB

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