|
|
@@ -1,81 +1,89 @@
|
|
|
<template>
|
|
|
<view class="app-content">
|
|
|
- <view style="padding:30upx 30upx 120upx 30upx;">
|
|
|
- <view class="flex refund-item">
|
|
|
- <view class="refund-label">退款方式:</view>
|
|
|
- <view class="flex list">
|
|
|
- <view class="flex" @tap="refundType=1" >
|
|
|
- <view class="flex-center radioBtn" :class="refundType==1?'active':''">
|
|
|
- </view>退货并退款</view>
|
|
|
- <view style="margin-left: 30upx" class="flex" @tap="refundType=2">
|
|
|
- <view class="flex-center radioBtn" :class="refundType==1?'':'active'">
|
|
|
- </view>仅退款(货损)</view>
|
|
|
+ <view style="padding:30upx 30upx 140upx 30upx;">
|
|
|
+ <view class="flex refund-item">
|
|
|
+ <view class="refund-label">退款方式:</view>
|
|
|
+ <view class="flex list">
|
|
|
+ <view class="flex" @tap="refundType=1" >
|
|
|
+ <view class="flex-center radioBtn" :class="refundType==1?'active':''">
|
|
|
+ </view>退货并退款</view>
|
|
|
+ <view style="margin-left:50upx" class="flex" @tap="refundType=2">
|
|
|
+ <view class="flex-center radioBtn" :class="refundType==1?'':'active'">
|
|
|
+ </view>仅退款</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="refund-item-list" v-if="refundType==1">
|
|
|
- <view class="refund-label"><text></text>选择商品:</view>
|
|
|
- <view>
|
|
|
- <view class="list" v-for="(res,i) in product" :key="i">
|
|
|
- <view class="flex list-title" >
|
|
|
- <text class="product-name">{{res.name}}</text>
|
|
|
- <text class="product-num">{{ `${parseFloat(res.xhNum)}` }}{{res.xhUnitName}}</text>
|
|
|
- <text class="product-price">{{`${parseFloat(res.xhUnitPrice)}`}}元/{{res.xhUnitName}}</text>
|
|
|
- </view>
|
|
|
- <view class="flex list-val" style="font-size:26upx;font-weight:bold;">
|
|
|
- <input type="number" placeholder="填退货数" v-model="res.refundCount" placeholder-style="color:#CCCCCC" />
|
|
|
- <text style="margin-left:10upx;">{{res.xhUnitName}}</text>
|
|
|
- <text style="color:green;margin-left:20upx;">可退{{Number(res.xhNum)-Number(res.refundNum)}}{{res.xhUnitName}}</text>
|
|
|
+ <view class="refund-item-list" v-if="refundType==1">
|
|
|
+ <view class="refund-label"><text></text>选择商品:</view>
|
|
|
+ <view>
|
|
|
+ <view class="list" v-for="(res,i) in product" :key="i">
|
|
|
+ <view class="flex list-title" >
|
|
|
+ <text class="product-name">{{res.name}}</text>
|
|
|
+ <text class="product-num">{{ `${parseFloat(res.xhNum)}` }}{{res.xhUnitName}}</text>
|
|
|
+ <text class="product-price">{{`${parseFloat(res.xhUnitPrice)}`}}元/{{res.xhUnitName}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="flex list-val" style="font-size:26upx;font-weight:bold;">
|
|
|
+ <input type="number" placeholder="填退货数" v-model="res.refundCount" placeholder-style="color:#CCCCCC" />
|
|
|
+ <text style="margin-left:10upx;">{{res.xhUnitName}}</text>
|
|
|
+ <text style="color:green;margin-left:20upx;">可退{{Number(res.xhNum)-Number(res.refundNum)}}{{res.xhUnitName}}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="flex refund-item">
|
|
|
- <view class="refund-label">订单金额:</view>
|
|
|
- <view class="list">
|
|
|
- ¥{{parseFloat(orderInfo.orderPrice)||0}}
|
|
|
- <text style="margin-left:25upx;font-size:25upx;color:green;" v-if="Number(orderInfo.tkPrice)>0">已退¥{{orderInfo.tkPrice ? parseFloat(orderInfo.tkPrice) : 0}}</text>
|
|
|
+ <view class="flex refund-item">
|
|
|
+ <view class="refund-label">订单金额:</view>
|
|
|
+ <view class="list">
|
|
|
+ ¥{{parseFloat(orderInfo.orderPrice)||0}}
|
|
|
+ <text style="margin-left:25upx;font-size:25upx;color:green;" v-if="Number(orderInfo.tkPrice)>0">已退¥{{orderInfo.tkPrice ? parseFloat(orderInfo.tkPrice) : 0}}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="flex refund-item">
|
|
|
- <view class="refund-label">可退金额:</view>
|
|
|
- <view class="list">¥{{couldRefundPrice}}</view>
|
|
|
- </view>
|
|
|
- <view class="flex refund-item">
|
|
|
- <view class="refund-label">合计退款:</view>
|
|
|
- <view class="list">¥{{refundPrice}}</view>
|
|
|
- </view>
|
|
|
- <view class="flex refund-item">
|
|
|
- <view class="refund-label"><text></text>实际退款:</view>
|
|
|
- <input type="digit" v-model="refundMoney">
|
|
|
- </view>
|
|
|
- <view class="refund-item">
|
|
|
- <view class="refund-label">备注说明:</view>
|
|
|
- <textarea v-model="remark" />
|
|
|
- </view>
|
|
|
- <view>
|
|
|
- <form>
|
|
|
- <div class="module-com input-line-wrap">
|
|
|
- <div class="module-com input-line-wrap goods-wrap">
|
|
|
- <div class="module-tit" style="padding-left:0upx;">
|
|
|
- <span>售后图片:</span>
|
|
|
- <span class="app-color-3" style="color:red;font-weight:bold;text-decoration: underline;float: right;" @click="getRule()">★上传图片规范(必看)</span>
|
|
|
- </div>
|
|
|
- <div class="module-det">
|
|
|
- <htz-image-upload :max="9" :compress="true" v-model="refundImgData" :headers="headers"
|
|
|
- @uploadSuccess="imgUploadSuccess" :quality="60" @imgDelete="imgDeleteFn" :action="getLoginInfo.imgUploadApi">
|
|
|
- </htz-image-upload>
|
|
|
+ <view class="flex refund-item">
|
|
|
+ <view class="refund-label">可退金额:</view>
|
|
|
+ <view class="list">¥{{couldRefundPrice}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="flex refund-item">
|
|
|
+ <view class="refund-label">合计退款:</view>
|
|
|
+ <view class="list">¥{{refundPrice}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="flex refund-item">
|
|
|
+ <view class="refund-label"><text></text>实际退款:</view>
|
|
|
+ <input type="digit" v-model="refundMoney">
|
|
|
+ </view>
|
|
|
+ <view class="refund-item">
|
|
|
+ <view class="refund-label">备注说明:</view>
|
|
|
+ <textarea v-model="remark" style="height:100upx;"></textarea>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <form>
|
|
|
+ <div class="module-com input-line-wrap">
|
|
|
+ <div class="module-com input-line-wrap goods-wrap">
|
|
|
+ <div class="module-tit" style="padding-left:0upx;">
|
|
|
+ <span>售后图片:</span>
|
|
|
+ <span class="app-color-3" style="color:red;font-weight:bold;text-decoration: underline;float: right;" @click="getRule()">★上传图片规范(必看)</span>
|
|
|
+ </div>
|
|
|
+ <div class="module-det">
|
|
|
+ <htz-image-upload :max="9" :compress="true" v-model="refundImgData" :headers="headers"
|
|
|
+ @uploadSuccess="imgUploadSuccess" :quality="60" @imgDelete="imgDeleteFn" :action="getLoginInfo.imgUploadApi">
|
|
|
+ </htz-image-upload>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </form>
|
|
|
- </view>
|
|
|
+ </form>
|
|
|
+ </view>
|
|
|
+ <!-- #ifdef MP-WEIXIN -->
|
|
|
+ <view class="flex refund-item">
|
|
|
+ <view class="refund-label">结果通知:</view>
|
|
|
+ <view class="list">
|
|
|
+ <button class="admin-button-com big default" @click="noticeMe()" v-if="needNotice == 0">点我开启结果通知</button>
|
|
|
+ <button class="admin-button-com big blue" v-else>已经开启结果通知</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- #endif -->
|
|
|
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
<view class="app-footer">
|
|
|
<button class="admin-button-com big default" @click="cancelRefund()">取消</button>
|
|
|
- <button class="admin-button-com big blue" formType="submit" @click="confirmRefund">确定</button>
|
|
|
- </view>
|
|
|
-
|
|
|
+ <button class="admin-button-com big blue" formType="submit" @click="confirmRefund">提交申请</button>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -102,7 +110,8 @@ export default {
|
|
|
unClear:[],
|
|
|
refundImgData:[],
|
|
|
uploadRefundImg:[],
|
|
|
- headers:{token:''}
|
|
|
+ headers:{token:''},
|
|
|
+ needNotice:0
|
|
|
};
|
|
|
},
|
|
|
onLoad() {
|
|
|
@@ -110,7 +119,7 @@ export default {
|
|
|
this.headers.token = token
|
|
|
},
|
|
|
computed:{
|
|
|
- ...mapGetters(["getLoginInfo"]),
|
|
|
+ ...mapGetters(["getLoginInfo","getDictionariesInfo"]),
|
|
|
refundPrice(){
|
|
|
let price = 0
|
|
|
if(this.product){
|
|
|
@@ -131,6 +140,24 @@ export default {
|
|
|
watch:{
|
|
|
},
|
|
|
methods: {
|
|
|
+ noticeMe(){
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ let that = this
|
|
|
+ if(this.getDictionariesInfo && this.getDictionariesInfo.subscribeMessage && this.getDictionariesInfo.subscribeMessage == 1 && this.getDictionariesInfo.hdMiniMessage && this.getDictionariesInfo.hdMiniMessage.afterSale){
|
|
|
+ uni.requestSubscribeMessage({
|
|
|
+ tmplIds: [this.getDictionariesInfo.hdMiniMessage.afterSale.msgId],
|
|
|
+ success(res) {
|
|
|
+ that.needNotice = 1
|
|
|
+ console.log(res)
|
|
|
+ },
|
|
|
+ fail(err) {
|
|
|
+ console.log(err)
|
|
|
+ },
|
|
|
+ complete() {}
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // #endif
|
|
|
+ },
|
|
|
getRule(){
|
|
|
this.$util.pageTo({url:'/pagesPurchase/afterSale'})
|
|
|
},
|