Index-d100c093.js 11 KB

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