import{_ as k}from"./index.vue_vue_type_script_setup_true_lang.e7796e9d.js";import{d as h,r as p,b as D,b6 as y,p as U,c as r,e as _,f,g as n,h as o,i as u,u as l,t as I,F as S,j as R,H as j,R as z,S as N,_ as G}from"./index.0308b213.js";const O=d=>(z("data-v-90b7b678"),d=d(),N(),d),P={class:"pawn-form",style:{"min-width":"300px"}},$={class:"form-section"},q=O(()=>n("div",{class:"section-title"},"\u5F53\u7269\u4FE1\u606F",-1)),H={style:{"font-size":"14px",color:"#555","padding-right":"15px"}},L={class:"image-container"},M=["onClick"],A={class:"modal-content"},J=["src"],K=h({props:{formData:Object,is_code:Boolean,title:String,rate:Number},emits:["goodsForm"],setup(d,{expose:F,emit:v}){const g=d,C=p(),e=D({name:"",classify_text:"",sku_text:"",num:0,valuation:100,pawn_fee:0,rate:.05,images:[],code:"",isChangeRate:0});y(()=>{g.formData&&Object.assign(e,g.formData)}),U(e,m=>{if(e.sale_price){let a=0;e.origin==="\u5178\u5F53"?a=e.pawn_fee||0:e.origin==="\u95E8\u5E97"?a=e.stock_fee||0:e.origin==="\u6536\u8D27"&&(a=e.receiving_fee||0),e.profit_fee=e.sale_price-a}else e.profit_fee=0;v("goodsForm",m)},{deep:!0});const c=p(!1),b=p(""),V=m=>{b.value=m,c.value=!0},w=()=>{c.value=!1};return F({form:e}),(m,a)=>{const i=r("el-input"),t=r("el-form-item"),E=r("el-input-number"),x=r("el-image"),B=r("el-form");return _(),f("div",P,[n("div",$,[q,o(B,{"label-position":"left","require-asterisk-position":"right",ref_key:"formRef",ref:C,model:l(e),size:"large"},{default:u(()=>[o(t,{label:"\u5546\u54C1\u7F16\u53F7",class:"disabled"},{default:u(()=>[o(i,{class:"pawn-input",modelValue:l(e).goods_no,"onUpdate:modelValue":a[0]||(a[0]=s=>l(e).goods_no=s),placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),o(t,{label:"\u6240\u5C5E\u95E8\u5E97",class:"disabled"},{default:u(()=>[o(i,{class:"pawn-input",modelValue:l(e).name,"onUpdate:modelValue":a[1]||(a[1]=s=>l(e).name=s),placeholder:"\u8BF7\u8F93\u5165\u6240\u5C5E\u95E8\u5E97"},null,8,["modelValue"])]),_:1}),o(t,{label:"\u5546\u54C1\u6765\u6E90",class:"disabled"},{default:u(()=>[o(i,{class:"pawn-input",modelValue:l(e).origin,"onUpdate:modelValue":a[2]||(a[2]=s=>l(e).origin=s),placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u6765\u6E90"},null,8,["modelValue"])]),_:1}),o(t,{label:"\u5546\u54C1\u7C7B\u522B",class:"disabled"},{default:u(()=>[o(i,{class:"pawn-input",modelValue:l(e).origin,"onUpdate:modelValue":a[3]||(a[3]=s=>l(e).origin=s),placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u7C7B\u522B"},null,8,["modelValue"])]),_:1}),o(t,{label:"\u5546\u54C1\u540D\u79F0",class:"disabled"},{default:u(()=>[o(i,{class:"pawn-input",modelValue:l(e).name,"onUpdate:modelValue":a[4]||(a[4]=s=>l(e).name=s),placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),o(t,{label:"\u5355\u4F4D",class:"disabled"},{default:u(()=>[o(i,{class:"pawn-input",disabled:"",modelValue:l(e).sku_text,"onUpdate:modelValue":a[5]||(a[5]=s=>l(e).sku_text=s),controls:!1},null,8,["modelValue"])]),_:1}),o(t,{label:"\u6570\u91CF/\u91CD\u91CF",class:"disabled"},{default:u(()=>[o(E,{class:"pawn-input",disabled:"",modelValue:l(e).num,"onUpdate:modelValue":a[6]||(a[6]=s=>l(e).num=s),controls:!1},null,8,["modelValue"])]),_:1}),o(t,{label:"\u6210\u672C\u4EF7",class:"disabled"},{default:u(()=>[n("div",H,I(l(e).origin=="\u5178\u5F53"?l(e).pawn_fee:l(e).origin=="\u95E8\u5E97"?l(e).stock_fee:l(e).origin=="\u6536\u8D27"?l(e).receiving_fee:"0.00"),1)]),_:1}),o(t,{class:"normal-item disabled"},{default:u(()=>[o(k,{title:"\u56FE\u7247"},{default:u(()=>[n("div",L,[(_(!0),f(S,null,R(l(e).images,(s,Q)=>(_(),f("div",{class:"image-wrapper",onClick:T=>V(s)},[o(x,{src:s,class:"image"},null,8,["src"])],8,M))),256))])]),_:1})]),_:1})]),_:1},8,["model"])]),n("div",{class:j(["image-modal",{visible:c.value}]),onClick:w},[n("div",A,[n("img",{src:b.value,alt:"Preview"},null,8,J)])],2)])}}});const Y=G(K,[["__scopeId","data-v-90b7b678"]]);export{Y as default};
