import{p as k}from"./index.50bf8544.js";import{_ as P,r as _,p as f,b6 as h,c as d,e as m,f as v,g as c,h as l,i as n,t as I,F as U,j as L,k as B,A as C,R as S,S as j}from"./index.0308b213.js";import"./pawnRequest.956aeb8a.js";const D=u=>(S("data-v-f9fbda2b"),u=u(),j(),u),N={class:"pawn-form",style:{"min-width":"300px"}},O={class:"form-section"},z=D(()=>c("div",{class:"section-title"},"\u6536\u8D27\u4FE1\u606F",-1)),A={style:{"font-size":"14px",color:"#555","padding-right":"15px"}},E={props:{goodsForms:Object,formData:Object,youLike:Object,is_code:Boolean},emits:["copy","pawnInfoForms"],setup(u,{emit:b}){const p=u,i=_();(()=>{k().then(o=>{i.value=o})})();const e=_({valuation:0,receiving_fee:0,extra_fee:0,receiver:"\u6536\u8D27\u5458",partner:"\u5408\u4F19\u4EBA",partner_id:null,payer:"\u6536\u6B3E\u4EBA",appraiser:"\u9274\u5B9A\u4EBA",handler:"\u7ECF\u624B\u4EBA",remark:""}),V=o=>{const a=i.value.find(s=>s.id===o);e.value.partner=a.nickname,e.value.partner_id=a.id};return f(()=>p.formData,o=>{e.value=o},{deep:!0,immediate:!0}),h(()=>{p.goodsForms&&(e.value.valuation=p.goodsForms.reduce((o,a)=>o+(parseFloat(a.valuation)||0),0),e.value.receiving_fee=p.goodsForms.reduce((o,a)=>o+(parseFloat(a.total_fee)||0),0))}),f(e,o=>{b("pawnInfoForms",o)},{deep:!0}),(o,a)=>{const s=d("el-input"),r=d("el-form-item"),w=d("el-input-number"),g=d("el-option"),y=d("el-select"),x=d("el-form");return m(),v("div",N,[c("div",O,[z,l(x,{model:e.value,"label-position":"left","require-asterisk-position":"right",size:"large"},{default:n(()=>[l(r,{label:"\u7269\u54C1\u4F30\u4EF7",class:"disabled"},{default:n(()=>[l(s,{class:"pawn-input disabled",disabled:"",modelValue:e.value.valuation,"onUpdate:modelValue":a[0]||(a[0]=t=>e.value.valuation=t),placeholder:"\u8BF7\u8F93\u5165\u4F30\u4EF7"},null,8,["modelValue"])]),_:1}),l(r,{label:"\u5B9E\u4ED8\u91D1\u989D",class:"disabled"},{default:n(()=>[c("div",A,I(parseFloat(e.value.receiving_fee.toFixed(2))),1)]),_:1}),l(r,{label:"\u989D\u5916\u6210\u672C"},{default:n(()=>[l(w,{class:"pawn-input",modelValue:e.value.extra_fee,"onUpdate:modelValue":a[1]||(a[1]=t=>e.value.extra_fee=t),controls:!1},null,8,["modelValue"])]),_:1}),l(r,{label:"\u6536\u8D27\u5458"},{default:n(()=>[l(s,{class:"pawn-input",modelValue:e.value.receiver,"onUpdate:modelValue":a[2]||(a[2]=t=>e.value.receiver=t)},null,8,["modelValue"])]),_:1}),l(r,{label:"\u5408\u4F19\u4EBA"},{default:n(()=>[l(y,{class:"pawn-input",modelValue:e.value.partner_id,"onUpdate:modelValue":a[3]||(a[3]=t=>e.value.partner_id=t),placeholder:"\u9009\u62E9\u5408\u4F19\u4EBA",onChange:V,clearable:"",filterable:""},{default:n(()=>[i.value?(m(!0),v(U,{key:0},L(i.value,(t,F)=>(m(),B(g,{key:F,label:t.nickname,value:t.id},null,8,["label","value"]))),128)):C("",!0)]),_:1},8,["modelValue"])]),_:1}),l(r,{label:"\u6536\u6B3E\u4EBA"},{default:n(()=>[l(s,{class:"pawn-input",modelValue:e.value.payer,"onUpdate:modelValue":a[4]||(a[4]=t=>e.value.payer=t)},null,8,["modelValue"])]),_:1}),l(r,{label:"\u9274\u5B9A\u4EBA"},{default:n(()=>[l(s,{class:"pawn-input",modelValue:e.value.appraiser,"onUpdate:modelValue":a[5]||(a[5]=t=>e.value.appraiser=t)},null,8,["modelValue"])]),_:1}),l(r,{label:"\u7ECF\u624B\u4EBA"},{default:n(()=>[l(s,{class:"pawn-input",modelValue:e.value.handler,"onUpdate:modelValue":a[6]||(a[6]=t=>e.value.handler=t)},null,8,["modelValue"])]),_:1}),l(r,{label:"\u5907\u6CE8",style:{"border-bottom":"none"}}),l(r,{style:{"border-bottom":"none"}},{default:n(()=>[l(s,{class:"pawn-textarea",type:"textarea",modelValue:e.value.remark,"onUpdate:modelValue":a[7]||(a[7]=t=>e.value.remark=t),placeholder:"\u6DFB\u52A0\u5907\u6CE8\uFF08\u9009\u586B\uFF09"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])])}}},J=P(E,[["__scopeId","data-v-f9fbda2b"]]);export{J as default};
