123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245 |
- <template>
- <mobile-frame>
- <view class="main">
- <view class="goods" v-if="info.goods">
- <view class="url">
- <image class="image"
- :src="info.goods.goods.file&&info.goods.goods.file.length>0?info.goods.goods.file[0].url:''"
- mode=""></image>
- </view>
- <view class="goodsname">
- {{info.goods.goods.name}}
- <view class="specs">
- {{info.goods.name}}
- </view>
- <view class="other">
- <text v-if="info.goods.gift.length>0" class="gift">赠品</text>
- <text v-if="info.goods.sp_price" class="act">特价</text>
- </view>
- </view>
- <view class="goodsother">
- <view v-if="info.order_detail.type=='0'" class="price">
- ¥{{info.goods.price||info.goods.sell_money}}
- </view>
- <view v-else class="price">
- ¥{{info.goods.group_config.money}}
- </view>
- <view class="num">
- ×{{info.goods.buy_num}}
- </view>
- </view>
- </view>
- <view class="info">
- <view class="one">
- <view class="left">售后状态</view>
- <view class="right">{{info.zhStatus||'暂无'}}</view>
- </view>
- <view class="one">
- <view class="left">售后类型</view>
- <view class="right">{{info.zhType||'暂无'}}</view>
- </view>
- <view class="one">
- <view class="left">申请时间</view>
- <view class="right">{{info.apply_time||'暂无'}}</view>
- </view>
- <view class="one">
- <view class="left">售后结束时间</view>
- <view class="right">{{info.end_time||'暂无'}}</view>
- </view>
- <view class="one">
- <view class="left">售后描述</view>
- <view class="right">{{info.desc||'暂无'}}</view>
- </view>
- <view class="one">
- <view class="left">申请理由</view>
- <view class="right">{{info.zhReason||'暂无'}}</view>
- </view>
- <view class="one" v-if="info.type!='3'">
- <view class="left">退款金额</view>
- <view class="right">¥{{info.money||0}}</view>
- </view>
- <view class="one" v-if="info.type!='1'">
- <view class="left">用户退货单号</view>
- <view class="right">{{info.transport.customer_transport_no||'暂无'}}</view>
- </view>
- <view class="one" v-if="info.type=='3'">
- <view class="left">商家退货单号</view>
- <view class="right">{{info.transport.shop_transport_no||'暂无'}}</view>
- </view>
- <view class="one">
- <view class="left">售后处理人</view>
- <view class="right">{{info.deal_person.name||'暂无'}}</view>
- </view>
- </view>
- </view>
- </mobile-frame>
- </template>
- <script>
- export default {
- data() {
- return {
- id: '',
- user: {},
- info: {},
- // 售后状态
- statusList: [],
- // 售后类型
- typeList: [],
- // 申请理由
- reasonList: [],
- };
- },
- onLoad: async function(e) {
- const that = this;
- that.$set(that, `id`, e.id || '');
- await that.searchOther();
- await that.watchLogin();
- },
- methods: {
- // 查询其他信息
- async searchOther() {
- const that = this;
- let res;
- res = await that.$api(`/dictData`, 'GET', {
- code: "afterSale_status"
- });
- if (res.errcode == '0') {
- that.$set(that, `statusList`, res.data)
- }
- res = await that.$api(`/dictData`, 'GET', {
- code: "afterSale_type"
- });
- if (res.errcode == '0') {
- that.$set(that, `typeList`, res.data)
- }
- res = await that.$api(`/dictData`, 'GET', {
- code: "afterSale_reason"
- });
- if (res.errcode == '0') {
- that.$set(that, `reasonList`, res.data)
- }
- },
- // 监听用户是否登录
- watchLogin() {
- const that = this;
- uni.getStorage({
- key: 'token',
- success: async function(res) {
- let user = that.$jwt(res.data);
- if (user) {
- that.$set(that, `user`, user);
- if (that.id) {
- //售后详情
- let arr = await that.$api(`/afterSale/${that.id}`, 'GET')
- if (arr.errcode == '0') {
- let status = that.statusList.find(i => i.value == arr.data.status)
- if (status) arr.data.zhStatus = status.label;
- let type = that.typeList.find(i => i.value == arr.data.type)
- if (type) arr.data.zhType = type.label;
- let reason = that.reasonList.find(i => i.value == arr.data.reason)
- if (reason) arr.data.zhReason = reason.label;
- that.$set(that, `info`, arr.data)
- }
- }
- }
- },
- fail: function(err) {
- uni.navigateTo({
- url: `/pages/login/index`
- })
- }
- });
- }
- }
- }
- </script>
- <style lang="scss">
- .main {
- display: flex;
- flex-direction: column;
- width: 100vw;
- height: 100vh;
- .goods {
- display: flex;
- border-bottom: 1px dashed #f1f1f1;
- padding: 2vw;
- width: 96vw;
- .url {
- width: 20vw;
- .image {
- width: 100%;
- height: 20vw;
- border-radius: 5px;
- }
- }
- .goodsname {
- display: flex;
- flex-direction: column;
- width: 60vw;
- padding: 0 2vw;
- font-size: 16px;
- .specs {
- color: var(--f85Color);
- font-size: var(--font12Size);
- }
- .other {
- display: flex;
- padding: 1vw 0 0 0;
- .gift {
- margin: 0 1vw 0 0;
- font-size: 12px;
- color: #FFA500;
- border: 1px solid #FFA500;
- border-radius: 5px;
- padding: 0 1vw;
- }
- .act {
- font-size: 12px;
- border: 1px solid var(--fFB1Color);
- color: var(--fFB1Color);
- border-radius: 5px;
- padding: 0 1vw;
- }
- }
- }
- .goodsother {
- width: 15vw;
- text-align: right;
- }
- }
- .info {
- padding: 2vw;
- .one {
- display: flex;
- justify-content: space-between;
- padding: 2vw;
- .left {
- color: #696969;
- font-size: var(--font14Size);
- }
- .right {
- width: 60vw;
- text-align: right;
- color: #A9A9A9;
- font-size: var(--font14Size);
- }
- }
- }
- }
- </style>
|