processList.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. <template>
  2. <div class="app-container">
  3. <!-- 项目投决 -->
  4. <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px"
  5. label-position="top">
  6. <el-row :gutter="20">
  7. <el-col :span="6">
  8. <el-form-item label="项目名称" prop="projectName">
  9. <el-input v-model.trim="queryParams.projectName" placeholder="请输入项目名称" clearable
  10. @keyup.enter.native="handleQuery" />
  11. </el-form-item>
  12. </el-col>
  13. <el-col :span="6">
  14. <el-form-item label="终止原因" prop="reason">
  15. <el-input v-model.trim="queryParams.reason" placeholder="请输入终止原因" clearable
  16. @keyup.enter.native="handleQuery" />
  17. </el-form-item>
  18. </el-col>
  19. <el-col :span="6">
  20. <el-form-item label="流程状态" prop="status">
  21. <!-- el-select 绑定表单字段 -->
  22. <el-select v-model="queryParams.status" placeholder="请选择" clearable style="width: 100%;">
  23. <!-- 静态选项 -->
  24. <el-option label="暂存" value="0"></el-option>
  25. <el-option label="已提交" value="1"></el-option>
  26. <el-option label="审批中" value="2"></el-option>
  27. <el-option label="审核完成" value="3"></el-option>
  28. <el-option label="关闭" value="4"></el-option>
  29. </el-select>
  30. </el-form-item>
  31. </el-col>
  32. <el-col :span="6">
  33. </el-col>
  34. </el-row>
  35. <!-- 可继续扩展其他查询表单项目,比如项目编号、负责人等 -->
  36. <el-row :gutter="20">
  37. <el-col :span="6">
  38. <el-form-item label="搜索">
  39. <el-button style="width: 100%;" type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
  40. </el-form-item>
  41. </el-col>
  42. <el-col :span="6">
  43. <el-form-item label="重置">
  44. <el-button style="width: 100%;" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
  45. </el-form-item>
  46. </el-col>
  47. </el-row>
  48. </el-form>
  49. <el-row :gutter="10" class="mb8">
  50. <!-- <el-col :span="1.5">
  51. <el-button
  52. type="warning"
  53. size="small"
  54. icon="el-icon-document"
  55. @click="handleAdd"
  56. >终止申请</el-button>
  57. </el-col>-->
  58. <el-col :span="1.5">
  59. <el-button type="warning" icon="el-icon-download" size="small" @click="handleExport">导出</el-button>
  60. </el-col>
  61. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  62. </el-row>
  63. <div class="border-card">
  64. <el-table height="450" ref="dataTable" @row-click="clickRow" class="tableWrapper" v-loading="loading" border
  65. :data="poolList" @selection-change="handleSelectionChange">
  66. <!-- <el-table-column type="selection" width="40" align="center" /> -->
  67. <el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
  68. <!-- <el-table-column label="主键id" align="center" prop="id" /> -->
  69. <!-- <el-table-column label="项目名称" align="center" prop="projectName">
  70. <template slot-scope="scope">
  71. <div
  72. :title="scope.row.projectName"
  73. class="public-text-blue public-cursor"
  74. @click.stop="handleDetail(scope.row)"
  75. >
  76. {{ scope.row.projectName }}
  77. </div>
  78. </template>
  79. </el-table-column>-->
  80. <el-table-column label="项目名称" align="center" prop="projectName">
  81. <template slot-scope="scope">
  82. <div :title="scope.row.projectName">
  83. {{ scope.row.projectName }}
  84. </div>
  85. </template>
  86. </el-table-column>
  87. <el-table-column label="所属行业" align="center" prop="industry"><template slot-scope="scope">
  88. <dict-tag :options="dict.type.CUSTOMER_TRADE" :value="scope.row.industry" />
  89. </template>
  90. </el-table-column>
  91. <el-table-column label="项目阶段" align="center" prop="projectStage">
  92. <template slot-scope="scope">
  93. <dict-tag :options="dict.type.project_stage" :value="scope.row.projectStage" />
  94. </template>
  95. </el-table-column>
  96. <el-table-column label="项目机会状态" align="center" prop="projectStatus">
  97. <template slot-scope="scope">
  98. <!-- 定义状态文本映射对象 -->
  99. <el-tag :type="{
  100. 0: 'success',
  101. 1: 'danger',
  102. 2: 'warning'
  103. }[scope.row.projectStatus] || 'info'">
  104. {{ {
  105. 0: '正常',
  106. 1: '终止',
  107. 2: '观望'
  108. }[scope.row.projectStatus] || '未知状态' }}
  109. </el-tag>
  110. </template>
  111. </el-table-column>
  112. <el-table-column label="项目负责人" align="center" prop="investHead">
  113. <template slot-scope="scope">
  114. <div :title="scope.row.investHead">
  115. {{ scope.row.investHead }}
  116. </div>
  117. </template>
  118. </el-table-column>
  119. <el-table-column label="终止原因" align="center" prop="reason">
  120. <template slot-scope="scope">
  121. <div :title="scope.row.reason">
  122. {{ scope.row.reason }}
  123. </div>
  124. </template>
  125. </el-table-column>
  126. <!-- delFlag -->
  127. <el-table-column label="状态" align="center" prop="investHead" width="50px">
  128. <template slot-scope="scope">
  129. <div :title="scope.row.delFlag === '1' ? '终止' : '正常'">
  130. {{ scope.row.delFlag === "1" ? "终止" : "正常" }}
  131. </div>
  132. </template>
  133. </el-table-column>
  134. <el-table-column label="申请人" align="center" prop="startUserName">
  135. <template slot-scope="scope">
  136. <div :title="scope.row.startUserName">
  137. {{ scope.row.startUserName }}
  138. </div>
  139. </template>
  140. </el-table-column>
  141. <el-table-column label="申请日期" align="center" prop="createTime">
  142. <template slot-scope="scope">
  143. <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
  144. </template>
  145. </el-table-column>
  146. <el-table-column label="当前节点" align="center" prop="taskName">
  147. <template slot-scope="scope">
  148. <div :title="scope.row.taskName" class="public-text-blue public-cursor" @click="handleReadImage(scope.row)">
  149. {{ scope.row.taskName }}
  150. </div>
  151. </template>
  152. </el-table-column>
  153. <el-table-column label="当前处理人" align="center" prop="assigneeName">
  154. <template slot-scope="scope">
  155. <div :title="scope.row.assigneeName">
  156. {{ scope.row.assigneeName }}
  157. </div>
  158. </template>
  159. </el-table-column>
  160. <el-table-column label="流程状态" align="center" prop="status">
  161. <template slot-scope="scope">
  162. <div :title="scope.row.status">
  163. <span v-if="scope.row.status === 0">暂存</span>
  164. <span v-else-if="scope.row.status === 1">已提交</span>
  165. <span v-else-if="scope.row.status === 2">审批中</span>
  166. <span v-else-if="scope.row.status === 3">审批完成</span>
  167. <span v-else-if="scope.row.status === 4">关闭</span>
  168. </div>
  169. </template>
  170. </el-table-column>
  171. <el-table-column label="操作" align="center" width="150" fixed="right" class-name="small-padding fixed-width">
  172. <template slot-scope="scope">
  173. <el-button type="text" size="mini" @click="handleDetailProcess(scope.row)">详情</el-button>
  174. </template>
  175. </el-table-column>
  176. </el-table>
  177. <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
  178. @pagination="getList" />
  179. </div>
  180. <!-- 会议管理组件 -->
  181. <meetingList :type="'3'" ref="meetingList" :projectId="projectId" @getList="getList"></meetingList>
  182. <!-- 设置项目状态对话框 -->
  183. <businessUpdate @getList="getList" ref="businessUpdate"></businessUpdate>
  184. <!-- Flowable 流程图弹窗 -->
  185. <el-dialog :title="readImage.title" :visible.sync="readImage.open" width="70%" append-to-body>
  186. <!-- <el-image :src="readImage.src"></el-image> -->
  187. <flow :flowData="flowData" />
  188. </el-dialog>
  189. </div>
  190. </template>
  191. <script>
  192. import { getAllTerminationList } from "@/api/project/termination/pool";
  193. import { listChannel } from "@/api/invest/channel";
  194. import { flowXmlAndNode } from "@/api/flowable/definition";
  195. import meetingList from "../meetingList.vue";
  196. import businessUpdate from "../../invest/components/businessUpdate";
  197. import { mapGetters } from "vuex";
  198. export default {
  199. name: "Pool5",
  200. dicts: ["project_group", "project_stage", "project_state", "CUSTOMER_TRADE"],
  201. components: {
  202. meetingList,
  203. businessUpdate,
  204. },
  205. data() {
  206. return {
  207. // 遮罩层
  208. loading: false,
  209. // 选中id数组
  210. ids: [],
  211. idsName: [],
  212. // 非单个禁用
  213. single: true,
  214. // 非多个禁用
  215. multiple: true,
  216. // 选中数组
  217. selectRowList: [],
  218. // 显示搜索条件
  219. showSearch: true,
  220. // 总条数
  221. total: 0,
  222. // 项目池表格数据
  223. poolList: [],
  224. // 查询参数
  225. queryParams: {
  226. id: null,
  227. pageNum: 1,
  228. pageSize: 10,
  229. projectName: null,
  230. projectGroup: "",
  231. projectCode: null,
  232. channel: null,
  233. contactDate: null,
  234. projectDate: null,
  235. decisionDate: null,
  236. industry: null,
  237. company: null,
  238. projectContacts: null,
  239. investHead: null,
  240. previousFinancing: null,
  241. financingStage: null,
  242. financingMoney: null,
  243. financingDate: null,
  244. investValuation: null,
  245. investMoney: null,
  246. investType: null,
  247. investPloy: null,
  248. investWorth: null,
  249. projectStage: null,
  250. projectState: null,
  251. orderByColumn: "createTime",
  252. isAsc: "desc",
  253. createTime: null,
  254. },
  255. channelList: [],
  256. projectId: "",
  257. //流程图信息
  258. readImage: {
  259. open: false,
  260. src: "",
  261. },
  262. // xml
  263. flowData: {},
  264. };
  265. },
  266. computed: {
  267. ...mapGetters(["user"]),
  268. },
  269. created() { },
  270. mounted() {
  271. this.getList();
  272. // 渠道
  273. listChannel({
  274. pageNum: 1,
  275. pageSize: 100,
  276. }).then((response) => {
  277. this.channelList = response.rows;
  278. });
  279. },
  280. methods: {
  281. /** 查询所有项目终止列表 */
  282. getList() {
  283. this.loading = true;
  284. getAllTerminationList(this.queryParams).then((response) => {
  285. this.poolList = response.rows;
  286. this.total = response.total;
  287. this.loading = false;
  288. });
  289. },
  290. /** 搜索按钮操作 */
  291. handleQuery() {
  292. this.queryParams.pageNum = 1;
  293. this.getList();
  294. },
  295. /** 重置按钮操作 */
  296. resetQuery() {
  297. this.resetForm("queryForm");
  298. this.queryParams.orderByColumn = "createTime";
  299. this.queryParams.isAsc = "desc";
  300. this.handleQuery();
  301. },
  302. // 多选框选中数据
  303. handleSelectionChange(selection) {
  304. this.ids = selection.map((item) => item.id);
  305. if (selection.length > 1) {
  306. //移除上一次选中行数据
  307. selection.shift();
  308. //修改选中图标为未选中状态
  309. this.$refs.dataTable.clearSelection();
  310. //将当前选中行改为选中状态
  311. this.$refs.dataTable.toggleRowSelection(selection[0]);
  312. }
  313. this.idsName = selection.map((item) => item.projectName);
  314. this.single = selection.length !== 1;
  315. this.multiple = !selection.length;
  316. this.selectRowList = selection;
  317. },
  318. clickRow(row) {
  319. this.$refs.dataTable.toggleRowSelection(row);
  320. },
  321. /** 新增按钮操作 */
  322. handleAdd() {
  323. // 终止申请
  324. this.$refs.meetingList.showZZApplyPop();
  325. // this.$router.push({ path: "/invest/pool/add" });
  326. },
  327. handleSelectData(type, otherData) {
  328. // type 1=修改 2=详情 3=设置项目阶段 4=终止 5=上传评估意见
  329. // 6=立项申请 7=发起立项会议 8=上传打分表(立项)
  330. // 9=尽调申请 10=上传尽调报告
  331. // 11=投决申请 12=发起投决会议 13=上传打分表(投决)
  332. // 14=终止申请
  333. if (this.selectRowList.length == 1) {
  334. const row = this.selectRowList[0];
  335. // 1.单条数据 2.项目是否终止 3.是否能操作
  336. if (row.delFlag === "1") {
  337. this.$message({
  338. message: "项目已终止",
  339. duration: 1500,
  340. type: "error",
  341. });
  342. } else if (type === 13) {
  343. // 有立项会议
  344. if (row.tProjectMeeting) {
  345. // 参与人
  346. if (
  347. row.tProjectMeeting.participants.indexOf(this.user.nickName) > -1
  348. ) {
  349. // 是否打过分
  350. if (row.tProjectScoring) {
  351. this.$message.warning("您已打分,无需重复操作");
  352. } else {
  353. // 投决-去打分
  354. this.$refs.meetingList.handleMark(
  355. row.tProjectMeeting,
  356. "3",
  357. false
  358. );
  359. }
  360. } else {
  361. this.$message.warning("无权限");
  362. }
  363. } else {
  364. if (row.investHead === this.user.nickName) {
  365. this.$message({
  366. message: "请先发起投决会议",
  367. duration: 1500,
  368. type: "warning",
  369. });
  370. } else {
  371. this.$message.warning("无权限");
  372. }
  373. }
  374. } else if (row.investHead === this.user.nickName) {
  375. if (type === 2) {
  376. // 详情
  377. this.handleDetail(row);
  378. } else if (type === 3) {
  379. // 设置项目阶段
  380. this.$refs.businessUpdate.handleBusinessUpdate(row);
  381. } else if (type === 4) {
  382. this.handleDelete(row);
  383. } else if (type === 14) {
  384. if (row.delFlag === "0") {
  385. // 终止申请
  386. this.$refs.meetingList.showZZApplyPop(row);
  387. } else {
  388. this.$message({
  389. message: "您已发起终止申请,无需重复操作",
  390. duration: 1500,
  391. type: "warning",
  392. });
  393. }
  394. } else if (type === 12) {
  395. // 发起投决会议
  396. this.handleMeeting(row, otherData);
  397. }
  398. } else {
  399. this.$message({
  400. message: "无权限",
  401. duration: 1500,
  402. type: "error",
  403. });
  404. }
  405. } else {
  406. this.$message({
  407. message: "只能选择一条数据",
  408. duration: 1500,
  409. type: "warning",
  410. });
  411. }
  412. },
  413. // 发起会议
  414. handleMeeting(row, meetingType) {
  415. this.$store.commit("SET_PROJECTITEMMESSAGE", row);
  416. this.$refs.meetingList.handleAdd(row.id, meetingType);
  417. },
  418. handleDetail(row) {
  419. const id = row.id || this.ids;
  420. this.$router.push({ path: "/invest/pool/detail", query: { id: id } });
  421. },
  422. /**终止按钮操作 */
  423. handleDelete(row) {
  424. const ids = row.id || this.ids;
  425. const idsName = row.projectName ? row.projectName : this.idsName;
  426. this.$modal
  427. .confirm('是否终止"' + idsName + '"项目?')
  428. .then(function () {
  429. return delPool(ids);
  430. })
  431. .then(() => {
  432. this.getList();
  433. this.$modal.msgSuccess("已终止");
  434. })
  435. .catch(() => { });
  436. },
  437. /** 导出按钮操作 */
  438. handleExport() {
  439. this.download(
  440. "project/termination/export",
  441. {
  442. ...this.queryParams,
  443. },
  444. `termination_${new Date().getTime()}.xlsx`
  445. );
  446. },
  447. /** 流程图查看 */
  448. handleReadImage(row) {
  449. this.readImage.title = "流程图";
  450. this.readImage.open = true;
  451. // this.readImage.src = process.env.VUE_APP_BASE_API + "/flowable/definition/readImage/" + deploymentId;
  452. flowXmlAndNode({ procInsId: row.procInstId, deployId: row.deployId }).then(res => {
  453. this.flowData = res.data;
  454. })
  455. },
  456. /*流程详情*/
  457. handleDetailProcess(row) {
  458. const id = row.id || this.ids;
  459. const poolId = row.projectPoolId;
  460. const pInstId = row.procInstId;
  461. this.$router.push({ path: "/myTask/project/termination/detail", query: { id: poolId, pInstId: pInstId } });
  462. },
  463. },
  464. };
  465. </script>
  466. <style lang="scss" scoped>
  467. .tableWrapper {
  468. font-size: 12px;
  469. color: #000;
  470. ::v-deep .el-table__header-wrapper th {
  471. font-size: 12px;
  472. font-weight: bolder;
  473. color: #000;
  474. }
  475. ::v-deep td.el-table__cell:not(:last-child) div {
  476. text-overflow: -o-ellipsis-lastline;
  477. overflow: hidden;
  478. text-overflow: ellipsis;
  479. display: -webkit-box;
  480. -webkit-line-clamp: 1;
  481. line-clamp: 1;
  482. -webkit-box-orient: vertical;
  483. }
  484. }
  485. /**找到表头那一行,然后把里面的复选框隐藏掉**/
  486. .tableWrapper::v-deep .el-table__header-wrapper .el-table__header .el-checkbox {
  487. display: none;
  488. }
  489. </style>