|
@@ -1,26 +1,23 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <!-- <div class="top" @click="ret()">
|
|
|
|
- <div style="width: 10%;height: 5px;"></div>
|
|
|
|
- <div style="margin-left: 10px;">
|
|
|
|
- <span style="float: left;width: 20px;height: 20px;">
|
|
|
|
- <image src="../../static/icon/fanhui3.png" style="width: 18px;height: 18px;"></image>
|
|
|
|
- </span>
|
|
|
|
- <div style="margin-top: 5px;">
|
|
|
|
- <span style="color: #FFFFFF;">返回</span>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div style="text-align: center;margin-top: -22px;">
|
|
|
|
- <span style="color: #FFFFFF;">薪资查询</span>
|
|
|
|
- </div>
|
|
|
|
- </div> -->
|
|
|
|
<cu-custom bgColor="bg-gradual-pink" :isBack="true">
|
|
<cu-custom bgColor="bg-gradual-pink" :isBack="true">
|
|
<block slot="backText">返回</block>
|
|
<block slot="backText">返回</block>
|
|
<block slot="content">薪资查询</block>
|
|
<block slot="content">薪资查询</block>
|
|
</cu-custom>
|
|
</cu-custom>
|
|
|
|
+ <div class='month'>
|
|
|
|
+ <ul style="list-style-type:none;">
|
|
|
|
+ <li class='arrow' @click='pickPre(currentYear,currentMonth)'>上个月</li>
|
|
|
|
+ <li class='year-month'>
|
|
|
|
+ <span class='choose-year'>{{ currentYear }}年</span>
|
|
|
|
+ <span class='choose-month'>{{ currentMonth }}月</span>
|
|
|
|
+ </li>
|
|
|
|
+ <li class='arrow' @click='pickNext(currentYear,currentMonth)'>下个月</li>
|
|
|
|
+ </ul>
|
|
|
|
+ <br>
|
|
|
|
+ </div>
|
|
<div v-for='(item,index) in data'>
|
|
<div v-for='(item,index) in data'>
|
|
<div style="margin-top: 10px;margin-left: 20px;">
|
|
<div style="margin-top: 10px;margin-left: 20px;">
|
|
- <strong style="font-size: 16px;" >{{wagesDate}}</strong>
|
|
+ <strong style="font-size: 16px;" >{{currentYear}}年{{ currentMonth }}月</strong>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<span style="color: #A3A7B1;">应发: {{item.yingfa}}</span>
|
|
<span style="color: #A3A7B1;">应发: {{item.yingfa}}</span>
|
|
@@ -56,17 +53,17 @@
|
|
<div style="width: 10;height: 10px;"></div>
|
|
<div style="width: 10;height: 10px;"></div>
|
|
</li>
|
|
</li>
|
|
<li class="s">
|
|
<li class="s">
|
|
- <span class="fontColr">奖金提成</span>
|
|
+ <span class="fontColr">考勤工资</span>
|
|
<span style="width: 10px;height: 10px;" class="money"></span>
|
|
<span style="width: 10px;height: 10px;" class="money"></span>
|
|
- <span class="money">{{item.srBonus}}</span>
|
|
+ <span class="money">{{item.kqWages}}</span>
|
|
<br>
|
|
<br>
|
|
<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
|
|
<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
|
|
<div style="width: 10;height: 10px;"></div>
|
|
<div style="width: 10;height: 10px;"></div>
|
|
</li>
|
|
</li>
|
|
<li class="s">
|
|
<li class="s">
|
|
- <span class="fontColr">补贴</span>
|
|
+ <span class="fontColr">考勤天数</span>
|
|
<span style="width: 10px;height: 10px;" class="money"></span>
|
|
<span style="width: 10px;height: 10px;" class="money"></span>
|
|
- <span class="money">{{item.srSubsidy}}</span>
|
|
+ <span class="money">{{item.kqCount}}</span>
|
|
<br>
|
|
<br>
|
|
<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
|
|
<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
|
|
<div style="width: 10;height: 10px;"></div>
|
|
<div style="width: 10;height: 10px;"></div>
|
|
@@ -80,37 +77,23 @@
|
|
<div style="width: 10;height: 10px;"></div>
|
|
<div style="width: 10;height: 10px;"></div>
|
|
</li>
|
|
</li>
|
|
<li class="s">
|
|
<li class="s">
|
|
- <span class="fontColr">离职补偿金</span>
|
|
+ <span class="fontColr">加班天数</span>
|
|
- <span style="width: 10px;height: 10px;" class="money"></span>
|
|
|
|
- <span class="money">{{item.srQuit}}</span>
|
|
|
|
- <br>
|
|
|
|
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
|
|
|
|
- <div style="width: 10;height: 10px;"></div>
|
|
|
|
- </li>
|
|
|
|
- <li class="s">
|
|
|
|
- <span class="fontColr">固定奖金</span>
|
|
|
|
<span style="width: 10px;height: 10px;" class="money"></span>
|
|
<span style="width: 10px;height: 10px;" class="money"></span>
|
|
- <span class="money">{{item.srGdBonus}}</span>
|
|
+ <span class="money">{{item.jbCount}}</span>
|
|
<br>
|
|
<br>
|
|
<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
|
|
<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
|
|
<div style="width: 10;height: 10px;"></div>
|
|
<div style="width: 10;height: 10px;"></div>
|
|
</li>
|
|
</li>
|
|
<li class="s">
|
|
<li class="s">
|
|
- <span class="fontColr">年终奖</span>
|
|
+ <span class="fontColr">高温费</span>
|
|
<span style="width: 10px;height: 10px;" class="money"></span>
|
|
<span style="width: 10px;height: 10px;" class="money"></span>
|
|
- <span class="money">{{item.srYearBonus}}</span>
|
|
+ <span class="money">{{item.srGwWages}}</span>
|
|
<br>
|
|
<br>
|
|
<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
|
|
<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
|
|
<div style="width: 10;height: 10px;"></div>
|
|
<div style="width: 10;height: 10px;"></div>
|
|
</li>
|
|
</li>
|
|
- <li class="s">
|
|
+
|
|
- <span class="fontColr">其他</span>
|
|
+
|
|
- <span style="width: 10px;height: 10px;" class="money"></span>
|
|
|
|
- <span class="money">{{item.srOther}}</span>
|
|
|
|
- <br>
|
|
|
|
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
|
|
|
|
- <br>
|
|
|
|
- </li>
|
|
|
|
</ul>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -127,7 +110,7 @@
|
|
<ul>
|
|
<ul>
|
|
<li class="s">
|
|
<li class="s">
|
|
<div style="width: 10;height: 10px;"></div>
|
|
<div style="width: 10;height: 10px;"></div>
|
|
- <span class="fontColr">缺勤扣款</span>
|
|
+ <span class="fontColr">病假扣款</span>
|
|
<span style="width: 10px;height: 10px;" class="money"></span>
|
|
<span style="width: 10px;height: 10px;" class="money"></span>
|
|
<span style="float: right;">{{item.kkLack}}</span>
|
|
<span style="float: right;">{{item.kkLack}}</span>
|
|
<br>
|
|
<br>
|
|
@@ -135,13 +118,21 @@
|
|
<div style="width: 10;height: 10px;"></div>
|
|
<div style="width: 10;height: 10px;"></div>
|
|
</li>
|
|
</li>
|
|
<li class="s">
|
|
<li class="s">
|
|
- <span class="fontColr">其他扣款</span>
|
|
+ <span class="fontColr">病假天数</span>
|
|
<span style="width: 10px;height: 10px;" class="money"></span>
|
|
<span style="width: 10px;height: 10px;" class="money"></span>
|
|
- <span style="float: right;">{{item.kkOther}}</span>
|
|
+ <span style="float: right;">{{item.bjCount}}</span>
|
|
<br>
|
|
<br>
|
|
<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
|
|
<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
|
|
<br>
|
|
<br>
|
|
</li>
|
|
</li>
|
|
|
|
+ <li class="s">
|
|
|
|
+ <br>
|
|
|
|
+ <strong >扣款合计</strong>
|
|
|
|
+ <span style="width: 10px;height: 10px;" class="money"></span>
|
|
|
|
+ <span class="money">{{item.kkOther}}</span>
|
|
|
|
+ <br>
|
|
|
|
+ <br>
|
|
|
|
+ </li>
|
|
</ul>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -275,43 +266,13 @@
|
|
<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
|
|
<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
|
|
<div style="width: 10;height: 10px;"></div>
|
|
<div style="width: 10;height: 10px;"></div>
|
|
</li>
|
|
</li>
|
|
- <li class="s">
|
|
+
|
|
- <span class="fontColr">奖金税</span>
|
|
|
|
- <span style="width: 10px;height: 10px;" class="money"></span>
|
|
|
|
- <span style="float: right;">{{item.sdBonus}}</span>
|
|
|
|
- <br>
|
|
|
|
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
|
|
|
|
- <div style="width: 10;height: 10px;"></div>
|
|
|
|
- </li>
|
|
|
|
- <li class="s">
|
|
|
|
- <span class="fontColr">其他</span>
|
|
|
|
- <span style="width: 10px;height: 10px;" class="money"></span>
|
|
|
|
- <span style="float: right;">{{item.sdOther}}</span>
|
|
|
|
- <br>
|
|
|
|
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
|
|
|
|
- <div style="width: 10;height: 10px;"></div>
|
|
|
|
- </li>
|
|
|
|
|
|
|
|
</ul>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<br>
|
|
<br>
|
|
- <div style="background-color: #FFFFFF;">
|
|
+
|
|
-
|
|
|
|
- <div>
|
|
|
|
- <ul>
|
|
|
|
- <li class="s">
|
|
|
|
- <br>
|
|
|
|
- <strong >实发工资</strong>
|
|
|
|
- <span style="width: 10px;height: 10px;" class="money"></span>
|
|
|
|
- <span class="money">{{item.shifa}}</span>
|
|
|
|
- <br>
|
|
|
|
- <br>
|
|
|
|
- </li>
|
|
|
|
-
|
|
|
|
- </ul>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -322,18 +283,84 @@
|
|
return {
|
|
return {
|
|
wagesDate:"",
|
|
wagesDate:"",
|
|
data:[],
|
|
data:[],
|
|
- userUrl:'/salary/salaryCard/querySalary'
|
|
+ userUrl:'/salary/salaryCard/querySalary',
|
|
|
|
+ currentMonth: 1,
|
|
|
|
+ currentYear: 1970,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created(){
|
|
created(){
|
|
this.querywages()
|
|
this.querywages()
|
|
|
|
+ this.initData()
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
|
|
+ initData: function(cur) {
|
|
|
|
+ // var leftcount = 0 // 存放剩余数量
|
|
|
|
+ var date
|
|
|
|
+ if (cur) {
|
|
|
|
+ date = new Date(cur)
|
|
|
|
+ } else {
|
|
|
|
+ var now = new Date()
|
|
|
|
+ var d = new Date(this.formatDate(now.getFullYear(), now.getMonth(), 1))
|
|
|
|
+ d.setDate(35)
|
|
|
|
+ date = new Date(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.currentYear = date.getFullYear()
|
|
|
|
+ this.currentMonth = date.getMonth() + 1
|
|
|
|
+
|
|
|
|
+ var str = this.formatDate(
|
|
|
|
+ this.currentYear,
|
|
|
|
+ this.currentMonth,
|
|
|
|
+
|
|
|
|
+ )
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ pickPre: function(year, month) {
|
|
|
|
+ var d = new Date(this.formatDate(year, month, 1))
|
|
|
|
+ d.setDate(0)
|
|
|
|
+ this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
|
|
|
|
+ this.querywages()
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ pickNext: function(year, month) {
|
|
|
|
+ var d = new Date(this.formatDate(year, month, 1))
|
|
|
|
+ var ds=this.formatDate(year, month, null);
|
|
|
|
+ var nowDate = new Date();
|
|
|
|
+ var dt=this.formatDate(nowDate.getFullYear(),nowDate.getMonth(),null);
|
|
|
|
+
|
|
|
|
+ if(ds<=dt){
|
|
|
|
+ d.setDate(35)
|
|
|
|
+ this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
|
|
|
|
+ this.querywages()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 返回 类似 2016-01-02 格式的字符串
|
|
|
|
+ formatDate: function(year, month, day) {
|
|
|
|
+ var y = year
|
|
|
|
+ var m = month
|
|
|
|
+ if (m < 10) m = '0' + m
|
|
|
|
+ var d = day
|
|
|
|
+ if(day!=null &&day !=""){
|
|
|
|
+ if (d < 10) d = '0' + d
|
|
|
|
+ return y + '-' + m + '-' + d
|
|
|
|
+ }else{
|
|
|
|
+ return y + '-' + m
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ },
|
|
querywages(){
|
|
querywages(){
|
|
- this.$http.get(this.userUrl,{params:{userId:this.$store.getters.userid,date:this.$store.getters.wagesDate}}).then(res=>{
|
|
+ var id=this.$store.getters.userid;
|
|
|
|
+ var deptid=uni.getStorageSync('id');
|
|
|
|
+ if(deptid!=null&&deptid!=""){
|
|
|
|
+ id=deptid;
|
|
|
|
+ }
|
|
|
|
+ var date=this.formatDate(this.currentYear,this.currentMonth);
|
|
|
|
+ this.$http.get(this.userUrl,{params:{userId:id,date:date}}).then(res=>{
|
|
console.log("res",res)
|
|
console.log("res",res)
|
|
this.data=res.data.data;
|
|
this.data=res.data.data;
|
|
- this.wagesDate=this.formatt(this.data[0].wagesDate);
|
|
+ //this.wagesDate=this.formatt(this.data[0].wagesDate);
|
|
|
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
console.log(err);
|
|
console.log(err);
|
|
@@ -350,15 +377,58 @@
|
|
var currentdate = year +n+ month + seperator1;
|
|
var currentdate = year +n+ month + seperator1;
|
|
return currentdate;
|
|
return currentdate;
|
|
},
|
|
},
|
|
- ret(){
|
|
+
|
|
- this.$Router.push({name:'wagesdetail'})
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style>
|
|
<style>
|
|
|
|
+ .month ul {
|
|
|
|
+ margin: 0;
|
|
|
|
+ padding: 0;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ height: 35px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .year-month {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: space-around;
|
|
|
|
+ margin-top: 10px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .choose-month {
|
|
|
|
+ text-align: center;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .arrow {
|
|
|
|
+ padding: 15px;
|
|
|
|
+ color: #999999;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .month ul li {
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ text-transform: uppercase;
|
|
|
|
+ letter-spacing: 3px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ #calendar {
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ width: 100%;
|
|
|
|
+ margin: 0 auto;
|
|
|
|
+ box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.1),
|
|
|
|
+ 0 1px 5px 0 rgba(0, 0, 0, 0.12);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .month {
|
|
|
|
+ width: 100%;
|
|
|
|
+ color: #333333;
|
|
|
|
+
|
|
|
|
+ }
|
|
.items{
|
|
.items{
|
|
margin-left: 20px;
|
|
margin-left: 20px;
|
|
color: #A3A7B1;
|
|
color: #A3A7B1;
|