SalarysStatistics.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <template>
  2. <a-card :bordered="false">
  3. <!-- 查询区域 -->
  4. <div class="table-page-search-wrapper">
  5. <a-form layout="inline" @keyup.enter.native="searchQuery">
  6. <a-row :gutter="24">
  7. <a-col :xl="5" :lg="7" :md="8" :sm="24">
  8. <a-form-item label="时间">
  9. <a-range-picker
  10. style="width: 100% !important"
  11. v-model="DateTime"
  12. :allowClear = 'false'
  13. format="YYYY-MM"
  14. :mode="mode2"
  15. :open="open"
  16. :placeholder="['开始时间', '结束时间']"
  17. @panelChange="handlePanelChange2"
  18. @openChange="onDateChange"
  19. @change="changeData"
  20. />
  21. </a-form-item>
  22. </a-col>
  23. <a-col :xl="5" :lg="7" :md="8" :sm="24">
  24. <a-form-item label="公司">
  25. <a-input placeholder="" v-model="queryParam.sysOrgCode"/>
  26. </a-form-item>
  27. </a-col>
  28. <a-col :xl="5" :lg="7" :md="8" :sm="24">
  29. <a-form-item label="部门">
  30. <j-search-select-tag v-model="queryParam.sysOrgCode" placeholder="请选择部门"
  31. dict="sys_depart,depart_name,depart_name,org_type='3' or org_code='TBD' order by org_code"/>
  32. </a-form-item>
  33. </a-col>
  34. <a-col :xl="5" :lg="7" :md="8" :sm="24">
  35. <a-form-item label="姓名">
  36. <j-search-select-tag v-model="queryParam.name" placeholder="请选择名称"
  37. dict="sys_user,realname,realname" allowClear/>
  38. </a-form-item>
  39. </a-col>
  40. <a-col :xl="4" :lg="7" :md="8" :sm="24">
  41. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  42. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  43. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  44. </span>
  45. </a-col>
  46. </a-row>
  47. </a-form>
  48. </div>
  49. <!-- 操作按钮区域 -->
  50. <a-table
  51. ref="table"
  52. size="middle"
  53. bordered
  54. rowKey="userId"
  55. :columns="columns"
  56. :dataSource="dataSource"
  57. :pagination="ipagination"
  58. :scroll="{x: 2000}"
  59. :loading="loading"
  60. @change="handleTableChange">
  61. </a-table>
  62. </div>
  63. <!-- table区域-end -->
  64. <!-- 表单区域 -->
  65. </a-card>
  66. </template>
  67. <script>
  68. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  69. import { getAction } from '@/api/manage'
  70. import moment from 'moment'
  71. import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
  72. export default {
  73. name: "SalarysStatistics",
  74. mixins: [JeecgListMixin],
  75. components: {
  76. moment,
  77. JSearchSelectTag
  78. },
  79. data () {
  80. return {
  81. description: '薪资统计',
  82. DateTime:[moment().subtract(1, 'months'),moment().subtract(1, 'months'),],
  83. mode2: ['month', 'month'],
  84. open:false,
  85. // 表头
  86. columns: [
  87. {
  88. title: '序号',
  89. width: 80,
  90. align:"center",
  91. dataIndex: 'code',
  92. customRender:function (t, r, index) {
  93. return parseInt(index)+1;
  94. }
  95. },
  96. {
  97. title: '姓名',
  98. align:"center",
  99. dataIndex: 'name',
  100. },
  101. {
  102. title: '基本薪资',
  103. align:"center",
  104. dataIndex: 'wages',
  105. },
  106. {
  107. title: '话费补贴',
  108. align:"center",
  109. dataIndex: 'phoneBill'
  110. },
  111. {
  112. title: '午餐补贴',
  113. align:"center",
  114. dataIndex: 'lunch'
  115. },
  116. {
  117. title: '住房补贴',
  118. align:"center",
  119. dataIndex: 'housingSubsidies',
  120. },
  121. {
  122. title: '全勤奖',
  123. align:"center",
  124. dataIndex: 'fullAttendance'
  125. },
  126. {
  127. title: '加班工资',
  128. align:"center",
  129. dataIndex: 'overtimePay'
  130. },
  131. {
  132. title: '年休工资',
  133. align:"center",
  134. dataIndex: 'yearSalary'
  135. },
  136. {
  137. title: '合计应发',
  138. align:"center",
  139. dataIndex: 'totalPayable'
  140. },
  141. {
  142. title: '社保',
  143. align:"center",
  144. dataIndex: 'socialSecurity'
  145. },
  146. {
  147. title: '公积金',
  148. align:"center",
  149. dataIndex: 'accumulationFund'
  150. },
  151. {
  152. title: '个税',
  153. align:"center",
  154. dataIndex: 'personalTax'
  155. },
  156. {
  157. title: '迟到',
  158. align:"center",
  159. dataIndex: 'latenessCost'
  160. },
  161. {
  162. title: '事假',
  163. align:"center",
  164. dataIndex: 'personalCost'
  165. },
  166. {
  167. title: '病假',
  168. align:"center",
  169. dataIndex: 'sickCost'
  170. },
  171. {
  172. title: '婚假',
  173. align:"center",
  174. dataIndex: 'marriageCost'
  175. },
  176. {
  177. title: '丧假',
  178. align:"center",
  179. dataIndex: 'funeralCost'
  180. },
  181. {
  182. title: '合计应扣',
  183. align:"center",
  184. dataIndex: 'totalDeduction'
  185. },
  186. {
  187. title: '实发合计',
  188. align:"center",
  189. dataIndex: 'actualOccurrence'
  190. },
  191. ],
  192. ipagination:{},
  193. queryParam:{
  194. beginDate:moment().subtract(1, 'months').format('YYYY-MM'),
  195. endDate:moment().subtract(1, 'months').format('YYYY-MM')
  196. },
  197. dataSource:[{}],
  198. // 请求参数
  199. // url: {
  200. // },
  201. }
  202. },
  203. computed: {},
  204. created () {
  205. this.getTableList()
  206. },
  207. methods: {
  208. getTableList(){
  209. getAction('/salary/salaryManagement/querySalaryTotalList',this.queryParam).then(res=>{
  210. if(res.success){
  211. this.dataSource =res.result.records
  212. this.ipagination = {
  213. total: res.result.total,
  214. current: res.result.current,
  215. pageSize: res.result.size
  216. }
  217. }else{
  218. this.$message.error(res.message);
  219. }
  220. })
  221. },
  222. changeData(value){
  223. this.DateTime = value
  224. },
  225. onDateChange(status) {
  226. if(status){
  227. this.open = true;
  228. }else{
  229. this.open = false
  230. }
  231. },
  232. handlePanelChange2(value,mode){
  233. if (this.DateTime[1] && this.DateTime[1]._d != value[1]._d) {
  234. this.open = false;
  235. }
  236. this.DateTime = value
  237. this.queryParam.beginDate = this.DateTime[0]&&this.DateTime[0]!==''?moment(this.DateTime[0]).format('YYYY-MM'):''
  238. this.queryParam.endDate = this.DateTime[1]&&this.DateTime[1]!==''?moment(this.DateTime[1]).format('YYYY-MM'):''
  239. this.mode2 = [mode[0] === 'date' ? 'month' : mode[0], mode[1] === 'date' ? 'month' : mode[1]];
  240. },
  241. searchQuery(){
  242. this.queryParam.pageNo = 1
  243. this.getTableList()
  244. },
  245. searchReset(){
  246. this.queryParam={}
  247. this.getTableList()
  248. },
  249. handleTableChange(pagination, filters, sorter) {
  250. this.queryParam.pageNo = pagination.current
  251. this.queryParam.pageSize = pagination.pageSize
  252. this.getTableList()
  253. },
  254. }
  255. }
  256. </script>
  257. <style scoped>
  258. @import '~@assets/less/common.less'
  259. </style>