| 1 |
- import{A as $,c as F}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 c,X as p,Y as f,m as t,Z as e,E as i,F as w,a5 as h,o as S,$ as x,a4 as d,a2 as j,a3 as R,a6 as g,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(I,{emit:m}){const _=I,y=k(),r=v(!1),u=v({sa_salestargetbillid:y.currentRoute.value.query.id}),l=()=>{console.log(_.data),u.value=Object.assign({},u.value,_.data),r.value=!0},o=v(),s=()=>{r.value=!1,o.value.resetFields()},a=async()=>{try{const n=await o.value.validateFields();console.log(n);const D=await $.post({id:20220902162902,content:u.value});F.message(D,"设置成功!",()=>{m("onSuccess"),s()})}catch(n){console.log("Failed:",n)}};return(n,D)=>{const q=c("a-button"),z=c("a-input"),B=c("a-form-item"),U=c("a-col"),V=c("a-row"),A=c("a-form"),P=c("a-space"),T=c("a-drawer");return p(),f("div",null,[t(q,{type:"link",onClick:l},{default:e(()=>[i("设置")]),_:1}),t(T,{open:r.value,"onUpdate:open":D[0]||(D[0]=b=>r.value=b),class:"custom-class",title:"设置部门年度目标",placement:"right",width:"600",closable:!1,onClose:s},{extra:e(()=>[t(P,null,{default:e(()=>[t(q,{onClick:s},{default:e(()=>[i("关闭")]),_:1}),t(q,{type:"primary",onClick:a},{default:e(()=>[i("保存")]),_:1})]),_:1})]),default:e(()=>[t(A,{ref_key:"formRef",ref:o,model:u.value,layout:"vertical"},{default:e(()=>[t(V,{gutter:16},{default:e(()=>[(p(),f(w,null,h(12,b=>t(U,{span:12,key:b},{default:e(()=>[t(B,{label:b+"月目标",name:`m${b}l`,rules:[{required:!0,message:`请输入${b}月业绩目标`}]},{default:e(()=>[t(z,{value:u.value[`m${b}l`],"onUpdate:value":E=>u.value[`m${b}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(I){const m=k(),_=v([{title:"营销区域",dataIndex:"areaname"},{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"}]),y=v([]),r=async()=>{const u=await $.requested({id:"20220901141802",content:{sa_salestargetbillid:m.currentRoute.value.query.id}});y.value=u.data};return S(()=>{r()}),(u,l)=>{const o=c("a-table");return p(),f("div",null,[t(o,{class:"ant-table-small",size:"small",columns:_.value,"data-source":y.value,"row-class-name":(s,a)=>a%2===1?"table-striped":null,bordered:""},{bodyCell:e(({column:s,record:a})=>[x("span",W,d(a[s.dataIndex]),1),s.dataIndex=="operation"?(p(),f(w,{key:0},[a.type!=="区域汇总"?(p(),j(M,{key:0,data:a,onOnSuccess:r},null,8,["data"])):R("",!0)],64)):R("",!0)]),_:1},8,["columns","data-source","row-class-name"])])}}},Y=N(X,[["__scopeId","data-v-16c81916"]]);const Z={__name:"targetStatistics",setup(I){const m=k(),_=v([]),y=async()=>{const r=await $.requested({id:"20220904134102",content:{sa_salestargetbillid:m.currentRoute.value.query.id}});_.value=r.data,console.log(_.value,"---")};return S(()=>{y()}),(r,u)=>{const l=c("a-table-column"),o=c("a-table-column-group"),s=c("a-table");return p(),f("div",null,[t(s,{"data-source":_.value,scroll:{y:"100%"},class:"ant-table-small",size:"small","row-class-name":(a,n)=>n%2===1?"table-striped":null,bordered:""},{default:e(()=>[t(l,{title:"区域","data-index":"areaname",width:"100px"}),t(o,null,{title:e(()=>[i("年度(万元)")]),default:e(()=>[t(l,{title:"目标","data-index":"y1l",width:"100px"}),t(l,{title:"实际","data-index":"y1a",width:"100px"},{default:e(({record:a})=>[x("span",{style:g(a.y1a>a.y1l?{color:"red"}:{color:"green"})},d(a.y1a),5)]),_:1})]),_:1}),t(o,null,{title:e(()=>[i("1季度(万元)")]),default:e(()=>[t(l,{title:"目标","data-index":"s1l",width:"100px"}),t(l,{title:"实际","data-index":"s1a",width:"100px"},{default:e(({record:a})=>[x("span",{style:g(a.s1a>a.s1l?{color:"red"}:{color:"green"})},d(a.s1a),5)]),_:1})]),_:1}),(p(),f(w,null,h(3,a=>t(o,{key:a},{title:e(()=>[i(d(`${a}月(万元)`),1)]),default:e(()=>[t(l,{title:"目标","data-index":`m${a}l`,width:"100px"},null,8,["data-index"]),t(l,{title:"实际","data-index":`m${a}a`,width:"100px"},{default:e(({record:n})=>[x("span",{style:g(n[`m${a}a`]>n[`m${a}l`]?{color:"red"}:{color:"green"})},d(n[`m${a}a`]),5)]),_:2},1032,["data-index"])]),_:2},1024)),64)),t(o,null,{title:e(()=>[i("2季度(万元)")]),default:e(()=>[t(l,{title:"目标","data-index":"s2l",width:"100px"}),t(l,{title:"实际","data-index":"s2a",width:"100px"},{default:e(({record:a})=>[x("span",{style:g(a.s2a>a.s2l?{color:"red"}:{color:"green"})},d(a.s2a),5)]),_:1})]),_:1}),(p(),f(w,null,h(3,a=>t(o,{key:a},{title:e(()=>[i(d(`${a+3}月(万元)`),1)]),default:e(()=>[t(l,{title:"目标","data-index":`m${a+3}l`,width:"100px"},null,8,["data-index"]),t(l,{title:"实际","data-index":`m${a+3}a`,width:"100px"},{default:e(({record:n})=>[x("span",{style:g(n[`m${a+3}a`]>n[`m${a+3}l`]?{color:"red"}:{color:"green"})},d(n[`m${a+3}a`]),5)]),_:2},1032,["data-index"])]),_:2},1024)),64)),t(o,null,{title:e(()=>[i("3季度(万元)")]),default:e(()=>[t(l,{title:"目标","data-index":"s3l",width:"100px"}),t(l,{title:"实际","data-index":"s3a",width:"100px"},{default:e(({record:a})=>[x("span",{style:g(a.s3a>a.s3l?{color:"red"}:{color:"green"})},d(a.s3a),5)]),_:1})]),_:1}),(p(),f(w,null,h(3,a=>t(o,{key:a},{title:e(()=>[i(d(`${a+6}月(万元)`),1)]),default:e(()=>[t(l,{title:"目标","data-index":`m${a+6}l`,width:"100px"},null,8,["data-index"]),t(l,{title:"实际","data-index":`m${a+6}a`,width:"100px"},{default:e(({record:n})=>[x("span",{style:g(n[`m${a+6}a`]>n[`m${a+6}l`]?{color:"red"}:{color:"green"})},d(n[`m${a+6}a`]),5)]),_:2},1032,["data-index"])]),_:2},1024)),64)),t(o,null,{title:e(()=>[i("4季度(万元)")]),default:e(()=>[t(l,{title:"目标","data-index":"s3l",width:"100px"}),t(l,{title:"实际","data-index":"s3a",width:"100px"},{default:e(({record:a})=>[x("span",{style:g(a.s4a>a.s4l?{color:"red"}:{color:"green"})},d(a.s4a),5)]),_:1})]),_:1}),(p(),f(w,null,h(3,a=>t(o,{key:a},{title:e(()=>[i(d(`${a+9}月`),1)]),default:e(()=>[t(l,{title:"目标","data-index":`m${a+9}l`,width:"100px"},null,8,["data-index"]),t(l,{title:"实际","data-index":`m${a+9}a`,width:"100px"},{default:e(({record:n})=>[x("span",{style:g(n[`m${a+9}a`]>n[`m${a+9}l`]?{color:"red"}:{color:"green"})},d(n[`m${a+9}a`]),5)]),_:2},1032,["data-index"])]),_:2},1024)),64))]),_:1},8,["data-source","row-class-name"])])}}},G=N(Z,[["__scopeId","data-v-86b63d15"]]),sa={__name:"index",setup(I){const m=k(),_=v([]);v({id:20221109093902,content:{sa_orderid:0,pageNumber:1,pageSize:20,where:{condition:""}}});const y=v({}),r=async()=>{const s=await $.requested({id:"20220901140402",content:{nocache:!0,sa_salestargetbillid:m.currentRoute.value.query.id}});y.value=s.data,u(s.data)},u=s=>{_.value=[{label:"年度",value:s.year,span:1},{label:"统计维度",value:s.assessmentindicators,span:1}]},l=v(null),o=async s=>{const a=await $.requested({id:20230227194803,content:{sa_salestargetbillid:m.currentRoute.value.query.id,attachmentid:s.data.attachmentids[0]}});F.message(a,"导入成功",()=>{prodlist.value.listData(),a.data!=="成功"&&(l.value=a.data)})};return S(()=>{r()}),(s,a)=>(p(),f("div",null,[t(L,{headData:_.value,title:y.value.year+"年度目标",tabs:["目标详情","统计"],delParam:{id:"20221118103402",content:{sa_salestargetbillids:[C(m).currentRoute.value.query.id]}}},{operation:e(()=>[t(O,{bindData:{ownerid:C(m).currentRoute.value.query.id,ownertable:"sa_salestargetbill",usetype:"default"},failedData:l.value,modeParam:{id:20220913093102,content:{}},onUploadSuccess:o},null,8,["bindData","failedData"])]),tab0:e(()=>[t(Y)]),tab1:e(()=>[t(G)]),_:1},8,["headData","title","delParam"])]))}};export{sa as default};
|