mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-06 04:58:10 +00:00
2 lines
8.5 KiB
JavaScript
2 lines
8.5 KiB
JavaScript
import{_ as e}from"./u-input.e81f9fef.js";import{m as a,p as r,q as t,t as o,x as s,y as l,g as i,h as d,o as n,c as u,w as c,b as p,n as h,f as m,D as g,_ as f,i as x,aU as y,d as w,r as _,T as b,U as v,V as k,u as C,ae as L,af as S,G as E,E as I,F as j,l as U,a as B}from"./index-3788e709.js";import{_ as z}from"./u-icon.29403ccf.js";import{_ as M}from"./u-transition.2921302e.js";import{_ as $}from"./_plugin-vue_export-helper.1b428a4d.js";import{u as F,M as V}from"./useMescroll.4008a6f7.js";import{M as R}from"./mescroll-empty.ea08929d.js";import{c as D}from"./verify.df3f5af4.js";import{s as H}from"./select-date.d4821bde.js";import"./mescroll-i18n.e119fd0d.js";import"./u-popup.0caffe54.js";import"./u-safe-bottom.c1110952.js";const N={props:{src:{type:String,default:()=>a.image.src},mode:{type:String,default:()=>a.image.mode},width:{type:[String,Number],default:()=>a.image.width},height:{type:[String,Number],default:()=>a.image.height},shape:{type:String,default:()=>a.image.shape},radius:{type:[String,Number],default:()=>a.image.radius},lazyLoad:{type:Boolean,default:()=>a.image.lazyLoad},showMenuByLongpress:{type:Boolean,default:()=>a.image.showMenuByLongpress},loadingIcon:{type:String,default:()=>a.image.loadingIcon},errorIcon:{type:String,default:()=>a.image.errorIcon},showLoading:{type:Boolean,default:()=>a.image.showLoading},showError:{type:Boolean,default:()=>a.image.showError},fade:{type:Boolean,default:()=>a.image.fade},webp:{type:Boolean,default:()=>a.image.webp},duration:{type:[String,Number],default:()=>a.image.duration},bgColor:{type:String,default:()=>a.image.bgColor}}};const A=$({name:"u--image",mixins:[r,N,t],components:{uvImage:$({name:"u-image",mixins:[r,t,N],data(){return{isError:!1,loading:!0,opacity:1,durationTime:this.duration,backgroundStyle:{},show:!1}},watch:{src:{immediate:!0,handler(e){e?(this.isError=!1,this.loading=!0):this.isError=!0}}},computed:{wrapStyle(){let e={};return e.width=o(this.width),e.height=o(this.height),e.borderRadius="circle"==this.shape?"10000px":o(this.radius),e.overflow=this.radius>0?"hidden":"visible",s(e,l(this.customStyle))}},mounted(){this.show=!0},emits:["click","error","load"],methods:{addUnit:o,onClick(){this.$emit("click")},onErrorHandler(e){this.loading=!1,this.isError=!0,this.$emit("error",e)},onLoadHandler(e){this.loading=!1,this.isError=!1,this.$emit("load",e),this.removeBgColor()},removeBgColor(){this.backgroundStyle={backgroundColor:"transparent"}}}},[["render",function(e,a,r,t,o,s){const l=f,y=i(d("u-icon"),z),w=x,_=i(d("u-transition"),M);return n(),u(_,{mode:"fade",show:o.show,duration:e.fade?1e3:0},{default:c((()=>[p(w,{class:"u-image",onClick:s.onClick,style:h([s.wrapStyle,o.backgroundStyle])},{default:c((()=>[o.isError?m("v-if",!0):(n(),u(l,{key:0,src:e.src,mode:e.mode,onError:s.onErrorHandler,onLoad:s.onLoadHandler,"show-menu-by-longpress":e.showMenuByLongpress,"lazy-load":e.lazyLoad,class:"u-image__image",style:h({borderRadius:"circle"==e.shape?"10000px":s.addUnit(e.radius),width:s.addUnit(e.width),height:s.addUnit(e.height)})},null,8,["src","mode","onError","onLoad","show-menu-by-longpress","lazy-load","style"])),e.showLoading&&o.loading?(n(),u(w,{key:1,class:"u-image__loading",style:h({borderRadius:"circle"==e.shape?"50%":s.addUnit(e.radius),backgroundColor:this.bgColor,width:s.addUnit(e.width),height:s.addUnit(e.height)})},{default:c((()=>[g(e.$slots,"loading",{},(()=>[p(y,{name:e.loadingIcon,width:e.width,height:e.height},null,8,["name","width","height"])]),!0)])),_:3},8,["style"])):m("v-if",!0),e.showError&&o.isError&&!o.loading?(n(),u(w,{key:2,class:"u-image__error",style:h({borderRadius:"circle"==e.shape?"50%":s.addUnit(e.radius),width:s.addUnit(e.width),height:s.addUnit(e.height)})},{default:c((()=>[g(e.$slots,"error",{},(()=>[p(y,{name:e.errorIcon,width:e.width,height:e.height},null,8,["name","width","height"])]),!0)])),_:3},8,["style"])):m("v-if",!0)])),_:3},8,["onClick","style"])])),_:3},8,["show","duration"])}],["__scopeId","data-v-febc2405"]])},emits:["click","error","load"]},[["render",function(e,a,r,t,o,s){const l=y("uvImage");return n(),u(l,{src:e.src,mode:e.mode,width:e.width,height:e.height,shape:e.shape,radius:e.radius,lazyLoad:e.lazyLoad,showMenuByLongpress:e.showMenuByLongpress,loadingIcon:e.loadingIcon,errorIcon:e.errorIcon,showLoading:e.showLoading,showError:e.showError,fade:e.fade,webp:e.webp,duration:e.duration,bgColor:e.bgColor,customStyle:e.customStyle,onClick:a[0]||(a[0]=a=>e.$emit("click")),onError:a[1]||(a[1]=a=>e.$emit("error")),onLoad:a[2]||(a[2]=a=>e.$emit("load"))},{loading:c((()=>[g(e.$slots,"loading")])),error:c((()=>[g(e.$slots,"error")])),_:3},8,["src","mode","width","height","shape","radius","lazyLoad","showMenuByLongpress","loadingIcon","errorIcon","showLoading","showError","fade","webp","duration","bgColor","customStyle"])}]]),T=$(w({__name:"record",setup(a){const r=_(""),t=_([]),o=_([]),s=_(!1),{mescrollInit:l,downCallback:g,getMescroll:y}=F(S,L),w=e=>{s.value=!1;let a={page:e.num,limit:e.size,keyword:r.value,create_time:t.value};D(a).then((a=>{let r=a.data.data;1==e.num&&(o.value=[]),o.value=o.value.concat(r),e.endSuccess(r.length),s.value=!0})).catch((()=>{s.value=!0,e.endErr()}))},z=()=>{y().resetUpScroll()},M=_(),$=()=>{M.value.show=!0},N=e=>{t.value=e,o.value=[],y().resetUpScroll()};return(a,t)=>{const g=i(d("u-input"),e),y=E,_=x,L=f,S=i(d("u--image"),A);return n(),u(_,{class:"bg-[#f8f8f8] min-h-screen overflow-hidden",style:h(a.themeColor())},{default:c((()=>[p(_,{class:"fixed left-0 right-0 top-0 z-99 bg-[#fff] px-[var(--sidebar-m)]"},{default:c((()=>[p(_,{class:"py-[14rpx] flex items-center justify-between"},{default:c((()=>[p(_,{class:"flex-1 flex items-center h-[60rpx] bg-[#F8F9FD] rounded-[30rpx] px-[20rpx] mr-[30rpx]"},{default:c((()=>[p(g,{class:"flex-1",maxlength:"50",modelValue:r.value,"onUpdate:modelValue":t[0]||(t[0]=e=>r.value=e),onConfirm:t[1]||(t[1]=e=>z()),placeholder:"请输入搜索关键词",placeholderClass:"text-[#8288A2] text-[24rpx]",fontSize:"26rpx",clearable:"",border:"none"},null,8,["modelValue"]),p(y,{class:"nc-iconfont nc-icon-sousuo-duanV6xx1 text-[32rpx] ml-[18rpx] !text-[#999]",onClick:t[2]||(t[2]=e=>z())})])),_:1}),p(_,{class:"nc-iconfont nc-icon-riliV6xx !text-[30rpx] leading-[36rpx]",onClick:$})])),_:1})])),_:1}),p(V,{ref:"mescrollRef",top:"108rpx",onInit:C(l),down:{use:!1},onUp:w},{default:c((()=>[p(_,{class:"sidebar-marign"},{default:c((()=>[(n(!0),b(k,null,v(o.value,((e,a)=>(n(),u(_,{key:e.id,class:"w-full flex flex-col mb-[20rpx] card-template",onClick:a=>{B({url:"/app/pages/verify/detail",param:{code:e.code}})}},{default:c((()=>[p(_,{class:"flex items-center mb-[30rpx] leading-[1]"},{default:c((()=>[p(_,{class:"nc-iconfont nc-icon-hexiaotaiV6xx !text-[26rpx] pr-[10rpx]"}),p(y,{class:"truncate text-[#333333] text-[26rpx]"},{default:c((()=>[I("核销码:"+j(e.code),1)])),_:2},1024)])),_:2},1024),(n(!0),b(k,null,v(e.value.list,((e,a)=>(n(),u(_,{class:"flex flex-1",key:a},{default:c((()=>[p(S,{class:"rounded-[8rpx] overflow-hidden",width:"120rpx",height:"120rpx",src:C(U)(e.cover?e.cover:""),model:"aspectFill"},{error:c((()=>[p(L,{class:"w-[120rpx] h-[120rpx] rounded-[8rpx] overflow-hidden",src:C(U)("static/resource/images/diy/shop_default.jpg"),mode:"aspectFill"},null,8,["src"])])),_:2},1032,["src"]),p(_,{class:"flex flex-col flex-1 justify-between ml-[20rpx] py-[4rpx]"},{default:c((()=>[p(_,{class:"leading-[1.3] multi-hidden text-[28rpx] text-[#333]"},{default:c((()=>[I(j(e.name),1)])),_:2},1024),p(_,{class:"self-end text-[26rpx] mt-[10rpx] text-[#626779]"},{default:c((()=>[I("x1")])),_:1})])),_:2},1024)])),_:2},1024)))),128)),p(_,{class:"flex bg-[#F8F9FD] py-[20rpx] px-[20rpx] rounded-[12rpx] mt-[20rpx]"},{default:c((()=>[p(_,{class:"flex-1"},{default:c((()=>[p(_,{class:"text-[22rpx] text-[#8288A2] mb-[10rpx] leading-[30rpx]"},{default:c((()=>[I("核销时间")])),_:1}),p(_,{class:"text-[26rpx] text-[#333] leading-[36rpx]"},{default:c((()=>[I(j(e.create_time),1)])),_:2},1024)])),_:2},1024),p(_,{class:"flex-1"},{default:c((()=>[p(_,{class:"text-[22rpx] text-[#8288A2] mb-[10rpx] leading-[30rpx]"},{default:c((()=>[I("核销员")])),_:1}),p(_,{class:"text-[26rpx] text-[#333] leading-[36rpx]"},{default:c((()=>[I(j(e.member?e.member.nickname:"--"),1)])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:1}),!o.value.length&&s.value?(n(),u(_,{key:0,class:"mx-[30rpx] rounded-[16rpx] noData flex items-center justify-center"},{default:c((()=>[p(R,{option:{tip:"暂无核销记录"}})])),_:1})):m("v-if",!0)])),_:1},8,["onInit"]),m(" 时间选择 "),p(H,{ref_key:"selectDateRef",ref:M,onConfirm:N},null,512)])),_:1},8,["style"])}}}),[["__scopeId","data-v-3d56020b"]]);export{T as default};
|