123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294 |
- <template>
- <view class="refund">
- <view class="shop-box">
- <view class="shop-name">
- {{info.shopInfo.shopName}}
- </view>
- <view class="address">
- {{info.shopInfo.address}}
- </view>
- </view>
- <view class="content info">
- <view class="order-info">
- <image class="icon" :src="info.goodsList[0].goodsInfo.goodsPath" mode=""></image>
- <view class="shop-info">
- <view class="title">
- {{info.goodsList[0].goodsInfo.goodsName}}
- </view>
- <view class="goods-desc">
- {{info.goodsList[0].goodsInfo.goodsDescribe}}
- </view>
- <view class="price"v-if="!isVisual">
- ¥{{info.goodsList[0].goodsInfo.platformPrice?info.goodsList[0].goodsInfo.platformPrice.price:info.goodsList[0].goodsInfo.realPrice}}
- </view>
- <view class="price" v-else>
- ¥{{info.payAmount}}
- </view>
-
- </view>
-
- </view>
- </view>
-
- <view class="content">
-
- <view class="item">
- <view class="label">
- 实付金额
- </view>
- <view class="value">
- <text class="red fs28">¥{{info.payAmount}}</text>
- </view>
- </view>
- <view class="notice">
- 1-3个工作日退还至原支付方,将以实际退款金额为准
- </view>
-
- </view>
-
- <view class="content">
- <view class="item">
- <view class="label">
- 说明
- </view>
- </view>
- <u--form labelPosition="left" errorType="toast" :model="query" :rules="rules" ref="query">
- <u-form-item prop="remark" :borderBottom="false" ref="item1">
- <textarea class="desc" v-model="query.remark" placeholder="请输入原因,我们将尽心为您服务"></textarea>
- </u-form-item>
-
- </u--form>
- </view>
- <button class="save-btn" type="default" :loading="loading" @click="submit">提交</button>
- </view>
- </template>
- <script>
- import {applyRefund} from '@/api/payment.js'
- export default {
- data() {
- return {
- loading:false,
- info: {},
- query:{
- "remark": "",
- "id": "",
-
- },
- rules:{
- 'remark':{
- required: true,
- message: '请输入申请原因',
- // blur和change事件触发检验
- trigger: ['blur', 'change'],
- },
- }
-
-
- }
- },
- methods: {
- submit() {
- this.$refs.query.validate().then(() => {
- if(this.loading) return
- this.loading = true
- applyRefund(this.query).then(res=>{
- this.loading = false
- if(res.state == 'Success'){
- // uni.showToast({
- // title:'申请成功',
- // icon:'success'
- // })
- uni.navigateBack()
- }
- })
- })
- }
- },
- onReady() {
- this.$refs.query.setRules(this.rules)
- },
- onLoad() {
- let that = this
- const eventChannel = this.getOpenerEventChannel();
- if(JSON.stringify(eventChannel) !=='{}'){
- eventChannel.on('orderInfo', function(data) {
- that.info = data
- that.query.id = data.goodsList[0].id
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .refund {
- background: #F9F9F9;
- min-height: 100vh;
- padding-top: 20rpx;
- padding-bottom: 80rpx;
- .save-btn {
- width: 688rpx;
- height: 80rpx;
- line-height: 80rpx;
- text-align: center;
- background: $uni-color-primary;
- box-shadow: inset 0rpx 6rpx 12rpx 2rpx rgba(255, 255, 255, 0.16);
- border-radius: 46rpx 46rpx 46rpx 46rpx;
- position: fixed;
- bottom: 60rpx;
- left: 50%;
- color: #fff;
- font-size: 28rpx;
- font-weight: bold;
- transform: translateX(-50%);
- }
- .shop-box {
- width: 690rpx;
- margin: 0 30rpx 20rpx;
- padding: 24rpx 24rpx 30rpx;
- background: #fff;
- border-radius: 16rpx;
- box-sizing: border-box;
- .shop-name{
- font-weight: 600;
- font-size: 32rpx;
- color: #181818;
- width: 100%;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .address{
- font-weight: 300;
- font-size: 24rpx;
- color: #AAAAAA;
- margin-top: 20rpx;
- width: 100%;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
- .content {
- margin: 0 30rpx 20rpx;
- padding: 24rpx;
- border-radius: 16rpx;
- background: #fff;
- .item {
- display: flex;
- align-items: center;
- justify-content: space-between;
- // margin-top: 28rpx;
- .label {
- font-weight: 500;
- font-size: 28rpx;
- color: #222222;
- }
- .value {
- color: #999999;
- font-size: 28rpx;
- }
- }
- .notice {
- margin-top: 16rpx;
- font-weight: 400;
- color: #AAAAAA;
- font-size: 24rpx;
- }
- .desc {
- width: 100%;
- height: 268rpx;
- border-radius: 14rpx;
- border: 2rpx solid #DDDDDD;
- font-size: 24rpx;
- padding: 24rpx;
- box-sizing: border-box;
- margin-top: 16rpx;
- }
- }
- .black {
- color: #222222 !important;
- }
- .red {
- color: red !important;
- }
- .fs28 {
- font-size: 28rpx !important;
- font-weight: bold;
- }
- .info {
- .order-info {
- display: flex;
- .icon {
- width: 164rpx;
- height: 164rpx;
- border-radius: 16rpx;
- }
- .shop-info {
- display: flex;
- flex-direction: column;
- justify-content: space-evenly;
- margin-left: 24rpx;
- .title {
- color: #181818;
- font-size: 28rpx;
- }
- .goods-desc{
- font-size: 24rpx;
- color: #AAAAAA;
- width: 450rpx;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- margin-top: 10rpx;
- }
- .price {
- font-weight: 600;
- font-size: 32rpx;
- color: #FF4D3A;
- }
- .code-btn {
- width: 88rpx;
- height: 32rpx;
- line-height: 32rpx;
- text-align: center;
- font-size: 22rpx;
- color: #FC8945;
- border-radius: 0rpx 16rpx 0rpx 16rpx;
- border: 2rpx solid #FC8945;
- }
- }
- }
- }
- }
- </style>
|