12 |
- "use strict";(self["webpackChunkbyte_sailing_mobile"]=self["webpackChunkbyte_sailing_mobile"]||[]).push([[1950],{14071:function(e,t,l){l.d(t,{Z:function(){return p}});var n=l(13649),a=(l(64165),l(13813)),o=(l(55449),l(57658),l(73396)),i=l(44870),s=l(87139);const r={class:"common-list"},c={key:0,class:"left-box",style:{"margin-right":"20px"}},u=["onClick"],d=["onClick"];var f={__name:"common-list",props:{data:{type:Array,default:[]},config:{type:Object,default:[]},showMore:{type:Boolean,default:!0},isCheckbox:{type:Boolean,default:!1},optionalKey:{type:String,default:null}},setup(e){const t=(0,o.FN)().proxy;let l=(0,i.iH)([]),f=[];(0,o.YP)((()=>t.data),(e=>{l.value=e.map((e=>(f.length>0&&f.map((t=>{e.id==t.id&&(e.checked=!0)})),e)))}));const h=(0,i.iH)(null),p=()=>{f=[],l.value.map((e=>{e.checked&&(f.push(e),h.value||(h.value=e[t.optionalKey]))})),0==f.length&&(h.value=null),t.$emit("onCheck",f)},m=e=>{t.$emit("onClick",e)};return(t,f)=>{const g=a.XZ,v=n.JO;return(0,o.wg)(),(0,o.iD)("div",r,[(0,o._)("ul",null,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)((0,i.SU)(l),(t=>((0,o.wg)(),(0,o.iD)("li",{key:t.id},[e.isCheckbox?((0,o.wg)(),(0,o.iD)("div",c,[(0,o.Wm)(g,{modelValue:t.checked,"onUpdate:modelValue":e=>t.checked=e,"icon-size":"15px",shape:"square",onChange:p,disabled:!!h.value&&h.value!=t[e.optionalKey]},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(0,o.kq)("",!0),(0,o._)("div",{class:"center-content",style:{"line-height":"24px"},onClick:e=>m(t)},[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.config,(e=>((0,o.wg)(),(0,o.iD)("div",{key:e.prop},[(0,o._)("span",null,(0,s.zw)(e.label)+":",1),(0,o.Uk)((0,s.zw)(t[e.prop]),1)])))),128))],8,u),e.showMore?((0,o.wg)(),(0,o.iD)("div",{key:1,class:"more-box",onClick:e=>m(t)},[(0,o.Wm)(v,{name:"arrow"})],8,d)):(0,o.kq)("",!0)])))),128))])])}}};const h=f;var p=h},91950:function(e,t,l){l.r(t),l.d(t,{default:function(){return m}});var n=l(31441),a=(l(84035),l(55943)),o=(l(90563),l(80147)),i=(l(39292),l(39420)),s=(l(12097),l(57658),l(73396)),r=l(44870),c=l(14071),u=l(22483);const d={class:"list"};var f={__name:"index",setup(e){const t=(0,r.iH)(!1),l=((0,u.yj)(),(0,r.iH)({pageNum:1,type:"1",keyword:null})),f=(0,r.iH)(!1),h=(0,s.FN)().proxy,p=(0,r.iH)([]),m=(0,r.iH)([{label:"申购单号",prop:"subscribeCode"},{label:"物品名称",prop:"productName"},{label:"申购数量",prop:"count"}]),g=()=>{l.value.pageNum=1,f.value=!1,y("refresh")},v=()=>{y()},b=()=>h.$router.push("/main/working"),k=()=>{h.$router.push("/main/subscribeAdd")};h.uploadDdRightBtn(k,"发起申购");const x=e=>{h.$router.push({path:"subscribeAdd",query:{id:e.subcribeId}})},y=e=>{t.value=!0,h.post("/subscribeDetail/page",l.value).then((n=>{console.log(l.value),p.value="refresh"===e?n.data.rows:p.value.concat(n.data.rows),10*l.value.pageNum>=n.data.total&&(f.value=!0),l.value.pageNum++,t.value=!1})).catch((e=>{t.value=!1}))};return y(),(e,r)=>{const u=i.l2,h=o.ol,y=a.aV,w=n.I8;return(0,s.wg)(),(0,s.iD)(s.HY,null,[(0,s.Wm)(u,{title:"申购","left-text":"","left-arrow":"",onClickLeft:b,onClickRight:k},{right:(0,s.w5)((()=>[(0,s.Uk)(" 发起申购 ")])),_:1}),(0,s.Wm)(h,{modelValue:l.value.keyword,"onUpdate:modelValue":r[0]||(r[0]=e=>l.value.keyword=e),placeholder:e.$t("common.pleaseEnterKeywords"),onSearch:g},null,8,["modelValue","placeholder"]),(0,s.Wm)(w,{modelValue:t.value,"onUpdate:modelValue":r[2]||(r[2]=e=>t.value=e),onRefresh:g},{default:(0,s.w5)((()=>[(0,s._)("div",d,[(0,s.Wm)(y,{loading:t.value,"onUpdate:loading":r[1]||(r[1]=e=>t.value=e),finished:f.value,"finished-text":e.$t("common.noMore"),onLoad:v,style:{"margin-bottom":"60px"}},{default:(0,s.w5)((()=>[(0,s.Wm)(c.Z,{data:p.value,onOnClick:x,config:m.value},null,8,["data","config"])])),_:1},8,["loading","finished","finished-text"])])])),_:1},8,["modelValue"])],64)}}},h=l(40089);const p=(0,h.Z)(f,[["__scopeId","data-v-60d33582"]]);var m=p},34373:function(e,t,l){l.d(t,{J:function(){return c}});var n=l(73396),a=l(253),o=l(44870),i=l(47936),s=l(10648);const r=(e,t)=>{const l=(0,o.iH)(),r=()=>{l.value=(0,a.EL)(e).height};return(0,n.bv)((()=>{if((0,n.Y3)(r),t)for(let e=1;e<=3;e++)setTimeout(r,100*e)})),(0,s.h)((()=>(0,n.Y3)(r))),(0,n.YP)([i.bn,i.uK],r),l};function c(e,t){const l=r(e,!0);return e=>(0,n.Wm)("div",{class:t("placeholder"),style:{height:l.value?`${l.value}px`:void 0}},[e()])}},92220:function(e,t,l){l.d(t,{a:function(){return a},d:function(){return o}});var n=l(73396);const a=Symbol(),o=()=>(0,n.f3)(a,null)},64165:function(e,t,l){l(31958),l(20368),l(56742)},55943:function(e,t,l){l.d(t,{aV:function(){return b}});var n=l(11404),a=l(73396),o=l(44870),i=l(610),s=l(5323),r=l(47936),c=l(253),u=l(3444),d=l(92220),f=l(12229);const[h,p,m]=(0,i["do"])("list"),g={error:Boolean,offset:(0,s.SI)(300),loading:Boolean,disabled:Boolean,finished:Boolean,errorText:String,direction:(0,s.SQ)("down"),loadingText:String,finishedText:String,immediateCheck:s.J5};var v=(0,a.aZ)({name:h,props:g,emits:["load","update:error","update:loading"],setup(e,{emit:t,slots:l}){const n=(0,o.iH)(e.loading),i=(0,o.iH)(),s=(0,o.iH)(),h=(0,d.d)(),g=(0,c.eo)(i),v=()=>{(0,a.Y3)((()=>{if(n.value||e.finished||e.disabled||e.error||!1===(null==h?void 0:h.value))return;const{direction:l}=e,a=+e.offset,o=(0,c.EL)(g);if(!o.height||(0,r.xj)(i))return;let u=!1;const d=(0,c.EL)(s);u="up"===l?o.top-d.top<=a:d.bottom-o.bottom<=a,u&&(n.value=!0,t("update:loading",!0),t("load"))}))},b=()=>{if(e.finished){const t=l.finished?l.finished():e.finishedText;if(t)return(0,a.Wm)("div",{class:p("finished-text")},[t])}},k=()=>{t("update:error",!1),v()},x=()=>{if(e.error){const t=l.error?l.error():e.errorText;if(t)return(0,a.Wm)("div",{role:"button",class:p("error-text"),tabindex:0,onClick:k},[t])}},y=()=>{if(n.value&&!e.finished&&!e.disabled)return(0,a.Wm)("div",{class:p("loading")},[l.loading?l.loading():(0,a.Wm)(f.gb,{class:p("loading-icon")},{default:()=>[e.loadingText||m("loading")]})])};return(0,a.YP)((()=>[e.loading,e.finished,e.error]),v),h&&(0,a.YP)(h,(e=>{e&&v()})),(0,a.ic)((()=>{n.value=e.loading})),(0,a.bv)((()=>{e.immediateCheck&&v()})),(0,u.F)({check:v}),(0,c.OR)("scroll",v,{target:g,passive:!0}),()=>{var t;const o=null==(t=l.default)?void 0:t.call(l),r=(0,a.Wm)("div",{ref:s,class:p("placeholder")},null);return(0,a.Wm)("div",{ref:i,role:"feed",class:p(),"aria-busy":n.value},["down"===e.direction?o:r,y(),b(),x(),"up"===e.direction?o:r])}}});const b=(0,n.n)(v)},90563:function(e,t,l){l(31958),l(62939)},39420:function(e,t,l){l.d(t,{l2:function(){return g}});var n=l(11404),a=l(73396),o=l(44870),i=l(610),s=l(5323),r=l(96048),c=l(25322),u=l(34373),d=l(13649);const[f,h]=(0,i["do"])("nav-bar"),p={title:String,fixed:Boolean,zIndex:s.Or,border:s.J5,leftText:String,rightText:String,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean,clickable:s.J5};var m=(0,a.aZ)({name:f,props:p,emits:["clickLeft","clickRight"],setup(e,{emit:t,slots:l}){const n=(0,o.iH)(),i=(0,u.J)(n,h),s=e=>t("clickLeft",e),f=e=>t("clickRight",e),p=()=>l.left?l.left():[e.leftArrow&&(0,a.Wm)(d.JO,{class:h("arrow"),name:"arrow-left"},null),e.leftText&&(0,a.Wm)("span",{class:h("text")},[e.leftText])],m=()=>l.right?l.right():(0,a.Wm)("span",{class:h("text")},[e.rightText]),g=()=>{const{title:t,fixed:o,border:i,zIndex:u}=e,d=(0,r.As)(u),g=e.leftArrow||e.leftText||l.left,v=e.rightText||l.right;return(0,a.Wm)("div",{ref:n,style:d,class:[h({fixed:o}),{[c.xe]:i,"van-safe-area-top":e.safeAreaInsetTop}]},[(0,a.Wm)("div",{class:h("content")},[g&&(0,a.Wm)("div",{class:[h("left"),e.clickable?c.e9:""],onClick:s},[p()]),(0,a.Wm)("div",{class:[h("title"),"van-ellipsis"]},[l.title?l.title():t]),v&&(0,a.Wm)("div",{class:[h("right"),e.clickable?c.e9:""],onClick:f},[m()])])])};return()=>e.fixed&&e.placeholder?i(g):g()}});const g=(0,n.n)(m)},12097:function(e,t,l){l(31958),l(20368),l(56742)},31441:function(e,t,l){l.d(t,{I8:function(){return k}});var n=l(11404),a=(l(57658),l(73396)),o=l(44870),i=l(610),s=l(5323),r=l(47936),c=l(253),u=l(65261),d=l(12229);const[f,h,p]=(0,i["do"])("pull-refresh"),m=50,g=["pulling","loosing","success"],v={disabled:Boolean,modelValue:Boolean,headHeight:(0,s.SI)(m),successText:String,pullingText:String,loosingText:String,loadingText:String,pullDistance:s.Or,successDuration:(0,s.SI)(500),animationDuration:(0,s.SI)(300)};var b=(0,a.aZ)({name:f,props:v,emits:["change","refresh","update:modelValue"],setup(e,{emit:t,slots:l}){let n;const i=(0,o.iH)(),s=(0,o.iH)(),f=(0,c.eo)(i),v=(0,o.qj)({status:"normal",distance:0,duration:0}),b=(0,u.o)(),k=()=>{if(e.headHeight!==m)return{height:`${e.headHeight}px`}},x=()=>"loading"!==v.status&&"success"!==v.status&&!e.disabled,y=t=>{const l=+(e.pullDistance||e.headHeight);return t>l&&(t=t<2*l?l+(t-l)/2:1.5*l+(t-2*l)/4),Math.round(t)},w=(l,n)=>{const a=+(e.pullDistance||e.headHeight);v.distance=l,v.status=n?"loading":0===l?"normal":l<a?"pulling":"loosing",t("change",{status:v.status,distance:l})},W=()=>{const{status:t}=v;return"normal"===t?"":e[`${t}Text`]||p(t)},T=()=>{const{status:e,distance:t}=v;if(l[e])return l[e]({distance:t});const n=[];return g.includes(e)&&n.push((0,a.Wm)("div",{class:h("text")},[W()])),"loading"===e&&n.push((0,a.Wm)(d.gb,{class:h("loading")},{default:W})),n},C=()=>{v.status="success",setTimeout((()=>{w(0)}),+e.successDuration)},H=e=>{n=0===(0,r.cx)(f.value),n&&(v.duration=0,b.start(e))},S=e=>{x()&&H(e)},I=e=>{if(x()){n||H(e);const{deltaY:t}=b;b.move(e),n&&t.value>=0&&b.isVertical()&&((0,r.PF)(e),w(y(t.value)))}},V=()=>{n&&b.deltaY.value&&x()&&(v.duration=+e.animationDuration,"loosing"===v.status?(w(+e.headHeight,!0),t("update:modelValue",!0),(0,a.Y3)((()=>t("refresh")))):w(0))};return(0,a.YP)((()=>e.modelValue),(t=>{v.duration=+e.animationDuration,t?w(+e.headHeight,!0):l.success||e.successText?C():w(0,!1)})),(0,c.OR)("touchmove",I,{target:s}),()=>{var e;const t={transitionDuration:`${v.duration}ms`,transform:v.distance?`translate3d(0,${v.distance}px, 0)`:""};return(0,a.Wm)("div",{ref:i,class:h()},[(0,a.Wm)("div",{ref:s,class:h("track"),style:t,onTouchstartPassive:S,onTouchend:V,onTouchcancel:V},[(0,a.Wm)("div",{class:h("head"),style:k()},[T()]),null==(e=l.default)?void 0:e.call(l)])])}}});const k=(0,n.n)(b)},84035:function(e,t,l){l(31958),l(62939)},80147:function(e,t,l){l.d(t,{ol:function(){return k}});var n=l(11404),a=l(73396),o=l(44870),i=l(610),s=l(12220),r=l(5323),c=l(47936),u=l(36817),d=l(96401),f=l(3444),h=l(43739);const[p,m,g]=(0,i["do"])("search"),v=(0,s.l7)({},u.Mv,{label:String,shape:(0,r.SQ)("square"),leftIcon:(0,r.SQ)("search"),clearable:r.J5,actionText:String,background:String,showAction:Boolean});var b=(0,a.aZ)({name:p,props:v,emits:["blur","focus","clear","search","cancel","clickInput","clickLeftIcon","clickRightIcon","update:modelValue"],setup(e,{emit:t,slots:l,attrs:n}){const i=(0,d.M)(),r=(0,o.iH)(),p=()=>{l.action||(t("update:modelValue",""),t("cancel"))},v=l=>{const n=13;l.keyCode===n&&((0,c.PF)(l),t("search",e.modelValue))},b=()=>e.id||`${i}-input`,k=()=>{if(l.label||e.label)return(0,a.Wm)("label",{class:m("label"),for:b()},[l.label?l.label():e.label])},x=()=>{if(e.showAction){const t=e.actionText||g("cancel");return(0,a.Wm)("div",{class:m("action"),role:"button",tabindex:0,onClick:p},[l.action?l.action():t])}},y=()=>{var e;return null==(e=r.value)?void 0:e.blur()},w=()=>{var e;return null==(e=r.value)?void 0:e.focus()},W=e=>t("blur",e),T=e=>t("focus",e),C=e=>t("clear",e),H=e=>t("clickInput",e),S=e=>t("clickLeftIcon",e),I=e=>t("clickRightIcon",e),V=Object.keys(u.Mv),D=()=>{const o=(0,s.l7)({},n,(0,s.ei)(e,V),{id:b()}),i=e=>t("update:modelValue",e);return(0,a.Wm)(h.gN,(0,a.dG)({ref:r,type:"search",class:m("field"),border:!1,onBlur:W,onFocus:T,onClear:C,onKeypress:v,onClickInput:H,onClickLeftIcon:S,onClickRightIcon:I,"onUpdate:modelValue":i},o),(0,s.ei)(l,["left-icon","right-icon"]))};return(0,f.F)({focus:w,blur:y}),()=>{var t;return(0,a.Wm)("div",{class:m({"show-action":e.showAction}),style:{background:e.background}},[null==(t=l.left)?void 0:t.call(l),(0,a.Wm)("div",{class:m("content",e.shape)},[k(),D()]),x()])}}});const k=(0,n.n)(b)},39292:function(e,t,l){l(31958),l(20368),l(56742),l(3094),l(67984)}}]);
- //# sourceMappingURL=1950.7ae11847.js.map
|