123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- <template>
- <view class="pages">
- <view class="" :style="{height: navHeight+'px' }"></view>
- <view class="navbar-box">
- <u-navbar title="开具发票" :safeAreaInsetTop="true" @leftClick="leftClick" :titleStyle="{color:'#fff'}" leftIconColor="#fff" bgColor="#EF1818"></u-navbar>
- </view>
- <view class="page-wrap">
- <view class="box base-info">
- <view class="title u-flex u-row-between">
- <text>申请退款金额</text>
- <text>¥ {{realPrice}}</text>
- </view>
- <view class="con">
- (预计3个工作日内退回)
- </view>
- </view>
- <view class="box reason">
- <view class="title">退款原因(必填)</view>
- <view class="select-reason u-flex u-row-between" @click="reasonshow=true">
- <text>{{refundReason||'请选择原因'}}</text>
- <u-icon name="arrow-down" color="#E5E5E5" size="36rpx"></u-icon>
- </view>
- <u-picker :show="reasonshow" :columns="reasonList" @confirm="confirmReason" @cancel="reasonshow=false"></u-picker>
- </view>
- </view>
- <view class="btn-wrap">
- <view class="inner">
- <view class="btn" @click="submit">确认退款</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import { systemInfo } from "@/mixin.js";
- export default {
- mixins: [systemInfo], // 使用mixin
- data() {
- return {
- staticUrl:this.$commonConfig.staticUrl,
- orderId:'',
- realPrice:'',
- refundReason:'',
- reasonshow:false,
- reasonList:[
- [
- '选错场次',
- '不想看了',
- ]
- ],
- params:{
-
- }
-
- }
- },
- onShow() {
- },
- onLoad(page) {
- console.log('page',page);
- this.orderId = page.id;
- this.realPrice = page.realPrice;
- this.getSystemInfo();
- },
- methods: {
- leftClick(e){
- let pages = getCurrentPages();
- if(pages.length==1){
- uni.$u.route('/pages/index/index')
- }else{
- uni.navigateBack()
- };
- },
- confirmReason(e){
- console.log('confirmReason',e.value[0]);
- this.refundReason = e.value[0];
- this.reasonshow = false;
- },
- submit(){
- if(!this.refundReason){
- uni.$u.toast('请选择原因')
- return
- }
- let params = {
- orderId:this.orderId,
- refundReason:this.refundReason
- }
- this.$u.api.refundSubmit(params).then(res=>{
- uni.$u.toast(res.msg)
- uni.navigateBack()
- console.log('res',res.data);
- }).catch(err=>{
- console.log('refundSubmit',err);
- })
- }
- }
- }
- </script>
- <style>
- page{background-color: #F7F7F9;}
- </style>
- <style lang="scss" scoped>
- .page-wrap{
- padding: 32rpx 16rpx;
- }
- .box{
- margin-bottom: 24rpx;
- background: #FFFFFF;
- box-shadow: 0rpx 0rpx 20rpx 2rpx rgba(221,221,221,0.5);
- border-radius: 20rpx;
- padding: 36rpx 24rpx;
- .title{
- font-size: 28rpx;
- font-weight: 500;
- color: #2D2D2D;
- margin-bottom: 38rpx;
- }
- }
- .base-info{
- .con{
- font-size: 24rpx;
- font-weight: 400;
- color: #7F7F7F;
- text-align: right;
- }
- }
- .reason{
- .select-reason{
- height: 64rpx;
- line-height: 64rpx;
- border-radius: 8rpx;
- border: 2rpx solid #E5E5E5;
- padding: 0 24rpx;
- font-size: 24rpx;
- font-weight: 400;
- color: #363636;
- }
- }
- .btn-wrap{
- height: 92rpx;
- .inner{
- position: fixed;
- left: 0;
- right: 0;
- bottom: 66rpx;
- }
- .btn{
- height: 92rpx;
- line-height: 92rpx;
- width:80%;
- margin: 0 auto;
- background: linear-gradient(90deg, #FF7878 0%, #ED0000 100%);
- border-radius: 46rpx;
- font-size: 28rpx;
- font-weight: 400;
- color: #FFFFFF;
- text-align: center;
- }
- }
- </style>
|