|
|
@@ -23,12 +23,16 @@
|
|
|
<!-- state=0: 等待卖家同意 -->
|
|
|
<view class="bg-white solid-top padding-bj current" v-if="refundData.state == 0">
|
|
|
<view class="wanl-gray text-sm">
|
|
|
- <view><text class="wlIcon-dot margin-right-sm"></text>賣家同意或超時將自動退款</view>
|
|
|
- <view class="margin-top-xs"><text class="wlIcon-dot margin-right-sm"></text>如退款被拒絕可修改申請</view>
|
|
|
+ <view><text class="wlIcon-dot margin-right-sm"></text>{{ $t('details.sellerAgreeOrTimeout') }}</view>
|
|
|
+ <view class="margin-top-xs"><text class="wlIcon-dot margin-right-sm"></text>{{ $t('details.ifRefundRejected')
|
|
|
+ }}
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="flex justify-end margin-top">
|
|
|
- <button class="cu-btn line-black margin-lr-xs" @tap="closeRefund(refundData.id)">關閉退款</button>
|
|
|
- <button class="cu-btn line-orange" @tap="editRefund(refundData.id)">修改申請</button>
|
|
|
+ <button class="cu-btn line-black margin-lr-xs" @tap="closeRefund(refundData.id)">{{ $t('details.closeRefund')
|
|
|
+ }}</button>
|
|
|
+ <button class="cu-btn line-orange" @tap="editRefund(refundData.id)">{{ $t('details.editApplication')
|
|
|
+ }}</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -40,7 +44,7 @@
|
|
|
</view>
|
|
|
<view class="content">
|
|
|
<view class="flex justify-between">
|
|
|
- <text>收件人:{{ refundData.shopConfig.returnName }}</text>
|
|
|
+ <text>{{$t('details.recipient')}}:{{ refundData.shopConfig.returnName }}</text>
|
|
|
<text>{{ refundData.shopConfig.returnPhoneNum }}</text>
|
|
|
</view>
|
|
|
<view class="margin-top-xs">
|
|
|
@@ -50,25 +54,25 @@
|
|
|
</view>
|
|
|
<view class="bg-white padding-bj solid-top">
|
|
|
<view class="wanl-gray text-sm">
|
|
|
- <view><text class="wlIcon-dot margin-right-sm"></text>請勿使用平郵或到付</view>
|
|
|
- <view class="margin-top-xs"><text class="wlIcon-dot margin-right-sm"></text>請填寫真實物流信息</view>
|
|
|
+ <view><text class="wlIcon-dot margin-right-sm"></text>{{ $t('details.doNotUseNormalMail') }}</view>
|
|
|
+ <view class="margin-top-xs"><text class="wlIcon-dot margin-right-sm"></text>{{ $t('details.pleaseFillRealExpressInfo') }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="cu-form-group margin-top-bj">
|
|
|
<view class="title">物流單號:</view>
|
|
|
- <input placeholder="請輸入物流單號" v-model="returnData.express_no" />
|
|
|
+ <input :placeholder="$t('details.pleaseInputExpressNo')" v-model="returnData.express_no" />
|
|
|
</view>
|
|
|
<view class="cu-form-group">
|
|
|
<view class="title">物流公司:</view>
|
|
|
<picker @change="kuaidiChange" :range="refundData.kuaidi" range-key="name">
|
|
|
<view class="picker">
|
|
|
- {{ kuaidiKey > -1 ? refundData.kuaidi[kuaidiKey].name : '請選擇' }}
|
|
|
+ {{ kuaidiKey > -1 ? refundData.kuaidi[kuaidiKey].name : $t('details.pleaseSelect') }}
|
|
|
</view>
|
|
|
</picker>
|
|
|
</view>
|
|
|
<view class="bg-white padding-bj current">
|
|
|
<view class="flex justify-end">
|
|
|
- <button class="cu-btn line-orange margin-lr-xs" @tap="toExpress(refundData.id)">確認退貨</button>
|
|
|
+ <button class="cu-btn line-orange margin-lr-xs" @tap="toExpress(refundData.id)">{{ $t('details.confirmReturn') }}</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -76,12 +80,14 @@
|
|
|
<!-- state=6: 已提交退貨 -->
|
|
|
<view class="bg-white current" v-if="refundData.state == 6">
|
|
|
<view class="bg-white solid-top padding-bj">
|
|
|
- 退貨物流<text class="wanl-gray">{{ refundData.express_name }}({{ refundData.express_no }})</text>
|
|
|
+ {{ $t('details.expressNumber') }}<text class="wanl-gray">{{ refundData.express_name }}({{ refundData.express_no
|
|
|
+ }})</text>
|
|
|
</view>
|
|
|
<view class="bg-white solid-top padding-bj current">
|
|
|
<view class="wanl-gray text-sm">
|
|
|
- <view><text class="wlIcon-dot margin-right-sm"></text>如退款被拒絕可修改申請</view>
|
|
|
- <view class="margin-top-xs"><text class="wlIcon-dot margin-right-sm"></text>賣家超時未處理將自動退款</view>
|
|
|
+ <view><text class="wlIcon-dot margin-right-sm"></text>{{ $t('details.ifRefundRejected') }}</view>
|
|
|
+ <view class="margin-top-xs"><text class="wlIcon-dot margin-right-sm"></text>{{ $t('details.sellerTimeout') }}
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -89,64 +95,67 @@
|
|
|
<!-- state=2: 賣家拒絕 -->
|
|
|
<view class="bg-white solid-top padding-bj current" v-if="refundData.state == 2">
|
|
|
<view class="text-sm">
|
|
|
- 拒絕原因:<text class="wanl-gray">{{ refundData.refuse_content }}</text>
|
|
|
+ {{ $t('details.refusalReason') }}:<text class="wanl-gray">{{ refundData.refuse_content }}</text>
|
|
|
</view>
|
|
|
<view class="flex justify-end margin-top">
|
|
|
- <button class="cu-btn line-black" @tap="arbitrationRefund(refundData.id)">平台介入</button>
|
|
|
- <button class="cu-btn line-orange margin-left-xs" @tap="editRefund(refundData.id)">修改申請</button>
|
|
|
+ <button class="cu-btn line-black"
|
|
|
+ @tap="arbitrationRefund(refundData.id)">{{ $t('details.platformIntervention') }}</button>
|
|
|
+ <button class="cu-btn line-orange margin-left-xs"
|
|
|
+ @tap="editRefund(refundData.id)">{{ $t('details.editApplication') }}</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- state=3: 平台介入 -->
|
|
|
<view class="bg-white solid-top padding-bj current" v-if="refundData.state == 3">
|
|
|
<view class="wanl-gray text-sm">
|
|
|
- <view><text class="wlIcon-dot margin-right-sm"></text>客服正在審核中</view>
|
|
|
- <view class="margin-top-xs"><text class="wlIcon-dot margin-right-sm"></text>預計1-3個工作日回覆</view>
|
|
|
+ <view><text class="wlIcon-dot margin-right-sm"></text>{{$t('details.serviceReviewing')}}</view>
|
|
|
+ <view class="margin-top-xs"><text class="wlIcon-dot margin-right-sm"></text>{{$t('details.answerWithin1to3Days')}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- state=4: 退款完成 -->
|
|
|
<view class="bg-white padding-bj flex justify-between align-center" v-if="refundData.state == 4">
|
|
|
- <text>退款總金額</text>
|
|
|
+ <text>{{$t('details.refundTotalAmount')}}</text>
|
|
|
<text class="text-price wanl-orange">{{ refundData.price }}</text>
|
|
|
</view>
|
|
|
|
|
|
<!-- 退款歷史入口 -->
|
|
|
<view class="bg-white padding-bj margin-top-bj flex justify-between align-center" @tap="refundLog(refundData.id)">
|
|
|
- <text>退款歷史</text>
|
|
|
+ <text>{{$t('details.refundHistory')}}</text>
|
|
|
<text class="wlIcon-fanhui2"></text>
|
|
|
</view>
|
|
|
|
|
|
<!-- 退款詳情 -->
|
|
|
- <view class="bg-white padding-bj margin-top-bj">退款詳情</view>
|
|
|
+ <view class="bg-white padding-bj margin-top-bj">{{$t('details.refundDetails')}}</view>
|
|
|
<view class="padding-bj flex">
|
|
|
- <view class="cu-avatar xl margin-right-bj" :style="{backgroundImage: 'url(' + $appKit.oss(refundData.goods.image, 70, 70) + ')'}"></view>
|
|
|
+ <view class="cu-avatar xl margin-right-bj"
|
|
|
+ :style="{ backgroundImage: 'url(' + $appKit.oss(refundData.goods.image, 70, 70) + ')' }"></view>
|
|
|
<view class="text-sm" style="width: calc(100% - 128rpx);">
|
|
|
<view class="margin-bottom-xs">
|
|
|
<view class="text-cut-2">{{ refundData.goods.title }}</view>
|
|
|
</view>
|
|
|
- <view class="wanl-gray">規格:{{ refundData.goods.difference }}</view>
|
|
|
+ <view class="wanl-gray">{{$t('details.specifications')}}:{{ refundData.goods.difference }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="bg-white padding-bj text-sm">
|
|
|
<view class="item flex">
|
|
|
- <text class="wanl-gray">退款類型:</text>
|
|
|
+ <text class="wanl-gray">{{$t('details.refundType')}}:</text>
|
|
|
<text>{{ refundData.type_text }}</text>
|
|
|
</view>
|
|
|
<view class="item flex margin-top-bj">
|
|
|
- <text class="wanl-gray">退款原因:</text>
|
|
|
+ <text class="wanl-gray">{{$t('details.refundReason')}}:</text>
|
|
|
<text>{{ refundData.reason_text }}</text>
|
|
|
</view>
|
|
|
<view class="item flex margin-top-bj">
|
|
|
- <text class="wanl-gray">退款金額:</text>
|
|
|
+ <text class="wanl-gray">{{$t('details.refundAmount')}}:</text>
|
|
|
<text class="text-price">{{ refundData.price }}</text>
|
|
|
</view>
|
|
|
<view class="item flex margin-top-bj">
|
|
|
- <text class="wanl-gray">物流狀態:</text>
|
|
|
+ <text class="wanl-gray">{{$t('details.logisticsStatus')}}:</text>
|
|
|
<text>{{ refundData.expressType_text }}</text>
|
|
|
</view>
|
|
|
<view class="item flex margin-top-bj">
|
|
|
- <text class="wanl-gray">退款時間:</text>
|
|
|
+ <text class="wanl-gray">{{$t('details.refundTime')}}:</text>
|
|
|
<text>{{ refundData.createtime_text }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -189,33 +198,33 @@ export default {
|
|
|
if (res.state == 0) {
|
|
|
var diff = (res.createtime + res.config.autoagree * 86400) - Date.parse(new Date()) / 1000
|
|
|
var days = Math.floor(diff / 86400), hours = Math.floor(diff % 86400 / 3600), minutes = Math.floor(diff % 86400 % 3600 / 60)
|
|
|
- if (minutes > 0 && hours == 0 && days == 0) this.refundData.statetime = `剩餘 ${minutes} 分鐘`
|
|
|
- else if (hours > 0 && days == 0) this.refundData.statetime = `剩餘 ${hours} 小時 ${minutes} 分鐘`
|
|
|
- else if (days > 0) this.refundData.statetime = `剩餘 ${days} 天 ${hours} 小時 ${minutes} 分鐘`
|
|
|
+ if (minutes > 0 && hours == 0 && days == 0) this.refundData.statetime = this.$t('details.remainingMinutes', { minutes })
|
|
|
+ else if (hours > 0 && days == 0) this.refundData.statetime = this.$t('details.remainingHoursMinutes', { hours, minutes })
|
|
|
+ else if (days > 0) this.refundData.statetime = this.$t('details.remainingDaysHoursMinutes', { days, hours, minutes })
|
|
|
} else if (res.state == 1) {
|
|
|
var diff = (res.agreetime + res.config.returntime * 86400) - Date.parse(new Date()) / 1000
|
|
|
var days = Math.floor(diff / 86400), hours = Math.floor(diff % 86400 / 3600), minutes = Math.floor(diff % 86400 % 3600 / 60)
|
|
|
- if (minutes > 0 && hours == 0 && days == 0) this.refundData.statetime = `剩餘 ${minutes} 分鐘`
|
|
|
- else if (hours > 0 && days == 0) this.refundData.statetime = `剩餘 ${hours} 小時 ${minutes} 分鐘`
|
|
|
- else if (days > 0) this.refundData.statetime = `剩餘 ${days} 天 ${hours} 小時 ${minutes} 分鐘`
|
|
|
+ if (minutes > 0 && hours == 0 && days == 0) this.refundData.statetime = this.$t('details.remainingMinutes', { minutes })
|
|
|
+ else if (hours > 0 && days == 0) this.refundData.statetime = this.$t('details.remainingHoursMinutes', { hours, minutes })
|
|
|
+ else if (days > 0) this.refundData.statetime = this.$t('details.remainingDaysHoursMinutes', { days, hours, minutes })
|
|
|
} else if (res.state == 2) {
|
|
|
this.refundData.statetime = res.rejecttime_text
|
|
|
} else if (res.state == 6) {
|
|
|
var diff = (res.returntime + res.config.receivingtime * 86400) - Date.parse(new Date()) / 1000
|
|
|
var days = Math.floor(diff / 86400), hours = Math.floor(diff % 86400 / 3600), minutes = Math.floor(diff % 86400 % 3600 / 60)
|
|
|
- if (minutes > 0 && hours == 0 && days == 0) this.refundData.statetime = `剩餘 ${minutes} 分鐘`
|
|
|
- else if (hours > 0 && days == 0) this.refundData.statetime = `剩餘 ${hours} 小時 ${minutes} 分鐘`
|
|
|
- else if (days > 0) this.refundData.statetime = `剩餘 ${days} 天 ${hours} 小時 ${minutes} 分鐘`
|
|
|
+ if (minutes > 0 && hours == 0 && days == 0) this.refundData.statetime = this.$t('details.remainingMinutes', { minutes })
|
|
|
+ else if (hours > 0 && days == 0) this.refundData.statetime = this.$t('details.remainingHoursMinutes', { hours, minutes })
|
|
|
+ else if (days > 0) this.refundData.statetime = this.$t('details.remainingDaysHoursMinutes', { days, hours, minutes })
|
|
|
} else if (res.state == 3) {
|
|
|
- this.refundData.statetime = '等待平台處理'
|
|
|
+ this.refundData.statetime = this.$t('details.waitingPlatformProcess')
|
|
|
} else if (res.state == 4) {
|
|
|
this.refundData.statetime = res.completetime_text
|
|
|
} else if (res.state == 5) {
|
|
|
this.refundData.statetime = res.closingtime_text
|
|
|
} else if (res.state == 7) {
|
|
|
- this.refundData.statetime = '預計24小時內原路退回'
|
|
|
+ this.refundData.statetime = this.$t('details.estimated24HoursReturn')
|
|
|
} else if (res.state == 8) {
|
|
|
- this.refundData.statetime = '請聯繫平台客服'
|
|
|
+ this.refundData.statetime = this.$t('details.contactPlatformServiceText')
|
|
|
}
|
|
|
} catch (e) {
|
|
|
console.error('[refund] loadData', e)
|
|
|
@@ -224,12 +233,32 @@ export default {
|
|
|
|
|
|
/** 退款状态文字 */
|
|
|
getStateText(state) {
|
|
|
- return ['等待賣家同意', '等待買家退貨', '賣家拒絕退款', '平台介入處理', '退款完成', '退款已關閉', '等待賣家收貨', '第三方退款中', '退款失敗'][state]
|
|
|
+ return [
|
|
|
+ this.$t('details.waitingSellerAgree'),
|
|
|
+ this.$t('details.waitingBuyerReturn'),
|
|
|
+ this.$t('details.sellerRejectRefund'),
|
|
|
+ this.$t('details.platformIntervention'),
|
|
|
+ this.$t('details.refundCompleted'),
|
|
|
+ this.$t('details.refundClosed'),
|
|
|
+ this.$t('details.waitingSellerReceive'),
|
|
|
+ this.$t('details.thirdPartyRefunding'),
|
|
|
+ this.$t('details.refundFailed')
|
|
|
+ ][state]
|
|
|
},
|
|
|
|
|
|
/** 退款状态描述 */
|
|
|
getStateInfo(state) {
|
|
|
- return ['已成功發起退款申請', '賣家已同意退款', '可修改退貨申請', '已申請平台介入', '退款已完成', '退款申請已關閉', '如商戶確認收貨將退款', '退款將原路返回', '快捷支付退款失敗'][state]
|
|
|
+ return [
|
|
|
+ this.$t('details.refundInitiated'),
|
|
|
+ this.$t('details.sellerAgreed'),
|
|
|
+ this.$t('details.canModifyRefund'),
|
|
|
+ this.$t('details.platformInterventionApplied'),
|
|
|
+ this.$t('details.refundCompleted'),
|
|
|
+ this.$t('details.refundClosed'),
|
|
|
+ this.$t('details.merchantConfirmReceive'),
|
|
|
+ this.$t('details.refundWillReturn'),
|
|
|
+ this.$t('details.refundFailed')
|
|
|
+ ][state]
|
|
|
},
|
|
|
|
|
|
/** 选择快递公司 */
|
|
|
@@ -245,24 +274,24 @@ export default {
|
|
|
|
|
|
/** 平台介入 */
|
|
|
async arbitrationRefund(id) {
|
|
|
- uni.showLoading({ title: '請稍候' })
|
|
|
+ uni.showLoading({ title: this.$t('details.pleaseWait') })
|
|
|
try {
|
|
|
await postRefundArbitration({ id })
|
|
|
this.loadData({ id })
|
|
|
} catch (e) {
|
|
|
- uni.showToast({ title: '操作失敗', icon: 'none' })
|
|
|
+ uni.showToast({ title: this.$t('details.operationFailed'), icon: 'none' })
|
|
|
}
|
|
|
uni.hideLoading()
|
|
|
},
|
|
|
|
|
|
/** 关闭退款 */
|
|
|
async closeRefund(id) {
|
|
|
- uni.showLoading({ title: '請稍候' })
|
|
|
+ uni.showLoading({ title: this.$t('details.pleaseWait') })
|
|
|
try {
|
|
|
await postRefundClose({ id })
|
|
|
this.loadData({ id })
|
|
|
} catch (e) {
|
|
|
- uni.showToast({ title: '操作失敗', icon: 'none' })
|
|
|
+ uni.showToast({ title: this.$t('details.operationFailed'), icon: 'none' })
|
|
|
}
|
|
|
uni.hideLoading()
|
|
|
},
|
|
|
@@ -270,19 +299,19 @@ export default {
|
|
|
/** 提交退货物流 */
|
|
|
async toExpress() {
|
|
|
if (!this.returnData.express_no) {
|
|
|
- uni.showToast({ title: '請輸入物流單號', icon: 'none' })
|
|
|
+ uni.showToast({ title: this.$t('details.pleaseInputExpressNo'), icon: 'none' })
|
|
|
return
|
|
|
}
|
|
|
if (!this.returnData.express_name) {
|
|
|
- uni.showToast({ title: '請選擇物流公司', icon: 'none' })
|
|
|
+ uni.showToast({ title: this.$t('details.pleaseSelectExpressCompany'), icon: 'none' })
|
|
|
return
|
|
|
}
|
|
|
- uni.showLoading({ title: '請稍候' })
|
|
|
+ uni.showLoading({ title: this.$t('details.pleaseWait') })
|
|
|
try {
|
|
|
const res = await postRefundExpress(this.returnData)
|
|
|
this.loadData({ id: res })
|
|
|
} catch (e) {
|
|
|
- uni.showToast({ title: '提交失敗', icon: 'none' })
|
|
|
+ uni.showToast({ title: this.$t('details.submitFailed'), icon: 'none' })
|
|
|
}
|
|
|
uni.hideLoading()
|
|
|
},
|
|
|
@@ -296,15 +325,72 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-.edgeInsetTop { height: var(--status-bar-height); }
|
|
|
-.wanl-refund .header { width: 100%; height: 180rpx; position: relative; background-color: #f72b36; }
|
|
|
-.wanl-refund .header .content { width: 100%; height: 180rpx; position: absolute; z-index: 10; left: 0; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 60rpx; box-sizing: border-box; }
|
|
|
-.wanl-refund .header .status-text { font-size: 34rpx; line-height: 34rpx; color: #FEFEFE; }
|
|
|
-.wanl-refund .header .reason { font-size: 24rpx; line-height: 24rpx; color: rgba(254, 254, 254, 0.75); padding-top: 15rpx; display: flex; align-items: center; }
|
|
|
-.wanl-refund .header .reason-text { padding-right: 12rpx; white-space: pre-wrap; }
|
|
|
-.wanl-refund .current .cu-btn { width: 140rpx; font-size: 26rpx; padding: 0 12rpx; }
|
|
|
-.wanl-refund .receipt { display: flex; align-items: center; }
|
|
|
-.wanl-orange { color: #ff6b35; }
|
|
|
-.line-orange { border-color: #ff6b35 !important; color: #ff6b35 !important; }
|
|
|
-.edgeInsetBottom { height: 30rpx; }
|
|
|
+.edgeInsetTop {
|
|
|
+ height: var(--status-bar-height);
|
|
|
+}
|
|
|
+
|
|
|
+.wanl-refund .header {
|
|
|
+ width: 100%;
|
|
|
+ height: 180rpx;
|
|
|
+ position: relative;
|
|
|
+ background-color: #f72b36;
|
|
|
+}
|
|
|
+
|
|
|
+.wanl-refund .header .content {
|
|
|
+ width: 100%;
|
|
|
+ height: 180rpx;
|
|
|
+ position: absolute;
|
|
|
+ z-index: 10;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 0 60rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+
|
|
|
+.wanl-refund .header .status-text {
|
|
|
+ font-size: 34rpx;
|
|
|
+ line-height: 34rpx;
|
|
|
+ color: #FEFEFE;
|
|
|
+}
|
|
|
+
|
|
|
+.wanl-refund .header .reason {
|
|
|
+ font-size: 24rpx;
|
|
|
+ line-height: 24rpx;
|
|
|
+ color: rgba(254, 254, 254, 0.75);
|
|
|
+ padding-top: 15rpx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.wanl-refund .header .reason-text {
|
|
|
+ padding-right: 12rpx;
|
|
|
+ white-space: pre-wrap;
|
|
|
+}
|
|
|
+
|
|
|
+.wanl-refund .current .cu-btn {
|
|
|
+ width: 140rpx;
|
|
|
+ font-size: 26rpx;
|
|
|
+ padding: 0 12rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.wanl-refund .receipt {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.wanl-orange {
|
|
|
+ color: #ff6b35;
|
|
|
+}
|
|
|
+
|
|
|
+.line-orange {
|
|
|
+ border-color: #ff6b35 !important;
|
|
|
+ color: #ff6b35 !important;
|
|
|
+}
|
|
|
+
|
|
|
+.edgeInsetBottom {
|
|
|
+ height: 30rpx;
|
|
|
+}
|
|
|
</style>
|