Browse Source

工资单-月度工资详情

jingbb 1 year ago
parent
commit
f2b1bd3fa5

+ 31 - 13
src/views/oa/salary_management/personnelSalary/Payroll.vue

@@ -7,7 +7,7 @@
           <a-row :gutter="24">
             <a-col :xl="6" :lg="7" :md="8" :sm="24">
               <a-form-item label="组织">
-                <a-select  v-model="queryParam.organization">
+                <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>
@@ -17,7 +17,7 @@
             </a-col>
             <a-col :xl="6" :lg="7" :md="8" :sm="24">
               <a-form-item label="时间">
-                <a-range-picker v-model="DateTime"  style="width: 100%;" @change="changeStartDate" />
+                <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">
@@ -99,12 +99,14 @@
     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
@@ -112,7 +114,7 @@
       data () {
         return {
           description: '工资单列表',
-          DateTime:[],
+          yearWithMonth:'',
           selectedRowKeys:[],
           selectedRows:[],
           // 表头
@@ -121,7 +123,10 @@
               title: '序号',
               width: 80,
               align:"center",
-              dataIndex: 'code'
+              dataIndex: 'index',
+              customRender:function (t, r, index) {
+                    return parseInt(index)+1;
+              }
             },
             {
               title: '类型',
@@ -131,22 +136,22 @@
             {
               title: '组织',
               align:"center",
-              dataIndex: 'organization'
+              dataIndex: 'orgName'
             },
             {
               title: '发放人数',
               align:"center",
-              dataIndex: 'distributionPersonnelNumber'
+              dataIndex: 'numberPeople'
             },
             {
               title: '发放薪水',
               align:"center",
-              dataIndex: 'payrollDistribution'
+              dataIndex: 'salary'
             },
             {
               title: '缴纳个税',
               align:"center",
-              dataIndex: 'payPersonalTax'
+              dataIndex: 'personalTax'
             },
             {
               title: '生成时间',
@@ -179,13 +184,25 @@
         this.getTableList()
       },
       methods: {
-        changeStartDate(data){
-            this.DateTime = data
-            this.queryParam.Date_begin = data.length==2?moment(data[0]).format('YYYY-MM-DD'):''
-            this.queryParam.Date_end = data.length==2?moment(data[1]).format('YYYY-MM-DD'):''
+        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
@@ -197,6 +214,7 @@
             this.$refs.AnnualLeavePayroll.visible = true
           }else if(record.type=='月度工资'){
             this.$refs.PayrollDetail.visible = true
+            this.$refs.PayrollDetail.detail(record.id)
           }
         },
         handleDownload(record){

+ 43 - 38
src/views/oa/salary_management/personnelSalary/modules/PayrollDetail.vue

@@ -15,34 +15,23 @@
             <div class="table-page-search-wrapper">
                 <a-form-model layout="inline" ref="form" :model="formState" >
                     <a-row :gutter="24">
-                        <a-col :md="6" :sm="8">
-                            <a-form-model-item label="时间"  prop="totalNum">
-                                <a-input placeholder="" v-model="formState.DateTime" />
-                            </a-form-model-item>
-                        </a-col>
-                        <a-col :md="6" :sm="8">
-                            <a-form-model-item label="版本" >
-                                <a-input placeholder="请输入" v-model="formState.version"  />
-                            </a-form-model-item>
-                        </a-col>
-                        <a-col :md="6" :sm="8">
+                        <a-col :md="8" :sm="8">
                             <a-form-model-item label="姓名"  >
                                 <a-input placeholder="请输入" v-model="formState.name" />
                             </a-form-model-item>
                         </a-col>
-                        <a-col :md="6" :sm="8">
+                        <a-col :xl="8" :lg="7" :md="8" :sm="24">
+                            <a-form-item label="部门">
+                                <j-search-select-tag v-model="formState.sysOrgCode" placeholder="请选择部门" 
+                                    dict="sys_depart,depart_name,depart_name,org_type='3' or org_code='TBD' order by org_code"/>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :md="8" :sm="8">
                             <a-form-model-item label=""  >
                                 <a-button type="primary" icon="search" @click="searchSonList">查询</a-button>
                             </a-form-model-item>
                         </a-col>
                     </a-row>
-                    <a-row :gutter="24">
-                        <a-col :md="24" :sm="8"> 
-                            <a-form-model-item label="备注"  class="nresume" style="height:100px !important">
-                                <a-input type="textarea" placeholder="请输入" v-model="formState.demo" />
-                            </a-form-model-item>
-                        </a-col>
-                    </a-row>
                 </a-form-model>
                 <a-table
                     bordered
@@ -87,7 +76,7 @@
                 {
                     title: '编号',
                     align: "center",
-                    dataIndex: 'number',
+                    dataIndex: 'code',
                     ellipsis: true,
                     width:'4%'
                 },
@@ -101,119 +90,119 @@
                 {
                     title: '基本薪资',
                     align: "center",
-                    dataIndex: 'organization',
+                    dataIndex: 'wages',
                     ellipsis: true,
                     width:'4%'
                 },
                 {
                     title: '话费补贴',
                     align: "center",
-                    dataIndex: 'salaryCardNumber',
+                    dataIndex: 'phoneBill',
                     ellipsis: true,
                     width:'4%'
                 },
                 {
                     title: '午餐补贴',
                     align: "center",
-                    dataIndex: 'singlesWeekendsOff',
+                    dataIndex: 'lunch',
                     ellipsis: true,
                     width:'4%'
                 },
                 {
                     title: '住房补贴',
                     align: "center",
-                    dataIndex: 'workingHours',
+                    dataIndex: 'housingSubsidies',
                     ellipsis: true,
                     width:'4%'
                 },
                 {
                     title: '交通补贴',
                     align: "center",
-                    dataIndex: 'attendanceDays',
+                    dataIndex: 'transportation',
                     ellipsis: true,
                     width:'4%'
                 },
                 {
                     title: '全勤奖',
                     align: "center",
-                    dataIndex: 'telephoneSubsidy',
+                    dataIndex: 'fullAttendance',
                     ellipsis: true,
                     width:'4%'
                 },
                 {
                     title: '合计应发',
                     align: "center",
-                    dataIndex: 'lunchSubsidy',
+                    dataIndex: 'totalPayable',
                     ellipsis: true,
                     width:'4%'
                 },
                 {
                     title: '社保',
                     align: "center",
-                    dataIndex: 'housingSubsidies',
+                    dataIndex: 'socialSecurity',
                     ellipsis: true,
                     width:'4%'
                 },
                 {
                     title: '公积金',
                     align: "center",
-                    dataIndex: 'transportationSubsidies',
+                    dataIndex: 'accumulationFund',
                     ellipsis: true,
                     width:'4%'
                 },
                 {
                     title: '个税',
                     align: "center",
-                    dataIndex: 'fullAttendanceAward',
+                    dataIndex: 'personalTax',
                     ellipsis: true,
                     width:'4%'
                 },
                 {
                     title: '迟到',
                     align: "center",
-                    dataIndex: 'endowmentInsurance',
+                    dataIndex: 'latenessCost',
                     ellipsis: true,
                     width:'4%'
                 },
                 {
                     title: '事假',
                     align: "center",
-                    dataIndex: 'unemploymentInsurance',
+                    dataIndex: 'personalCost',
                     ellipsis: true,
                     width:'4%'
                 },
                 {
                     title: '病假',
                     align: "center",
-                    dataIndex: 'medicalInsurance',
+                    dataIndex: 'sickCost',
                     ellipsis: true,
                     width:'4%'
                 },
                 {
                     title: '婚假',
                     align: "center",
-                    dataIndex: 'accumulationFund',
+                    dataIndex: 'marriageCost',
                     ellipsis: true,
                     width:'4%'
                 },
                 {
                     title: '丧假',
                     align: "center",
-                    dataIndex: 'salaryDeduction',
+                    dataIndex: 'funeralCost',
                     ellipsis: true,
                     width:'4%'
                 },
                 {
                     title: '合计应扣',
                     align: "center",
-                    dataIndex: 'latenessTimes',
+                    dataIndex: 'totalDeduction',
                     ellipsis: true,
                     width:'4%'
                 },
                 {
                     title: '实发合计',
                     align: "center",
-                    dataIndex: 'lateDeductionFees',
+                    dataIndex: 'actualOccurrence',
                     ellipsis: true,
                     width:'4%'
                 },
@@ -228,8 +217,24 @@
             handleCancel(){
                 this.visible = false
             },
+            detail(id){
+                this.formState = {}
+                this.formState.id = id
+                this.getTableList()
+            },
+            getTableList(){
+                this.loading = true
+                getAction('/salary/salaryManagement/querySalaryManagementDetailByMainId',this.formState).then(res=>{
+                    this.loading = false
+                    if(res.success){
+                        this.dataSource =res.result
+                    }else{
+                        this.$message.error(res.message);
+                    }
+                })
+            },
             searchSonList(){
-
+                this.getTableList()
             }
         }
     }