Payroll.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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="6" :lg="7" :md="8" :sm="24">
  8. <a-form-item label="组织">
  9. <a-select v-model="queryParam.organization">
  10. <a-select-option value="all">所有</a-select-option>
  11. <a-select-option value="Apparel Group">Apparel Group</a-select-option>
  12. <a-select-option value="宁波森语">宁波森语</a-select-option>
  13. <a-select-option value="马菲羊">马菲羊</a-select-option>
  14. </a-select>
  15. </a-form-item>
  16. </a-col>
  17. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  18. <a-form-item label="时间">
  19. <a-range-picker v-model="DateTime" style="width: 100%;" @change="changeStartDate" />
  20. </a-form-item>
  21. </a-col>
  22. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  23. <a-form-item label="类型">
  24. <a-select v-model="queryParam.type">
  25. <a-select-option value="all">所有</a-select-option>
  26. <a-select-option value="加班费">加班费</a-select-option>
  27. <a-select-option value="年休假补贴">年休假补贴</a-select-option>
  28. <a-select-option value="月度工资">月度工资</a-select-option>
  29. </a-select>
  30. </a-form-item>
  31. </a-col>
  32. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  33. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  34. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  35. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  36. </span>
  37. </a-col>
  38. </a-row>
  39. </a-form>
  40. </div>
  41. <!-- 操作按钮区域 -->
  42. <div class="table-operator">
  43. <a-button @click="createMonthlyPayroll" type="primary" icon="plus">生成月度工资单</a-button>
  44. <a-button @click="createOvertimePayroll" type="primary" icon="plus">生成加班工资单</a-button>
  45. <a-button @click="createLeavePayroll" type="primary" icon="plus">生成年休工资单</a-button>
  46. </div>
  47. <!-- table区域-begin -->
  48. <div>
  49. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  50. <i class="anticon anticon-info-circle ant-alert-icon"></i>
  51. <span>已选择</span>
  52. <a style="font-weight: 600">
  53. {{ selectedRowKeys.length }}
  54. </a>
  55. <span>项</span>
  56. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  57. </div>
  58. <a-table
  59. ref="table"
  60. size="middle"
  61. bordered
  62. rowKey="id"
  63. :columns="columns"
  64. :dataSource="dataSource"
  65. :pagination="ipagination"
  66. :scroll="{x: 1000}"
  67. :loading="loading"
  68. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  69. @change="handleTableChange">
  70. <span slot="operation" slot-scope="text, record">
  71. <a @click="handleDetail(record)" >查看详情</a>
  72. <a-divider type="vertical" />
  73. <a @click="handleDownload(record)" >下载</a>
  74. <a-divider type="vertical" />
  75. <a @click="handleexport(record)" >导出</a>
  76. </span>
  77. </a-table>
  78. </div>
  79. <!-- table区域-end -->
  80. <!-- 表单区域 -->
  81. <PayrollDetail ref="PayrollDetail"></PayrollDetail>
  82. </a-card>
  83. </template>
  84. <script>
  85. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  86. import { getAction } from '@/api/manage'
  87. import moment from 'moment'
  88. import PayrollDetail from './modules/PayrollDetail.vue'
  89. export default {
  90. name: "Payroll",
  91. mixins: [JeecgListMixin],
  92. components: {
  93. moment,
  94. PayrollDetail
  95. },
  96. data () {
  97. return {
  98. description: '工资单列表',
  99. DateTime:[],
  100. selectedRowKeys:[],
  101. selectedRows:[],
  102. // 表头
  103. columns: [
  104. {
  105. title: '序号',
  106. width: 80,
  107. align:"center",
  108. dataIndex: 'code'
  109. },
  110. {
  111. title: '类型',
  112. align:"center",
  113. dataIndex: 'type'
  114. },
  115. {
  116. title: '组织',
  117. align:"center",
  118. dataIndex: 'organization'
  119. },
  120. {
  121. title: '发放人数',
  122. align:"center",
  123. dataIndex: 'distributionPersonnelNumber'
  124. },
  125. {
  126. title: '发放薪水',
  127. align:"center",
  128. dataIndex: 'payrollDistribution'
  129. },
  130. {
  131. title: '缴纳个税',
  132. align:"center",
  133. dataIndex: 'payPersonalTax'
  134. },
  135. {
  136. title: '生成时间',
  137. align:"center",
  138. dataIndex: 'generationTime'
  139. },
  140. {
  141. title: '版本',
  142. align:"center",
  143. dataIndex: 'version'
  144. },
  145. {
  146. title: '操作',
  147. align:"center",
  148. dataIndex: 'operation',
  149. width: 200,
  150. scopedSlots: { customRender: 'operation' }
  151. },
  152. ],
  153. queryParam:{},
  154. dataSource:[{}],
  155. // 请求参数
  156. // url: {
  157. // },
  158. }
  159. },
  160. computed: {},
  161. created () {
  162. this.getTableList()
  163. },
  164. methods: {
  165. changeStartDate(data){
  166. this.DateTime = data
  167. this.queryParam.Date_begin = data.length==2?moment(data[0]).format('YYYY-MM-DD'):''
  168. this.queryParam.Date_end = data.length==2?moment(data[1]).format('YYYY-MM-DD'):''
  169. },
  170. getTableList(){
  171. },
  172. createMonthlyPayroll(){
  173. },
  174. createOvertimePayroll(){
  175. },
  176. createLeavePayroll(){
  177. },
  178. handleDetail(record){
  179. this.$refs.PayrollDetail.visible = true
  180. },
  181. handleDownload(record){
  182. },
  183. handleexport(record){
  184. },
  185. onSelectChange(selectedRowKeys, selectionRows) {
  186. this.selectedRowKeys = selectedRowKeys;
  187. this.selectedRows = selectionRows;
  188. },
  189. handleTableChange(pagination, filters, sorter) {
  190. this.queryParam.pageNo = pagination.current
  191. this.queryParam.pageSize = pagination.pageSize
  192. this.getTableList()
  193. },
  194. }
  195. }
  196. </script>
  197. <style scoped>
  198. @import '~@assets/less/common.less'
  199. </style>