index-753535b0.js 8.7 KB

1
  1. import{R as E}from"./index-2a140774.js";import{w as I,X as f,Y as v,c as q,a as D,o as N,W as m,$ as l,m as e,Z as a,F as w,E as i,a4 as n,u as p,a6 as x,a5 as g,a0 as T,a1 as V}from"./vue-7f5e2b1b.js";import{A as z}from"./index-b7094f12.js";import{_ as Y}from"./_plugin-vue_export-helper-c27b6911.js";import"./ext-7719614a.js";import"./vue-router-e2815956.js";const A=["id"],M={__name:"ringProgress",props:["percent","idname"],setup(h){const u=h;return I(()=>u.percent,(o,y)=>{new E(u.idname,{height:100,width:100,autoFit:!1,percent:u.percent,color:["#5B8FF9","#E8EDF3"]}).render()}),(o,y)=>(f(),v("div",{id:u.idname},null,8,A))}};const $=h=>(T("data-v-ca800c59"),h=h(),V(),h),C={class:"y-container mt-10"},L={class:"brderRight pd-10 flex"},W={style:{"font-size":"14px",color:"red"}},X={class:"info"},Z=$(()=>l("small",null,"达成金额",-1)),j={class:"info"},G=$(()=>l("small",null,"目标金额",-1)),H={class:"brderRight pd-10 flex"},J={style:{"font-size":"14px",color:"red"}},K={class:"info"},O=$(()=>l("small",null,"达成金额",-1)),Q={class:"info"},U=$(()=>l("small",null,"目标金额",-1)),tt={class:"brderRight pd-10 flex"},lt={style:{"font-size":"14px",color:"red"}},et={class:"info"},at=$(()=>l("small",null,"达成金额",-1)),st={class:"info"},nt=$(()=>l("small",null,"目标金额",-1)),ot={class:"y-container"},dt={__name:"index",setup(h){const u=q(()=>{var c=new Date,r=c.getMonth()+1;return r>=1&&r<=3?1:r>=4&&r<=6?2:r>=7&&r<=9?3:4}),o=D({}),y=D([]),P=async()=>{const c=await z.requested({id:"20231018103203",content:{}});y.value=c.data,c.data.length>0?o.value=c.data[0]:o.value="none"},k=D([]),R=async()=>{const c=await z.requested({id:"20231018103303",content:{}});k.value=c.data};return N(()=>{P(),R()}),(c,r)=>{const F=m("a-statistic"),b=m("a-col"),S=m("a-row"),d=m("a-table-column"),_=m("a-table-column-group"),B=m("a-table");return f(),v(w,null,[l("div",C,[e(S,{gutter:16},{default:a(()=>[e(b,{span:8},{default:a(()=>[l("div",L,[l("div",null,[e(F,{class:"mt-10",style:{cursor:"pointer"},title:"本月目标",value:(o.value[`m${new Date().getMonth()+1}a`]/o.value[`m${new Date().getMonth()+1}l`]*100).toFixed(2),"value-style":{color:"#333"}},{suffix:a(()=>[i(" % "),l("small",W,n((o.value[`m${new Date().getMonth()+1}a`]-o.value[`m${new Date().getMonth()+1}l`]).toFixed(2)),1)]),_:1},8,["value"]),l("div",null,[l("div",X,[Z,i(" "),l("small",null,n(o.value[`m${new Date().getMonth()+1}a`])+"万元",1)]),l("div",j,[G,i(" "),l("small",null,n(o.value[`m${new Date().getMonth()+1}l`])+"万元",1)])])]),e(M,{idname:"ringProgress",percent:o.value[`m${new Date().getMonth()+1}a`]/o.value[`m${new Date().getMonth()+1}l`]},null,8,["percent"])])]),_:1}),e(b,{span:8},{default:a(()=>[l("div",H,[l("div",null,[e(F,{class:"mt-10",style:{cursor:"pointer"},title:"本季目标",value:(o.value[`s${p(u)}a`]/o.value[`s${p(u)}l`]*100).toFixed(2),"value-style":{color:"#333"}},{suffix:a(()=>[i(" % "),l("small",J,n((o.value[`s${p(u)}a`]-o.value[`s${p(u)}l`]).toFixed(2)),1)]),_:1},8,["value"]),l("div",null,[l("div",K,[O,i(" "),l("small",null,n(o.value[`s${p(u)}a`])+"万元",1)]),l("div",Q,[U,i(" "),l("small",null,n(o.value[`s${p(u)}l`])+"万元",1)])])]),e(M,{idname:"ringProgress2",percent:o.value[`s${p(u)}a`]/o.value[`s${p(u)}l`]},null,8,["percent"])])]),_:1}),e(b,{span:8},{default:a(()=>[l("div",tt,[l("div",null,[e(F,{class:"mt-10",style:{cursor:"pointer"},title:"本年目标",value:(o.value.y1a/o.value.y1l*100).toFixed(2),"value-style":{color:"#333"}},{suffix:a(()=>[i(" % "),l("small",lt,n((o.value.y1a-o.value.y1l).toFixed(2)),1)]),_:1},8,["value"]),l("div",null,[l("div",et,[at,i(" "),l("small",null,n(o.value.y1a)+"万元",1)]),l("div",st,[nt,i(" "),l("small",null,n(o.value.y1l)+"万元",1)])])]),e(M,{idname:"ringProgress3",percent:o.value.y1a/o.value.y1l},null,8,["percent"])])]),_:1})]),_:1})]),l("div",ot,[e(B,{"data-source":k.value,scroll:{y:"100%"},class:"ant-table-small",size:"small","row-class-name":(t,s)=>s%2===1?"table-striped":null,bordered:""},{default:a(()=>[e(d,{title:"营销区域","data-index":"areaname",width:"200px"}),e(_,null,{title:a(()=>[i("年度(万元)")]),default:a(()=>[e(d,{title:"目标","data-index":"y1l",width:"100px"}),e(d,{title:"实际","data-index":"y1a",width:"100px"},{default:a(({record:t})=>[l("span",{style:x(t.y1a>t.y1l?{color:"red"}:{color:"green"})},n(t.y1a.toFixed(2)),5)]),_:1}),e(d,{title:"达成率",width:"100px"},{default:a(({record:t})=>[l("span",null,n(t.y1l==0?"--":(t.y1a.toFixed(2)/t.y1l.toFixed(2)*100).toFixed(2)+"%"),1)]),_:1})]),_:1}),e(_,null,{title:a(()=>[i("1季度(万元)")]),default:a(()=>[e(d,{title:"目标","data-index":"s1l",width:"100px"}),e(d,{title:"实际","data-index":"s1a",width:"100px"},{default:a(({record:t})=>[l("span",{style:x(t.s1a>t.s1l?{color:"red"}:{color:"green"})},n(t.s1a.toFixed(2)),5)]),_:1}),e(d,{title:"达成率",width:"100px"},{default:a(({record:t})=>[l("span",null,n(t.s1l==0?"--":(t.s1a.toFixed(2)/t.s1l.toFixed(2)*100).toFixed(2)+"%"),1)]),_:1})]),_:1}),(f(),v(w,null,g(3,t=>e(_,{key:t},{title:a(()=>[i(n(`${t}月(万元)`),1)]),default:a(()=>[e(d,{title:"目标","data-index":`m${t}l`,width:"100px"},null,8,["data-index"]),e(d,{title:"实际","data-index":`m${t}a`,width:"100px"},{default:a(({record:s})=>[l("span",{style:x(s[`m${t}a`]>s[`m${t}l`]?{color:"red"}:{color:"green"})},n(s[`m${t}a`].toFixed(2)),5)]),_:2},1032,["data-index"]),e(d,{title:"达成率",width:"100px"},{default:a(({record:s})=>[l("span",null,n(s[`m${t}l`]==0?"--":(s[`m${t}a`].toFixed(2)/s[`m${t}l`].toFixed(2)*100).toFixed(2)+"%"),1)]),_:2},1024)]),_:2},1024)),64)),e(_,null,{title:a(()=>[i("2季度(万元)")]),default:a(()=>[e(d,{title:"目标","data-index":"s2l",width:"100px"}),e(d,{title:"实际","data-index":"s2a",width:"100px"},{default:a(({record:t})=>[l("span",{style:x(t.s2a>t.s2l?{color:"red"}:{color:"green"})},n(t.s2a.toFixed(2)),5)]),_:1}),e(d,{title:"达成率",width:"100px"},{default:a(({record:t})=>[l("span",null,n(t.s2l==0?"--":(t.s2a.toFixed(2)/t.s2l.toFixed(2)*100).toFixed(2)+"%"),1)]),_:1})]),_:1}),(f(),v(w,null,g(3,t=>e(_,{key:t},{title:a(()=>[i(n(`${t+3}月(万元)`),1)]),default:a(()=>[e(d,{title:"目标","data-index":`m${t+3}l`,width:"100px"},null,8,["data-index"]),e(d,{title:"实际","data-index":`m${t+3}a`,width:"100px"},{default:a(({record:s})=>[l("span",{style:x(s[`m${t+3}a`]>s[`m${t+3}l`]?{color:"red"}:{color:"green"})},n(s[`m${t+3}a`].toFixed(2)),5)]),_:2},1032,["data-index"]),e(d,{title:"达成率",width:"100px"},{default:a(({record:s})=>[l("span",null,n(s[`m${t+3}l`]==0?"--":(s[`m${t+3}a`].toFixed(2)/s[`m${t+3}l`].toFixed(2)*100).toFixed(2)+"%"),1)]),_:2},1024)]),_:2},1024)),64)),e(_,null,{title:a(()=>[i("3季度(万元)")]),default:a(()=>[e(d,{title:"目标","data-index":"s3l",width:"100px"}),e(d,{title:"实际","data-index":"s3a",width:"100px"},{default:a(({record:t})=>[l("span",{style:x(t.s3a>t.s3l?{color:"red"}:{color:"green"})},n(t.s3a.toFixed(2)),5)]),_:1}),e(d,{title:"达成率",width:"100px"},{default:a(({record:t})=>[l("span",null,n(t.s3l==0?"--":(t.s3a.toFixed(2)/t.s3l.toFixed(2)*100).toFixed(2)+"%"),1)]),_:1})]),_:1}),(f(),v(w,null,g(3,t=>e(_,{key:t},{title:a(()=>[i(n(`${t+6}月(万元)`),1)]),default:a(()=>[e(d,{title:"目标","data-index":`m${t+6}l`,width:"100px"},null,8,["data-index"]),e(d,{title:"实际","data-index":`m${t+6}a`,width:"100px"},{default:a(({record:s})=>[l("span",{style:x(s[`m${t+6}a`]>s[`m${t+6}l`]?{color:"red"}:{color:"green"})},n(s[`m${t+6}a`].toFixed(2)),5)]),_:2},1032,["data-index"]),e(d,{title:"达成率",width:"100px"},{default:a(({record:s})=>[l("span",null,n(s[`m${t+6}l`]==0?"--":(s[`m${t+6}a`].toFixed(2)/s[`m${t+6}l`].toFixed(2)*100).toFixed(2)+"%"),1)]),_:2},1024)]),_:2},1024)),64)),e(_,null,{title:a(()=>[i("4季度(万元)")]),default:a(()=>[e(d,{title:"目标","data-index":"s3l",width:"100px"}),e(d,{title:"实际","data-index":"s3a",width:"100px"},{default:a(({record:t})=>[l("span",{style:x(t.s4a>t.s4l?{color:"red"}:{color:"green"})},n(t.s4a.toFixed(2)),5)]),_:1}),e(d,{title:"达成率",width:"100px"},{default:a(({record:t})=>[l("span",null,n(t.s4l==0?"--":(t.s4a.toFixed(2)/t.s4l.toFixed(2)*100).toFixed(2)+"%"),1)]),_:1})]),_:1}),(f(),v(w,null,g(3,t=>e(_,{key:t},{title:a(()=>[i(n(`${t+9}月(万元)`),1)]),default:a(()=>[e(d,{title:"目标","data-index":`m${t+9}l`,width:"100px"},null,8,["data-index"]),e(d,{title:"实际","data-index":`m${t+9}a`,width:"100px"},{default:a(({record:s})=>[l("span",{style:x(s[`m${t+9}a`]>s[`m${t+9}l`]?{color:"red"}:{color:"green"})},n(s[`m${t+9}a`].toFixed(2)),5)]),_:2},1032,["data-index"]),e(d,{title:"达成率",width:"100px"},{default:a(({record:s})=>[l("span",null,n(s[`m${t+9}l`]==0?"--":(s[`m${t+9}a`]/s[`m${t+9}l`]*100).toFixed(2)+"%"),1)]),_:2},1024)]),_:2},1024)),64))]),_:1},8,["data-source","row-class-name"])])],64)}}},rt=Y(dt,[["__scopeId","data-v-ca800c59"]]);export{rt as default};