1 |
- import{s,z as e,c as t,Z as a,o as l,t as o,Q as i,f as n,g as c,w as r,x as u,ao as f,m as d,a7 as m,k as p,l as _,r as y,F as g,B as v,u as b,v as x,i as h,H as k,P as j,I as w,j as $,n as N,J as T,E as I}from"./index-ba48620e.js";import{_ as C}from"./s-goods-item.32271aab.js";import{_ as E}from"./s-empty.a75760f9.js";import{a as S,_ as J}from"./s-layout.04b95866.js";import{k as M,m as F,f as O}from"./useGoods.edb8879f.js";import{_ as A}from"./_plugin-vue_export-helper.1b428a4d.js";import"./points.c381a8e1.js";/* empty css *//* empty css */import"./phone-international-input.dd3ca29e.js";const B=A({__name:"detail",setup(A){k((s=>({"63ad8f41":u(H)}))),s.$store("user").userInfo;const B=2*s.$platform.device.statusBarHeight,H=s.$url.css("/static/img/shop/order/order_bg.png"),P=e({id:0,info:{},loading:!1,active:0,list:[{title:"提交申请"},{title:"处理中"},{title:"完成"}]});const q=()=>{s.$helper.copyText(P.info.no)};async function z(s){P.loading=!0;const{code:e,data:t}=await f.getAfterSale(s);0===e?(P.info=t,M(P.info),[10].includes(P.info.status)?P.active=0:[20,30].includes(P.info.status)?P.active=1:([40,50].includes(P.info.status)||[61,62,63].includes(P.info.status))&&(P.active=2)):P.info=null}const D=t((()=>s.$store("user").isLogin));return a((()=>D.value),(s=>{s&&window.location.reload()})),l((e=>D.value?e.username&&(console.log(JSON.parse(i("user-store")).userInfo.username),e.username!=JSON.parse(i("user-store")).userInfo.username)?(s.$helper.toast("您当前登录的账号是"+JSON.parse(i("user-store")).userInfo.username+",请切换到"+e.username+"后再试",3e3),!1):void(e.id?(P.id=e.id,z(e.id)):s.$helper.toast("缺少订单信息,请检查")):(o(),s.$helper.toast("您尚未登录,请登录:"+e.username+"后再试",3e3),!1))),(e,t)=>{const a=w,l=$,o=d(N("s-goods-item"),C),i=T,k=d(N("s-empty"),E),M=d(N("su-fixed"),S),A=d(N("s-layout"),J);return n(),c(A,{title:"售后详情",navbar:!u(m.isEmpty)(P.info)&&P.loading?"inner":"normal"},{default:r((()=>[!u(m.isEmpty)(P.info)&&P.loading?(n(),c(l,{key:0,class:"content_box"},{default:r((()=>[p(l,{class:"steps-box ss-flex",style:v([{marginTop:"-"+Number(B+88)+"rpx",paddingTop:Number(B+88)+"rpx"}])},{default:r((()=>[p(l,{class:"ss-flex"},{default:r((()=>[(n(!0),_(g,null,y(P.list,((s,e)=>(n(),c(l,{class:"steps-item",key:e},{default:r((()=>[p(l,{class:"ss-flex"},{default:r((()=>[P.list.length-1===e&&[61,62,63].includes(P.info.status)?(n(),c(a,{key:0,class:"sicon-circleclose"})):(n(),c(a,{key:1,class:I(["sicon-circlecheck",P.active>=e?"activity-color":"info-color"])},null,8,["class"])),P.list.length-1!==e?(n(),c(l,{key:2,class:I(["line",P.active>=e?"activity-bg":"info-bg"])},null,8,["class"])):h("",!0)])),_:2},1024),p(l,{class:I(["steps-item-title",P.active>=e?"activity-color":"info-color"])},{default:r((()=>[b(x(s.title),1)])),_:2},1032,["class"])])),_:2},1024)))),128))])),_:1})])),_:1},8,["style"]),p(l,{class:"status-box ss-flex ss-col-center ss-row-between ss-m-x-20",onClick:t[0]||(t[0]=e=>u(s).$router.go("/pages/order/aftersale/log",{id:P.id}))},{default:r((()=>[p(l,{class:""},{default:r((()=>[p(l,{class:"status-text"},{default:r((()=>[b(x(u(F)(P.info)),1)])),_:1}),p(l,{class:"status-time"},{default:r((()=>[b(x(u(s).$helper.timeFormat(P.info.updateTime,"yyyy-mm-dd hh:MM:ss")),1)])),_:1})])),_:1}),p(a,{class:"ss-iconfont _icon-forward",style:{color:"#666"}})])),_:1}),p(l,{class:"aftersale-money ss-flex ss-col-center ss-row-between"},{default:r((()=>[p(l,{class:"aftersale-money--title"},{default:r((()=>[b("退款总额")])),_:1}),p(l,{class:"aftersale-money--num"},{default:r((()=>[b("¥"+x(u(O)(P.info.refundPrice)),1)])),_:1})])),_:1}),p(l,{class:"order-shop"},{default:r((()=>[p(o,{img:P.info.picUrl,title:P.info.spuName,titleWidth:480,skuText:P.info.properties.map((s=>s.valueName)).join(" "),num:P.info.count},null,8,["img","title","skuText","num"])])),_:1}),p(l,{class:"aftersale-content"},{default:r((()=>[p(l,{class:"aftersale-item ss-flex ss-col-center"},{default:r((()=>[p(l,{class:"item-title"},{default:r((()=>[b("服务单号:")])),_:1}),p(l,{class:"item-content ss-m-r-16"},{default:r((()=>[b(x(P.info.no),1)])),_:1}),p(i,{class:"ss-reset-button copy-btn",onClick:q},{default:r((()=>[b("复制")])),_:1})])),_:1}),p(l,{class:"aftersale-item ss-flex ss-col-center"},{default:r((()=>[p(l,{class:"item-title"},{default:r((()=>[b("申请时间:")])),_:1}),p(l,{class:"item-content"},{default:r((()=>[b(x(u(s).$helper.timeFormat(P.info.createTime,"yyyy-mm-dd hh:MM:ss")),1)])),_:1})])),_:1}),p(l,{class:"aftersale-item ss-flex ss-col-center"},{default:r((()=>[p(l,{class:"item-title"},{default:r((()=>[b("售后类型:")])),_:1}),p(l,{class:"item-content"},{default:r((()=>[b(x(10===P.info.way?"仅退款":"退款退货"),1)])),_:1})])),_:1}),p(l,{class:"aftersale-item ss-flex ss-col-center"},{default:r((()=>[p(l,{class:"item-title"},{default:r((()=>[b("申请原因:")])),_:1}),p(l,{class:"item-content"},{default:r((()=>[b(x(P.info.applyReason),1)])),_:1})])),_:1}),p(l,{class:"aftersale-item ss-flex ss-col-center"},{default:r((()=>[p(l,{class:"item-title"},{default:r((()=>[b("相关描述:")])),_:1}),p(l,{class:"item-content"},{default:r((()=>[b(x(P.info.applyDescription),1)])),_:1})])),_:1})])),_:1})])),_:1})):h("",!0),u(m.isEmpty)(P.info)&&P.loading?(n(),c(k,{key:1,icon:"/static/order-empty.png",text:"暂无该订单售后详情"})):h("",!0),u(m.isEmpty)(P.info)?h("",!0):(n(),c(M,{key:2,bottom:"",placeholder:"",bg:"bg-white"},{default:r((()=>[p(l,{class:"foot_box"},{default:r((()=>{var e,a;return[(null==(e=P.info.buttons)?void 0:e.includes("cancel"))?(n(),c(i,{key:0,class:"ss-reset-button btn",onClick:t[1]||(t[1]=s=>{return e=P.info.id,void j({title:"提示",content:"确定要取消此申请吗?",success:async function(s){if(!s.confirm)return;const{code:t}=await f.cancelAfterSale(e);0===t&&await z(e)}});var e})},{default:r((()=>[b(" 取消申请 ")])),_:1})):h("",!0),(null==(a=P.info.buttons)?void 0:a.includes("delivery"))?(n(),c(i,{key:1,class:"ss-reset-button btn",onClick:t[2]||(t[2]=e=>u(s).$router.go("/pages/order/aftersale/return-delivery",{id:P.info.id}))},{default:r((()=>[b(" 填写退货 ")])),_:1})):h("",!0),p(i,{class:"ss-reset-button contcat-btn btn",onClick:t[3]||(t[3]=e=>u(s).$router.go("/pages/chat/index"))},{default:r((()=>[b(" 联系客服 ")])),_:1})]})),_:1})])),_:1}))])),_:1},8,["navbar"])}}},[["__scopeId","data-v-2864087d"]]);export{B as default};
|