wagesdetails.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477
  1. <template>
  2. <div>
  3. <cu-custom bgColor="bg-gradual-pink" :isBack="true">
  4. <block slot="backText">返回</block>
  5. <block slot="content">薪资查询</block>
  6. </cu-custom>
  7. <div class='month'>
  8. <ul style="list-style-type:none;">
  9. <li class='arrow' @click='pickPre(currentYear,currentMonth)'>上个月</li>
  10. <li class='year-month'>
  11. <span class='choose-year'>{{ currentYear }}年</span>
  12. <span class='choose-month'>{{ currentMonth }}月</span>
  13. </li>
  14. <li class='arrow' @click='pickNext(currentYear,currentMonth)'>下个月</li>
  15. </ul>
  16. <br>
  17. </div>
  18. <div v-for='(item,index) in data'>
  19. <div style="margin-top: 10px;margin-left: 20px;">
  20. <strong style="font-size: 16px;" >{{currentYear}}年{{ currentMonth }}月</strong>
  21. <br>
  22. <br>
  23. <span style="color: #A3A7B1;">应发:&nbsp{{item.yingfa}}</span>
  24. <span class="items">实发:&nbsp{{item.shifa}}</span>
  25. </div>
  26. <br>
  27. <div style="background-color: #FFFFFF;">
  28. <div>
  29. <br>
  30. <strong style="margin-left: 20px;">收入明细</strong>
  31. <br>
  32. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  33. </div>
  34. <div>
  35. <ul>
  36. <li class="s">
  37. <div style="width: 10;height: 10px;"></div>
  38. <span class="fontColr">当月基本工资</span>
  39. <span style="width: 10px;height: 10px;" class="money"></span>
  40. <span class="money">{{item.srWages}}</span>
  41. <br>
  42. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  43. <div style="width: 10;height: 10px;"></div>
  44. </li>
  45. <li class="s">
  46. <span class="fontColr">绩效工资</span>
  47. <span style="width: 10px;height: 10px;" class="money"></span>
  48. <span class="money">{{item.srJxWages}}</span>
  49. <br>
  50. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  51. <div style="width: 10;height: 10px;"></div>
  52. </li>
  53. <li class="s">
  54. <span class="fontColr">考勤工资</span>
  55. <span style="width: 10px;height: 10px;" class="money"></span>
  56. <span class="money">{{item.kqWages}}</span>
  57. <br>
  58. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  59. <div style="width: 10;height: 10px;"></div>
  60. </li>
  61. <li class="s">
  62. <span class="fontColr">考勤天数</span>
  63. <span style="width: 10px;height: 10px;" class="money"></span>
  64. <span class="money">{{item.kqCount}}</span>
  65. <br>
  66. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  67. <div style="width: 10;height: 10px;"></div>
  68. </li>
  69. <li class="s">
  70. <span class="fontColr">加班费</span>
  71. <span style="width: 10px;height: 10px;" class="money"></span>
  72. <span class="money">{{item.srJbWages}}</span>
  73. <br>
  74. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  75. <div style="width: 10;height: 10px;"></div>
  76. </li>
  77. <li class="s">
  78. <span class="fontColr">加班天数</span>
  79. <span style="width: 10px;height: 10px;" class="money"></span>
  80. <span class="money">{{item.jbCount}}</span>
  81. <br>
  82. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  83. <div style="width: 10;height: 10px;"></div>
  84. </li>
  85. <li class="s">
  86. <span class="fontColr">年终奖</span>
  87. <span style="width: 10px;height: 10px;" class="money"></span>
  88. <span class="money">{{item.srYearBonus}}</span>
  89. <br>
  90. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  91. <div style="width: 10;height: 10px;"></div>
  92. </li>
  93. <li class="s">
  94. <span class="fontColr">高温费</span>
  95. <span style="width: 10px;height: 10px;" class="money"></span>
  96. <span class="money">{{item.srGwWages}}</span>
  97. <br>
  98. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  99. <div style="width: 10;height: 10px;"></div>
  100. </li>
  101. </ul>
  102. </div>
  103. </div>
  104. <br>
  105. <div style="background-color: #FFFFFF;">
  106. <div>
  107. <br>
  108. <strong style="margin-left: 20px;">扣款明细</strong>
  109. <br>
  110. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  111. </div>
  112. <div>
  113. <ul>
  114. <li class="s">
  115. <div style="width: 10;height: 10px;"></div>
  116. <span class="fontColr">病假扣款</span>
  117. <span style="width: 10px;height: 10px;" class="money"></span>
  118. <span style="float: right;">{{item.kkLack}}</span>
  119. <br>
  120. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  121. <div style="width: 10;height: 10px;"></div>
  122. </li>
  123. <li class="s">
  124. <span class="fontColr">病假天数</span>
  125. <span style="width: 10px;height: 10px;" class="money"></span>
  126. <span style="float: right;">{{item.bjCount}}</span>
  127. <br>
  128. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  129. <br>
  130. </li>
  131. <li class="s">
  132. <br>
  133. <strong >扣款合计</strong>
  134. <span style="width: 10px;height: 10px;" class="money"></span>
  135. <span class="money">{{item.kkOther}}</span>
  136. <br>
  137. <br>
  138. </li>
  139. </ul>
  140. </div>
  141. </div>
  142. <br>
  143. <div style="background-color: #FFFFFF;">
  144. <div>
  145. <br>
  146. <strong style="margin-left: 20px;">当月五险一金&nbsp;(个人缴纳部分)</strong>
  147. <br>
  148. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  149. </div>
  150. <div>
  151. <ul>
  152. <li class="s">
  153. <div style="width: 10;height: 10px;"></div>
  154. <span class="fontColr">养老个人缴纳部分</span>
  155. <span style="width: 10px;height: 10px;" class="money"></span>
  156. <span style="float: right;">{{item.grPension}}</span>
  157. <br>
  158. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  159. <div style="width: 10;height: 10px;"></div>
  160. </li>
  161. <li class="s">
  162. <span class="fontColr">失业个人缴纳部分</span>
  163. <span style="width: 10px;height: 10px;" class="money"></span>
  164. <span style="float: right;">{{item.grCause}}</span>
  165. <br>
  166. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  167. <div style="width: 10;height: 10px;"></div>
  168. </li>
  169. <li class="s">
  170. <span class="fontColr">医疗个人缴纳部分</span>
  171. <span style="width: 10px;height: 10px;" class="money"></span>
  172. <span style="float: right;">{{item.grMedical}}</span>
  173. <br>
  174. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  175. <div style="width: 10;height: 10px;"></div>
  176. </li>
  177. <li class="s">
  178. <span class="fontColr">公积金个人缴纳部分</span>
  179. <span style="width: 10px;height: 10px;" class="money"></span>
  180. <span style="float: right;">{{item.grFund}}</span>
  181. <br>
  182. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  183. <br>
  184. </li>
  185. </ul>
  186. </div>
  187. </div>
  188. <br>
  189. <div style="background-color: #FFFFFF;">
  190. <div>
  191. <br>
  192. <strong style="margin-left: 20px;">当月五险一金&nbsp;(公司缴纳部分)</strong>
  193. <br>
  194. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  195. </div>
  196. <div>
  197. <ul>
  198. <li class="s">
  199. <div style="width: 10;height: 10px;"></div>
  200. <span class="fontColr">养老金公司缴纳部分</span>
  201. <span style="width: 10px;height: 10px;" class="money"></span>
  202. <span style="float: right;">{{item.gsPension}}</span>
  203. <br>
  204. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  205. <div style="width: 10;height: 10px;"></div>
  206. </li>
  207. <li class="s">
  208. <span class="fontColr">失业公司缴纳部分</span>
  209. <span style="width: 10px;height: 10px;" class="money"></span>
  210. <span style="float: right;">{{item.gsCause}}</span>
  211. <br>
  212. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  213. <div style="width: 10;height: 10px;"></div>
  214. </li>
  215. <li class="s">
  216. <span class="fontColr">医疗公司缴纳部分</span>
  217. <span style="width: 10px;height: 10px;" class="money"></span>
  218. <span style="float: right;">{{item.gsMedical}}</span>
  219. <br>
  220. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  221. <div style="width: 10;height: 10px;"></div>
  222. </li>
  223. <li class="s">
  224. <span class="fontColr">公积金公司缴纳部分</span>
  225. <span style="width: 10px;height: 10px;" class="money"></span>
  226. <span style="float: right;">{{item.gsFund}}</span>
  227. <br>
  228. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  229. <div style="width: 10;height: 10px;"></div>
  230. </li>
  231. <li class="s">
  232. <span class="fontColr">工伤险公司缴纳部分</span>
  233. <span style="width: 10px;height: 10px;" class="money"></span>
  234. <span style="float: right;">{{item.gsInjury}}</span>
  235. <br>
  236. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  237. <div style="width: 10;height: 10px;"></div>
  238. </li>
  239. <li class="s">
  240. <span class="fontColr">生育险公司缴纳部分</span>
  241. <span style="width: 10px;height: 10px;" class="money"></span>
  242. <span style="float: right;">{{item.gsBirth}}</span>
  243. <br>
  244. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  245. <br>
  246. </li>
  247. </ul>
  248. </div>
  249. </div>
  250. <br>
  251. <div style="background-color: #FFFFFF;">
  252. <div>
  253. <br>
  254. <strong style="margin-left: 20px;">税单</strong>
  255. <br>
  256. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  257. </div>
  258. <div>
  259. <ul>
  260. <li class="s">
  261. <div style="width: 10;height: 10px;"></div>
  262. <span class="fontColr">工资代扣税</span>
  263. <span style="width: 10px;height: 10px;" class="money"></span>
  264. <span style="float: right;">{{item.sdPersonal}}</span>
  265. <br>
  266. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  267. <div style="width: 10;height: 10px;"></div>
  268. </li>
  269. <li class="s">
  270. <div style="width: 10;height: 10px;"></div>
  271. <span class="fontColr">年终奖代扣税</span>
  272. <span style="width: 10px;height: 10px;" class="money"></span>
  273. <span style="float: right;">{{item.sdBonus}}</span>
  274. <br>
  275. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  276. <div style="width: 10;height: 10px;"></div>
  277. </li>
  278. <li class="s">
  279. <div style="width: 10;height: 10px;"></div>
  280. <span class="fontColr">扣税合计</span>
  281. <span style="width: 10px;height: 10px;" class="money"></span>
  282. <span style="float: right;">{{item.sdOther}}</span>
  283. <br>
  284. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  285. <div style="width: 10;height: 10px;"></div>
  286. </li>
  287. </ul>
  288. </div>
  289. </div>
  290. <br>
  291. </div>
  292. </div>
  293. </template>
  294. <script>
  295. export default {
  296. data() {
  297. return {
  298. wagesDate:"",
  299. data:[],
  300. userUrl:'/salary/salaryCard/querySalary',
  301. currentMonth: 1,
  302. currentYear: 1970,
  303. }
  304. },
  305. created(){
  306. this.initData()
  307. this.querywages()
  308. },
  309. methods:{
  310. initData: function(cur) {
  311. // var leftcount = 0 // 存放剩余数量
  312. var date
  313. if (cur) {
  314. date = new Date(cur)
  315. } else {
  316. var now = new Date()
  317. date = now;
  318. }
  319. this.currentYear = date.getFullYear()
  320. this.currentMonth = date.getMonth() + 1
  321. var str = this.formatDate(
  322. this.currentYear,
  323. this.currentMonth,
  324. )
  325. },
  326. pickPre: function(year, month) {
  327. var d = new Date(this.formatDate(year, month, 1))
  328. d.setDate(0)
  329. this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
  330. this.querywages()
  331. },
  332. pickNext: function(year, month) {
  333. var d = new Date(this.formatDate(year, month, 1))
  334. var ds=this.formatDate(year, month, null);
  335. var nowDate = new Date();
  336. var dt=this.formatDate(nowDate.getFullYear(),nowDate.getMonth(),null);
  337. if(ds<=dt){
  338. d.setDate(35)
  339. this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
  340. this.querywages()
  341. }
  342. },
  343. // 返回 类似 2016-01-02 格式的字符串
  344. formatDate: function(year, month, day) {
  345. var y = year
  346. var m = month
  347. if (m < 10) m = '0' + m
  348. var d = day
  349. if(day!=null &&day !=""){
  350. if (d < 10) d = '0' + d
  351. return y + '-' + m + '-' + d
  352. }else{
  353. return y + '-' + m
  354. }
  355. },
  356. querywages(){
  357. var id=this.$store.getters.userid;
  358. var deptid=uni.getStorageSync('id');
  359. if(deptid!=null&&deptid!=""){
  360. id=deptid;
  361. }
  362. var date=this.formatDate(this.currentYear,this.currentMonth);
  363. this.$http.get(this.userUrl,{params:{userId:id,date:date}}).then(res=>{
  364. console.log("res",res)
  365. this.data=res.data.data;
  366. //this.wagesDate=this.formatt(this.data[0].wagesDate);
  367. }).catch(err => {
  368. console.log(err);
  369. });
  370. },
  371. formatt:function(e){
  372. var date = new Date(e);
  373. var n="年";
  374. var year=date.getFullYear();
  375. var seperator1 = "月";
  376. var month = date.getMonth() + 1;
  377. var currentdate = year +n+ month + seperator1;
  378. return currentdate;
  379. },
  380. }
  381. }
  382. </script>
  383. <style>
  384. .month ul {
  385. margin: 0;
  386. padding: 0;
  387. display: flex;
  388. justify-content: space-between;
  389. height: 35px;
  390. }
  391. .year-month {
  392. display: flex;
  393. align-items: center;
  394. justify-content: space-around;
  395. margin-top: 10px;
  396. }
  397. .choose-month {
  398. text-align: center;
  399. font-size: 12px;
  400. }
  401. .arrow {
  402. padding: 15px;
  403. color: #999999;
  404. }
  405. .month ul li {
  406. font-size: 12px;
  407. text-transform: uppercase;
  408. letter-spacing: 3px;
  409. }
  410. #calendar {
  411. font-size: 12px;
  412. width: 100%;
  413. margin: 0 auto;
  414. box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.1),
  415. 0 1px 5px 0 rgba(0, 0, 0, 0.12);
  416. }
  417. .month {
  418. width: 100%;
  419. color: #333333;
  420. }
  421. .items{
  422. margin-left: 20px;
  423. color: #A3A7B1;
  424. }
  425. .s{
  426. list-style-type:none;
  427. margin-left: -20px;
  428. }
  429. .fontColr{
  430. color: #A3A7B1;
  431. }
  432. .money{
  433. float: right;
  434. color: #0081FF;
  435. }
  436. .top{
  437. background-color: #5677AC;
  438. width: 100%;
  439. height: 40px;
  440. }
  441. </style>