processList.vue 18 KB

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