taskApplicationFrom.vue 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006
  1. <template>
  2. <div class="applicationFrom">
  3. <el-dialog title="绩效结果考核申报详情" v-model="dialogVisible" :fullscreen="true" :close-on-click-modal="false">
  4. <div class="startDetail">
  5. <p class="starttitleSty">单据信息:</p>
  6. <el-row class="danjuMsg">
  7. <el-col :span="6">
  8. <div class="danjuMsg_data">
  9. <span class="data_tit">申报编号:</span>
  10. <span>{{receiptMsg.code}}</span>
  11. </div>
  12. <div class="danjuMsg_data">
  13. <span class="data_tit">申报部门:</span>
  14. <span>{{receiptMsg.deptName}}</span>
  15. </div>
  16. </el-col>
  17. <el-col :span="6">
  18. <div class="danjuMsg_data">
  19. <span class="data_tit">申报级别:</span>
  20. <span>{{receiptMsg.declarationLevel}}级</span>
  21. </div>
  22. <div class="danjuMsg_data">
  23. <span class="data_tit">申报年度:</span>
  24. <span>{{receiptMsg.year}}年</span>
  25. </div>
  26. <!-- <div class="danjuMsg_data">
  27. <span class="data_tit">申报领导:</span>
  28. <span>{{receiptMsg.deptLeaderName}}</span>
  29. </div> -->
  30. </el-col>
  31. <el-col :span="6">
  32. <div class="danjuMsg_data">
  33. <span class="data_tit">流程状态:</span>
  34. <span>{{receiptMsg.stage}}</span>
  35. </div>
  36. <div class="danjuMsg_data">
  37. <span class="data_tit">申报月份:</span>
  38. <span>{{receiptMsg.month}}月</span>
  39. </div>
  40. </el-col>
  41. <el-col :span="6">
  42. <div class="danjuMsg_data">
  43. <span class="data_tit">创建日期:</span>
  44. <span>{{receiptMsg.createDate}}</span>
  45. </div>
  46. </el-col>
  47. <el-col :span="6">
  48. <div class="danjuMsgSelect">
  49. <span class="data_tit">评定等级:</span>
  50. <span v-if="userMes.deptId !== '23031009'">{{receiptMsg.ratingGrade}}</span>
  51. <el-select v-model="receiptMsg.ratingGrade" placeholder="请选择评定等级" @change="changeratingGrade" v-else>
  52. <el-option
  53. v-for="item in ratingGradeOption"
  54. :key="item.value"
  55. :label="item.label"
  56. :value="item.value">
  57. </el-option>
  58. </el-select>
  59. </div>
  60. </el-col>
  61. <el-col :span="18">
  62. <div class="danjuMsgSelect">
  63. <span class="data_tit">申报简述:</span>
  64. <span v-if="userMes.deptId !== '23031009'">{{receiptMsg.des}}</span>
  65. <el-input v-model="receiptMsg.des" :rows="1" type="textarea" @blur="blurDes" v-else
  66. placeholder="请输入申报简述"></el-input>
  67. </div>
  68. </el-col>
  69. </el-row>
  70. <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
  71. <el-tab-pane label="员工月度考核系数" name="first">
  72. <div class="detaTableBtns">
  73. <div class="tableBtn add" @click="addTableDetail">
  74. <img :src="addIcon" alt="">
  75. <span>新增</span>
  76. </div>
  77. <div class="tableBtn save" @click="saveDetail">
  78. <img :src="saveIcon" alt="">
  79. <span>保存</span>
  80. </div>
  81. <div class="tableBtn delete" @click="handleDelete">
  82. <img :src="deleteIcon" alt="">
  83. <span>删除</span>
  84. </div>
  85. <div class="tableBtn import" @click="handleImport">
  86. <img :src="importIcon" alt="">
  87. <span>导入</span>
  88. </div>
  89. <div class="tableBtn export" @click="handleExport">
  90. <img :src="exportIcon" alt="">
  91. <span>导出</span>
  92. </div>
  93. </div>
  94. <el-table :data="quantifiedList.slice((pageLeft.currentPage-1)*pageLeft.pagesize, pageLeft.currentPage*pageLeft.pagesize)"
  95. style="width: 100%" @select="rowClick" @select-all="rowClick">
  96. <el-table-column type="selection" label="操作" align="center"></el-table-column>
  97. <el-table-column label="序号" type="index" width="80" />
  98. <el-table-column label="人员编号" prop="employeeNo">
  99. <template #default="scope">
  100. <el-input v-model="scope.row.employeeNo" @blur="employeeNoInputBlur(scope.row.employeeNo, scope.row)" />
  101. </template>
  102. </el-table-column>
  103. <el-table-column label="人员" prop="deptName">
  104. <template #default="scope">
  105. <!-- <el-select v-model="scope.row.employeeId" placeholder="请选择人员">
  106. <el-option
  107. v-for="item in deptLeaderOptionDet"
  108. :key="item.id"
  109. :label="item.name"
  110. :value="item.id">
  111. </el-option>
  112. </el-select> -->
  113. <span>{{scope.row.employeeName}}</span>
  114. </template>
  115. </el-table-column>
  116. <el-table-column label="建议值" v-if="showMessage">
  117. <template #default="scope">
  118. <el-input-number v-model="scope.row.suggestedValue" :precision="2" :step="0.1" :min="0" />
  119. </template>
  120. </el-table-column>
  121. <el-table-column label="排序" >
  122. <template #default="scope">
  123. <el-input-number v-model="scope.row.serialNumber" :min="1" />
  124. </template>
  125. </el-table-column>
  126. <el-table-column label="操作" width="120">
  127. <template #default="scope">
  128. <p class="indicitem" @click="deleteRowFn(scope.row, scope.$index)">删除</p>
  129. </template>
  130. </el-table-column>
  131. </el-table>
  132. <el-pagination
  133. @current-change="handleCurrentChangeLeft"
  134. :current-page="pageLeft.currentPage"
  135. :page-size="pageLeft.pagesize"
  136. layout="total, prev, pager, next, jumper"
  137. :total="pageLeft.total">
  138. </el-pagination>
  139. </el-tab-pane>
  140. <el-tab-pane label="本月主要工作完成情况" name="second">
  141. <div class="detaTableBtns">
  142. <div class="tableBtn add" @click="addSecondWork">
  143. <img :src="addIcon" alt="">
  144. <span>新增</span>
  145. </div>
  146. <div class="tableBtn save" @click="saveSecondWork">
  147. <img :src="saveIcon" alt="">
  148. <span>保存</span>
  149. </div>
  150. <div class="tableBtn delete" @click="handleSecondWork">
  151. <img :src="deleteIcon" alt="">
  152. <span>删除</span>
  153. </div>
  154. </div>
  155. <el-table :data="secondWorkSituation.slice((pageRight.currentPage-1)*pageRight.pagesize, pageRight.currentPage*pageRight.pagesize)"
  156. style="width: 100%" @select="rowSituationClick" @select-all="rowSituationClick">
  157. <el-table-column type="selection" label="操作" align="center"></el-table-column>
  158. <el-table-column label="序号" type="index" width="80" />
  159. <el-table-column label="工作内容">
  160. <template #default="scope">
  161. <el-input v-model="scope.row.jobContent" :rows="2" type="textarea" />
  162. </template>
  163. </el-table-column>
  164. <el-table-column label="完成情况">
  165. <template #default="scope">
  166. <el-input v-model="scope.row.completionStatus" :rows="2" type="textarea" />
  167. </template>
  168. </el-table-column>
  169. <el-table-column label="相关处室" width="200">
  170. <template #default="scope">
  171. <el-input v-model="scope.row.relatedOffice" />
  172. </template>
  173. </el-table-column>
  174. <el-table-column label="经办人" width="200">
  175. <template #default="scope">
  176. <el-input v-model="scope.row.handlePeopleName" />
  177. </template>
  178. </el-table-column>
  179. <el-table-column label="排序" >
  180. <template #default="scope">
  181. <el-input-number v-model="scope.row.serialNumber" :min="1" />
  182. </template>
  183. </el-table-column>
  184. </el-table>
  185. <el-pagination
  186. @current-change="handleCurrentChangeRight"
  187. :current-page="pageRight.currentPage"
  188. :page-size="pageRight.pagesize"
  189. layout="total, prev, pager, next, jumper"
  190. :total="pageRight.total">
  191. </el-pagination>
  192. </el-tab-pane>
  193. </el-tabs>
  194. <div>
  195. <p class="starttitleSty">审批意见:</p>
  196. <el-input v-model="descMsg" :rows="3" type="textarea" placeholder="请输入审批意见"></el-input>
  197. </div>
  198. </div>
  199. <template #footer>
  200. <span class="dialog-footer">
  201. <el-button type="primary" @click="examineAndApprove('agree')">同 意</el-button>
  202. <el-button @click="examineAndApprove('reject')">拒 绝</el-button>
  203. <el-button v-if="changeLeader" @click="engProssionFn">结束流程</el-button>
  204. </span>
  205. </template>
  206. </el-dialog>
  207. <el-dialog title="选择审批领导" v-model="leaderVisible" width="600px" :close-on-click-modal="false">
  208. <div class="periodFrom">
  209. <el-form ref="ruleForm" label-width="100px" class="demo-ruleForm" :validate-on-rule-change="false">
  210. <el-form-item label="审批领导">
  211. <el-select v-model="activeLeaderName" placeholder="请选择审批领导">
  212. <el-option
  213. v-for="item in leaderArr"
  214. :key="item.no"
  215. :label="item.userName"
  216. :value="item.no">
  217. <span style="float: left;display:inline-block;width:100px">{{ item.userName }}</span>
  218. <span style="float: right;color: #909399;font-size: 13px;" >{{ item.no }}</span>
  219. </el-option>
  220. </el-select>
  221. </el-form-item>
  222. </el-form>
  223. </div>
  224. <template #footer>
  225. <span class="dialog-footer">
  226. <el-button @click="leaderVisible = false">取 消</el-button>
  227. <el-button type="primary" @click="activeresponsibility">确 定</el-button>
  228. </span>
  229. </template>
  230. </el-dialog>
  231. <import-dailog ref="importPage" @successImport="successImport" @importLoading="importLoading"></import-dailog>
  232. </div>
  233. </template>
  234. <script>
  235. import importDailog from '../importPage/importDailog.vue'
  236. import {apiPostevaluationdeptadDetails,apiGetevaluationdeptadUpdate, apiGetevaluationdeptadDelete,apiPostIsdoAction,apideptAdmodify,
  237. apiPostevaluationdeptadDetailsHead, apiGetuserPageList, apiGetUserPostList, apiGetevaluationdeptadUpdateComplete,
  238. apiGetevaluationdeptadDeleteComplete, apiGetprocessInformation, apiGetobtainApprovalLeader, apiGetaddRepeatBatchLeader} from '../../api/api'
  239. import ExcelJS from 'exceljs'
  240. import fileSave from 'file-saver'
  241. import addIcon from '../../assets/btnIcon/add.png'
  242. import saveIcon from '../../assets/btnIcon/save.png'
  243. import editIcon from '../../assets/btnIcon/edit.png'
  244. import deleteIcon from '../../assets/btnIcon/delete.png'
  245. import exportIcon from '../../assets/btnIcon/export.png'
  246. import importIcon from '../../assets/btnIcon/import.png'
  247. export default {
  248. components: {
  249. importDailog
  250. },
  251. data() {
  252. return {
  253. dialogVisible: false,
  254. leaderVisible: false,
  255. activeName: 'first',
  256. leaderArr: [],
  257. quantifiedList: [],
  258. secondWorkSituation: [],
  259. changeDateSelect: [],
  260. activeLeaderName: '',
  261. descMsg: '',
  262. receiptMsg: {
  263. code: '',
  264. des: '',
  265. stage: '',
  266. createName: '',
  267. createDate: '',
  268. type: '',
  269. year: '',
  270. month: '',
  271. recStage: ''
  272. },
  273. addIcon: addIcon,
  274. saveIcon: saveIcon,
  275. editIcon: editIcon,
  276. deleteIcon: deleteIcon,
  277. exportIcon: exportIcon,
  278. importIcon: importIcon,
  279. rowMsg: {},
  280. orgruleData: [],
  281. indicItemoptions: [],
  282. sectionNameArr: [],
  283. deptNameArr: [],
  284. pageLeft:{
  285. pagesize: 15,
  286. currentPage: 1,
  287. total: 0
  288. },
  289. pageRight:{
  290. pagesize: 15,
  291. currentPage: 1,
  292. total: 0
  293. },
  294. deptLeaderOptionDet: [],
  295. ratingGradeOption: [],
  296. userMes: {},
  297. instanceChild: {},
  298. keyId: '',
  299. showMessage: false,
  300. changeLeader: false,
  301. changeSituationSelect: [],
  302. }
  303. },
  304. created() {
  305. this.ratingGradeOption = [
  306. {
  307. label: 'A',
  308. value: 'A'
  309. },
  310. {
  311. label: 'B',
  312. value: 'B'
  313. },
  314. {
  315. label: 'C',
  316. value: 'C'
  317. },
  318. {
  319. label: 'D',
  320. value: 'D'
  321. }
  322. ]
  323. },
  324. methods: {
  325. init(row, id, allData) {
  326. this.dialogVisible = true
  327. this.userMes = JSON.parse(window.sessionStorage.getItem('user'))
  328. this.activeName = 'first'
  329. this.instanceChild = allData
  330. this.getUserPostList()
  331. this.getDetails(id)
  332. this.getDetailsHeader(id)
  333. this.getprocessInformation(row)
  334. this.keyId = id
  335. this.changeDeptLead(row.deptId)
  336. this.rowMsg = row
  337. },
  338. //查询审批人领导给提示
  339. getprocessInformation(row) {
  340. let that = this
  341. that.changeLeader = false
  342. let params = {
  343. id: row.instId
  344. }
  345. apiGetprocessInformation(params).then(datas =>{
  346. if (datas && datas.data && datas.data.length>0) {
  347. let item = datas.data[datas.data.length-1]
  348. if (item.taskKey === 'UserTask2') {
  349. that.$message({
  350. message: '请领导对员工月度考核系数进行确认。',
  351. type: 'success'
  352. });
  353. }
  354. if (item.taskKey === 'UserTask3') {
  355. that.changeLeader = true
  356. }
  357. }
  358. })
  359. },
  360. // 根据部门查询人员
  361. changeDeptLead(val) {
  362. let that = this
  363. let params = {
  364. current: 1,
  365. size: 500,
  366. orgId: val
  367. }
  368. apiGetuserPageList(params).then(datas =>{
  369. if (datas && datas.data) {
  370. that.deptLeaderOptionDet = datas.data.records
  371. }
  372. })
  373. },
  374. getUserPostList() {
  375. let that = this
  376. that.showMessage = false
  377. if (that.userMes.deptId === '23031009') {
  378. that.showMessage = true
  379. } else {
  380. let params = {
  381. userId: that.userMes.id,
  382. current: 1,
  383. size: 10
  384. }
  385. apiGetUserPostList(params).then(datas =>{
  386. if (datas.data && datas.data.records.length>0) {
  387. datas.data.records.forEach(it =>{
  388. if (it.posName === '主任' || it.posName === '副主任') {
  389. that.showMessage = true
  390. }
  391. })
  392. }
  393. })
  394. }
  395. },
  396. rowClick(selection, row) {
  397. this.changeDateSelect = selection
  398. },
  399. rowSituationClick(selection, row) {
  400. this.changeSituationSelect = selection
  401. },
  402. changeratingGrade(val) {
  403. this.modeifyDetail('level', val)
  404. },
  405. blurDes() {
  406. this.modeifyDetail('des', this.receiptMsg.des)
  407. },
  408. // 修改申报详情头信息
  409. modeifyDetail(type, val) {
  410. let that = this
  411. let params = {
  412. id: that.keyId
  413. }
  414. if (type === 'level') {
  415. params.ratingGrade = val
  416. } else {
  417. params.des = val
  418. }
  419. apideptAdmodify(params).then(datas =>{
  420. if (datas.success) {
  421. that.$message({
  422. message: '修改成功',
  423. type: 'success'
  424. });
  425. } else {
  426. that.$message({
  427. message: '修改失败',
  428. type: 'error'
  429. });
  430. }
  431. })
  432. },
  433. handleClick(val) {
  434. this.changeDateSelect = []
  435. this.changeSituationSelect = []
  436. this.activeName = val.props.name
  437. },
  438. handleCurrentChangeLeft(val) {
  439. this.pageLeft.currentPage = val
  440. },
  441. handleCurrentChangeRight(val) {
  442. this.pageRight.currentPage = val
  443. },
  444. //获取详情头数据
  445. getDetailsHeader(id) {
  446. let that = this
  447. apiPostevaluationdeptadDetailsHead(id).then(datas =>{
  448. if (datas && datas.data) {
  449. let row = datas.data
  450. that.receiptMsg = {
  451. code: row.orderNumber,
  452. des: row.declarationReason,
  453. stage: row.stage,
  454. deptId: row.deptId,
  455. deptName: row.deptName,
  456. deptLeaderName: row.deptLeaderName,
  457. declarationLevel: row.declarationLevel,
  458. ratingGrade: row.ratingGrade,
  459. createName: row.createName,
  460. createDate: row.createTime,
  461. type: row.checkCycle === 'YDKP'?'月度考评':row.checkCycle === 'JDKP'?'季度考评':'年度考评',
  462. year: row.annual,
  463. month: row.declarationMonth,
  464. recStage: '有效'
  465. }
  466. }
  467. })
  468. },
  469. //获取详情
  470. getDetails(id) {
  471. let that = this
  472. that.quantifiedList = []
  473. that.secondWorkSituation = []
  474. apiPostevaluationdeptadDetails(id).then(datas =>{
  475. if (datas && datas.data) {
  476. if (datas.data['ygydkhxs'][0]) {
  477. datas.data['ygydkhxs'][0].forEach(it =>{
  478. it.serialNumber = it.serialNumber.toString()
  479. })
  480. that.quantifiedList = datas.data['ygydkhxs'][0]
  481. that.pageLeft.total = datas.data['ygydkhxs'][0].length
  482. }
  483. if (datas.data['byzygzwcqk'][0]) {
  484. that.secondWorkSituation = datas.data['byzygzwcqk'][0]
  485. that.pageRight.total = datas.data['byzygzwcqk'][0].length
  486. }
  487. }
  488. })
  489. },
  490. employeeNoInputBlur(val, row) {
  491. this.deptLeaderOptionDet.forEach(it =>{
  492. if (val === it.no) {
  493. row.employeeId = it.id
  494. }
  495. })
  496. },
  497. addTableDetail() {
  498. this.pageLeft.currentPage = 1
  499. let obj = {
  500. showInput: true,
  501. businessPlanId: this.keyId,
  502. employeeId: '',
  503. employeeNo: '',
  504. suggestedValue: 1.00,
  505. serialNumber: 0
  506. }
  507. this.quantifiedList.unshift(obj)
  508. },
  509. saveDetail() {
  510. let that = this
  511. let params = []
  512. that.quantifiedList.forEach(item =>{
  513. // let emName = ''
  514. // let emNo = ''
  515. // that.deptLeaderOptionDet.forEach(it =>{
  516. // if (item.employeeId === it.id) {
  517. // emName = it.name
  518. // emNo = it.no
  519. // }
  520. // })
  521. let obj = {
  522. assessmentDeclarationId: that.keyId,
  523. employeeId: item.employeeId,
  524. employeeName: item.employeeName,
  525. employeeNo: item.employeeNo,
  526. suggestedValue: Number(item.suggestedValue).toFixed(2),
  527. serialNumber: item.serialNumber
  528. }
  529. if (!item.showInput) {
  530. obj.id = item.id
  531. }
  532. params.push(obj)
  533. })
  534. apiGetevaluationdeptadUpdate(params).then(datas =>{
  535. if (datas) {
  536. if (datas.success) {
  537. that.$message({
  538. message: '保存成功',
  539. type: 'success'
  540. });
  541. that.getDetails(that.keyId)
  542. } else {
  543. that.$message({
  544. message: datas.data,
  545. type: 'error'
  546. })
  547. }
  548. }
  549. })
  550. },
  551. handleDelete() {
  552. this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
  553. confirmButtonText: '确定',
  554. cancelButtonText: '取消',
  555. type: 'warning'
  556. }).then(() => {
  557. let that = this
  558. let paramsArr = []
  559. that.changeDateSelect.forEach(it =>{
  560. paramsArr.push(it.id)
  561. })
  562. apiGetevaluationdeptadDelete(paramsArr.join(',')).then(datas =>{
  563. if (datas) {
  564. that.$message({
  565. type: 'success',
  566. message: '删除成功!'
  567. });
  568. that.changeDateSelect = []
  569. that.getDetails(that.keyId)
  570. }
  571. })
  572. })
  573. },
  574. deleteRowFn(row) {
  575. let that = this
  576. this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
  577. confirmButtonText: '确定',
  578. cancelButtonText: '取消',
  579. type: 'warning'
  580. }).then(() => {
  581. if (!row.id) {
  582. that.quantifiedList.splice(index, 1)
  583. } else {
  584. apiGetevaluationdeptadDelete(row.id).then(datas =>{
  585. if (datas) {
  586. that.$message({
  587. type: 'success',
  588. message: '删除成功!'
  589. });
  590. that.getDetails(that.keyId)
  591. }
  592. })
  593. }
  594. })
  595. },
  596. handleImport() {
  597. this.$refs.importPage.upload.title = "绩效结果考核申报导入"
  598. this.$refs.importPage.upload.open = true
  599. this.$refs.importPage.upload.url = '/evaluation-dept-ad/import'
  600. },
  601. successImport(val) {
  602. this.$message({
  603. type: 'success',
  604. message: val.message
  605. });
  606. this.getDetails(this.keyId)
  607. },
  608. handleExport() {
  609. let data = this.quantifiedList //接口返回数据
  610. const workbook = new ExcelJS.Workbook()
  611. const worksheet = workbook.addWorksheet('Sheet1')
  612. //根据数据自己调整
  613. let colums = []
  614. colums = [
  615. // { header: 'ID', key: 'id', width: 26, hidden: true },
  616. { header: '申报ID', key: 'assessmentDeclarationId', width: 26, hidden: true },
  617. { header: '人员编号', key: 'employeeNo', width: 26 },
  618. // { header: '员工ID', key: 'employeeId', width: 26 },
  619. { header: '员工名称', key: 'employeeName', width: 26 },
  620. { header: '建议值', key: 'suggestedValue', width: 26 },
  621. { header: '排序', key: 'serialNumber', width: 26 },
  622. ]
  623. worksheet.columns = colums
  624. worksheet.getRow(1).font = {
  625. size: 12,
  626. bold: true
  627. }
  628. worksheet.addRows(data)
  629. workbook.xlsx.writeBuffer().then(buffer => {
  630. //这里为type
  631. const blob = new Blob([buffer], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8' })
  632. fileSave(blob, `绩效结果考核申报数据导出.xlsx`)
  633. })
  634. },
  635. changeLeaderFn() {
  636. this.leaderVisible = true
  637. this.leaderArr = []
  638. let that = this
  639. let params = {
  640. id: that.receiptMsg.deptId
  641. }
  642. apiGetobtainApprovalLeader(params).then(datas =>{
  643. if (datas && datas.data) {
  644. that.leaderArr = datas.data
  645. if (datas.data.length>0) {
  646. that.activeLeaderName = datas.data[0].no
  647. }
  648. }
  649. })
  650. },
  651. activeresponsibility() {
  652. let that = this
  653. let pars = {
  654. id: that.keyId,
  655. employeeNo: that.activeLeaderName
  656. }
  657. apiGetaddRepeatBatchLeader(pars).then(val =>{
  658. if (val && val.data) {
  659. that.leaderVisible = false
  660. setTimeout(() =>{
  661. that.submitIsdoAction('leader')
  662. }, 100)
  663. }
  664. })
  665. },
  666. engProssionFn() {
  667. this.submitIsdoAction('end')
  668. },
  669. examineAndApprove(type) {
  670. let actionCS = ''
  671. if (type === 'agree') {
  672. if (this.rowMsg.taskType === 'SIGN') {
  673. actionCS = 'signAgree'
  674. } else if (this.rowMsg.taskType === 'NORMAL') {
  675. actionCS = 'agree'
  676. }
  677. if (this.changeLeader) {
  678. this.changeLeaderFn()
  679. } else {
  680. this.submitIsdoAction(actionCS)
  681. }
  682. } else {
  683. if (this.rowMsg.taskType === 'SIGN') {
  684. actionCS = 'signReject'
  685. } else if (this.rowMsg.taskType === 'NORMAL') {
  686. actionCS = 'reject'
  687. }
  688. this.submitIsdoAction(actionCS)
  689. }
  690. },
  691. submitIsdoAction(taskType) {
  692. let that = this
  693. let leaderTaskType = ''
  694. if (that.changeLeader && taskType === 'leader') {
  695. if (that.rowMsg.taskType === 'SIGN') {
  696. leaderTaskType = 'signAgree'
  697. } else if (that.rowMsg.taskType === 'NORMAL') {
  698. leaderTaskType = 'agree'
  699. }
  700. }
  701. let params = {
  702. taskId: that.rowMsg.id, //任务ID
  703. nodeId: that.rowMsg.nodeId, //节点ID
  704. action: taskType !== 'leader' ? taskType : leaderTaskType, //固定值
  705. instanceId: that.rowMsg.instId, //流程实例ID
  706. opinion: that.descMsg, //审批意见
  707. iamCode: window.localStorage.getItem('code'), //认证后code值
  708. taskName: that.rowMsg.name,
  709. defKey: that.instanceChild.defKey,
  710. bizKey: that.instanceChild.bizKey
  711. }
  712. apiPostIsdoAction(params).then(datas =>{
  713. if (datas && datas.data) {
  714. if (datas.data.isOk) {
  715. that.$message({
  716. message: datas.data.data,
  717. type: 'success'
  718. })
  719. that.dialogVisible = false
  720. that.$emit('approveMsg', datas.data.isOk)
  721. } else {
  722. that.$message({
  723. message: datas.data.msg,
  724. type: 'error'
  725. })
  726. }
  727. }
  728. })
  729. },
  730. addSecondWork() {
  731. this.pageRight.currentPage = 1
  732. let obj = {
  733. showInput: true,
  734. assessmentDeclarationId: this.keyId,
  735. jobContent: '',
  736. completionStatus: '',
  737. relatedOffice: '',
  738. handlePeopleName: '',
  739. serialNumber: 0
  740. }
  741. this.secondWorkSituation.unshift(obj)
  742. },
  743. saveSecondWork() {
  744. let that = this
  745. let params = []
  746. that.secondWorkSituation.forEach(item =>{
  747. let obj = {
  748. assessmentDeclarationId: that.keyId,
  749. jobContent: item.jobContent,
  750. completionStatus: item.completionStatus,
  751. relatedOffice: item.relatedOffice,
  752. handlePeopleName: item.handlePeopleName,
  753. serialNumber: item.serialNumber
  754. }
  755. if (!item.showInput) {
  756. obj.id = item.id
  757. }
  758. params.push(obj)
  759. })
  760. apiGetevaluationdeptadUpdateComplete(params).then(datas =>{
  761. if (datas) {
  762. if (datas.success) {
  763. that.$message({
  764. message: '保存成功',
  765. type: 'success'
  766. });
  767. that.activeName = 'second'
  768. that.getDetails(that.keyId)
  769. } else {
  770. that.$message({
  771. message: datas.message,
  772. type: 'error'
  773. })
  774. }
  775. }
  776. })
  777. },
  778. handleSecondWork() {
  779. this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
  780. confirmButtonText: '确定',
  781. cancelButtonText: '取消',
  782. type: 'warning'
  783. }).then(() => {
  784. let that = this
  785. let paramsArr = []
  786. that.changeSituationSelect.forEach(it =>{
  787. paramsArr.push(it.id)
  788. })
  789. apiGetevaluationdeptadDeleteComplete(paramsArr.join(',')).then(datas =>{
  790. if (datas) {
  791. that.$message({
  792. type: 'success',
  793. message: '删除成功!'
  794. });
  795. that.activeName = 'second'
  796. that.changeSituationSelect = []
  797. that.getDetails(that.keyId)
  798. }
  799. })
  800. })
  801. },
  802. }
  803. }
  804. </script>
  805. <style lang="less">
  806. .applicationFrom{
  807. .el-overlay{
  808. .el-dialog{
  809. // margin-top: 7vh;
  810. .el-dialog__body{
  811. padding: 0 20px !important;
  812. .startDetail{
  813. .starttitleSty{
  814. font-size: 18px;
  815. font-family: Microsoft YaHei;
  816. font-weight: bold;
  817. color: #3B7AD1;
  818. // line-height: 12px;
  819. margin: 20px 0 20px 10px;
  820. }
  821. .danjuMsg{
  822. border: 1px solid #D6DBEA;
  823. padding: 10px 20px;
  824. border-radius: 10px;
  825. margin-bottom: 10px;
  826. .danjuMsg_data{
  827. padding: 5px 0 10px 0;
  828. .data_tit{
  829. margin-right: 10px;
  830. font-weight: bold;
  831. font-size: 14px;
  832. font-family: Microsoft YaHei;
  833. color: #8991B0;
  834. }
  835. .data_tit_wd{
  836. display: inline-block;
  837. width: 90px;
  838. }
  839. .el-form-item--small{
  840. .el-input{
  841. height: 25px;
  842. width: 160px;
  843. }
  844. margin-bottom: 0;
  845. .el-input-number{
  846. height: 25px;
  847. .el-input-number__decrease, .el-input-number__increase{
  848. right: -39px;
  849. }
  850. }
  851. }
  852. }
  853. .danjuMsgSelect{
  854. display: flex;
  855. .data_tit{
  856. margin-right: 10px;
  857. font-weight: bold;
  858. font-size: 14px;
  859. font-family: Microsoft YaHei;
  860. color: #8991B0;
  861. }
  862. .el-select{
  863. width: 30%;
  864. position: relative;
  865. top: -5px;
  866. }
  867. .el-textarea{
  868. width: 80%;
  869. position: relative;
  870. top: -4px;
  871. }
  872. }
  873. }
  874. .el-select, .el-input{
  875. width: 100%;
  876. }
  877. .el-tabs{
  878. margin-top: 20px;
  879. .detaTableBtns{
  880. display: flex;
  881. justify-content: flex-end;
  882. width: 100%;
  883. margin-top: 5px;
  884. .tableBtn {
  885. display: flex;
  886. height: 20px;
  887. margin: 0 10px;
  888. // width: 20%;
  889. width: fit-content;
  890. img{
  891. margin-right: 5px;
  892. margin-top: 1px;
  893. }
  894. span{
  895. width: 35px;
  896. display: inline-block;
  897. font-size: 14px;
  898. font-family: Microsoft YaHei;
  899. font-weight: 400;
  900. }
  901. }
  902. .add{
  903. cursor: pointer;
  904. span{
  905. color: #3B7AD1;
  906. }
  907. }
  908. .save{
  909. cursor: pointer;
  910. span{
  911. color: #50C14E;
  912. }
  913. }
  914. .edit{
  915. span{
  916. color: #F5A623;
  917. }
  918. }
  919. .delete{
  920. cursor: pointer;
  921. span{
  922. color: #F65177;
  923. }
  924. }
  925. .import{
  926. cursor: pointer;
  927. span{
  928. color: #ce1e78;
  929. }
  930. }
  931. .export{
  932. cursor: pointer;
  933. span{
  934. color: #2baa8a;
  935. }
  936. }
  937. }
  938. .el-tabs__header{
  939. .el-tabs__nav{
  940. .el-tabs__item{
  941. font-size: 18px;
  942. font-family: Microsoft YaHei;
  943. font-weight: bold;
  944. margin: 0 10px;
  945. color: #8991B0;
  946. }
  947. .is-active{
  948. font-size: 18px;
  949. font-family: Microsoft YaHei;
  950. font-weight: bold;
  951. color: #3B7AD1;
  952. margin: 0 10px;
  953. }
  954. }
  955. }
  956. .el-table{
  957. margin-bottom: 10px;
  958. .el-table__body-wrapper{
  959. height: 38vh;
  960. }
  961. .el-table__row{
  962. .cell{
  963. .el-input{
  964. height: 24px;
  965. .el-input__inner{
  966. height: 24px;
  967. }
  968. }
  969. }
  970. }
  971. .indicitem{
  972. color: #F65177;
  973. font-size: 12px;
  974. margin-right: 20px;
  975. cursor:pointer;
  976. &:hover{
  977. text-decoration: underline;
  978. }
  979. }
  980. }
  981. }
  982. }
  983. .periodFrom{
  984. margin: 15px 0;
  985. }
  986. }
  987. .el-dialog__footer{
  988. .dialog-footer{
  989. display: flex;
  990. justify-content: center;
  991. .el-button{
  992. width: 180px !important;
  993. height: 40px !important;
  994. }
  995. }
  996. }
  997. }
  998. }
  999. }
  1000. </style>