You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

173 lines
4.8 KiB

  1. <template>
  2. <view class="page">
  3. <view class="wagesSec1">
  4. <view class="wagesSec1Top">
  5. <view class="text-xxl cuIcon cuIcon-back" @click="tapTime(0)"></view>
  6. <text>{{ today.y }} 年 {{ today.m }} 月</text>
  7. <view class="text-xxl cuIcon cuIcon-right" @click="tapTime(1)"></view>
  8. </view>
  9. <view class="wagesSec1T">¥{{ fsalary }}</view>
  10. <view class="wagesSec1Txt">{{ today.y }}年{{ today.m }}月实发工资</view>
  11. </view>
  12. <view class="wagesSec2">
  13. <view v-for="(item, i) in wagesData" :key="i">
  14. <view v-show="num == i">
  15. <view class="wagesSec2T">应发金额 <text class="span"></text></view>
  16. <view class="wagesSec2List">
  17. <view class="wagesSec2ListLi">基本工资<text class="span">¥ {{ item.BaseSalary }} </text></view>
  18. <view class="wagesSec2ListLi">职位补贴<text class="span">¥ {{ item.JobSubsidies }} </text></view>
  19. <view class="wagesSec2ListLi">绩效工资<text class="span">¥ {{ item.PerformanceBonus }} </text></view>
  20. <view class="wagesSec2ListLi">手机费<text class="span">¥ {{ item.MobilePhoneFee }} </text></view>
  21. <view class="wagesSec2ListLi">交通费<text class="span">¥ {{ item.TransportationFee }} </text></view>
  22. <view class="wagesSec2ListLi">全勤奖<text class="span">¥ {{ item.AttendanceBonus }} </text></view>
  23. <view class="wagesSec2ListLi">应发金额<text class="span">¥ {{ item.SSalary }} </text></view>
  24. </view>
  25. <view class="wagesSec2T">扣款金额 <text class="span"></text></view>
  26. <view class="wagesSec2List">
  27. <view class="wagesSec2ListLi">养老金保险<text class="span">¥ {{ item.PensionInsurance }} </text></view>
  28. <view class="wagesSec2ListLi">个人所得税<text class="span">¥ {{ item.PersonalIncomeTax }} </text></view>
  29. <view class="wagesSec2ListLi">事假<text class="span">¥ {{ item.PersonalLeave }} </text></view>
  30. <view class="wagesSec2ListLi">迟到<text class="span">¥ {{ item.Late }} </text></view>
  31. <view class="wagesSec2ListLi">病假<text class="span">¥ {{ item.Sick }} </text></view>
  32. <view class="wagesSec2ListLi">个人所得税<text class="span">¥ {{ item.PersonalIncomeTax }} </text></view>
  33. </view>
  34. </view>
  35. </view>
  36. <view style="text-align: center;padding: 10px 0;" v-show="num == -1"> 暂无数据!</view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. import common from '@/common/js/common.js';
  42. export default{
  43. data() {
  44. return {
  45. today: null,
  46. wagesData: null,
  47. num: -1,
  48. fsalary: 0
  49. }
  50. },
  51. methods:{
  52. init() {
  53. let _this = this;
  54. _this.LOADING('加载数据中…');
  55. // _this.HIDE_LOADING();
  56. _this.HTTP_GET('Learun/EducationalAdministration/SalarySheet/list', '', '加载数据时出错').then(res => {
  57. _this.HIDE_LOADING();
  58. console.log(res);
  59. if (res) {
  60. // console.log(res);
  61. _this.wagesData = res;
  62. _this.jisuan()
  63. }
  64. });
  65. },
  66. tapTime(num) {
  67. if (num == 0) {
  68. if (this.today.m == 1) { this.today.y = this.today.y - 1, this.today.m = 12 }
  69. else { this.today.y = this.today.y, this.today.m = this.today.m - 1 }
  70. } else {
  71. if (this.today.m == 12) { this.today.y = this.today.y + 1, this.today.m = 1 }
  72. else { this.today.y = this.today.y, this.today.m = this.today.m + 1 }
  73. }
  74. this.jisuan()
  75. },
  76. jisuan() {
  77. let _this = this;
  78. this.num = -1;
  79. this.fsalary = 0;
  80. this.wagesData.forEach((n, i) => {
  81. if(n.year == _this.today.y && n.month == parseInt(_this.today.m)){
  82. _this.num = i;
  83. _this.fsalary = n.Fsalary;
  84. }
  85. })
  86. // console.log(this.num)
  87. }
  88. },
  89. created() {
  90. let today = common.fmtDate().split('-');
  91. this.today = {
  92. y: today[0],
  93. m: today[1],
  94. d: today[2]
  95. };
  96. this.init()
  97. }
  98. }
  99. </script>
  100. <style lang="less" scoped>
  101. .wagesSec1 {
  102. padding: 14px 12px 30px;
  103. text-align: center;
  104. background: #0c86d8;
  105. }
  106. .wagesSec1Top {
  107. font-size: 0;
  108. }
  109. .wagesSec1Top > * {
  110. display: inline-block;
  111. vertical-align: middle;
  112. color: #bbdefb;
  113. }
  114. .wagesSec1Top text {
  115. width: 185px;
  116. font-size: 14px;
  117. }
  118. .wagesSec1T {
  119. margin-top: 20px;
  120. font-size: 28px;
  121. text-align: center;
  122. color: #fff;
  123. }
  124. .wagesSec1Txt {
  125. font-size: 12px;
  126. color: #bbdefb;
  127. text-align: center;
  128. margin-top: 5px;
  129. }
  130. .wagesSec2 {
  131. background: #fff;
  132. }
  133. .wagesSec2List {
  134. margin: 0px;
  135. padding: 0px;
  136. list-style: none;
  137. }
  138. .wagesSec2ListLi {
  139. list-style: none;
  140. }
  141. .wagesSec2T {
  142. font-size: 15px;
  143. color: #a0a0a0;
  144. padding: 0 12px;
  145. line-height: 40px;
  146. border-bottom: 1px solid #f0f3f5;
  147. }
  148. .wagesSec2T .span {
  149. display: inline-block;
  150. width: 5px;
  151. height: 5px;
  152. background: #ffba00;
  153. vertical-align: middle;
  154. border-radius: 50%;
  155. margin-left: 5px;
  156. position: relative;
  157. top: -2px;
  158. }
  159. .wagesSec2ListLi {
  160. line-height: 40px;
  161. border-bottom: 1px solid #f0f3f5;
  162. font-size: 13px;
  163. color: #646464;
  164. padding: 0 12px;
  165. }
  166. .wagesSec2ListLi .span {
  167. float: right;
  168. color: #8a8a8a;
  169. }
  170. </style>