list.vue 93 KB

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