import{e as P,a8 as j,l as E,r as O,a2 as Q,P as _,a3 as m,a4 as s,f as o,H as i,ab as u,I as y,Q as b,a7 as C,a9 as T,F as U,aa as W}from"./vue-bf422dc1.js";import{w as z,s as A,d as G}from"./complaint-ae10d288.js";import{e as J}from"./index-b02b5348.js";import{f as V}from"./date-20546ee0.js";import{M as c,n as K,o as X,B as Y,x as Z,p as h,S as D,t as ee,u as te,b as se}from"./ui-ba7aaa7e.js";import{_ as oe}from"./index-c2dd6a24.js";import"./libs-51817cd7.js";import"./icons-a8498fb6.js";import"./plugins-ca970193.js";import"./others-9f318174.js";import"./echarts-bf9d612c.js";const ne={key:0},le={key:1},ae={class:"form-container"},re=["innerHTML"],ie={name:"RowDetail"},ue=P({...ie,setup(_e){const p=j(),e=E({}),B=[{value:"admin",label:"管理员"},{value:"merchant",label:"商户"},{value:"buyer",label:"买家"},{value:"agent",label:"上级卖家"}],R=l=>{const n=B.find(a=>a.value===l);return n?n.label:"未知"},g=async l=>{const n=await z({id:p.currentRoute.value.query.id,result:l});n.code===1?(c.success(n.msg),f()):c.error(n.msg)},d=O(""),L=async()=>{if(d.value==="")return;const l=await A({id:p.currentRoute.value.query.id,content:d.value});l.code===1?(c.success(l.msg),d.value=""):c.error(l.msg)},[M,I]=J(),f=async()=>{var n;const l=await G({id:p.currentRoute.value.query.id});l.code===0&&c.error(l.msg),Object.assign(e,l.data),e&&I((n=e==null?void 0:e.complaint)==null?void 0:n.expire_at)};return f(),(l,n)=>{const a=K,N=X,q=Q("wp-editor"),v=Y,k=Z,w=h,H=D,S=ee,$=te,x=se;return _(),m(x,{title:"投诉详情",class:"basic-container",bordered:!1},{default:s(()=>[o(N,null,{default:s(()=>[o(a,{label:"订单编号"},{default:s(()=>{var t;return[i(u((t=e==null?void 0:e.complaint)==null?void 0:t.trade_no),1)]}),_:1}),o(a,{label:"举报原因"},{default:s(()=>{var t;return[i(u((t=e==null?void 0:e.complaint)==null?void 0:t.type),1)]}),_:1}),o(a,{label:"投诉说明"},{default:s(()=>{var t;return[i(u((t=e==null?void 0:e.complaint)==null?void 0:t.desc),1)]}),_:1}),o(a,{label:"联系方式 "},{default:s(()=>{var t;return[i(u((t=e==null?void 0:e.complaint)==null?void 0:t.mobile),1)]}),_:1}),o(a,{label:"投诉状态"},{default:s(()=>{var t,r;return[i(u(((t=e==null?void 0:e.complaint)==null?void 0:t.status)===0?"处理中":((r=e==null?void 0:e.complaint)==null?void 0:r.status)==-1?"已撤销":"已处理"),1)]}),_:1}),o(a,{label:"投诉结果 "},{default:s(()=>{var t,r;return[i(u(((t=e==null?void 0:e.complaint)==null?void 0:t.result)==0?"处理中":((r=e==null?void 0:e.complaint)==null?void 0:r.result)==1?"商家胜诉":"买家胜诉"),1)]}),_:1}),o(a,{label:"投诉时间"},{default:s(()=>{var t;return[i(u(y(V)((t=e==null?void 0:e.complaint)==null?void 0:t.create_at)),1)]}),_:1}),o(a,{label:"剩余时间"},{default:s(()=>{var t;return[((t=e==null?void 0:e.complaint)==null?void 0:t.result)==1?(_(),b("span",ne,"已结束")):(_(),b("span",le,u(y(M)),1))]}),_:1})]),_:1}),o(k,null,{content:s(()=>[C("div",ae,[o(q,{modelValue:d.value,"onUpdate:modelValue":n[0]||(n[0]=t=>d.value=t),height:"300px",width:"100%",mode:"simple","user-type":"admin"},null,8,["modelValue"]),o(v,{class:"form-submit",onClick:L},{default:s(()=>[i("发送内容")]),_:1})])]),_:1}),o(H,null,{default:s(()=>{var t,r;return[o(w),((t=e==null?void 0:e.complaint)==null?void 0:t.status)===0?(_(),m(v,{key:0,theme:"success",onClick:n[1]||(n[1]=F=>g(1))},{default:s(()=>[i("商家胜诉")]),_:1})):T("",!0),((r=e==null?void 0:e.complaint)==null?void 0:r.status)===0?(_(),m(v,{key:1,theme:"danger",onClick:n[2]||(n[2]=F=>g(2))},{default:s(()=>[i("买家胜诉")]),_:1})):T("",!0),o(w)]}),_:1}),o(x,{title:"聊天内容",class:"message-list"},{default:s(()=>[o($,{split:!0,style:{height:"500px"},scroll:{type:"virtual"}},{default:s(()=>[(_(!0),b(U,null,W(e==null?void 0:e.messages,(t,r)=>(_(),m(S,{key:r},{content:s(()=>[o(k,{author:R(t==null?void 0:t.type),datetime:y(V)(t.create_at)},{content:s(()=>[C("div",{innerHTML:t.content},null,8,re)]),_:2},1032,["author","datetime"])]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})}}});const xe=oe(ue,[["__scopeId","data-v-1d2e07ed"]]);export{xe as default};
