2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
|
import{V as se,W as de,w as ue,k as v,o as w,m as A,a2 as ie,L as pe,e as n,a3 as me,a4 as fe,a5 as ce,T as R,_ as ge,a as be,r as u,C as j,J as he,G as ye,c as k,H as z,I as G,f as a,d as l,p as T,q as h,t as f,n as $,D as J,B as _e,h as ve,v as we,x as Se}from"./index.R3qQMktZ.js";/* empty css */import{C as Ve}from"./index.DU8FQYf7.js";import{_ as Ce}from"./index.DHAs7v_T.js";/* empty css */const Q={__name:"index",props:se({modelValue:{type:[Number,String],default:""},max:{type:[Number,String],default:""},digit:{type:[Number,String],default:0},type:{type:String,default:"number"},minus:{type:Boolean,default:!1},isCalculable:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(m){const s=m,y=de(m,"modelValue"),I=(o,p=0,d=!1)=>{if(o=o+"",o=d?o.replace(/[^-?\d+(\.\d+)?]/g,""):o.replace(/[^\d.]/g,""),o=="."&&(o=""),p&&p>0)switch(o=o.replace(/\.{2,}/g,"."),+p){case 4:o=o.replace(/^(\-)*(\d+)\.(\d{1,4}).*$/,"$1$2.$3");break;default:o=o.replace(/^(\-)*(\d+)\.(\d{1,2}).*$/,"$1$2.$3");break}else o=o.replace(/\./g,"");return o.substring(0,1)=="-"&&o.substring(1,3)=="00"&&(o="-0"),o.substring(0,1)==0?o.substring(1,2)>0?o=o.substring(1,2):(o.substring(1,2)===0||o.substring(1,2)==="0")&&(o="0"):o.indexOf(".")!==-1&&o.substring(0,1)<=0&&o.substring(2,3)<=0&&(o="0."),o},O=o=>{let p=o;s.max!==""&&+o>+s.max&&(p=s.max),p=I(p,s.digit,s.minus),y.value=p};return ue(()=>s.modelValue,o=>{s.isCalculable&&(s.minus?/^-?\d+(\.\d+)?$/:/^\d+(\.\d+)?$/).test(o)&&(y.value=s.digit==0?Math.floor(o):I(o,s.digit,s.minus))}),(o,p)=>{const d=v("el-input");return w(),A(d,{modelValue:y.value,"onUpdate:modelValue":p[0]||(p[0]=D=>y.value=D),onInput:O},ie({_:2},[pe(o.$slots,(D,q)=>({name:q,fn:n(S=>[me(o.$slots,q,fe(ce(S)))])}))]),1032,["modelValue"])}}};function ke(m){return R({url:"/super/platform/list",method:"get",params:m})}function $e(m){return R({url:"/super/platform/update",method:"post",data:m})}function Ue(m){return R({url:"/super/platform/"+m,method:"get"})}function Ie(m){return R({url:"/super/platform/switch",method:"post",data:m})}function Pe(m){return R({url:"/super/common/platform/show/select",method:"get",params:m})}function Ne(m){return R({url:"/super/platform/currency/update",method:"post",data:m})}const Me=m=>(we("data-v-c25d67cd"),m=m(),Se(),m),Re={class:"app-container"},Te={key:0},De={key:1},qe={style:{width:"100%"}},Ae={style:{width:"100%"}},Oe=Me(()=>$("div",{style:{height:"20px"}},null,-1)),Be={class:"dialog-footer"},Le={style:{width:"100%","text-align":"center"}},je={key:0,class:"label-scoreRatio"},ze={style:{"margin-right":"320px"}},Ee={key:0,style:{display:"flex","align-items":"center"}},Fe={key:1},He={key:0,style:{display:"flex","align-items":"center"}},Ge={key:1},Je={class:"dialog-footer"},Qe=_e({name:"Agent"}),We=Object.assign(Qe,{setup(m){be();const{proxy:s}=ve();s.useDict("ff_tenant_type","ff_tenant_status");const y=u([]);u(!1);const I=u(!0),O=u(!0);u([]),u(!0),u(!0);const o=u(0);u("");const p=u(!1);u(!1),u(""),u([]);const d=j({}),D=j({}),q=j({form:{},queryParams:{pageNum:1,pageSize:10,tenantKey:""},rules:{account:[{required:!0,message:s.t("商户账号不能为空"),trigger:"blur"}],password:[{required:!0,message:s.t("密码不能为空"),trigger:"blur"}],scoreRatio:[{required:!0,message:s.t("买分比例不能为空"),trigger:"blur"}],tenantType:[{required:!0,message:s.t("商户模式不能为空"),trigger:"change"}]}}),{queryParams:S,form:Ye,rules:xe}=he(q);function P(){I.value=!0,ke(S.value).then(e=>{const b=e.rows.flatMap(c=>c.superPlatformManufacturers.map(g=>({platformShowCode:c.platformShowCode,id:g.id,platformManufacturerName:g.platformManufacturerName,platformShowCode:g.platformShowCode,stopStatus:g.stopStatus,tenantSystemPlatformDTOS:g.tenantSystemPlatformDTOS})));y.value=b,o.value=e.total,I.value=!1})}const W=({row:e,column:r,rowIndex:b,columnIndex:c})=>{if(c===0)if(b===0){let g=1;for(let i=b+1;i<y.value.length&&y.value[i].platformShowCode===e.platformShow
|