import{E as j,h as q,i as I}from"./EditDialog.a81af5f3.js";import{d as O,a6 as R,r as i,b as f,p as T,c as n,at as G,e as p,f as h,g as d,h as e,i as u,u as l,F as V,j as H,k as v,w as J,m as x,t as K,q as M,A as Q,y as W,_ as X}from"./index.0308b213.js";import"./useInstance.233fbdde.js";const Y={class:"filter-form"},Z=x("\u67E5\u8BE2"),$={class:"data"},ee={class:"table"},te={class:"bottom"},le={class:"pagination"},oe=O({setup(ae){const{OpPlatform:F}=R();let g=i(!1);const o=f({page:1,limit:10,supplier_id:"",order_sn:""});f({store:[]});const _=f({list:[],count:0});i([]);const c=()=>{g.value=!0,F.value=="shangpu"||q(o).then(r=>{_.list=r.list,_.count=r.count,g.value=!1})};c(),i(!1),i(!1),T(()=>[o.page,o.limit],()=>{c()});const y=()=>{c()};let m=i(!1),D=i(!1),B=i(0);const k=()=>{B.value=0,W(()=>{D.value=!1}),c()},E=f({list:[]});return(()=>{F.value=="shangpu"||I().then(r=>{E.list=r})})(),(r,s)=>{const w=n("el-option"),L=n("el-select"),b=n("el-form-item"),A=n("el-input"),z=n("el-button"),P=n("el-form"),a=n("el-table-column"),C=n("el-table"),U=n("el-pagination"),N=G("loading");return p(),h(V,null,[d("div",Y,[e(P,{model:l(o),"label-width":"90px"},{default:u(()=>[e(b,{class:"tn-el-form-item",label:"\u4F9B\u5E94\u5546"},{default:u(()=>[e(L,{modelValue:l(o).supplier_id,"onUpdate:modelValue":s[0]||(s[0]=t=>l(o).supplier_id=t),placeholder:"\u8BF7\u9009\u62E9\u4F9B\u5E94\u5546",clearable:""},{default:u(()=>[(p(!0),h(V,null,H(l(E).list,t=>(p(),v(w,{key:t.id,label:t.supplier_name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(b,{class:"tn-el-form-item",label:"\u8BA2\u5355\u53F7"},{default:u(()=>[e(A,{modelValue:l(o).order_sn,"onUpdate:modelValue":s[1]||(s[1]=t=>l(o).order_sn=t),placeholder:"\u8BF7\u8F93\u5165\u8BA2\u5355\u53F7"},null,8,["modelValue"])]),_:1}),e(b,null,{default:u(()=>[e(z,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:y},{default:u(()=>[Z]),_:1})]),_:1})]),_:1},8,["model"])]),d("div",$,[d("div",ee,[J((p(),v(C,{data:l(_).list},{default:u(()=>[e(a,{type:"expand"},{default:u(t=>[e(C,{data:t.row.goods,border:!1},{default:u(()=>[e(a,{label:"\u5546\u54C1\u540D\u79F0",prop:"goods_title"}),e(a,{label:"\u5546\u54C1\u4EF7\u683C",prop:"goods_price"}),e(a,{label:"\u91C7\u8D2D\u4EF7",prop:"base_price"}),e(a,{label:"\u8D2D\u4E70\u6570\u91CF",prop:"num"}),e(a,{label:"\u8FD4\u70B9",prop:"rebate_ratio"},{default:u(({row:S})=>[x(K(S.rebate_ratio)+"% ",1)]),_:1}),e(a,{label:"\u8FD4\u70B9\u91D1\u989D",prop:"return"})]),_:2},1032,["data"])]),_:1}),e(a,{label:"\u4F9B\u5E94\u5546",prop:"supplier_title"}),e(a,{label:"\u8BA2\u5355\u53F7",prop:"order_sn"}),e(a,{label:"\u5546\u54C1\u4EF7\u683C",prop:"total_price"}),e(a,{label:"\u8FD4\u70B9\u91D1\u989D",prop:"rebate_price"})]),_:1},8,["data"])),[[N,l(g)]])])]),d("div",te,[d("div",le,[e(U,{currentPage:l(o).page,"onUpdate:currentPage":s[2]||(s[2]=t=>l(o).page=t),"page-size":l(o).limit,"onUpdate:page-size":s[3]||(s[3]=t=>l(o).limit=t),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:l(_).count},null,8,["currentPage","page-size","total"])])]),l(D)?(p(),v(j,{key:0,modelValue:l(m),"onUpdate:modelValue":s[4]||(s[4]=t=>M(m)?m.value=t:m=t),id:l(B),onOnClose:k},null,8,["modelValue","id"])):Q("",!0)],64)}}});const re=X(oe,[["__scopeId","data-v-c7e745ef"]]);export{re as default};
