12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616 |
- <template>
- <div v-loading.fullscreen.lock="fullscreenLoading">
- <div class="payroll-all">
- <div class="payroll-head">
- <div style="display: flex;" class="payroll-head-li">
- <el-date-picker
- style="width: 120px;"
- v-model="value2"
- :clearable="false"
- type="month"
- placeholder="选择月"
- @change="PickTime()">
- </el-date-picker>
- <el-select style="width: 220px;margin-left: 10px;" @change="companychange()" v-model="companyName" filterable placeholder="请选择公司">
- <el-option
- v-for="item in companylist"
- :key="item.id"
- :label="item.companyName"
- :value="item.id">
- </el-option>
- </el-select>
- <!-- <el-select v-model="depName" filterable placeholder="请选择部门">
- <el-option
- v-for="item in deplist"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select> -->
- <el-input @input="cnNamechange()" style="width: 220px;margin-left: 10px;" v-model="cnName" placeholder="请输入员工姓名"></el-input>
- <!-- <el-select v-model="cnName" filterable placeholder="请选择员工">
- <el-option
- v-for="item in comuserlist"
- :key="item.id"
- :label="item.cnName"
- :value="item.id">
- </el-option>
- </el-select> -->
- </div>
- <div class="payroll-head-li">
- <el-button type="primary" @click="addsalary()">新增员工薪资结构</el-button>
- <el-button type="primary" @click="openSalaryCalculator()">计算当月工资</el-button>
- <el-button @click="Download()" type="primary">导出工资单</el-button>
- <el-button type="primary" @click="DownloadTaxes()">下载个税模板</el-button>
- <el-button type="primary" @click="UploadTaxes=true">上传个税</el-button>
- <!--<el-button type="primary">四川公司工资单</el-button>
- <el-button type="primary">纽茵公司工资单</el-button> -->
- </div>
- </div>
- <div class="payroll-table">
- <template>
- <el-table
- height="760"
- :data="tableDatatwo"
- border
- style="width: 100%">
- <el-table-column
- prop="row_Number"
- label="序号"
- width="50">
- </el-table-column>
- <el-table-column
- prop="yearMonth"
- label="年月"
- width="80">
- </el-table-column>
- <el-table-column
- prop="name"
- label="员工"
- width="80">
- </el-table-column>
- <el-table-column
- prop="companyName"
- label="公司"
- width="170">
- </el-table-column>
- <el-table-column
- label="假勤/打卡"
- width="85">
- <template slot-scope="scope">
- <el-popover
- v-if="scope.row.ex_ItemsRemark!=''"
- placement="right"
- width="150"
- trigger="hover">
- <div v-for="(items,index) in scope.row.ex_ItemsRemark!=''?JSON.parse(scope.row.ex_ItemsRemark):''" :key="index">
- <div v-if="items.Type=='假勤'">
- <div class="title-popover">{{items.Type}}({{(items.Ex_ItemInfo).length}})</div>
- <!-- <div class="title-content" v-for="(itemss,index) in items.Ex_ItemInfo" :key="index">
- 请假类型:{{itemss.SubType}}
- </div> -->
- </div>
- <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>
- <el-popover
- v-if="scope.row.ex_ItemsRemark==''"
- placement="right"
- width="150"
- trigger="hover">
- <span>无考勤异常</span>
- <div style="cursor: pointer;" slot="reference">移上查看</div>
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column
- prop="startDate"
- label="起止日期"
- width="190">
- <template slot-scope="scope">
- <div>{{scope.row.startDate+'~'+scope.row.endDate}}</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="workDays"
- label="应出勤天数"
- width="95">
- </el-table-column>
- <!-- <el-table-column
- prop="regularDays"
- label="正常出勤天数"
- width="110">
- </el-table-column> -->
- <el-table-column
- prop="should"
- label="应发合计"
- width="90"
- :formatter="rounding">
- </el-table-column>
- <el-table-column
- prop="totalDeductions"
- label="扣款合计"
- width="90"
- :formatter="rounding">
- </el-table-column>
- <el-table-column
- prop="beforeTax"
- label="税前合计 "
- width="90"
- :formatter="rounding">
- </el-table-column>
- <el-table-column
- prop="withholdingTax"
- label="代缴个税"
- width="90"
- :formatter="rounding">
- </el-table-column>
- <el-table-column
- prop="totalRealHair"
- label="税后合计"
- width="90"
- :formatter="rounding">
- </el-table-column>
- <el-table-column
- prop="lastUpdateUserName"
- label="最后操作人"
- width="100">
- </el-table-column>
- <el-table-column
- prop="lastUpdateDt"
- label="最后时间"
- width="180">
- </el-table-column>
- <el-table-column
- prop="name"
- label="操 作"
- width="100">
- <!-- eslint-disable-next-line -->
- <template slot-scope="scope">
- <el-button type="text" @click="SalaryDetails(scope.$index, scope.row)">修改</el-button>
- <el-button style="color: red;" type="text" @click="deleteaddsalary(scope.$index,scope.row,tableDatatwo)">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </template>
- </div>
- <!-- 上传个税 -->
- <el-dialog title="上传个税" width="400px" :visible.sync="UploadTaxes">
- <div>
- <el-form :model="TaxesData" ref="TaxesData" :rules="Taxesrules">
- <el-form-item label="年月" prop="yearMonth" label-width="50">
- <el-date-picker style="width:86%" v-model="TaxesData.yearMonth" size="medium" type="month" placeholder="选择月"></el-date-picker>
- </el-form-item>
- </el-form>
- <el-upload drag
- :limit=limitNum
- :auto-upload="false"
- accept=".xlsx"
- :action="UploadUrl()"
- :before-upload="beforeUploadFile"
- :on-change="fileChange"
- :on-exceed="exceedFile"
- :on-success="handleSuccess"
- :on-error="handleError"
- :on-remove="removelist"
- :file-list="fileList">
- <i class="el-icon-upload"></i>
- <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
- <div class="el-upload__tip" slot="tip">只能上传xlsx文件,且不超过10M</div>
- </el-upload>
- <br/>
- <el-button size="small" type="primary" @click="uploadFile('TaxesData')">立即上传</el-button>
- <el-button size="small">取消</el-button>
- </div>
- </el-dialog>
- <!-- 计算工资 -->
- <el-dialog :close-on-click-modal="false" 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 :close-on-click-modal="false" width="960px" class="pan" top="2.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">
- <el-select size="medium" style="height:36px" :disabled="disabled" v-model="salaryinif.userId" filterable placeholder="请选择">
- <el-option
- v-for="item in userlist"
- :key="item.id"
- :label="item.cnName"
- :value="item.id">
- </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>
- <el-form-item label="工资日期起" prop="startDate" :label-width="formLabelWidth">
- <el-date-picker v-model="salaryinif.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="salaryinif.endDate" size="medium" type="date" placeholder="选择日期"></el-date-picker>
- </el-form-item>
- <el-form-item label="基本工资" prop="basic" :label-width="formLabelWidth">
- <el-input-number :precision="2" size="medium" :controls="false" v-model="salaryinif.basic"></el-input-number>
- </el-form-item>
- <el-form-item label="绩效工资" prop="floats" :label-width="formLabelWidth">
- <el-input-number :precision="2" size="medium" :controls="false" v-model="salaryinif.floats"></el-input-number>
- </el-form-item>
- <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-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-input-number :precision="2" size="medium" :controls="false" v-model="salaryinif.communicationSubsidies"></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-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-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-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-input-number :precision="2" size="medium" :controls="false" v-model="salaryinif.otherSubsidies"></el-input-number>
- </el-form-item> -->
- <el-form-item label="餐补" prop="mealsupplement" :label-width="formLabelWidth">
- <el-popover
- placement="top"
- width="412"
- trigger="hover">
- <el-table height="500px" :border="border" :data="transfer">
- <el-table-column width="80" property="SubType" label="请假类型"></el-table-column>
- <el-table-column width="100" property="StartTimeDt" :formatter="rounddadykaishi" label="开始时间"></el-table-column>
- <el-table-column width="100" property="EndTimeDt" :formatter="rounddadyjieshu" 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="otherHandle" :label-width="formLabelWidth">
- <el-input-number :precision="2" size="medium" :controls="false" v-model="salaryinif.otherHandle"></el-input-number>
- </el-form-item>
-
- </div>
- <div class="payroll-inif">
- <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>
- </el-form-item>
- <el-form-item label="代扣公积金" prop="reservedFunds" :label-width="formLabelWidth">
- <el-input-number :precision="2" size="medium" :controls="false" v-model="salaryinif.reservedFunds"></el-input-number>
- </el-form-item>
- <el-form-item label="代缴个税" prop="withholdingTax" :label-width="formLabelWidth">
- <el-input-number :precision="2" size="medium" :controls="false" v-model="salaryinif.withholdingTax"></el-input-number>
- </el-form-item>
- </div>
- <div class="remark-box">
- <el-form-item label="其他扣款" prop="otherDeductions" :label-width="formLabelWidth">
- <el-input-number :precision="2" size="medium" :controls="false" v-model="salaryinif.otherDeductions"></el-input-number>
- <span class="ps-box">* 其他扣款 = 罚款 + 其他扣款;具体各项金额请在备注里描述。</span>
- </el-form-item>
- </div>
- <!-- <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
- placement="top"
- width="412"
- trigger="hover">
- <el-table height="200px" :border="border" :data="leave">
- <el-table-column width="100" property="StartTimeDt" :formatter="rounddadykaishi" label="开始时间"></el-table-column>
- <el-table-column width="100" property="EndTimeDt" :formatter="rounddadyjieshu" 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>
- </el-form-item>
- <el-form-item label="病假" :label-width="formLabelWidth">
- <el-popover
- placement="top"
- width="412"
- trigger="hover">
- <div>
- <div>病假最低发放标准(月):1680=2100*0.8</div>
- <div>病假最低发放标准(天):1680/{{salaryinif.workDays}}(工作日)≈{{ (1680/salaryinif.workDays).toFixed(2) }}</div>
- <div>病假最低发放标准(小时):1680/{{salaryinif.workDays}}(工作日)/7.5(小时)≈{{ (1680/salaryinif.workDays/7.5).toFixed(2) }}</div>
- <span style="color:red;">
- 员工在病假医疗期限内的病假工资按照成都市最低工资标准的 80%发放
- </span>
- </div>
- <el-table height="200px" :border="border" :data="sickleave">
- <el-table-column width="100" property="StartTimeDt" :formatter="rounddadykaishi" label="开始时间"></el-table-column>
- <el-table-column width="100" property="EndTimeDt" :formatter="rounddadyjieshu" 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>
- </el-form-item>
- <el-form-item label="迟到" :label-width="formLabelWidth">
- <el-popover
- placement="top"
- width="382"
- trigger="hover">
- <el-table height="200px" :border="border" :data="late">
- <el-table-column width="170" property="StartTimeDt" :formatter="rounddadykaishi" 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>
- </el-form-item>
- <el-form-item label="早退" :label-width="formLabelWidth">
- <el-popover
- placement="top"
- width="412"
- trigger="hover">
- <el-table height="200px" :border="border" :data="early">
- <el-table-column width="150" property="StartTimeDt" :formatter="rounddadykaishi" label="早退时间"></el-table-column>
- <!-- <el-table-column width="100" property="EndTimeDt" label="结束时间"></el-table-column> -->
- <el-table-column width="100" 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>
- </el-form-item>
- <el-form-item label="旷工" :label-width="formLabelWidth">
- <el-popover
- placement="top"
- width="512"
- trigger="hover">
- <el-table height="200px" :border="border" :data="absenteeism">
- <el-table-column width="100" property="StartTimeDt" :formatter="rounddadykaishi" 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-column width="200" property="Reason" label="原因"></el-table-column>
- </el-table>
- <span class="sx" slot="reference">{{salaryinif.absenteeism.toFixed(2)}}</span>
- </el-popover>
- </el-form-item>
- <el-form-item class="biaoji" label="补卡" :label-width="formLabelWidth">
- <el-popover
- placement="top"
- width="512"
- trigger="hover">
- <el-table height="200px" :border="border" :data="notout">
- <el-table-column width="200" property="StartTimeDt" :formatter="rounddadykaishi" 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-column width="230" property="Reason" label="原因"></el-table-column>
- </el-table>
- <el-input-number slot="reference" :precision="2" size="medium" :controls="false" v-model="salaryinif.notPunch">
- <span slot="reference"></span>
- </el-input-number>
- <!-- <span slot="reference">{{salaryinif.notPunch.toFixed(2)}}</span> -->
- </el-popover>
- </el-form-item>
- </div>
- <div class="salary-payments">
- <el-form-item label="应发合计" :label-width="formLabelWidth">
- <span>{{salaryinif.should.toFixed(2)}}</span>
- </el-form-item>
- <el-form-item label="扣款合计" :label-width="formLabelWidth">
- <span>{{salaryinif.totalDeductions.toFixed(2)}}</span>
- </el-form-item>
- <el-form-item label="税前合计" :label-width="formLabelWidth">
- <span>{{salaryinif.beforeTax.toFixed(2)}}</span>
- </el-form-item>
- <el-form-item label="税后合计" :label-width="formLabelWidth">
- <span>{{salaryinif.totalRealHair.toFixed(2)}}</span>
- </el-form-item>
- </div>
- <div class="remark-box">
- <el-form-item label="备注" :label-width="formLabelWidth">
- <el-input :rows="6" type="textarea" v-model="salaryinif.remark"></el-input>
- </el-form-item>
- </div>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <span class="ps-box">* 请先点击获取企微假勤,否则将无法保存或修改。</span>
- <el-button type="primary" @click="submitForm('salaryinif')">获取当月企微假勤</el-button>
- <el-button v-if="disabled" type="primary" @click="salaryAD('修改','salaryinif')">确认修改</el-button>
- <el-button v-if="preserve" type="primary" @click="salaryAD('新增','salaryinif')">保 存</el-button>
- <el-button @click="dialogFormVisible = false">取 消</el-button>
- </div>
- </el-dialog>
- </div>
- </div>
- </template>
- <script>
- import { co, el } from '@fullcalendar/core/internal-common';
- export default {
- data() {
- return {
- limitNum: 1, // 上传excell时,同时允许上传的最大数
- fileList: [], // excel文件列表
- companyName:-1,//公司
- depName:'',//部门
- cnName:'',//员工
- gridTableVisible:false,
- fullscreenLoading:false,
- border:true,
- companylist:[],
- deplist:[],
- userlist:[],//全部员工
- comuserlist:[],//公司筛选员工
- loginuserid:'',
- value2:'',
- tableData: [],
- tableDatatwo: [],
- dialogTableVisible: false,
- dialogFormVisible: false,
- UploadTaxes:false,
- disabled:true,
- preserve:'',
- addaex_ItemsRemark:{},
- leave:[],//事假
- 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:'选择工资日期止' }
- ],
- },
- //上传个税
- TaxesData:{
- yearMonth:"",//年月
- },
- Taxesrules:{
- yearMonth: [
- { type: 'date', required: true, trigger: 'blur',message:'选择年月' }
- ],
- },
- //薪资详细
- salaryinif:{
- // regularization: true,//是否转正
- userId:"",//员工Id
- name:"",//姓名
- yearMonth:"",//年月
- startDate:"",//工资日期 起
- endDate:"",//工资日期 止
- basic:0,//基本工资
- floats:0,//绩效工资
- postAllowance:0,//岗位津贴
- //garmentWashSubsidies:0,//服装洗理补贴
- //communicationSubsidies:0,// 通讯补贴
- otherSubsidies:0,// 月度补贴
- informationSecurityFee:0,// 保密费
- //operationBonus:0,// 操作奖金
- //specialAllowance:0,// 特殊津贴
- //otherSubsidies:0,// 其他补贴
- withholdingInsurance:0,// 代扣保险
- mealsupplement:0,// 餐补
- reservedFunds:0,// 代扣公积金
- otherHandle:0,//其他应付
- //groupCost:0,// 部门集体团建费
- sickLeave:0,// 病假
- somethingFalse:0,// 事假
- lateTo:0,// 迟到
- leaveEarly:0,// 早退
- absenteeism:0,//旷工
- notPunch:0,//补卡
- otherDeductions:0,//其他扣款
- should:0,//应发合计
- workDays:0,//应出勤天数
- regularDays:0,//正常出勤天数
- totalDeductions:0,//扣款合计
- totalRealHair:0,//实发合计
- withholdingTax:0,//代扣个税
- afterTax:0,//税后工资
- isLock:0,//锁定标识
- lastUpdateUserId:"",//最后操作人
- lastUpdateUserName:"",//最后操作人Name
- lastUpdateDt:"",//最后操作时间
- remark:"",//备注
- beforeTax:0//税前合计
- },
- rules: {
- userId: [
- { required: true, trigger: 'blur' }
- ],
- yearMonth: [
- { type: 'date', required: true, trigger: 'blur' }
- ],
- startDate: [
- { type: 'date', required: true, trigger: 'blur' }
- ],
- endDate: [
- { type: 'date', required: true, trigger: 'blur' }
- ],
- basic: [
- { required: true, trigger: 'blur' },
- ],
- floats: [
- { required: true, trigger: 'blur' },
- ],
- postAllowance: [
- { required: true, trigger: 'blur' },
- ],
- // garmentWashSubsidies: [
- // { required: true, trigger: 'blur' },
- // ],
- // communicationSubsidies: [
- // { required: true, trigger: 'blur' },
- // ],
- otherSubsidies: [
- { required: true, trigger: 'blur' },
- ],
- otherHandle:[
- {required:true,trigger:'blur'}
- ],
- 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' },
- ],
- withholdingInsurance: [
- { required: true, trigger: 'blur' },
- ],
- reservedFunds: [
- { required: true, trigger: 'blur' },
- ],
- withholdingTax: [
- { required: true, trigger: 'blur' },
- ],
- otherDeductions: [
- { required: true, trigger: 'blur' },
- ],
- },
- form: {
- name: '',
- region: '',
- },
- formLabelWidth: '110px'
- }
- },
- methods:{
- submitForm(formName) {
- console.log(this.$refs[formName])
- this.$refs[formName].validate((valid) => {
- if (valid) {
- // alert('submit!');
- // this.clicknot=true;
- this.$confirm('是否获取企业微信假勤!', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.SalaryCalculatorSingle();
- }).catch(()=>{})
- } else {
- this.$message.error('请将红框内容补全!');
- return false;
- }
- });
- },
- Rangetime(){
- console.log('2023-10' instanceof Date)
- console.log(this.salaryinif.startDate instanceof Date)
- },
- getnewDate(){
- let nowDate = new Date()
- let date = {
- year: nowDate.getFullYear(),
- month: nowDate.getMonth() + 1,
- date: nowDate.getDate()
- }
- console.log(date.year + '-' + date.month)
- this.value2=date.year + '-' + date.month;
- this.GetWageSheetList();
- },
- //获取员工
- GetWageSheetBasicsDataSource(){
- var url = "/api/PersonnelModule/GetWageSheetBasicsDataSource"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- }
- }).then(function (res) {
- if(res.data.code==200){
- console.log(res)
- console.log(res.data.data)
- that.userlist=res.data.data.userNames;
- that.companylist=res.data.data.compnayData;
- that.companylist.push(
- {companyName:'全部',id:-1}
- )
- }else{
- that.$message({
- message: '加载失败!原因:'+res.data.msg,
- type: 'warning'
- });
- }
- })
- },
- //薪资列表
- GetWageSheetList(){
- this.fullscreenLoading = true;
- var url = "/api/PersonnelModule/GetWageSheetList"
- var that = this
- console.log(that.value2)
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- },
- data:{
- portType: 1,
- yearMonth: that.value2,
- }
- }).then(function (res) {
- that.tableData=[];
- if(res.data.code==200){
- console.log(res)
- that.tableData=res.data.data;
- that.tableDatatwo=that.tableData;
- console.log(that.tableData)
- that.fullscreenLoading = false;
- }else{
- that.fullscreenLoading = false;
- that.$message({
- message: '加载失败!原因:'+res.data.msg,
- type: 'warning'
- });
- }
- })
- },
- //日期处理(日)
- TimeProcessingri(val){
- if(val instanceof Date){
- let newsyear=val.getFullYear();
- let newsMonth=val.getMonth() + 1;
- let newsday=val.getDate();
- if((val.getMonth() + 1)<10){
- newsMonth='0'+newsMonth
- }else{
- newsMonth=val.getMonth() + 1
- }
- if(val.getDate()<10){
- newsday=newsday='0'+newsday
- }else{
- newsday=val.getDate()
- }
- return newsyear+ '-' +newsMonth+ '-' + newsday;
- }else{
- return val
- }
- },
- //日期处理(月)
- TimeProcessingyue(val){
- if(val instanceof Date){
- let newsyear=val.getFullYear();
- let newsMonth=val.getMonth() + 1;
- if((val.getMonth() + 1)<10){
- newsMonth='0'+newsMonth
- }else{
- newsMonth=val.getMonth() + 1
- }
- return newsyear+ '-' +newsMonth;
- }else{
- return val
- }
-
- },
- //时间切换
- PickTime(){
- this.tableDatatwo=[];
- this.companyName=-1;
- this.cnName='';
- let newyear=this.value2.getFullYear();
- let newMonth=this.value2.getMonth() + 1;
- if((this.value2.getMonth() + 1)<10){
- newMonth='0'+newMonth
- }else{
- newMonth=this.value2.getMonth() + 1
- }
- this.value2=newyear+ '-' +newMonth;
- console.log(this.value2)
- this.GetWageSheetList();
- },
- //薪资详细
- SalaryDetails(index, row){
- if (this.$refs.salaryinif){
- this.$nextTick(() => {
- this.$refs['salaryinif'].clearValidate();
- })
- }
- // this.clicknot=false;
- this.leave=[];//事假
- this.sickleave=[];//病假
- this.late=[];//迟到
- this.early=[];//早退
- this.transfer=[];//调休假
- this.absenteeism=[];//旷工
- this.notout=[];//补卡
- this.dialogFormVisible = true;
- this.disabled=true;
- this.preserve=false;
- console.log(row.id)
- var url = "/api/PersonnelModule/GetWageSheetById"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- },
- data:{
- portType: 1,
- id: row.id,
- }
- }).then(function (res) {
- if(res.data.code==200){
- console.log(res)
- that.salaryinif=res.data.data;
- that.salaryinif.yearMonth=new Date(res.data.data.yearMonth);
- 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.beforeTax;
- if(res.data.data.ex_ItemsRemark!=''){
- let ItemsRemark=JSON.parse(res.data.data.ex_ItemsRemark);
- console.log(ItemsRemark)
- let jiaqininif;
- let dakainif;
- for(let i=0;i<ItemsRemark.length;i++){
- if(ItemsRemark[i].Type=='假勤'){
- jiaqininif=ItemsRemark[i]
- }
- if(ItemsRemark[i].Type=='打卡'){
- dakainif=ItemsRemark[i]
- }
- }
- console.log(jiaqininif)
- console.log(dakainif)
- if(jiaqininif!=undefined){
- for(let j=0;j<jiaqininif.Ex_ItemInfo.length;j++){
- if(jiaqininif.Ex_ItemInfo[j].SubType=="事假"){
- that.leave.push(jiaqininif.Ex_ItemInfo[j])
- }
- if(jiaqininif.Ex_ItemInfo[j].SubType=="病假"){
- that.sickleave.push(jiaqininif.Ex_ItemInfo[j])
- }
- if(jiaqininif.Ex_ItemInfo[j].SubType=="调休假"||jiaqininif.Ex_ItemInfo[j].SubType=="年假"||jiaqininif.Ex_ItemInfo[j].SubType=="婚假"||jiaqininif.Ex_ItemInfo[j].SubType=="产假"||jiaqininif.Ex_ItemInfo[j].SubType=="陪产假"||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.Ex_ItemInfo.length;x++){
- if(dakainif.Ex_ItemInfo[x].SubType=="迟到"){
- that.late.push(dakainif.Ex_ItemInfo[x])
- }
- if(dakainif.Ex_ItemInfo[x].SubType=="早退"){
- that.early.push(dakainif.Ex_ItemInfo[x])
- }
- if(dakainif.Ex_ItemInfo[x].SubType=="旷工"){
- that.absenteeism.push(dakainif.Ex_ItemInfo[x])
- }
- if(dakainif.Ex_ItemInfo[x].SubType=="打卡补卡"){
- that.notout.push(dakainif.Ex_ItemInfo[x])
- }
- }
- }
- console.log(that.late)
- }
- }else{
- that.$message({
- message: '加载失败!原因:'+res.data.msg,
- type: 'warning'
- });
- }
- })
- },
- //薪资(新增,修改)API
- PostWageSheetAddOrEdit(inif){
- console.log(inif)
- var url = "/api/PersonnelModule/PostWageSheetAddOrEdit"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- },
- data:{
- status:inif.statuss,
- createUserId:that.loginuserid,
- userId:that.salaryinif.userId,
- id:inif.ids,
- remark:that.salaryinif.remark,
- yearMonth:that.TimeProcessingyue(that.salaryinif.yearMonth),
- startDate:that.TimeProcessingri(that.salaryinif.startDate),
- endDate:that.TimeProcessingri(that.salaryinif.endDate),
- basic:that.salaryinif.basic,
- floats:that.salaryinif.floats,
- postAllowance:that.salaryinif.postAllowance,
- // garmentWashSubsidies:that.salaryinif.garmentWashSubsidies,
- // communicationSubsidies:that.salaryinif.communicationSubsidies,
- otherSubsidies:that.salaryinif.otherSubsidies,
- otherHandle:that.salaryinif.otherHandle,
- 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,
- sickLeave:that.salaryinif.sickLeave,
- somethingFalse:that.salaryinif.somethingFalse,
- lateTo:that.salaryinif.lateTo,
- leaveEarly:that.salaryinif.leaveEarly,
- absenteeism:that.salaryinif.absenteeism,
- notPunch:that.salaryinif.notPunch,
- otherDeductions:that.salaryinif.otherDeductions,
- should:that.salaryinif.should,
- totalDeductions:that.salaryinif.totalDeductions,
- 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,
- type: 'warning'
- });
- }
- })
- },
- //薪资(新增,修改)
- salaryAD(text,formName){
- this.$refs[formName].validate((valid) => {
- if (valid) {
- // alert('submit!');
- this.dialogFormVisible = false;
- let inifadd={
- statuss:'',
- userIds:'',
- ids:''
- }
- if(text=='新增'){
- inifadd.statuss=1;
- inifadd.userIds=0;
- inifadd.ids=0;
- this.PostWageSheetAddOrEdit(inifadd)
- }else if(text=='修改'){
- inifadd.statuss=2;
- inifadd.userIds=this.salaryinif.userId;
- inifadd.ids=this.salaryinif.id;
- this.PostWageSheetAddOrEdit(inifadd)
- }
- } else {
- this.$message.error('请将红框内容补全!');
- return false;
- }
- });
- },
- //新增薪资
- addsalary(){
- // console.log(this.$refs.salaryinif)
- if (this.$refs.salaryinif){
- this.$nextTick(() => {
- this.$refs['salaryinif'].clearValidate();
- })
- }
- this.leave=[];//事假
- this.sickleave=[];//病假
- this.late=[];//迟到
- this.early=[];//早退
- this.transfer=[];//调休假
- this.absenteeism=[];//旷工
- this.notout=[];//补卡
- let myDate = new Date(this.value2);
- let month = myDate.getMonth() + 1;
- month = month < 10 ? "0" + month : month; //格式化月份,补0
- let statDateStart = new Date(myDate.getFullYear().toString() +'-'+ month +'-'+ "01"); //月初
- let dayEnd = new Date(myDate.getFullYear(), month, 0).getDate(); //获取当月一共有多少天
- let statDateEnd = new Date(myDate.getFullYear().toString() +'-'+ month +'-'+ dayEnd); //月末
- // this.clicknot=false;
- this.dialogFormVisible = true;
- this.disabled=false;
- this.preserve=true;
- this.salaryinif={
- // regularization:true,
- userId:"",//员工Id
- name:"",//姓名
- yearMonth:new Date(this.value2),//年月
- startDate:statDateStart,//工资日期 起
- endDate:statDateEnd,//工资日期 止
- basic:0,//基本工资
- floats:0,//绩效工资
- postAllowance:0,//岗位津贴
- // garmentWashSubsidies:0,//服装洗理补贴
- // communicationSubsidies:0,// 通讯补贴
- otherSubsidies:0,// 月度补贴
- otherHandle:0,//其他应付
- informationSecurityFee:0,// 保密费
- // operationBonus:0,// 操作奖金
- // specialAllowance:0,// 特殊津贴
- // otherSubsidies:0,// 其他补贴
- withholdingInsurance:0,// 代扣保险
- mealsupplement:0,// 餐补
- reservedFunds:0,// 代扣公积金
- // groupCost:0,// 部门集体团建费
- sickLeave:0,// 病假
- somethingFalse:0,// 事假
- lateTo:0,// 迟到
- leaveEarly:0,// 早退
- absenteeism:0,//旷工
- notPunch:0,//补卡
- otherDeductions:0,//其他扣款
- should:0,//应发合计
- workDays:0,//应出勤天数
- regularDays:0,//正常出勤天数
- totalDeductions:0,//扣款合计
- totalRealHair:0,//实发合计
- withholdingTax:0,//代扣个税
- afterTax:0,//税后工资
- isLock:0,//锁定标识
- lastUpdateUserId:"",//最后操作人
- lastUpdateUserName:"",//最后操作人Name
- lastUpdateDt:"",//最后操作时间
- remark:"",//备注
- beforeTax:0,//税前合计
- };
- },
- //删除薪资列表
- deleteaddsalary(index,row,rows){
- this.$confirm('此操作将删除该数据, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- var url = "/api/PersonnelModule/PostWageSheetDel"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- },
- data:{
- userId:that.loginuserid,
- id:row.id
- }
- }).then(function (res) {
- if(res.data.code==200){
- console.log(res)
- that.$message({
- message: res.data.msg,
- type: 'success'
- });
- rows.splice(index, 1);
- }else{
- that.$message({
- message: res.data.msg,
- type: 'warning'
- });
- }
- })
- })
- console.log(row)
-
- },
- //计算工资
- SalaryCalculator(formName){
- this.$refs[formName].validate((valid) => {
- if (valid) {
- 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.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=[];//旷工
- this.notout=[];//补卡
- console.log('jin')
- var url = "/api/PersonnelModule/SalaryCalculatorSingle"
- var that = this
- this.fullscreenLoading = true;
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- },
- data:{
- userId:that.salaryinif.userId,
- yearMonth:that.TimeProcessingyue(that.salaryinif.yearMonth),
- startDate:that.TimeProcessingri(that.salaryinif.startDate),
- endDate:that.TimeProcessingri(that.salaryinif.endDate),
- basic:that.salaryinif.basic,
- floats:that.salaryinif.floats,
- postAllowance:that.salaryinif.postAllowance,
- // 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,
- otherHandle:that.salaryinif.otherHandle,
- withholdingInsurance:that.salaryinif.withholdingInsurance,
- mealsupplement:that.salaryinif.mealsupplement,
- withholdingTax:that.salaryinif.withholdingTax,
- // groupCost:that.salaryinif.groupCost,
- reservedFunds:that.salaryinif.reservedFunds,
- withholdingInsurance:that.salaryinif.withholdingInsurance,
- otherDeductions:that.salaryinif.otherDeductions,
- }
- }).then(function (res) {
- console.log(res)
- if(res.data.code==200){
- that.fullscreenLoading = false;
- console.log(res);
- that.jsonstring=res.data.data.ex_ItemsRemark;
- console.log(that.addaex_ItemsRemark)
- that.salaryinif.somethingFalse=res.data.data.somethingFalse;
- that.salaryinif.sickLeave=res.data.data.sickLeave;
- that.salaryinif.lateTo=res.data.data.lateTo;
- that.salaryinif.leaveEarly=res.data.data.leaveEarly;
- 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.beforeTax;
- that.salaryinif.totalRealHair=res.data.data.totalRealHair;
- if(res.data.data.ex_ItemsRemark!=''){
- that.addaex_ItemsRemark=JSON.parse(res.data.data.ex_ItemsRemark);
- let jiaqin;
- let daka;
- for(let i=0;i<that.addaex_ItemsRemark.length;i++){
- if(that.addaex_ItemsRemark[i].Type=='假勤'){
- jiaqin=that.addaex_ItemsRemark[i]
- }
- if(that.addaex_ItemsRemark[i].Type=='打卡'){
- daka=that.addaex_ItemsRemark[i]
- }
- }
- console.log(jiaqin)
- console.log(daka)
- if(jiaqin!=undefined){
- for(let j=0;j<jiaqin.Ex_ItemInfo.length;j++){
- if(jiaqin.Ex_ItemInfo[j].SubType=="事假"){
- that.leave.push(jiaqin.Ex_ItemInfo[j])
- }
- if(jiaqin.Ex_ItemInfo[j].SubType=="病假"){
- that.sickleave.push(jiaqin.Ex_ItemInfo[j])
- }
- if(jiaqin.Ex_ItemInfo[j].SubType=="调休假"||jiaqin.Ex_ItemInfo[j].SubType=="年假"||jiaqin.Ex_ItemInfo[j].SubType=="婚假"||jiaqin.Ex_ItemInfo[j].SubType=="产假"||jiaqin.Ex_ItemInfo[j].SubType=="陪产假"||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.Ex_ItemInfo.length;x++){
- if(daka.Ex_ItemInfo[x].SubType=="迟到"){
- that.late.push(daka.Ex_ItemInfo[x])
- }
- if(daka.Ex_ItemInfo[x].SubType=="早退"){
- that.early.push(daka.Ex_ItemInfo[x])
- }
- if(daka.Ex_ItemInfo[x].SubType=="旷工"){
- that.absenteeism.push(daka.Ex_ItemInfo[x])
- }
- if(daka.Ex_ItemInfo[x].SubType=="打卡补卡"){
- that.notout.push(daka.Ex_ItemInfo[x])
- }
- }
- }
- that.GetWageSheetList();
- that.$message({
- message: res.data.msg,
- type: 'success'
- });
- }
- }else{
- that.fullscreenLoading = false;
- that.$message({
- message: res.data.msg,
- type: 'warning'
- });
- }
- })
- },
- //保留两位小数
- rounding(row,column) {
- return parseFloat(row[column.property]).toFixed(2)
- },
- //处理时间
- rounddadykaishi(val){
- if(val.StartTimeDt.indexOf('T')!=-1){
- return val.StartTimeDt.replace('T',' ')
- }
-
- },
- rounddadyjieshu(val){
- if(val.EndTimeDt.indexOf('T')!=-1){
- return val.EndTimeDt.replace('T',' ')
- }
- },
- //选择公司
- companychange(){
- this.cnName='';
- this.tableDatatwo=[];
- let tableDataone=[];
- if(this.companyName!=-1){
- for(let i=0;i<this.tableData.length;i++){
- if(this.tableData[i].companyId==this.companyName){
- tableDataone.push(this.tableData[i]);
- }
- }
- this.tableDatatwo=tableDataone;
- }else{
- this.tableDatatwo=this.tableData;
- }
- },
- //选择员工
- cnNamechange(){
- let tableDatatheer=[];
- let tableDatafour=this.tableDatatwo;
- if(this.cnName!=''){
- for(let j=0;j<this.tableDatatwo.length;j++){
- if(this.tableDatatwo[j].name.indexOf(this.cnName)!=-1){
- tableDatatheer.push(this.tableDatatwo[j])
- }
- }
- this.tableDatatwo=tableDatatheer;
- }else{
- this.companychange()
- // this.tableDatatwo=this.tableDatatwo
- }
-
- },
- //下载
- Download(){
- this.$confirm('请确认左上角的日期,是否要导出'+this.value2+'的工资单!', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- console.log(this.value2)
- var url = "/api/PersonnelModule/ExportWageCard?yearMonth="+this.value2
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- }
- }).then(function (res) {
- if(res.data.code==200){
- console.log(res)
- window.open(res.data.data.fileUrl);
- that.$message({
- message:res.data.msg,
- type: 'success'
- });
- }else{
- that.$message({
- message: '导出失败!原因:'+res.data.msg,
- type: 'warning'
- });
- }
- }).catch(()=>{})
- })
- },
- // 文件超出个数限制时的钩子
- exceedFile(files, fileList) {
- this.$message.warning(`只能选择 ${this.limitNum} 个文件,当前共选择了 ${files.length + fileList.length} 个`);
- },
- // 文件状态改变时的钩子
- fileChange(file, fileList) {
- console.log(file.raw);
- this.fileList.push(file.raw) ;
- console.log(this.fileList);
- },
- // 上传文件之前的钩子, 参数为上传的文件,若返回 false 或者返回 Promise 且被 reject,则停止上传
- beforeUploadFile(file) {
- console.log('before upload');
- console.log(file);
- let extension = file.name.substring(file.name.lastIndexOf('.')+1);
- let size = file.size / 1024 / 1024;
- if(extension !== 'xlsx') {
- this.$message.warning('只能上传后缀是.xlsx的文件');
- }
- if(size > 10) {
- this.$message.warning('文件大小不得超过10M');
- }
- },
- // 文件上传成功时的钩子
- handleSuccess(res, file, fileList) {
- this.$message.success('文件上传成功');
- },
- // 文件上传失败时的钩子
- handleError(err, file, fileList) {
- this.$message.error('文件上传失败');
- },
- UploadUrl:function(){
- // 因为action参数是必填项,我们使用二次确认进行文件上传时,直接填上传文件的url会因为没有参数导致api报404,所以这里将action设置为一个返回为空的方法就行,避免抛错
- return ""
- },
- uploadFile(formName) {
- this.$refs[formName].validate((valid) => {
- if (valid) {
- if (this.fileList.length === 0){
- this.$message.warning('请上传文件');
- } else {
- var form = new FormData();
- form.append('file', this.fileList[0]);
- // form.append('yearMonth', this.TaxesData.yearMonth);
- console.log("wenjian"+this.fileList)
- console.log(form)
- var that = this
- this.$axios({
- method:"post",
- url: "/api/PersonnelModule/UploadTax",
- headers: {
- 'Content-type': 'multipart/form-data',
- Authorization: 'Bearer ' + this.token,
- YearMonth: that.TimeProcessingyue(that.TaxesData.yearMonth)
- },
- data:form
- }).then(function (res) {
- console.log(res)
- if(res.data.code==200){
- console.log(res)
- that.UploadTaxes=false;
- that.value2=that.TimeProcessingyue(that.TaxesData.yearMonth)
- that.GetWageSheetList();
- that.$message({
- message:res.data.msg,
- type: 'success'
- });
- }else{
- that.$message({
- message: '上传失败!原因:'+res.data.msg,
- type: 'warning'
- });
- }
- }).catch(()=>{})
- }
- } else {
- this.$message.error('请将红框内容补全!');
- return false;
- }
- });
-
- },
- removelist(file, fileList){
- console.log(file)
- console.log(fileList)
- console.log(this.fileList)
- this.fileList=[]
- },
- //下载模板
- DownloadTaxes(){
- var url = "/api/PersonnelModule/WageSheetTaxTemplate"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- }
- }).then(function (res) {
- if(res.data.code==200){
- console.log(res)
- window.open(res.data.data.fileUrl);
- that.$message({
- message:res.data.msg,
- type: 'success'
- });
- }else{
- that.$message({
- message: '下载失败!原因:'+res.data.msg,
- type: 'warning'
- });
- }
- }).catch(()=>{})
- }
- },
- mounted(){
- this.GetWageSheetBasicsDataSource()
- this.loginuserid=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
- this.getnewDate();
- }
- }
- </script>
- <style>
- .payroll-all{
- background-color: #fff;
- padding: 10px;
- box-shadow: 0 0 5px #0005;
- border-radius: 10px;
- height: 100%;
- min-height: 830px;
- }
- .payroll-head-li label{
- color: #606266;
- font-size: 15px;
- font-weight: 600;
- }
- .payroll-head-li{
- margin-top: 5px;
- }
- .payroll-head{
- display: flex;
- justify-content: space-between;
- flex-wrap: wrap;
- margin-bottom: 20px;
- }
- .payroll-inif{
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- margin: 0 80px;
- }
- .payroll-inif .el-form-item{
- width: 350px;
- }
- .payroll-inif .el-input-number--medium{
- width: 218px;
- }
- .payroll-inif .el-form-item{
- margin-bottom: 2px;
- }
- .payroll-inif .el-input--medium .el-input__inner{
- text-align: left;
- }
- .leave-inif{
- margin: 0 80px;
- display: flex;
- flex-wrap: wrap;
- }
- .leave-inif .el-form-item{
- margin-bottom: 0px;
- width: 24%;
- }
- .salary-payments{
- display: flex;
- flex-wrap: wrap;
- margin: 0 80px;
- }
- .salary-payments .el-form-item{
- margin-bottom: 0px;
- font-size: 17px;
- font-weight: 600;
- width: 24%;
- }
- .payroll-all .el-dialog__body{
- padding: 16px 20px;
- }
- .remark-box{
- margin: 0 80px;
- }
- .payroll-inif .el-input--medium {
- width: 218px;
- }
- .remark-box.el-form-item{
- margin-bottom: 0px;
- }
- .remark-box .el-input--medium .el-input__inner{
- text-align: left;
- }
- .remark-box .el-input-number--medium{
- width: 218px;
- text-align:left;
- }
- .ps-box{
- font-size:12px ;
- color: red;
- }
- .pan .el-form-item__error{
- display: none;
- }
- .remark-box .el-textarea__inner{
- width: 96.5%;
- }
- .payroll-all::-webkit-scrollbar-track-piece {
- background-color: #f1f1f1;
- }
- .payroll-all::-webkit-scrollbar {
- width: 10px;
- height: 10px;
- }
- .payroll-all::-webkit-scrollbar-thumb {
- background-color: #c1c1c1;
- background-clip: padding-box;
- min-height: 28px;
- border-radius: 8px;
- }
- .payroll-all::-webkit-scrollbar-thumb:hover {
- background-color: #a8a8a8;
- }
- .biaoji .el-input-number--medium{
- width: 90px;
- }
- .biaoji .el-input--medium .el-input__inner{
- text-align: left;
- }
- .payroll-all .el-dialog{
- margin: 0 auto 23px;
- }
- </style>
|