第一次提交
This commit is contained in:
215
pages/order/refund/apply/apply.vue
Normal file
215
pages/order/refund/apply/apply.vue
Normal file
@ -0,0 +1,215 @@
|
||||
<template>
|
||||
<view class="refund-apply pb100" v-if="!loadding">
|
||||
<form @submit="formSubmit" @reset="formReset">
|
||||
<view class="one-product d-s-c p30 bg-white ">
|
||||
<view class="cover">
|
||||
<image :src="product.image.file_path || ''" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="flex-1">
|
||||
<view class="pro-info">{{product.product_name}}</view>
|
||||
<view class="pt10 p-0-30 f24 gray9">
|
||||
<text class="">
|
||||
单价:¥{{product.line_price}}
|
||||
</text>
|
||||
<text class="ml20">
|
||||
数量:{{product.total_num}}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 服务类型 -->
|
||||
<view class="group bg-white">
|
||||
<view class="group-hd border-b-e">
|
||||
<view class="left">
|
||||
<text class="min-name">服务类型</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="d-s-c p-20-0">
|
||||
<button v-if="product.orderM.delivery_type.value!=30" type="default"
|
||||
:class="type==10?'btn-red-border':''" @click="tabType(10)">退货/退款</button>
|
||||
<button v-if="product.orderM.delivery_type.value!=30" type="default"
|
||||
:class="type==20?'ml20 btn-red-border':'ml20'" @click="tabType(20)">换货</button>
|
||||
<button v-if="product.orderM.delivery_type.value!=30" type="default"
|
||||
:class="type==30?'ml20 btn-red-border':'ml20'" @click="tabType(30)">仅退款</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!--申请原因-->
|
||||
<view class="group bg-white">
|
||||
<view class="group-hd">
|
||||
<view class="left">
|
||||
<text class="min-name">申请原因</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="d-s-c">
|
||||
<textarea class="p10 box-s-b border flex-1 f28 lh150" value="" name="content"
|
||||
placeholder="请详细填写申请原因,注意保持商品的完好,建议您先与卖家沟通" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!--退款金额-->
|
||||
<view class="group bg-white" v-if="type==10 || type==30">
|
||||
<view class="group-hd">
|
||||
<view class="left">
|
||||
<text class="min-name">退款金额:</text>
|
||||
<text class="red f30" >¥{{product.total_pay_price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!--上传图片-->
|
||||
<view class="group bg-white">
|
||||
<view class="group-hd">
|
||||
<view class="left">
|
||||
<text class="min-name">上传凭证</text>
|
||||
<text class="gray9">(最多6张)</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="upload-list d-s-c">
|
||||
<view class="item" v-for="(imgs,img_num) in images" :key="img_num" @click="deleteFunc(imgs)">
|
||||
<image :src="imgs.file_path" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item d-c-c d-stretch" v-if="images.length<6">
|
||||
<view class="upload-btn d-c-c d-c flex-1" @click="openUpload()">
|
||||
<text class="icon iconfont icon-xiangji f34"></text>
|
||||
<text class="gray9">上传图片</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="foot-btns">
|
||||
<button form-type="submit" class="btn-red">确认提交</button>
|
||||
</view>
|
||||
</form>
|
||||
<!--上传图片-->
|
||||
<Upload v-if="isUpload" @getImgs="getImgsFunc"></Upload>
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Upload from '@/components/upload/upload.vue';
|
||||
export default {
|
||||
components: {
|
||||
Upload
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
/*是否加载完成*/
|
||||
loadding: true,
|
||||
indicatorDots: true,
|
||||
autoplay: true,
|
||||
interval: 2000,
|
||||
duration: 500,
|
||||
type: 10,
|
||||
/*是否打开上传图片*/
|
||||
isUpload: false,
|
||||
/*订单商品id*/
|
||||
order_product_id: 0,
|
||||
/*订单商品*/
|
||||
product: {
|
||||
image: {
|
||||
file_path: ''
|
||||
}
|
||||
},
|
||||
images: [],
|
||||
/*小程序订阅消息*/
|
||||
temlIds: [],
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.order_product_id = e.order_product_id;
|
||||
},
|
||||
mounted() {
|
||||
/*获取订单详情*/
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
/*获取数据*/
|
||||
getData() {
|
||||
let self = this;
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
self.loadding = true;
|
||||
let order_product_id = self.order_product_id;
|
||||
self._get('user.refund/apply', {
|
||||
order_product_id: order_product_id,
|
||||
platform: self.getPlatform()
|
||||
}, function(res) {
|
||||
self.loadding = false;
|
||||
self.product = res.data.detail;
|
||||
self.temlIds = res.data.template_arr;
|
||||
if (self.product.orderM.delivery_type.value == 30) {
|
||||
self.type = 30;
|
||||
}
|
||||
uni.hideLoading();
|
||||
});
|
||||
},
|
||||
/*切换服务类型*/
|
||||
tabType(e) {
|
||||
this.type = e;
|
||||
},
|
||||
|
||||
/*提交表单*/
|
||||
formSubmit: function(e) {
|
||||
let self = this;
|
||||
var formdata = e.detail.value;
|
||||
formdata.type = self.type;
|
||||
formdata.order_product_id = self.order_product_id;
|
||||
formdata.images = JSON.stringify(self.images);
|
||||
let callback = function() {
|
||||
uni.showLoading({
|
||||
title: '正在提交',
|
||||
mask: true
|
||||
});
|
||||
self._post('user.refund/apply', formdata, function(res) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
duration: 3000,
|
||||
complete: function() {
|
||||
self.gotoPage('/pages/order/refund/index/index');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
self.subMessage(self.temlIds, callback);
|
||||
},
|
||||
|
||||
/*打开上传图片*/
|
||||
openUpload() {
|
||||
this.isUpload = true;
|
||||
},
|
||||
|
||||
/*获取上传的图片*/
|
||||
getImgsFunc(e) {
|
||||
let self = this;
|
||||
self.isUpload = false;
|
||||
if (e && typeof(e) != 'undefined') {
|
||||
let this_length = self.images.length,
|
||||
upload_length = e.length;
|
||||
if (this_length + upload_length < 7) {
|
||||
self.images = self.images.concat(e);
|
||||
} else {
|
||||
let leng = 6 - this_length;
|
||||
for (let i = 0; i < leng; i++) {
|
||||
self.images.push(e[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/*删除图片*/
|
||||
deleteFunc(e) {
|
||||
this.images.splice(e, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
544
pages/order/refund/detail/detail.vue
Normal file
544
pages/order/refund/detail/detail.vue
Normal file
@ -0,0 +1,544 @@
|
||||
<template>
|
||||
<view class="order-refund-detail pb100" v-if="!loadding" :data-theme='theme()' :class="theme() || ''">
|
||||
<!--售后状态-->
|
||||
<view class="order-state d-s-c">
|
||||
<view class="icon-box"><span class="icon iconfont icon-gantanhao"></span></view>
|
||||
<view class="state-cont flex-1">
|
||||
<view class="state-txt d-b-c">
|
||||
<text class="desc f34">{{detail.state_text}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="dot-bg"></view>
|
||||
</view>
|
||||
|
||||
<!--商品信息-->
|
||||
<view class="p30 mt20 bg-white">
|
||||
<view class="one-product border-b-e d-s-c pb20">
|
||||
<view class="cover">
|
||||
<image :src="detail.orderproduct.image.file_path" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="flex-1">
|
||||
<view class="pro-info">{{detail.orderproduct.product_name}}</view>
|
||||
<view class="pt10 p-0-30">
|
||||
<text class="f24 gray9">
|
||||
{{detail.orderproduct.product_attr}}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="d-e-c pt20 lh150">
|
||||
<view class="f24">
|
||||
商品金额:
|
||||
<text class="red">¥{{detail.orderproduct.total_price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="d-e-c pt10 lh150">
|
||||
<view class="f24">
|
||||
订单实付金额:
|
||||
<text class="red">¥{{detail.orderproduct.total_pay_price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="d-e-c pt10 lh150" v-if="detail.order_master.order_source==70">
|
||||
<view class="f24" v-if="detail.orderproduct.advance">
|
||||
定金({{detail.orderproduct.advance.money_return?'可退':'不可退'}}):
|
||||
<text class="red">¥{{detail.orderproduct.advance.pay_price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 已退款金额 -->
|
||||
<view class="group bg-white" v-if=" detail.status.value == 20 ">
|
||||
<text class="gray9">已退款金额:</text>
|
||||
<text class="gray9">¥{{ detail.refund_money }}</text>
|
||||
</view>
|
||||
|
||||
<!--申请售后信息-->
|
||||
<view class="group bg-white f24">
|
||||
<view class="p-20-0 border-b f34">
|
||||
申请退货信息
|
||||
</view>
|
||||
<view class="p-20-0 f28">
|
||||
<text class="gray9">售后类型:</text>
|
||||
<text>{{detail.type.text}}</text>
|
||||
</view>
|
||||
<view class="p-20-0 f28">
|
||||
<text class="gray9">申请原因:</text>
|
||||
<text>
|
||||
{{detail.apply_desc}}
|
||||
</text>
|
||||
</view>
|
||||
<view class="p-20-0 upload-list d-s-s f28">
|
||||
<text class="gray9">申请凭证:</text>
|
||||
<view class="d-s-s f-w">
|
||||
<block v-if="detail.image.length>0">
|
||||
<view class="item" v-for="(imgs,img_num) in detail.image" :key="img_num">
|
||||
<image :src="imgs.file_path" mode="aspectFit"></image>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
无
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 售后信息-->
|
||||
<view v-if="detail.plate_status.value != 0" class="group bg-white">
|
||||
<view class="p-20-0 border-b f34">
|
||||
平台处理结果:
|
||||
</view>
|
||||
<view class="p-20-0">
|
||||
<text class="red f28" v-if="detail.plate_status.value == 10">客服处理中</text>
|
||||
<text class="red f28" v-if="detail.plate_status.value == 20">平台已同意退款</text>
|
||||
<text class="red f28" v-if="detail.plate_status.value == 30">平台已拒绝退款</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="detail.status.value == 10" class="group bg-white">
|
||||
<view class="p-20-0 border-b f34">
|
||||
商家拒绝原因
|
||||
</view>
|
||||
<view class="p-20-0">
|
||||
<text class="red f28">{{ detail.refuse_desc }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 平台拒绝原因 -->
|
||||
<view v-if="detail.plate_status.value == 30" class="group bg-white">
|
||||
<view class="p-20-0 border-b f34">
|
||||
平台拒绝原因
|
||||
</view>
|
||||
<view class="p-20-0">
|
||||
<text class="red f28">{{ detail.plate_desc }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!--退货地址-->
|
||||
<view class="group bg-white" v-if="detail.is_agree.value == 10&&detail.type.value != 30">
|
||||
<view class="p-20-0 border-b f34">
|
||||
退货地址
|
||||
</view>
|
||||
<view class="pt30 f28">
|
||||
<text class="gray9">收货人:</text>
|
||||
<text>{{detail.address.name}}</text>
|
||||
</view>
|
||||
<view class="pt30 f28">
|
||||
<text class="gray9">联系电话:</text>
|
||||
<text>{{detail.address.phone}}</text>
|
||||
</view>
|
||||
<view class="pt30 f28">
|
||||
<text class="gray9">详情地址:</text>
|
||||
<text>{{detail.address.detail}}</text>
|
||||
</view>
|
||||
<view class="pt30 f28" v-if="detail.express_no">
|
||||
<text class="gray9">物流公司:</text>
|
||||
<text>{{detail.express.express_name}}</text>
|
||||
</view>
|
||||
<view class="pt30 f28" v-if="detail.express_no">
|
||||
<text class="gray9">物流单号:</text>
|
||||
<text>{{detail.express_no}}</text>
|
||||
</view>
|
||||
<view class="pt30 f28" v-if="detail.is_plate_send">
|
||||
<text class="gray9">换货物流公司:</text>
|
||||
<text>{{detail.sendexpress.express_name}}</text>
|
||||
</view>
|
||||
<view class="pt30 f28" v-if="detail.is_plate_send"
|
||||
@click="gotoPage('/pages/order/express/refund-express?order_id=' + detail.order_refund_id);">
|
||||
<text class="gray9">换货物流单号:</text>
|
||||
<text>{{detail.send_express_no}}</text>
|
||||
</view>
|
||||
<view class="mt20 pb20 border-t gray9">
|
||||
<view class="pt20">
|
||||
· 未与卖家协商一致情况下,请勿寄到付或平邮
|
||||
</view>
|
||||
<view class="pt10">
|
||||
· 请填写真实有效物流信息
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 填写物流信息 -->
|
||||
<form @submit="formSubmit"
|
||||
v-if="detail.status.value == 0 && detail.is_agree.value == 10 && detail.is_user_send == 0&&source=='user'"
|
||||
report-submit>
|
||||
<view class="group bg-white">
|
||||
<view class="p-20-0 border-b f34">
|
||||
填写物流信息
|
||||
</view>
|
||||
<view class="p-20-0 d-s-c">
|
||||
<view class="gray9">物流公司:</view>
|
||||
<view class="flex-1 p20 border">
|
||||
<picker mode="selector" @change="onExpressChange" :range="expressList" range-key="express_name"
|
||||
:value="index">
|
||||
<text v-if="index > -1 ">{{expressList[index].express_name}}</text>
|
||||
<text v-else class="col-80">请选择物流公司</text>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="p-20-0 d-s-c">
|
||||
<view class="gray9">物流单号:</view>
|
||||
<view class="flex-1 border">
|
||||
<input class="p10" placeholder="请填写物流单号" name="express_no"></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt20">
|
||||
<button class="btn-red" formType="submit">确认发货</button>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
<!-- 填写物流信息 -->
|
||||
<form @submit="reReceipt"
|
||||
v-if="detail.type.value == 20 && detail.is_agree.value == 10 && detail.is_user_send == 1&&source!='user'&&detail.is_plate_send==0"
|
||||
report-submit>
|
||||
<view class="group bg-white">
|
||||
<view class="p-20-0 border-b f34">
|
||||
填写物流信息
|
||||
</view>
|
||||
<view class="p-20-0 d-s-c">
|
||||
<view class="gray9">物流公司:</view>
|
||||
<view class="flex-1 p20 border">
|
||||
<picker mode="selector" @change="onExpressChange" :range="expressList" range-key="express_name"
|
||||
:value="index">
|
||||
<text v-if="index > -1 ">{{expressList[index].express_name}}</text>
|
||||
<text v-else class="col-80">请选择物流公司</text>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="p-20-0 d-s-c">
|
||||
<view class="gray9">物流单号:</view>
|
||||
<view class="flex-1 border">
|
||||
<input class="p10" placeholder="请填写物流单号" name="send_express_no"></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt20">
|
||||
<button class="btn-red" formType="submit">确认发货</button>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
<!--供应商退款审核-->
|
||||
<view class="group bg-white f24" v-if="detail.is_agree.value == 0&&source=='supplier'">
|
||||
<view class="p-20-0 border-b f34">
|
||||
<view class="mb20">审核</view>
|
||||
<view class="">
|
||||
<view class="f26 gray9">售后类型:<text class="gray3">{{detail.type.text}}</text></view>
|
||||
<view class="d-s-c mb20">
|
||||
<view class="make-top w120 mr10">
|
||||
<view class="gray9 f26">审核状态</view>
|
||||
</view>
|
||||
<radio-group class="d-a-c" @change="changeRadio($event)">
|
||||
<label class="d-s-c make-item ">
|
||||
<view>
|
||||
<radio style="transform:scale(0.7)" color="#ff6633" :checked="is_agree == 10"
|
||||
value="10" />
|
||||
</view>
|
||||
<view class="f26 color-57">同意</view>
|
||||
</label>
|
||||
<label class="d-s-c make-item ">
|
||||
<view>
|
||||
<radio style="transform:scale(0.7)" color="#ff6633" :checked="is_agree == 20"
|
||||
value="20" />
|
||||
</view>
|
||||
<view class="f26 color-57">拒绝</view>
|
||||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
<view v-if="is_agree == 10 && detail.type.value != 30" class="d-s-c mb20">
|
||||
<picker mode="selector" @change="onAddressChange" :range="address" range-key="detail"
|
||||
:value="addressIndex">
|
||||
<text v-if="address_id !='' ">{{address[addressIndex].detail}}</text>
|
||||
<text v-else class="col-80">请选择退货地址</text>
|
||||
</picker>
|
||||
</view>
|
||||
<view v-if="is_agree == 20" class="d-s-c mb20">
|
||||
<view class="w120 mr10 f26">拒绝原因</view>
|
||||
<input type="text" class="make-item selectpicker input-box" v-model="refuse_desc" />
|
||||
</view>
|
||||
<view v-if="is_agree == 10 && detail.type.value == 30">
|
||||
<view class="d-s-c mb20">
|
||||
<view class="w120 mr10 f26">退款金额</view>
|
||||
<input type="text" class="make-item selectpicker input-box" v-model="refund_money" />
|
||||
</view>
|
||||
<view class="p-20-0 f28">
|
||||
<view class="red">
|
||||
请严格按照售后理赔标准进行赔付,避免买家对赔付有异议,请输入退款金额,最多{{detail.orderproduct.max_refund_money}}元</view>
|
||||
<view class="gray9">注:该操作将执行订单原路退款,并关闭当前售后单,请确认并填写,退款的金额(不能大于订单实付款)</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt20">
|
||||
<button class="btn-red" @click="sendRefund">确认审核</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!--供应商退款审核-->
|
||||
<view class="group bg-white f24"
|
||||
v-if="detail.type.value == 10 && detail.is_agree.value == 10 && detail.is_user_send == 1 && detail.is_receipt == 0&&source=='supplier'">
|
||||
<view class="p-20-0 border-b f34">
|
||||
<view class="mb20">审核</view>
|
||||
<view class="">
|
||||
<view class="f26 gray9">售后类型:<text class="gray3">{{detail.type.text}}</text></view>
|
||||
<view>
|
||||
<view class="d-s-c mb20">
|
||||
<view class="w120 mr10 f26">退款金额</view>
|
||||
<input type="text" class="make-item selectpicker input-box" v-model="refund_money" />
|
||||
</view>
|
||||
<view class="p-20-0 f28">
|
||||
<view class="red">
|
||||
请严格按照售后理赔标准进行赔付,避免买家对赔付有异议,请输入退款金额,最多{{detail.orderproduct.total_pay_price}}元</view>
|
||||
<view class="gray9">注:该操作将执行订单原路退款,并关闭当前售后单,请确认并填写,退款的金额(不能大于订单实付款)</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt20">
|
||||
<button class="btn-red" @click="sendReceipt">确认审核</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
/*是否加载完成*/
|
||||
loadding: true,
|
||||
indicatorDots: true,
|
||||
autoplay: true,
|
||||
interval: 2000,
|
||||
duration: 500,
|
||||
expressList: {},
|
||||
index: -1,
|
||||
order_refund_id: 0,
|
||||
/*退货详情*/
|
||||
detail: {
|
||||
address: {},
|
||||
},
|
||||
express_id: 0,
|
||||
/*消息模板*/
|
||||
temlIds: [],
|
||||
source: 'user',
|
||||
refuse_desc: '',
|
||||
refund_money: '',
|
||||
is_agree: 10,
|
||||
address: [],
|
||||
addressIndex: 0,
|
||||
address_id: ''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.order_refund_id = e.order_refund_id;
|
||||
this.source = e.source || 'user';
|
||||
},
|
||||
mounted() {
|
||||
/*获取详情*/
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
/*获取数据*/
|
||||
getData() {
|
||||
let self = this;
|
||||
self.loadding = true;
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
let order_refund_id = self.order_refund_id;
|
||||
self._get(
|
||||
'user.refund/detail', {
|
||||
order_refund_id: order_refund_id,
|
||||
platform: self.getPlatform()
|
||||
},
|
||||
function(res) {
|
||||
self.loadding = false;
|
||||
uni.hideLoading();
|
||||
self.address = res.data.address;
|
||||
self.detail = res.data.detail;
|
||||
self.expressList = res.data.expressList;
|
||||
self.temlIds = res.data.template_arr;
|
||||
}
|
||||
);
|
||||
},
|
||||
/*选择物流*/
|
||||
onExpressChange: function(e) {
|
||||
this.index = e.target.value;
|
||||
this.express_id = this.expressList[this.index].express_id;
|
||||
},
|
||||
/*选择物流*/
|
||||
onAddressChange: function(e) {
|
||||
this.addressIndex = e.target.value;
|
||||
this.address_id = this.address[this.addressIndex].address_id;
|
||||
console.log(this.address_id)
|
||||
},
|
||||
/*发货*/
|
||||
formSubmit: function(e) {
|
||||
let self = this;
|
||||
var formdata = e.detail.value;
|
||||
formdata.order_refund_id = self.order_refund_id;
|
||||
formdata.express_id = self.express_id;
|
||||
let callback = function() {
|
||||
uni.showLoading({
|
||||
title: '正在提交',
|
||||
mask: true
|
||||
});
|
||||
self._post('user.refund/delivery', formdata, function(res) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
duration: 3000,
|
||||
complete: function() {
|
||||
self.gotoPage(
|
||||
'/pages/order/refund/detail/detail?order_refund_id=' +
|
||||
self.order_refund_id);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
self.subMessage(self.temlIds, callback);
|
||||
},
|
||||
sendRefund() {
|
||||
let self = this;
|
||||
if (self.loadding) {
|
||||
return
|
||||
}
|
||||
self.loadding = true;
|
||||
if (self.refund_money > self.detail.orderproduct.total_pay_price) {
|
||||
self.showError('退款金额超过最大值');
|
||||
return;
|
||||
}
|
||||
if (self.is_agree == 10 && self.address_id == '' && self.detail.type.value != 30) {
|
||||
self.showError('请选择退货地址');
|
||||
return
|
||||
}
|
||||
let order_refund_id = self.order_refund_id;
|
||||
uni.showLoading({
|
||||
title: '提交中...'
|
||||
})
|
||||
self._post(
|
||||
'user.refund/audit', {
|
||||
order_refund_id: order_refund_id,
|
||||
is_agree: self.is_agree,
|
||||
refuse_desc: self.refuse_desc,
|
||||
order_refund_id: order_refund_id,
|
||||
refund_money: self.refund_money,
|
||||
address_id: self.address_id
|
||||
},
|
||||
function(res) {
|
||||
self.loadding = false;
|
||||
uni.hideLoading();
|
||||
self.getData();
|
||||
self.showSuccess('操作成功')
|
||||
},
|
||||
function(err) {
|
||||
self.loadding = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
reReceipt(e) {
|
||||
let self = this;
|
||||
|
||||
if (self.loadding) {
|
||||
return
|
||||
}
|
||||
var formdata = e.detail.value;
|
||||
formdata.order_refund_id = self.order_refund_id;
|
||||
formdata.send_express_id = self.express_id;
|
||||
formdata.refund_money = 0;
|
||||
self.loadding = true;
|
||||
let order_refund_id = self.order_refund_id;
|
||||
uni.showLoading({
|
||||
title: '提交中...'
|
||||
})
|
||||
self._post(
|
||||
'user.refund/receipt', formdata,
|
||||
function(res) {
|
||||
self.loadding = false;
|
||||
uni.hideLoading();
|
||||
self.getData();
|
||||
self.showSuccess('操作成功')
|
||||
},
|
||||
function(err) {
|
||||
self.loadding = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
sendReceipt() {
|
||||
let self = this;
|
||||
if (self.loadding) {
|
||||
return
|
||||
}
|
||||
self.loadding = true;
|
||||
if (self.refund_money > self.detail.orderproduct.total_pay_price) {
|
||||
self.showError('退款金额超过最大值');
|
||||
return;
|
||||
}
|
||||
let order_refund_id = self.order_refund_id;
|
||||
uni.showLoading({
|
||||
title: '提交中...'
|
||||
})
|
||||
self._post(
|
||||
'user.refund/receipt', {
|
||||
order_refund_id: order_refund_id,
|
||||
refund_money: self.refund_money,
|
||||
},
|
||||
function(res) {
|
||||
self.loadding = false;
|
||||
uni.hideLoading();
|
||||
self.getData();
|
||||
self.showSuccess('操作成功')
|
||||
},
|
||||
function(err) {
|
||||
self.loadding = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
changeRadio(e) {
|
||||
this.is_agree = e.detail.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.order-refund-detail .btn-red {
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
border-radius: 44rpx;
|
||||
box-shadow: 0 8rpx 16rpx 0 rgba(226, 35, 26, .6);
|
||||
}
|
||||
|
||||
.table-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 8rpx;
|
||||
padding: 26rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.selectpicker {
|
||||
width: 400rpx;
|
||||
height: 65rpx;
|
||||
line-height: 65rpx;
|
||||
padding: 0 23rpx;
|
||||
box-sizing: border-box;
|
||||
border: 2rpx solid #BFBFBF;
|
||||
border-radius: 5rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #575757;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.selectpicker .jiantou {
|
||||
color: #575757;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
.send_btn {
|
||||
width: 200rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.w120 {
|
||||
width: 120rpx;
|
||||
}
|
||||
</style>
|
||||
231
pages/order/refund/index/index.vue
Normal file
231
pages/order/refund/index/index.vue
Normal file
@ -0,0 +1,231 @@
|
||||
<template>
|
||||
<view class="refund-list">
|
||||
<view class="top-tabbar">
|
||||
<view :class="state_active==-1?'tab-item active':'tab-item'" @click="stateFunc(-1)">
|
||||
全部
|
||||
</view>
|
||||
<view :class="state_active==0?'tab-item active':'tab-item'" @click="stateFunc(0)">
|
||||
待处理
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" class="scroll-Y" :style="'height:' + scrollviewHigh + 'px;'" lower-threshold="50"
|
||||
@scrolltoupper="scrolltoupperFunc" @scrolltolower="scrolltolowerFunc">
|
||||
<view :class="topRefresh?'top-refresh open':'top-refresh'">
|
||||
<view class="circle" v-for="(circle,n) in 3" :key="n"></view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item bg-white p30 mb20" v-for="(item,index) in tableData" :key="index">
|
||||
<view class="d-b-c">
|
||||
<text>{{item.create_time}}</text>
|
||||
<text class="red">{{item.state_text}}</text>
|
||||
</view>
|
||||
<view class="one-product d-s-c pt20">
|
||||
<view class="cover">
|
||||
<image :src="item.orderproduct.image.file_path" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="flex-1">
|
||||
<view class="pro-info">{{item.orderproduct.product_name}}</view>
|
||||
<view class="pt10 p-0-30">
|
||||
<text class="f24 gray9">
|
||||
{{item.orderproduct.product_attr}}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="d-e-c pt20">
|
||||
<view>
|
||||
商品金额:
|
||||
<text class="red">¥{{item.orderproduct.total_price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="d-e-c pt10">
|
||||
<view>
|
||||
订单实付金额:
|
||||
<text class="red"
|
||||
v-if="item.order_master && item.order_master.order_source==70">¥{{(item.order_master.pay_price*1+item.order_master.advance.pay_price*1).toFixed(2)}}</text>
|
||||
<text class="red" v-else>¥{{item.orderproduct.total_pay_price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="d-e-c mt20 pt20 border-t">
|
||||
<button
|
||||
v-if="item.orderproduct.is_agent==0 && item.plate_status.value==0 && (item.status.value==0 || item.status.value==10) && item.type.value==30 "
|
||||
style="margin-right: 15rpx;" type="default" class="btn-gray-border"
|
||||
@click="intervention(item.order_refund_id)">申请平台介入</button>
|
||||
<text
|
||||
v-if="item.orderproduct.is_agent==0 && item.plate_status.value==10 && (item.status.value==0 || item.status.value==10) "
|
||||
style="margin-right: 15rpx;" type="default" class="text_red">平台介入处理中</text>
|
||||
<button type="default" class="btn-gray-border"
|
||||
@click="gotoRefundDetail(item.order_refund_id)">查看详情</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 没有记录 -->
|
||||
<view class="d-c-c p30" v-if="tableData.length==0 && !loading">
|
||||
<text class="iconfont icon-wushuju"></text>
|
||||
<text class="cont">亲,暂无相关记录哦</text>
|
||||
</view>
|
||||
<uni-load-more v-else :loadingType="loadingType"></uni-load-more>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniLoadMore from "@/components/uni-load-more.vue";
|
||||
export default {
|
||||
components: {
|
||||
uniLoadMore
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
/*手机高度*/
|
||||
phoneHeight: 0,
|
||||
/*可滚动视图区域高度*/
|
||||
scrollviewHigh: 0,
|
||||
/*选中状态*/
|
||||
state_active: -1,
|
||||
/*页面数据*/
|
||||
tableData: [],
|
||||
list_rows: 5,
|
||||
last_page: 0,
|
||||
page: 1,
|
||||
no_more: false,
|
||||
loading: true,
|
||||
/*顶部刷新*/
|
||||
topRefresh: false,
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
/*加载中状态*/
|
||||
loadingType() {
|
||||
if (this.loading) {
|
||||
return 1;
|
||||
} else {
|
||||
if (this.tableData.length != 0 && this.no_more) {
|
||||
return 2;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
/*获取页面数据*/
|
||||
this.getData();
|
||||
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
/*下拉到顶,页面值还原初始化*/
|
||||
//this.restoreData();
|
||||
//this.getData();
|
||||
},
|
||||
methods: {
|
||||
/*初始化*/
|
||||
init() {
|
||||
let self = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
self.phoneHeight = res.windowHeight;
|
||||
// 计算组件的高度
|
||||
let view = uni.createSelectorQuery().select('.top-tabbar');
|
||||
view.boundingClientRect(data => {
|
||||
let h = self.phoneHeight - data.height;
|
||||
self.scrollviewHigh = h;
|
||||
}).exec();
|
||||
}
|
||||
});
|
||||
},
|
||||
/*页面数据*/
|
||||
getData() {
|
||||
let self = this;
|
||||
self.loading = true;
|
||||
let page = self.page;
|
||||
let state = self.state_active;
|
||||
let list_rows = self.list_rows;
|
||||
self._get('user.refund/lists', {
|
||||
state: state,
|
||||
page: page || 1,
|
||||
list_rows: list_rows,
|
||||
type: 1
|
||||
}, function(data) {
|
||||
self.loading = false;
|
||||
self.tableData = self.tableData.concat(data.data.list.data);
|
||||
// console.log(self.tableData);
|
||||
self.last_page = data.data.list.last_page;
|
||||
if (self.last_page <= 1) {
|
||||
self.no_more = true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
/*类别切换*/
|
||||
stateFunc(e) {
|
||||
let self = this;
|
||||
if (self.state_active != e) {
|
||||
self.tableData = [];
|
||||
self.loading = true;
|
||||
self.page = 1;
|
||||
self.state_active = e;
|
||||
self.getData();
|
||||
}
|
||||
},
|
||||
/*查看售后详情*/
|
||||
gotoRefundDetail(e) {
|
||||
this.gotoPage('/pages/order/refund/detail/detail?order_refund_id=' + e);
|
||||
},
|
||||
/* 申请平台介入 */
|
||||
intervention(e) {
|
||||
let self = this;
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
self._get('user.refund/plateapply', {
|
||||
order_refund_id: e
|
||||
}, function(data) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: '申请平台介入成功'
|
||||
})
|
||||
self.getData();
|
||||
self.loading = false;
|
||||
});
|
||||
},
|
||||
/*可滚动视图区域到顶触发*/
|
||||
scrolltoupperFunc() {
|
||||
/* let self = this;
|
||||
self.topRefresh = true;
|
||||
self.no_more = false;
|
||||
setTimeout(function() {
|
||||
self.topRefresh = false;
|
||||
}, 2000);
|
||||
self.tableData = [];
|
||||
self.page = 1;
|
||||
self.getData(); */
|
||||
},
|
||||
|
||||
/*可滚动视图区域到底触发*/
|
||||
scrolltolowerFunc() {
|
||||
let self = this;
|
||||
if (self.no_more) {
|
||||
return;
|
||||
}
|
||||
self.page++;
|
||||
if (self.page <= self.last_page) {
|
||||
self.getData();
|
||||
} else {
|
||||
self.no_more = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.text_red {
|
||||
color: #FF6633;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user