pages-order-aftersale-detail.Bbx7dtpv.js 7.7 KB

1
  1. import{K as e,s,v as t,t as a,c as l,a0 as o,o as i,G as r,T as n,a as c,b as d,d as u,w as f,u as _,am as m,e as p,a7 as y,f as g,x as v,y as x,F as b,n as h,g as j,j as k,z as w,R as $,l as T,i as N,M as I,J as C}from"./index-rA9LQu-Z.js";import{_ as S}from"./s-goods-item.D-mVqpg9.js";import{_ as J}from"./s-empty.DeUWkR30.js";import{a as M,_ as E}from"./s-layout.B9qvEa4L.js";import{l as O,n as P,f as q,p as F}from"./useGoods.BijVnshj.js";import{_ as z}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./points.DDTOnulC.js";/* empty css *//* empty css */import"./s-menu-tools.DS1kA6Tz.js";import"./s-layout.vue_vue_type_style_index_0_scoped_d5f7c468_lang.DsLhC4_3.js";import"./phone-international-input.vue_vue_type_style_index_0_scoped_a793e264_lang.BKCNw0rf.js";import"./s-tabbar.DG8GxPLd.js";import"./phone-international-input.xRkWv9wR.js";const A=z({__name:"detail",setup(z){e((e=>({"9122e62c":_(G)}))),s.$store("user").userInfo;const A=2*s.$platform.device.statusBarHeight,G=s.$url.css("/static/img/shop/order/order_bg.png"),H=t({id:0,info:{},loading:!1,active:0,list:[{title:a("order.submit_application")},{title:a("order.processing")},{title:a("order.completed")}]});const R=()=>{s.$helper.copyText(H.info.no)};async function B(e){H.loading=!0;const{code:s,data:t}=await m.getAfterSale(e);0===s?(H.info=t,O(H.info),[10].includes(H.info.status)?H.active=0:[20,30,40].includes(H.info.status)?H.active=1:([50].includes(H.info.status)||[61,62,63].includes(H.info.status))&&(H.active=2)):H.info=null}const D=l((()=>s.$store("user").isLogin));return o((()=>D.value),(e=>{e&&window.location.reload()})),i((e=>{D.value?e.username&&(console.log(JSON.parse(n("user-store")).userInfo.username),e.username!=JSON.parse(n("user-store")).userInfo.username&&s.$helper.toast(a("order.account_switch_needed",{user1:JSON.parse(n("user-store")).userInfo.username,user2:e.username}),3e3)):(r(),s.$helper.toast(a("order.not_logged_in",{user:e.username}),3e3)),e.id?(H.id=e.id,B(e.id)):s.$helper.toast(a("order.missing_order_info"))})),(e,t)=>{const l=T,o=N,i=c(d("s-goods-item"),S),r=I,n=c(d("s-empty"),J),O=c(d("su-fixed"),M),z=c(d("s-layout"),E);return p(),u(z,{title:_(a)("order.after_sales_details"),navbar:!_(y.isEmpty)(H.info)&&H.loading?"inner":"normal"},{default:f((()=>[!_(y.isEmpty)(H.info)&&H.loading?(p(),u(o,{key:0,class:"content_box"},{default:f((()=>[g(o,{class:"steps-box ss-flex",style:h([{marginTop:"-"+Number(A+88)+"rpx",paddingTop:Number(A+88)+"rpx"}])},{default:f((()=>[g(o,{class:"ss-flex"},{default:f((()=>[(p(!0),v(b,null,x(H.list,((e,s)=>(p(),u(o,{class:"steps-item",key:s},{default:f((()=>[g(o,{class:"ss-flex"},{default:f((()=>[H.list.length-1===s&&[61,62,63].includes(H.info.status)?(p(),u(l,{key:0,class:"sicon-circleclose"})):(p(),u(l,{key:1,class:C(["sicon-circlecheck",H.active>=s?"activity-color":"info-color"])},null,8,["class"])),H.list.length-1!==s?(p(),u(o,{key:2,class:C(["line",H.active>=s?"activity-bg":"info-bg"])},null,8,["class"])):w("",!0)])),_:2},1024),g(o,{class:C(["steps-item-title",H.active>=s?"activity-color":"info-color"])},{default:f((()=>[j(k(e.title),1)])),_:2},1032,["class"])])),_:2},1024)))),128))])),_:1})])),_:1},8,["style"]),g(o,{class:"status-box ss-flex ss-col-center ss-row-between ss-m-x-20",onClick:t[0]||(t[0]=e=>_(s).$router.go("/pages/order/aftersale/log",{id:H.id}))},{default:f((()=>[g(o,{class:""},{default:f((()=>[g(o,{class:"status-text"},{default:f((()=>[j(k(_(P)(H.info)),1)])),_:1}),g(o,{class:"status-time"},{default:f((()=>[j(k(_(s).$helper.timeFormat(H.info.updateTime,"yyyy-mm-dd hh:MM:ss")),1)])),_:1})])),_:1}),g(l,{class:"ss-iconfont _icon-forward",style:{color:"#666"}})])),_:1}),g(o,{class:"aftersale-content ss-m-y-20"},{default:f((()=>[g(o,{class:"aftersale-item ss-flex ss-col-center"},{default:f((()=>[g(o,{class:"item-title"},{default:f((()=>[j(k(_(a)("order.total_refund"))+":",1)])),_:1}),g(o,{class:"item-content"},{default:f((()=>[j(" ¥"+k(_(q)(H.info.refundPriceTotal)),1)])),_:1})])),_:1}),g(o,{class:"aftersale-item ss-flex ss-col-center"},{default:f((()=>[g(o,{class:"item-title"},{default:f((()=>[j(k(_(a)("order.refund_amount"))+":",1)])),_:1}),g(o,{class:"item-content"},{default:f((()=>[j("¥"+k(_(q)(H.info.refundPrice)),1)])),_:1})])),_:1}),g(o,{class:"aftersale-item ss-flex ss-col-center"},{default:f((()=>[g(o,{class:"item-title"},{default:f((()=>[j(k(_(a)("order.refund_commission"))+":",1)])),_:1}),g(o,{class:"item-content"},{default:f((()=>[j("¥"+k(_(F)(H.info.refundIntegral)),1)])),_:1})])),_:1}),g(o,{class:"aftersale-item ss-flex ss-col-center"},{default:f((()=>[g(o,{class:"item-title"},{default:f((()=>[j(k(_(a)("order.refund_points"))+":",1)])),_:1}),g(o,{class:"item-content"},{default:f((()=>[j("¥"+k(_(F)(H.info.refundConsumptionPoints)),1)])),_:1})])),_:1})])),_:1}),g(o,{class:"order-shop"},{default:f((()=>[g(i,{price:H.info.refundPriceTotal,img:H.info.picUrl,title:H.info.spuName,titleWidth:480,skuText:H.info.properties.map((e=>e.valueName)).join(" "),num:H.info.count},null,8,["price","img","title","skuText","num"])])),_:1}),g(o,{class:"aftersale-content"},{default:f((()=>[g(o,{class:"aftersale-item ss-flex ss-col-center"},{default:f((()=>[g(o,{class:"item-title"},{default:f((()=>[j(k(_(a)("order.service_order_number"))+":",1)])),_:1}),g(o,{class:"item-content ss-m-r-16"},{default:f((()=>[j(k(H.info.no),1)])),_:1}),g(r,{class:"ss-reset-button copy-btn",onClick:R},{default:f((()=>[j(k(_(a)("order.copy")),1)])),_:1})])),_:1}),g(o,{class:"aftersale-item ss-flex ss-col-center"},{default:f((()=>[g(o,{class:"item-title"},{default:f((()=>[j(k(_(a)("order.application_time"))+":",1)])),_:1}),g(o,{class:"item-content"},{default:f((()=>[j(k(_(s).$helper.timeFormat(H.info.createTime,"yyyy-mm-dd hh:MM:ss")),1)])),_:1})])),_:1}),g(o,{class:"aftersale-item ss-flex ss-col-center"},{default:f((()=>[g(o,{class:"item-title"},{default:f((()=>[j(k(_(a)("order.after_sales_type"))+":",1)])),_:1}),g(o,{class:"item-content"},{default:f((()=>[j(k(10===H.info.way?_(a)("order.refund_only"):_(a)("order.refund_and_return")),1)])),_:1})])),_:1}),g(o,{class:"aftersale-item ss-flex ss-col-center"},{default:f((()=>[g(o,{class:"item-title"},{default:f((()=>[j(k(_(a)("order.application_reason"))+":",1)])),_:1}),g(o,{class:"item-content"},{default:f((()=>[j(k(H.info.applyReason),1)])),_:1})])),_:1}),g(o,{class:"aftersale-item ss-flex ss-col-center"},{default:f((()=>[g(o,{class:"item-title"},{default:f((()=>[j(k(_(a)("order.related_description"))+":",1)])),_:1}),g(o,{class:"item-content"},{default:f((()=>[j(k(H.info.applyDescription),1)])),_:1})])),_:1})])),_:1})])),_:1})):w("",!0),_(y.isEmpty)(H.info)&&H.loading?(p(),u(n,{key:1,icon:"/static/order-empty.png",text:_(a)("order.no_after_sales_details")},null,8,["text"])):w("",!0),_(y.isEmpty)(H.info)?w("",!0):(p(),u(O,{key:2,bottom:"",placeholder:"",bg:"bg-white"},{default:f((()=>[g(o,{class:"foot_box"},{default:f((()=>{var e,l;return[(null==(e=H.info.buttons)?void 0:e.includes("cancel"))?(p(),u(r,{key:0,class:"ss-reset-button btn",onClick:t[1]||(t[1]=e=>{return s=H.info.id,void $({title:a("setting.prompt"),content:a("order.confirm_cancel_request"),success:async function(e){if(!e.confirm)return;const{code:t}=await m.cancelAfterSale(s);0===t&&await B(s)}});var s})},{default:f((()=>[j(k(_(a)("order.cancel_request")),1)])),_:1})):w("",!0),(null==(l=H.info.buttons)?void 0:l.includes("delivery"))?(p(),u(r,{key:1,class:"ss-reset-button btn",onClick:t[2]||(t[2]=e=>_(s).$router.go("/pages/order/aftersale/return-delivery",{id:H.info.id}))},{default:f((()=>[j(k(_(a)("order.fill_return")),1)])),_:1})):w("",!0)]})),_:1})])),_:1}))])),_:1},8,["title","navbar"])}}},[["__scopeId","data-v-aa290270"]]);export{A as default};