|
|
@@ -4,8 +4,7 @@
|
|
|
<view class='apply-return'>
|
|
|
<view class='goodsStyle acea-row row-between' v-for="(item,index) in refundCartInfo" :key="index">
|
|
|
<view class='pictrue'>
|
|
|
- <image :src='item.productInfo.attrInfo?item.productInfo.attrInfo.image:item.productInfo.image'>
|
|
|
- </image>
|
|
|
+ <image :src='item.productInfo.attrInfo?item.productInfo.attrInfo.image:item.productInfo.image'></image>
|
|
|
</view>
|
|
|
<view class='text acea-row row-between'>
|
|
|
<view class='name line2'>{{item.productInfo.store_name}}</view>
|
|
|
@@ -21,8 +20,7 @@
|
|
|
<view class='num' v-if="refundCartInfo.length !== 1 || refund_total_num == 1">
|
|
|
{{refund_total_num}}
|
|
|
</view>
|
|
|
- <picker v-else class='num' @change="returnGoodsNum" :value="refund_num_index"
|
|
|
- :range="refundNumData">
|
|
|
+ <picker v-else class='num' @change="returnGoodsNum" :value="refund_num_index" :range="refundNumData">
|
|
|
<view class="picker acea-row row-between-wrapper">
|
|
|
<view class='reason'>{{refundNumData[refund_num_index]}}</view>
|
|
|
<text class='iconfont icon-jiantou'></text>
|
|
|
@@ -30,13 +28,14 @@
|
|
|
</picker>
|
|
|
<!-- <input type="number" v-model="refund_num" @input="inputNumber" v-else /> -->
|
|
|
</view>
|
|
|
- <!-- <view class='item acea-row row-between-wrapper'>
|
|
|
+ <!-- <view class='item acea-row row-between-wrapper'>
|
|
|
<view>退款金额</view>
|
|
|
<view class='num' v-if="refundCartInfo.length !== 1">¥{{refund_pay_price.toFixed(2)}}</view>
|
|
|
<view class='num' v-else>¥{{refund_Money.toFixed(2)}}
|
|
|
</view>
|
|
|
</view> -->
|
|
|
- <view class='item acea-row row-between-wrapper' v-if="status && status._type !== 1 && !productType">
|
|
|
+ <view class='item acea-row row-between-wrapper'
|
|
|
+ v-if="status && status._type !== 1 && !productType">
|
|
|
<view>退款类型</view>
|
|
|
<picker class='num' @change="returnGoodsChange" :value="returnGoods" :range="returnGoodsData">
|
|
|
<view class="picker acea-row row-between-wrapper">
|
|
|
@@ -105,8 +104,8 @@
|
|
|
mixins: [colors],
|
|
|
data() {
|
|
|
return {
|
|
|
- id: 0,
|
|
|
- cartIds: [],
|
|
|
+ id:0,
|
|
|
+ cartIds:[],
|
|
|
refund_reason_wap_img: [],
|
|
|
status: {},
|
|
|
RefundArray: [],
|
|
|
@@ -118,7 +117,7 @@
|
|
|
orderId: 0,
|
|
|
refundNumData: [],
|
|
|
refund_num_index: 0,
|
|
|
- productType: 0,
|
|
|
+ productType:0,
|
|
|
isShowAuth: false,
|
|
|
buttonDisabled: false
|
|
|
};
|
|
|
@@ -139,7 +138,7 @@
|
|
|
this.orderId = options.orderId;
|
|
|
this.id = options.id;
|
|
|
this.productType = parseInt(options.productType) || 0;
|
|
|
- if (options.cartIds) {
|
|
|
+ if(options.cartIds){
|
|
|
this.cartIds = JSON.parse(options.cartIds) || []
|
|
|
}
|
|
|
if (this.isLogin) {
|
|
|
@@ -153,28 +152,25 @@
|
|
|
uni.removeStorageSync('form_type_cart');
|
|
|
},
|
|
|
methods: {
|
|
|
- onLoadFun() {
|
|
|
+ onLoadFun(){
|
|
|
this.refundGoodsInfo();
|
|
|
this.getRefundReason();
|
|
|
this.isShowAuth = false
|
|
|
},
|
|
|
// 授权关闭
|
|
|
authColse: function(e) {
|
|
|
- this.isShowAuth = e
|
|
|
+ this.isShowAuth = e
|
|
|
},
|
|
|
- refundGoodsInfo() {
|
|
|
- postRefundGoods({
|
|
|
- id: this.id,
|
|
|
- cart_ids: this.cartIds
|
|
|
- }).then(res => {
|
|
|
+ refundGoodsInfo(){
|
|
|
+ postRefundGoods({id:this.id,cart_ids:this.cartIds}).then(res=>{
|
|
|
let data = res.data;
|
|
|
this.status = data._status;
|
|
|
this.refundCartInfo = data.cartInfo;
|
|
|
- this.refundCartInfo.forEach(item => {
|
|
|
+ this.refundCartInfo.forEach(item=>{
|
|
|
this.refund_total_num = this.$util.$h.Add(this.refund_total_num, item.cart_num)
|
|
|
})
|
|
|
this.refundNumData = Array(this.refund_total_num).fill(0).map((e, i) => i + 1)
|
|
|
- }).catch(err => {
|
|
|
+ }).catch(err=>{
|
|
|
return this.$util.Tips({
|
|
|
title: err
|
|
|
});
|
|
|
@@ -208,20 +204,9 @@
|
|
|
*/
|
|
|
uploadpic: function() {
|
|
|
let that = this;
|
|
|
- uni.showModal({
|
|
|
- title: '请求相机权限',
|
|
|
- content: '是否允许访问相册用于上传凭证信息?',
|
|
|
- cancelText: '拒绝',
|
|
|
- confirmText: '允许',
|
|
|
- success: res => {
|
|
|
- if (res.confirm) {
|
|
|
- that.$util.uploadImageOne('upload/image', function(res) {
|
|
|
- that.refund_reason_wap_img.push(res.data.url);
|
|
|
- that.$set(that, 'refund_reason_wap_img', that
|
|
|
- .refund_reason_wap_img);
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
+ this.$util.uploadImageOne('upload/image', function(res) {
|
|
|
+ that.refund_reason_wap_img.push(res.data.url);
|
|
|
+ that.$set(that, 'refund_reason_wap_img', that.refund_reason_wap_img);
|
|
|
});
|
|
|
},
|
|
|
|
|
|
@@ -240,11 +225,13 @@
|
|
|
});
|
|
|
}
|
|
|
let cartInfo = this.refundCartInfo;
|
|
|
- if (cartInfo.length === 1) {
|
|
|
- this.cartIds = [{
|
|
|
- cart_id: cartInfo[0].id,
|
|
|
- cart_num: this.refund_num_index + 1
|
|
|
- }]
|
|
|
+ if(cartInfo.length === 1){
|
|
|
+ this.cartIds = [
|
|
|
+ {
|
|
|
+ cart_id:cartInfo[0].id,
|
|
|
+ cart_num: this.refund_num_index + 1
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
returnGoodsSubmit(this.id, {
|
|
|
text: that.RefundArray[that.index] || '',
|
|
|
@@ -394,4 +381,4 @@
|
|
|
.list /deep/ .uni-input-input {
|
|
|
text-align: right;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|