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