wagesdetail.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. flg:false
  64. }
  65. },
  66. created(){
  67. this.querywages()
  68. },
  69. methods:{
  70. querywages(){
  71. /* var da=new Date();
  72. var date=this.formats(da); */
  73. /* ,date:date */
  74. this.$http.get(this.userUrl,{params:{userId:this.$store.getters.userid}}).then(res=>{
  75. console.log("res",res)
  76. this.data=res.data.data;
  77. this.card=res.data.card;
  78. }).catch(err => {
  79. console.log(err);
  80. });
  81. },
  82. jump(s){
  83. this.$store.commit('SET_WAGESDATE',s);
  84. this.$Router.push({name:'wagesdetails'})
  85. },
  86. ats(s){
  87. s.del5="0";
  88. },
  89. acs(s){
  90. s.del5="1";
  91. },
  92. ret(){
  93. this.$Router.push({name:'wages'})
  94. },
  95. formats:function(e){
  96. var date = new Date(e);
  97. var seperator1 = "-";
  98. var year = date.getFullYear();
  99. var month = date.getMonth() + 1;
  100. var strDate = date.getDate();
  101. if (month >= 1 && month <= 9) {
  102. month = "0" + month;
  103. }
  104. if (strDate >= 0 && strDate <= 9) {
  105. strDate = "0" + strDate;
  106. }
  107. var currentdate = year + seperator1 + month + seperator1 + strDate;
  108. return currentdate;
  109. },
  110. }
  111. }
  112. </script>
  113. <style>
  114. .head{
  115. width: 90%;
  116. height: 100px;
  117. background-color: #4681DA;
  118. margin:0 auto;
  119. margin-top: 10px;
  120. border-radius:5px 5px 5px 5px;
  121. box-shadow:0 5px 5px #BAD2F5;
  122. }
  123. .item{
  124. width: 90%;
  125. height: 50px;
  126. background-color: #FFFFFF;
  127. border-radius:5px 5px 5px 5px;
  128. margin:0 auto;
  129. margin-top: 20px;
  130. }
  131. .yhCode{
  132. font-size: 15px;
  133. color: #F5F8FC;
  134. }
  135. .yhCodes{
  136. font-size: 20px;
  137. color: #F5F8FC;
  138. margin-left: 5%;
  139. }
  140. .top{
  141. background-color: #5677AC;
  142. width: 100%;
  143. height: 40px;
  144. }
  145. </style>