mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-06 13:08:10 +00:00
2 lines
9.0 KiB
JavaScript
2 lines
9.0 KiB
JavaScript
import{Y as e,Z as a,_ as t,$ as r,a0 as o,a1 as s,g as l,h as i,o as n,c as d,w as c,b as u,n as p,f as h,a4 as m,B as g,i as x,b0 as f,d as y,r as w,p as v,A as _,P as b,ai as k,Q as C,u as L,aj as S,ak as E,D as I,ag as B,y as j,z as U,bY as z,E as $,a as M}from"./index-9df77e4b.js";import{_ as V}from"./u-icon.fd6d3072.js";import{_ as R}from"./u-transition.98346da9.js";import{_ as H}from"./_plugin-vue_export-helper.1b428a4d.js";import{u as N,M as D}from"./useMescroll.1209fb5f.js";import{M as F}from"./mescroll-empty.cbe84e6c.js";import{c as Y}from"./verify.16eb914e.js";import{s as A}from"./select-date.ffcc9287.js";import"./mescroll-i18n.5a05c2ae.js";import"./u-popup.7e115191.js";const P={props:{src:{type:String,default:()=>e.image.src},mode:{type:String,default:()=>e.image.mode},width:{type:[String,Number],default:()=>e.image.width},height:{type:[String,Number],default:()=>e.image.height},shape:{type:String,default:()=>e.image.shape},radius:{type:[String,Number],default:()=>e.image.radius},lazyLoad:{type:Boolean,default:()=>e.image.lazyLoad},showMenuByLongpress:{type:Boolean,default:()=>e.image.showMenuByLongpress},loadingIcon:{type:String,default:()=>e.image.loadingIcon},errorIcon:{type:String,default:()=>e.image.errorIcon},showLoading:{type:Boolean,default:()=>e.image.showLoading},showError:{type:Boolean,default:()=>e.image.showError},fade:{type:Boolean,default:()=>e.image.fade},webp:{type:Boolean,default:()=>e.image.webp},duration:{type:[String,Number],default:()=>e.image.duration},bgColor:{type:String,default:()=>e.image.bgColor}}};const Q=H({name:"u--image",mixins:[a,P,t],components:{uvImage:H({name:"u-image",mixins:[a,t,P],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=r(this.width),e.height=r(this.height),e.borderRadius="circle"==this.shape?"10000px":r(this.radius),e.overflow=this.radius>0?"hidden":"visible",o(e,s(this.customStyle))}},mounted(){this.show=!0},emits:["click","error","load"],methods:{addUnit:r,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,t,r,o,s){const f=g,y=l(i("u-icon"),V),w=x,v=l(i("u-transition"),R);return n(),d(v,{mode:"fade",show:o.show,duration:e.fade?1e3:0},{default:c((()=>[u(w,{class:"u-image",onClick:s.onClick,style:p([s.wrapStyle,o.backgroundStyle])},{default:c((()=>[o.isError?h("v-if",!0):(n(),d(f,{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:p({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(),d(w,{key:1,class:"u-image__loading",style:p({borderRadius:"circle"==e.shape?"50%":s.addUnit(e.radius),backgroundColor:this.bgColor,width:s.addUnit(e.width),height:s.addUnit(e.height)})},{default:c((()=>[m(e.$slots,"loading",{},(()=>[u(y,{name:e.loadingIcon,width:e.width,height:e.height},null,8,["name","width","height"])]),!0)])),_:3},8,["style"])):h("v-if",!0),e.showError&&o.isError&&!o.loading?(n(),d(w,{key:2,class:"u-image__error",style:p({borderRadius:"circle"==e.shape?"50%":s.addUnit(e.radius),width:s.addUnit(e.width),height:s.addUnit(e.height)})},{default:c((()=>[m(e.$slots,"error",{},(()=>[u(y,{name:e.errorIcon,width:e.width,height:e.height},null,8,["name","width","height"])]),!0)])),_:3},8,["style"])):h("v-if",!0)])),_:3},8,["onClick","style"])])),_:3},8,["show","duration"])}],["__scopeId","data-v-febc2405"]])},emits:["click","error","load"]},[["render",function(e,a,t,r,o,s){const l=f("uvImage");return n(),d(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((()=>[m(e.$slots,"loading")])),error:c((()=>[m(e.$slots,"error")])),_:3},8,["src","mode","width","height","shape","radius","lazyLoad","showMenuByLongpress","loadingIcon","errorIcon","showLoading","showError","fade","webp","duration","bgColor","customStyle"])}]]),T=H(y({__name:"record",setup(e){const a=w(""),t=w([]),r=w([]),o=w(!1),{mescrollInit:s,downCallback:m,getMescroll:f}=N(E,S);w(null),v((()=>{}));const y=e=>{o.value=!1;let s={page:e.num,limit:e.size,keyword:a.value,create_time:t.value};Y(s).then((a=>{let t=a.data.data;1==e.num&&(r.value=[]),r.value=r.value.concat(t),e.endSuccess(t.length),o.value=!0})).catch((()=>{o.value=!0,e.endErr()}))},V=()=>{f().resetUpScroll()},R=w(),H=()=>{R.value.show=!0},P=e=>{t.value=e,r.value=[],f().resetUpScroll()};return(e,t)=>{const m=I,f=B,w=x,v=g,S=l(i("u--image"),Q);return n(),d(w,{class:"bg-[var(--page-bg-color)] min-h-screen overflow-hidden",style:p(e.themeColor())},{default:c((()=>[u(w,{class:"fixed left-0 right-0 top-0 z-99 bg-[#fff]"},{default:c((()=>[u(w,{class:"py-[14rpx] flex items-center justify-between px-[20rpx]"},{default:c((()=>[u(w,{class:"flex-1 search-input mr-[20rpx]"},{default:c((()=>[u(m,{onClick:t[0]||(t[0]=_((e=>V()),["stop"])),class:"nc-iconfont nc-icon-sousuo-duanV6xx1 btn"}),u(f,{class:"input",maxlength:"50",type:"text",modelValue:a.value,"onUpdate:modelValue":t[1]||(t[1]=e=>a.value=e),placeholder:"请输入搜索关键词",placeholderClass:"text-[var(--text-color-light9)] text-[24rpx]","confirm-type":"search",onConfirm:t[2]||(t[2]=e=>V())},null,8,["modelValue"]),a.value?(n(),d(m,{key:0,class:"nc-iconfont nc-icon-cuohaoV6xx1 clear",onClick:t[3]||(t[3]=e=>a.value="")})):h("v-if",!0)])),_:1}),u(w,{class:"nc-iconfont nc-icon-a-riliV6xx-36 !text-[30rpx] leading-[36rpx] text-[var(--text-color-light6)]",onClick:H})])),_:1})])),_:1}),u(D,{ref:"mescrollRef",top:"88rpx",onInit:L(s),down:{use:!1},onUp:y},{default:c((()=>[r.value.length?(n(),d(w,{key:0,class:"sidebar-margin pt-[var(--top-m)]"},{default:c((()=>[(n(!0),b(C,null,k(r.value,((e,a)=>(n(),d(w,{key:e.id,class:"w-full flex flex-col mb-[var(--top-m)] card-template",onClick:a=>{M({url:"/app/pages/verify/detail",param:{code:e.code}})}},{default:c((()=>[u(w,{class:"flex items-center mb-[30rpx] leading-[1] text-[26rpx]"},{default:c((()=>[u(w,{class:"nc-iconfont nc-icon-hexiaotaiV6xx !text-[26rpx] pr-[10rpx]"}),u(m,{class:"truncate text-[#303133] text-[26rpx]"},{default:c((()=>[j("核销码:")])),_:1}),u(m,{class:"ml-[10rpx] max-w-[494rpx]"},{default:c((()=>[j(U(e.code),1)])),_:2},1024),u(m,{class:"text-[#303133] text-[26rpx] font-400 nc-iconfont nc-icon-fuzhiV6xx1 ml-[11rpx]",onClick:_((a=>L(z)(e.code)),["stop"])},null,8,["onClick"])])),_:2},1024),(n(!0),b(C,null,k(e.value.list,((a,t)=>(n(),d(w,{class:"flex flex-1",key:t},{default:c((()=>[u(S,{width:"130rpx",height:"130rpx",radius:"var(--goods-rounded-big)",src:L($)(a.cover?a.cover:""),mode:"aspectFill"},{error:c((()=>[u(v,{class:"w-[130rpx] h-[130rpx] rounded-[var(--goods-rounded-big)] overflow-hidden",src:L($)("static/resource/images/diy/shop_default.jpg"),mode:"aspectFill"},null,8,["src"])])),_:2},1032,["radius","src"]),u(w,{class:"flex flex-col flex-1 ml-[20rpx] py-[4rpx]"},{default:c((()=>[u(w,{class:"max-w-[490rpx] leading-[1.3] truncate text-[28rpx] text-[#303133]"},{default:c((()=>[j(U(a.name),1)])),_:2},1024),e.sub_name?(n(),d(w,{key:0,class:"mt-[14rpx] truncate text-[24rpx] text-[var(--text-color-light9)] max-w-[490rpx]"},{default:c((()=>[j(U(e.sub_name),1)])),_:2},1024)):h("v-if",!0),u(w,{class:"text-[24rpx] mt-[10rpx] text-[var(--text-color-light9)]"},{default:c((()=>[j("x1")])),_:1})])),_:2},1024)])),_:2},1024)))),128)),u(w,{class:"flex bg-[var(--temp-bg)] py-[20rpx] px-[20rpx] rounded-[12rpx] mt-[20rpx]"},{default:c((()=>[u(w,{class:"flex-1"},{default:c((()=>[u(w,{class:"text-[22rpx] text-[var(--text-color-light9)] mb-[10rpx] leading-[30rpx]"},{default:c((()=>[j("核销时间")])),_:1}),u(w,{class:"text-[26rpx] text-[#303133] leading-[36rpx]"},{default:c((()=>[j(U(e.create_time),1)])),_:2},1024)])),_:2},1024),u(w,{class:"flex-1"},{default:c((()=>[u(w,{class:"text-[22rpx] text-[var(--text-color-light9)] mb-[10rpx] leading-[30rpx]"},{default:c((()=>[j("核销员")])),_:1}),u(w,{class:"text-[26rpx] text-[#303133] leading-[36rpx]"},{default:c((()=>[j(U(e.member?e.member.nickname:"--"),1)])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:1})):h("v-if",!0),!r.value.length&&o.value?(n(),d(F,{key:1,option:{tip:"暂无核销记录"}})):h("v-if",!0)])),_:1},8,["onInit"]),h(" 时间选择 "),u(A,{ref_key:"selectDateRef",ref:R,onConfirm:P},null,512)])),_:1},8,["style"])}}}),[["__scopeId","data-v-09e2c9a3"]]);export{T as default};
|