list.vue 91 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389
  1. <template>
  2. <section id="section">
  3. <div class="sidebars" ref="sidebars" :style="'width: 180px;display: block;overflow:hidden;background: #fff;height:'+hubs+ 'px'">
  4. <h3><i class="iconfont firerock-iconbaoxiao" style="padding-right: 10px"></i>{{ $t('navigation.askForLeaveManagement') }}</h3>
  5. <el-divider ></el-divider>
  6. <el-col :span="12">
  7. <el-menu :default-active="isSyncData ? '7' : '1'" class="el-menu-vertical-demo" @select="staffs" background-color="#ffffff" text-color="#666666" active-text-color="#20A0FF" style="width:100%">
  8. <!-- <el-submenu index="1">
  9. <template slot="title">
  10. <i class="iconfont firerock-icontianbao"></i>
  11. <span>员工请假填报</span>
  12. </template>
  13. <el-menu-item index="1-1"><p @click="ssl(0)">请事假</p></el-menu-item>
  14. <el-menu-item index="1-2"><p @click="ssl(1)">请病假</p></el-menu-item>
  15. <el-menu-item index="1-3"><p @click="ssl(2)">请年假</p></el-menu-item>
  16. <el-menu-item index="1-4"><p @click="ssl(3)">请产假</p></el-menu-item>
  17. </el-submenu> -->
  18. <template v-if="!isSyncData">
  19. <el-menu-item index="1" v-if="permissions.leaveFil">
  20. <i class="iconfont firerock-icontianbao"></i>
  21. <span slot="title">{{ $t('staffleavetofillin') }}</span>
  22. </el-menu-item>
  23. <!-- <el-submenu index="2" v-if="permissions.leaveAll || permissions.leaveAudit">
  24. <template slot="title">
  25. <i class="iconfont firerock-iconbaoxiaodan"></i>
  26. <span>{{ $t('singlelistofleave') }}</span>
  27. </template>
  28. <el-menu-item index="2-1" ><p @click="bills(false, 2)" v-if="permissions.leaveAll">{{ $t('all') }}</p></el-menu-item>
  29. <el-menu-item index="2-2" ><p @click="bills(true, 1)" v-if="permissions.leaveAudit">{{ $t('state.WaitingAudit') }}</p></el-menu-item>
  30. </el-submenu> -->
  31. <el-menu-item index="2" @select="bills" @click="auditList()" v-if="permissions.leaveAudit">
  32. <i class="iconfont firerock-iconbaoxiaodan"></i>
  33. <span slot="title">请假审核</span>
  34. </el-menu-item>
  35. <el-menu-item index="3" @select="bills" @click="bills(false, 2)" >
  36. <i class="iconfont firerock-iconbaoxiaodan"></i>
  37. <span slot="title">{{ $t('singlelistofleave') }}</span>
  38. </el-menu-item>
  39. <!-- <el-menu-item index="3" @select="bills" @click="bills(false, 2)" v-if="!permissions.leaveAll">
  40. <i class="iconfont firerock-iconbaoxiaodan"></i>
  41. <span slot="title">{{ $t('myleaveform') }}</span>
  42. </el-menu-item> -->
  43. <el-menu-item index="4" v-if="permissions.leaveStatistical">
  44. <template slot="title">
  45. <i class="iconfont firerock-icontianbao"></i>
  46. <span slot="title">{{ $t('for') }}</span>
  47. </template>
  48. </el-menu-item>
  49. <el-menu-item index="5" v-if="permissions.leaveProcess">
  50. <template slot="title">
  51. <i class="iconfont firerock-iconliucheng"></i>
  52. <span slot="title">{{ $t('leaveApprovalProcess') }}</span>
  53. </template>
  54. </el-menu-item>
  55. <el-menu-item index="6" v-if="permissions.leaveAnnual">
  56. <template slot="title">
  57. <i class="iconfont firerock-icontianbao"></i>
  58. <span slot="title">{{ $t('annualleavemanagement') }}</span>
  59. </template>
  60. </el-menu-item>
  61. </template>
  62. <!-- 钉钉环境对接 -->
  63. <template v-if="isSyncData">
  64. <el-menu-item index="7">
  65. <template slot="title">
  66. <i class="iconfont firerock-iconbaoxiaodan"></i>
  67. <span slot="title">{{ $t('singlelistofleave') }}</span>
  68. </template>
  69. </el-menu-item>
  70. <el-menu-item index="8">
  71. <template slot="title">
  72. <i class="iconfont firerock-iconbaoxiaodan"></i>
  73. <span slot="title">{{ $t('scheduleofremainingLeave') }}</span>
  74. </template>
  75. </el-menu-item>
  76. </template>
  77. </el-menu>
  78. </el-col>
  79. </div>
  80. <!-- 侧边栏点击事件 -->
  81. <!-- <div class="side" @click="side" ref="sid" style="left: 430px">
  82. <div class="spans" ref="side" style="left: -19px;"><i ref="sideI" class="el-icon-arrow-left"></i></div>
  83. </div> -->
  84. <!-- 内容主体区域 -->
  85. <div class="contents">
  86. <div v-if="!displayTable && !isSyncData" class="headine" ref="headine">
  87. <h3 ref="headHe" style="padding-left: 220px">{{ $t('aketimeoffto') }}</h3>
  88. <!-- <p style="float: right;margin-right: 25px;"><el-button type="primary" @click="submits('addFormRules')" size="mini">提交</el-button></p> -->
  89. </div>
  90. <!-- 上面部分 -->
  91. <div v-if="!displayTable && apk == false" class="tops" :style="'height:' +hubs+'px'">
  92. <!-- 公共 -->
  93. <div class="ctons" style="width: 98%">
  94. <!-- 表单 -->
  95. <el-form ref="addForm" :model="addForm" label-width="80px" :rules="addFormRules">
  96. <!-- 请假类型 -->
  97. <el-form-item :label="$t('leavetype')" prop="leaveType" style="width: 100%">
  98. <!--普通员工只能自己填报自己的 -->
  99. <el-select v-model="addForm.leaveType" @change="txselts(addForm.leaveType,addForm.ownerId)" :placeholder="$t('defaultText.pleaseChoose')" style="width: 240px">
  100. <el-option v-for="item in qjType" :key="item.id" :label="item.name" :value="item.id"></el-option>
  101. </el-select>
  102. <template v-if="addForm.leaveType == 6">
  103. <span style="margin-left:18px;color:#777;">{{ $t('restcanbeadjusted') }} {{addForm.ownerId != '' ? txselnum : '~'}} {{ $t('time.day') }}</span>
  104. <el-tooltip effect="dark" :content="$t('overtimhourscabeusedforoffsetting')" placement="top-start">
  105. <i class="el-icon-question" style="color:#606266;"></i>
  106. </el-tooltip>
  107. </template>
  108. </el-form-item>
  109. <!-- 请假人 -->
  110. <el-form-item :label="$t('leavepeople')" prop="ownerId" style="width: 300px">
  111. <!--普通员工只能自己填报自己的 -->
  112. <el-select v-if="user.userNameNeedTranslate != 1" v-model="addForm.ownerId" @change="txselts(addForm.leaveType,addForm.ownerId)" :placeholder="$t('defaultText.pleaseChoose')" style="width: 240px" :disabled="true" filterable="true">
  113. <span v-for="(item, index) in users" :key="index">
  114. <el-option :label="item.name" :value="item.id"></el-option>
  115. </span>
  116. </el-select>
  117. <selectCat v-if="user.userNameNeedTranslate == 1" :size="'medium'" :widthStr="'240'" :subject="users" :subjectId="addForm.ownerId" :distinction="'1'" :disabled="true" @selectCal="selectCal"></selectCat>
  118. </el-form-item>
  119. <!-- 电话 -->
  120. <el-form-item :label="$t('phone')" prop="tel" style="margin-right:300px">
  121. <el-input ref="ipts" v-model="addForm.tel" :placeholder="$t('peaseenterthe')" style="width: 250px"></el-input>
  122. </el-form-item>
  123. <!-- 单选 -->
  124. <el-form-item style="display: inline-block;width:300px" :label="$t('lengthunit')">
  125. <el-radio-group v-model="addForm.timeType" @change="chanRadio()" style="display:inline-block;width:240px">
  126. <el-radio label="0">{{ $t('accordingdays') }}</el-radio>
  127. <el-radio label="1" v-if="addForm.leaveType != 6">{{ $t('leavehour') }}</el-radio>
  128. </el-radio-group>
  129. </el-form-item>
  130. <!-- 时间选择 -->
  131. <el-form-item :label="flg ? $t('optiondate') : $t('other.timeSelection')" style="width: 100%;">
  132. <el-col style="display: inline-block; width: 240px">
  133. <el-date-picker v-if="flg" type="date" :placeholder="$t('time.startDate')" value-format="yyyy-MM-dd" v-model="addForm.startDate" style="width: 240px;" @blur="datas()"></el-date-picker>
  134. <el-date-picker v-else type="date" :placeholder="$t('time.startDate')" value-format="yyyy-MM-dd" v-model="addForm.startDate" style="width: 240px;" @change="datasss()"></el-date-picker>
  135. </el-col>
  136. <el-col class="line" v-if="flg" style="display: inline-block; width: 50px">-</el-col>
  137. <el-col style="display: inline-block; width: 240px">
  138. <el-date-picker v-if="flg" type="date" :placeholder="$t('time.endDate')" value-format="yyyy-MM-dd" :picker-options="pickerOptionsEnd" v-model="addForm.endDate" style="width: 250px;" @blur="datas()"></el-date-picker>
  139. <!-- <el-select v-else v-model="addForm.timeHours" placeholder="请假时长" @change="chanSele()">
  140. <el-option v-for="(item, index) in options" :key="index" :label="item" :value="item"></el-option>
  141. </el-select> -->
  142. </el-col>
  143. </el-form-item>
  144. <!-- 请假天数 -->
  145. <el-form-item :label="flg ? $t('leavedays') : $t('leavetime')" prop="timeDays" style="margin-right: 500px">
  146. <!-- {{flg ? addForm.timeDays : addForm.timeHours}}{{flg ? '天' : '小时'}} -->
  147. <!-- <div v-if="flg">{{addForm.timeDays}} 天</div> -->
  148. <div v-if="flg"> <el-input v-model="addForm.timeDays" @blur="inputs()" @input="addForm.timeDays=addForm.timeDays.replace(/[^\d.]/g,'')" style="width: 120px; margin-right: 20px;" type="number" :step="0.5"></el-input> {{ $t('time.day') }}</div>
  149. <div v-else>
  150. <el-input v-model="addForm.timeHours" @blur="inputss()" @input="addForm.timeHours=addForm.timeHours.replace(/[^\d.]/g,'')" style="width: 120px; margin-right: 20px;"></el-input> {{ $t('time.hour') }}
  151. </div>
  152. </el-form-item>
  153. <!-- 备注 -->
  154. <el-form-item :label="$t('bei-zhu')" style="width: 100%">
  155. <el-input type="textarea" v-model="addForm.remark" :rows="5" style="width: 550px" maxlength="100" show-word-limit></el-input>
  156. </el-form-item>
  157. <!--请假流程显示-->
  158. <el-form-item label="审批流程" style="width: 100%">
  159. <span v-for="(item, index) in curWorkflowList" :key="item.id" >
  160. <span v-if="index>0"><i class="el-icon-right"></i></span>
  161. <span><i class="el-icon-s-custom"></i></span>
  162. <span v-if="user.userNameNeedTranslate == 1">
  163. <ww-open-data type='departmentName' :openid='item.auditDeptName' v-if="item.auditorType == 1"></ww-open-data>(主要负责人)
  164. <ww-open-data type='userName' :openid='item.userName' v-if="item.auditorType == 2"></ww-open-data>
  165. </span>
  166. <span v-if="user.userNameNeedTranslate == 0">
  167. {{item.auditorType == 1?item.auditDeptName+'(主要负责人)':item.userName}}
  168. </span>
  169. </span>
  170. </el-form-item>
  171. </el-form>
  172. <div>
  173. <p style="margin-left: 20%"><el-button type="primary" @click="submits('addFormRules')" size="mini" :disabled="txselnum == 0 && addForm.leaveType == 6 && addForm.ownerId != '' ? true : false">{{ $t('btn.submit') }}</el-button></p>
  174. </div>
  175. </div>
  176. </div>
  177. <!-- 下面部分 -->
  178. <div v-if="displayTable && apk == false" class="tops" :style="'height:' +hubs+'px'">
  179. <!-- 公共 -->
  180. <div class="ctons" style="width: 98%;">
  181. <div class="flex">
  182. <div>
  183. <el-select v-if="user.userNameNeedTranslate != 1" v-model="ownerIds" :placeholder="$t('pleaseselectthepersonaskingforleave')" clearable @change="chufas()" style="width: 120px" size="small" v-show="permissions.leaveAll" filterable="true">
  184. <span v-for="(item, index) in users" :key="index">
  185. <el-option :label="item.name" :value="item.id"></el-option>
  186. </span>
  187. </el-select>
  188. <selectCat v-if="user.userNameNeedTranslate == 1" :size="'small'" :subject="users" :subjectId="ownerIds" :distinction="'3'" :disabled="false" :widthStr="'120'" :clearable="true" @selectCal="selectCal" v-show="permissions.leaveAll" style="width: 120px"></selectCat>
  189. </div>
  190. <div>
  191. <span style="color: #606266">{{ $t('leavetype') }}</span>
  192. <el-select v-model="type" :placeholder="$t('defaultText.pleaseChoose')" clearable @change="chufas()" style="width: 110px;" size="small" filterable="true">
  193. <span v-for="(item, index) in typess" :key="index">
  194. <el-option :label="item.name" :value="item.id"></el-option>
  195. </span>
  196. </el-select>
  197. </div>
  198. <div>
  199. <span style="color: #606266">{{$t('offstate')}}</span>
  200. <el-select v-if="falg == 0" v-model="code" :placeholder="$t('defaultText.pleaseChoose')" clearable @change="chufas()" size="small" style="width: 110px" filterable="true">
  201. <span v-for="(item, index) in statuss" :key="index">
  202. <el-option :label="item.name" :value="item.id"></el-option>
  203. </span>
  204. </el-select>
  205. <el-select v-if="falg == 1" disabled v-model="code" :placeholder="$t('pleaseselectthetypeofleave')" clearable @change="chufas()" size="small" style="width: 110px" filterable="true">
  206. <span v-for="(item, index) in statuss" :key="index">
  207. <el-option :label="item.name" :value="item.id"></el-option>
  208. </span>
  209. </el-select>
  210. </div>
  211. <div>
  212. <!-- <span style="color: #606266">请假时间</span>
  213. <el-date-picker v-model="createDate" type="date" @change="chufas()" value-format="yyyy-MM-dd" placeholder="选择日期" size="small" clearable="false"> </el-date-picker> -->
  214. <span style="color: #606266">{{ $t('message.period') }}</span>
  215. <el-date-picker v-model="createDate" type="daterange" :range-separator="$t('other.to')" :start-placeholder="$t('time.startDate')" :end-placeholder="$t('time.endDate')" @change="chufas()" value-format="yyyy-MM-dd" :placeholder="$t('optiondate')" size="small" clearable style="width:250px"></el-date-picker>
  216. </div>
  217. <div>
  218. <el-button type="primary" size="small" style="margin-left:20px" @click="exportLeave()">{{ $t('dao-chu-qing-jia-dan') }}</el-button>
  219. </div>
  220. </div>
  221. <el-table v-loading="loading" :data="tableData" style="width: 100%" height="94%">
  222. <el-table-column prop="ownerName" :label="$t('leavepeople')" min-width="120" fixed="left">
  223. <template slot-scope="scope">
  224. <div>
  225. <span v-if="user.userNameNeedTranslate != 1">{{scope.row.ownerName}}</span>
  226. <span v-if="user.userNameNeedTranslate == 1">
  227. <ww-open-data type='userName' :openid='scope.row.ownerName'></ww-open-data>
  228. </span>
  229. </div>
  230. </template>
  231. </el-table-column>
  232. <el-table-column prop="tel" :label="$t('phone')" min-width="120"></el-table-column>
  233. <el-table-column prop="leaveType" :label="$t('leavetype')" min-width="120">
  234. <template slot-scope="scope">
  235. <!-- <div v-if="scope.row.leaveType == 0">事假</div>
  236. <div v-if="scope.row.leaveType == 1">病假</div>
  237. <div v-if="scope.row.leaveType == 2">年假</div>
  238. <div v-if="scope.row.leaveType == 3">产假</div> -->
  239. {{qjType[scope.row.leaveType].name}}
  240. </template>
  241. </el-table-column>
  242. <el-table-column prop="startDate" :label="$t('leavestarttime')" min-width="150"></el-table-column>
  243. <el-table-column prop="endDate" :label="$t('leaveendtime')" min-width="150"></el-table-column>
  244. <el-table-column :label="$t('leavedays')" min-width="120">
  245. <template slot-scope="scope">
  246. <div v-if="scope.row.timeType == '1'">/</div>
  247. <div v-else>{{scope.row.timeDays}} {{ $t('time.day') }}</div>
  248. </template>
  249. </el-table-column>
  250. <el-table-column :label="$t('leavetime')" min-width="120" v-if="!user.timeType.syncDingding">
  251. <template slot-scope="scope">
  252. <div>{{scope.row.timeHours}} {{ $t('time.hour') }}</div>
  253. </template>
  254. </el-table-column>
  255. <el-table-column prop="status" :label="$t('state.states')" min-width="180">
  256. <template slot-scope="scope">
  257. <div v-if="scope.row.status == 0 || scope.row.status == 1 || scope.row.status == 2 || scope.row.status == 3 || scope.row.status == 4">
  258. <div v-if="scope.row.status == 0" >{{ $t('state.approved') }}</div>
  259. <div v-if="scope.row.status == 1" style="color: orange"><span>{{ $t('state.WaitingAudit') }}-</span>
  260. <span v-if="user.userNameNeedTranslate != 1">{{scope.row.auditorName}}</span>
  261. <span v-if="user.userNameNeedTranslate == 1">
  262. <ww-open-data type='userName' :openid='scope.row.auditorName'></ww-open-data>
  263. </span>
  264. </div>
  265. <div v-if="scope.row.status == 2" style="color: red">{{ $t('btn.rejected') }}</div>
  266. <div v-if="scope.row.status == 3" style="color: #666666">已撤回</div>
  267. </div>
  268. <div v-else>
  269. <span>{{ $t('norequestforleaveatpresent') }}</span>
  270. </div>
  271. </template>
  272. </el-table-column>
  273. <el-table-column prop="remark" :label="$t('bei-zhu')" min-width="200" header-align="center">
  274. <template slot-scope="scope">
  275. <!-- <div class="apls">{{scope.row.remark}}</div> -->
  276. <el-popover placement="top-start" :title="$t('biao-ti')" width="200" trigger="hover" :content="scope.row.remark">
  277. <div slot="reference" class="apls">{{scope.row.remark}}</div>
  278. </el-popover>
  279. </template>
  280. </el-table-column>
  281. <el-table-column :label="$t('operation')" min-width="180" fixed="right" v-if="isAuditList && !isSyncData">
  282. <template slot-scope="scope">
  283. <div>
  284. <el-button icon="el-icon-check" circle size="mini" @click.stop.native="approve(scope.row)"></el-button>
  285. <el-button icon="el-icon-close" circle size="mini" @click.stop.native="deny(scope.row)"></el-button>
  286. </div>
  287. </template>
  288. </el-table-column>
  289. <el-table-column :label="$t('operation')" min-width="180" fixed="right" v-if="!isAuditList && !isSyncData">
  290. <template slot-scope="scope">
  291. <div v-if="(scope.row.status != 0 && scope.row.ownerId == user.id) || permissions.leaveAll">
  292. <el-button size="mini" v-if="scope.row.status == 3" @click.stop.native="deletes(scope.row)" >删除</el-button>
  293. <el-button size="mini" v-if="scope.row.status == 1" @click.stop.native="cancel(scope.row)">撤回</el-button>
  294. <el-button size="mini" v-if="scope.row.status == 3" type="primary" @click.stop.native="editor(scope.row)">重新提交</el-button>
  295. </div>
  296. <!-- <div>
  297. <el-button icon="el-icon-delete" circle size="mini" @click.stop.native="deletes(scope.row)"></el-button>
  298. <el-button icon="el-icon-edit" circle size="mini" @click.stop.native="editor(scope.row)"></el-button>
  299. </div> -->
  300. </template>
  301. </el-table-column>
  302. </el-table>
  303. <div class="poss">
  304. <!-- <el-pagination
  305. @size-change="handleSizeChange"
  306. @current-change="handleCurrentChange"
  307. :current-page="currentPage4"
  308. :page-sizes="[20, 50, 100, 200]"
  309. :page-size="20"
  310. layout="total, sizes, prev, pager, next"
  311. :total="total">
  312. </el-pagination> -->
  313. <el-pagination
  314. @size-change="handleSizeChange"
  315. @current-change="handleCurrentChange"
  316. :current-page="page"
  317. :page-sizes="[20, 50, 100, 200]"
  318. :page-size="20"
  319. layout="total, sizes, prev, pager, next"
  320. :total="total">
  321. </el-pagination>
  322. </div>
  323. </div>
  324. </div>
  325. <!-- 统计部分 -->
  326. <div v-if="displayTable && apk && apk2 == 4" class="tops" :style="'height:' +hubs+'px'">
  327. <!-- 公共 -->
  328. <div class="ctons" style="width: 98%;">
  329. <div style="display: flex;align-items: center;padding-bottom: 20px;border-bottom: 1px solid #f2f2f2">
  330. <div style="display: inline-block;width: 350px">
  331. <el-input style="float:left;" v-if="user.userNameNeedTranslate != 1" v-model="keyword" class="input-with-select" :placeholder="$t('pleaseenterstaffsearch')" clearable="true" size="small">
  332. <el-button slot="append" @click="statistical()" icon="el-icon-search"></el-button>
  333. </el-input>
  334. </div>
  335. <div style="display: inline-block;width: 340px">
  336. <span style="display: inline-block;margin: 0 15px 0 20px;color: rgb(96, 98, 102);">{{ $t('time.startDate') }}</span>
  337. <el-date-picker
  338. v-model="statData"
  339. type="date"
  340. :placeholder="$t('optiondate')"
  341. size="small"
  342. @change="statistical()"
  343. clearable="false"
  344. value-format="yyyy-MM-dd"
  345. :picker-options="pickerOptionsStarts">
  346. </el-date-picker>
  347. </div>
  348. <div style="display: inline-block;width: 350px">
  349. <span style="display: inline-block;margin: 0 15px 0 0;color: rgb(96, 98, 102);">{{ $t('time.endDate') }}</span>
  350. <el-date-picker
  351. v-model="endData"
  352. type="date"
  353. :placeholder="$t('optiondate')"
  354. size="small"
  355. @change="statistical()"
  356. clearable="fasle"
  357. value-format="yyyy-MM-dd"
  358. :picker-options="pickerOptionsEnds">
  359. </el-date-picker>
  360. </div>
  361. </div>
  362. <!-- <div style="margin-top: 30px"> -->
  363. <div>
  364. <el-table key="apk2is4" v-loading="loading" :data="statisticalList" height="780px" style="width: 99%">
  365. <el-table-column prop="ownerName" :label="$t('lable.name')" width="300">
  366. <template slot-scope="scope">
  367. <div v-if="scope.row.ownerName">
  368. <span v-if="user.userNameNeedTranslate != 1">{{scope.row.ownerName}}</span>
  369. <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='scope.row.ownerName'></ww-open-data></span>
  370. </div>
  371. <div v-else>
  372. <span>{{ $t('Nstatisticpresent') }}</span>
  373. </div>
  374. </template>
  375. </el-table-column>
  376. <el-table-column prop="timeDays" :label="$t('totaldaysleave')" width="300">
  377. <template slot-scope="scope">
  378. {{scope.row.timeDays}} / {{ $t('time.day') }}
  379. </template>
  380. </el-table-column>
  381. <el-table-column prop="timeHours" :label="$t('totallengthofleave')">
  382. <template slot-scope="scope">
  383. {{scope.row.timeHours}}/{{ $t('time.hour') }}
  384. </template>
  385. </el-table-column>
  386. </el-table>
  387. </div>
  388. </div>
  389. </div>
  390. <!-- 审批流 -->
  391. <div v-if="displayTable && apk && apk2 == 5" class="tops" :style="'height:' +hubs+'px'">
  392. <div class="ctons" style="width: 98%;">
  393. <el-col :span="6" >
  394. <el-scrollbar style="height:100%;border:1px solid #dddddd;margin-left:15px;" >
  395. <div class="tree" :style="'height:'+ (tableHeight-120) + 'px'">
  396. <el-tree :data="sdata" :props="sdefaultProps" @node-click="handleNodeClick" accordion>
  397. <!-- 添加试试看 -->
  398. <span class="custom-tree-node" slot-scope="{ node, data }">
  399. <!-- <span>{{ node.label }}</span> -->
  400. <span v-if="user.userNameNeedTranslate == '1'">
  401. <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
  402. </span>
  403. <span v-else>
  404. {{ node.label }}
  405. <span v-if="false">{{data}}</span>
  406. </span>
  407. </span>
  408. </el-tree>
  409. </div>
  410. </el-scrollbar>
  411. </el-col>
  412. <el-col :span="18" >
  413. <el-scrollbar style="height:100%;border:1px solid #dddddd;margin-right:20px;" >
  414. <div class="tree" :style="'height:'+ (tableHeight-120) + 'px'">
  415. <div style="padding:5px;color:#333;" v-if="depData != null">{{ $t('setup') }} &lt;<span style="color:#20a0ff;">
  416. <!-- {{depData.label}} -->
  417. <span v-if="user.userNameNeedTranslate != 1">{{depData.label}}</span>
  418. <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='departmentName' :openid='depData.label'></ww-open-data></span>
  419. &gt;</span> {{ $t('approvalprocessforleaveofdirect staff') }}
  420. <el-tooltip effect="dark" v-if="depData != null && depData.children!=null" content="仅适用于当前部门的直属人员,子部门人员的审批流程需要单独设置" placement="top-start">
  421. <i class="el-icon-question"></i>
  422. </el-tooltip>
  423. </div>
  424. <div style="padding:5px;" v-if="depData == null">{{ $t('qing-xuan-ze-bu-men') }}</div>
  425. <div style="width:100%;margin:0 auto;text-align: center; margin-top:50px;" v-if="depData != null">
  426. <span>{{ $t('employeeisallowed') }}</span>
  427. <icon class="iconfont firerock-iconright"></icon>
  428. <icon class="iconfont firerock-iconInsertLine addNode" @click="showNodeDialog(0)"></icon>
  429. <icon class="iconfont firerock-iconright"></icon>
  430. <span v-for="(item, index) in dataArray" :key="item.seq" >
  431. <el-button type="primary" v-if="item.auditorType == 1 && user.userNameNeedTranslate == 1" @click="editNodeDialog(index, item)">
  432. <!-- {{item.auditDeptName}} -->
  433. <ww-open-data type='departmentName' :openid='item.auditDeptName'></ww-open-data>
  434. </el-button>
  435. <el-button type="primary" v-if="item.auditorType == 2 && user.userNameNeedTranslate == 1" @click="editNodeDialog(index, item)">
  436. <!-- {{item.userName}} -->
  437. <ww-open-data type='userName' :openid='item.userName'></ww-open-data>
  438. </el-button>
  439. <el-button type="primary" v-if="item.auditorType == 1 && user.userNameNeedTranslate != 1" @click="editNodeDialog(index, item)">
  440. {{item.auditDeptName}}
  441. </el-button>
  442. <el-button type="primary" v-if="item.auditorType == 2 && user.userNameNeedTranslate != 1" @click="editNodeDialog(index, item)">
  443. {{item.userName}}
  444. </el-button>
  445. <template v-if="item.auditorType == 1 || item.auditorType == 2">
  446. <icon class="iconfont firerock-iconright"></icon>
  447. <icon class="iconfont firerock-iconInsertLine addNode" @click="showNodeDialog(index+1)"></icon>
  448. <icon class="iconfont firerock-iconright"></icon>
  449. </template>
  450. </span>
  451. <!--结束点 -->
  452. <icon class="iconfont firerock-iconApp_New_Line" style="color:#20A0FF;"></icon>
  453. {{ $t('approvaltocomplete') }}
  454. </div>
  455. <div style="width:100%;margin:0 auto;margin-bottom:30px;position: absolute;bottom: 0px;text-align: center; ">
  456. <el-button type="primary" @click="submitInsert" :loading="addLoading">{{ $t('save') }}</el-button>
  457. </div>
  458. </div>
  459. </el-scrollbar>
  460. </el-col>
  461. </div>
  462. <!--部门选择列表 -->
  463. <el-dialog :title="$t('pleaseselectapprover')" v-if="dialogVisible" :visible.sync="dialogVisible" width="460px">
  464. <el-form label-width="140px">
  465. <el-form-item :label="$t('selectdepartmentsdesignatepersonnel')" >
  466. <el-cascader filterable ref="deptCascader" v-model="curDeptId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 100%" @change="chooseDept"
  467. :options="soption" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable v-show="user.userNameNeedTranslate != 1"></el-cascader>
  468. <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :userName="true" :subject="soption" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
  469. </el-form-item>
  470. </el-form>
  471. <div slot="footer" class="dialog-footer">
  472. <el-button type="default" @click="deleteNode" v-if="!isAdd" style="float:left;">{{ $t('btn.delete') }}</el-button>
  473. <el-button type="primary" @click="addNode" >{{ $t('btn.determine') }}</el-button>
  474. </div>
  475. </el-dialog>
  476. </div>
  477. <!-- 年假管理 -->
  478. <div v-if="displayTable && apk && apk2 == 6" class="tops" :style="'height:' +hubs+'px'">
  479. <div class="ctons" style="width: 98%;">
  480. <div style="display: flex;align-items: center;padding-bottom: 20px;border-bottom: 1px solid #f2f2f2">
  481. <div style="display: inline-block;width: 18%;margin-left:1%">
  482. <el-button size="small" @click="changeAltime(0)">{{ $t('volumeset') }}</el-button>
  483. </div>
  484. <div style="display: inline-block;width: 26%" v-if="user.userNameNeedTranslate != 1">
  485. <el-input style="float:left;" v-model="keywordAl" class="input-with-select" :placeholder="$t('pleaseenterhepersonnamesearch')" clearable="true" size="small" @clear="clearsearchAl()">
  486. <el-button slot="append" @click="searchAl()" icon="el-icon-search"></el-button>
  487. </el-input>
  488. </div>
  489. <div style="display: inline-block;width: 32%;">
  490. <span style="display: inline-block;margin: 0 15px 0 20px;color: rgb(96, 98, 102);">{{ $t('screeningDepartment') }}</span>
  491. <el-cascader
  492. ref="selectAl"
  493. filterable
  494. v-model="NcurDeptId"
  495. :placeholder="$t('defaultText.pleaseChoose')"
  496. size="small"
  497. style="width: 60%"
  498. @change="selAl()"
  499. clearable
  500. :options="Nsdata"
  501. :props="{ checkStrictly: true, expandTrigger: 'hover' }"
  502. :show-all-levels="false" v-if="user.userNameNeedTranslate != 1">
  503. </el-cascader>
  504. <vueCascader :size="'small'" :widthStr="'120'" :clearable="true" :subject="Nsdata" :radios="true" :distinction="'2'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
  505. </div>
  506. </div>
  507. <div>
  508. <el-table key="apk2is6" v-loading="loading" :data="iAlDataS" height="480" style="width: 99%;" @selection-change="selPchg">
  509. <el-table-column type="selection"></el-table-column>
  510. <el-table-column prop="userName" :label="$t('lable.name')" width="200">
  511. <template slot-scope="scope">
  512. <div v-if="scope.row.userName">
  513. <span v-if="user.userNameNeedTranslate != 1">
  514. {{scope.row.userName}}
  515. </span>
  516. <span v-if="user.userNameNeedTranslate == 1">
  517. <ww-open-data type='userName' :openid='scope.row.userName'></ww-open-data>
  518. </span>
  519. </div>
  520. </template>
  521. </el-table-column>
  522. <el-table-column prop="department" :label="$t('departmentsuod')" width="200">
  523. <template slot-scope="scope">
  524. <span v-if="user.userNameNeedTranslate != 1">
  525. {{scope.row.department}}
  526. </span>
  527. <span v-if="user.userNameNeedTranslate == 1">
  528. <ww-open-data type='departmentName' :openid='scope.row.department'></ww-open-data>
  529. </span>
  530. </template>
  531. </el-table-column>
  532. <el-table-column prop="yearDays" :label="$t('annualleaveperyear')" width="200">
  533. <template slot-scope="scope">
  534. {{scope.row.yearDays != null ? scope.row.yearDays + $t('time.day') : "-"}}
  535. </template>
  536. </el-table-column>
  537. <el-table-column prop="leftdays" :label="$t('remainingdaysofannualleave')" width="200">
  538. <template slot-scope="scope">
  539. {{scope.row.yearDays != null ? scope.row.yearDays - scope.row.alreadyDays + $t('time.day') : "-"}}
  540. </template>
  541. </el-table-column>
  542. <el-table-column prop="id" :label="$t('numberofannualleavedays')">
  543. <template slot-scope="scope">
  544. <el-button size="small" @click="changeAltime(scope.row)">{{ $t('setup') }}</el-button>
  545. </template>
  546. </el-table-column>
  547. </el-table>
  548. </div>
  549. </div>
  550. <el-dialog :title="$t('pleasesetthetimelimitforannualleave')" v-if="Alshow" :visible.sync="Alshow" @close="delAltime()" width="500px">
  551. <el-form label-width="8rem">
  552. <el-form-item :label="$t('setthenumberofannualleavedaysperyear')" >
  553. <el-input v-model="Alchange.yearDays" type="number" min="0" :placeholder="$t('pleaseenterdays')"></el-input>
  554. </el-form-item>
  555. </el-form>
  556. <div slot="footer" class="dialog-footer">
  557. <el-button type="default" @click="delAltime()">{{ $t('btn.cancel') }}</el-button>
  558. <el-button type="primary" @click="chgAltime()">{{ $t('btn.determine') }}</el-button>
  559. </div>
  560. </el-dialog>
  561. </div>
  562. <div v-if="displayTable && apk && apk2 == 8" class="tops" :style="'height:' +hubs+'px'">
  563. <!-- 公共 -->
  564. <div class="ctons" style="width: 98%;">
  565. <div class="flex">
  566. <div>
  567. <span>{{ $t('leavetype') }}</span>
  568. <el-select v-model="leaveTypeItem" :placeholder="$t('pleaseselectthetypeofleave')" @change="leaveTypeChange()" style="width: 120px" size="small" filterable="true">
  569. <span v-for="item in leaveTypeList" :key="item.leaveCode">
  570. <el-option :label="item.leaveName" :value="item.leaveCode"></el-option>
  571. </span>
  572. </el-select>
  573. </div>
  574. <template v-if="permissions.leaveAll">
  575. <div>
  576. <span>{{ $t('departmentofscreening') }}</span>
  577. <el-cascader
  578. size="small"
  579. collapse-tags
  580. @change="departmentOptionsChg"
  581. v-model="departmentSel"
  582. :options="departmentOptions"
  583. :placeholder="$t('qing-xuan-ze-bu-men')"
  584. :show-all-levels="false"
  585. :props="{ multiple: true }"
  586. clearable></el-cascader>
  587. </div>
  588. <div>
  589. <span>{{ $t('personnelselection') }}</span>
  590. <el-select v-model="userSelId" :placeholder="$t('pleaseselectthepersonaskingforleave')" clearable @change="userChg()" style="width: 140px" size="small" v-show="permissions.leaveAll" filterable="true">
  591. <span v-for="(item, index) in users" :key="index">
  592. <el-option :label="item.name" :value="item.id"></el-option>
  593. </span>
  594. </el-select>
  595. </div>
  596. <div style="margin:0 0px 0 10px">
  597. <el-button size="small" type="primary" @click="listSynchronize" :loading="synchronizeLoading">{{ $t('synchronizefromStaple') }}</el-button>
  598. <el-button size="small" type="primary" @click="exportLeaveList" :loading="exporLoading">{{ $t('dao-chu-jia-qi') }}</el-button>
  599. </div>
  600. </template>
  601. </div>
  602. <el-table key="apk2is8" v-loading="loading" :data="vacationList" style="width: 100%" height="94%">
  603. <el-table-column prop="name" :label="$t('screening.employeename')" min-width="120" fixed="left"></el-table-column>
  604. <el-table-column :label="$t('periodofvalidity')" min-width="250" align="center">
  605. <template slot-scope="scope">
  606. <span>{{scope.row.startTime == null && scope.row.endTime == null ? '~ ~' : (scope.row.startTime + '\u3000~\u3000' + scope.row.endTime)}}</span>
  607. </template>
  608. </el-table-column>
  609. <el-table-column :label="$t('combination')" min-width="100" align="center">
  610. <template slot-scope="scope">
  611. <span>{{scope.row.quotaInDays == null && scope.row.quotaInHours == null ? '-' : (scope.row.quotaInDays == null ? scope.row.quotaInHours + $t('time.hour') : scope.row.quotaInDays + $t('time.day'))}}</span>
  612. </template>
  613. </el-table-column>
  614. <el-table-column :label="$t('beenused')" min-width="100" align="center">
  615. <template slot-scope="scope">
  616. <span>{{scope.row.usedInDays == null && scope.row.usedInHours == null ? '-' : (scope.row.usedInDays == null ? scope.row.usedInHours + $t('time.hour') : scope.row.usedInDays + $t('time.day'))}}</span>
  617. </template>
  618. </el-table-column>
  619. <el-table-column :label="$t('remainingamount')" min-width="100" align="center">
  620. <template slot-scope="scope">
  621. <span>{{scope.row.leftInDays == null && scope.row.leftInHours == null ? '-' : (scope.row.leftInDays == null ? scope.row.leftInHours + $t('time.hour') : scope.row.leftInDays + $t('time.day'))}}</span>
  622. </template>
  623. </el-table-column>
  624. </el-table>
  625. <div class="poss">
  626. <el-pagination
  627. @size-change="vacationSizeChange"
  628. @current-change="vacationCurrentChange"
  629. :current-page="page"
  630. :page-sizes="[50]"
  631. :page-size="50"
  632. layout="total, sizes, prev, pager, next"
  633. :total="total">
  634. </el-pagination>
  635. </div>
  636. </div>
  637. </div>
  638. <!-- --------- -->
  639. </div>
  640. <!-- 请假单详情 -->
  641. <el-dialog :title="$t('leaveForm')" :visible.sync="dialog" width="1000px" @close="bangd()">
  642. <!-- 表单 -->
  643. <el-form ref="addForm" :model="addForm" label-width="80px" :rules="addFormRules">
  644. <!-- 请假人 -->
  645. <el-form-item :label="$t('leavepeople')" prop="ownerId" style="width: 300px;display: inline-block;">
  646. <!--普通员工只能自己填报自己的 -->
  647. <el-select v-if="user.userNameNeedTranslate != 1" v-model="addForm.ownerId" @change="selts()" :placeholder="$t('pleaseselectthepersonaskingforleave')" style="width: 240px" :disabled="true" filterable="true">
  648. <span v-for="(item, index) in users" :key="index">
  649. <el-option :label="item.name" :value="item.id"></el-option>
  650. </span>
  651. </el-select>
  652. <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :subject="users" :subjectId="addForm.ownerId" :disabled="true" :distinction="'4'" :filterable="false" @selectCal="selectCal"></selectCat>
  653. </el-form-item>
  654. <!-- 电话 -->
  655. <el-form-item :label="$t('phone')" prop="tel" style="width: 300px;display: inline-block;">
  656. <el-input ref="ipts" v-model="addForm.tel" :placeholder="$t('defaultText.PleaseEnterYourPhone')" style="width: 250px;"></el-input>
  657. </el-form-item>
  658. <!-- 单选 -->
  659. <el-form-item style="display: block" :label="$t('lengthunit')">
  660. <el-radio-group v-model="addForm.timeType" @change="chanRadio()">
  661. <el-radio label="0">{{ $t('accordingdays') }}</el-radio>
  662. <el-radio label="1">{{ $t('leavehour') }}</el-radio>
  663. </el-radio-group>
  664. </el-form-item>
  665. <!-- 时间选择 -->
  666. <el-form-item :label="flg ? $t('optiondate') : $t('other.timeSelection')" style="width: 74%;margin-right:500px">
  667. <el-col :span="9">
  668. <el-date-picker v-if="flg" type="date" :placeholder="$t('time.startDate')" value-format="yyyy-MM-dd" v-model="addForm.startDate" style="width: 240px;" @blur="datas()"></el-date-picker>
  669. <el-date-picker v-else type="date" :placeholder="$t('time.startDate')" value-format="yyyy-MM-dd" v-model="addForm.startDate" style="width: 240px;" @change="datasss()"></el-date-picker>
  670. </el-col>
  671. <el-col class="line" v-if="flg" :span="2">-</el-col>
  672. <el-col :span="9">
  673. <el-date-picker v-if="flg" type="date" :placeholder="$t('time.endDate')" value-format="yyyy-MM-dd" :picker-options="pickerOptionsEnd" v-model="addForm.endDate" style="width: 250px;" @blur="datas()"></el-date-picker>
  674. <!-- <el-select v-else v-model="addForm.timeHours" placeholder="请假时长" @change="chanSele()">
  675. <el-option v-for="(item, index) in options" :key="index" :label="item" :value="item"></el-option>
  676. </el-select> -->
  677. </el-col>
  678. </el-form-item>
  679. <!-- 请假天数 -->
  680. <el-form-item :label="flg ? $t('leavedays') : $t('leavetime')" prop="timeDays" style="margin-right: 500px">
  681. <!-- {{flg ? addForm.timeDays : addForm.timeHours}}{{flg ? '天' : '小时'}} -->
  682. <!-- <div v-if="flg">{{addForm.timeDays}} 天</div> -->
  683. <div v-if="flg"> <el-input v-model="addForm.timeDays" @blur="inputs()" @input="addForm.timeDays=addForm.timeDays.replace(/[^\d.]/g,'')" style="width: 100px; margin-right: 20px;"></el-input> {{ $t('time.day') }}</div>
  684. <div v-else>
  685. <el-input v-model="addForm.timeHours" @blur="inputss()" @input="addForm.timeHours=addForm.timeHours.replace(/[^\d.]/g,'')" style="width: 100px; margin-right: 20px;"></el-input> {{ $t('time.hour') }}
  686. </div>
  687. </el-form-item>
  688. <!-- 备注 -->
  689. <el-form-item :label="$t('bei-zhu')" style="width: 100%">
  690. <el-input type="textarea" v-model="addForm.remark" :rows="5" style="width: 62%" maxlength="100" show-word-limit></el-input>
  691. </el-form-item>
  692. </el-form>
  693. <span slot="footer" class="dialog-footer">
  694. <el-button @click="dialog = false">{{ $t('btn.cancel') }}</el-button>
  695. <el-button type="primary" @click="determine()">{{ $t('btn.determine') }}</el-button>
  696. </span>
  697. </el-dialog>
  698. <el-dialog :title="$t('defaultText.pleaseEnterTheReason')" v-if="denyDialogV" :visible.sync="denyDialogV" :close-on-click-modal="false" customClass="customWidth" width="500px">
  699. <div>
  700. <el-input type="textarea" v-model="denyInfo.denyReason" rows="2" :placeholder="$t('reasonforyourdecisiontoreject')" />
  701. </div>
  702. <div slot="footer" class="dialog-footer">
  703. <el-button @click="denyDialogV = false" >{{ $t('btn.cancel') }}</el-button>
  704. <el-button type="primary" @click="submitDeny()" >{{ $t('btn.determine') }}</el-button>
  705. </div>
  706. </el-dialog>
  707. </section>
  708. </template>
  709. <script>
  710. import { config, error } from 'dingtalk-jsapi';
  711. // 自定义select组件
  712. import selectCat from "@/components/select.vue"
  713. import Select from '../../components/select.vue';
  714. // 引入自定义级联组件
  715. import vueCascader from "@/components/cascader.vue"
  716. export default {
  717. name: "expense",
  718. components: {
  719. selectCat,
  720. Select,
  721. vueCascader
  722. },
  723. props: {},
  724. data() {
  725. //验证手机号
  726. var checkTel = (rule, value, callback) =>{
  727. if (!value) {
  728. return callback(new Error(this.$t('phonenumbercannotbeempty')));
  729. } else {
  730. const reg = /^1[3|4|5|7|8|9][0-9]\d{8}$/
  731. if (reg.test(value)) {
  732. callback();
  733. } else {
  734. return callback(new Error(this.$t('pleaseenterthecorrectcellphonenumber')));
  735. }
  736. }
  737. };
  738. var checks = (rule, value, callback) => {
  739. if (!value) {
  740. return callback(new Error(this.$t('leavedayscannotbeempty')));
  741. } else {
  742. if (value > this.timeChoose) {
  743. return callback(new Error(this.$t('daysbeyondthecurrentlyselecteddat')));
  744. } else {
  745. callback();
  746. }
  747. }
  748. };
  749. return {
  750. denyDialogV: false,
  751. denyInfo: {},
  752. addFormRules: {
  753. ownerId: [{ required: true, message: this.$t('pleaseselectthepersonaskingforleave'), trigger: "blur" }],
  754. tel: [{required: true, validator: checkTel, trigger: 'blur'}],
  755. timeDays: [{required: true, validator: checks, trigger: 'blur'}],
  756. leaveType: [{ required: true, message: this.$t('pleaseselectthetypeofleave'), trigger: "blur" }]
  757. },
  758. user: JSON.parse(sessionStorage.getItem("user")),
  759. shuz: [this.$t('personalleaveisallowed'), this.$t('leaveisallowed'), this.$t('annualleaveisallowed'), this.$t('maternityleaveisallowed')],
  760. ins: 0,
  761. addForm: {
  762. timeType: '0',
  763. startDate: this.getCurrentTime(),
  764. endDate: this.getCurrentTime(),
  765. timeDays: 1,
  766. leaveType: 0,
  767. ownerId: '',
  768. // indate: this.getCurrentTime(),
  769. timeHours: 8,
  770. tel: '',
  771. remark: ''
  772. },
  773. displayTable: false,
  774. users: [], // 人员信息
  775. flg: true,
  776. createDate: [],
  777. pickerOptionsEnd: {
  778. disabledDate: (time) => {
  779. if (this.addForm.startDate) {
  780. return time.getTime() < new Date(this.addForm.startDate).getTime() - 86400000;
  781. }
  782. return time.getTime() <= new Date(this.createDate).getTime() - 86400000;
  783. },
  784. },
  785. pickerOptionsEnds: {
  786. disabledDate: (time) => {
  787. if (this.statData) {
  788. return time.getTime() < new Date(this.statData).getTime() - 86400000;
  789. }
  790. return time.getTime() <= new Date(this.createDate).getTime() - 86400000;
  791. },
  792. },
  793. options: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'],
  794. tableData: [],
  795. page: 1,
  796. size: 20,
  797. isAuditList: '',
  798. total:0,
  799. apk: false,
  800. keyword: '',
  801. statData: this.getCurrentTimes(),
  802. endData: this.getCurrentTime(),
  803. statisticalList: [],
  804. loading: false,
  805. timeChoose: 1,
  806. permissions: JSON.parse(sessionStorage.getItem("permissions")),
  807. typess: [{name: this.$t('leave.personalLeave'),id: 0},{name: this.$t('leave.sickLeave'),id: 1},{name: this.$t('leave.annualLeave'),id: 2},{name: this.$t('leave.maternityLeave'),id: 3},{name: this.$t('leave.marriageLeave'),id: 4},{name: this.$t('leave.bereavementLeave'),id: 5},{name: this.$t('leave.leave'),id: 6},{name: this.$t('leave.paternityLeave'),id: 7},{name: this.$t('leave.other'), id: 8}],
  808. statuss: [{
  809. name: this.$t('state.approved'),
  810. id: 0
  811. },{
  812. name: this.$t('state.WaitingAudit'),
  813. id: 1
  814. },{
  815. name: this.$t('btn.rejected'),
  816. id: 2
  817. },{
  818. name: this.$t('state.undone'),
  819. id: 3
  820. }],
  821. createDatelis: '',
  822. ownerIds: '',
  823. type: '',
  824. code: '',
  825. falg: 0,
  826. dialog: false,
  827. adform: {},
  828. affId: '',
  829. qjType: [
  830. {name: this.$t('leave.personalLeave'), id: 0},
  831. {name: this.$t('leave.sickLeave'), id: 1},
  832. {name: this.$t('leave.annualLeave'), id: 2},
  833. {name: this.$t('leave.maternityLeave'), id: 3},
  834. {name: this.$t('leave.marriageLeave'), id: 4},
  835. {name: this.$t('leave.bereavementLeave'), id: 5},
  836. {name: this.$t('leave.leave'), id: 6},
  837. {name: this.$t('leave.paternityLeave'), id: 7},
  838. {name: this.$t('leave.other'), id: 8}
  839. ],
  840. //
  841. apk2: false,
  842. sdata:[],
  843. dataArray:[],
  844. sdefaultProps: {
  845. children: 'children',
  846. label: 'label'
  847. },
  848. depData: null,
  849. isAdd : false,
  850. sindex : 0,
  851. curDeptId : null,
  852. curUserId : null,
  853. dialogVisible: false,
  854. soption : null,
  855. Alshow: false,
  856. Alchange: {yearDays:null,userId:null},
  857. AlchangeP: [],
  858. susers: [],
  859. keywordAl: '',
  860. NcurDeptId:[],
  861. Nsdata : [],
  862. AlData : [],
  863. iAlDataS: [],
  864. iAlData : [],
  865. // ---------
  866. txselnum: 0,
  867. approverList: [],
  868. isSyncData: 0,
  869. vacationList: [],
  870. leaveTypeList: [],
  871. leaveTypeItem: '',
  872. departmentOptions: [],
  873. departmentSel: [],
  874. userSelId: '',
  875. synchronizeLoading: false,
  876. kuanBl: 0,
  877. hubs: 0,
  878. vueCasaderItem: [], // 仿数据
  879. vueIAlDataSItems: undefined, // 仿数据
  880. exporLoading: false,
  881. addNodeObj: {},
  882. curWorkflowList:{}
  883. };
  884. },
  885. computed: {},
  886. watch: {},
  887. created() {
  888. let widTHBul = document.documentElement.clientWidth - 440
  889. this.kuanBl = widTHBul
  890. this.hubs = (document.documentElement.clientHeight || document.body.clientHeight) - 70
  891. let height = window.innerHeight;
  892. this.tableHeight = height - 195;
  893. const that = this;
  894. window.onresize = function temp() {
  895. that.tableHeight = window.innerHeight - 195;
  896. };
  897. // console.log('user',this.user);
  898. this.isSyncData = this.user.timeType.syncDingding || this.user.timeType.syncFanwei;
  899. },
  900. mounted() {
  901. if(this.isSyncData){
  902. this.bills(false,2)
  903. this.staffs(7,['7'])
  904. this.getUsers()
  905. }else{
  906. this.getUsers() // 获取人员信息
  907. this.getDepartment();
  908. this.getAl();
  909. this.getApproverList();
  910. this.getAuditWorkflow();
  911. }
  912. },
  913. filters: {},
  914. methods: {
  915. //获取添加请假单时的审批流
  916. getAuditWorkflow() {
  917. this.http.post('/audit-workflow-setting/get',{deptId: this.user.departmentId, type: 1},
  918. res => {
  919. if(res.code == 'ok'){
  920. this.curWorkflowList = res.data;
  921. }else{
  922. this.$message({
  923. message: res.msg,
  924. type: 'error'
  925. })
  926. }
  927. },err => {
  928. this.$message({
  929. message: err,
  930. type: 'error'
  931. })
  932. })
  933. },
  934. // 导出请假单
  935. exportLeave(){
  936. let param = {}
  937. if(this.code !== ''){
  938. param.status = this.code
  939. }
  940. if(this.type !== ''){
  941. param.leaveType = this.type
  942. }
  943. if(this.createDate && this.createDate.length){
  944. param.startTime = this.createDate[0]
  945. param.endTime = this.createDate[1]
  946. }
  947. // console.log(this.code,this.type,param);
  948. // return
  949. this.http.post('/leave-sheet/exportLeave',param,
  950. res => {
  951. if(res.code == 'ok'){
  952. var filePath = res.data;
  953. const a = document.createElement('a'); // 创建a标签
  954. a.setAttribute('download', '请假单');// download属性
  955. a.setAttribute('href', filePath);// href链接
  956. a.click(); //自执行点击事件
  957. a.remove();
  958. }else{
  959. this.$message({
  960. message: res.msg,
  961. type: 'error'
  962. })
  963. }
  964. },err => {
  965. this.$message({
  966. message: err,
  967. type: 'error'
  968. })
  969. })
  970. },
  971. // 导出假期
  972. exportLeaveList() {
  973. this.exporLoading = true
  974. let param = {
  975. leaveCode: this.leaveTypeItem,
  976. companyId: this.user.companyId,
  977. // departmentId: this.departmentSel ? this.departmentSel[this.departmentSel.length - 1] : '',
  978. }
  979. let arrList = []
  980. for(let i in this.departmentSel) {
  981. arrList.push(this.departmentSel[i][this.departmentSel[i].length - 1])
  982. }
  983. console.log(arrList, '处理好的')
  984. param.departmentId = arrList
  985. if(this.userSelId != '') {
  986. param.userId = this.userSelId
  987. }
  988. this.http.post('/user-yearleave-setting/exportDingDingLeaveQt',param,
  989. res => {
  990. this.exporLoading = false
  991. if(res.code == 'ok'){
  992. var filePath = res.data;
  993. const a = document.createElement('a'); // 创建a标签
  994. a.setAttribute('download', '剩余假期');// download属性
  995. a.setAttribute('href', filePath);// href链接
  996. a.click(); //自执行点击事件
  997. a.remove();
  998. }else{
  999. this.$message({
  1000. message: res.msg,
  1001. type: 'error'
  1002. })
  1003. }
  1004. },err => {
  1005. this.exporLoading = false
  1006. this.$message({
  1007. message: err,
  1008. type: 'error'
  1009. })
  1010. })
  1011. },
  1012. // 从钉钉同步假期剩余表
  1013. listSynchronize(){
  1014. this.synchronizeLoading = true
  1015. this.http.post('/dingding/syncLeaveQuotaData',{
  1016. companyId: this.user.companyId
  1017. },res => {
  1018. if(res.code == 'ok'){
  1019. this.synchronizeLoading = false
  1020. this.$message({
  1021. message: this.$t('synchronoussuccess'),
  1022. type: 'success'
  1023. })
  1024. this.getVacationList()
  1025. this.page = 1
  1026. this.departmentSel = []
  1027. this.userSelId = ''
  1028. }else {
  1029. this.synchronizeLoading = false
  1030. this.$message({
  1031. message: res.msg,
  1032. type: 'error'
  1033. })
  1034. }
  1035. },err => {
  1036. this.synchronizeLoading = false
  1037. this.$message({
  1038. message: err,
  1039. type: 'error'
  1040. })
  1041. })
  1042. },
  1043. // 获取部门列表
  1044. getDepartmentOptions(){
  1045. this.http.post(this.port.manage.depList,{
  1046. },res =>{
  1047. if(res.code == 'ok'){
  1048. // console.log('getDepartment',res.data);
  1049. this.departmentOptions = this.changeArr(res.data)
  1050. }else {
  1051. this.$message({
  1052. message: res.msg,
  1053. type: 'error'
  1054. })
  1055. }
  1056. },err => {
  1057. this.$message({
  1058. message: err,
  1059. type: 'error'
  1060. })
  1061. })
  1062. },
  1063. departmentOptionsChg(){
  1064. // console.log(this.departmentSel);
  1065. this.page = 1
  1066. this.getVacationList(1)
  1067. },
  1068. userChg(){
  1069. // console.log(this.userSelId);
  1070. this.page = 1
  1071. this.getVacationList(1)
  1072. },
  1073. // 获取剩余假期信息列表
  1074. getVacationList(e){
  1075. this.loading = true
  1076. let item = {}
  1077. if(e){
  1078. item = {
  1079. companyId: this.user.companyId,
  1080. pageIndex: this.page,
  1081. leaveCode: this.leaveTypeItem
  1082. }
  1083. console.log(this.departmentSel, '甚于')
  1084. // if(this.departmentSel.length != 0){
  1085. // item.departmentId = this.departmentSel[this.departmentSel.length - 1]
  1086. // }
  1087. let arrList = []
  1088. for(let i in this.departmentSel) {
  1089. arrList.push(this.departmentSel[i][this.departmentSel[i].length - 1])
  1090. }
  1091. console.log(arrList, '处理好的')
  1092. item.departmentId = arrList
  1093. if(this.userSelId != ''){
  1094. item.userId = this.userSelId
  1095. }
  1096. // if()
  1097. }else{
  1098. item = {
  1099. companyId: this.user.companyId,
  1100. // leaveCode: '',
  1101. // userId: '',
  1102. pageIndex: this.page,
  1103. // departmentId: ''
  1104. }
  1105. }
  1106. this.http.post('/user-yearleave-setting/getDingDingLeaveQt',item,
  1107. res => {
  1108. if(res.code == 'ok'){
  1109. this.vacationList = res.data.records
  1110. this.total = res.data.total
  1111. if(!e){
  1112. this.leaveTypeList = res.data.leaveTypeList
  1113. this.leaveTypeItem = res.data.defaultLeaveType.leaveCode
  1114. }
  1115. this.loading = false
  1116. }else {
  1117. this.loading = false
  1118. this.$message({
  1119. message: res.msg,
  1120. type: 'error'
  1121. })
  1122. }
  1123. },err => {
  1124. this.loading = false
  1125. this.$message({
  1126. message: err,
  1127. type: 'error'
  1128. })
  1129. })
  1130. },
  1131. leaveTypeChange(){
  1132. // console.log(this.leaveTypeItem);
  1133. this.page = 1
  1134. this.getVacationList(1)
  1135. },
  1136. getApproverList(){
  1137. this.http.post('/project/getMyParticiPMList',{
  1138. },res => {
  1139. if(res.code == 'ok'){
  1140. this.approverList = res.data
  1141. if(this.approverList.length == 0){
  1142. this.$message({
  1143. message: this.$t('configureanapprover'),
  1144. type: 'warning'
  1145. })
  1146. }
  1147. // console.log('list',res.data);
  1148. }else {
  1149. this.$message({
  1150. message: res.msg,
  1151. type: 'error'
  1152. })
  1153. }
  1154. },error => {
  1155. this.$message({
  1156. message: error,
  1157. type: 'error'
  1158. })
  1159. })
  1160. },
  1161. changeAltime(e){
  1162. if(e == 0 && this.AlchangeP.length == 0){
  1163. this.$message(this.$t('selecttheitemsyouwanttobatchset'))
  1164. return
  1165. }else if(e != 0){
  1166. this.Alchange = JSON.parse(JSON.stringify(e))
  1167. }
  1168. this.Alshow = true
  1169. },
  1170. selPchg(e){
  1171. this.AlchangeP = e
  1172. },
  1173. searchAl(){
  1174. this.iAlDataS = []
  1175. for (let i = 0; i < this.iAlData.length; i++) {
  1176. if (this.iAlData[i].userName.indexOf(this.keywordAl) != -1) {
  1177. this.iAlDataS.push(this.iAlData[i])
  1178. }
  1179. }
  1180. },
  1181. clearsearchAl(){
  1182. this.iAlDataS = this.iAlData
  1183. },
  1184. delAltime(){
  1185. this.Alshow = false
  1186. this.Alchange = {yearDays:null,userId:null}
  1187. },
  1188. chgAltime(){
  1189. let chgPar = {}
  1190. let userids = ''
  1191. let Alpost = ''
  1192. if(this.Alchange.userId == null && this.AlchangeP != []){
  1193. Alpost = "/user-yearleave-setting/saveBatch"
  1194. for (let i = 0; i < this.AlchangeP.length; i++) {
  1195. userids = userids + "," + this.AlchangeP[i].userId
  1196. }
  1197. chgPar = {userIds: userids.slice(1), companyId: this.user.companyId, yearDays: this.Alchange.yearDays}
  1198. }else {
  1199. Alpost = "/user-yearleave-setting/save"
  1200. userids = this.Alchange.userId
  1201. chgPar = {userId: userids, companyId: this.user.companyId, yearDays: this.Alchange.yearDays}
  1202. }
  1203. this.http.post(Alpost,chgPar,
  1204. res => {
  1205. if(res.code == "ok"){
  1206. this.Alshow = false,
  1207. this.Alchange = {yearDays:null,userId:null},
  1208. this.AlchangeP = []
  1209. this.getAl()
  1210. }else{
  1211. this.$message({
  1212. message: res.msg,
  1213. type: "error"
  1214. })
  1215. }
  1216. },
  1217. error => {
  1218. this.Alshow = false
  1219. this.$message({
  1220. message: error,
  1221. type: "error"
  1222. })
  1223. }
  1224. )
  1225. },
  1226. getAl(){
  1227. this.http.get('/user-yearleave-setting/list',
  1228. res => {
  1229. if(res.code == "ok"){
  1230. this.iAlData = res.data
  1231. this.iAlDataS = this.iAlData
  1232. if(this.apk2 == 6){
  1233. this.selAl()
  1234. }
  1235. } else {
  1236. this.$message({
  1237. message: res.msg,
  1238. type: "error"
  1239. })
  1240. }
  1241. },
  1242. error => {
  1243. this.Alshow = false
  1244. this.$message({
  1245. message: error,
  1246. type: "error"
  1247. })
  1248. }
  1249. )
  1250. },
  1251. selAl(){
  1252. let e = this.user.userNameNeedTranslate != 1 ? this.$refs.selectAl.getCheckedNodes()[0] : this.vueIAlDataSItems
  1253. if(e == undefined){
  1254. this.iAlDataS = this.iAlData
  1255. }else{
  1256. this.iAlDataS = []
  1257. for (let i = 0; i < this.iAlData.length; i++) {
  1258. if (e.label == this.iAlData[i].department) {
  1259. this.iAlDataS.push(this.iAlData[i])
  1260. }
  1261. }
  1262. }
  1263. },
  1264. // ---------
  1265. handleNodeClick(data) {
  1266. if(this.depData == null || data.id != this.depData.id) {
  1267. this.depData = data;
  1268. // console.log("depdata",this.depData);
  1269. this.getSettings();
  1270. }
  1271. },
  1272. getSettings() {
  1273. this.http.post('/audit-workflow-setting/get',{deptId: this.depData.id,type: 1},
  1274. res => {
  1275. this.listLoading = false;
  1276. if (res.code == "ok") {
  1277. this.dataArray = res.data;
  1278. // console.log("请求1",res.data);
  1279. } else {
  1280. this.$message({
  1281. message: res.msg,
  1282. type: "error"
  1283. });
  1284. }
  1285. },
  1286. error => {
  1287. this.listLoading = false;
  1288. this.$message({
  1289. message: error,
  1290. type: "error"
  1291. });
  1292. }
  1293. );
  1294. },
  1295. // 获取部门列表
  1296. getDepartment() {
  1297. this.http.post( this.port.manage.depList, {},
  1298. res => {
  1299. if (res.code == "ok") {
  1300. var list = res.data , list1 = JSON.parse(JSON.stringify(res.data));
  1301. this.sdata = list;
  1302. this.soption = [
  1303. {value: 1 , label : this.$t('lable.department') , children : this.changeArr(list1), type: 'dep'},
  1304. {value: 2 , label : this.$t('designatedpersonnel'),children : this.susers, type: 'user'}
  1305. ]
  1306. console.log(this.soption, '选人的数据')
  1307. this.Nsdata = list1
  1308. } else {
  1309. this.$message({
  1310. message: res.msg,
  1311. type: "error"
  1312. });
  1313. }
  1314. },
  1315. error => {
  1316. this.$message({
  1317. message: error,
  1318. type: "error"
  1319. });
  1320. });
  1321. },
  1322. changeArr(arr) {
  1323. for (var i = 0; i < arr.length; i++) {
  1324. if(arr[i].id != -1 && arr[i].id != 0) {
  1325. if (arr[i].children != null && arr[i].children.length>0) {
  1326. arr[i].children = this.changeArr(arr[i].children);
  1327. }
  1328. arr[i].type = 'dep'
  1329. arr[i].id && (arr[i].value = arr[i].id);
  1330. delete arr[i].id;
  1331. }
  1332. }
  1333. for(var i in arr) {
  1334. if(arr[i].id == -1 || arr[i].id == 0) {
  1335. arr.splice(i,1)
  1336. }
  1337. }
  1338. return arr;
  1339. },
  1340. showNodeDialog(index) {
  1341. this.isAdd = true;
  1342. this.sindex = index;
  1343. this.curDeptId = null;
  1344. this.curUserId = null;
  1345. this.dialogVisible = true;
  1346. },
  1347. editNodeDialog(index, item) {
  1348. //检查是否可编辑
  1349. this.http.post('/audit-workflow-setting/checkNodeInUse',{auditDeptId: item.auditDeptId, deptId: this.depData.id,type: 1},
  1350. res => {
  1351. this.listLoading = false;
  1352. if (res.code == "ok") {
  1353. this.isAdd = false;
  1354. this.sindex = index;
  1355. this.curUserId = item.userId;
  1356. this.dialogVisible = true;
  1357. this.curDeptId = item.auditDeptId;
  1358. } else {
  1359. this.$message({
  1360. message: res.msg,
  1361. type: "error"
  1362. });
  1363. }
  1364. },
  1365. error => {
  1366. this.listLoading = false;
  1367. this.$message({
  1368. message: error,
  1369. type: "error"
  1370. });
  1371. }
  1372. );
  1373. },
  1374. addNode() {
  1375. // console.log(this.curDeptId, 'zhilail')
  1376. // return
  1377. this.dialogVisible = false;
  1378. if (this.curDeptId == null) return;
  1379. // if(this.user.userNameNeedTranslate != '1') {
  1380. // var node = this.user.userNameNeedTranslate != '1' ? this.vueCasaderItem : this.$refs.deptCascader.getCheckedNodes()[0];
  1381. // var node = this.$refs.deptCascader.getCheckedNodes()[0];
  1382. var node = ''
  1383. if(this.user.userNameNeedTranslate != 1) {
  1384. node = this.user.userNameNeedTranslate != '1' ? this.vueCasaderItem : this.$refs.deptCascader.getCheckedNodes()[0];
  1385. } else {
  1386. node = this.addNodeObj
  1387. }
  1388. console.log(this.vueCasaderItem)
  1389. console.log("node",node);
  1390. if (this.isAdd) {
  1391. if(this.user.userNameNeedTranslate != 1) {
  1392. var nodes
  1393. if(node.path[0] == 1){
  1394. nodes = {auditDeptId: node.value, auditDeptName: node.label, auditorType: 1};
  1395. }else if(node.path[0] == 2){
  1396. nodes = {userId: node.value, userName: node.label, auditorType: 2};
  1397. }
  1398. } else {
  1399. if(node.managerId) {
  1400. nodes = {auditDeptId: node.value, auditDeptName: node.label, auditorType: 1};
  1401. } else {
  1402. nodes = {userId: node.value, userName: node.label, auditorType: 2};
  1403. }
  1404. }
  1405. this.dataArray.splice(this.sindex, 0, nodes);
  1406. } else {
  1407. //编辑
  1408. this.dataArray[this.sindex].auditDeptId = node.value;
  1409. this.dataArray[this.sindex].auditDeptName = node.label;
  1410. }
  1411. },
  1412. deleteNode() {
  1413. this.dialogVisible = false;
  1414. this.dataArray.splice(this.sindex, 1);
  1415. },
  1416. submitInsert() {
  1417. this.http.post('/audit-workflow-setting/add',{json:JSON.stringify(this.dataArray), deptId: this.depData.id, type:1},
  1418. res => {
  1419. this.listLoading = false;
  1420. if (res.code == "ok") {
  1421. this.$message({
  1422. message: this.$t('savesuccess'),
  1423. type: "success"
  1424. });
  1425. } else {
  1426. this.$message({
  1427. message: res.msg,
  1428. type: "error"
  1429. });
  1430. }
  1431. },
  1432. error => {
  1433. this.listLoading = false;
  1434. this.$message({
  1435. message: error,
  1436. type: "error"
  1437. });
  1438. }
  1439. );
  1440. },
  1441. //
  1442. approve(item) {
  1443. //审核通过
  1444. this.http.post('/leave-sheet/approve', {id:item.id
  1445. },
  1446. res => {
  1447. if (res.code == "ok") {
  1448. this.bills(true);
  1449. } else {
  1450. this.$message({
  1451. message: res.msg,
  1452. type: "error"
  1453. });
  1454. }
  1455. },
  1456. error => {
  1457. this.$message({
  1458. message: error,
  1459. type: "error"
  1460. });
  1461. });
  1462. },
  1463. deny(item) {
  1464. this.denyDialogV = true;
  1465. this.denyInfo = {id:item.id, reason:null};
  1466. },
  1467. submitDeny(id) {
  1468. //审核驳回
  1469. this.http.post('/leave-sheet/deny', this.denyInfo,
  1470. res => {
  1471. if (res.code == "ok") {
  1472. this.bills(true);
  1473. this.denyDialogV = false;
  1474. } else {
  1475. this.$message({
  1476. message: res.msg,
  1477. type: "error"
  1478. });
  1479. }
  1480. },
  1481. error => {
  1482. this.$message({
  1483. message: error,
  1484. type: "error"
  1485. });
  1486. });
  1487. },
  1488. getUsers() {
  1489. // this.http.post(this.port.manage.list, {
  1490. // departmentId: -1,
  1491. // pageIndex: 1,
  1492. // // pageSize: 99999
  1493. // pageSize: -1
  1494. // },
  1495. this.http.post('/user/getSimpleActiveUserList', {},
  1496. res => {
  1497. if (res.code == "ok") {
  1498. // this.users = res.data.records;
  1499. this.users = res.data;
  1500. for (let i = 0; i < this.users.length; i++) {
  1501. this.susers.push({value:this.users[i].id,label:this.users[i].name,type: 'user'})
  1502. }
  1503. //只能自己填报自己的请假单
  1504. this.addForm.ownerId = this.user.id;
  1505. this.addForm.status = 1;
  1506. this.addForm.tel = this.user.phone
  1507. } else {
  1508. this.$message({
  1509. message: res.msg,
  1510. type: "error"
  1511. });
  1512. }
  1513. },
  1514. error => {
  1515. this.$message({
  1516. message: error,
  1517. type: "error"
  1518. });
  1519. });
  1520. },
  1521. // 员工请假填报点击事件
  1522. ssl(index) {
  1523. this.ins = index;
  1524. this.addForm.leaveType = index
  1525. },
  1526. staffs(key, keyPath) {
  1527. // console.log("keypath",key,keyPath)
  1528. if (keyPath[0] == '1') {
  1529. this.displayTable = false;
  1530. this.apk = false
  1531. } else if(keyPath[0] == '2' || keyPath[0] == '3') {
  1532. this.displayTable = true;
  1533. this.apk = false
  1534. } else if(keyPath[0] == '4'){
  1535. this.displayTable = true;
  1536. this.apk = true
  1537. this.apk2 = 4
  1538. this.statistical()
  1539. } else if(keyPath[0] == '5'){
  1540. this.displayTable = true;
  1541. this.apk2 = 5
  1542. this.apk = true
  1543. } else if(keyPath[0] == '6'){
  1544. this.NcurDeptId = []
  1545. this.displayTable = true;
  1546. this.apk2 = 6
  1547. this.apk = true
  1548. this.getAl()
  1549. } else if(keyPath[0] == '7'){
  1550. this.displayTable = true;
  1551. this.apk = false
  1552. this.bills(false,2)
  1553. } else if(keyPath[0] == '8'){
  1554. this.apk2 = 8
  1555. this.displayTable = true
  1556. this.apk = true
  1557. this.userSelId = ''
  1558. this.page = 1
  1559. this.departmentSel = []
  1560. this.getVacationList()
  1561. this.getDepartmentOptions()
  1562. }
  1563. },
  1564. auditList() {
  1565. this.falg = 1
  1566. this.code = 1
  1567. this.tableData = []
  1568. this.displayTable = true;
  1569. this.isAuditList = true;
  1570. this.loading = true
  1571. this.page = '1'
  1572. var param = { pageIndex: this.page,
  1573. pageSize: this.size,
  1574. // createDate: this.createDate,
  1575. startDate: this.createDate == null ? '' : this.createDate[0],
  1576. endDate: this.createDate == null ? '' : this.createDate[1],
  1577. ownerId: this.ownerIds,
  1578. leaveType: this.type,
  1579. };
  1580. this.list = [];
  1581. // this.total = 0;
  1582. this.http.post('/leave-sheet/auditList', param,
  1583. res => {
  1584. if (res.code == "ok") {
  1585. this.tableData = res.data.records
  1586. this.total = res.data.total
  1587. this.loading = false
  1588. } else {
  1589. this.loading = false
  1590. this.$message({
  1591. message: res.msg,
  1592. type: "error"
  1593. });
  1594. }
  1595. },
  1596. error => {
  1597. this.loading = false
  1598. this.$message({
  1599. message: error,
  1600. type: "error"
  1601. });
  1602. });
  1603. },
  1604. bills(audit, tr){
  1605. if(tr) {
  1606. this.code = ''
  1607. this.createDate = []
  1608. // this.ownerIds = ''
  1609. this.type = ''
  1610. if(tr == 1) {
  1611. this.falg = 1
  1612. this.code = 1
  1613. } else if(tr == 2) {
  1614. this.code = ''
  1615. this.falg = 0
  1616. } else {
  1617. this.falg = 0
  1618. }
  1619. } else {
  1620. this.falg = false
  1621. }
  1622. this.tableData = []
  1623. this.displayTable = true;
  1624. this.isAuditList = audit;
  1625. this.loading = true
  1626. this.page = '1'
  1627. var param = { pageIndex: this.page,
  1628. pageSize: this.size,
  1629. status: this.code,
  1630. // createDate: this.createDate,
  1631. startDate: this.createDate == null ? '' : this.createDate[0],
  1632. endDate: this.createDate == null ? '' : this.createDate[1],
  1633. ownerId: this.ownerIds,
  1634. leaveType: this.type,
  1635. };
  1636. if (this.isAuditList) {
  1637. param.status = 1;
  1638. }
  1639. this.list = [];
  1640. // this.total = 0;
  1641. this.http.post('/leave-sheet/list', param,
  1642. res => {
  1643. if (res.code == "ok") {
  1644. this.tableData = res.data.records
  1645. this.total = res.data.total
  1646. this.loading = false
  1647. } else {
  1648. this.loading = false
  1649. this.$message({
  1650. message: res.msg,
  1651. type: "error"
  1652. });
  1653. }
  1654. },
  1655. error => {
  1656. this.loading = false
  1657. this.$message({
  1658. message: error,
  1659. type: "error"
  1660. });
  1661. });
  1662. },
  1663. billss() {
  1664. this.page = 1
  1665. var param = {pageIndex: this.page,
  1666. pageSize: this.size,
  1667. status: this.code,
  1668. // startDate: this.createDate,
  1669. startDate: this.createDate == null ? '' : this.createDate[0],
  1670. endDate: this.createDate == null ? '' : this.createDate[1],
  1671. ownerId: this.ownerIds,
  1672. leaveType: this.type,
  1673. };
  1674. this.http.post('/leave-sheet/list', param,
  1675. res => {
  1676. if (res.code == "ok") {
  1677. this.tableData = res.data.records
  1678. this.total = res.data.total
  1679. this.loading = false
  1680. } else {
  1681. this.loading = false
  1682. this.$message({
  1683. message: res.msg,
  1684. type: "error"
  1685. });
  1686. }
  1687. },
  1688. error => {
  1689. this.loading = false
  1690. this.$message({
  1691. message: error,
  1692. type: "error"
  1693. });
  1694. });
  1695. },
  1696. // 判断日期是否补零了
  1697. buling(das) {
  1698. var rqi = das.split('-')
  1699. rqi[1].length <= 1 ? rqi[1] = '0' + rqi[1] : rqi[1] = rqi[1]
  1700. rqi[2].length <= 1 ? rqi[2] = '0' + rqi[2] : rqi[2] = rqi[2]
  1701. var zong = rqi[0] + '-' + rqi[1] + '-' + rqi[2]
  1702. return zong
  1703. },
  1704. submits(){
  1705. // console.log(this.addForm)
  1706. // return
  1707. this.$refs.addForm.validate(valid => {
  1708. this.addForm.endDate = this.buling(this.addForm.endDate)
  1709. this.addForm.startDate = this.buling(this.addForm.startDate)
  1710. if (valid) {
  1711. this.http.post('/leave-sheet/add', this.addForm,
  1712. res => {
  1713. if (res.code == "ok") {
  1714. this.$message({
  1715. message: this.$t('message.fillinsuccessfully'),
  1716. type: "success"
  1717. });
  1718. this.addForm.timeType = '0'
  1719. this.addForm.startDate = this.getCurrentTime()
  1720. this.addForm.endDate = this.getCurrentTime()
  1721. this.addForm.timeDays = 1
  1722. this.addForm.leaveType = 0
  1723. this.addForm.timeHours = 8
  1724. this.addForm.remark = ''
  1725. this.flg = true
  1726. } else {
  1727. this.$message({
  1728. message: res.msg,
  1729. type: "error"
  1730. });
  1731. }
  1732. },
  1733. error => {
  1734. this.$message({
  1735. message: error,
  1736. type: "error"
  1737. });
  1738. });
  1739. } else {
  1740. return false;
  1741. }
  1742. });
  1743. },
  1744. txselts(a,b){
  1745. this.selts()
  1746. // console.log('txselts',this.addForm.ownerId);
  1747. if(a == 6 && this.addForm.ownerId != ''){
  1748. this.http.post('/leave-sheet/getOTAvaiDays',{ userId:b },
  1749. res => {
  1750. if(res.code == "ok") {
  1751. // console.log('post',res.data);
  1752. if(res.data < 0.5){
  1753. this.txselnum = 0
  1754. }else{
  1755. this.txselnum = res.data.toFixed(1)
  1756. }
  1757. } else {
  1758. this.$message({
  1759. message: res.msg,
  1760. type: "error"
  1761. });
  1762. }
  1763. },
  1764. error => {
  1765. this.$message({
  1766. message: error,
  1767. type: "error"
  1768. });
  1769. })
  1770. }
  1771. },
  1772. selts() {
  1773. for(var i in this.users) {
  1774. if(this.users[i].id == this.addForm.ownerId) {
  1775. this.addForm.tel = this.users[i].phone
  1776. }
  1777. }
  1778. },
  1779. chanRadio() {
  1780. // console.log(this.addForm.timeType)
  1781. if(this.addForm.timeType == '0') {
  1782. this.flg = true
  1783. this.addForm.startDate = this.getCurrentTime()
  1784. this.addForm.endDate = this.getCurrentTime()
  1785. this.addForm.timeType = '0'
  1786. this.addForm.timeDays = '1'
  1787. this.addForm.timeHours = '8'
  1788. } else {
  1789. this.flg = false
  1790. this.addForm.startDate = this.getCurrentTime()
  1791. this.addForm.endDate = this.getCurrentTime()
  1792. this.addForm.timeType = '1'
  1793. this.addForm.timeHours = 1,
  1794. this.addForm.timeDays = 1
  1795. }
  1796. },
  1797. // 计算日期
  1798. datas() {
  1799. // this.addForm.timeDays = this.DateDiff(this.addForm.startDate, this.addForm.endDate)
  1800. if(this.addForm.startDate > this.addForm.endDate) {
  1801. this.addForm.endDate = this.addForm.startDate
  1802. }
  1803. this.addForm.timeDays = this.countWorkDay(this.addForm.startDate, this.addForm.endDate)
  1804. this.timeChoose = this.addForm.timeDays
  1805. this.addForm.timeHours = this.addForm.timeDays * 8
  1806. },
  1807. datasss() {
  1808. // console.log(123)
  1809. this.addForm.endDate = this.addForm.startDate
  1810. },
  1811. DateDiff(sDate1, sDate2){
  1812. var aDate, oDate1, oDate2, iDays
  1813. aDate = sDate1.split("-")
  1814. oDate1 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0])
  1815. aDate = sDate2.split("-")
  1816. oDate2 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0])
  1817. iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 /24)
  1818. return iDays + 1
  1819. },
  1820. stringToDate(dateString){
  1821. dateString = dateString.split('-');
  1822. return new Date(dateString[0], dateString[1] - 1, dateString[2]);
  1823. },
  1824. countWorkDay(date1, date2){
  1825. date1 = this.stringToDate(date1);
  1826. date2 = this.stringToDate(date2);
  1827. var delta = (date2 - date1) / (1000 * 60 * 60 * 24) + 1; // 计算出总时间
  1828. var weeks = 0;
  1829. for(var i = 0; i < delta; i++){
  1830. if(date1.getDay() == 0 || date1.getDay() == 6) weeks ++; // 若为周六或周天则加1
  1831. date1 = date1.valueOf();
  1832. date1 += 1000 * 60 * 60 * 24;
  1833. date1 = new Date(date1);
  1834. }
  1835. return delta - weeks;
  1836. },
  1837. chufas() {
  1838. this.billss()
  1839. },
  1840. // 时间
  1841. getTadeTime() {
  1842. var time = new Date();
  1843. return time.getHours() +':00:00'
  1844. },
  1845. // 日期
  1846. getCurrentTime() {
  1847. var _this = this;
  1848.   let yy = new Date().getFullYear();
  1849.   let mm = new Date().getMonth()+1;
  1850.   let dd = new Date().getDate();
  1851.   _this.gettime = yy +'-'+ mm +'-'+ dd;
  1852.   return _this.gettime
  1853. },
  1854. getCurrentTimes() {
  1855. var _this = this;
  1856.   let yy = new Date().getFullYear();
  1857.   let mm = new Date().getMonth()+1;
  1858.   let dd = new Date().getDate();
  1859.   _this.gettime = yy+'-'+mm+'-'+'01';
  1860.   return _this.gettime
  1861. },
  1862. chanSele() {
  1863. this.addForm.timeHours = parseInt(this.addForm.timeHours)
  1864. },
  1865. handleSizeChange(val){
  1866. this.size = val;
  1867. this.bills()
  1868. },
  1869. handleCurrentChange(val) {
  1870. // console.log(val, 1, '1')
  1871. this.page = val;
  1872. this.bills()
  1873. },
  1874. vacationSizeChange(val){
  1875. this.size = val
  1876. this.getVacationList(1)
  1877. },
  1878. vacationCurrentChange(val){
  1879. this.page = val
  1880. this.getVacationList(1)
  1881. },
  1882. statistical() {
  1883. this.loading = true
  1884. this.http.post('/leave-sheet/summaryData', {
  1885. keyword: this.keyword,
  1886. startDate: this.statData,
  1887. endDate: this.endData
  1888. },
  1889. res => {
  1890. if (res.code == "ok") {
  1891. this.statisticalList = res.data
  1892. this.loading = false
  1893. } else {
  1894. this.loading = false
  1895. this.$message({
  1896. message: res.msg,
  1897. type: "error"
  1898. });
  1899. }
  1900. },
  1901. error => {
  1902. this.$message({
  1903. message: error,
  1904. type: "error"
  1905. });
  1906. });
  1907. },
  1908. //
  1909. inputs() {
  1910. var str = this.addForm.timeDays + ''
  1911. if(str.indexOf('.') != '-1') {
  1912. var s = str.split('.')[0]
  1913. var st = str.split('.')[1]
  1914. var sts = st.split('')
  1915. this.addForm.timeDays = s + '.' + sts[0]
  1916. }
  1917. },
  1918. inputss() {
  1919. if(this.addForm.timeHours <= 0) {
  1920. this.addForm.timeHours = 1
  1921. } else if(this.addForm.timeHours > 8) {
  1922. this.addForm.timeHours = 8
  1923. } else {
  1924. if(this.addForm.timeHours.indexOf('.') != '-1') {
  1925. var str = this.addForm.timeHours
  1926. // console.log(str)
  1927. if(str.indexOf('.') != '-1') {
  1928. var s = str.split('.')[0]
  1929. var st = str.split('.')[1]
  1930. var sts = st.split('')
  1931. this.addForm.timeHours = s + '.' + sts[0]
  1932. }
  1933. }
  1934. }
  1935. // console.log(this.addForm)
  1936. },
  1937. cancel(e) {
  1938. this.$confirm('确定要撤回该请假申请吗', this.$t('other.prompts'), {
  1939. //type: 'warning'
  1940. }).then(() => {
  1941. this.http.post('/leave-sheet/cancel', {id:e.id},
  1942. res => {
  1943. if (res.code == "ok") {
  1944. this.bills();
  1945. this.$message({
  1946. message: '操作成功',
  1947. type: "success"
  1948. });
  1949. } else {
  1950. this.$message({
  1951. message: res.msg,
  1952. type: "error"
  1953. });
  1954. }
  1955. },
  1956. error => {
  1957. this.$message({
  1958. message: error,
  1959. type: "error"
  1960. });
  1961. });
  1962. });
  1963. },
  1964. deletes(e) {
  1965. this.$confirm(this.$t('deleteit'), this.$t('other.prompts'), {
  1966. //type: 'warning'
  1967. }).then(() => {
  1968. this.http.post('/leave-sheet/delete', {id:e.id},
  1969. res => {
  1970. if (res.code == "ok") {
  1971. this.bills();
  1972. this.$message({
  1973. message: this.$t('message.successfullyDeleted'),
  1974. type: "success"
  1975. });
  1976. } else {
  1977. this.$message({
  1978. message: res.msg,
  1979. type: "error"
  1980. });
  1981. }
  1982. },
  1983. error => {
  1984. this.$message({
  1985. message: error,
  1986. type: "error"
  1987. });
  1988. });
  1989. });
  1990. },
  1991. editor(items) {
  1992. this.dialog = true
  1993. this.addForm.ownerId = items.ownerId
  1994. this.addForm.tel = items.tel
  1995. this.addForm.timeType = items.timeType + ''
  1996. this.addForm.startDate = items.startDate
  1997. this.addForm.endDate = items.endDate
  1998. this.addForm.timeDays = items.timeDays
  1999. this.addForm.timeHours = items.timeHours
  2000. this.addForm.remark = items.remark
  2001. this.affId = items.id
  2002. },
  2003. determine () {
  2004. var adl = this.addForm
  2005. adl.id = this.affId
  2006. this.http.post('/leave-sheet/add', adl,
  2007. res => {
  2008. if (res.code == "ok") {
  2009. this.dialog = false
  2010. this.bills();
  2011. this.addForm = {
  2012. timeType: '0',
  2013. startDate: this.getCurrentTime(),
  2014. endDate: this.getCurrentTime(),
  2015. timeDays: 1,
  2016. leaveType: 0,
  2017. timeHours: '8',
  2018. tel: '',
  2019. remark: ''
  2020. }
  2021. this.getUsers()
  2022. } else {
  2023. this.$message({
  2024. message: res.msg,
  2025. type: "error"
  2026. });
  2027. }
  2028. },
  2029. error => {
  2030. this.$message({
  2031. message: error,
  2032. type: "error"
  2033. });
  2034. });
  2035. },
  2036. bangd() {
  2037. this.addForm = {
  2038. timeType: '0',
  2039. startDate: this.getCurrentTime(),
  2040. endDate: this.getCurrentTime(),
  2041. timeDays: 1,
  2042. leaveType: 0,
  2043. timeHours: '8',
  2044. tel: '',
  2045. remark: ''
  2046. }
  2047. this.getUsers()
  2048. },
  2049. // 自定义组件事件
  2050. selectCal(obj) {
  2051. if(obj.distinction == '1') {
  2052. this.addForm.ownerId = obj.id
  2053. this.txselts(obj.other, obj.id)
  2054. } else if(obj.distinction == '2') {
  2055. let arr = []
  2056. for(let i in obj.arrUserList) {
  2057. arr.push(obj.arrUserList[i].id)
  2058. }
  2059. } else if(obj.distinction == '3') {
  2060. this.ownerIds = obj.id
  2061. this.chufas()
  2062. } else if(obj.distinction == '4') {
  2063. this.addForm.ownerId = obj.id
  2064. this.selts()
  2065. }
  2066. },
  2067. vueCasader(obj) {
  2068. if(obj.distinction == 1) {
  2069. let arr = []
  2070. arr.push(obj.id)
  2071. this.curDeptId = arr
  2072. this.vueCasaderItem = obj.item
  2073. this.addNodeObj = obj.item
  2074. console.log(obj)
  2075. } else if(obj.distinction == 2) {
  2076. let arr = []
  2077. arr.push(obj.id)
  2078. this.NcurDeptId = arr
  2079. console.log(obj, '闯过奥的值')
  2080. if(obj.item) {
  2081. if(obj.item.label != this.$t('defaultText.pleaseChoose')) {
  2082. this.vueIAlDataSItems = obj.item
  2083. } else {
  2084. this.vueIAlDataSItems = undefined
  2085. }
  2086. } else {
  2087. this.vueIAlDataSItems = undefined
  2088. }
  2089. this.selAl()
  2090. }
  2091. }
  2092. }
  2093. };
  2094. </script>
  2095. <style scoped>
  2096. .addNode {
  2097. cursor:pointer;
  2098. }
  2099. .addNode:hover {
  2100. color:#20a0ff;
  2101. }
  2102. .apls {
  2103. width: 200px;
  2104. white-space:nowrap;
  2105. overflow:hidden;
  2106. text-overflow:ellipsis;
  2107. }
  2108. .tups {
  2109. width: 100%;
  2110. height: 25px;
  2111. position: relative;
  2112. z-index: 99;
  2113. overflow: hidden;
  2114. }
  2115. .tups img {
  2116. height: 25px !important;
  2117. position: relative;
  2118. z-index: 99;
  2119. }
  2120. .viewer-canvas {
  2121. position: absolute;
  2122. z-index: 9 !important;
  2123. }
  2124. .icl {
  2125. margin-top: -25px !important;
  2126. }
  2127. /* 费用报销标题 */
  2128. .headine {
  2129. width: 100%;
  2130. height: 46.4px;
  2131. line-height: 46.4px;
  2132. background: #fff;
  2133. box-sizing: border-box;
  2134. }
  2135. .headine h3 {
  2136. margin: 0;
  2137. display: inline-block;
  2138. box-sizing: border-box;
  2139. color: #999;
  2140. }
  2141. .headine p {
  2142. display: inline-block;
  2143. margin: 0;
  2144. }
  2145. /* /费用报销标题 */
  2146. .sidebars {
  2147. height: 100%;
  2148. position: absolute;
  2149. border-right: 1px solid #E6E6E6;
  2150. z-index: 2;
  2151. top: 0;
  2152. }
  2153. .sidebars h3 {
  2154. margin: 0;
  2155. line-height: 45px;
  2156. background: #ffffff;
  2157. font-weight: normal;
  2158. color: #666;
  2159. padding-left: 20px;
  2160. }
  2161. .sidebars .el-col-12 {
  2162. width: 100%
  2163. }
  2164. .public {
  2165. height: 230px;
  2166. border-bottom: 1px solid #ddd;
  2167. }
  2168. .public .el-form-item {
  2169. display: inline-block;
  2170. }
  2171. .pu_button {
  2172. text-align: right;
  2173. width: 100%;
  2174. padding: 24px 30px;
  2175. box-sizing: border-box;
  2176. }
  2177. .pu_bu_x .pu_bu_t {
  2178. display: inline-block;
  2179. }
  2180. .pu_bu_x {
  2181. margin-right: 20px;
  2182. color: #20A0F7;
  2183. cursor: pointer;
  2184. }
  2185. .pu_bu_t {
  2186. color: #20A0F7;
  2187. cursor: pointer;
  2188. display: block;
  2189. float: right;
  2190. position:
  2191. relative;
  2192. top: -20px;
  2193. right: 63px;
  2194. }
  2195. .pu_table {
  2196. margin-left: 10px;
  2197. }
  2198. .pu_bu_t:hover {
  2199. color: #7bbcff;
  2200. }
  2201. .pu_bu_x:hover {
  2202. color: #7bbcff;
  2203. }
  2204. /* 我的单据报销凭证 */
  2205. .staff{
  2206. border-left: 1px solid #fff;
  2207. border-top: 1px solid #fff;
  2208. border-right: 1px solid #fff;
  2209. background: #fff;
  2210. }
  2211. /* */
  2212. .sdat{
  2213. display: inline-block;
  2214. width: 260px;
  2215. margin-left: 13px;
  2216. }
  2217. .messages .el-form-item{
  2218. display: inline-block;
  2219. }
  2220. .messages .el-date-editor.el-input, .el-date-editor.el-input__inner{
  2221. width: 190px;
  2222. }
  2223. /* 我的报销单据 */
  2224. .search {
  2225. position: relative;
  2226. top: 20px;
  2227. left: 20px;
  2228. }
  2229. .tables {
  2230. margin-top: 50px;
  2231. box-sizing: border-box;
  2232. padding: 10px;
  2233. }
  2234. .informant .el-form-item {
  2235. display: inline-block;
  2236. }
  2237. /* 侧边栏收索 */
  2238. .side {
  2239. position: absolute;
  2240. z-index: 2;
  2241. border-right: 2px solid #DDDDDD;
  2242. height: 100%;
  2243. top: 0;
  2244. width: 0;
  2245. }
  2246. .side .spans {
  2247. width: 20px;
  2248. height: 30px;
  2249. border: 1px solid #DDDDDD;
  2250. box-sizing: border-box;
  2251. position: absolute;
  2252. top: 50%;
  2253. margin-top: -50%;
  2254. text-align: center;
  2255. z-index: 1;
  2256. background: #fff;
  2257. }
  2258. .side .spans i{
  2259. margin-top: 7px;
  2260. color: #C0BFBF
  2261. }
  2262. .side:hover {
  2263. border-right: 2px solid #20A0FF;
  2264. }
  2265. .side:hover .spans {
  2266. border: 1px solid #20A0FF;
  2267. background: #20A0FF;
  2268. }
  2269. .side:hover .spans i{
  2270. color: #fff;
  2271. }
  2272. /* 右边整体页面 */
  2273. .contents {
  2274. height: 100%;
  2275. /* padding: 30px; */
  2276. background: #F7F7F7;
  2277. /* position: absolute; */
  2278. }
  2279. .submits {
  2280. margin-left: 50%;
  2281. }
  2282. .waiting {
  2283. color:orange;
  2284. }
  2285. .rejected {
  2286. color:red;
  2287. }
  2288. /* 请假模块 */
  2289. .tops {
  2290. width: 100%;
  2291. position: relative;
  2292. background: #f7f7f7;
  2293. box-sizing: border-box;
  2294. padding: 20px 0 0 200px;
  2295. }
  2296. .ctons {
  2297. /* width: 86%; */
  2298. height: 92%;
  2299. overflow: hidden;
  2300. background: #fff;
  2301. padding: 30px 40px;
  2302. box-sizing: border-box;
  2303. }
  2304. .ctons .el-form-item {
  2305. display: inline-block;
  2306. }
  2307. .line {
  2308. text-align: center;
  2309. margin: 0 6px
  2310. }
  2311. .poss {
  2312. position: fixed;
  2313. bottom: 4px;
  2314. right: 1%;
  2315. box-sizing: border-box;
  2316. }
  2317. .flex {
  2318. display: flex;
  2319. padding: 0 0 20px 0;
  2320. border-bottom: 1px solid #f2f2f2;
  2321. }
  2322. .flex span {
  2323. color: #606266;
  2324. display: inline-block;
  2325. margin: 0 10px 0 20px;
  2326. }
  2327. </style>