revert: 所有代码与custom/common分支同

This commit is contained in:
2026-01-05 15:56:49 +08:00
parent 8ef6975ee1
commit 60a0e5133e
219 changed files with 14860 additions and 15585 deletions

View File

@@ -12,11 +12,9 @@
<view class="status-name color-base-text" v-if="item.refund_status == -1">退款失败</view>
</view>
<view class="goods-wrap">
<image :src="$util.img(item.sku_image, { size: 'mid' })" @error="imageError(index)"
mode="aspectFill" :lazy-load="true"></image>
<image :src="$util.img(item.sku_image, { size: 'mid' })" @error="imageError(index)" mode="aspectFill" :lazy-load="true"></image>
<view class="goods-info">
<view class="goods-name" @click="refundDetail(item.order_goods_id)">{{ item.sku_name
}}</view>
<view class="goods-name" @click="refundDetail(item.order_goods_id)">{{ item.sku_name }}</view>
<view class="goods-num">
<view class="num-text color-base-text">{{ item.refund_status_name }}</view>
<view class="num-price">
@@ -29,14 +27,17 @@
<view class="goods-btn">
<view class="btn-text">
<text>{{ item.num }}件商品</text>
<text>退款{{ item.refund_status == 3 ? item.refund_real_money :
item.refund_apply_money }}</text>
<text>退款{{ item.refund_status == 3 ? item.refund_real_money : item.refund_apply_money }}</text>
</view>
<view class="order-action">
<view class="order-box-btn" @click="refundDetail(item.order_goods_id)">查看详情</view>
<block v-if="item.refund_action.length">
<view class="order-box-btn" @click="refundAction(actionItem.event, item)"
v-for="(actionItem, actionIndex) in item.refund_action" :key="actionIndex">
<view
class="order-box-btn"
@click="refundAction(actionItem.event, item)"
v-for="(actionItem, actionIndex) in item.refund_action"
:key="actionIndex"
>
{{ actionItem.title }}
</view>
</block>
@@ -45,8 +46,7 @@
</view>
</block>
<block v-else>
<view class="cart-empty" v-if="showEmpty"><ns-empty :isIndex="false"
:text="$lang('emptyTips')"></ns-empty></view>
<view class="cart-empty" v-if="showEmpty"><ns-empty :isIndex="false" :text="$lang('emptyTips')"></ns-empty></view>
</block>
</view>
</block>
@@ -56,12 +56,17 @@
<script>
import refundMethod from './public/js/refundMethod.js';
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
import nsLogin from '@/components/ns-login/ns-login.vue';
import loadingCover from '@/components/loading-cover/loading-cover.vue';
export default {
components: {
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
MescrollUni,
nsEmpty,
nsLogin,
loadingCover
},
data() {
return {
@@ -149,10 +154,8 @@ export default {
position: relative;
top: 0;
}
.cart-empty {
padding-top: 308rpx !important;
}
@import './public/css/activist.scss';
</style>

View File

@@ -10,15 +10,13 @@ export default {
data() {
return {};
},
components: {
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
},
onLoad(option) {
if (option.order_id) {
this.$util.redirectTo('/pages_order/detail/detail', { order_id: option.order_id }, 'redirectTo');
this.$util.redirectTo('/pages_order/detail', {order_id: option.order_id}, 'redirectTo');
}
}
};
</script>
<style lang="scss"></style>
<style lang="scss">
</style>

View File

@@ -6,31 +6,27 @@
<view class="eval-wrap">
<view class="eval-good">
<view class="good-box">
<image class="good_pic" :src="$util.img(item.sku_image, { size: 'mid' })"
@error="imageError(index)" mode="widthFix" />
<image class="good_pic" :src="$util.img(item.sku_image, { size: 'mid' })" @error="imageError(index)" mode="widthFix" />
<view class="good_info font-size-base">{{ item.sku_name }}</view>
</view>
</view>
<view class="eval-star" v-if="!isEvaluate">
<view class="star-box">
<view class="star-title color-base-bg-before">描述相符</view>
<view class="rate-box"><sx-rate :value="goodsEvalList[index].scores" :index="index"
@change="setStar" /></view>
<view class="rate-box"><sx-rate :value="goodsEvalList[index].scores" :index="index" @change="setStar" /></view>
<view class="grade-li">
<view class="icon iconfont" :class="goodsEvalList[index].explain_type == '1'
? 'icon-haoping1 color-base-text'
: goodsEvalList[index].explain_type == '2'
? 'icon-zhongchaping color-base-text'
: goodsEvalList[index].explain_type == '3'
<view class="icon iconfont" :class="
goodsEvalList[index].explain_type == '1'
? 'icon-haoping1 color-base-text'
: goodsEvalList[index].explain_type == '2'
? 'icon-zhongchaping color-base-text'
: goodsEvalList[index].explain_type == '3'
? 'icon-zhongchaping'
: ''
"></view>
<view class="font-size-tag color-base-text"
v-if="goodsEvalList[index].explain_type == '1'"></view>
<view class="font-size-tag color-base-text"
v-if="goodsEvalList[index].explain_type == '2'">中评</view>
<view class="font-size-tag color-base-text"
v-if="goodsEvalList[index].explain_type == '3'">差评</view>
<view class="font-size-tag color-base-text" v-if="goodsEvalList[index].explain_type == '1'">好评</view>
<view class="font-size-tag color-base-text" v-if="goodsEvalList[index].explain_type == '2'"></view>
<view class="font-size-tag color-base-text" v-if="goodsEvalList[index].explain_type == '3'">差评</view>
</view>
</view>
</view>
@@ -39,24 +35,20 @@
<view class="eval-text">
<view class="text-box">
<block v-if="!isEvaluate">
<textarea placeholder="请在此处输入您的评价" v-model="goodsEvalList[index].content"
maxlength="200" />
<textarea placeholder="请在此处输入您的评价" v-model="goodsEvalList[index].content" maxlength="200" />
<text class="maxSize">{{ goodsEvalList[index].content.length }}/200</text>
</block>
<block v-else>
<textarea placeholder="请在此处输入您的追评" v-model="goodsEvalList[index].again_content"
maxlength="200" />
<textarea placeholder="请在此处输入您的追评" v-model="goodsEvalList[index].again_content" maxlength="200" />
<text class="maxSize">{{ goodsEvalList[index].again_content.length }}/200</text>
</block>
<view class="other-info">
<view class="other-info-box" v-for="(i, t) in imgList[index]" :key="t">
<image :src="$util.img(i)" mode="aspectFill" @click="preview(i, index)"></image>
<view class="imgDel" @click="deleteImg(i, index, t)"><text
class=" icon iconfont icon-delete"></text></view>
<view class="imgDel" @click="deleteImg(i, index ,t)"><text class=" icon iconfont icon-delete"></text></view>
</view>
<view class="other-info-box active" @click="addImg(index)"
v-if="imgList[index].length < 6 || imgList[index].length == undefined">
<view class="other-info-box active" @click="addImg(index)" v-if="imgList[index].length < 6 || imgList[index].length == undefined">
<text class="icon iconfont icon-zhaoxiangji"></text>
<text>{{ imgList[index].length ? 6 - imgList[index].length : 0 }}/6</text>
</view>
@@ -67,8 +59,7 @@
</view>
<view class="eval-bottom" :class="{ 'safe-area': isIphoneX }">
<view class="all-election" @click="isAll()" v-if="!isEvaluate">
<view class="iconfont color-base-text"
:class="isAnonymous ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></view>
<view class="iconfont color-base-text" :class="isAnonymous ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></view>
<text>匿名</text>
</view>
<view class="action-btn"><button type="primary" @click="save()">提交</button></view>
@@ -80,17 +71,16 @@
</template>
<script>
import evaluate from './public/js/evaluate.js';
export default {
components: {
sxRate: () => import('@/components/sx-rate/index.vue'),
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
},
mixins: [evaluate],
};
import sxRate from '@/pages_tool/components/sx-rate/index.vue';
import evaluate from './public/js/evaluate.js';
export default {
components: {
sxRate
},
mixins: [evaluate],
};
</script>
<style lang="scss">
@import './public/css/evaluate.scss'
@import './public/css/evaluate.scss'
</style>

View File

@@ -1,27 +1,22 @@
<template>
<view :style="themeColor">
<scroll-view class="order-nav" :scroll-x="true" :show-scrollbar="false">
<view v-for="(packageItem, packageIndex) in packageList" :key="packageIndex" class="uni-tab-item"
@click="ontabtap(packageIndex)">
<text class="uni-tab-item-title"
:class="packageIndex == currIndex ? 'uni-tab-item-title-active color-base-border color-base-text' : ''">
<view v-for="(packageItem, packageIndex) in packageList" :key="packageIndex" class="uni-tab-item" @click="ontabtap(packageIndex)">
<text class="uni-tab-item-title" :class="packageIndex == currIndex ? 'uni-tab-item-title-active color-base-border color-base-text' : ''">
{{ packageItem.package_name }}
</text>
</view>
</scroll-view>
<view v-for="(packageItem, packageIndex) in packageList" :key="packageIndex" class="swiper-item"
v-show="packageIndex == currIndex">
<view v-for="(packageItem, packageIndex) in packageList" :key="packageIndex" class="swiper-item" v-show="packageIndex == currIndex">
<view class="container">
<view class="goods-wrap">
<view class="body">
<view class="goods" v-for="(goodsItem, goodsIndex) in packageItem.goods_list" :key="goodsIndex">
<view class="goods-img" @click="toGoodsDetail(goodsItem.sku_id)">
<image :src="$util.img(goodsItem.sku_image, { size: 'mid' })"
@error="imageError(packageIndex, goodsIndex)" mode="aspectFill"></image>
<image :src="$util.img(goodsItem.sku_image, { size: 'mid' })" @error="imageError(packageIndex, goodsIndex)" mode="aspectFill"></image>
</view>
<view class="goods-info">
<view @click="toGoodsDetail(goodsItem.sku_id)" class="goods-name">{{ goodsItem.sku_name
}}</view>
<view @click="toGoodsDetail(goodsItem.sku_id)" class="goods-name">{{ goodsItem.sku_name }}</view>
<view class="goods-sub-section">
<view>
<text>
@@ -36,9 +31,7 @@
</view>
<view class="express-company-wrap" v-if="packageItem.delivery_type == 1">
<view class="company-logo">
<image :src="$util.img(packageItem.express_company_image)"></image>
</view>
<view class="company-logo"><image :src="$util.img(packageItem.express_company_image)"></image></view>
<view class="info">
<view class="company">
<text>承运公司 {{ packageItem.express_company_name }}</text>
@@ -55,14 +48,16 @@
<view class="track-wrap" v-if="packageItem.delivery_type == 1">
<block v-if="packageItem.trace.success && packageItem.trace.list.length != 0">
<view class="track-item" v-for="(traceItem, traceIndex) in packageItem.trace.list"
:class="traceIndex == 0 ? 'active' : ''" :key="traceIndex">
<view
class="track-item"
v-for="(traceItem, traceIndex) in packageItem.trace.list"
:class="traceIndex == 0 ? 'active' : ''"
:key="traceIndex"
>
<view class="dot" :class="traceIndex == 0 ? 'color-base-bg' : ''"></view>
<view class="msg">
<view class="text" :class="traceIndex == 0 ? 'color-base-text' : ''">{{ traceItem.remark
}}</view>
<view class="time" :class="traceIndex == 0 ? 'color-base-text' : ''">{{
traceItem.datetime }}</view>
<view class="text" :class="traceIndex == 0 ? 'color-base-text' : ''">{{ traceItem.remark }}</view>
<view class="time" :class="traceIndex == 0 ? 'color-base-text' : ''">{{ traceItem.datetime }}</view>
</view>
</view>
</block>
@@ -81,9 +76,6 @@
<script>
export default {
components: {
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
},
data() {
return {
orderId: '',
@@ -135,7 +127,7 @@ export default {
title: '未获取到订单信息!'
});
setTimeout(() => {
this.$util.redirectTo('/pages_order/base/list');
this.$util.redirectTo('/pages_order/list');
}, 1500);
}
},
@@ -151,7 +143,7 @@ export default {
this.packageList[packageIndex].goods_list[goodsIndex].sku_image = this.$util.getDefaultImage().goods;
this.$forceUpdate();
},
copyDeliveryNo(value) {
copyDeliveryNo(value){
this.$util.copy(value);
}
}
@@ -160,7 +152,6 @@ export default {
<style lang="scss">
@import './public/css/logistics.scss';
/deep/.uni-scroll-view ::-webkit-scrollbar {
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
display: none;
@@ -169,7 +160,6 @@ export default {
color: transparent;
background: transparent;
}
/deep/::-webkit-scrollbar {
display: none;
width: 0;

View File

@@ -23,7 +23,7 @@ export default {
},
onLoad(options) {
//接收订单号,订单是否是追评等信息
options.order_id ? (this.orderId = options.order_id) : this.$util.redirectTo('/pages_order/base/list');
options.order_id ? (this.orderId = options.order_id) : this.$util.redirectTo('/pages_order/list');
this.isIphoneX = this.$util.uniappIsIPhoneX();
if (!this.storeToken) {
@@ -90,7 +90,7 @@ export default {
title: "未获取到订单数据"
})
setTimeout(() => {
this.$util.redirectTo('/pages_order/base/list', {}, "redirectTo");
this.$util.redirectTo('/pages_order/list', {}, "redirectTo");
}, 1000)
}
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
@@ -200,7 +200,7 @@ export default {
title: "评价成功"
});
setTimeout(() => {
this.$util.redirectTo('/pages_order/base/list', {}, "redirectTo");
this.$util.redirectTo('/pages_order/list', {}, "redirectTo");
}, 1000);
} else {
this.$util.showToast({

View File

@@ -4,9 +4,7 @@
<scroll-view scroll-y="true" class="refund-container">
<view class="goods-wrap">
<view class="goods-img">
<image :src="$util.img(refund_data.order_goods_info.sku_image, { size: 'mid' })"
@error="refund_data.order_goods_info.sku_image = $util.getDefaultImage().goods"
mode="aspectFill" :lazy-load="true" />
<image :src="$util.img(refund_data.order_goods_info.sku_image, { size: 'mid' })" @error="refund_data.order_goods_info.sku_image = $util.getDefaultImage().goods" mode="aspectFill" :lazy-load="true"/>
</view>
<view class="goods-info">
<view class="goods-name">{{ refund_data.order_goods_info.sku_name }}</view>
@@ -42,23 +40,32 @@
</view>
<view class="item-wrap">
<view class="label">退款金额</view>
<view class="cont color-base-text">{{ $lang('common.currencySymbol') }}{{
refund_data.refund_money }}</view>
<view class="cont color-base-text">{{ $lang('common.currencySymbol') }}{{ refund_data.refund_money }}</view>
</view>
</view>
<view class="refund-form">
<view class="item-wrap">
<view class="label active">退款说明</view>
</view>
<view class="item-wrap"><view class="label active">退款说明</view></view>
<!-- #ifdef MP-WEIXIN -->
<textarea v-if="!showText" class="newText" placeholder="请输入退款说明(选填)"
placeholder-class="color-tip font-size-tag" :auto-height="true" v-model="refund_remark" />
<textarea
v-if="!showText"
class="newText"
placeholder="请输入退款说明(选填)"
placeholder-class="color-tip font-size-tag"
:auto-height="true"
v-model="refund_remark"
/>
<!-- #endif -->
<!-- #ifdef H5 -->
<textarea class="newText" placeholder="请输入退款说明(选填)" @blur="textBlur()"
placeholder-class="color-tip font-size-tag" :auto-height="true" v-model="refund_remark" />
<textarea
class="newText"
placeholder="请输入退款说明(选填)"
@blur="textBlur()"
placeholder-class="color-tip font-size-tag"
:auto-height="true"
v-model="refund_remark"
/>
<!-- #endif -->
</view>
@@ -72,18 +79,14 @@
<view class="refund-reason-popup popup">
<view class="popup-header">
<view><text class="tit">退款原因</text></view>
<view class="align-right" @click="closePopup('refundReasonPopup')"><text
class="iconfont icon-close"></text></view>
<view class="align-right" @click="closePopup('refundReasonPopup')"><text class="iconfont icon-close"></text></view>
</view>
<view class="popup-body">
<scroll-view scroll-y="true" class="scroll-view" :class="{ 'safe-area': isIphoneX }">
<view class="reason-list">
<view class="item" v-for="(item, index) in refund_data.refund_reason_type"
:key="index" @click="changeReason(item)">
<view class="item" v-for="(item, index) in refund_data.refund_reason_type" :key="index" @click="changeReason(item)">
<view class="reason">{{ item }}</view>
<view class="iconfont"
:class="refund_reason == item ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'">
</view>
<view class="iconfont" :class="refund_reason == item ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></view>
</view>
</view>
</scroll-view>
@@ -95,16 +98,16 @@
</uni-popup>
</scroll-view>
<loading-cover ref="loadingCover"></loading-cover>
</view>
</view>
</template>
<script>
import uniPopup from '@/components/uni-popup/uni-popup.vue';
export default {
components: {
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
uniPopup
},
data() {
return {
@@ -175,7 +178,7 @@ export default {
} else {
this.$util.showToast({ title: '未获取到该订单项退款信息' });
setTimeout(() => {
this.$util.redirectTo('/pages_order/base/list');
this.$util.redirectTo('/pages_order/list');
}, 1000);
}
},
@@ -188,7 +191,7 @@ export default {
if (this.verify()) {
if (this.isSub) return;
this.isSub = true;
// #ifdef MP
this.subscribeMessage(() => {
this.$api.sendRequest({
@@ -213,7 +216,7 @@ export default {
});
})
// #endif
// #ifndef MP-WEIXIN
this.$api.sendRequest({
url: '/api/orderrefund/refund',
@@ -254,7 +257,7 @@ export default {
/**
* 微信订阅消息
*/
subscribeMessage(callback) {
subscribeMessage(callback){
this.$api.sendRequest({
url: '/weapp/api/weapp/messagetmplids',
data: {
@@ -267,7 +270,7 @@ export default {
fail: (res) => {
console.log('fail', res)
},
complete: () => {
complete: ()=> {
callback();
}
})
@@ -287,18 +290,15 @@ export default {
<style lang="scss">
@import './public/css/refund.scss';
</style>
<style lang="scss" scoped>
<style scoped>
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
background: none;
max-height: unset !important;
overflow-y: hidden !important;
}
/deep/ .uni-popup__wrapper {
border-radius: 20rpx 20rpx 0 0;
}
/deep/ .uni-popup {
z-index: 8;
}

View File

@@ -2,11 +2,9 @@
<view :style="themeColor">
<view>
<scroll-view scroll-y="true" class="refund-container">
<view class="goods-wrap" v-for="(item, index) in refund_data.order_goods_info" :key="index">
<view class="goods-wrap" v-for="(item,index) in refund_data.order_goods_info" :key="index">
<view class="goods-img">
<image :src="$util.img(item.sku_image, { size: 'mid' })"
@error="item.sku_image = $util.getDefaultImage().goods" mode="aspectFill"
:lazy-load="true" />
<image :src="$util.img(item.sku_image, { size: 'mid' })" @error="item.sku_image = $util.getDefaultImage().goods" mode="aspectFill" :lazy-load="true"/>
</view>
<view class="goods-info">
<view class="goods-name">{{ item.sku_name }}</view>
@@ -14,7 +12,7 @@
</view>
<view>
<view class="refund-form">
<view class="item-wrap" @click="openPopup('refundReasonPopup')">
<view class="label">退款原因</view>
@@ -31,23 +29,32 @@
</view>
<view class="item-wrap">
<view class="label">退款金额</view>
<view class="cont color-base-text">{{ $lang('common.currencySymbol') }}{{
refund_data.refund_money }}</view>
<view class="cont color-base-text">{{ $lang('common.currencySymbol') }}{{ refund_data.refund_money }}</view>
</view>
</view>
<view class="refund-form">
<view class="item-wrap">
<view class="label active">退款说明</view>
</view>
<view class="item-wrap"><view class="label active">退款说明</view></view>
<!-- #ifdef MP-WEIXIN -->
<textarea v-if="!showText" class="newText" placeholder="请输入退款说明(选填)"
placeholder-class="color-tip font-size-tag" :auto-height="true" v-model="refund_remark" />
<textarea
v-if="!showText"
class="newText"
placeholder="请输入退款说明(选填)"
placeholder-class="color-tip font-size-tag"
:auto-height="true"
v-model="refund_remark"
/>
<!-- #endif -->
<!-- #ifdef H5 -->
<textarea class="newText" placeholder="请输入退款说明(选填)" @blur="textBlur()"
placeholder-class="color-tip font-size-tag" :auto-height="true" v-model="refund_remark" />
<textarea
class="newText"
placeholder="请输入退款说明(选填)"
@blur="textBlur()"
placeholder-class="color-tip font-size-tag"
:auto-height="true"
v-model="refund_remark"
/>
<!-- #endif -->
</view>
@@ -62,18 +69,14 @@
<view class="refund-reason-popup popup">
<view class="popup-header">
<view><text class="tit">退款原因</text></view>
<view class="align-right" @click="closePopup('refundReasonPopup')"><text
class="iconfont icon-close"></text></view>
<view class="align-right" @click="closePopup('refundReasonPopup')"><text class="iconfont icon-close"></text></view>
</view>
<view class="popup-body">
<scroll-view scroll-y="true" class="scroll-view" :class="{ 'safe-area': isIphoneX }">
<view class="reason-list">
<view class="item" v-for="(item, index) in refund_data.refund_reason_type"
:key="index" @click="changeReason(item)">
<view class="item" v-for="(item, index) in refund_data.refund_reason_type" :key="index" @click="changeReason(item)">
<view class="reason">{{ item }}</view>
<view class="iconfont"
:class="refund_reason == item ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'">
</view>
<view class="iconfont" :class="refund_reason == item ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></view>
</view>
</view>
</scroll-view>
@@ -85,17 +88,16 @@
</uni-popup>
</scroll-view>
<loading-cover ref="loadingCover"></loading-cover>
</view>
</view>
</template>
<script>
import uniPopup from '@/components/uni-popup/uni-popup.vue';
export default {
components: {
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
uniPopup
},
data() {
return {
@@ -116,7 +118,7 @@ export default {
},
onLoad(option) {
if (option.order_goods_id) this.order_goods_id = option.order_goods_id;
if (option.refund_type) this.refund_type = option.refund_type;
},
onShow() {
@@ -168,7 +170,7 @@ export default {
} else {
this.$util.showToast({ title: '未获取到该订单项退款信息' });
setTimeout(() => {
this.$util.redirectTo('/pages_order/base/list');
this.$util.redirectTo('/pages_order/list');
}, 1000);
}
},
@@ -181,7 +183,7 @@ export default {
if (this.verify()) {
if (this.isSub) return;
this.isSub = true;
// #ifdef MP
this.subscribeMessage(() => {
this.$api.sendRequest({
@@ -196,8 +198,8 @@ export default {
this.$util.showToast({ title: res.message });
if (res.code >= 0) {
uni.removeStorage({
key: 'refund_goods_data',
success: res => {
key:'refund_goods_data',
success:res=>{
this.$util.redirectTo('/pages_tool/order/activist');
}
})
@@ -211,7 +213,7 @@ export default {
});
})
// #endif
// #ifndef MP-WEIXIN
this.$api.sendRequest({
url: '/api/orderrefund/refund',
@@ -225,8 +227,8 @@ export default {
this.$util.showToast({ title: res.message });
if (res.code >= 0) {
uni.removeStorage({
key: 'refund_goods_data',
success: res => {
key:'refund_goods_data',
success:res=>{
this.$util.redirectTo('/pages_tool/order/activist');
}
})
@@ -257,7 +259,7 @@ export default {
/**
* 微信订阅消息
*/
subscribeMessage(callback) {
subscribeMessage(callback){
this.$api.sendRequest({
url: '/weapp/api/weapp/messagetmplids',
data: {
@@ -270,7 +272,7 @@ export default {
fail: (res) => {
console.log('fail', res)
},
complete: () => {
complete: ()=> {
callback();
}
})
@@ -290,22 +292,19 @@ export default {
<style lang="scss">
@import './public/css/refund.scss';
</style>
<style lang="scss" scoped>
<style scoped>
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
background: none;
max-height: unset !important;
overflow-y: hidden !important;
}
/deep/ .uni-popup__wrapper {
border-radius: 20rpx 20rpx 0 0;
}
/deep/ .uni-popup {
z-index: 8;
}
.sub-btn {
.sub-btn{
padding-top: 20rpx;
background-color: #FFFFFF;
}

View File

@@ -40,8 +40,7 @@
<!-- 商品信息 -->
<view class="goods-wrap">
<view class="goods-img" @click="refundDetail(detail)">
<image :src="$util.img(detail.sku_image, { size: 'mid' })" @error="imageError()"
mode="aspectFill" :lazy-load="true"></image>
<image :src="$util.img(detail.sku_image, { size: 'mid' })" @error="imageError()" mode="aspectFill" :lazy-load="true"></image>
</view>
<view class="goods-info">
<view class="goods-name" @click="refundDetail(detail)">{{ detail.sku_name }}</view>
@@ -50,26 +49,21 @@
<!-- 退款信息 -->
<view class="info">
<view class="cell">退款方式{{ detail.refund_type == 1 ? '仅退款' : '退款退货' }}</view>
<view class="cell" v-if="detail.refund_status == 3">退款途径{{ detail.refund_money_type == 1 ?
'原路退款' : detail.refund_money_type == 2 ? '线下退款' : '退款到余额' }}</view>
<view class="cell" v-if="detail.refund_status == 3">退款途径{{ detail.refund_money_type == 1 ? '原路退款' : detail.refund_money_type == 2 ? '线下退款' : '退款到余额' }}</view>
<view class="cell">退款原因{{ detail.refund_reason }}</view>
<view class="cell" v-if="detail.refund_status == 3 && detail.refund_real_money > 0">退款金额{{
$lang('common.currencySymbol') }}{{ detail.refund_real_money }}</view>
<view class="cell" v-else-if="detail.refund_apply_money > 0">退款金额{{
$lang('common.currencySymbol') }}{{ detail.refund_apply_money }}</view>
<view class="cell" v-if="detail.refund_status == 3 && detail.refund_real_money>0">退款金额{{ $lang('common.currencySymbol') }}{{ detail.refund_real_money }}</view>
<view class="cell" v-else-if="detail.refund_apply_money>0">退款金额{{ $lang('common.currencySymbol') }}{{ detail.refund_apply_money }}</view>
<view class="cell">退款编号{{ detail.refund_no }}</view>
<view class="cell">申请时间{{ $util.timeStampTurnTime(detail.refund_action_time) }}</view>
<view class="cell" v-if="detail.refund_time">退款时间{{
$util.timeStampTurnTime(detail.refund_time) }}</view>
<view class="cell" v-if="detail.refund_time">退款时间{{ $util.timeStampTurnTime(detail.refund_time) }}</view>
<view class="cell" v-if="detail.refund_remark != ''">退款说明{{ detail.refund_remark }}</view>
<view class="cell" v-if="detail.use_point > 0">退款积分{{ detail.use_point }}</view>
<view class="cell" v-if="detail.use_point>0">退款积分{{ detail.use_point }}</view>
</view>
</view>
</view>
<view class="action" :class="{ 'bottom-safe-area': isIphoneX }" v-if="detail.refund_action.length">
<view class="order-box-btn" v-for="(actionItem, actionIndex) in detail.refund_action"
:key="actionIndex" @click="refundAction(actionItem.event)">
<view class="order-box-btn" v-for="(actionItem, actionIndex) in detail.refund_action" :key="actionIndex" @click="refundAction(actionItem.event)">
{{ actionItem.title }}
</view>
</view>
@@ -81,24 +75,37 @@
<view class="item">
<view class="label">物流公司</view>
<view class="cont">
<input type="text" placeholder="请输入物流公司" class="input"
<input
type="text"
placeholder="请输入物流公司"
class="input"
placeholder-class="input-placeholder color-tip"
v-model="formData.refund_delivery_name" />
v-model="formData.refund_delivery_name"
/>
</view>
</view>
<view class="item">
<view class="label">物流单号</view>
<view class="cont">
<input type="text" placeholder="请输入物流单号" class="input"
<input
type="text"
placeholder="请输入物流单号"
class="input"
placeholder-class="input-placeholder color-tip"
v-model="formData.refund_delivery_no" />
v-model="formData.refund_delivery_no"
/>
</view>
</view>
<view class="item">
<view class="label">物流说明</view>
<view class="cont">
<textarea placeholder-class="color-tip font-size-tag" :auto-height="true"
class="textarea" placeholder="选填" v-model="formData.refund_delivery_remark" />
<textarea
placeholder-class="color-tip font-size-tag"
:auto-height="true"
class="textarea"
placeholder="选填"
v-model="formData.refund_delivery_remark"
/>
</view>
</view>
</view>
@@ -108,8 +115,7 @@
<view v-show="action == 'consultrecord'">
<view class="record-wrap">
<view class="record-item" :class="logItem.action_way == 1 ? 'buyer' : ''"
v-for="(logItem, logIndex) in detail.refund_log_list" :key="logIndex">
<view class="record-item" :class="logItem.action_way == 1 ? 'buyer' : ''" v-for="(logItem, logIndex) in detail.refund_log_list" :key="logIndex">
<view class="cont">
<view class="head">
<text>{{ logItem.action_way == 1 ? '买家' : '卖家' }}</text>
@@ -124,7 +130,7 @@
<view class="empty-box"></view>
</view>
<view class="history-bottom" :class="{ 'bottom-safe-area': isIphoneX }">
<!-- <ns-contact :niushop="{order_id: detail.order_id}">
<!-- <ns-contact :niushop="{order_id: detail.order_id}">
<view>
<text class="iconfont icon-ziyuan"></text>
<text>联系客服</text>
@@ -135,19 +141,15 @@
</view>
</scroll-view>
<loading-cover ref="loadingCover"></loading-cover>
</view>
</template>
<script>
import refundMethod from './public/js/refundMethod.js';
import validate from 'common/js/validate.js';
import nsContact from '@/components/ns-contact/ns-contact.vue';
export default {
components: {
nsContact: () => import('@/components/ns-contact/ns-contact.vue'),
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
},
data() {
return {
order_goods_id: '',
@@ -164,6 +166,9 @@ export default {
isSub: false
};
},
components: {
nsContact
},
mixins: [refundMethod],
onLoad(option) {
if (option.order_goods_id) this.order_goods_id = option.order_goods_id;
@@ -191,7 +196,7 @@ export default {
} else {
this.$util.showToast({ title: '未获取到该订单项退款信息' });
setTimeout(() => {
this.$util.redirectTo('/pages_order/base/list');
this.$util.redirectTo('/pages_order/list');
}, 1000);
}
},
@@ -207,7 +212,7 @@ export default {
if (res.code >= 0) {
this.$util.showToast({ title: '撤销成功' });
setTimeout(() => {
this.$util.redirectTo('/pages_order/base/list');
this.$util.redirectTo('/pages_order/list');
}, 1000);
}
});

View File

@@ -1,236 +1,225 @@
<template>
<view class="goods-select" :style="themeColor">
<view class="top">
<text class="color-base-text">{{ refund_data.length }}</text>件商品
<text class="color-base-text">{{refund_data.length}}</text>件商品
</view>
<view class="body">
<view class="item" v-for="(item, index) in refund_data" :key="index">
<view class="item" v-for="(item,index) in refund_data" :key="index">
<view @click="single(index)" style="display:none">
<text v-if="item.judge" class="iconfont icon-yuan_checked color-base-text"></text>
<text v-else class="iconfont icon-yuan_checkbox"></text>
</view>
<image :src="$util.img(item.sku_image)" @error="error(index)"></image>
<view class="title">
<text>{{ item.sku_name }}</text>
<text>{{item.sku_name}}</text>
</view>
</view>
</view>
<view class="bottom-all">
<view>
<!-- @click="all"
<view >
<!-- @click="all"
<text v-if="judge" class="iconfont icon-yuan_checked color-base-text"></text>
<text v-else class="iconfont icon-yuan_checkbox"></text> -->
</view>
<view v-if="nexthover" class="next" @click="next">下一步</view>
<view v-else class="next nexthover">请选择商品</view>
</view>
<!-- <loading-cover ref="loadingCover"></loading-cover> -->
</view>
</template>
<script>
export default {
components: {
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
},
data() {
return {
refund_type: 1,
refund_data: [],
judge: true,
order_goods_id: [],
nexthover: true
}
},
onLoad(option) {
if (option.refund_type) {
this.refund_type = option.refund_type;
this.getGoodsInfo()
} else {
uni.showToast({
title: '未查找到订单信息',
icon: 'none'
})
setTimeout(() => {
this.$util.redirectTo('/pages_order/base/list');
}, 1000)
}
},
methods: {
/**
* 处理商品选中数据
*/
getGoodsInfo() {
uni.getStorage({
key: 'refund_goods_data',
success: res => {
let refund_data = JSON.parse(res.data);
this.refund_data = [];
refund_data.forEach(item => {
if (item.refund_status == 0) {
item.judge = true;
this.refund_data.push(item);
}
})
}
})
},
/**
*单选事件
*/
single(key) {
this.refund_data[key].judge = !this.refund_data[key].judge;
let allJudge = true;
this.refund_data.forEach((item) => {
if (!item.judge) {
allJudge = false;
}
})
this.judge = allJudge;
this.getOrderIdInfo();
this.$forceUpdate()
},
/**
* 全选选择
*/
all() {
this.judge = !this.judge;
this.refund_data.map(item => {
item.judge = this.judge;
return item;
})
this.getOrderIdInfo();
this.$forceUpdate()
},
/**
* 获取选择的order_goods_id
*/
getOrderIdInfo() {
this.order_goods_id = [];
this.refund_data.forEach(item => {
if (item.judge) {
this.order_goods_id.push(item.order_goods_id)
}
})
if (this.order_goods_id.length == 0) {
this.nexthover = false;
} else {
this.nexthover = true;
export default{
data(){
return{
refund_type:1,
refund_data:[],
judge:true,
order_goods_id:[],
nexthover:true
}
this.$forceUpdate();
},
/**
* 跳转退款界面
*/
next() {
this.refund_data.forEach(item => {
this.order_goods_id.push(item.order_goods_id)
})
if (this.order_goods_id.length == 0) {
onLoad(option){
if(option.refund_type){
this.refund_type = option.refund_type;
this.getGoodsInfo()
} else{
uni.showToast({
title:'未查找到订单信息',
icon:'none'
})
setTimeout(()=>{
this.$util.redirectTo('/pages_order/list');
},1000)
}
},
methods:{
/**
* 处理商品选中数据
*/
getGoodsInfo(){
uni.getStorage({
key:'refund_goods_data',
success:res=>{
let refund_data = JSON.parse(res.data);
this.refund_data = [];
refund_data.forEach(item=>{
if(item.refund_status == 0){
item.judge = true;
this.refund_data.push(item);
}
})
}
})
},
/**
*单选事件
*/
single(key){
this.refund_data[key].judge = !this.refund_data[key].judge;
let allJudge = true;
this.refund_data.forEach((item)=>{
if(!item.judge){
allJudge = false;
}
})
this.judge = allJudge;
this.getOrderIdInfo();
this.$forceUpdate()
},
/**
* 全选选择
*/
all(){
this.judge = !this.judge;
this.refund_data.map(item=>{
item.judge = this.judge;
return item;
})
this.getOrderIdInfo();
this.$forceUpdate()
},
/**
* 获取选择的order_goods_id
*/
getOrderIdInfo(){
this.order_goods_id = [];
this.refund_data.forEach(item=>{
if(item.judge){
this.order_goods_id.push(item.order_goods_id)
}
})
if(this.order_goods_id.length == 0){
this.nexthover = false;
}else{
this.nexthover = true;
}
this.$forceUpdate();
},
/**
* 跳转退款界面
*/
next(){
this.refund_data.forEach(item=>{
this.order_goods_id.push(item.order_goods_id)
})
if(this.order_goods_id.length == 0){
this.getOrderIdInfo();
}
this.$util.redirectTo('/pages_tool/order/refund_batch', { order_goods_id: this.order_goods_id.join(), refund_type:this.refund_type });
},
/**
* 默认图片处理
*/
error(index){
this.refund_data[index].sku_image = this.$util.getDefaultImage().goods
this.$forceUpdate();
}
this.$util.redirectTo('/pages_tool/order/refund_batch', { order_goods_id: this.order_goods_id.join(), refund_type: this.refund_type });
},
/**
* 默认图片处理
*/
error(index) {
this.refund_data[index].sku_image = this.$util.getDefaultImage().goods
this.$forceUpdate();
}
}
}
</script>
<style lang="scss" scoped>
.goods-select {
.top {
padding: 20rpx 30rpx;
box-sizing: border-box;
font-size: 28rpx;
background: #FFFFFF;
text {
font-size: 30rpx;
margin: 0 10rpx;
font-weight: bold;
}
}
.iconfont {
font-size: 40rpx;
}
.body {
margin: 30rpx;
border-radius: 10rpx;
background: #FFFFFF;
padding: 30rpx 0 0;
.item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30rpx 30rpx;
image {
width: 180rpx;
height: 180rpx;
border-radius: 10rpx;
.goods-select{
.top{
padding: 20rpx 30rpx;
box-sizing: border-box;
font-size: 28rpx;
background: #FFFFFF;
text{
font-size: 30rpx;
margin: 0 10rpx;
font-weight: bold;
}
}
.iconfont{
font-size: 40rpx;
}
.body{
margin: 30rpx;
border-radius: 10rpx;
background: #FFFFFF;
padding: 30rpx 0 0;
.item{
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30rpx 30rpx;
.title {
width: 368rpx;
height: 180rpx;
font-size: 28rpx;
text {
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
line-clamp: 3;
-webkit-box-orient: vertical;
image{
width: 180rpx;
height: 180rpx;
border-radius: 10rpx;
}
.title{
width: 368rpx;
height:180rpx;
font-size: 28rpx;
text{
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
line-clamp: 3;
-webkit-box-orient: vertical;
}
}
}
}
}
.bottom-all {
padding-left: 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
background: #FFFFFF;
position: fixed;
left: 0;
bottom: 0;
width: 100%;
box-sizing: border-box;
.next {
padding: 16rpx 80rpx;
color: #FFFFFF;
background: #ff4544;
}
.nexthover {
background: #e7dcdc !important;
.bottom-all{
padding-left: 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
background: #FFFFFF;
position: fixed;
left: 0;
bottom: 0;
width: 100%;
box-sizing: border-box;
.next{
padding: 16rpx 80rpx;
color: #FFFFFF;
background: #ff4544;
}
.nexthover{
background: #e7dcdc !important;
}
}
}
}
</style>

View File

@@ -25,97 +25,96 @@
</template>
<script>
export default {
components: {
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
},
data() {
return {
order_id: '',
isIphoneX: false,
refund_data: {},
};
},
onLoad(option) {
if (option.order_id) this.order_id = option.order_id;
},
onShow() {
this.isIphoneX = this.$util.uniappIsIPhoneX();
if (this.storeToken) {
this.getRefundData();
} else {
this.$util.redirectTo('/pages_tool/login/login', {
back: '/pages_tool/order/refund?order_goods_id=' + this.order_goods_id
});
}
},
methods: {
/**
* 选择退款方式
* @param {Object} type
*/
selectRefundType(type) {
this.$util.redirectTo('/pages_tool/order/refund_goods_select', {
refund_type: type
});
import uniPopup from '@/components/uni-popup/uni-popup.vue';
export default {
components: {
uniPopup
},
/**
* 获取退款订单数据
*/
getRefundData() {
this.$api.sendRequest({
url: '/api/order/detail',
data: {
order_id: this.order_id
},
success: res => {
if (res.code >= 0) {
this.refund_data = res.data;
uni.setStorage({
key: 'refund_goods_data',
data: JSON.stringify(res.data.order_goods),
})
data() {
return {
order_id: '',
isIphoneX: false,
refund_data: {},
};
},
onLoad(option) {
if (option.order_id) this.order_id = option.order_id;
},
onShow() {
this.isIphoneX = this.$util.uniappIsIPhoneX();
if (this.storeToken) {
this.getRefundData();
} else {
this.$util.redirectTo('/pages_tool/login/login', {
back: '/pages_tool/order/refund?order_goods_id=' + this.order_goods_id
});
}
},
methods: {
/**
* 选择退款方式
* @param {Object} type
*/
selectRefundType(type) {
this.$util.redirectTo('/pages_tool/order/refund_goods_select', {
refund_type: type
});
},
/**
* 获取退款订单数据
*/
getRefundData() {
this.$api.sendRequest({
url: '/api/order/detail',
data: {
order_id: this.order_id
},
success: res => {
if (res.code >= 0) {
this.refund_data = res.data;
uni.setStorage({
key: 'refund_goods_data',
data: JSON.stringify(res.data.order_goods),
})
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
} else {
this.$util.showToast({
title: '未获取到该订单项退款信息'
});
setTimeout(() => {
this.$util.redirectTo('/pages_order/list');
}, 1000);
}
},
fail: res => {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
} else {
this.$util.showToast({
title: '未获取到该订单项退款信息'
});
setTimeout(() => {
this.$util.redirectTo('/pages_order/base/list');
}, 1000);
}
},
fail: res => {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}
});
},
}
};
});
},
}
};
</script>
<style lang="scss">
@import './public/css/refund.scss';
@import './public/css/refund.scss';
</style>
<style lang="scss" scoped>
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
background: none;
max-height: unset !important;
overflow-y: hidden !important;
}
<style scoped>
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
background: none;
max-height: unset !important;
overflow-y: hidden !important;
}
/deep/ .uni-popup__wrapper {
border-radius: 20rpx 20rpx 0 0;
}
/deep/ .uni-popup__wrapper {
border-radius: 20rpx 20rpx 0 0;
}
/deep/ .uni-popup {
z-index: 8;
}
/deep/ .uni-popup {
z-index: 8;
}
.sub-btn {
padding-top: 20rpx;
background-color: #FFFFFF;
}
.sub-btn {
padding-top: 20rpx;
background-color: #FFFFFF;
}
</style>