123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- <template>
- <mobile-frame>
- <view class="main">
- <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 class="one" v-if="status!= '0'">
- <view class="left">团长建议</view>
- <view class="right">{{info.leader_suggest==true?'同意':info.leader_suggest==false?'不同意':'暂无'}}</view>
- </view>
- </view>
- </view>
- </mobile-frame>
- </template>
- <script>
- export default {
- data() {
- return {
- id: '',
- status: '',
- user: {},
- info: {},
- // 售后状态
- statusList: [],
- // 售后类型
- typeList: [],
- // 申请理由
- reasonList: [],
- };
- },
- onLoad: async function(e) {
- const that = this;
- that.$set(that, `id`, e.id || '');
- that.$set(that, `status`, e.status || '');
- 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;
- if (that.status == '0') arr = await that.$api(`/afterSale/${that.id}`, 'GET')
- else arr = await that.$api(`/groupAfterSale/${that.id}`, 'GET', {}, 'group')
- 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;
- .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>
|