Index-efb24b0d.js 11 KB

1
  1. import{I as ie}from"./index-c1f44820.js";import{O as ce,a as de}from"./index-e6307542.js";import{g as re,D as pe,N as _e,a as ue,P as ge,b as he,B as me}from"./util-86757e1a.js";import{B as fe,L as ye}from"./index-8c362873.js";import{S as ve}from"./index-1f15f5f3.js";import{C as xe}from"./index-b8adef18.js";import{C as be}from"./index-9c8f373e.js";import{F as we}from"./index-edccefc2.js";import{d as ke,r as u,n as N,o as Ce,b as d,e as r,c as s,q as Ve,f as e,h as p,F as B,u as De,l as z,k as Ne,s as ze,t as c,p as Ie,j as Le,_ as Re}from"./index-ebd06049.js";import{p as T}from"./request-90084a8d.js";import"./use-expose-cd5a8a20.js";import"./use-placeholder-efd5789a.js";import"./interceptor-77f719a0.js";const t=b=>(Ie("data-v-92589711"),b=b(),Le(),b),Se={key:0,style:{position:"fixed",bottom:"0px",left:"0px",right:"0px","z-index":"999"}},Be={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"}},Me=t(()=>e("div",{style:{width:"20px"}},null,-1)),qe={style:{"flex-grow":"1"}},Ae=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],pt={key:4,style:{"text-align":"center",padding:"20px"}},_t={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"}},ft={key:0,style:{display:"flex","align-items":"center","justify-content":"center","margin-top":"30px"}},yt=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)),Rt={style:{"margin-top":"10px"}},St=t(()=>e("span",{style:{"font-weight":"bold"}},"农药名称: ",-1)),Bt={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"}},Mt=t(()=>e("span",{style:{"font-weight":"bold"}},"有效期至: ",-1)),qt={style:{"margin-top":"10px"}},At=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}}),f=u([]),V=u("start"),D=u([]),j=u(new Date),F=u(re(6)),y=u(!1),P=[{text:"时间降序",value:"desc"},{text:"时间升序",value:"asc"}],v=u(!1),w=u(!1),O=u(!1),M=()=>{console.log("start"),V.value="start",y.value=!0},q=()=>{console.log("clear_start"),o.startDate=""},A=()=>{console.log("end"),V.value="end",y.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],_=i.selectedValues[1],m=i.selectedValues[2],h=l+"-"+_+"-"+m;V.value=="start"?o.startDate=h:o.endDate=h,console.log(o),y.value=!1},$=i=>{console.log("cancel",i),y.value=!1},x=()=>{console.log("onload.....");const i=o.startDate?o.startDate+" 00:00:00":"",l=o.endDate?o.endDate+" 23:59:59":"";T("/saleRecord/searchUserRecord",{clientName:o.name,clientPhone:o.mobile,startTime:i,endTime:l,pageNum:g.pageNum,pageSize:g.pageSize,sort:"createTime",order:o.sort}).then(({data:_})=>{if(console.log(_),w.value=!1,v.value=!1,_.code==0){const m=_.data,h=_.pages;console.log(h),console.log(m),g.pageNum==1&&f.value.splice(0,f.value.length),f.value.push(...m),g.pages=h,console.log(f.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),y.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,T("/saleRecord/getRecordDetail",{id:l}).then(({data:_})=>{if(console.log(_),a.isLoading=!1,_.code==0){console.log("success",_),Object.assign(a.content,_.data);return}else de("获取数据失败")})},Z=()=>{console.log(history),history.state.back?history.back():(console.log("跳转到首页"),U.push("/"))};return(i,l)=>{const _=pe,m=ie,h=_e,k=we,ee=be,C=fe,R=he,te=ue,oe=xe,ne=ve,S=ye,se=ge,le=me,ae=ce;return d(),r(B,null,[y.value?(d(),r("div",Se,[s(_,{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",Be,[s(h,{title:"回收列表","left-text":"返回","left-arrow":"",onClickLeft:Z},{left:p(()=>[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:p(()=>[s(R,{ref_key:"dropdown_1",ref:I,id:"item111",title:"筛选条件"},{default:p(()=>[s(ee,null,{default:p(()=>[s(k,{size:"large",modelValue:o.name,"onUpdate:modelValue":l[1]||(l[1]=n=>o.name=n),border:!0,placeholder:"请输入姓名",clearable:""},{label:p(()=>[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:p(()=>[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:M,onClickRightIcon:q},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:A,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:p(()=>[z("取消")]),_:1})]),Me,e("div",qe,[s(C,{type:"primary",icon:"search",size:"small",block:"",round:"",onClick:X},{default:p(()=>[z("搜索")]),_:1})])]),Ae]),_:1},512),s(R,{"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:p(()=>[e("div",null,[(d(!0),r(B,null,Ne(f.value,n=>(d(),ze(ne,{"right-width":"0"},{right:p(()=>[s(C,{square:"",type:"danger",text:"删除"})]),default:p(()=>[s(oe,{border:!0,onClick:Qt=>Y(n)},{default:p(()=>[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)):f.value.length==0?(d(),r("div",st,at)):w.value?(d(),r("div",it,[s(S,{type:"spinner",color:"#1989fa"})])):g.pages<=g.pageNum?(d(),r("div",ct,rt)):(d(),r("div",pt,[e("span",{onClick:Q},"点击加载")]))])]),_:1},8,["modelValue"]),s(le,{target:".container",right:"5vw",bottom:"20px"})])]),s(ae,{"lock-scroll":!1,show:a.show},{default:p(()=>[e("div",_t,[e("div",ut,[gt,e("div",ht,[e("div",mt,[a.isLoading?(d(),r("div",ft,[yt,e("div",null,[s(S,{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",Rt,[St,e("span",null,c(a.content.name),1)]),e("div",Bt,[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,[Mt,e("span",null,c(a.content.validDate),1)]),e("div",qt,[At,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:p(()=>[z("确定")]),_:1}),Jt])])])]),_:1},8,["show"])],64)}}});const ro=Re(Kt,[["__scopeId","data-v-92589711"]]);export{ro as default};