import{d as w,r as D,b as x,p as N,c as i,e as B,f as V,g as m,h as e,i as t,u as d,C as k,F as z,m as s,L as A,_ as S}from"./index.0308b213.js";import{d as U}from"./report.32ea0bec.js";import"./pawnRequest.956aeb8a.js";const Y={class:"filter-form"},M={class:"dl-flex",style:{gap:"10px"}},P={style:{display:"flex",gap:"10px"}},L=s("\u4E0D\u9650"),T=s("\u4ECA\u65E5"),j=s("\u6628\u65E5"),q=s("\u8FD17\u5929"),I=s("\u8FD130\u5929"),R=s("\u7B5B\u9009"),$={class:"data"},G={class:"operation-btn"},H=s("\u6253\u5370\u5F53\u524D\u9875"),J=s("\u6253\u5370\u5168\u90E8\u9875"),K=s("\u5BFC\u51FA\u5168\u90E8\u9875"),O=s("\u5BFC\u51FA\u5168\u90E8\u9875"),Q={class:"table"},W={class:"pagination"},X=w({setup(Z){const f=D(""),a=x({start_date:void 0,end_date:void 0,day:"all",page:1,limit:10}),E=b=>{const{columns:o,data:h}=b,u=[];return o.forEach((l,p)=>{if(p===0){u[p]=A("div",{style:{color:"#303133",fontSize:"12px"}},["\u5408\u8BA1"]);return}if(l.property=="cost_fee"||l.property=="sale_fee"||l.property=="profit_fee"){const r=h.map(_=>Number(_[l.property]));r.every(_=>Number.isNaN(_))?u[p]="":u[p]=`${r.reduce((_,n)=>{const v=Number(n);return Number.isNaN(v)?_:_+n},0)}`}else u[p]=""}),u},g=x({list:[],count:0}),F=()=>{U(a).then(b=>{g.list=b.list,g.count=b.count})};F();const y=()=>{f.value&&f.value.length===2?(a.start_date=f.value[0],a.end_date=f.value[1]):(a.start_date=void 0,a.end_date=void 0),F()};return N(()=>a,b=>{y()},{deep:!0,immediate:!0}),(b,o)=>{const h=i("el-date-picker"),u=i("el-form-item"),l=i("el-radio-button"),p=i("el-radio-group"),r=i("el-button"),_=i("el-form"),n=i("el-table-column"),v=i("el-table"),C=i("el-pagination");return B(),V(z,null,[m("div",Y,[e(_,{model:d(a),"label-width":"0",onSubmit:o[2]||(o[2]=k(()=>{},["prevent"]))},{default:t(()=>[m("div",M,[e(u,{class:"tn-el-form-item",style:{width:"300px"}},{default:t(()=>[e(h,{class:"tn-el-form-item--item",type:"daterange",modelValue:f.value,"onUpdate:modelValue":o[0]||(o[0]=c=>f.value=c),"range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65F6\u95F4","end-placeholder":"\u7ED3\u675F\u65F6\u95F4","value-format":"YYYY-MM-DD"},null,8,["modelValue"])]),_:1})]),m("div",P,[e(u,null,{default:t(()=>[e(p,{modelValue:d(a).day,"onUpdate:modelValue":o[1]||(o[1]=c=>d(a).day=c)},{default:t(()=>[e(l,{label:"all"},{default:t(()=>[L]),_:1}),e(l,{label:"0"},{default:t(()=>[T]),_:1}),e(l,{label:"1"},{default:t(()=>[j]),_:1}),e(l,{label:"7"},{default:t(()=>[q]),_:1}),e(l,{label:"30"},{default:t(()=>[I]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(u,null,{default:t(()=>[e(r,{type:"primary",onClick:y},{default:t(()=>[R]),_:1})]),_:1})])]),_:1},8,["model"])]),m("div",$,[m("div",G,[e(r,{class:"btn tn-button tn-button--blue--light"},{default:t(()=>[H]),_:1}),e(r,{class:"btn tn-button tn-button--blue--light"},{default:t(()=>[J]),_:1}),e(r,{class:"btn tn-button tn-button--blue--light"},{default:t(()=>[K]),_:1}),e(r,{class:"btn tn-button tn-button--blue--light"},{default:t(()=>[O]),_:1})]),m("div",Q,[e(v,{stripe:"",border:"",data:d(g).list,"show-summary":"","summary-method":E},{default:t(()=>[e(n,{align:"center",label:"\u9500\u552E\u7F16\u53F7",prop:"sale_no",width:"300px"}),e(n,{align:"center",label:"\u95E8\u5E97",prop:"store_name",width:"150px"}),e(n,{align:"center",label:"\u6210\u672C\u4EF7",prop:"cost_fee",width:"200px"}),e(n,{align:"center",label:"\u9500\u552E\u4EF7",prop:"sale_fee",width:"200px"}),e(n,{align:"center",label:"\u5229\u6DA6",prop:"profit_fee",width:"200px"}),e(n,{align:"center",label:"\u64CD\u4F5C\u5458",prop:"nickname",width:"300px"}),e(n,{align:"center",label:"\u64CD\u4F5C\u65F6\u95F4",prop:"create_time",width:"300px"})]),_:1},8,["data"])])]),m("div",W,[e(C,{currentPage:d(a).page,"onUpdate:currentPage":o[3]||(o[3]=c=>d(a).page=c),"page-size":d(a).limit,"onUpdate:page-size":o[4]||(o[4]=c=>d(a).limit=c),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:d(g).count},null,8,["currentPage","page-size","total"])])],64)}}});const oe=S(X,[["__scopeId","data-v-5cd9b407"]]);export{oe as default};
