Commit 0d7933f5 by cocomilk2012

update

parent 1b83de3e
import { toMoney, formatDate, isNull } from "../utils/public"; import { toMoney, formatDate, isNull } from '../utils/public';
//格式化日期 //格式化日期
export const subDate = (value: string, startNum: number, endNum: number) => { export const subDate = (value: string, startNum: number, endNum: number) => {
if (value == null) { if (value == null) {
return null; return null;
} }
return value.substring(startNum, endNum); return value.substring(startNum, endNum);
// formatDate(value,'yyyy-MM') // formatDate(value,'yyyy-MM')
}; };
export const money = (value: String, isSymbol: boolean, isConvertPoint: boolean) => { export const money = (
toMoney(value, isSymbol, isConvertPoint) value: String,
isSymbol: boolean,
isConvertPoint: boolean
) => {
toMoney(value, isSymbol, isConvertPoint);
}; };
export const format = (value: String, pattern: String) => { export const format = (value: String, pattern: String) => {
return value.replace(/\d{2}:\d{2}:\d{2}/i, ""); return value.replace(/\d{2}:\d{2}:\d{2}/i, '');
};
export const isEmpty = (value: string) => {
isNull(value);
};
export const get_thousand_num = (num: number) => {
return num.toString().replace(/\d+/, function(n) {
// 先提取整数部分
return n.replace(/(\d)(?=(\d{3})+$)/g, function($1) {
// 对整数部分添加分隔符
return $1 + ',';
});
});
}; };
export const isEmpty = (value: string) => { isNull(value) }
\ No newline at end of file
...@@ -22,7 +22,9 @@ ...@@ -22,7 +22,9 @@
<label>应收报酬</label> <label>应收报酬</label>
<span <span
>{{ >{{
Payment_receivable ? Number(Payment_receivable).toFixed(2) : 0.0 Payment_receivable
? Number(Payment_receivable).toFixed(2)
: 0.0 | get_thousand_num
}}</span }}</span
> >
</p> </p>
...@@ -30,7 +32,9 @@ ...@@ -30,7 +32,9 @@
<label>已收报酬</label> <label>已收报酬</label>
<span <span
>{{ >{{
receive_receivable ? Number(receive_receivable).toFixed(2) : 0.0 receive_receivable
? Number(receive_receivable).toFixed(2)
: 0.0 | get_thousand_num
}}</span }}</span
> >
</p> </p>
...@@ -75,7 +79,7 @@ ...@@ -75,7 +79,7 @@
{{ {{
Number(item.paidSalary) Number(item.paidSalary)
? Number(item.paidSalary).toFixed(2) ? Number(item.paidSalary).toFixed(2)
: 0.0 : 0.0 | get_thousand_num
}} }}
</h3> </h3>
<p :style="matchColor(item.billStatus)"> <p :style="matchColor(item.billStatus)">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="fe-detial-box"> <div class="fe-detial-box">
<div class="fe-detial-top"> <div class="fe-detial-top">
<h4>任务报酬</h4> <h4>任务报酬</h4>
<h3>+{{ item.paidSalary.toFixed(2) }}</h3> <h3>+{{ item.paidSalary.toFixed(2) | get_thousand_num }}</h3>
<p :style="matchColor(item.status)">{{ item.status }}</p> <p :style="matchColor(item.status)">{{ item.status }}</p>
</div> </div>
<div class="fe-detial-bottom"> <div class="fe-detial-bottom">
......
...@@ -23,20 +23,12 @@ ...@@ -23,20 +23,12 @@
<hr /> <hr />
<div class="box2" id="main-content"> <div class="box2" id="main-content">
<div class="child" v-for="(itemY, indexY) in obj" :key="indexY"> <div class="child" v-for="(itemY, indexY) in obj" :key="indexY">
<span class="year font1">{{ itemY.year }}</span>
<div class="data"> <div class="data">
<div <div
class="month-list" class="month-list"
v-for="(itemM, indexM) in itemY.list" v-for="(itemM, indexM) in itemY.list"
:key="indexM" :key="indexM"
> >
<div class="month">
<span class="font1">{{ Number(itemM.month) }}</span>
<span></span>
<span class="font1">{{
(itemM.sum ? itemM.sum : 0).toFixed(2)
}}</span>
</div>
<div <div
class="slary" class="slary"
v-for="(itemD, indexD) in itemM.list" v-for="(itemD, indexD) in itemM.list"
...@@ -48,12 +40,29 @@ ...@@ -48,12 +40,29 @@
@click="toDetail_click(itemD.id)" @click="toDetail_click(itemD.id)"
> >
<span class="font2">工资 | {{ itemD.abbrName }}</span> <span class="font2">工资 | {{ itemD.abbrName }}</span>
<span></span>
<span class="font2">{{ <span class="font2"
Number(itemD.currentRealWage).toFixed(2) >{{
}}</span> Number(itemD.currentRealWage).toFixed(2)
| get_thousand_num
}}</span
>
<span class="arrow_right"
><img src="../assets/images/agent/next_gray.png" alt
/></span>
</a> </a>
</div> </div>
<div class="month">
<span class="font1"
>{{ itemY.year }}年-{{ Number(itemM.month) }}</span
>
<span class="font1"
>{{
(itemM.sum ? itemM.sum : 0).toFixed(2) | get_thousand_num
}}</span
>
<span></span>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -297,8 +306,14 @@ export default class PaySlips extends Vue { ...@@ -297,8 +306,14 @@ export default class PaySlips extends Vue {
</script> </script>
<style lang="less"> <style lang="less">
body {
background: #fff;
}
.main {
background: #fff;
}
#main-content { #main-content {
width: 90%; width: 100%;
} }
.pay-item-box2 { .pay-item-box2 {
width: 100%; width: 100%;
...@@ -354,7 +369,7 @@ export default class PaySlips extends Vue { ...@@ -354,7 +369,7 @@ export default class PaySlips extends Vue {
.child { .child {
display: grid; display: grid;
grid-template-columns: 72px auto; grid-template-columns: 100%;
} }
.month-list { .month-list {
...@@ -365,15 +380,19 @@ export default class PaySlips extends Vue { ...@@ -365,15 +380,19 @@ export default class PaySlips extends Vue {
.month { .month {
display: grid; display: grid;
grid-template-columns: 162px auto 62px; grid-template-columns: 162px auto 20px;
justify-items: left; justify-items: center;
margin-bottom: 16px; margin-bottom: 16px;
} }
.slary a { .slary a {
display: grid; display: grid;
grid-template-columns: 162px auto 62px; grid-template-columns: 162px auto 20px;
justify-items: left; justify-items: center;
margin-bottom: 16px; margin-bottom: 16px;
} }
.arrow_right img {
width: 9px;
height: 14px;
}
</style> </style>
\ No newline at end of file
...@@ -4,7 +4,11 @@ ...@@ -4,7 +4,11 @@
<div class="slips-mid-top"> <div class="slips-mid-top">
<p>实发工资(元)</p> <p>实发工资(元)</p>
<h3> <h3>
<span>{{ Number(obj[0].currentRealWage).toFixed(2) }}</span> <span
>{{
Number(obj[0].currentRealWage).toFixed(2) | get_thousand_num
}}</span
>
</h3> </h3>
</div> </div>
<div class="slips-mid-bottom"> <div class="slips-mid-bottom">
...@@ -28,48 +32,68 @@ ...@@ -28,48 +32,68 @@
<div class="pay-detail-box"> <div class="pay-detail-box">
<p> <p>
<label>本次收入</label> <label>本次收入</label>
<span>{{ <span
Number(obj[0].currentRealWage) - >{{
Number(obj[0].currentBaseOldInsurance) - (Number(obj[0].currentRealWage) -
Number(obj[0].currentBaseHealthInsurance) - Number(obj[0].currentBaseOldInsurance) -
Number(obj[0].currentUnemploymentInsurance) - Number(obj[0].currentBaseHealthInsurance) -
Number(obj[0].currentFund) - Number(obj[0].currentUnemploymentInsurance) -
Number(obj[0].currentTaxDeduction) Number(obj[0].currentFund) -
}}</span> Number(obj[0].currentTaxDeduction))
| get_thousand_num
}}</span
>
</p> </p>
<p> <p>
<label>养老保险</label> <label>养老保险</label>
<span class="green" <span class="green"
>-{{ Number(obj[0].currentBaseOldInsurance).toFixed(2) }}</span >-{{
Number(obj[0].currentBaseOldInsurance).toFixed(2)
| get_thousand_num
}}</span
> >
</p> </p>
<p> <p>
<label>医疗保险</label> <label>医疗保险</label>
<span class="green" <span class="green"
>-{{ Number(obj[0].currentBaseHealthInsurance).toFixed(2) }}</span >-{{
Number(obj[0].currentBaseHealthInsurance).toFixed(2)
| get_thousand_num
}}</span
> >
</p> </p>
<p> <p>
<label>失业保险</label> <label>失业保险</label>
<span class="green" <span class="green"
>-{{ Number(obj[0].currentUnemploymentInsurance).toFixed(2) }}</span >-{{
Number(obj[0].currentUnemploymentInsurance).toFixed(2)
| get_thousand_num
}}</span
> >
</p> </p>
<p> <p>
<label>住房公积金</label> <label>住房公积金</label>
<span class="green" <span class="green"
>-{{ Number(obj[0].currentFund).toFixed(2) }}</span >-{{
Number(obj[0].currentFund).toFixed(2) | get_thousand_num
}}</span
> >
</p> </p>
<p> <p>
<label>代扣个税</label> <label>代扣个税</label>
<span class="green" <span class="green"
>-{{ Number(obj[0].currentTaxDeduction).toFixed(2) }}</span >-{{
Number(obj[0].currentTaxDeduction).toFixed(2) | get_thousand_num
}}</span
> >
</p> </p>
<p class="wages"> <p class="wages">
<label>实发工资</label> <label>实发工资</label>
<span>-{{ Number(obj[0].currentRealWage).toFixed(2) }}</span> <span
>-{{
Number(obj[0].currentRealWage).toFixed(2) | get_thousand_num
}}</span
>
</p> </p>
</div> </div>
</div> </div>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</div> </div>
</a>--> </a>-->
<a <a
v-if="company_num > 0" v-if="!no_data && company_num > 0"
class="si-child" class="si-child"
id="dispatch-employee" id="dispatch-employee"
@click="toIndex_click" @click="toIndex_click"
...@@ -19,7 +19,12 @@ ...@@ -19,7 +19,12 @@
<p>可查看编辑自己的劳务派遣员工档案信息</p> <p>可查看编辑自己的劳务派遣员工档案信息</p>
</div> </div>
</a> </a>
<a class="si-child" id="flex-employee" @click="toFlex_click"> <a
class="si-child"
id="flex-employee"
v-if="!no_data"
@click="toFlex_click"
>
<img src="../assets/images/agent/flex-employee.png" alt /> <img src="../assets/images/agent/flex-employee.png" alt />
<div class="si-child-desc"> <div class="si-child-desc">
<h4>我是灵活用工员工</h4> <h4>我是灵活用工员工</h4>
...@@ -31,13 +36,14 @@ ...@@ -31,13 +36,14 @@
<script lang='ts'> <script lang='ts'>
import { Component, Vue } from "vue-property-decorator"; import { Component, Vue } from "vue-property-decorator";
import { Toast } from "vant";
@Component({ @Component({
components: {} components: {}
}) })
export default class SelectIdentity extends Vue { export default class SelectIdentity extends Vue {
private id_no: string = ""; private id_no: string = "";
private dispatch_list: any[] = []; private dispatch_list: any[] = [];
private no_data: boolean = false;
get id_no_encrytion(): string { get id_no_encrytion(): string {
return encodeURI(window.btoa(this.id_no)); return encodeURI(window.btoa(this.id_no));
...@@ -94,7 +100,16 @@ export default class SelectIdentity extends Vue { ...@@ -94,7 +100,16 @@ export default class SelectIdentity extends Vue {
localStorage.setItem("birthday", res.data.birthday); localStorage.setItem("birthday", res.data.birthday);
} else { } else {
//TODO: 跳转到实名认证 //TODO: 跳转到实名认证
console.log("跳转到实名认证", res); console.log(
"您还未实名认证,不可进行查询,请先去【我】的页面,点击头像,进行实名认证后再查询"
);
this.no_data = true;
Toast.fail({
duration: 0,
message:
"您还未实名认证,不可进行查询,请先去【我】的页面,点击头像,进行实名认证后再查询"
});
} }
}) })
.catch(err => { .catch(err => {
......
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 sign in to comment