Commit 6431560d by Chao Sun

薪资单

parent 07ab2a1f
......@@ -224,4 +224,9 @@ export class LifeCommonService {
return value;
}
getDate(str) {
str = String(str)
const newStr = str.substr(0, 4) + '年' + str.substr(4, 2) + '月';
return newStr;
}
}
......@@ -81,7 +81,7 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
{ no: 13, subtitle: '我的商机', icon: 'icon-xiansuo1', path: '', routerLink: 'business' },
{ no: 12, subtitle: '我的保单', icon: 'icon-baodanyangben', path: '', routerLink: '' },
{ no: 14, subtitle: '我的佣金', icon: 'icon-yongjin', path: '', routerLink: '' },
{ no: 19, subtitle: '我的薪资', icon: 'icon-yongjin', path: '', routerLink: 'salary' },
{ no: 19, subtitle: '薪资单', icon: 'icon-xinzidan', path: '', routerLink: 'salary' },
{ no: '', subtitle: '', icon: '', path: '', routerLink: '' }
],
isShow: true
......
......@@ -317,18 +317,18 @@ export class MyService {
//薪资pdf
payScalePdf(param) {
this.http.post(`${this.ydapi}/practitioner/payScalePdf`, param, { responseType: 'blob', observe: 'response' }).subscribe(data => {
console.log(data)
const link = document.createElement('a');
const blob = new Blob([data.body], { type: 'application/pdf;charset=UTF-8' });
console.log(blob)
link.setAttribute('href', window.URL.createObjectURL(blob));
link.setAttribute('download', data.headers.get('Content-Disposition').split('filename=')[1]);
alert(data.headers.get('Content-Disposition').split('filename=')[1])
link.style.visibility = 'hidden';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
})
const url = this.ydapi + '/practitioner/payScalePdf';
return this.http
.post(url, JSON.stringify(param));
// this.http.post(`${this.ydapi}/practitioner/payScalePdf`, param, { responseType: 'blob', observe: 'response' }).subscribe(data => {
// const link = document.createElement('a');
// const blob = new Blob([data.body], { type: 'application/pdf;charset=UTF-8' });
// link.setAttribute('href', window.URL.createObjectURL(blob));
// link.setAttribute('download', data.headers.get('Content-Disposition').split('filename=')[1]);
// link.style.visibility = 'hidden';
// document.body.appendChild(link);
// link.click();
// document.body.removeChild(link);
// })
}
}
<div class="salesWrapper">
<div class="salesContent">
<div class="salesItem" *ngFor="let payScaleItem of payScaleInfos">
<div class="icon_bolck"><span class="iconfont icon-yongjin"></span></div>
<div class="icon_bolck"><span class="iconfont icon-xinzidan"></span></div>
<div class="line">
<div>{{payScaleItem.monDtlPeriod}}</div>
<!-- <span class="iconfont icon-ar-r" style="font-size: 10px;position: relative; right: -2px;"></span> -->
<div>薪资日期</div>
<div>{{lifeCommonService.getDate(payScaleItem.monDtlPeriod)}}</div>
</div>
<div class="line long_line">
<span>实发佣金</span>
<div class="price">¥{{payScaleItem.monDtlRAmount | number: "1.2-2"}}</div>
<div class="line">
<div>流水编号</div>
<div>{{payScaleItem.monShId}}</div>
</div>
<div class="line long_line">
<div class="line">
<span>应发佣金</span>
<div class="price">¥{{payScaleItem.monDtlAmount | number: "1.2-2"}}</div>
<div class="price">¥{{payScaleItem.monDtlAmount | number: "1.0-2"}}</div>
</div>
<div class="line">
<span>扣除税</span>
<div class="price">¥{{(payScaleItem.monDtlAmount-payScaleItem.monDtlRAmount) | number: "1.0-2"}}</div>
</div>
<div class="line long_line">
<div class="line">
<span>实发佣金</span>
<div class="price">¥{{payScaleItem.monDtlRAmount | number: "1.0-2"}}</div>
</div>
<div class="line">
<div></div>
<!-- <div>{{(payScaleItem.createDate).substr(0,10)}}</div> -->
<div (click)="getPdf(payScaleItem.monShId)">详细</div>
<div (click)="getPdf(payScaleItem.monShId)">
薪资单明细
<!-- <span class="iconfont icon-xiazai" style="font-size: 18px;color:#ff3500;"></span> -->
</div>
</div>
</div>
<div style="text-align: center;margin-top: 20px;" *ngIf="payScaleInfos?.length<=0">暂无数据</div>
</div>
</div>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
\ No newline at end of file
......@@ -48,7 +48,7 @@
height: 35px;
position: absolute;
left: 3px;
top: 20px;
top: 50px;
line-height: 30px;
text-align: center;
border-radius: 50%;
......
import { Component, OnInit } from '@angular/core';
import { MyService } from '../my.service';
import { LifeCommonService } from '../../common/life-common.service';
@Component({
selector: 'ydlife-salary',
templateUrl: './salary.component.html',
......@@ -7,11 +9,16 @@ import { MyService } from '../my.service';
})
export class SalaryComponent implements OnInit {
practitionerIdEG: any;
practitionerId: any;
payScaleInfos: Array<any>;
constructor(private myService: MyService) { }
//控制弹框
toastDialog: boolean;
toastInfo: any;
constructor(private myService: MyService, public lifeCommonService: LifeCommonService) { }
ngOnInit() {
this.practitionerIdEG = JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerIdEG'];
this.practitionerId = JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId']
this.payScaleListQuery();
}
......@@ -28,7 +35,22 @@ export class SalaryComponent implements OnInit {
//下载pdf
getPdf(monShId) {
this.myService.payScalePdf({ monShId: monShId })
this.myService.payScalePdf({ monShId: monShId, practitionerId: Number(this.practitionerId) }).subscribe((res) => {
if (res['success']) {
if (res['data']['url']) {
window.open(res['data']['url'])
} else {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '暂无薪资单!',
timeout: 3000,
align: 'center'
};
return;
}
}
})
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta charset="utf-8"/>
<title>IconFont Demo</title>
<link rel="shortcut icon" href="https://img.alicdn.com/tps/i4/TB1_oz6GVXXXXaFXpXXJDFnIXXX-64-64.ico"
type="image/x-icon" />
<link rel="shortcut icon" href="https://img.alicdn.com/tps/i4/TB1_oz6GVXXXXaFXpXXJDFnIXXX-64-64.ico" type="image/x-icon"/>
<link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
<link rel="stylesheet" href="demo.css">
<link rel="stylesheet" href="iconfont.css">
......@@ -15,7 +13,6 @@
<!-- 代码高亮 -->
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
</head>
<body>
<div class="main">
<h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">&#xe86b;</a></h1>
......@@ -26,8 +23,7 @@
<li class="dib"><span>Symbol</span></li>
</ul>
<a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=356495" target="_blank"
class="nav-more">查看项目</a>
<a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=356495" target="_blank" class="nav-more">查看项目</a>
</div>
<div class="tab-container">
......@@ -35,6 +31,18 @@
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xe67a;</span>
<div class="name">薪资单</div>
<div class="code-name">&amp;#xe67a;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe679;</span>
<div class="name">邮箱</div>
<div class="code-name">&amp;#xe679;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe678;</span>
<div class="name">上引号</div>
<div class="code-name">&amp;#xe678;</div>
......@@ -1022,7 +1030,7 @@
</blockquote>
<p>Unicode 使用步骤如下:</p>
<h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
<pre><code class="language-css"
<pre><code class="language-css"
>@font-face {
font-family: 'iconfont';
src: url('iconfont.eot');
......@@ -1034,7 +1042,7 @@
}
</code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
<pre><code class="language-css"
<pre><code class="language-css"
>.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
......@@ -1044,7 +1052,7 @@
}
</code></pre>
<h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
<pre>
<pre>
<code class="language-html"
>&lt;span class="iconfont"&gt;&amp;#x33;&lt;/span&gt;
</code></pre>
......@@ -1057,6 +1065,24 @@
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont icon-xinzidan"></span>
<div class="name">
薪资单
</div>
<div class="code-name">.icon-xinzidan
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-youxiang"></span>
<div class="name">
邮箱
</div>
<div class="code-name">.icon-youxiang
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shangyinhao"></span>
<div class="name">
上引号
......@@ -2529,10 +2555,10 @@
</ul>
<p>使用步骤如下:</p>
<h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
<pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
<pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
</code></pre>
<h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
<pre><code class="language-html">&lt;span class="iconfont icon-xxx"&gt;&lt;/span&gt;
<pre><code class="language-html">&lt;span class="iconfont icon-xxx"&gt;&lt;/span&gt;
</code></pre>
<blockquote>
<p>"
......@@ -2545,6 +2571,22 @@
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-xinzidan"></use>
</svg>
<div class="name">薪资单</div>
<div class="code-name">#icon-xinzidan</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-youxiang"></use>
</svg>
<div class="name">邮箱</div>
<div class="code-name">#icon-youxiang</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shangyinhao"></use>
</svg>
<div class="name">上引号</div>
......@@ -3854,10 +3896,10 @@
</ul>
<p>使用步骤如下:</p>
<h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
<pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
<pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
</code></pre>
<h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
<pre><code class="language-html">&lt;style&gt;
<pre><code class="language-html">&lt;style&gt;
.icon {
width: 1em;
height: 1em;
......@@ -3868,7 +3910,7 @@
&lt;/style&gt;
</code></pre>
<h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
<pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
<pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
&lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt;
&lt;/svg&gt;
</code></pre>
......@@ -3897,5 +3939,4 @@
})
</script>
</body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6,6 +6,20 @@
"description": "",
"glyphs": [
{
"icon_id": "4908034",
"name": "薪资单",
"font_class": "xinzidan",
"unicode": "e67a",
"unicode_decimal": 59002
},
{
"icon_id": "9592761",
"name": "邮箱",
"font_class": "youxiang",
"unicode": "e679",
"unicode_decimal": 59001
},
{
"icon_id": "816614",
"name": "上引号",
"font_class": "shangyinhao",
......
......@@ -20,6 +20,12 @@ Created by iconfont
/>
<missing-glyph />
<glyph glyph-name="xinzidan" unicode="&#59002;" d="M311.935 263.783h400.573V222.82600000000002H311.935v40.9593Zm0-130.123h400.573V92.70100000000002H311.935v40.9593Zm0 130.123M927.063 722.912c0 21.7363-9.90713 39.3328-28.5385 50.8662-36.0795 22.4757-75.2643 44.9517-111.492 67.2796-15.5261 9.61134-31.7916 14.491-48.0571 14.491s-32.3828-4.87963-47.909-14.491c-21.1451-13.0123-42.1423-26.1724-63.1395-39.3328-20.9971 13.3079-42.1423 26.4683-63.435 39.6286-15.3785 9.4635-37.4105 14.1953-53.6759 14.1953-16.2653 0-38.4455-4.87963-53.9714-14.491-21.1451-13.0123-42.1423-26.1724-63.1395-39.3328-21.1451 13.3079-42.1423 26.4683-63.435 39.4805-15.3785 9.4635-31.4958 14.343-47.7612 14.343-16.2653 0-29.2778-4.87963-44.8036-14.343-23.8065-14.7868-53.9714-29.8691-77.4823-44.5079l-28.3905-15.3785c-14.6388-8.87205-37.2626-15.2303-37.2626-43.7687v-748.208c0-47.6133 28.6863-78.2219 73.0465-78.2219h683.294c22.4757 0 38.8891 7.39338 53.0844 21.293 10.3507 10.2028 22.6238 28.982 22.6238 60.4778 0.147868 222.836 0.147868 439.019 0.443601 730.02Zm-792.716 58.7033c1.18293 0.147868 2.51374 0.443601 2.21799 0.147868-0.147868 0-1.18293 0-2.21799-0.147868Zm717.156-829.682H168.062c-7.83698 0-32.2351 0-32.2351 22.6238V741.542l12.5686 7.98484c0.295734 0.147868 10.9422 5.91469 11.2379 6.06257l30.017 15.9696c7.98484 4.58389 46.2825 22.9194 74.673 38.8891 7.83698 4.43602 12.5686 5.61897 18.4834 5.61897s11.9773-1.92227 18.4834-6.06257c24.2501-14.9346 48.5004-30.017 72.6028-45.2474 6.65405-4.14028 13.1601-6.21043 20.1099-6.21043 6.8019 0 13.456 2.07015 19.8141 6.06257l0.147868 0.147868c24.2501 15.5261 49.0919 29.4257 72.455 43.9166 6.65405 4.14028 18.7792 6.06257 24.546 6.06257 5.76682 0 17.8919-1.92227 24.546-5.91469 24.2501-14.9346 48.3525-30.017 72.3073-45.2474 6.50615-4.14028 13.1601-6.21043 20.1099-6.21043 7.09762 0 13.7517 2.07015 20.4057 6.35829 23.6586 14.9346 47.6133 29.8691 72.0114 44.9517 6.65405 4.14028 15.2303 8.5763 21.1451 8.5763s8.13268-0.443601 22.1799-5.91469c39.4805-15.6739 73.9338-42.1423 110.013-64.618 1.33079-0.739338 1.77441-1.33079 1.92227-1.47868 0-0.295734 10.3507-6.21043 10.3507-7.39338-0.295734-291.003-0.147868-536.907 0-759.743 0.295734-22.9194-22.6238-26.1724-34.4531-26.1724Zm0 0M410.267 466.806c-15.3785 0-27.7988-5.0275-27.7988-20.4057s12.4209-20.4057 27.7988-20.4057h79.1091v-62.2522c0-9.90713 2.36586-19.0749 10.9422-24.1023 8.5763-5.0275 10.3507-5.0275 18.927 0 8.5763 5.0275 9.4635 14.1953 9.4635 24.1023v62.2522h80.5876c15.0825 0.443601 27.2078 5.32322 27.2078 20.4057 0 15.0825-11.9773 20.1099-27.2078 20.4057h-80.5876v41.9943h80.5876c10.055-0.147868 19.9619 1.03507 24.3981 10.055 2.66161 5.47108 1.77441 13.0123 0 17.0048-4.14028 9.16777-14.343 13.8995-24.3981 13.7517h-80.5876v1.92227l72.6028 64.0267c6.94975 7.09762 9.75928 17.3007 7.09762 26.9119-2.66161 9.61134-3.40094 10.7943-13.0123 13.3079-9.61134 2.51374-18.1876 0.443601-25.1374-6.65405L510.077 580.663l-60.9214 71.7156c-6.94975 7.09762-15.8219 9.4635-25.4333 6.94975-9.61134-2.51374-10.055-7.09762-12.5686-16.5612-2.66161-9.61134 0.147868-19.8141 7.09762-26.9119l71.1242-64.0267v-1.92227h-79.1091c-15.3785 0-27.7988-6.65405-27.7988-21.8843 0-14.1953 12.4209-18.927 27.7988-18.927h79.1091V466.806h-79.1091Zm0 0" horiz-adv-x="1024" />
<glyph glyph-name="youxiang" unicode="&#59001;" d="M983.899806 110.614218V671.113777h0.180631l-0.180631 4.696419c-0.180632 5.238314-0.722526 10.476627-1.806315 15.714941-2.890104 25.469042-21.675781 44.977245-45.519139 47.686717H122.287529c-11.741048 0-23.482096-1.625684-34.861881-5.238314-30.346093-10.295996-50.757453-40.100194-50.576821-74.058917v-534.849885c-0.361263-21.314518 5.780208-42.087141 17.701887-59.789028l0.361263-0.722526 5.418946-3.973893c18.243782-21.856412 44.977245-34.319986 73.517022-34.500618H904.421944c37.751984 0 70.265655 27.094726 79.477862 66.291763l0.180631 0.541894c0.361263 5.96084 0.361263 11.741048-0.180631 17.701888zM390.16405 348.505909l55.453872-49.854295 43.893456-40.100194c5.418945-5.96084 13.005468-9.57347 21.133886-9.57347 7.947786 0 15.534309 3.431999 21.133886 9.57347l101.153642 91.941436 272.753572-263.721997H126.622685L390.16405 348.505909z m120.119951-30.346092L111.449638 679.96472H115.604163c214.409596 0.903158 703.559711 2.890104 793.875463 0.361263l-399.195625-362.166166z m165.458458 69.72376l251.619686 227.956959v-474.518963L675.742459 387.883577z m-328.568707-0.180631L93.205856 135.721997V617.104957l253.967896-229.402011z" horiz-adv-x="1024" />
<glyph glyph-name="shangyinhao" unicode="&#59000;" d="M505.6 691.2c0-12.8-12.8-25.6-44.8-44.8C307.2 531.2 236.8 441.6 236.8 371.2c0-38.4 25.6-70.4 70.4-83.2 70.4-25.6 96-70.4 96-115.2 0-38.4-19.2-134.4-134.4-134.4-89.6 0-204.8 64-204.8 217.6C64 409.6 211.2 576 416 723.2 428.8 736 441.6 736 448 736c12.8 0 25.6-6.4 38.4-19.2C499.2 704 505.6 697.6 505.6 691.2zM960 691.2c0-12.8-12.8-25.6-44.8-44.8-153.6-108.8-224-204.8-224-275.2 0-38.4 25.6-70.4 70.4-83.2 70.4-25.6 96-70.4 96-115.2 0-38.4-19.2-134.4-134.4-134.4-89.6 0-204.8 64-204.8 217.6 0 160 147.2 326.4 352 473.6 12.8 12.8 25.6 12.8 38.4 12.8C928 736 960 704 960 691.2z" horiz-adv-x="1024" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment