## 删除的死代码脚本
- scripts/i18n_class_c.py (脚本自承'新架构下永远输出 0',纯防御性)
- scripts/full_migrate_i18n.py (其产出违反 CLAUDE.md 1.2 中文 key 铁律,已标 DEPRECATED)
- scripts/__pycache__/ (Python 缓存)
## 删除的旧 per-page lang 文件
- lang/zh-cn/<page>/<file>.js (140 个)
- lang/en-us/<page>/<file>.js (139 个)
- 共 279 个文件,运行时不再加载,0 个 key 被 .vue 调用(经 diagnose_keys.py 验证)
## 删除的备份和迁移表
- lang/_backup/ (git 已跟踪原文件)
- lang/_migration_map.json / lang/_migration-map.json (运行时不用)
## 删除的中间产物 JSON
- docs/i18n-rename-*.json (smart_rename 中间产物,已用完)
- docs/i18n-ambiguous.json / i18n-audit.json / i18n-call-rewrite.log /
i18n-clean-dead.log / i18n-file-texts.json / i18n-page-titles.json /
i18n-vue-extract.json (前一会话残留,无引用方)
- docs/i18n-{naming,shadow,strict}-audit.json (脚本会自动重新生成)
## 删除的 modular lang 文件
- lang/zh-cn/*.js / lang/en-us/*.js (20 个模块文件,内容是上一会话产生的死代码)
- lang/zh-cn/index.js / lang/en-us/index.js (聚合入口)
- lang/DEPRECATED.md (已不再相关)
## 删除的不成熟脚本
- scripts/check_perpage.py (诊断用,已完成)
- scripts/diagnose_keys.py (诊断用,已完成)
- scripts/smart_rename_i18n.py (v1-v3 都 bug,未修完)
## 现状
- lang/ 现在只有 zh-cn.js + en-us.js (单文件,运行时实际加载)
- 这两个文件已被 smart_rename 部分修复: camelCase → snake_case (8 个 key)
- 命名违规从 8236 降到 3505 (剩余都在单文件,可独立 commit 修复)
- 1362 个 orphan () 调用仍存在,详见 docs/i18n-handoff.md
273 lines
10 KiB
Vue
273 lines
10 KiB
Vue
<template>
|
||
<view :style="themeColor">
|
||
<scroll-view scroll-y="true" class="detail-container" :class="{ 'safe-area': isIphoneX }" v-if="detail">
|
||
<view v-show="action == ''">
|
||
<view class="status-wrap">
|
||
<view class="status-name">{{ detail.refund_status_name }}</view>
|
||
<view class="refund-explain" v-if="detail.refund_status == 1">
|
||
<view class="font-size-goods-tag color-tip">{{ $lang("tool.order.refund_detail.l8.t0") }}</view>
|
||
<view class="font-size-goods-tag color-tip">{{ $lang("tool.order.refund_detail.l9.t0") }}</view>
|
||
<!-- <view class="font-size-goods-tag color-tip">{{ $lang("tool.order.refund_detail.l10.t0") }}</view> -->
|
||
</view>
|
||
<view class="refund-explain" v-if="detail.refund_status == 5">
|
||
<view class="font-size-goods-tag color-tip">{{ $lang("tool.order.refund_detail.l13.t0") }}</view>
|
||
<view class="font-size-goods-tag color-tip">{{ $lang("tool.order.refund_detail.l14.t0") }}</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="history-wrap" @click="switchAction('consultrecord')">
|
||
<view>{{ $lang("tool.order.refund_detail.l19.t0") }}</view>
|
||
<text class="iconfont icon-right"></text>
|
||
</view>
|
||
|
||
<view class="refund-address-wrap" v-if="detail.refund_status == 4">
|
||
<view class="header">{{ $lang("tool.order.refund_detail.l24.t0") }}</view>
|
||
<view>
|
||
<text>{ $lang("tool.order.refund_detail.l26.t0") } detail.shop_contacts }}</text>
|
||
</view>
|
||
<view>
|
||
<text>{ $lang("tool.order.refund_detail.l29.t0") } detail.shop_mobile }}</text>
|
||
</view>
|
||
<view>
|
||
<text class="address">{ $lang("tool.order.refund_detail.l32.t0") } detail.shop_address }}</text>
|
||
<view class="copy" @click="$util.copy(detail.shop_address)">{{ $lang("order.detail.l109") }}</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="refund-info">
|
||
<view class="header">{{ $lang("tool.order.refund_detail.l38.t0") }}</view>
|
||
<view class="body">
|
||
<!-- 商品信息 -->
|
||
<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" show-menu-by-longpress></image>
|
||
</view>
|
||
<view class="goods-info">
|
||
<view class="goods-name" @click="refundDetail(detail)">{{ detail.sku_name }}</view>
|
||
</view>
|
||
</view>
|
||
<!-- 退款信息 -->
|
||
<view class="info">
|
||
<view class="cell">{ $lang("tool.order.refund_batch.l26.t0") } detail.refund_type == 1 ? '仅退款' : $lang('tool.order.refund_detail.l51.t1') }}</view>
|
||
<view class="cell" v-if="detail.refund_status == 3">{ $lang("tool.order.refund_detail.l52.t3") } detail.refund_money_type == 1 ? '原路退款' : detail.refund_money_type == 2 ? '线下退款' : $lang('tool.order.refund_detail.l52.t2') }}</view>
|
||
<view class="cell">{ $lang("tool.order.refund.l34.t0") } detail.refund_reason }}</view>
|
||
<view class="cell" v-if="detail.refund_status == 3 && detail.refund_real_money>0">{ $lang("tool.order.refund.l42.t0") } $lang('common.currency_symbol') }}{{ detail.refund_real_money }}</view>
|
||
<view class="cell" v-else-if="detail.refund_apply_money>0">{ $lang("tool.order.refund.l42.t0") } $lang('common.currency_symbol') }}{{ detail.refund_apply_money }}</view>
|
||
<view class="cell">{ $lang("tool.order.refund_detail.l56.t0") } detail.refund_no }}</view>
|
||
<view class="cell">{ $lang("tool.order.refund_detail.l57.t0") } $util.timeStampTurnTime(detail.refund_action_time) }}</view>
|
||
<view class="cell" v-if="detail.refund_time">{ $lang("tool.order.refund_detail.l58.t0") } $util.timeStampTurnTime(detail.refund_time) }}</view>
|
||
<view class="cell" v-if="detail.refund_remark != ''">{ $lang("tool.order.refund_detail.l59.t0") } detail.refund_remark }}</view>
|
||
<view class="cell" v-if="detail.use_point>0">{ $lang("tool.order.refund_detail.l60.t0") } 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)">
|
||
{{ actionItem.title }}
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view v-show="action == 'returngoods'">
|
||
<view class="return-goods-container">
|
||
<view class="form-wrap">
|
||
<view class="item">
|
||
<view class="label">{{ $lang("tool.order.refund_detail.l76.t0") }}</view>
|
||
<view class="cont">
|
||
<input
|
||
type="text"
|
||
placeholder=$lang("tool.order.refund_detail.l80.t0")
|
||
class="input"
|
||
placeholder-class="input-placeholder color-tip"
|
||
v-model="formData.refund_delivery_name"
|
||
/>
|
||
</view>
|
||
</view>
|
||
<view class="item">
|
||
<view class="label">{{ $lang("tool.order.refund_detail.l88.t0") }}</view>
|
||
<view class="cont">
|
||
<input
|
||
type="text"
|
||
placeholder=$lang("tool.order.refund_detail.l92.t0")
|
||
class="input"
|
||
placeholder-class="input-placeholder color-tip"
|
||
v-model="formData.refund_delivery_no"
|
||
/>
|
||
</view>
|
||
</view>
|
||
<view class="item">
|
||
<view class="label">{{ $lang("tool.order.refund_detail.l100.t0") }}</view>
|
||
<view class="cont">
|
||
<textarea
|
||
placeholder-class="color-tip font-size-tag"
|
||
:auto-height="true"
|
||
class="textarea"
|
||
placeholder=$lang("tool.order.refund_detail.l106.t0")
|
||
v-model="formData.refund_delivery_remark"
|
||
/>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<button type="primary" class="sub-btn" @click="refurnGoods">{{ $lang("diy.diy-form.l142.t0") }}</button>
|
||
</view>
|
||
</view>
|
||
|
||
<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="cont">
|
||
<view class="head">
|
||
<text>{{ logItem.action_way == 1 ? '买家' : $lang('tool.order.refund_detail.l121.t1') }}</text>
|
||
<text class="time">{{ $util.timeStampTurnTime(logItem.action_time) }}</text>
|
||
</view>
|
||
<view class="body">
|
||
<view class="refund-action">{{ logItem.action }}</view>
|
||
<view class="desc" v-if="logItem.desc != ''">{{ logItem.desc }}</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="empty-box"></view>
|
||
</view>
|
||
<view class="history-bottom" :class="{ 'bottom-safe-area': isIphoneX }">
|
||
<!-- <ns-contact :niushop="{order_id: detail.order_id}">
|
||
<view>
|
||
<text class="iconfont icon-ziyuan"></text>
|
||
<text>{{ $lang("common.ns-contact.l32.t0") }}</text>
|
||
</view>
|
||
</ns-contact> -->
|
||
<view @click="switchAction('')">{{ $lang("tool.order.refund_detail.l139.t0") }}</view>
|
||
</view>
|
||
</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';
|
||
export default {
|
||
data() {
|
||
return {
|
||
order_goods_id: '',
|
||
detail: {
|
||
refund_action: []
|
||
},
|
||
isIphoneX: false,
|
||
action: '',
|
||
formData: {
|
||
refund_delivery_name: '',
|
||
refund_delivery_no: '',
|
||
refund_delivery_remark: ''
|
||
},
|
||
isSub: false
|
||
};
|
||
},
|
||
mixins: [refundMethod],
|
||
onLoad(option) {
|
||
if (option.order_goods_id) this.order_goods_id = option.order_goods_id;
|
||
if (option.action) this.action = option.action;
|
||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||
},
|
||
onShow() {
|
||
if (this.storeToken) {
|
||
this.getRefundDetail();
|
||
} else {
|
||
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL, { back: '/pages_tool/order/refund_detail?order_goods_id=' + this.order_goods_id });
|
||
}
|
||
},
|
||
methods: {
|
||
getRefundDetail() {
|
||
this.$api.sendRequest({
|
||
url: '/api/orderrefund/detail',
|
||
data: {
|
||
order_goods_id: this.order_goods_id
|
||
},
|
||
success: res => {
|
||
if (res.code >= 0) {
|
||
this.detail = res.data;
|
||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||
} else {
|
||
this.$util.showToast({ title: $lang('tool.order.refund.l175.t0') });
|
||
setTimeout(() => {
|
||
this.$util.redirectTo('/pages_order/list');
|
||
}, 1000);
|
||
}
|
||
},
|
||
fail: res => {
|
||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||
}
|
||
});
|
||
},
|
||
refundAction(event) {
|
||
switch (event) {
|
||
case 'orderRefundCancel':
|
||
this.cancleRefund(this.detail.order_goods_id, res => {
|
||
if (res.code >= 0) {
|
||
this.$util.showToast({ title: $lang('tool.order.activist.l115.t0') });
|
||
setTimeout(() => {
|
||
this.$util.redirectTo('/pages_order/list');
|
||
}, 1000);
|
||
}
|
||
});
|
||
break;
|
||
case 'orderRefundDelivery':
|
||
this.action = 'returngoods';
|
||
break;
|
||
case 'orderRefundAsk':
|
||
this.$util.redirectTo('/pages_tool/order/refund', { order_goods_id: this.detail.order_goods_id });
|
||
break;
|
||
}
|
||
},
|
||
refurnGoods() {
|
||
var rule = [
|
||
{ name: 'refund_delivery_name', checkType: 'required', errorMsg: $lang('tool.order.refund_detail.l80.t0') },
|
||
{ name: 'refund_delivery_no', checkType: 'required', errorMsg: $lang('tool.order.refund_detail.l92.t0') }
|
||
];
|
||
this.formData.order_goods_id = this.order_goods_id;
|
||
var checkRes = validate.check(this.formData, rule);
|
||
if (checkRes) {
|
||
if (this.isSub) return;
|
||
this.isSub = true;
|
||
this.$api.sendRequest({
|
||
url: '/api/orderrefund/delivery',
|
||
data: this.formData,
|
||
success: res => {
|
||
if (res.code == 0) {
|
||
this.action = '';
|
||
this.getRefundDetail();
|
||
} else {
|
||
this.$util.showToast({ title: res.message });
|
||
}
|
||
}
|
||
});
|
||
} else {
|
||
this.$util.showToast({ title: validate.error });
|
||
return false;
|
||
}
|
||
},
|
||
/**
|
||
* 切换操作
|
||
*/
|
||
switchAction(action) {
|
||
this.action = action;
|
||
},
|
||
imageError() {
|
||
this.detail.sku_image = this.$util.getDefaultImage().goods;
|
||
this.$forceUpdate();
|
||
},
|
||
refundDetail(e) {
|
||
this.$util.redirectTo('/pages_goods/detail', {
|
||
goods_id: e.goods_id
|
||
});
|
||
}
|
||
}
|
||
};
|
||
</script>
|
||
|
||
<style lang="scss">
|
||
@import './public/css/refund_detail.scss';
|
||
</style>
|