import{u as E}from"./useInstance.233fbdde.js";import{g as w,b as I,s as N,d as P}from"./cash.dfea94a6.js";import{d as R,a6 as U,r as h,b as A,p as M,c as g,e as O,k as S,i as o,h as s,g as _,u as d,t as f,a2 as T,m as V,E as F,_ as $}from"./index.0308b213.js";const j={class:"deliveryer-info"},q={class:"info-image"},z=["src"],G={class:"data"},H={class:"deliveryer-amount"},J={class:"deliveryer-amount"},K={class:"deliveryer-amount"},L=V("\u63D0\u4EA4"),Q=V("\u53D6\u6D88"),W=R({props:{modelValue:{type:Boolean,default:!1},id:null},emits:["update:modelValue","onClose"],setup(D,{emit:y}){const c=D,{OpPlatform:b}=U(),{global:k}=E(),v=h(!1),C=h(),t=A({deliveryer:{title:"",avatar:"",mobile:""},log:{trade_no:"",get_fee:"",addtime:""}}),m=A({remark:""}),B=()=>{b.value==="agent"?w(c.id).then(e=>{var a,l,n,u,r,i;t.deliveryer.avatar=(a=e.deliveryer)==null?void 0:a.avatar,t.deliveryer.title=(l=e.deliveryer)==null?void 0:l.title,t.deliveryer.mobile=(n=e.deliveryer)==null?void 0:n.mobile,t.log.trade_no=(u=e.log)==null?void 0:u.trade_no,t.log.get_fee=(r=e.log)==null?void 0:r.get_fee,t.log.addtime=(i=e.log)==null?void 0:i.addtime}):I(c.id).then(e=>{var a,l,n,u,r,i;t.deliveryer.avatar=(a=e.deliveryer)==null?void 0:a.avatar,t.deliveryer.title=(l=e.deliveryer)==null?void 0:l.title,t.deliveryer.mobile=(n=e.deliveryer)==null?void 0:n.mobile,t.log.trade_no=(u=e.log)==null?void 0:u.trade_no,t.log.get_fee=(r=e.log)==null?void 0:r.get_fee,t.log.addtime=(i=e.log)==null?void 0:i.addtime})};M(()=>c.modelValue,e=>{e&&(v.value=e,B())});const x=()=>{b.value==="agent"?N({id:c.id,...m}).then(e=>{F({message:"\u64A4\u9500\u6210\u529F",type:"success"}),p()}):P({id:c.id,...m}).then(e=>{F({message:"\u64A4\u9500\u6210\u529F",type:"success"}),p()})},p=()=>{y("update:modelValue",!1),y("onClose"),k.$resetForm(C.value,m)};return(e,a)=>{const l=g("el-form-item"),n=g("el-input"),u=g("el-button"),r=g("el-dialog");return O(),S(r,{modelValue:v.value,"onUpdate:modelValue":a[1]||(a[1]=i=>v.value=i),title:"\u7533\u8BF7\u63D0\u73B0\u64A4\u9500",width:"50%",onClose:p,"destroy-on-close":""},{default:o(()=>[s(d(T),{ref_key:"formRef",ref:C,model:d(m),"label-width":"140px"},{default:o(()=>[s(l,{class:"tn-el-form-item",label:"\u914D\u9001\u5458\u4FE1\u606F"},{default:o(()=>[_("div",j,[_("div",q,[_("img",{src:d(t).deliveryer.avatar},null,8,z)]),_("div",G,f(d(t).deliveryer.title)+"/"+f(d(t).deliveryer.mobile),1)])]),_:1}),s(l,{label:"\u7533\u8BF7\u65F6\u95F4"},{default:o(()=>[_("div",H,f(d(t).log.addtime),1)]),_:1}),s(l,{label:"\u8BA2\u5355\u53F7"},{default:o(()=>[_("div",J,f(d(t).log.trade_no),1)]),_:1}),s(l,{label:"\u64A4\u9500\u91D1\u989D"},{default:o(()=>[_("div",K,f(d(t).log.get_fee),1)]),_:1}),s(l,{label:"\u5907\u6CE8",prop:"remark"},{default:o(()=>[s(n,{modelValue:d(m).remark,"onUpdate:modelValue":a[0]||(a[0]=i=>d(m).remark=i),placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8",type:"textarea",row:3},null,8,["modelValue"])]),_:1}),s(l,null,{default:o(()=>[s(u,{type:"primary",onClick:x},{default:o(()=>[L]),_:1}),s(u,{onClick:p},{default:o(()=>[Q]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}});const ee=$(W,[["__scopeId","data-v-696a5186"]]);export{ee as default};
