123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317 |
- <template>
- <view class="audit">
- <view class="refund_num" v-if="refundInfo.length > 0">退货次数:{{ refundInfo.length }}次</view>
- <view class="audit_con" v-for="item in refundInfo" :key="item.id">
- <view class="goods_info">
- <view class="title">退货信息</view>
- <view v-for="temp in item.goods" :key="temp.id" class="goods_con">
- <view class="flexS">
- <image :src="temp.img" class="goods_img"></image>
- <view>
- <text class="goods_name">{{ temp.name }}</text>
- <view class="one_year" style="width: 200rpx;">3条装</view>
- </view>
- </view>
- <view class="goods_size">
- <view class="size_box flexB" v-for="sku in temp.sku" :key="sku.id">
- <text>{{ sku.type }}</text>
- <text>{{ sku.size }}</text>
- <text>{{ sku.price }}</text>
- <text>X{{ sku.num }}</text>
- </view>
- </view>
- </view>
- <view class="flexE" style="margin-top:20rpx;">
- <text class="gray" v-if="item.goods">共{{ item.goods | totalNum }}件</text>
- <text class="gray">合计:</text>
- <text class="total">
- <text>¥</text>
- <text class="price" v-if="item.goods">{{ item.goods | totalPrice }}</text>
- </text>
- </view>
- </view>
- <view class="audit_order">
- <view class="order_top">
- <view class="label flexS">
- <view>
- <text>订单号:</text>
- <text style="font-size:24rpx;">{{ item.order_no }}</text>
- </view>
- <view class="copy_new_btn" @click="copy(item.order_no)">复制</view>
- </view>
- <view class="label flexS">
- <view>
- <text>退货单号:</text>
- <text style="font-size:24rpx;">{{ item.refund_no }}</text>
- </view>
- <view class="copy_new_btn" @click="copy(item.refund_no)">复制</view>
- </view>
- <view class="label">
- <text>退货状态:</text>
- <text style="color:#f00;">{{ item.status | getStatus }}</text>
- </view>
- <view class="label">
- <text>申请时间:</text>
- <text>{{ item.created_at }}</text>
- </view>
- <view class="label">
- <text>退货原因:</text>
- <text>{{ item.reason }}</text>
- </view>
- </view>
- <view class="order_bottom" v-if="item.reason_all">
- <view class="label">
- <text>补充说明:</text>
- <text style="color:#F76454">{{ item.reason_all }}</text>
- </view>
- <view class="img_box flexS" v-if="item.img">
- <view v-for="(curImg, index) in item.img" :key="index">
- <image :src="curImg" @click="previewImg(curImg,item.img)"></image>
- </view>
- </view>
- </view>
- </view>
- <view class="sub_btn" @click="cancelApply(item.id)" v-if="item.status == 0 && item.op_type == 2">取消退货</view>
- </view>
- <view class="noData" v-if="refundInfo.length == 0">
- <image src="../../static/imgs/default/no_order.png" mode=""></image>
- <view>--暂无数据--</view>
- </view>
- </view>
- </template>
- <script>
- import {
- handleClipboard
- } from '../../common/util/utils.js';
- import {
- getRefund,
- cancelRefund
- } from '../../apis/shop.js';
- export default {
- data() {
- return {
- refundInfo: [], //退货详情
- imgs: [],
- order_no: ''
- };
- },
- onLoad(ops) {
- this.order_no = ops.order_no;
- this.getDetail(ops.order_no);
- },
- filters: {
- getStatus(val) {
- switch (val) {
- case 0:
- return '审核中';
- break;
- case 1:
- return '已同意';
- break;
- case 2:
- return '已驳回';
- break;
- case 3:
- return '已完成';
- break;
- default:
- return '暂无';
- }
- }
- },
- methods: {
- //点击预览图片
- previewImg(img, imgs) {
- uni.previewImage({
- urls: imgs,
- current: img
- })
- },
- //取消退货申请
- cancelApply(refund_id) {
- uni.showModal({
- content: '你确定要取消此次退货吗?',
- success: res => {
- if (res.confirm) {
- cancelRefund({
- refund_id
- }).then(res => {
- if (res.code == 200) {
- this.getDetail(this.order_no);
- uni.showToast({
- title: '取消退货成功'
- });
- } else {
- uni.showModal({
- content: res.data || '取消失败',
- showCancel: false
- });
- }
- });
- }
- }
- });
- },
- /*获取退货订单详情*/
- getDetail(order_no) {
- getRefund({
- order_no
- }).then(res => {
- if (res.code == 200) {
- let refund = res.data;
- refund.map(i => {
- i.img = i.img ? JSON.parse(i.img) : "";
- })
- this.refundInfo = refund;
- } else {
- uni.showModal({
- content: res.data || '获取详情失败',
- showCancel: false
- });
- }
- });
- },
- /*复制订单号*/
- copy(data) {
- uni.setClipboardData({
- data,
- success: res => {
- uni.showToast({
- title: '复制成功'
- });
- },
- fail() {
- uni.showToast({
- title: '复制失败',
- icon: 'none',
- });
- }
- })
- },
- }
- };
- </script>
- <style>
- page {
- min-height: 100%;
- width: 100%;
- background: #f7f7f7;
- }
- </style>
- <style lang="scss" scoped>
- .audit {
- padding-bottom: 150rpx;
- .refund_num {
- width: 690rpx;
- background: #fff;
- margin: 30rpx auto;
- border-radius: 8rpx;
- padding: 15rpx;
- font-size: 32rpx;
- font-weight: bold;
- box-sizing: border-box;
- }
- .audit_con {
- width: 690rpx;
- margin: 0 auto 30rpx;
- background: #fff;
- border-radius: 24rpx;
- padding-bottom: 30rpx;
- .sub_btn {
- margin: 20rpx auto;
- }
- .audit_money {
- padding: 10rpx 30rpx;
- }
- .refund {
- height: 110rpx;
- }
- .goods_info {
- padding: 30rpx 30rpx;
- .title {
- font-size: 32rpx;
- font-weight: bold;
- padding: 0 0 20rpx 0;
- }
- .goods_con {
- padding-bottom: 20rpx;
- .goods_img {
- width: 180rpx;
- height: 144rpx;
- border-radius: 8rpx;
- margin-right: 20rpx;
- }
- .goods_name {
- font-size: 32rpx;
- font-weight: bold;
- }
- }
- .size_box {
- width: 100%;
- background: #f9f9f9;
- // padding: 15rpx;
- padding: 15rpx 0;
- margin-top: 15rpx;
- border-radius: 8rpx;
- text {
- width: 20%;
- text-align: center;
- }
- }
- }
- .label {
- padding: 10rpx 0;
- text:first-child {
- font-size: 30rpx;
- color: #999;
- }
- text:last-child {
- font-size: 28rpx;
- color: #333;
- }
- }
- .audit_order {
- padding: 10rpx 30rpx;
- margin-bottom: 15rpx;
- .order_bottom {
- border-top: 2rpx solid #eeeeee;
- .img_box {
- image {
- width: 140rpx;
- height: 140rpx;
- border-radius: 8rpx;
- margin-right: 10rpx;
- }
- }
- }
- }
- .reject_box {
- padding: 15rpx 30rpx;
- }
- }
- }
- </style>
|