import{_ as e,r as a,a2 as t,E as l,b as o,d,e as s,f as r,k as i,h as n,n as m,w as u,j as p,g as c,cK as f,am as _,an as b,bf as h,q as j}from"./index.286e9b79.js";import{v}from"./loading.c49775a6.js";import{E as g}from"./dialog.ec9503d2.js";import"./overlay.2c1583ac.js";import{E as y,a as x}from"./form.ad10dcd5.js";import{E as V}from"./input.31de1b37.js";import"./form-item.9355e6dc.js";import{g as w,p as k}from"./http.f588794f.js";import"./event.776e7e11.js";import"./scroll.a50153b5.js";import"./_initCloneObject.fb8fbaea.js";import"./index.ed3ed02e.js";const C={key:0,class:"detail-box"},E={style:{"text-align":"center"}},q=e({__name:"detail",props:{modelValue:Boolean,id:{type:[Number,String],default:0}},emits:["update:modelValue","change","close"],setup(e,{emit:q}){const B=e,I=q;let K=a(!1),N=a({});t((()=>B.modelValue),((e,a)=>{e?(K.value=!0,O.id=B.id,w("shop.consult/detail",{id:B.id}).then((e=>{K.value=!1,e.code?N.value=e.data:l.error(e.msg)}))):N.value={}}));let O=o({id:"",reply_content:""});const S=()=>{if(O.reply_content.length<=0)return l.error("请输入回复内容"),!1;k("shop.consult/detail",O).then((e=>{e.code?(I("update:modelValue",!1),I("close"),l.success("操作成功")):l.error(e.msg)}))},U=()=>{I("update:modelValue",!1),I("close")};return(e,a)=>{const t=y,l=V,o=x,w=h,k=j,q=g,I=v;return d(),s("div",null,[r(q,{"model-value":B.modelValue,title:"回复咨询",width:"600",center:"","align-center":"",onClose:U},{footer:i((()=>[n("div",E,[r(k,{onClick:U},{default:i((()=>[m("取消")])),_:1}),r(k,{onClick:S,type:"primary"},{default:i((()=>[m("确认")])),_:1})])])),default:i((()=>[u((d(),p(w,{height:"300px"},{default:i((()=>[c(f)(c(N))?b("",!0):(d(),s("div",C,[r(o,{model:c(O)},{default:i((()=>[r(t,{label:"用户评论","label-width":"100px"},{default:i((()=>[n("div",null,_(c(N).content||"-"),1)])),_:1}),r(t,{label:"回复内容",required:"","label-width":"100px"},{default:i((()=>[r(l,{modelValue:c(O).reply_content,"onUpdate:modelValue":a[0]||(a[0]=e=>c(O).reply_content=e),rows:2,type:"textarea",autocomplete:"off",placeholder:"请输入回复内容"},null,8,["modelValue"])])),_:1})])),_:1},8,["model"])]))])),_:1})),[[I,c(K)]])])),_:1},8,["model-value"])])}}},[["__scopeId","data-v-8d59898d"]]);export{q as default};
