Index-90332866.js 11 KB

1
  1. import{I as ie}from"./index-da467802.js";import{O as ce,a as de,S as re}from"./index-09e491af.js";import{g as _e,D as pe,N as ue,a as ge,P as he,b as me,B as ye}from"./util-61aa553e.js";import{p as S,C as fe,B as ve,L as xe}from"./request-7bde6ddd.js";import{C as be}from"./index-efb97208.js";import{F as we}from"./index-16284a93.js";import{d as ke,r as u,y as N,o as Ce,b as d,e as r,c as s,z as Ve,f as e,h as _,F as T,u as De,B as z,k as Ne,A as ze,t as c,p as Ie,j as Le,_ as Be}from"./index-24f34c0a.js";import"./use-placeholder-b2c6b0a3.js";import"./index-14c35e13.js";const t=b=>(Ie("data-v-7db8eaf4"),b=b(),Le(),b),Re={key:0,style:{position:"fixed",bottom:"0px",left:"0px",right:"0px","z-index":"999"}},Se={style:{display:"flex","flex-direction":"column",height:"100vh"}},Te={style:{"border-bottom":"1px solid #fefefe"},class:"my-dropdown-menu"},Ue=t(()=>e("span",{style:{color:"#646566"}},"姓   名",-1)),je=t(()=>e("span",{style:{color:"#646566"}},"手 机 号",-1)),Fe=t(()=>e("div",{style:{height:"20px"}},null,-1)),Pe={style:{padding:"0px 16px",display:"flex"}},Oe={style:{"flex-grow":"1"}},Ae=t(()=>e("div",{style:{width:"20px"}},null,-1)),Me={style:{"flex-grow":"1"}},qe=t(()=>e("div",{style:{height:"15px"}},null,-1)),Ee={class:"container",style:{"overflow-y":"auto",flex:"1"}},Ge={style:{"text-align":"left"}},$e={style:{display:"flex","flex-direction":"column","justify-content":"space-between","flex-grow":"1","overflow-x":"hidden","word-break":"break-all"}},He={style:{width:"100%"}},Je={style:{display:"flex","justify-content":"space-between"}},Ke={style:{"font-size":"16px",color:"#000","font-weight":"bold",display:"flex"}},Qe=t(()=>e("span",null,"(",-1)),We=t(()=>e("span",null,")",-1)),Xe={style:{"font-size":"16px"}},Ye={key:0},Ze={style:{color:"blue"}},et={key:1,style:{color:"red"}},tt={style:{display:"flex","justify-content":"space-between"}},ot={style:{"margin-left":"3px","font-weight":"bold"}},nt={key:0},st={key:1,style:{"text-align":"center",padding:"20px",color:"#ccc"}},lt=t(()=>e("span",null,"暂无数据",-1)),at=[lt],it={key:2,style:{"text-align":"center",padding:"20px"}},ct={key:3,style:{"text-align":"center",padding:"20px",color:"#ccc"}},dt=t(()=>e("span",null,"没有更多了",-1)),rt=[dt],_t={key:4,style:{"text-align":"center",padding:"20px"}},pt={style:{height:"100%",width:"100%",display:"flex","align-items":"center","justify-content":"center"}},ut={style:{height:"60%",width:"80%","background-color":"#ffffff",display:"flex","flex-direction":"column"}},gt=t(()=>e("div",{style:{height:"16px"}},null,-1)),ht={style:{"flex-grow":"1","word-break":"break-all","overflow-y":"auto",padding:"10px 0px 16px 16px"}},mt={style:{"padding-right":"16px"}},yt={key:0,style:{display:"flex","align-items":"center","justify-content":"center","margin-top":"30px"}},ft=t(()=>e("div",{style:{"margin-right":"6px"}},[e("span",{style:{}},"销售信息加载中")],-1)),vt={key:1},xt={key:0},bt=t(()=>e("div",{style:{"margin-top":"10px"}},[e("span",{style:{"font-weight":"bold"}},"销售方式: "),e("span",{style:{"font-weight":"bold",color:"green"}},"实名")],-1)),wt={style:{"margin-top":"10px"}},kt=t(()=>e("span",{style:{"font-weight":"bold"}},"顾客姓名: ",-1)),Ct={style:{"margin-top":"10px"}},Vt=t(()=>e("span",{style:{"font-weight":"bold"}},"手机号: ",-1)),Dt={key:1},Nt=t(()=>e("div",{style:{"margin-top":"10px"}},[e("span",{style:{"font-weight":"bold"}},"销售方式: "),e("span",{style:{"font-weight":"bold",color:"red"}},"匿名")],-1)),zt=[Nt],It={style:{"margin-top":"10px"}},Lt=t(()=>e("span",{style:{"font-weight":"bold"}},"登记证号: ",-1)),Bt={style:{"margin-top":"10px"}},Rt=t(()=>e("span",{style:{"font-weight":"bold"}},"农药名称: ",-1)),St={style:{"margin-top":"10px"}},Tt=t(()=>e("span",{style:{"font-weight":"bold"}},"农药类别: ",-1)),Ut={style:{"margin-top":"10px"}},jt=t(()=>e("span",{style:{"font-weight":"bold"}},"剂型: ",-1)),Ft={style:{"margin-top":"10px"}},Pt=t(()=>e("span",{style:{"font-weight":"bold"}},"总含量: ",-1)),Ot={style:{"margin-top":"10px"}},At=t(()=>e("span",{style:{"font-weight":"bold"}},"有效期至: ",-1)),Mt={style:{"margin-top":"10px"}},qt=t(()=>e("span",{style:{"font-weight":"bold"}},"登记证持有人: ",-1)),Et={style:{"margin-top":"10px"}},Gt=t(()=>e("span",{style:{"font-weight":"bold"}},"数量: ",-1)),$t=t(()=>e("div",{style:{height:"20px"}},null,-1)),Ht={style:{padding:"0px 16px"}},Jt=t(()=>e("div",{style:{height:"10px"}},null,-1)),Kt=ke({__name:"Index",setup(b){const U=De(),I=u(),o=N({name:"",mobile:"",startDate:"",endDate:"",sort:"desc"}),g=N({pageNum:1,pageSize:10,pages:0}),a=N({show:!1,isLoading:!1,refresherLoading:!1,content:{clientName:"",clientPhone:"",realnameFlag:"1",info:"",registCode:"",register:"",id:"",physicType:"",name:"",typeName:"",validDate:"",concent:"",num:1}}),y=u([]),V=u("start"),D=u([]),j=u(new Date),F=u(_e(6)),f=u(!1),P=[{text:"时间降序",value:"desc"},{text:"时间升序",value:"asc"}],v=u(!1),w=u(!1),O=u(!1),A=()=>{console.log("start"),V.value="start",f.value=!0},M=()=>{console.log("clear_start"),o.startDate=""},q=()=>{console.log("end"),V.value="end",f.value=!0},E=()=>{console.log("clear_end"),o.endDate=""},G=i=>{console.log("confirm",i.selectedValues),D.value=i.selectedValues;const l=i.selectedValues[0],p=i.selectedValues[1],m=i.selectedValues[2],h=l+"-"+p+"-"+m;V.value=="start"?o.startDate=h:o.endDate=h,console.log(o),f.value=!1},$=i=>{console.log("cancel",i),f.value=!1},x=()=>{console.log("onload.....");const i=o.startDate?o.startDate+" 00:00:00":"",l=o.endDate?o.endDate+" 23:59:59":"";S("/recycleRecord/searchUserRecord",{clientName:o.name,clientPhone:o.mobile,startTime:i,endTime:l,pageNum:g.pageNum,pageSize:g.pageSize,sort:"createTime",order:o.sort}).then(({data:p})=>{if(console.log(p),w.value=!1,v.value=!1,p.code==0){const m=p.data,h=p.pages;console.log(h),console.log(m),g.pageNum==1&&y.value.splice(0,y.value.length),y.value.push(...m),g.pages=h,console.log(y.value,h)}})},H=()=>{console.log("onrefresh..."),console.log(v.value),O.value=!1,w.value=!0,x()};Ce(()=>{console.log("onMounted"),x()});const J=()=>{console.log("确定"),a.show=!1},K=i=>{console.log(i),o.sort=i,x()},Q=()=>{console.log("clickLoading"),g.pageNum++,w.value=!0,x()},L=()=>{I.value.toggle(!1),f.value=!1},W=()=>{console.log("onCancel"),L()},X=()=>{console.log("onConfirm"),console.log(o),L(),g.pageNum=1,x()},Y=i=>{console.log(i);const l=i.id;console.log(l),a.show=!0,a.isLoading=!0,S("/recycleRecord/getRecordDetail",{id:l}).then(({data:p})=>{if(console.log(p),a.isLoading=!1,p.code==0){console.log("success",p),Object.assign(a.content,p.data);return}else de("获取数据失败")})},Z=()=>{console.log(history),history.state.back?history.back():(console.log("跳转到首页"),U.push("/"))};return(i,l)=>{const p=pe,m=ie,h=ue,k=we,ee=fe,C=ve,B=me,te=ge,oe=be,ne=re,R=xe,se=he,le=ye,ae=ce;return d(),r(T,null,[f.value?(d(),r("div",Re,[s(p,{type:"date",modelValue:D.value,"onUpdate:modelValue":l[0]||(l[0]=n=>D.value=n),"min-date":F.value,"max-date":j.value,onConfirm:G,onCancel:$},null,8,["modelValue","min-date","max-date"])])):Ve("",!0),e("div",Se,[s(h,{title:"回收列表","left-text":"返回","left-arrow":"",onClickLeft:Z},{left:_(()=>[s(m,{name:"arrow-left",size:"20",color:"#000000"})]),_:1}),e("div",Te,[s(te,{"close-on-click-overlay":!1,"close-on-click-outside":!1},{default:_(()=>[s(B,{ref_key:"dropdown_1",ref:I,id:"item111",title:"筛选条件"},{default:_(()=>[s(ee,null,{default:_(()=>[s(k,{size:"large",modelValue:o.name,"onUpdate:modelValue":l[1]||(l[1]=n=>o.name=n),border:!0,placeholder:"请输入姓名",clearable:""},{label:_(()=>[Ue]),_:1},8,["modelValue"]),s(k,{clearable:"",size:"large",type:"number",modelValue:o.mobile,"onUpdate:modelValue":l[2]||(l[2]=n=>o.mobile=n),border:!0,placeholder:"请输入手机号"},{label:_(()=>[je]),_:1},8,["modelValue"]),s(k,{"right-icon":"clear",clearable:"",readonly:"",label:"时间区间",size:"large",type:"text",modelValue:o.startDate,"onUpdate:modelValue":l[3]||(l[3]=n=>o.startDate=n),border:!0,placeholder:"请输入开始时间",onClickInput:A,onClickRightIcon:M},null,8,["modelValue"]),s(k,{"right-icon":"clear",clearable:"",readonly:"",label:" ",size:"large",type:"text",modelValue:o.endDate,"onUpdate:modelValue":l[4]||(l[4]=n=>o.endDate=n),border:!0,placeholder:"请输入结束时间",onClickInput:q,onClickRightIcon:E},null,8,["modelValue"])]),_:1}),Fe,e("div",Pe,[e("div",Oe,[s(C,{type:"warning",icon:"close",size:"small",block:"",round:"",onClick:W},{default:_(()=>[z("取消")]),_:1})]),Ae,e("div",Me,[s(C,{type:"primary",icon:"search",size:"small",block:"",round:"",onClick:X},{default:_(()=>[z("搜索")]),_:1})])]),qe]),_:1},512),s(B,{"title-class":"my-title-class",modelValue:o.sort,"onUpdate:modelValue":l[5]||(l[5]=n=>o.sort=n),options:P,onChange:K},null,8,["modelValue"])]),_:1})]),e("div",Ee,[s(se,{modelValue:v.value,"onUpdate:modelValue":l[6]||(l[6]=n=>v.value=n),onRefresh:H},{default:_(()=>[e("div",null,[(d(!0),r(T,null,Ne(y.value,n=>(d(),ze(ne,{"right-width":"0"},{right:_(()=>[s(C,{square:"",type:"danger",text:"删除"})]),default:_(()=>[s(oe,{border:!0,onClick:Qt=>Y(n)},{default:_(()=>[e("div",Ge,[e("div",$e,[e("div",He,[e("div",Je,[e("div",Ke,[e("div",null,[e("span",null,c(n.pesticideName),1)]),e("div",null,[Qe,s(m,{name:"cross",size:"14"}),e("span",null,c(n.num),1),We])]),e("div",Xe,[n.realnameFlag=="1"?(d(),r("span",Ye,[e("span",Ze,c(n.clientName),1)])):(d(),r("span",et,"匿名"))])]),e("div",null,c(n.register),1)]),e("div",tt,[e("div",null,c(n.pesticideRegistCode),1),e("div",null,[e("span",ot,c(n.createtime),1)])])])])]),_:2},1032,["onClick"])]),_:2},1024))),256))]),e("div",null,[v.value?(d(),r("div",nt)):y.value.length==0?(d(),r("div",st,at)):w.value?(d(),r("div",it,[s(R,{type:"spinner",color:"#1989fa"})])):g.pages<=g.pageNum?(d(),r("div",ct,rt)):(d(),r("div",_t,[e("span",{onClick:Q},"点击加载")]))])]),_:1},8,["modelValue"]),s(le,{target:".container",right:"5vw",bottom:"20px"})])]),s(ae,{"lock-scroll":!1,show:a.show},{default:_(()=>[e("div",pt,[e("div",ut,[gt,e("div",ht,[e("div",mt,[a.isLoading?(d(),r("div",yt,[ft,e("div",null,[s(R,{type:"spinner",color:"#1989fa"})])])):(d(),r("div",vt,[a.content.realnameFlag=="1"?(d(),r("div",xt,[bt,e("div",wt,[kt,e("span",null,c(a.content.clientName),1)]),e("div",Ct,[Vt,e("span",null,c(a.content.clientPhone),1)])])):(d(),r("div",Dt,zt)),e("div",It,[Lt,e("span",null,c(a.content.registCode),1)]),e("div",Bt,[Rt,e("span",null,c(a.content.name),1)]),e("div",St,[Tt,e("span",null,c(a.content.typeName),1)]),e("div",Ut,[jt,e("span",null,c(a.content.physicType),1)]),e("div",Ft,[Pt,e("span",null,c(a.content.concent),1)]),e("div",Ot,[At,e("span",null,c(a.content.validDate),1)]),e("div",Mt,[qt,e("span",null,c(a.content.register),1)]),e("div",Et,[Gt,e("span",null,c(a.content.num),1)])]))])]),$t,e("div",Ht,[s(C,{color:"#4fc08d",type:"danger",round:"",block:"",size:"normal",icon:"close",onClick:J},{default:_(()=>[z("确定")]),_:1}),Jt])])])]),_:1},8,["show"])],64)}}});const lo=Be(Kt,[["__scopeId","data-v-7db8eaf4"]]);export{lo as default};