| 1 |
- import{n as E,r as o,o as S,k as z,e as h}from"./index.9d8a3e8d.js";import{u as N}from"./composables.2846c723.js";const R="/assets/icon-1.89c76ca0.png",D="/assets/icon-2.4cc433b6.png";const P={__name:"reportImport",setup(f){const r=N(),a=o(),l=o([]),v="http://cashier-salary-sms.wei7star.com/api/upload_qiniu/",c=o(!0),y=()=>{const s=document.createElement("a");s.href="https://salary-management-public.oss-cn-hangzhou.aliyuncs.com/%E7%BB%8F%E8%90%A5%E6%8A%A5%E8%A1%A8%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx",s.download="",s.style.display="none",document.body.appendChild(s),s.click(),setTimeout(()=>{document.body.removeChild(s)},100)};function b(){return{Authorization:"token "+z("token")}}function x(){a.value.click()}function F(s,t,e){if(s.code==0){const T={file_url:s.data};HTTP.post("parse_financial_statements",T).then(p=>{p.code==0?h.exports.Message.success("\u5BFC\u5165\u6210\u529F"):h.exports.Message.error(p.msg)})}}function w(){r.push({path:"/finances/businessReport/enterReportView"})}let u=o([{name:"\u8425\u4E1A\u989D",reality:0,threshold:0,target:0,challenge:0},{name:"\u53D8\u52A8\u8D39",reality:0,threshold:0,target:0,challenge:0},{name:"\u8FB9\u754C\u5229\u6DA6",reality:0,threshold:0,target:0,challenge:0},{name:"\u8FB9\u754C\u5229\u6DA6\u7387",reality:0,threshold:0,target:0,challenge:0},{name:"\u56FA\u5B9A\u8D39",reality:0,threshold:0,target:0,challenge:0},{name:"\u7ECF\u8425\u5229\u6DA6",reality:0,threshold:0,target:0,challenge:0},{name:"\u4EBA\u6548",reality:0,threshold:0,target:0,challenge:0}]);const n=o(!1);function i(s){return parseFloat(s)/100}function k(){r.push({path:"/finances/businessReport/dynamicReport"})}function _(){c.value=!0,HTTP.get("business_data_statistics").then(s=>{if(s.code==0){s.data.results.length>0?n.value=!0:n.value=!1;let t=s.data.results[0],e=u.value;e[0].reality=t.total_revenue,e[1].reality=t.total_change_fees,e[2].reality=t.total_revenue-t.total_change_fees,e[3].reality=((t.total_revenue-t.total_change_fees)/t.total_revenue*100).toFixed(2)+"%",e[4].reality=t.total_fixed_fees,e[5].reality=t.total_revenue-t.total_change_fees-t.total_fixed_fees,e[6].reality=(t.total_revenue-t.total_change_fees)/t.team_size,e[3].threshold=((t.total_revenue-t.total_change_fees)/t.total_revenue*100).toFixed(2)+"%",e[4].threshold=t.total_fixed_fees,e[2].threshold=e[4].threshold+e[5].threshold,e[0].threshold=(e[2].threshold/((t.total_revenue-t.total_change_fees)/t.total_revenue)).toFixed(0),e[1].threshold=e[0].threshold-e[2].threshold,e[6].threshold=e[2].threshold/t.team_size,e[3].target=((i(e[3].reality)+.01)*100).toFixed(2)+"%",e[4].target=t.total_fixed_fees*1.1,e[5].target=((t.total_revenue-t.total_change_fees-t.total_fixed_fees)*1.1).toFixed(0),e[2].target=parseFloat(e[4].target)+parseFloat(e[5].target),e[0].target=(e[2].target/(i(e[3].reality)+.01)).toFixed(0),e[1].target=e[0].target-e[2].target,e[6].target=e[2].target/t.team_size,e[3].challenge=((i(e[3].reality)+.01)*100).toFixed(2)+"%",e[4].challenge=t.total_fixed_fees*1.1,e[5].challenge=((t.total_revenue-t.total_change_fees-t.total_fixed_fees)*2).toFixed(0),e[2].challenge=parseFloat(e[4].challenge)+parseFloat(e[5].challenge),e[0].challenge=(e[2].challenge/(i(e[3].reality)+.01)).toFixed(0),e[1].challenge=e[0].challenge-e[2].challenge,e[6].challenge=e[2].challenge/t.team_size}}).finally(()=>{setTimeout(()=>c.value=!1,500)})}const d=o(0);function C(){n.value=!1,d.value=1}function A(){n.value=!0}return S(()=>{c.value=!0,n.value=!0,_()}),{__sfc:!0,router:r,excel_upload_input:a,fileList:l,uploadUrl:v,loading:c,downloadTemplate:y,setHeaders:b,selectFile:x,handleAvatarSuccess:F,goPage:w,tableData:u,showTable:n,percentToNumber:i,goDetail:k,getList:_,towNum:d,anewUpload:C,back:A}}};var m=function(){var r=this,a=r._self._c,l=r._self._setupProxy;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:l.loading,expression:"loading"}],staticClass:"import-container"},[l.showTable?a("div",{staticClass:"container"},[a("div",{staticStyle:{display:"flex","margin-bottom":"10px"}},[l.showTable?a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:61104,expression:"61104"}],staticClass:"btn-con",staticStyle:{"margin-left":"auto"},attrs:{type:"primary"},on:{click:l.goDetail}},[r._v("\u67E5\u770B\u8BE6\u60C5 ")]):r._e(),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:61105,expression:"61105"}],staticClass:"re-btn",attrs:{type:"primary",plain:""},on:{click:l.anewUpload}},[r._v("\u91CD\u65B0\u4E0A\u4F20\u8D22\u52A1\u62A5\u8868 ")])],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:l.tableData,"header-cell-style":{background:"#F6FAFF"}}},[a("el-table-column",{attrs:{prop:"name",align:"center",label:"\u7ECF\u8425\u5408\u8BA1"}}),a("el-table-column",{attrs:{prop:"reality",align:"center",label:"\u53BB\u5E74\u5B9E\u9645"}}),a("el-table-column",{attrs:{prop:"threshold",align:"center",label:"\u95E8\u69DB\u503C\uFF08\u76C8\u4E8F\u5E73\u8861\u503C\uFF09"}}),a("el-table-column",{attrs:{prop:"target",align:"center",label:"\u76EE\u6807\u503C\uFF08\u5229\u6DA6\u589E\u957F10%\uFF09"}}),a("el-table-column",{attrs:{prop:"challenge",align:"center",label:"\u6311\u6218\u503C\uFF08\u5229\u6DA6\u7FFB\u500D\uFF09"}})],1)],1):a("div",{staticStyle:{position:"relative"}},[l.towNum!=0?a("div",{staticStyle:{position:"absolute","z-index":"9999",right:"0"}},[a("el-button",{staticClass:"btn-con",staticStyle:{"margin-left":"auto"},on:{click:l.back}},[r._v("\u8FD4\u56DE ")])],1):r._e(),a("el-row",{attrs:{gutter:20}},[a("el-col",{directives:[{name:"permission",rawName:"v-permission",value:61101,expression:"61101"}],attrs:{span:12}},[a("div",{staticClass:"import-con"},[a("el-upload",{staticClass:"upload-demo",attrs:{action:l.uploadUrl,headers:l.setHeaders(),name:"myfile","file-list":l.fileList,"on-success":l.handleAvatarSuccess}},[a("img",{staticClass:"img",attrs:{src:R,alt:""}})]),a("div",{staticClass:"link-con"},[a("el-link",{attrs:{type:"primary"},on:{click:l.downloadTemplate}},[r._v("\u70B9\u51FB\u4E0B\u8F7D\u300A\u7ECF\u8425\u62A5\u8868\u5BFC\u5165\u6A21\u677F\u300B ")])],1)],1)]),a("el-col",{directives:[{name:"permission",rawName:"v-permission",value:61102,expression:"61102"}],attrs:{span:12}},[a("div",{staticClass:"import-con",on:{click:l.goPage}},[a("img",{staticClass:"img",attrs:{src:D,alt:""}}),a("div",{staticClass:"link-con"},[a("el-link",{attrs:{type:"primary"}},[r._v("\u8FDB\u5165\u7ECF\u8425\u62A5\u8868\u5F55\u5165\u9875\u9762")])],1)])])],1)],1)])},U=[];m._withStripped=!0;var g=E(P,m,U,!1,null,"130871b3",null,null);g.options.__file="E:/\u5341\u4E8C\u79D1\u6280/\u9879\u76EE/\u4E5D\u53F7\u540C\u4E8B/salary-management-web/src/views/finance/businessReport/reportImport.vue";const I=g.exports;export{I as default};
|