parent
68c11b79a9
commit
cd457a63b0
@ -0,0 +1,13 @@
|
||||
/*
|
||||
* @Author: ch
|
||||
* @Date: 2022-04-13 14:30:33
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-04-13 14:31:55
|
||||
* @Description: file content
|
||||
*/
|
||||
|
||||
import {ToAsyncAwait, MsbRequestTk} from '@/common/utils';
|
||||
|
||||
const BASE_URL = '/oss/oss';
|
||||
export const ApiPostGetOssConfig = (data) =>
|
||||
ToAsyncAwait(MsbRequestTk.post(`${BASE_URL}/generateOssSignature`, data));
|
@ -1,99 +0,0 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-04-11 13:51:10
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-04-12 13:52:58
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<view>
|
||||
<view class="box">
|
||||
<UiCell title="货物状态" @click="receiveShow = true">
|
||||
<input class="input" slot="value" disabled placeholder="请选择" :value="receiveSelected.label"/>
|
||||
</UiCell>
|
||||
<UiCell title="退款原因" @click="refundShow=true">
|
||||
<input class="input" slot="value" disabled placeholder="请选择" :value="refundSelected.label"/>
|
||||
</UiCell>
|
||||
<UiCell title="退款金额" :rightIcon="false">
|
||||
<text class="price" slot="value">¥36.3</text>
|
||||
</UiCell>
|
||||
<UiCell title="问题描述"></UiCell>
|
||||
</view>
|
||||
<view class="box">
|
||||
<u-upload
|
||||
:fileList="fileList3"
|
||||
@afterRead="afterRead"
|
||||
@delete="deletePic"
|
||||
name="3"
|
||||
multiple
|
||||
:maxCount="10"
|
||||
:previewFullImage="true"
|
||||
></u-upload>
|
||||
</view>
|
||||
<UiButton size="max" type="gradual">提交申请</UiButton>
|
||||
<UiRadioPicker title="退款原因" :show.sync="refundShow"
|
||||
:options="refundReasonData" v-model="refundSelected"></UiRadioPicker>
|
||||
<UiRadioPicker title="货物状态" :show.sync="receiveShow"
|
||||
:options="receiveStatusData" v-model="receiveSelected"></UiRadioPicker>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import UiButton from '../../../components/UiButton.vue';
|
||||
import UiCell from "../../../components/UiCell.vue";
|
||||
import UiRadioPicker from '../../../components/UiRadioPicker.vue';
|
||||
export default {
|
||||
components: { UiCell, UiButton, UiRadioPicker },
|
||||
data() {
|
||||
return {
|
||||
fileList3: [
|
||||
{
|
||||
url: "https://cdn.uviewui.com/uview/swiper/1.jpg",
|
||||
},
|
||||
],
|
||||
params : {
|
||||
receiveStatus : '',
|
||||
refundReason : '',
|
||||
refundType : '',
|
||||
orderProductId : '',
|
||||
problemDescribe : '',
|
||||
evidenceImages : ''
|
||||
},
|
||||
|
||||
refundShow : false,
|
||||
refundSelected : {},
|
||||
refundReasonData : [
|
||||
{label : '7天无理由退款', value: '1'},
|
||||
{label : '不喜欢/效果不满意', value: '2'},
|
||||
{label : '商品不符合描述', value: '3'},
|
||||
{label : '其它原因', value: '4'},
|
||||
],
|
||||
receiveSelected : {},
|
||||
receiveShow : false,
|
||||
receiveStatusData : [
|
||||
{label : '未收到货', value: '1'},
|
||||
{label : '已收到货', value: '2'}
|
||||
]
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
page{
|
||||
background: $color-grey1;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.box{
|
||||
padding: 0 40rpx;
|
||||
margin: 20rpx 0;
|
||||
background: $color-grey0;
|
||||
}
|
||||
.input{
|
||||
font-size: $font-size-base;
|
||||
text-align: right;
|
||||
flex: 1;
|
||||
}
|
||||
.price{
|
||||
color: $color-yellow4;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,103 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-31 17:53:43
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-03-31 20:43:19
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<view class="status">
|
||||
<image class="status--icon" :src="ctxCon.icon"></image>
|
||||
<view class="status--name">{{ctxCon.name}}</view>
|
||||
<view class="status--desc">{{ctxCon.tips}}</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {DictOrderStatus } from '@/common/dicts/order'
|
||||
import Enum from "@/common/plugins/enum"
|
||||
export default {
|
||||
props : {
|
||||
orderInfo : {
|
||||
type : Object,
|
||||
default : {}
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
ctxData : {
|
||||
awaitPay : {name:'待付款', tips:'', icon: require('@/static/order/fk.png')},
|
||||
close : {name:'交易关闭' , tips:'关闭原因', icon: require('@/static/order/qx.png')},
|
||||
awaitSend : {name:'等待发货', tips:'您的包裹整装待发', icon: require('@/static/order/fh.png')},
|
||||
finishSend : {name:'已发货', tips:'您的包裹正向您飞来', icon: require('@/static/order/fh.png')},
|
||||
finishReceiving : {name:'已收货', icon: require('@/static/order/fh.png')},
|
||||
end : {name:'交易成功', icon: require('@/static/order/cg.png')},
|
||||
},
|
||||
ctxCon : {},
|
||||
secondNum : 0
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
|
||||
},
|
||||
watch : {
|
||||
orderInfo(nVal){
|
||||
this.ctxCon = this.ctxData[this.statusKey];
|
||||
if(this.statusKey === 'awaitPay'){
|
||||
let expireTime = (new Date(this.orderInfo.expireTime)).getTime(),
|
||||
curTime = (new Date(this.orderInfo.serverTime)).getTime(),
|
||||
second = Math.floor((expireTime - curTime) / 1000);
|
||||
this.secondNum = second > 0 ? second : 0;
|
||||
this.timer()
|
||||
}else if(this.statusKey === 'close'){
|
||||
this.ctxCon.tips = this.orderInfo.closeReason;
|
||||
}
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
// 从字典表获取状态key
|
||||
statusKey (){
|
||||
return DictOrderStatus[this.orderInfo.orderStatus].value
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
/**
|
||||
* 待付款的计时器
|
||||
*/
|
||||
timer(){
|
||||
if(this.secondNum == 0){
|
||||
this.$emit('close');
|
||||
return;
|
||||
}
|
||||
this.secondNum--;
|
||||
let minute = parseInt(this.secondNum / 60);
|
||||
let second = parseInt(this.secondNum % 60);
|
||||
this.ctxCon.tips = `剩余${minute > 0 ? `${minute}分` : ''} ${second}秒`;
|
||||
// console.log(this.ctxCon.tips);
|
||||
setTimeout(()=>this.timer(),1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.status{
|
||||
padding: 30rpx 60rpx 0;
|
||||
position: relative;
|
||||
&--icon{
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
position: absolute;
|
||||
right: 60rpx;
|
||||
top: 10rpx;
|
||||
}
|
||||
&--name{
|
||||
font-size: 36rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
&--desc{
|
||||
font-size: $font-size-base;
|
||||
color: $color-grey4;
|
||||
margin-bottom: 48rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,176 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-03-31 14:26:09
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-04-13 18:34:04
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<view>
|
||||
<StatusTips :orderInfo="orderInfo" @close="timerCloseOrder"></StatusTips>
|
||||
<UiWhiteBox>
|
||||
<UiGoodsInfo v-for="(item, index) in orderInfo.products" :data="item" :key="index">
|
||||
<template slot="operation">
|
||||
<UiButton @click="$Router.push(`/saleAfterApply?type=1&id=${item.orderProductId}`)">申请售后</UiButton>
|
||||
</template>
|
||||
</UiGoodsInfo>
|
||||
</UiWhiteBox>
|
||||
|
||||
<UiWhiteBox>
|
||||
<u-cell class="address" title="是的发生的" label="陈先生 190****2342"
|
||||
:border="false" isLink @click="$Router.push('/addressList')">
|
||||
<image class="address--icon" slot="icon" src="@/static/order/dw.png" />
|
||||
</u-cell>
|
||||
</UiWhiteBox>
|
||||
|
||||
<UiWhiteBox class="cellBox">
|
||||
<view class="cell">
|
||||
<text class="cell--title">订单编号:</text>
|
||||
<text class="cell--value">{{orderInfo.orderNo}}</text>
|
||||
</view>
|
||||
<view class="cell">
|
||||
<text class="cell--title">订单时间:</text>
|
||||
<text class="cell--value">{{orderInfo.submitTime}}</text>
|
||||
</view>
|
||||
<view class="cell">
|
||||
<text class="cell--title">支付方式:</text>
|
||||
<text class="cell--value">{{orderInfo.payTypeDesc}}</text>
|
||||
</view>
|
||||
<view class="cell">
|
||||
<text class="cell--title">买家留言:</text>
|
||||
<text class="cell--value">{{orderInfo.userMessage}}</text>
|
||||
</view>
|
||||
</UiWhiteBox>
|
||||
|
||||
<UiWhiteBox class="cellBox">
|
||||
<view class="cell">
|
||||
<text class="cell--title">商品总额:</text>
|
||||
<text class="cell--value">{{orderInfo.totalAmount}}</text>
|
||||
</view>
|
||||
<view class="cell">
|
||||
<text class="cell--title">运费:</text>
|
||||
<text class="cell--value">{{orderInfo.shippingAmount}}</text>
|
||||
</view>
|
||||
|
||||
</UiWhiteBox>
|
||||
<GoodsInfo :data="orderInfo"></GoodsInfo>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import UiPageHeader from '@/components/UiPageHeader.vue'
|
||||
import UiGoodsInfo from '@/components/UiGoodsInfo.vue'
|
||||
import UiWhiteBox from '@/components/UiWhiteBox.vue'
|
||||
import {ApiGetSaleAfterOrderDetail} from '@/common/api/order'
|
||||
import UiButton from '@/components/UiButton.vue'
|
||||
import StatusTips from './components/StatusTips.vue'
|
||||
import UiCell from '@/components/UiCell.vue'
|
||||
import GoodsInfo from './components/GoodsInfo.vue'
|
||||
export default {
|
||||
components: { UiPageHeader, UiGoodsInfo, UiWhiteBox, UiButton, StatusTips, UiCell, GoodsInfo },
|
||||
data(){
|
||||
return {
|
||||
orderInfo : {
|
||||
refundProduct:{}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(){
|
||||
this.getOrderInfo();
|
||||
},
|
||||
methods : {
|
||||
/**
|
||||
* 获取订单最新信息
|
||||
*/
|
||||
async getOrderInfo(){
|
||||
const {error, result} = await ApiGetSaleAfterOrderDetail({refundId:this.$Route.query.id});
|
||||
if(error){
|
||||
uni.$u.toast(error.message);
|
||||
return false;
|
||||
}
|
||||
this.orderInfo = {...result, orderStatus : 7};
|
||||
},
|
||||
/**
|
||||
* 超时自动关闭订单
|
||||
*/
|
||||
timerCloseOrder(){
|
||||
this.orderInfo = {...this.orderInfo, orderStatus : 2, closeReason:'超时未支付'};
|
||||
// this.getOrderInfo();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
page{
|
||||
// background: linear-gradient(180deg, #FDF9F5 0%, rgba(254, 253, 252, 0) 50%) $color-grey1;
|
||||
background: $color-grey1;
|
||||
padding-bottom: 138rpx;
|
||||
}
|
||||
.header{
|
||||
background: none;
|
||||
}
|
||||
|
||||
.address{
|
||||
// background: $color-grey0;
|
||||
&--icon{
|
||||
width: 28rpx;
|
||||
height: 34rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
}
|
||||
.status{
|
||||
padding: 30rpx 60rpx 0;
|
||||
position: relative;
|
||||
&--icon{
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
position: absolute;
|
||||
right: 60rpx;
|
||||
top: 10rpx;
|
||||
}
|
||||
&--name{
|
||||
font-size: 36rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
&--desc{
|
||||
font-size: $font-size-base;
|
||||
color: $color-grey4;
|
||||
margin-bottom: 48rpx;
|
||||
}
|
||||
}
|
||||
.cellBox{
|
||||
padding: 30rpx;
|
||||
}
|
||||
.cell{
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
&--value{
|
||||
font-size: $font-size-sm;
|
||||
}
|
||||
&--title{
|
||||
color: $color-grey4;
|
||||
font-size: $font-size-sm;
|
||||
}
|
||||
}
|
||||
.footer{
|
||||
height: 138rpx;
|
||||
padding: 0 30rpx;
|
||||
background: $color-grey0;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
&--btn{
|
||||
display: block;
|
||||
margin: 0 0 0 30rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in new issue