todoList.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675
  1. <template>
  2. <div class="app-container">
  3. <div class="title-container">
  4. <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
  5. </div>
  6. <y-page-list-layout :page-list="pageData" :page-para="listQuery" :get-page-list="getPage">
  7. <template slot="left">
  8. <MoreSearchBar business="MAJOR_BUSINESS" @fliterSearch="fliterSearch" @resetParams="resetParams"
  9. :listQuery="listQuery" :nodes="majorNodes" :ifSaveFileQuery="true">
  10. <template v-slot:otherButton>
  11. <el-button class="filter-item" round @click="showAllLabel()">显示全部列</el-button>
  12. <PermissionButton menu-code="_views_major_batch_commit_bookbinding_stamp" class-name="filter-item"
  13. type="danger" icon="el-icon-paperclip" :page-jump="false" round
  14. @click="openBatchCommitDialog('BOOKBINDING_STAMP')" />
  15. <PermissionButton menu-code="_views_major_batch_commit_recheck_archiving" class-name="filter-item"
  16. type="danger" icon="el-icon-paperclip" :page-jump="false" round
  17. @click="openBatchCommitDialog('RECHECK_ARCHIVING')" />
  18. <PermissionButton menu-code="_views_major_batch_commit_check_archiving" class-name="filter-item"
  19. type="danger" icon="el-icon-paperclip" :page-jump="false" round
  20. @click="openBatchCommitDialog('CHECK_ARCHIVING')" />
  21. </template>
  22. </MoreSearchBar>
  23. </template>
  24. <parentTable :data="pageData.records" slot="table" style="width: 100%;" @sortTable="sortTable"
  25. @headerClick="switchHeader">
  26. <el-table-column label="项目名称" align="center" width="250" v-if="!hiddenLabels.includes('productionName')"
  27. prop="productionName" show-overflow-tooltip>
  28. <template slot-scope="{row}">
  29. <span class="enableClick" @click="toDetail(row)">{{ row.productionName == null ? row.orderName :
  30. row.productionName
  31. }}</span>
  32. </template>
  33. </el-table-column>
  34. <el-table-column label="订单号" align="center" width="150" v-if="!hiddenLabels.includes('orderId')" prop="orderId">
  35. <template slot-scope="{row}">
  36. <span class="enableClick" @click="toDetail(row)" @contextmenu.prevent="$doCopy(row.orderId)">{{ row.orderId
  37. }}</span>
  38. </template>
  39. </el-table-column>
  40. <el-table-column label="价值意见书号" align="center" width="200" v-if="!hiddenLabels.includes('statementNo')"
  41. prop="statementNo" sortable>
  42. <template slot-scope="{row}">
  43. <span @contextmenu.prevent="$doCopy(row.statementNo)">{{ row.statementNo == null ? '-' : row.statementNo
  44. }}</span>
  45. </template>
  46. </el-table-column>
  47. <el-table-column label="报告号/复评函号" align="center" width="200" v-if="!hiddenLabels.includes('reportNo')"
  48. prop="reportNo" sortable>
  49. <template slot-scope="{row}">
  50. <span @contextmenu.prevent="$doCopy(row.reportNo)">{{ row.reportNo == null ? '-' : row.reportNo }}</span>
  51. </template>
  52. </el-table-column>
  53. <el-table-column label="评估对象类型" align="center" width="120" v-if="!hiddenLabels.includes('businessObjectType')"
  54. prop="businessObjectType">
  55. <template slot-scope="{row}">
  56. <span>{{ row.businessObjectType }}</span>
  57. </template>
  58. </el-table-column>
  59. <el-table-column label="待办人" align="center" v-if="!hiddenLabels.includes('handler')" prop="handler">
  60. <template slot-scope="{row}">
  61. <span>{{ row.handler }}</span>
  62. </template>
  63. </el-table-column>
  64. <el-table-column label="当前节点" align="center" width="140" v-if="!hiddenLabels.includes('nodeName')"
  65. prop="nodeName" sortable>
  66. <template slot-scope="{row}">
  67. <span>{{ row.nodeName }}</span>
  68. </template>
  69. </el-table-column>
  70. <el-table-column label="客户经理" align="center" v-if="!hiddenLabels.includes('clientManager')"
  71. prop="clientManager">
  72. <template slot-scope="{row}">
  73. <span>{{ row.clientManager }}</span>
  74. </template>
  75. </el-table-column>
  76. <el-table-column label="负责人" align="center" v-if="!hiddenLabels.includes('principal')" prop="principal">
  77. <template slot-scope="{row}">
  78. <span>{{ row.principal == null ? '-' : row.principal }}</span>
  79. </template>
  80. </el-table-column>
  81. <el-table-column label="评估对象类型" align="center" width="130" v-if="!hiddenLabels.includes('businessObjectType')"
  82. prop="businessObjectType">
  83. <template slot-scope="{row}">
  84. <span>{{ row.businessObjectType }}</span>
  85. </template>
  86. </el-table-column>
  87. <el-table-column label="客户名称" align="center" width="130" v-if="!hiddenLabels.includes('cclienteleName')"
  88. prop="cclienteleName">
  89. <template slot-scope="{row}">
  90. <span>{{ row.cclienteleName }}</span>
  91. </template>
  92. </el-table-column>
  93. <el-table-column label="业务来源" align="center" width="130" v-if="!hiddenLabels.includes('cclienteleSubName')"
  94. prop="cclienteleSubName">
  95. <template slot-scope="{row}">
  96. <span>{{ row.cclienteleSubName }}</span>
  97. </template>
  98. </el-table-column>
  99. <el-table-column label="客户联系人" align="center" width="130" v-if="!hiddenLabels.includes('cclienteleContactName')"
  100. prop="cclienteleContactName">
  101. <template slot-scope="{row}">
  102. <span>{{ row.cclienteleContactName }}</span>
  103. </template>
  104. </el-table-column>
  105. <el-table-column label="客户联系人电话" align="center" width="130" v-if="!hiddenLabels.includes('cmobile')"
  106. prop="cmobile">
  107. <template slot-scope="{row}">
  108. {{ row.cmobile }}
  109. </template>
  110. </el-table-column>
  111. <el-table-column label="下单时间" align="center" width="160" v-if="!hiddenLabels.includes('created')"
  112. prop="created">
  113. <template slot-scope="{row}">
  114. <span>{{ row.created }}</span>
  115. </template>
  116. </el-table-column>
  117. <el-table-column label="任务创建时间" align="center" width="160" v-if="!hiddenLabels.includes('taskCreated')"
  118. prop="taskCreated" sortable>
  119. <template slot-scope="{row}">
  120. <span>{{ row.taskCreated }}</span>
  121. </template>
  122. </el-table-column>
  123. <el-table-column label="操作" align="center" width="100" fixed="right">
  124. <template slot-scope="{row}">
  125. <el-button type="text" @click="toDetail(row)">办理</el-button>
  126. <el-button type="text" @click="transfer(row.taskId)">转交</el-button>
  127. </template>
  128. </el-table-column>
  129. </parentTable>
  130. </y-page-list-layout>
  131. <TransferDialog :transferDialogVisible="visible" @parentFalse="parentFalse()" @getPage="getPage()"
  132. :recordId="recordId">
  133. </TransferDialog>
  134. <el-dialog :visible.sync="batchCommitDialog" width="70%">
  135. <y-page-list-layout :page-list="batchCommitPageData" :page-para="batchCommitListQuery"
  136. :get-page-list="selectBatchCommitPage">
  137. <template slot="left">
  138. <el-input style="margin-left: 20px;width: 300px;float: left;" class="filter-item"
  139. v-model="batchCommitListQuery.keyWord" placeholder="项目编号/报告号/项目名称/业务来源" clearable>
  140. </el-input>
  141. <el-button class="filter-item" style="margin-left: 10px;float: left;" type="primary"
  142. @click="searchBatchCommitList()" round>搜索
  143. </el-button>
  144. <el-button class="filter-item" style="margin-left: 10px;float: left;" type="danger" @click="batchCommitNode()"
  145. round>提交选中流程
  146. </el-button>
  147. </template>
  148. <parentTable :clickRowToPick="true" ref="table" :data="batchCommitPageData.records" slot="table"
  149. style="width: 100%;height: 800px;" :selectionChange="handleSelectionChange">
  150. <el-table-column align="center" type="selection" claimOrders width="50" border="true">
  151. </el-table-column>
  152. <el-table-column label="项目名称" align="center" width="250" v-if="!hiddenLabels.includes('productionName')"
  153. prop="productionName" show-overflow-tooltip>
  154. <template slot-scope="{row}">
  155. <span class="enableClick" @click="toDetail(row)">{{ row.productionName == null ? row.orderName :
  156. row.productionName
  157. }}</span>
  158. </template>
  159. </el-table-column>
  160. <el-table-column label="订单号" align="center" width="150" v-if="!hiddenLabels.includes('orderId')"
  161. prop="orderId">
  162. <template slot-scope="{row}">
  163. <span class="enableClick" @click="toDetail(row)" @contextmenu.prevent="$doCopy(row.orderId)">{{
  164. row.orderId
  165. }}</span>
  166. </template>
  167. </el-table-column>
  168. <el-table-column label="价值意见书号" align="center" width="200" v-if="!hiddenLabels.includes('statementNo')"
  169. prop="statementNo" sortable>
  170. <template slot-scope="{row}">
  171. <span @contextmenu.prevent="$doCopy(row.statementNo)">{{ row.statementNo == null ? '-' : row.statementNo
  172. }}</span>
  173. </template>
  174. </el-table-column>
  175. <el-table-column label="报告号/复评函号" align="center" width="200" v-if="!hiddenLabels.includes('reportNo')"
  176. prop="reportNo" sortable>
  177. <template slot-scope="{row}">
  178. <span @contextmenu.prevent="$doCopy(row.reportNo)">{{ row.reportNo == null ? '-' : row.reportNo }}</span>
  179. </template>
  180. </el-table-column>
  181. <el-table-column label="评估对象类型" align="center" width="120" v-if="!hiddenLabels.includes('businessObjectType')"
  182. prop="businessObjectType">
  183. <template slot-scope="{row}">
  184. <span>{{ row.businessObjectType }}</span>
  185. </template>
  186. </el-table-column>
  187. <el-table-column label="待办人" align="center" v-if="!hiddenLabels.includes('handler')" prop="handler">
  188. <template slot-scope="{row}">
  189. <span>{{ row.handler }}</span>
  190. </template>
  191. </el-table-column>
  192. <el-table-column label="当前节点" align="center" width="140" v-if="!hiddenLabels.includes('nodeName')"
  193. prop="nodeName" sortable>
  194. <template slot-scope="{row}">
  195. <span>{{ row.nodeName }}</span>
  196. </template>
  197. </el-table-column>
  198. <el-table-column label="客户经理" align="center" v-if="!hiddenLabels.includes('clientManager')"
  199. prop="clientManager">
  200. <template slot-scope="{row}">
  201. <span>{{ row.clientManager }}</span>
  202. </template>
  203. </el-table-column>
  204. <el-table-column label="负责人" align="center" v-if="!hiddenLabels.includes('principal')" prop="principal">
  205. <template slot-scope="{row}">
  206. <span>{{ row.principal == null ? '-' : row.principal }}</span>
  207. </template>
  208. </el-table-column>
  209. </parentTable>
  210. </y-page-list-layout>
  211. </el-dialog>
  212. <el-dialog :visible.sync="allocationDialog" title="评估部退单,请领导重新分单。" center width="35%" top="15vh">
  213. <el-form :model="allocationForm">
  214. <el-row>
  215. <el-col :xs="24" :sm="12" :lg="24" :span="6">
  216. <el-form-item label="退单部门:">
  217. <el-input :value="allocationForm.departmentName + '-' + allocationForm.refuseUser" readonly style="width: 80%;"/>
  218. </el-form-item>
  219. </el-col>
  220. </el-row>
  221. <el-row>
  222. <el-col :xs="24" :sm="12" :lg="24" :span="6">
  223. <el-form-item label="退单时间:">
  224. <el-input :value="allocationForm.refuseTime" readonly style="width: 80%;"/>
  225. </el-form-item>
  226. </el-col>
  227. </el-row>
  228. <el-row>
  229. <el-col :xs="24" :sm="12" :lg="24" :span="6">
  230. <el-form-item label="退单原因:">
  231. <el-input :value="allocationForm.reason" readonly style="width: 80%;"></el-input>
  232. </el-form-item>
  233. </el-col>
  234. </el-row>
  235. <el-row>
  236. <el-col :xs="24" :sm="12" :lg="24" :span="6">
  237. <el-form-item label="接单部门:">
  238. <el-select v-model="allocationForm.departmentId" placeholder="请重新分配接单部门" clearable style="width: 80%;">
  239. <el-option v-for="(d, id) in allotDepartment" :label="d.name" :value="d.id"></el-option>
  240. </el-select>
  241. </el-form-item>
  242. </el-col>
  243. </el-row>
  244. <el-row>
  245. <el-col :xs="24" :sm="12" :lg="24" :span="6">
  246. <el-form-item label="处理意见:">
  247. <el-input type="textarea" v-model="allocationForm.comments" clearable style="width: 80%;" />
  248. </el-form-item>
  249. </el-col>
  250. </el-row>
  251. </el-form>
  252. <div slot="footer" class="dialog-footer">
  253. <el-button @click="allocationDialog = false">取 消</el-button>
  254. <el-button type="primary" @click="saveAllocation()">确 定</el-button>
  255. </div>
  256. </el-dialog>
  257. </div>
  258. </template>
  259. <script>
  260. import YPageListLayout from '@/components/YPageListLayout'
  261. import Breadcrumb from '@/components/Breadcrumb'
  262. import TransferDialog from '@/components/TaskTransferDialog'
  263. import { getCookie, setCookie, removeCookie } from '@/utils/auth'
  264. import MoreSearchBar from '@/components/MoreSearchBar'
  265. export default {
  266. name: 'MajorTaskTodoList',
  267. components: {
  268. Breadcrumb,
  269. YPageListLayout,
  270. TransferDialog,
  271. MoreSearchBar
  272. },
  273. data() {
  274. return {
  275. pageData: { records: [] },
  276. listQuery: {
  277. page: 1,
  278. size: 10,
  279. keyword: null,
  280. descs: null,
  281. ascs: null,
  282. getNodeIsCheckArchiving: false
  283. },
  284. majorNodes: [],
  285. orderDate: '',
  286. pickerOptions: {
  287. shortcuts: [{
  288. text: '最近一周',
  289. onClick(picker) {
  290. const end = new Date();
  291. const start = new Date();
  292. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  293. picker.$emit('pick', [start, end]);
  294. }
  295. }, {
  296. text: '最近一个月',
  297. onClick(picker) {
  298. const end = new Date();
  299. const start = new Date();
  300. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  301. picker.$emit('pick', [start, end]);
  302. }
  303. }, {
  304. text: '最近三个月',
  305. onClick(picker) {
  306. const end = new Date();
  307. const start = new Date();
  308. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  309. picker.$emit('pick', [start, end]);
  310. }
  311. }]
  312. },
  313. visible: false,
  314. recordId: null,
  315. hiddenLabels: [],
  316. batchCommitDialog: false,
  317. workNodeCommits: [],
  318. batchCommitListQuery: {
  319. page: 1,
  320. size: 10,
  321. current: 1,
  322. keyWord: null,
  323. handlerId: this.$store.getters.userInfo.id,
  324. getNodeIsBookbindingStamp: false,
  325. getNodeIsRecheckArchiving: false,
  326. getNodeIsCheckArchiving: false
  327. },
  328. batchCommitPageData: { records: [] },
  329. allocationDialog: false,
  330. allocationForm: {
  331. id: null,
  332. departmentId: null,
  333. comments: null,
  334. departmentName:null,
  335. reason:null,
  336. refuseTime:null,
  337. refuseUser:null
  338. },
  339. allotDepartment: [],
  340. nodeCode:null,
  341. }
  342. },
  343. created() {
  344. if (getCookie("MajorTodoList-hiddenLabels") != undefined) {
  345. this.hiddenLabels = JSON.parse(getCookie("MajorTodoList-hiddenLabels"))
  346. }
  347. this.nodeCode = this.$route.query.nodeCode;
  348. if (this.nodeCode === 'LEADER_ALLOCATION'){
  349. this.getAllotDepartment();
  350. this.getRefuseReason(this.$route.query.businessId);
  351. this.allocationDialog = true;
  352. this.allocationForm.instanceNodeId = this.$route.query.currentNodeId;
  353. this.allocationForm.id = this.$route.query.businessId;
  354. this.allocationForm.departmentName = this.$route.query.departmentName;
  355. }
  356. this.getPage();
  357. this.getMajorNodes();
  358. },
  359. methods: {
  360. resetSearch() {
  361. this.$router.push({ query: {} });
  362. this.orderDate = '';
  363. this.listQuery = {
  364. current: 1,
  365. size: 10,
  366. descs: 'taskCreated',
  367. }
  368. this.getPage()
  369. },
  370. removeHandle(row) {
  371. // console.log(data)
  372. this.$confirm('确认删除当前记录吗?', '警告', {
  373. confirmButtonText: '确认',
  374. cancelButtonText: '取消',
  375. type: 'warning',
  376. })
  377. .then(async () => {
  378. this.$api.term.delete(row.id).then((res) => {
  379. if (res.code === 200) {
  380. this.$message({
  381. type: 'success',
  382. message: '删除成功',
  383. })
  384. this.getPage()
  385. }
  386. })
  387. })
  388. .catch((err) => {
  389. console.error(err)
  390. })
  391. },
  392. searchList() {
  393. // 重置分页
  394. this.listQuery.page = 1
  395. this.listQuery.size = 10
  396. if (this.orderDate) {
  397. this.listQuery.startDate = this.orderDate[0] + ' 00:00:00';
  398. this.listQuery.endDate = this.orderDate[1] + ' 23:59:59';
  399. }
  400. this.getPage()
  401. },
  402. getPage() {
  403. this.$api.workNodeTaskRecord.majorTaskTodoList(this.listQuery).then(res => {
  404. if (res.code === 200) {
  405. this.pageData = res.data;
  406. }
  407. })
  408. },
  409. // 当前用户待办分页查询
  410. selectBatchCommitPage() {
  411. this.$api.workNodeTaskRecord.majorTaskTodoList(this.batchCommitListQuery).then(res => {
  412. if (res.code === 200) {
  413. this.batchCommitPageData = res.data;
  414. }
  415. })
  416. },
  417. // 条件查询
  418. searchBatchCommitList() {
  419. // 重置分页
  420. this.batchCommitListQuery.page = 1
  421. this.batchCommitListQuery.size = 10
  422. this.selectBatchCommitPage()
  423. },
  424. openBatchCommitDialog(node) {
  425. if (node === 'BOOKBINDING_STAMP') {
  426. this.batchCommitListQuery.getNodeIsBookbindingStamp = true;
  427. }
  428. if (node === 'RECHECK_ARCHIVING') {
  429. this.batchCommitListQuery.getNodeIsRecheckArchiving = true;
  430. }
  431. if (node === 'CHECK_ARCHIVING') {
  432. this.batchCommitListQuery.getNodeIsCheckArchiving = true;
  433. }
  434. this.selectBatchCommitPage();
  435. this.batchCommitDialog = true;
  436. },
  437. handleSelectionChange(val) {
  438. let pickedCommits = [];
  439. for (let i in val) {
  440. let commit = new Object();
  441. commit.instanceNodeId = val[i].currentNodeId;
  442. commit.state = "PASS";
  443. commit.comments = "批量提交装订盖章节点";
  444. commit.businessSubId = val[i].statementNo;
  445. commit.businessMinId = val[i].reportNo;
  446. pickedCommits.push(commit);
  447. }
  448. this.workNodeCommits = pickedCommits;
  449. },
  450. deleteInfo(id) {
  451. const that = this
  452. that.$confirm('请确认是否删除该数据?', '提示', {
  453. confirmButtonText: '确定',
  454. cancelButtonText: '取消',
  455. type: 'warning',
  456. center: true
  457. }).then(() => {
  458. that.$api.item.delete(id).then(data => {
  459. that.loading = false
  460. if (data.code === 200) {
  461. that.getPage()
  462. } else {
  463. this.$message({
  464. type: 'error',
  465. message: data.msg
  466. })
  467. }
  468. })
  469. }).catch(() => {
  470. })
  471. },
  472. getMajorNodes() {
  473. this.$api.workNode.nodesByBusiness('MAJOR_BUSINESS').then(res => {
  474. if (res.code === 200) {
  475. this.majorNodes = res.data
  476. }
  477. })
  478. },
  479. parentFalse() {
  480. this.visible = false;
  481. },
  482. transfer(recordId) {
  483. this.visible = true;
  484. this.recordId = recordId;
  485. },
  486. toDetail(row) {
  487. let reportNo = row.reportNo;
  488. let statementNo = row.statementNo;
  489. if (row.nodeCode === 'REPORT_OUT_APPLY' || row.nodeCode === 'LETTER_OUT_APPLY') {
  490. this.$router.push(`/major/my/order?todoBusinessId=${row.businessId}&sNo=${statementNo}&rNo=${reportNo}&tId=${row.taskId}&cId=${row.currentNodeId}`)
  491. return;
  492. }
  493. if (row.nodeCode === 'REPORT_OUT_FINANCE_CHECK' || row.nodeCode === 'REPORT_OUT_DEPARTMENT_CHECK' || row.nodeCode === 'LETTER_OUT_FINANCE_CHECK' || row.nodeCode === 'LETTER_OUT_DEPARTMENT_CHECK') {
  494. this.$router.push(`/out/warehouse/check?todoBusinessId=${row.businessId}&sNo=${statementNo}&rNo=${reportNo}&tId=${row.taskId}&cId=${row.currentNodeId}&nCode=${row.nodeCode}&businessType=MAJOR_BUSINESS`)
  495. return;
  496. }
  497. if (row.nodeCode === 'BUSINESS_ARCHIVING') {
  498. this.$router.push(`/major/saveFile/waiting`)
  499. return;
  500. }
  501. if (row.nodeCode === 'STATEMENT_DELIVERY') {
  502. this.$router.push(`/major/my/order?todoBusinessId=${row.businessId}&sNo=${statementNo}&tId=${row.taskId}&cId=${row.currentNodeId}`)
  503. return;
  504. }
  505. if (row.nodeCode === 'STATEMENT_IN' || row.nodeCode === 'STATEMENT_OUT' ||
  506. row.nodeCode === 'REPORT_IN' || row.nodeCode === 'REPORT_OUT' ||
  507. row.nodeCode === 'LETTER_IN' || row.nodeCode === 'LETTER_OUT') {
  508. this.$router.push(`/major/production/in?openDialog=${true}`)
  509. return;
  510. }
  511. if (row.nodeCode === 'LEADER_ALLOCATION') {
  512. this.getAllotDepartment();
  513. this.getRefuseReason(row.businessId);
  514. this.allocationDialog = true;
  515. this.allocationForm.instanceNodeId = row.currentNodeId;
  516. this.allocationForm.id = row.businessId;
  517. this.allocationForm.departmentName = row.departmentName;
  518. return;
  519. }
  520. if (reportNo && statementNo) {
  521. this.$router.push(`/major/todo/detail?id=${row.businessId}&orderId=${row.orderId}&reportNo=${reportNo}&statementNo=${row.statementNo}&doWorkflow=${true}&currentNodeId=${row.currentNodeId}&currentNodeCode=${row.nodeCode}&back=${'/major/todo'}`)
  522. } else if (!reportNo && statementNo) {
  523. this.$router.push(`/major/todo/detail?id=${row.businessId}&orderId=${row.orderId}&statementNo=${row.statementNo}&doWorkflow=${true}&currentNodeId=${row.currentNodeId}&currentNodeCode=${row.nodeCode}&back=${'/major/todo'}`)
  524. } else if (reportNo && !statementNo) {
  525. this.$router.push(`/major/todo/detail?id=${row.businessId}&orderId=${row.orderId}&reportNo=${reportNo}&doWorkflow=${true}&currentNodeId=${row.currentNodeId}&currentNodeCode=${row.nodeCode}&back=${'/major/todo'}`)
  526. } else {
  527. this.$router.push(`/major/todo/detail?id=${row.businessId}&orderId=${row.orderId}&doWorkflow=${true}&currentNodeId=${row.currentNodeId}&currentNodeCode=${row.nodeCode}&back=${'/major/todo'}`)
  528. }
  529. },
  530. sortTable(sortParams) {
  531. this.listQuery.ascs = sortParams.ascs;
  532. this.listQuery.descs = sortParams.descs;
  533. this.$api.workNodeTaskRecord.majorTaskTodoList(this.listQuery).then(res => {
  534. if (res.code === 200) {
  535. this.pageData = res.data;
  536. }
  537. })
  538. },
  539. switchHeader(data) {
  540. this.hiddenLabels.push(data);
  541. setCookie("MajorTodoList-hiddenLabels", this.hiddenLabels);
  542. },
  543. showAllLabel() {
  544. removeCookie("MajorTodoList-hiddenLabels");
  545. location.reload();
  546. },
  547. fliterSearch(params) {
  548. this.$api.workNodeTaskRecord.majorTaskTodoList(this.listQuery).then(res => {
  549. if (res.code === 200) {
  550. this.pageData = res.data;
  551. }
  552. })
  553. },
  554. resetParams() {
  555. this.$router.push({ query: {} });
  556. this.listQuery = {
  557. current: 1,
  558. size: 10,
  559. descs: 'created',
  560. }
  561. this.getPage();
  562. },
  563. // 批量提交流程节点
  564. batchCommitNode() {
  565. if (this.workNodeCommits.length > 0) {
  566. this.$confirm('确认批量提交已选中流程?', '提示', {
  567. confirmButtonText: '确定',
  568. cancelButtonText: '取消',
  569. type: 'warning'
  570. }).then(() => {
  571. this.$api.workflow.batchCommit(this.workNodeCommits).then(res => {
  572. if (res.code === 200 && res.data) {
  573. this.$notify({
  574. title: '成功',
  575. message: '工作流节点批量提交成功。',
  576. type: 'success',
  577. duration: 2000
  578. });
  579. this.getPage();
  580. this.selectBatchCommitPage();
  581. } else {
  582. this.$notify({
  583. title: '失败',
  584. message: res.message,
  585. type: 'error',
  586. duration: 2000
  587. });
  588. }
  589. })
  590. }).catch(() => {
  591. this.$message({
  592. type: 'info',
  593. message: '已取消批量提交'
  594. });
  595. });
  596. } else {
  597. this.$notify.error({
  598. title: '错误',
  599. message: '请选择至少一条流程再提交!'
  600. });
  601. }
  602. },
  603. saveAllocation() {
  604. let major = new Object();
  605. major.id = this.allocationForm.id;
  606. major.departmentId = this.allocationForm.departmentId;
  607. let taskRecord = new Object();
  608. taskRecord.recordId = this.allocationForm.recordId;;
  609. taskRecord.taskData = major;
  610. this.$api.major.department(taskRecord).then(res=>{
  611. if (res.code === 200 && res.data){
  612. let commit = new Object();
  613. commit.instanceNodeId = this.allocationForm.instanceNodeId;
  614. commit.state = 'PASS';
  615. commit.nodeCode = 'LEADER_ALLOCATION';
  616. this.$api.workflow.commit(commit).then(res=>{
  617. if (res.code === 200 && res.data){
  618. this.$notify({
  619. title: '成功',
  620. message: '操作成功',
  621. type: 'success',
  622. duration: 2000
  623. });
  624. this.allocationDialog = false;
  625. this.getPage();
  626. }else{
  627. this.$notify({
  628. title: '失败',
  629. message: '操作失败',
  630. type: 'error',
  631. duration: 2000
  632. })
  633. }
  634. })
  635. }
  636. })
  637. },
  638. getAllotDepartment() {
  639. this.$api.department.allot('MAJOR_BUSINESS').then(res => {
  640. if (res.code === 200) {
  641. this.allotDepartment = res.data;
  642. }
  643. })
  644. },
  645. getRefuseReason(businessId){
  646. if (businessId){
  647. this.$api.workflowLog.getRefuse(businessId,'MAJOR_BUSINESS').then(res=>{
  648. if (res.code === 200 && res.data){
  649. this.allocationForm.reason = res.data.comments;
  650. this.allocationForm.refuseTime = res.data.created;
  651. this.allocationForm.refuseUser = res.data.handler;
  652. this.allocationForm.recordId = res.data.recordId;
  653. }
  654. })
  655. }
  656. }
  657. },
  658. }
  659. </script>
  660. <style lang="scss" scoped>
  661. .enableClick:hover {
  662. color: #1890ff;
  663. cursor: pointer;
  664. }
  665. </style>