wagesdetail2.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <template>
  2. <div>
  3. <!-- <div class="top" @click="ret()">
  4. <div style="width: 10%;height: 5px;"></div>
  5. <div style="margin-left: 10px;">
  6. <span style="float: left;width: 20px;height: 20px;">
  7. <image src="../../static/icon/fanhui3.png" style="width: 18px;height: 18px;"></image>
  8. </span>
  9. <div style="margin-top: 5px;">
  10. <span style="color: #FFFFFF;">返回</span>
  11. </div>
  12. </div>
  13. <div style="text-align: center;margin-top: -22px;">
  14. <span style="color: #FFFFFF;">薪资查询</span>
  15. </div>
  16. </div> -->
  17. <cu-custom bgColor="bg-gradual-pink" :isBack="true">
  18. <block slot="backText">返回</block>
  19. <block slot="content">薪资查询</block>
  20. </cu-custom>
  21. <div class="head" v-for='(cd,index) in card'>
  22. <div style="margin-left: 20px;">
  23. <br>
  24. <strong class="yhCode">{{cd.name}}</strong>
  25. <br>
  26. <br>
  27. <div style="margin-top: -10px;">
  28. <strong style="font-size: 20px; color: #F5F8FC; " v-show='cd.del5=="1"'>****</strong>
  29. <strong class="yhCodes" v-show='cd.del5=="1"'>****</strong>
  30. <strong class="yhCodes" v-show='cd.del5=="1"'>****</strong>
  31. <strong class="yhCodes" v-show='cd.del5=="1"'>{{cd.del4}}</strong>
  32. <strong style="font-size: 20px; color: #F5F8FC; " v-show='cd.del5=="0"'>{{cd.del}}</strong>
  33. <strong class="yhCodes" v-show='cd.del5=="0"'>{{cd.del2}}</strong>
  34. <strong class="yhCodes" v-show='cd.del5=="0"'>{{cd.del3}}</strong>
  35. <strong class="yhCodes" v-show='cd.del5=="0"'>{{cd.del4}}</strong>
  36. <span style="margin-left: 5%;margin-top: 5px;" v-show='cd.del5=="1"' @click='ats(cd)'>
  37. <image src="../../static/icon/xians3.png" style="width: 25px;height: 25px;"></image>
  38. </span>
  39. <span style="margin-left: 7%" v-show='cd.del5=="0"' @click='acs(cd)'>
  40. <image src="../../static/icon/yc4.png" style="width: 20px;height: 20px;"></image>
  41. </span>
  42. </div>
  43. </div>
  44. </div>
  45. <div class="item" v-for='(item,index) in data'>
  46. <div style="width: 100%;height: 15px;"></div>
  47. <div style="margin-left: 10px;">
  48. <strong style="font-size: 15px;">{{item.wagesDate}}</strong>
  49. <span style="width: 10px;height: 10px; float: right;" ></span>
  50. <strong style="font-size: 15px;float: right;color: #0081FF;" @click="jump(item.wagesDate)" >¥{{item.shifa}}</strong>
  51. </div>
  52. </div>
  53. </div>
  54. </template>
  55. <script>
  56. import api from '@/api/api'
  57. export default {
  58. data() {
  59. return {
  60. card:[],
  61. data:[],
  62. userUrl:'/salary/salaryCard/querySalary',
  63. }
  64. },
  65. created(){
  66. this.querywages()
  67. },
  68. methods:{
  69. querywages(){
  70. var da=new Date();
  71. var date=this.formats(da);
  72. this.$http.get(this.userUrl,{params:{userId:this.$store.getters.wagesId,date:date}}).then(res=>{
  73. console.log("res",res)
  74. this.data=res.data.data;
  75. this.card=res.data.card;
  76. }).catch(err => {
  77. console.log(err);
  78. });
  79. },
  80. jump(s){
  81. this.$store.commit('SET_WAGESDATE',s);
  82. this.$Router.push({name:'wagesdetails2'})
  83. },
  84. ats(s){
  85. s.del5="0";
  86. },
  87. acs(s){
  88. s.del5="1";
  89. },
  90. ret(){
  91. this.$Router.push({name:'wagesuser'})
  92. },
  93. formats:function(e){
  94. var date = new Date(e);
  95. var seperator1 = "-";
  96. var year = date.getFullYear();
  97. var month = date.getMonth() + 1;
  98. var currentdate = year + seperator1 + month;
  99. return currentdate;
  100. },
  101. }
  102. }
  103. </script>
  104. <style>
  105. .head{
  106. width: 90%;
  107. height: 100px;
  108. background-color: #4681DA;
  109. margin:0 auto;
  110. margin-top: 10px;
  111. border-radius:5px 5px 5px 5px;
  112. box-shadow:0 5px 5px #BAD2F5;
  113. }
  114. .item{
  115. width: 90%;
  116. height: 50px;
  117. background-color: #FFFFFF;
  118. border-radius:5px 5px 5px 5px;
  119. margin:0 auto;
  120. margin-top: 20px;
  121. }
  122. .yhCode{
  123. font-size: 15px;
  124. color: #F5F8FC;
  125. }
  126. .yhCodes{
  127. font-size: 20px;
  128. color: #F5F8FC;
  129. margin-left: 5%;
  130. }
  131. .top{
  132. background-color: #5677AC;
  133. width: 100%;
  134. height: 40px;
  135. }
  136. </style>