1 |
- import{aA as P,d as R,P as T,r as m,e as U,x as W,o as v,C as h,A as t,f as r,a,D as n,k as Z,c as A,F as w,a2 as q,a9 as G,V as H,W as K,J as L,Z as X,_ as Y,__tla as $}from"./index-0b2503c4.js";import{_ as ee,__tla as ae}from"./Dialog-3207cd36.js";import{_ as re,__tla as oe}from"./Tooltip-75ff5ac9.js";import{u as te,__tla as le}from"./useMessage-d05433ee.js";let b,f,O,se=Promise.all([(()=>{try{return $}catch{}})(),(()=>{try{return ae}catch{}})(),(()=>{try{return oe}catch{}})(),(()=>{try{return le}catch{}})()]).then(async()=>{f={getOrderPercentagePage:async d=>await P.get({url:"/distri/order-percentage/page",params:d}),getOrderPercentage:async d=>await P.get({url:"/distri/order-percentage/get?id="+d}),createOrderPercentage:async d=>await P.post({url:"/distri/order-percentage/create",data:d}),updateOrderPercentage:async d=>await P.put({url:"/distri/order-percentage/update",data:d}),deleteOrderPercentage:async d=>await P.delete({url:"/distri/order-percentage/delete?id="+d}),exportOrderPercentage:async d=>await P.download({url:"/distri/order-percentage/export-excel",params:d})},b=Y(R({name:"OrderPercentageForm",__name:"OrderPercentageForm",emits:["success"],setup(d,{expose:x,emit:I}){const{t:y}=T(),S=te(),g=m(!1),B=m("\u7F16\u8F91"),p=m(!1),_=m(""),e=m({id:void 0,grossProfitPerc:void 0,grossProfitUserQuotaPerc:void 0,grossProfitAncestorQuotaPerc:void 0,grossProfitBonusQuotaPerc:void 0,grossProfitPlatformQuotaPerc:void 0,divideIntoPerc:void 0,orderUserSocialStatus:void 0,orderAncestorSocialStatus:void 0,registerSocialStatus:void 0,registerAncestorSocialStatus:void 0,collectSocialStatus:void 0,signInSocialStatus:void 0,signInSocialStatusMax:void 0}),F=U(()=>Number(e.value.grossProfitUserQuotaPerc)+Number(e.value.grossProfitAncestorQuotaPerc)+Number(e.value.grossProfitBonusQuotaPerc)+Number(e.value.grossProfitPlatformQuotaPerc)),k=U(()=>F.value>100),M=W({}),V=m();x({open:async(c,o)=>{if(g.value=!0,_.value=c,j(),o){p.value=!0;try{e.value=await f.getOrderPercentage(o)}finally{p.value=!1}Q.forEach(i=>{e.value.hasOwnProperty(i)&&(e.value[i]=100*e.value[i])})}}});const Q=["grossProfitPerc","grossProfitUserQuotaPerc","grossProfitAncestorQuotaPerc","grossProfitBonusQuotaPerc","grossProfitPlatformQuotaPerc","divideIntoPerc"],N=I,z=async()=>{if(Q.forEach(c=>{e.value.hasOwnProperty(c)&&(e.value[c]=(e.value[c]/100).toFixed(4))}),k.value)S.error("\u7528\u6237\u81EA\u5F97+\u76F4\u63A8\u5956+\u5408\u8D62\u5956+\u5E73\u53F0\u670D\u52A1\u8D39,\u603B\u548C\u4E0D\u80FD\u8D85\u8FC7100");else{await V.value.validate(),p.value=!0;try{const c=e.value;_.value==="create"?(await f.createOrderPercentage(c),S.success(y("common.createSuccess"))):(await f.updateOrderPercentage(c),S.success(y("common.updateSuccess"))),g.value=!1,N("success")}finally{p.value=!1}}},j=()=>{var c;e.value={id:void 0,grossProfitPerc:void 0,grossProfitUserQuotaPerc:void 0,grossProfitAncestorQuotaPerc:void 0,grossProfitBonusQuotaPerc:void 0,grossProfitPlatformQuotaPerc:void 0,divideIntoPerc:void 0},(c=V.value)==null||c.resetFields()};return(c,o)=>{const i=re,s=G,u=H,C=K,D=L,E=ee,J=X;return v(),h(E,{title:a(B),modelValue:a(g),"onUpdate:modelValue":o[13]||(o[13]=l=>q(g)?g.value=l:null)},{footer:t(()=>[r(D,{onClick:z,type:"primary",disabled:a(p)},{default:t(()=>[n("\u786E \u5B9A")]),_:1},8,["disabled"])]),default:t(()=>[Z((v(),h(C,{ref_key:"formRef",ref:V,model:a(e),rules:a(M),"label-width":"100px"},{default:t(()=>[a(_)=="update1"?(v(),A(w,{key:0},[r(u,{label:"\u6BDB\u5229\u767E\u5206\u6BD4",prop:"grossProfitPerc"},{label:t(()=>[r(i,{message:"\u4F8B(0.3888)",title:"\u6BDB\u5229"})]),default:t(()=>[r(s,{modelValue:a(e).grossProfitPerc,"onUpdate:modelValue":o[0]||(o[0]=l=>a(e).grossProfitPerc=l),placeholder:"\u8BF7\u8F93\u5165\u6BDB\u5229\u767E\u5206\u6BD4"},{append:t(()=>[n("%")]),_:1},8,["modelValue"])]),_:1}),r(u,{label:"\u7528\u6237\u81EA\u5F97",prop:"grossProfitUserQuotaPerc"},{label:t(()=>[r(i,{message:"\u4F8B(35),\u7528\u6237\u81EA\u5F97+\u76F4\u63A8\u5956+\u5408\u8D62\u5956+\u5E73\u53F0\u670D\u52A1\u8D39,\u603B\u548C\u4E0D\u80FD\u8D85\u8FC7100",title:"\u7528\u6237\u81EA\u5F97"})]),default:t(()=>[r(s,{modelValue:a(e).grossProfitUserQuotaPerc,"onUpdate:modelValue":o[1]||(o[1]=l=>a(e).grossProfitUserQuotaPerc=l),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u81EA\u5F97"},{append:t(()=>[n("%")]),_:1},8,["modelValue"])]),_:1}),r(u,{label:"\u76F4\u63A8\u5956",prop:"grossProfitAncestorQuotaPerc"},{label:t(()=>[r(i,{message:"\u4F8B(35),\u7528\u6237\u81EA\u5F97+\u76F4\u63A8\u5956+\u5408\u8D62\u5956+\u5E73\u53F0\u670D\u52A1\u8D39,\u603B\u548C\u4E0D\u80FD\u8D85\u8FC7100",title:"\u76F4\u63A8\u5956"})]),default:t(()=>[r(s,{modelValue:a(e).grossProfitAncestorQuotaPerc,"onUpdate:modelValue":o[2]||(o[2]=l=>a(e).grossProfitAncestorQuotaPerc=l),placeholder:"\u8BF7\u8F93\u5165\u76F4\u63A8\u5956"},{append:t(()=>[n("%")]),_:1},8,["modelValue"])]),_:1}),r(u,{label:"\u5408\u8D62\u5956",prop:"grossProfitBonusQuotaPerc"},{label:t(()=>[r(i,{message:"\u4F8B(22),\u7528\u6237\u81EA\u5F97+\u76F4\u63A8\u5956+\u5408\u8D62\u5956+\u5E73\u53F0\u670D\u52A1\u8D39,\u603B\u548C\u4E0D\u80FD\u8D85\u8FC7100",title:"\u5408\u8D62\u5956"})]),default:t(()=>[r(s,{modelValue:a(e).grossProfitBonusQuotaPerc,"onUpdate:modelValue":o[3]||(o[3]=l=>a(e).grossProfitBonusQuotaPerc=l),placeholder:"\u8BF7\u8F93\u5165\u5408\u8D62\u5956"},{append:t(()=>[n("%")]),_:1},8,["modelValue"])]),_:1}),r(u,{label:"\u5E73\u53F0\u670D\u52A1\u8D39",prop:"grossProfitPlatformQuotaPerc"},{label:t(()=>[r(i,{message:"\u4F8B(35),\u7528\u6237\u81EA\u5F97+\u76F4\u63A8\u5956+\u5408\u8D62\u5956+\u5E73\u53F0\u670D\u52A1\u8D39,\u603B\u548C\u4E0D\u80FD\u8D85\u8FC7100",title:"\u5E73\u53F0\u670D\u52A1\u8D39"})]),default:t(()=>[r(s,{modelValue:a(e).grossProfitPlatformQuotaPerc,"onUpdate:modelValue":o[4]||(o[4]=l=>a(e).grossProfitPlatformQuotaPerc=l),placeholder:"\u8BF7\u8F93\u5165\u5E73\u53F0\u670D\u52A1\u8D39"},{append:t(()=>[n("%")]),_:1},8,["modelValue"])]),_:1}),r(u,{label:"\u5206\u6210",prop:"divideIntoPerc"},{default:t(()=>[r(s,{modelValue:a(e).divideIntoPerc,"onUpdate:modelValue":o[5]||(o[5]=l=>a(e).divideIntoPerc=l),placeholder:"\u8BF7\u8F93\u5165\u5206\u6210"},{append:t(()=>[n("%")]),_:1},8,["modelValue"])]),_:1})],64)):(v(),A(w,{key:1},[r(u,{label:"\u8D2D\u7269\u81EA\u5F97",prop:"orderUserSocialStatus"},{default:t(()=>[r(s,{modelValue:a(e).orderUserSocialStatus,"onUpdate:modelValue":o[6]||(o[6]=l=>a(e).orderUserSocialStatus=l),placeholder:"\u8BF7\u8F93\u5165\u8D2D\u7269\u81EA\u5F97"},null,8,["modelValue"])]),_:1}),r(u,{label:"\u8D2D\u7269\u63A8\u8350\u4EBA\u83B7\u5F97",prop:"orderAncestorSocialStatus"},{default:t(()=>[r(s,{modelValue:a(e).orderAncestorSocialStatus,"onUpdate:modelValue":o[7]||(o[7]=l=>a(e).orderAncestorSocialStatus=l),placeholder:"\u8BF7\u8F93\u5165\u8D2D\u7269\u63A8\u8350\u4EBA\u83B7\u5F97"},null,8,["modelValue"])]),_:1}),r(u,{label:"\u6CE8\u518C\u9ED8\u8BA4\u8EAB\u4EF7",prop:"registerSocialStatus"},{default:t(()=>[r(s,{modelValue:a(e).registerSocialStatus,"onUpdate:modelValue":o[8]||(o[8]=l=>a(e).registerSocialStatus=l),placeholder:"\u8BF7\u8F93\u5165\u6CE8\u518C\u9ED8\u8BA4\u8EAB\u4EF7"},null,8,["modelValue"])]),_:1}),r(u,{label:"\u63A8\u8350\u6CE8\u518C\u8EAB\u4EF7",prop:"registerAncestorSocialStatus"},{default:t(()=>[r(s,{modelValue:a(e).registerAncestorSocialStatus,"onUpdate:modelValue":o[9]||(o[9]=l=>a(e).registerAncestorSocialStatus=l),placeholder:"\u8BF7\u8F93\u5165\u63A8\u8350\u6CE8\u518C\u8EAB\u4EF7"},null,8,["modelValue"])]),_:1}),r(u,{label:"\u6536\u85CF\u83B7\u5F97",prop:"collectSocialStatus"},{default:t(()=>[r(s,{modelValue:a(e).collectSocialStatus,"onUpdate:modelValue":o[10]||(o[10]=l=>a(e).collectSocialStatus=l),placeholder:"\u8BF7\u8F93\u5165\u6536\u85CF\u83B7\u5F97"},null,8,["modelValue"])]),_:1}),r(u,{label:"\u7B7E\u5230\u83B7\u5F97",prop:"signInsocialstatus"},{default:t(()=>[r(s,{modelValue:a(e).signInSocialStatus,"onUpdate:modelValue":o[11]||(o[11]=l=>a(e).signInSocialStatus=l),placeholder:"\u8BF7\u8F93\u5165\u7B7E\u5230\u83B7\u5F97"},null,8,["modelValue"])]),_:1}),r(u,{label:"\u7B7E\u5230\u53EF\u83B7\u5F97\u6700\u5927\u8EAB\u4EF7\u503C",prop:"signInsocialstatusMax"},{default:t(()=>[r(s,{modelValue:a(e).signInSocialStatusMax,"onUpdate:modelValue":o[12]||(o[12]=l=>a(e).signInSocialStatusMax=l),placeholder:"\u8BF7\u8F93\u5165\u7B7E\u5230\u83B7\u5F97"},null,8,["modelValue"])]),_:1})],64))]),_:1},8,["model","rules"])),[[J,a(p)]])]),_:1},8,["title","modelValue"])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/distri/orderpercentage/OrderPercentageForm.vue"]]),O=Object.freeze(Object.defineProperty({__proto__:null,default:b},Symbol.toStringTag,{value:"Module"}))});export{b as O,se as __tla,f as a,O as b};
|