pages-order-aftersale-detail.4FU3Kgv-.js 7.8 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-BCKJ-0Ge.js";import{_ as E}from"./s-goods-item.CMakO_PW.js";import{_ as J}from"./s-empty.QkB-HsQm.js";import{a as M,_ as P}from"./s-layout.BlKiWP6r.js";import{l as S,n as q,f as A,p as F}from"./useGoods.RKHlFkKU.js";import{_ as O}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./points.DDTOnulC.js";/* empty css *//* empty css */import"./s-menu-tools.IK4uQ0vW.js";import"./s-search-block.vue_vue_type_style_index_0_scoped_f692e81a_lang.PvnEoxKH.js";import"./uni-icons.B3KpsLhk.js";import"./s-layout.vue_vue_type_style_index_0_scoped_d5f7c468_lang.DAm7RC0r.js";import"./phone-international-input.vue_vue_type_style_index_0_scoped_a793e264_lang.gzj6S5Lq.js";import"./s-search-block.Cv0lfwt6.js";import"./phone-international-input.DlQn1niu.js";const z=O({__name:"detail",setup(O){e((e=>({"9122e62c":_(B)}))),s.$store("user").userInfo;const z=2*s.$platform.device.statusBarHeight,B=s.$url.css("/static/img/shop/order/order_bg.png"),G=t({id:0,info:{},loading:!1,active:0,list:[{title:a("order.submit_application")},{title:a("order.processing")},{title:a("order.completed")}]});const K=()=>{s.$helper.copyText(G.info.no)};async function L(e){G.loading=!0;const{code:s,data:t}=await m.getAfterSale(e);0===s?(G.info=t,S(G.info),[10].includes(G.info.status)?G.active=0:[20,30,40].includes(G.info.status)?G.active=1:([50].includes(G.info.status)||[61,62,63].includes(G.info.status))&&(G.active=2)):G.info=null}const R=l((()=>s.$store("user").isLogin));return o((()=>R.value),(e=>{e&&window.location.reload()})),i((e=>{R.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?(G.id=e.id,L(e.id)):s.$helper.toast(a("order.missing_order_info"))})),(e,t)=>{const l=T,o=N,i=c(d("s-goods-item"),E),r=I,n=c(d("s-empty"),J),S=c(d("su-fixed"),M),O=c(d("s-layout"),P);return p(),u(O,{title:_(a)("order.after_sales_details"),navbar:!_(y.isEmpty)(G.info)&&G.loading?"inner":"normal"},{default:f((()=>[!_(y.isEmpty)(G.info)&&G.loading?(p(),u(o,{key:0,class:"content_box"},{default:f((()=>[g(o,{class:"steps-box ss-flex",style:h([{marginTop:"-"+Number(z+88)+"rpx",paddingTop:Number(z+88)+"rpx"}])},{default:f((()=>[g(o,{class:"ss-flex"},{default:f((()=>[(p(!0),v(b,null,x(G.list,((e,s)=>(p(),u(o,{class:"steps-item",key:s},{default:f((()=>[g(o,{class:"ss-flex"},{default:f((()=>[G.list.length-1===s&&[61,62,63].includes(G.info.status)?(p(),u(l,{key:0,class:"sicon-circleclose"})):(p(),u(l,{key:1,class:C(["sicon-circlecheck",G.active>=s?"activity-color":"info-color"])},null,8,["class"])),G.list.length-1!==s?(p(),u(o,{key:2,class:C(["line",G.active>=s?"activity-bg":"info-bg"])},null,8,["class"])):w("",!0)])),_:2},1024),g(o,{class:C(["steps-item-title",G.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:G.id}))},{default:f((()=>[g(o,{class:""},{default:f((()=>[g(o,{class:"status-text"},{default:f((()=>[j(k(_(q)(G.info)),1)])),_:1}),g(o,{class:"status-time"},{default:f((()=>[j(k(_(s).$helper.timeFormat(G.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(_(A)(G.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(_(A)(G.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)(G.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)(G.info.refundConsumptionPoints)),1)])),_:1})])),_:1})])),_:1}),g(o,{class:"order-shop"},{default:f((()=>[g(i,{price:G.info.refundPriceTotal,img:G.info.picUrl,title:G.info.spuName,titleWidth:480,skuText:G.info.properties.map((e=>e.valueName)).join(" "),num:G.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(G.info.no),1)])),_:1}),g(r,{class:"ss-reset-button copy-btn",onClick:K},{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(G.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===G.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(G.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(G.info.applyDescription),1)])),_:1})])),_:1})])),_:1})])),_:1})):w("",!0),_(y.isEmpty)(G.info)&&G.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)(G.info)?w("",!0):(p(),u(S,{key:2,bottom:"",placeholder:"",bg:"bg-white"},{default:f((()=>[g(o,{class:"foot_box"},{default:f((()=>{var e,l;return[(null==(e=G.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=G.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 L(s)}});var s})},{default:f((()=>[j(k(_(a)("order.cancel_request")),1)])),_:1})):w("",!0),(null==(l=G.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:G.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{z as default};