index-b2e8b892.js 9.8 KB

1
  1. import{A as F,c as R}from"./index-abf064a2.js";import{t as O}from"./index-283650ad.js";import{u as k}from"./vue-router-e129cfde.js";import{a as v,W as _,X as x,Y as y,m as a,Z as e,E as c,F as g,a5 as b,o as S,$ as d,a4 as s,a2 as j,a3 as q,a6 as w,u as C}from"./vue-904e9482.js";import{_ as N}from"./_plugin-vue_export-helper-c27b6911.js";import{d as L}from"./index-7f64416a.js";import"./InboxOutlined-e95f0f5f.js";import"./routeTabs-889fd211.js";/* empty css */const M={__name:"setTarget",props:["data"],emits:["onSuccess"],setup($,{emit:m}){const f=$,p=k(),u=v(!1),r=v({sa_salestargetbillid:p.currentRoute.value.query.id}),l=()=>{console.log(f.data),r.value=Object.assign({},r.value,f.data),u.value=!0},i=v(),o=()=>{u.value=!1,i.value.resetFields()},t=async()=>{try{const n=await i.value.validateFields();console.log(n);const I=await F.post({id:20221229111502,content:r.value});R.message(I,"设置成功!",()=>{m("onSuccess"),o()})}catch(n){console.log("Failed:",n)}};return(n,I)=>{const D=_("a-button"),z=_("a-input"),B=_("a-form-item"),U=_("a-col"),V=_("a-row"),A=_("a-form"),P=_("a-space"),T=_("a-drawer");return x(),y("div",null,[a(D,{type:"link",onClick:l},{default:e(()=>[c("设置")]),_:1}),a(T,{open:u.value,"onUpdate:open":I[0]||(I[0]=h=>u.value=h),class:"custom-class",title:"设置部门年度目标",placement:"right",width:"600",closable:!1,onClose:o},{extra:e(()=>[a(P,null,{default:e(()=>[a(D,{onClick:o},{default:e(()=>[c("关闭")]),_:1}),a(D,{type:"primary",onClick:t},{default:e(()=>[c("保存")]),_:1})]),_:1})]),default:e(()=>[a(A,{ref_key:"formRef",ref:i,model:r.value,layout:"vertical"},{default:e(()=>[a(V,{gutter:16},{default:e(()=>[(x(),y(g,null,b(12,h=>a(U,{span:12,key:h},{default:e(()=>[a(B,{label:h+"月目标",name:`m${h}l`,rules:[{required:!0,message:`请输入${h}月业绩目标`}]},{default:e(()=>[a(z,{value:r.value[`m${h}l`],"onUpdate:value":E=>r.value[`m${h}l`]=E,placeholder:"月度目标"},null,8,["value","onUpdate:value"])]),_:2},1032,["label","name","rules"])]),_:2},1024)),64))]),_:1})]),_:1},8,["model"])]),_:1},8,["open"])])}}};const W={style:{"font-weight":"300"}},X={__name:"target",setup($){const m=k(),f=v([{title:"企业名称",dataIndex:"enterprisename"},{title:"年度",dataIndex:"y1l"},{title:"一季度",dataIndex:"s1l"},{title:"一月",dataIndex:"m1l"},{title:"二月",dataIndex:"m2l"},{title:"三月",dataIndex:"m3l"},{title:"二季度",dataIndex:"s2l"},{title:"四月",dataIndex:"m4l"},{title:"五月",dataIndex:"m5l"},{title:"六月",dataIndex:"m6l"},{title:"三季度",dataIndex:"s3l"},{title:"七月",dataIndex:"m7l"},{title:"八月",dataIndex:"m8l"},{title:"九月",dataIndex:"m9l"},{title:"四季度",dataIndex:"s4l"},{title:"十月",dataIndex:"m10l"},{title:"十一月",dataIndex:"m11l"},{title:"十二月",dataIndex:"m12l"},{title:"操作",dataIndex:"operation"}]),p=v([]),u=async()=>{const r=await F.requested({id:"20231018142103",content:{sa_salestargetbillid:m.currentRoute.value.query.id}});p.value=r.data};return S(()=>{u()}),(r,l)=>{const i=_("a-table");return x(),y("div",null,[a(i,{class:"ant-table-small",size:"small",columns:f.value,"data-source":p.value,"row-class-name":(o,t)=>t%2===1?"table-striped":null,bordered:""},{bodyCell:e(({column:o,record:t})=>[d("span",W,s(t[o.dataIndex]),1),o.dataIndex=="operation"?(x(),y(g,{key:0},[t.type!=="区域汇总"?(x(),j(M,{key:0,data:t,onOnSuccess:u},null,8,["data"])):q("",!0)],64)):q("",!0)]),_:1},8,["columns","data-source","row-class-name"])])}}},Y=N(X,[["__scopeId","data-v-3ea01110"]]);const Z={__name:"targetStatistics",props:["data"],setup($){const m=$,f=v([]),p=async()=>{const u=await F.requested({id:"20230110151902",content:{where:{year:m.data.year}}});f.value=u.data};return S(()=>{p()}),(u,r)=>{const l=_("a-table-column"),i=_("a-table-column-group"),o=_("a-table");return x(),y("div",null,[a(o,{"data-source":f.value,scroll:{y:"100%"},class:"ant-table-small",size:"small","row-class-name":(t,n)=>n%2===1?"table-striped":null,bordered:""},{default:e(()=>[a(l,{title:"企业名称","data-index":"enterprisename",width:"200px"}),a(i,null,{title:e(()=>[c("年度(万元)")]),default:e(()=>[a(l,{title:"目标","data-index":"y1l",width:"100px"}),a(l,{title:"实际","data-index":"y1a",width:"100px"},{default:e(({record:t})=>[d("span",{style:w(t.y1a>t.y1l?{color:"red"}:{color:"green"})},s(t.y1a.toFixed(2)),5)]),_:1}),a(l,{title:"达成率",width:"100px"},{default:e(({record:t})=>[d("span",null,s((t.y1a.toFixed(2)/t.y1l.toFixed(2)*100).toFixed(2))+" % ",1)]),_:1})]),_:1}),a(i,null,{title:e(()=>[c("1季度(万元)")]),default:e(()=>[a(l,{title:"目标","data-index":"s1l",width:"100px"}),a(l,{title:"实际","data-index":"s1a",width:"100px"},{default:e(({record:t})=>[d("span",{style:w(t.s1a>t.s1l?{color:"red"}:{color:"green"})},s(t.s1a.toFixed(2)),5)]),_:1}),a(l,{title:"达成率",width:"100px"},{default:e(({record:t})=>[d("span",null,s((t.s1a.toFixed(2)/t.s1l.toFixed(2)*100).toFixed(2))+" % ",1)]),_:1})]),_:1}),(x(),y(g,null,b(3,t=>a(i,{key:t},{title:e(()=>[c(s(`${t}月(万元)`),1)]),default:e(()=>[a(l,{title:"目标","data-index":`m${t}l`,width:"100px"},null,8,["data-index"]),a(l,{title:"实际","data-index":`m${t}a`,width:"100px"},{default:e(({record:n})=>[d("span",{style:w(n[`m${t}a`]>n[`m${t}l`]?{color:"red"}:{color:"green"})},s(n[`m${t}a`].toFixed(2)),5)]),_:2},1032,["data-index"]),a(l,{title:"达成率",width:"100px"},{default:e(({record:n})=>[d("span",null,s((n[`m${t}a`].toFixed(2)/n[`m${t}l`].toFixed(2)*100).toFixed(2))+" % ",1)]),_:2},1024)]),_:2},1024)),64)),a(i,null,{title:e(()=>[c("2季度(万元)")]),default:e(()=>[a(l,{title:"目标","data-index":"s2l",width:"100px"}),a(l,{title:"实际","data-index":"s2a",width:"100px"},{default:e(({record:t})=>[d("span",{style:w(t.s2a>t.s2l?{color:"red"}:{color:"green"})},s(t.s2a.toFixed(2)),5)]),_:1}),a(l,{title:"达成率",width:"100px"},{default:e(({record:t})=>[d("span",null,s((t.s2a.toFixed(2)/t.s2l.toFixed(2)*100).toFixed(2))+" % ",1)]),_:1})]),_:1}),(x(),y(g,null,b(3,t=>a(i,{key:t},{title:e(()=>[c(s(`${t+3}月(万元)`),1)]),default:e(()=>[a(l,{title:"目标","data-index":`m${t+3}l`,width:"100px"},null,8,["data-index"]),a(l,{title:"实际","data-index":`m${t+3}a`,width:"100px"},{default:e(({record:n})=>[d("span",{style:w(n[`m${t+3}a`]>n[`m${t+3}l`]?{color:"red"}:{color:"green"})},s(n[`m${t+3}a`].toFixed(2)),5)]),_:2},1032,["data-index"]),a(l,{title:"达成率",width:"100px"},{default:e(({record:n})=>[d("span",null,s((n[`m${t+3}a`].toFixed(2)/n[`m${t+3}l`].toFixed(2)*100).toFixed(2))+" % ",1)]),_:2},1024)]),_:2},1024)),64)),a(i,null,{title:e(()=>[c("3季度(万元)")]),default:e(()=>[a(l,{title:"目标","data-index":"s3l",width:"100px"}),a(l,{title:"实际","data-index":"s3a",width:"100px"},{default:e(({record:t})=>[d("span",{style:w(t.s3a>t.s3l?{color:"red"}:{color:"green"})},s(t.s3a.toFixed(2)),5)]),_:1}),a(l,{title:"达成率",width:"100px"},{default:e(({record:t})=>[d("span",null,s((t.s3a.toFixed(2)/t.s3l.toFixed(2)*100).toFixed(2))+" % ",1)]),_:1})]),_:1}),(x(),y(g,null,b(3,t=>a(i,{key:t},{title:e(()=>[c(s(`${t+6}月(万元)`),1)]),default:e(()=>[a(l,{title:"目标","data-index":`m${t+6}l`,width:"100px"},null,8,["data-index"]),a(l,{title:"实际","data-index":`m${t+6}a`,width:"100px"},{default:e(({record:n})=>[d("span",{style:w(n[`m${t+6}a`]>n[`m${t+6}l`]?{color:"red"}:{color:"green"})},s(n[`m${t+6}a`].toFixed(2)),5)]),_:2},1032,["data-index"]),a(l,{title:"达成率",width:"100px"},{default:e(({record:n})=>[d("span",null,s((n[`m${t+6}a`].toFixed(2)/n[`m${t+6}l`].toFixed(2)*100).toFixed(2))+" % ",1)]),_:2},1024)]),_:2},1024)),64)),a(i,null,{title:e(()=>[c("4季度(万元)")]),default:e(()=>[a(l,{title:"目标","data-index":"s3l",width:"100px"}),a(l,{title:"实际","data-index":"s3a",width:"100px"},{default:e(({record:t})=>[d("span",{style:w(t.s4a>t.s4l?{color:"red"}:{color:"green"})},s(t.s4a.toFixed(2)),5)]),_:1}),a(l,{title:"达成率",width:"100px"},{default:e(({record:t})=>[d("span",null,s((t.s4a.toFixed(2)/t.s4l.toFixed(2)*100).toFixed(2))+" % ",1)]),_:1})]),_:1}),(x(),y(g,null,b(3,t=>a(i,{key:t},{title:e(()=>[c(s(`${t+9}月`),1)]),default:e(()=>[a(l,{title:"目标","data-index":`m${t+9}l`,width:"100px"},null,8,["data-index"]),a(l,{title:"实际","data-index":`m${t+9}a`,width:"100px"},{default:e(({record:n})=>[d("span",{style:w(n[`m${t+9}a`]>n[`m${t+9}l`]?{color:"red"}:{color:"green"})},s(n[`m${t+9}a`].toFixed(2)),5)]),_:2},1032,["data-index"]),a(l,{title:"达成率",width:"100px"},{default:e(({record:n})=>[d("span",null,s((n[`m${t+9}a`]/n[`m${t+9}l`]*100).toFixed(2))+" % ",1)]),_:2},1024)]),_:2},1024)),64))]),_:1},8,["data-source","row-class-name"])])}}},G=N(Z,[["__scopeId","data-v-54c3820e"]]),st={__name:"index",setup($){const m=k(),f=v([]);v({id:20221109093902,content:{sa_orderid:0,pageNumber:1,pageSize:20,where:{condition:""}}});const p=v({}),u=async()=>{const o=await F.requested({id:"20220901140402",content:{nocache:!0,sa_salestargetbillid:m.currentRoute.value.query.id}});p.value=o.data,r(o.data)},r=o=>{f.value=[{label:"年度",value:o.year,span:1},{label:"统计维度",value:o.assessmentindicators,span:1}]},l=v(null),i=async o=>{const t=await F.requested({id:20231020111303,content:{sa_salestargetbillid:m.currentRoute.value.query.id,attachmentid:o.data.attachmentids[0],year:p.value.year}});R.message(t,"导入成功",()=>{prodlist.value.listData(),t.data!=="成功"&&(l.value=t.data)})};return S(()=>{u()}),(o,t)=>(x(),y("div",null,[a(L,{headData:f.value,title:p.value.year+"年度目标",tabs:["目标详情","统计"],delParam:{id:"20221118103402",content:{sa_salestargetbillids:[C(m).currentRoute.value.query.id]}}},{operation:e(()=>[a(O,{bindData:{ownerid:C(m).currentRoute.value.query.id,ownertable:"sa_salestargetbill",usetype:"default"},failedData:l.value,modeParam:{id:20231020111203,content:{}},onUploadSuccess:i},null,8,["bindData","failedData"])]),tab0:e(()=>[a(Y)]),tab1:e(()=>[a(G,{data:p.value},null,8,["data"])]),_:1},8,["headData","title","delParam"])]))}};export{st as default};