123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241 |
- <template>
- <a-card :bordered="false">
-
- <!-- 查询区域 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <a-form-item label="组织">
- <a-select v-model="queryParam.orgName">
- <a-select-option value="all">所有</a-select-option>
- <a-select-option value="Apparel Group">Apparel Group</a-select-option>
- <a-select-option value="宁波森语">宁波森语</a-select-option>
- <a-select-option value="马菲羊">马菲羊</a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <a-form-item label="时间">
- <a-month-picker placeholder="请选择" :allowClear="false" v-model="yearWithMonth" @change="onChange" style="width:100% !important"/>
- </a-form-item>
- </a-col>
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <a-form-item label="类型">
- <a-select v-model="queryParam.type">
- <a-select-option value="all">所有</a-select-option>
- <a-select-option value="加班费">加班费</a-select-option>
- <a-select-option value="年休假补贴">年休假补贴</a-select-option>
- <a-select-option value="月度工资">月度工资</a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
- <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
- </span>
- </a-col>
-
- </a-row>
- </a-form>
- </div>
-
- <!-- 操作按钮区域 -->
- <div class="table-operator">
- <a-button @click="createPayroll" type="primary" icon="plus">生成工资单</a-button>
- </div>
-
- <!-- table区域-begin -->
- <div>
- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
- <i class="anticon anticon-info-circle ant-alert-icon"></i>
- <span>已选择</span>
- <a style="font-weight: 600">
- {{ selectedRowKeys.length }}
- </a>
- <span>项</span>
- <a style="margin-left: 24px" @click="onClearSelected">清空</a>
- </div>
-
- <a-table
- ref="table"
- size="middle"
- bordered
- rowKey="id"
- :columns="columns"
- :dataSource="dataSource"
- :pagination="ipagination"
- :scroll="{x: 1000}"
- :loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
- @change="handleTableChange">
- <span slot="operation" slot-scope="text, record">
- <a @click="handleDetail(record)" >查看详情</a>
- <a-divider type="vertical" />
- <a @click="handleDownload(record)" >下载</a>
- <a-divider type="vertical" />
- <a @click="handleexport(record)" >导出</a>
- </span>
- </a-table>
- </div>
- <!-- table区域-end -->
-
- <!-- 表单区域 -->
- <PayrollDetail ref="PayrollDetail"></PayrollDetail>
- <AnnualLeavePayroll ref="AnnualLeavePayroll"></AnnualLeavePayroll>
- <OvertimePayroll ref="OvertimePayroll"></OvertimePayroll>
- <uploadModal ref="uploadModal"></uploadModal>
- </a-card>
- </template>
-
- <script>
-
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import { getAction } from '@/api/manage'
- import moment from 'moment'
- import PayrollDetail from './modules/PayrollDetail.vue'
- import AnnualLeavePayroll from './modules/AnnualLeavePayroll.vue'
- import OvertimePayroll from './modules/OvertimePayroll.vue'
- import uploadModal from './modules/uploadModal.vue'
- import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
- export default {
- name: "Payroll",
- mixins: [JeecgListMixin],
- components: {
- moment,
- PayrollDetail,
- JSearchSelectTag,
- uploadModal,
- AnnualLeavePayroll,
- OvertimePayroll
- },
- data () {
- return {
- description: '工资单列表',
- yearWithMonth:'',
- selectedRowKeys:[],
- selectedRows:[],
- // 表头
- columns: [
- {
- title: '序号',
- width: 80,
- align:"center",
- dataIndex: 'index',
- customRender:function (t, r, index) {
- return parseInt(index)+1;
- }
- },
- {
- title: '类型',
- align:"center",
- dataIndex: 'type'
- },
- {
- title: '组织',
- align:"center",
- dataIndex: 'orgName'
- },
- {
- title: '发放人数',
- align:"center",
- dataIndex: 'numberPeople'
- },
- {
- title: '发放薪水',
- align:"center",
- dataIndex: 'salary'
- },
- {
- title: '缴纳个税',
- align:"center",
- dataIndex: 'personalTax'
- },
- {
- title: '生成时间',
- align:"center",
- dataIndex: 'generationTime'
- },
- {
- title: '版本',
- align:"center",
- dataIndex: 'version'
- },
- {
- title: '操作',
- align:"center",
- dataIndex: 'operation',
- width: 200,
- scopedSlots: { customRender: 'operation' }
- },
- ],
- queryParam:{},
- dataSource:[],
- // 请求参数
- // url: {
- // },
- }
- },
- computed: {},
- created () {
- this.getTableList()
- },
- methods: {
- onChange(data){
- this.yearWithMonth = data
- this.queryParam.yearWithMonth = this.yearWithMonth?moment(this.yearWithMonth).format('YYYY-MM'):''
- },
- getTableList(){
- this.loading = true
- getAction('/salary/salaryManagement/list',this.queryParam).then(res=>{
- if(res.success){
- this.loading = false
- this.dataSource =res.result.records
- this.ipagination = {
- total: res.result.total,
- current: res.result.current,
- pageSize: res.result.size
- }
- }else{
- this.$message.error(res.message);
- }
- })
- },
- createPayroll(){
- this.$refs.uploadModal.visible = true
- },
- handleDetail(record){
- if(record.type=='加班工资单'){
- this.$refs.OvertimePayroll.visible = true
- this.$refs.OvertimePayroll.detail(record.id)
- }else if(record.type=='年休工资单'){
- this.$refs.AnnualLeavePayroll.visible = true
- }else if(record.type=='月度工资'){
- this.$refs.PayrollDetail.visible = true
- this.$refs.PayrollDetail.detail(record.id)
- }
- },
- handleDownload(record){
- },
- handleexport(record){
- },
- onSelectChange(selectedRowKeys, selectionRows) {
- this.selectedRowKeys = selectedRowKeys;
- this.selectedRows = selectionRows;
- },
- handleTableChange(pagination, filters, sorter) {
- this.queryParam.pageNo = pagination.current
- this.queryParam.pageSize = pagination.pageSize
- this.getTableList()
- },
- }
- }
- </script>
- <style scoped>
- @import '~@assets/less/common.less'
- </style>
|