liuhj před 1 rokem
rodič
revize
1835f9da1f
3 změnil soubory, kde provedl 315 přidání a 168 odebrání
  1. 24 7
      src/components/Enroll.vue
  2. 2 1
      src/components/Login.vue
  3. 289 160
      src/components/system/Payroll.vue

+ 24 - 7
src/components/Enroll.vue

@@ -124,9 +124,9 @@
           <el-input type="textarea" v-model="ruleForm.desc"></el-input>
         </el-form-item>
         <div class="enroll-btn">
-          <el-button type="primary" @click="submitForm('ruleForm')"
-            >立即注册</el-button>
+          <el-button type="primary" @click="submitForm('ruleForm')">立即注册</el-button>
           <el-button @click="resetForm('ruleForm')">重置</el-button>
+          <el-button @click="houtui()">返回</el-button>
         </div>
       </el-form>
     </div>
@@ -156,6 +156,17 @@ export default {
         callback();
       }
     };
+    var phonePass = (rule, value, callback) => {
+      console.log(value)
+      console.log(this.ruleForm.phone)
+      if (value === "") {
+        callback(new Error("请输入紧急电话"));
+      }else if (value === this.ruleForm.phone) {
+        callback(new Error("紧急电话与联系电话不能一致!"));
+      }else {
+        callback();
+      }
+    };
     return {
       CorporationOption:[],//公司
       DivisionOption:[],//部门
@@ -210,7 +221,7 @@ export default {
           },
         ],
         urgentphone: [
-          { required: true, message: "紧急号码必填", trigger: "blur" },
+          { required: true,validator: phonePass, trigger: "blur" },
           {
             pattern: /^1[3456789]\d{9}$/,
             message: "紧急号码格式不正确",
@@ -434,9 +445,11 @@ export default {
       }).then(function (res) {
           if(res.data.code==200){
               console.log(res)
-              that.$message({
-                  message: res.data.msg,
-                  type: 'success'
+              that.$notify({
+                title: '注册成功',
+                message: res.data.msg,
+                type: 'success',
+                duration: 0
               });
           }else{
               that.$message({
@@ -445,6 +458,10 @@ export default {
               });
           }
       })
+    },
+    //返回
+    houtui(){
+      this.$router.go(-1)
     }
   },
   mounted(){
@@ -459,7 +476,7 @@ body {
 }
 .enroll-all {
   background-color: #f1f1f1;
-  padding-top: 100px;
+  padding-top: 63px;
   height: 900px;
   /*background-image: url("../assets/back.png");*/
   /*background-repeat: no-repeat;*/

+ 2 - 1
src/components/Login.vue

@@ -9,7 +9,8 @@
             </div>
             <div class="help-box">
                 <div class="help-title">没有企业账户?</div>
-                <div class="help-btn">去注册</div>
+                <router-link class="help-btn" :to="{path:'/Enroll'}">去注册</router-link>
+                <!-- <div class="help-btn">去注册</div> -->
             </div>
         </div>
         <div class="login-dominant">

+ 289 - 160
src/components/system/Payroll.vue

@@ -12,7 +12,7 @@
                 </div>
                 <div class="payroll-head-li">
                     <el-button type="primary" @click="addsalary()">新增员工薪资结构</el-button>
-                    <el-button type="primary" @click="SalaryCalculator()">计算当月工资</el-button>
+                    <el-button type="primary" @click="openSalaryCalculator()">计算当月工资</el-button>
                     <!-- <el-button type="primary">成都公司工资单</el-button>
                     <el-button type="primary">四川公司工资单</el-button>
                     <el-button type="primary">纽茵公司工资单</el-button> -->
@@ -49,9 +49,12 @@
                                                 请假类型:{{itemss.SubType}}
                                             </div> -->
                                         </div>
-                                        <div v-else-if="items.Type=='打卡'">
+                                        <div v-if="items.Type=='打卡'">
                                             <div class="title-popover">{{items.Type}}异常({{(items.Ex_ItemInfo).length}})</div>
                                         </div>
+                                        <div v-if="items=='[]'">
+                                            <div class="title-popover">本月无假勤</div>
+                                        </div>
                                     </div>
                                     <div style="cursor: pointer;" slot="reference">移上查看</div>
                                 </el-popover>
@@ -60,35 +63,50 @@
                         <el-table-column
                             prop="startDate"
                             label="起止日期"
-                            width="220">
+                            width="200">
                             <template slot-scope="scope">
                                 <div>{{scope.row.startDate+'~'+scope.row.endDate}}</div>
                             </template>
                         </el-table-column>
+                        <el-table-column
+                            prop="workDays"
+                            label="应出勤天数"
+                            width="100">
+                        </el-table-column>
+                        <el-table-column
+                            prop="regularDays"
+                            label="正常出勤天数"
+                            width="110">
+                        </el-table-column>
                         <el-table-column
                             prop="should"
                             label="应发合计"
-                            width="100">
+                            width="100"
+                            :formatter="rounding">
                         </el-table-column>
                         <el-table-column
                             prop="totalDeductions"
                             label="扣款合计"
-                            width="100">
+                            width="100"
+                            :formatter="rounding">
                         </el-table-column>
                         <el-table-column
-                            prop="name"
+                            prop="beforeTax"
                             label="税前合计	"
-                            width="100">
+                            width="100"
+                            :formatter="rounding">
                         </el-table-column>
                         <el-table-column
                             prop="withholdingTax"
                             label="代缴个税"
-                            width="100">
+                            width="100"
+                            :formatter="rounding">
                         </el-table-column>
                         <el-table-column
                             prop="afterTax"
                             label="税后合计"
-                            width="100">
+                            width="100"
+                            :formatter="rounding">
                         </el-table-column>
                         <el-table-column
                             prop="lastUpdateUserName"
@@ -112,7 +130,24 @@
                     </el-table>
                 </template>
             </div>
-            <el-dialog class="pan" top="3.5vh" title="薪资详细信息" :visible.sync="dialogFormVisible">
+            <el-dialog width="380px" title="选择计算当月工资日期" :visible.sync="gridTableVisible">
+                <el-form :model="gridData" ref="gridData" :rules="gridrules">
+                    <el-form-item label="年月" prop="yearMonth" :label-width="formLabelWidth">
+                        <el-date-picker v-model="gridData.yearMonth" size="medium" type="month" placeholder="选择月"></el-date-picker>
+                    </el-form-item>
+                    <el-form-item label="工资日期起" prop="startDate" :label-width="formLabelWidth">
+                        <el-date-picker v-model="gridData.startDate" size="medium" type="date" placeholder="选择日期"></el-date-picker>
+                    </el-form-item>
+                    <el-form-item label="工资日期止" prop="endDate" :label-width="formLabelWidth">
+                        <el-date-picker v-model="gridData.endDate" size="medium" type="date" placeholder="选择日期"></el-date-picker>
+                    </el-form-item>
+                </el-form>
+                <div slot="footer" class="dialog-footer">
+                    <el-button type="primary" @click="SalaryCalculator('gridData')">计 算</el-button>
+                    <el-button @click="gridTableVisible = false">取 消</el-button>
+                </div>
+            </el-dialog>
+            <el-dialog width="960px" class="pan" top="3.5vh" title="薪资详细信息" :visible.sync="dialogFormVisible">
                 <el-form :model="salaryinif" ref="salaryinif" :rules="rules">
                     <div class="payroll-inif">
                         <el-form-item label="员工" prop="userId" :label-width="formLabelWidth">
@@ -125,6 +160,10 @@
                                 </el-option>
                               </el-select>
                         </el-form-item>
+                        <!-- <el-form-item label="是否转正" :label-width="formLabelWidth">
+                            <el-switch v-model="salaryinif.regularization" active-color="" inactive-color="">
+                            </el-switch>
+                        </el-form-item> -->
                         <el-form-item label="年月" prop="yearMonth" :label-width="formLabelWidth">
                             <el-date-picker @change="Rangetime()" v-model="salaryinif.yearMonth" size="medium" type="month" placeholder="选择月"></el-date-picker>
                         </el-form-item>
@@ -143,32 +182,46 @@
                         <el-form-item label="岗位津贴" prop="postAllowance" :label-width="formLabelWidth">
                             <el-input-number :precision="2" size="medium" :controls="false" v-model="salaryinif.postAllowance"></el-input-number>
                         </el-form-item>
-                        <el-form-item label="服装洗理补贴" prop="garmentWashSubsidies" :label-width="formLabelWidth">
+                        <!-- <el-form-item label="服装洗理补贴" prop="garmentWashSubsidies" :label-width="formLabelWidth">
                             <el-input-number :precision="2" size="medium" :controls="false" v-model="salaryinif.garmentWashSubsidies"></el-input-number>
-                        </el-form-item>
-                        <el-form-item label="通讯补贴" prop="communicationSubsidies" :label-width="formLabelWidth">
+                        </el-form-item> -->
+                        <!-- <el-form-item label="通讯补贴" prop="communicationSubsidies" :label-width="formLabelWidth">
                             <el-input-number :precision="2" size="medium" :controls="false" v-model="salaryinif.communicationSubsidies"></el-input-number>
-                        </el-form-item>
-                        <el-form-item label="交通补贴" prop="trafficSubsidies" :label-width="formLabelWidth">
-                            <el-input-number :precision="2" size="medium" :controls="false" v-model="salaryinif.trafficSubsidies"></el-input-number>
+                        </el-form-item> -->
+                        <el-form-item label="月度补贴" prop="otherSubsidies" :label-width="formLabelWidth">
+                            <el-input-number :precision="2" size="medium" :controls="false" v-model="salaryinif.otherSubsidies"></el-input-number>
                         </el-form-item>
                         <el-form-item label="保密费" prop="informationSecurityFee" :label-width="formLabelWidth">
                             <el-input-number :precision="2" size="medium" :controls="false" v-model="salaryinif.informationSecurityFee"></el-input-number>
                         </el-form-item>
-                        <el-form-item label="操作奖金" prop="operationBonus" :label-width="formLabelWidth">
+                        <!-- <el-form-item label="操作奖金" prop="operationBonus" :label-width="formLabelWidth">
                             <el-input-number :precision="2" size="medium" :controls="false" v-model="salaryinif.operationBonus"></el-input-number>
-                        </el-form-item>
-                        <el-form-item label="部门团建费" prop="groupCost" :label-width="formLabelWidth">
+                        </el-form-item> -->
+                        <!-- <el-form-item label="部门团建费" prop="groupCost" :label-width="formLabelWidth">
                             <el-input-number :precision="2" size="medium" :controls="false" v-model="salaryinif.groupCost"></el-input-number>
-                        </el-form-item>
-                        <el-form-item label="过节费" prop="specialAllowance" :label-width="formLabelWidth">
+                        </el-form-item> -->
+                        <!-- <el-form-item label="过节费" prop="specialAllowance" :label-width="formLabelWidth">
                             <el-input-number :precision="2" size="medium" :controls="false" v-model="salaryinif.specialAllowance"></el-input-number>
-                        </el-form-item>
-                        <el-form-item label="其他补贴" prop="otherSubsidies" :label-width="formLabelWidth">
+                        </el-form-item> -->
+                        <!-- <el-form-item label="其他补贴" prop="otherSubsidies" :label-width="formLabelWidth">
                             <el-input-number :precision="2" size="medium" :controls="false" v-model="salaryinif.otherSubsidies"></el-input-number>
-                        </el-form-item>
+                        </el-form-item> -->
                         <el-form-item label="餐补" prop="mealsupplement" :label-width="formLabelWidth">
-                            <el-input-number disabled :precision="2" size="medium" :controls="false" v-model="salaryinif.mealsupplement"></el-input-number>
+                            <el-popover
+                            placement="top"
+                            width="412"
+                            trigger="hover">
+                                <el-table :border="border" :data="transfer">
+                                    <el-table-column width="100" property="StartTimeDt" label="开始时间"></el-table-column>
+                                    <el-table-column width="100" property="EndTimeDt" label="结束时间"></el-table-column>
+                                    <el-table-column width="50" property="Duration" label="时长"></el-table-column>
+                                    <el-table-column width="80" property="unit" label="时长单位"></el-table-column>
+                                    <el-table-column width="80" property="Deduction" label="扣款金额" :formatter="rounding"></el-table-column>
+                                </el-table>
+                                <el-input-number slot="reference" :precision="2" size="medium" :controls="false" v-model="salaryinif.mealsupplement">
+                                    <span slot="reference"></span>
+                                </el-input-number>
+                            </el-popover>
                         </el-form-item>
                         <el-form-item label="代扣保险" prop="withholdingInsurance" :label-width="formLabelWidth">
                             <el-input-number :precision="2" size="medium" :controls="false" v-model="salaryinif.withholdingInsurance"></el-input-number>
@@ -189,6 +242,14 @@
                     <!-- <div style="margin: 0 80px;text-align: right;margin-bottom: 5px;">
                         <el-button type="primary">获取企微假勤</el-button>
                     </div> -->
+                    <div class="leave-inif">
+                        <el-form-item label="应出勤天数" :label-width="formLabelWidth">
+                            <span>{{salaryinif.workDays}}</span>
+                        </el-form-item>
+                        <el-form-item label="正常出勤天数" :label-width="formLabelWidth">
+                            <span>{{salaryinif.regularDays}}</span>
+                        </el-form-item>
+                    </div>
                     <div class="leave-inif">
                         <el-form-item label="事假" :label-width="formLabelWidth">
                             <el-popover
@@ -196,11 +257,11 @@
                             width="412"
                             trigger="hover">
                                 <el-table :border="border" :data="leave">
-                                    <el-table-column width="80" property="Deduction" label="扣款金额"></el-table-column>
                                     <el-table-column width="100" property="StartTimeDt" label="开始时间"></el-table-column>
                                     <el-table-column width="100" property="EndTimeDt" label="结束时间"></el-table-column>
                                     <el-table-column width="50" property="Duration" label="时长"></el-table-column>
                                     <el-table-column width="80" property="unit" label="时长单位"></el-table-column>
+                                    <el-table-column width="80" property="Deduction" :formatter="rounding" label="扣款金额"></el-table-column>
                                 </el-table>
                                 <span slot="reference">{{salaryinif.somethingFalse.toFixed(2)}}</span>
                             </el-popover>
@@ -211,11 +272,11 @@
                             width="412"
                             trigger="hover">
                                 <el-table :border="border" :data="sickleave">
-                                    <el-table-column width="80" property="Deduction" label="扣款金额"></el-table-column>
                                     <el-table-column width="100" property="StartTimeDt" label="开始时间"></el-table-column>
                                     <el-table-column width="100" property="EndTimeDt" label="结束时间"></el-table-column>
                                     <el-table-column width="50" property="Duration" label="时长"></el-table-column>
                                     <el-table-column width="80" property="unit" label="时长单位"></el-table-column>
+                                    <el-table-column width="80" property="Deduction" :formatter="rounding" label="扣款金额"></el-table-column>
                                 </el-table>
                                 <span slot="reference">{{salaryinif.sickLeave.toFixed(2)}}</span>
                             </el-popover>
@@ -226,11 +287,11 @@
                             width="412"
                             trigger="hover">
                                 <el-table :border="border" :data="late">
-                                    <el-table-column width="80" property="Deduction" label="扣款金额"></el-table-column>
                                     <el-table-column width="100" property="StartTimeDt" label="开始时间"></el-table-column>
                                     <el-table-column width="100" property="EndTimeDt" label="结束时间"></el-table-column>
                                     <el-table-column width="50" property="Duration" label="时长"></el-table-column>
                                     <el-table-column width="80" property="unit" label="时长单位"></el-table-column>
+                                    <el-table-column width="80" property="Deduction" :formatter="rounding" label="扣款金额"></el-table-column>
                                 </el-table>
                                 <span slot="reference">{{salaryinif.lateTo.toFixed(2)}}</span>
                             </el-popover>
@@ -241,11 +302,11 @@
                             width="412"
                             trigger="hover">
                                 <el-table :border="border" :data="early">
-                                    <el-table-column width="80" property="Deduction" label="扣款金额"></el-table-column>
                                     <el-table-column width="100" property="StartTimeDt" label="开始时间"></el-table-column>
                                     <el-table-column width="100" property="EndTimeDt" label="结束时间"></el-table-column>
                                     <el-table-column width="50" property="Duration" label="时长"></el-table-column>
                                     <el-table-column width="80" property="unit" label="时长单位"></el-table-column>
+                                    <el-table-column width="80" property="Deduction" :formatter="rounding" label="扣款金额"></el-table-column>
                                 </el-table>
                                 <span slot="reference">{{salaryinif.leaveEarly.toFixed(2)}}</span>
                             </el-popover>
@@ -256,11 +317,11 @@
                             width="412"
                             trigger="hover">
                                 <el-table :border="border" :data="absenteeism">
-                                    <el-table-column width="80" property="Deduction" label="扣款金额"></el-table-column>
                                     <el-table-column width="100" property="StartTimeDt" label="开始时间"></el-table-column>
                                     <el-table-column width="100" property="EndTimeDt" label="结束时间"></el-table-column>
                                     <el-table-column width="50" property="Duration" label="时长"></el-table-column>
                                     <el-table-column width="80" property="unit" label="时长单位"></el-table-column>
+                                    <el-table-column width="80" property="Deduction" :formatter="rounding" label="扣款金额"></el-table-column>
                                 </el-table>
                                 <span class="sx" slot="reference">{{salaryinif.absenteeism.toFixed(2)}}</span>
                             </el-popover>
@@ -271,11 +332,11 @@
                             width="412"
                             trigger="hover">
                                 <el-table :border="border" :data="notout">
-                                    <el-table-column width="80" property="Deduction" label="扣款金额"></el-table-column>
                                     <el-table-column width="100" property="StartTimeDt" label="开始时间"></el-table-column>
                                     <el-table-column width="100" property="EndTimeDt" label="结束时间"></el-table-column>
                                     <el-table-column width="50" property="Duration" label="时长"></el-table-column>
                                     <el-table-column width="80" property="unit" label="时长单位"></el-table-column>
+                                    <el-table-column width="80" property="Deduction" :formatter="rounding" label="扣款金额"></el-table-column>
                                 </el-table>
                                 <span slot="reference">{{salaryinif.notPunch.toFixed(2)}}</span>
                             </el-popover>
@@ -289,7 +350,7 @@
                             <span>{{salaryinif.totalDeductions.toFixed(2)}}</span>
                         </el-form-item>
                         <el-form-item label="税前合计" :label-width="formLabelWidth">
-                            <span>{{salaryinif.Beforetax}}</span>
+                            <span>{{salaryinif.beforeTax}}</span>
                         </el-form-item>
                         <el-form-item label="税后合计" :label-width="formLabelWidth">
                             <span>{{salaryinif.afterTax.toFixed(2)}}</span>
@@ -297,7 +358,7 @@
                     </div>
                     <div class="remark-box">
                         <el-form-item label="备注" :label-width="formLabelWidth">
-                            <el-input :rows="1" type="textarea" v-model="salaryinif.remark"></el-input>
+                            <el-input :rows="8" type="textarea" v-model="salaryinif.remark"></el-input>
                         </el-form-item>
                     </div>
                 </el-form>
@@ -317,6 +378,7 @@ import { el } from '@fullcalendar/core/internal-common';
 export default {
     data() {
       return {
+        gridTableVisible:false,
         fullscreenLoading:false,
         border:true,
         userlist:[],
@@ -333,14 +395,32 @@ export default {
         sickleave:[],//病假
         late:[],//迟到
         early:[],//早退
+        transfer:[],//调休假
         absenteeism:[],//旷工
         notout:[],//未打卡
 
         clicknot:false,//是否获取企业微信
         jsonstring:'',//企业微信json字符串
-
+        //计算工资
+        gridData:{
+            yearMonth:"",//年月
+            startDate:"",//工资日期 起
+            endDate:"",//工资日期 止
+        },
+        gridrules:{
+            yearMonth: [
+                { type: 'date', required: true, trigger: 'blur',message:'选择年月' }
+            ],
+            startDate: [
+                { type: 'date', required: true, trigger: 'blur',message:'选择工资日期起' }
+            ],
+            endDate: [
+                { type: 'date', required: true, trigger: 'blur',message:'选择工资日期止' }
+            ],
+        },
         //薪资详细
         salaryinif:{
+            // regularization: true,//是否转正
             userId:"",//员工Id
             name:"",//姓名
             yearMonth:"",//年月
@@ -349,17 +429,17 @@ export default {
             basic:0,//基本工资
             floats:0,//绩效工资
             postAllowance:0,//岗位津贴
-            garmentWashSubsidies:0,//服装洗理补贴
-            communicationSubsidies:0,// 通讯补贴
-            trafficSubsidies:0,// 交通补贴
+            //garmentWashSubsidies:0,//服装洗理补贴
+            //communicationSubsidies:0,// 通讯补贴
+            otherSubsidies:0,// 月度补贴
             informationSecurityFee:0,// 保密费
-            operationBonus:0,// 操作奖金
-            specialAllowance:0,// 特殊津贴
-            otherSubsidies:0,// 其他补贴
+            //operationBonus:0,// 操作奖金
+            //specialAllowance:0,// 特殊津贴
+            //otherSubsidies:0,// 其他补贴
             withholdingInsurance:0,// 代扣保险
             mealsupplement:0,// 餐补
             reservedFunds:0,// 代扣公积金
-            groupCost:0,// 部门集体团建费
+            //groupCost:0,// 部门集体团建费
             sickLeave:0,// 病假
             somethingFalse:0,//  事假
             lateTo:0,//  迟到 
@@ -368,6 +448,8 @@ export default {
             notPunch:0,//未打卡 
             otherDeductions:0,//其他扣款 
             should:0,//应发合计 
+            workDays:0,//应出勤天数
+            regularDays:0,//正常出勤天数
             totalDeductions:0,//扣款合计 
             totalRealHair:0,//实发合计 
             withholdingTax:0,//代扣个税 
@@ -377,7 +459,7 @@ export default {
             lastUpdateUserName:"",//最后操作人Name 
             lastUpdateDt:"",//最后操作时间 
             remark:"",//备注 
-            Beforetax:0//税前合计
+            beforeTax:0//税前合计
         },
         rules: {
             userId: [
@@ -401,30 +483,30 @@ export default {
             postAllowance: [
                 { required: true, trigger: 'blur' },
             ],
-            garmentWashSubsidies: [
-                { required: true, trigger: 'blur' },
-            ],
-            communicationSubsidies: [
-                { required: true, trigger: 'blur' },
-            ],
-            trafficSubsidies: [
-                { required: true, trigger: 'blur' },
-            ],
-            informationSecurityFee: [
-                { required: true, trigger: 'blur' },
-            ],
-            operationBonus: [
-                { required: true, trigger: 'blur' },
-            ],
+            // garmentWashSubsidies: [
+            //     { required: true, trigger: 'blur' },
+            // ],
+            // communicationSubsidies: [
+            //     { required: true, trigger: 'blur' },
+            // ],
             otherSubsidies: [
                 { required: true, trigger: 'blur' },
             ],
-            groupCost: [
-                { required: true, trigger: 'blur' },
-            ],
-            specialAllowance: [
+            informationSecurityFee: [
                 { required: true, trigger: 'blur' },
             ],
+            // operationBonus: [
+            //     { required: true, trigger: 'blur' },
+            // ],
+            // otherSubsidies: [
+            //     { required: true, trigger: 'blur' },
+            // ],
+            // groupCost: [
+            //     { required: true, trigger: 'blur' },
+            // ],
+            // specialAllowance: [
+            //     { required: true, trigger: 'blur' },
+            // ],
             mealsupplement: [
                 { required: true, trigger: 'blur' },
             ],
@@ -450,19 +532,17 @@ export default {
     },
     methods:{
         submitForm(formName) {
-            console.log(123)
             this.$refs[formName].validate((valid) => {
-            if (valid) {
-                // alert('submit!');
-                this.clicknot=true;
-                this.SalaryCalculatorSingle();
-            } else {
-                this.$message.error('请将红框内容补全!');
-                return false;
-            }
+                if (valid) {
+                    // alert('submit!');
+                    this.clicknot=true;
+                    this.SalaryCalculatorSingle();
+                } else {
+                    this.$message.error('请将红框内容补全!');
+                    return false;
+                }
             });
         },
-        
         Rangetime(){
             console.log('2023-10' instanceof Date)
             console.log(this.salaryinif.startDate instanceof Date)
@@ -505,6 +585,7 @@ export default {
         GetWageSheetList(){
             var url = "/api/PersonnelModule/GetWageSheetList"
             var that = this
+            console.log(that.value2)
             this.$axios({
                 method: 'post',
                 url: url,
@@ -590,6 +671,7 @@ export default {
             this.sickleave=[];//病假
             this.late=[];//迟到
             this.early=[];//早退
+            this.transfer=[];//调休假
             this.absenteeism=[];//旷工
             this.notout=[];//未打卡
 
@@ -618,7 +700,7 @@ export default {
                     that.salaryinif.startDate=new Date(res.data.data.startDate);
                     that.salaryinif.endDate=new Date(res.data.data.endDate);
                     that.jsonstring=res.data.data.ex_ItemsRemark;
-                    that.salaryinif.Beforetax=(res.data.data.afterTax+res.data.data.withholdingTax).toFixed(2);
+                    that.salaryinif.beforeTax=(res.data.data.afterTax+res.data.data.withholdingTax).toFixed(2);
                     let ItemsRemark=JSON.parse(res.data.data.ex_ItemsRemark);
                     let jiaqininif;
                     let dakainif;
@@ -640,24 +722,29 @@ export default {
                             if(jiaqininif.Ex_ItemInfo[j].SubType=="病假"){
                                 that.sickleave.push(jiaqininif.Ex_ItemInfo[j])
                             }
+                            if(jiaqininif.Ex_ItemInfo[j].SubType=="调休假"||jiaqininif.Ex_ItemInfo[j].SubType=="年假"){
+                                that.transfer.push(jiaqininif.Ex_ItemInfo[j])
+                            }
                         }
                     }
+                    console.log(that.transfer)
                     if(dakainif!=undefined){
-                        for(let x=0;x<dakainif.length;x++){
-                            if(dakainif[x].SubType=="迟到"){
-                                that.late.push(dakainif[x])
+                        for(let x=0;x<dakainif.Ex_ItemInfo.length;x++){
+                            if(dakainif.Ex_ItemInfo[x].SubType=="迟到"){
+                                that.late.push(dakainif.Ex_ItemInfo[x])
                             }
-                            if(dakainif[x].SubType=="早退"){
-                                that.early.push(dakainif[x])
+                            if(dakainif.Ex_ItemInfo[x].SubType=="早退"){
+                                that.early.push(dakainif.Ex_ItemInfo[x])
                             }
-                            if(dakainif[x].SubType=="旷工"){
-                                that.absenteeism.push(dakainif[x])
+                            if(dakainif.Ex_ItemInfo[x].SubType=="旷工"){
+                                that.absenteeism.push(dakainif.Ex_ItemInfo[x])
                             }
-                            if(dakainif[x].SubType=="未打卡"){
-                                that.notout.push(dakainif[x])
+                            if(dakainif.Ex_ItemInfo[x].SubType=="未打卡"||dakainif.Ex_ItemInfo[x].SubType=="缺卡"||dakainif.Ex_ItemInfo[x].SubType=="补卡次数"){
+                                that.notout.push(dakainif.Ex_ItemInfo[x])
                             }
                         }
                     }
+                    console.log(that.late)
                 }else{
                     that.$message({
                         message: '加载失败!原因:'+res.data.msg,
@@ -689,17 +776,17 @@ export default {
                     basic:that.salaryinif.basic,
                     floats:that.salaryinif.floats,
                     postAllowance:that.salaryinif.postAllowance,
-                    garmentWashSubsidies:that.salaryinif.garmentWashSubsidies,
-                    communicationSubsidies:that.salaryinif.communicationSubsidies,
-                    trafficSubsidies:that.salaryinif.trafficSubsidies,
-                    informationSecurityFee:that.salaryinif.informationSecurityFee,
-                    operationBonus:that.salaryinif.operationBonus,
-                    specialAllowance:that.salaryinif.specialAllowance,
+                    // garmentWashSubsidies:that.salaryinif.garmentWashSubsidies,
+                    // communicationSubsidies:that.salaryinif.communicationSubsidies,
                     otherSubsidies:that.salaryinif.otherSubsidies,
+                    informationSecurityFee:that.salaryinif.informationSecurityFee,
+                    // operationBonus:that.salaryinif.operationBonus,
+                    // specialAllowance:that.salaryinif.specialAllowance,
+                    // otherSubsidies:that.salaryinif.otherSubsidies,
                     withholdingInsurance:that.salaryinif.withholdingInsurance,
                     mealsupplement:that.salaryinif.mealsupplement,
                     reservedFunds:that.salaryinif.reservedFunds,
-                    groupCost:that.salaryinif.groupCost,
+                    // groupCost:that.salaryinif.groupCost,
                     sickLeave:that.salaryinif.sickLeave,
                     somethingFalse:that.salaryinif.somethingFalse,
                     lateTo:that.salaryinif.lateTo,
@@ -712,12 +799,18 @@ export default {
                     totalRealHair:that.salaryinif.totalRealHair,
                     withholdingTax:that.salaryinif.withholdingTax,
                     afterTax:that.salaryinif.afterTax,
+                    workDays:that.salaryinif.workDays,
+                    regularDays:that.salaryinif.regularDays,
                     ex_ItemsRemark:that.jsonstring
                 }
             }).then(function (res) {
                 if(res.data.code==200){
                     console.log(res)
                     that.GetWageSheetList();
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'success'
+                    });
                 }else{
                     that.$message({
                         message: '操作失败!原因:'+res.data.msg,
@@ -773,6 +866,7 @@ export default {
             this.sickleave=[];//病假
             this.late=[];//迟到
             this.early=[];//早退
+            this.transfer=[];//调休假
             this.absenteeism=[];//旷工
             this.notout=[];//未打卡
 
@@ -781,6 +875,7 @@ export default {
             this.disabled=false;
             this.preserve=true;
             this.salaryinif={
+                // regularization:true,
                 userId:"",//员工Id
                 name:"",//姓名
                 yearMonth:"",//年月
@@ -789,17 +884,17 @@ export default {
                 basic:0,//基本工资
                 floats:0,//绩效工资
                 postAllowance:0,//岗位津贴
-                garmentWashSubsidies:0,//服装洗理补贴
-                communicationSubsidies:0,// 通讯补贴
-                trafficSubsidies:0,// 交通补贴
+                // garmentWashSubsidies:0,//服装洗理补贴
+                // communicationSubsidies:0,// 通讯补贴
+                otherSubsidies:0,// 月度补贴
                 informationSecurityFee:0,// 保密费
-                operationBonus:0,// 操作奖金
-                specialAllowance:0,// 特殊津贴
-                otherSubsidies:0,// 其他补贴
+                // operationBonus:0,// 操作奖金
+                // specialAllowance:0,// 特殊津贴
+                // otherSubsidies:0,// 其他补贴
                 withholdingInsurance:0,// 代扣保险
                 mealsupplement:0,// 餐补
                 reservedFunds:0,// 代扣公积金
-                groupCost:0,// 部门集体团建费
+                // groupCost:0,// 部门集体团建费
                 sickLeave:0,// 病假
                 somethingFalse:0,//  事假
                 lateTo:0,//  迟到 
@@ -808,6 +903,8 @@ export default {
                 notPunch:0,//未打卡 
                 otherDeductions:0,//其他扣款 
                 should:0,//应发合计 
+                workDays:0,//应出勤天数
+                regularDays:0,//正常出勤天数
                 totalDeductions:0,//扣款合计 
                 totalRealHair:0,//实发合计 
                 withholdingTax:0,//代扣个税 
@@ -817,7 +914,7 @@ export default {
                 lastUpdateUserName:"",//最后操作人Name 
                 lastUpdateDt:"",//最后操作时间 
                 remark:"",//备注 
-                Beforetax:0,//税前合计
+                beforeTax:0,//税前合计
             };
         },
         //删除薪资列表
@@ -859,43 +956,69 @@ export default {
             
         },
         //计算工资
-        SalaryCalculator(){
-            this.fullscreenLoading=true;
-            var url = "/api/PersonnelModule/SalaryCalculator"
-            var that = this
-            this.$axios({
-                method: 'post',
-                url: url,
-                headers: {
-                    Authorization: 'Bearer ' + this.token
-                },
-                data:{
-                    userId:that.loginuserid,
-                    yearMonth:that.value2
-                }
-            }).then(function (res) {
-                console.log(res)
-                if(res.data.code==200){
-                    console.log(res)
-                    that.fullscreenLoading=false;
-                    that.GetWageSheetList();
-                    that.$message({
-                        message: res.data.msg,
-                        type: 'success'
-                    });
-                }else{
-                    that.$message({
-                        message: res.data.msg,
-                        type: 'warning'
-                    });
+        SalaryCalculator(formName){
+            this.$refs[formName].validate((valid) => {
+                if (valid) {
+                    this.fullscreenLoading=true;
+                    var url = "/api/PersonnelModule/SalaryCalculator"
+                    var that = this
+                    console.log(that.TimeProcessingyue(that.gridData.yearMonth))
+                    this.$axios({
+                        method: 'post',
+                        url: url,
+                        headers: {
+                            Authorization: 'Bearer ' + this.token
+                        },
+                        data:{
+                            userId:that.loginuserid,
+                            yearMonth:that.TimeProcessingyue(that.gridData.yearMonth),
+                            startDt:that.TimeProcessingri(that.gridData.startDate),
+                            endDt:that.TimeProcessingri(that.gridData.endDate),
+                        }
+                    }).then(function (res) {
+                        console.log(res)
+                        if(res.data.code==200){
+                            console.log(res)
+                            that.value2=that.TimeProcessingyue(that.gridData.yearMonth);
+                            that.gridTableVisible=false;
+                            that.fullscreenLoading=false;
+                            that.GetWageSheetList();
+                            that.$message({
+                                message: res.data.msg,
+                                type: 'success'
+                            });
+                        }else{
+                            that.value2=that.TimeProcessingyue(that.gridData.yearMonth);
+                            that.gridTableVisible=false;
+                            that.fullscreenLoading=false;
+                            that.GetWageSheetList();
+                            that.$message({
+                                message: res.data.msg,
+                                type: 'warning'
+                            });
+                        }
+                    })
+                } else {
+                    this.$message.error('请将红框内容补全!');
+                    return false;
                 }
-            })
+            });
+        },
+        //打开计算工资
+        openSalaryCalculator(){
+            this.gridTableVisible=true;
+            this.gridData={
+                yearMonth:"",//年月
+                startDate:"",//工资日期 起
+                endDate:"",//工资日期 止
+            }
         },
         //获取企业微信假勤
         SalaryCalculatorSingle(){
 
             this.leave=[];//事假
             this.sickleave=[];//病假
+            this.transfer=[];//调休假
             this.late=[];//迟到
             this.early=[];//早退
             this.absenteeism=[];//旷工
@@ -918,18 +1041,18 @@ export default {
                     basic:that.salaryinif.basic,
                     floats:that.salaryinif.floats,
                     postAllowance:that.salaryinif.postAllowance,
-                    garmentWashSubsidies:that.salaryinif.garmentWashSubsidies,
-                    communicationSubsidies:that.salaryinif.communicationSubsidies,
-                    trafficSubsidies:that.salaryinif.trafficSubsidies,
-                    informationSecurityFee:that.salaryinif.informationSecurityFee,
-                    operationBonus:that.salaryinif.operationBonus,
-                    specialAllowance:that.salaryinif.specialAllowance,
+                    // garmentWashSubsidies:that.salaryinif.garmentWashSubsidies,
+                    // communicationSubsidies:that.salaryinif.communicationSubsidies,
                     otherSubsidies:that.salaryinif.otherSubsidies,
+                    informationSecurityFee:that.salaryinif.informationSecurityFee,
+                    // operationBonus:that.salaryinif.operationBonus,
+                    // specialAllowance:that.salaryinif.specialAllowance,
+                    // otherSubsidies:that.salaryinif.otherSubsidies,
                     withholdingInsurance:that.salaryinif.withholdingInsurance,
                     mealsupplement:that.salaryinif.mealsupplement,
                     withholdingTax:that.salaryinif.withholdingTax,
-                    groupCost:that.salaryinif.groupCost,
-                    reservedFunds:that.salaryinif.groupCost,
+                    // groupCost:that.salaryinif.groupCost,
+                    reservedFunds:that.salaryinif.reservedFunds,
                     withholdingInsurance:that.salaryinif.withholdingInsurance,
                     otherDeductions:that.salaryinif.otherDeductions,
                 }
@@ -949,10 +1072,12 @@ export default {
                     that.salaryinif.absenteeism=res.data.data.absenteeism;
                     that.salaryinif.notPunch=res.data.data.notPunch;
                     that.salaryinif.should=res.data.data.should;
+                    that.salaryinif.workDays=res.data.data.workDays;
+                    that.salaryinif.regularDays=res.data.data.regularDays;
                     that.salaryinif.totalDeductions=res.data.data.totalDeductions;
                     that.salaryinif.afterTax=res.data.data.afterTax;
                     that.salaryinif.mealsupplement=res.data.data.mealsupplement;
-                    that.salaryinif.Beforetax=(res.data.data.afterTax+res.data.data.withholdingTax).toFixed(2);
+                    that.salaryinif.beforeTax=(res.data.data.afterTax+res.data.data.withholdingTax).toFixed(2);
 
                     let jiaqin;
                     let daka;
@@ -974,43 +1099,47 @@ export default {
                             if(jiaqin.Ex_ItemInfo[j].SubType=="病假"){
                                 that.sickleave.push(jiaqin.Ex_ItemInfo[j])
                             }
+                            if(jiaqin.Ex_ItemInfo[j].SubType=="调休假"||jiaqin.Ex_ItemInfo[j].SubType=="年假"){
+                                that.transfer.push(jiaqin.Ex_ItemInfo[j])
+                            }
                         }
                     }
+                    console.log(that.transfer)
                     if(daka!=undefined){
-                        for(let x=0;x<daka.length;x++){
-                            if(daka[x].SubType=="迟到"){
-                                that.late.push(daka[x])
+                        for(let x=0;x<daka.Ex_ItemInfo.length;x++){
+                            if(daka.Ex_ItemInfo[x].SubType=="迟到"){
+                                that.late.push(daka.Ex_ItemInfo[x])
                             }
-                            if(daka[x].SubType=="早退"){
-                                that.early.push(daka[x])
+                            if(daka.Ex_ItemInfo[x].SubType=="早退"){
+                                that.early.push(daka.Ex_ItemInfo[x])
                             }
-                            if(daka[x].SubType=="旷工"){
-                                that.absenteeism.push(daka[x])
+                            if(daka.Ex_ItemInfo[x].SubType=="旷工"){
+                                that.absenteeism.push(daka.Ex_ItemInfo[x])
                             }
-                            if(daka[x].SubType=="未打卡"){
-                                that.notout.push(daka[x])
+                            if(daka.Ex_ItemInfo[x].SubType=="未打卡"||daka.Ex_ItemInfo[x].SubType=="缺卡"||daka.Ex_ItemInfo[x].SubType=="补卡次数"){
+                                that.notout.push(daka.Ex_ItemInfo[x])
                             }
                         }
                     }
-                    console.log(that.leave)
-                    console.log(that.sickleave)
-                    console.log(that.late)
-                    console.log(that.early)
-                    console.log(that.absenteeism)
-                    console.log(that.notout)
-                    // that.GetWageSheetList();
-                    // that.$message({
-                    //     message: res.data.msg,
-                    //     type: 'success'
-                    // });
+                    that.GetWageSheetList();
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'success'
+                    });
                 }else{
-                    // that.$message({
-                    //     message: res.data.msg,
-                    //     type: 'warning'
-                    // });
+                    that.fullscreenLoading = false;
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'warning'
+                    });
                 }
             })
-        }
+        },
+        //保留两位小数
+        rounding(row,column) {
+            return parseFloat(row[column.property]).toFixed(2)
+        },
+
     },
     mounted(){
         this.GetWageSheetBasicsDataSource()