pages-order-aftersale-detail.cf54cb0c.js 6.4 KB

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