index4.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. <template>
  2. <div class="app-container">
  3. <!-- 尽职背调 -->
  4. <el-form
  5. :model="queryParams"
  6. ref="queryForm"
  7. size="small"
  8. :inline="true"
  9. v-show="showSearch"
  10. label-width="90px"
  11. style="margin-left: -22px"
  12. >
  13. <el-form-item label="项目名称" prop="projectName">
  14. <el-input
  15. v-model.trim="queryParams.projectName"
  16. placeholder="请输入项目名称"
  17. clearable
  18. @keyup.enter.native="handleQuery"
  19. />
  20. </el-form-item>
  21. <el-form-item label="项目负责人" prop="investHead">
  22. <el-input
  23. v-model.trim="queryParams.investHead"
  24. placeholder="请输入项目负责人"
  25. clearable
  26. @keyup.enter.native="handleQuery"
  27. />
  28. </el-form-item>
  29. <el-form-item label="公司联系人" prop="projectContacts">
  30. <el-input
  31. v-model.trim="queryParams.projectContacts"
  32. placeholder="请输入公司联系人"
  33. clearable
  34. @keyup.enter.native="handleQuery"
  35. />
  36. </el-form-item>
  37. <el-form-item label="渠道" prop="channel">
  38. <el-select v-model="queryParams.channel" placeholder="全部" clearable>
  39. <el-option
  40. v-for="item in channelList"
  41. :key="item.id"
  42. :label="item.channelName"
  43. :value="item.id"
  44. />
  45. <el-option
  46. label="无"
  47. value="-1"
  48. />
  49. </el-select>
  50. </el-form-item>
  51. <el-form-item label="所属组别" prop="projectGroup">
  52. <el-select
  53. v-model="queryParams.projectGroup"
  54. placeholder="全部"
  55. clearable
  56. >
  57. <el-option
  58. v-for="dict in dict.type.project_group"
  59. :key="dict.value"
  60. :label="dict.label"
  61. :value="dict.value"
  62. />
  63. </el-select>
  64. </el-form-item>
  65. <el-form-item label="项目公司" prop="company">
  66. <el-input
  67. v-model.trim="queryParams.company"
  68. placeholder="请输入项目所属公司"
  69. clearable
  70. @keyup.enter.native="handleQuery"
  71. />
  72. </el-form-item>
  73. <el-form-item class="searchWrapper">
  74. <el-button
  75. type="primary"
  76. icon="el-icon-search"
  77. size="mini"
  78. @click="handleQuery"
  79. >搜索</el-button
  80. >
  81. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  82. >重置</el-button
  83. >
  84. </el-form-item>
  85. </el-form>
  86. <el-row :gutter="10" class="mb8">
  87. <el-col :span="1.5">
  88. <el-button
  89. plain
  90. :disabled="multiple"
  91. type="warning"
  92. size="mini"
  93. icon="el-icon-tickets"
  94. @click="handleSelectData(9)"
  95. v-hasPermi="['invest:pool:due']"
  96. >尽调申请</el-button
  97. >
  98. </el-col>
  99. <el-col :span="1.5">
  100. <el-button
  101. plain
  102. :disabled="multiple"
  103. type="primary"
  104. size="mini"
  105. icon="el-icon-document-checked"
  106. @click="handleSelectData(10)"
  107. >上传尽调报告</el-button
  108. >
  109. </el-col>
  110. <el-col :span="1.5">
  111. <el-button
  112. :disabled="multiple"
  113. plain
  114. type="success"
  115. size="mini"
  116. icon="el-icon-setting"
  117. v-hasPermi="['invest:pool:stage']"
  118. @click="handleSelectData(3)"
  119. >设置项目阶段</el-button
  120. >
  121. </el-col>
  122. <el-col :span="1.5">
  123. <el-button
  124. @click="handleSelectData(4)"
  125. type="danger"
  126. plain
  127. icon="el-icon-switch-button"
  128. size="mini"
  129. :disabled="multiple"
  130. v-hasPermi="['invest:pool:remove']"
  131. >终止</el-button
  132. >
  133. </el-col>
  134. <right-toolbar
  135. :showSearch.sync="showSearch"
  136. @queryTable="getList"
  137. ></right-toolbar>
  138. </el-row>
  139. <el-table
  140. ref="dataTable"
  141. @row-click="clickRow"
  142. class="tableWrapper"
  143. v-loading="loading"
  144. border
  145. :data="poolList"
  146. @selection-change="handleSelectionChange"
  147. >
  148. <el-table-column type="selection" width="40" align="center" />
  149. <el-table-column
  150. type="index"
  151. label="序号"
  152. width="50"
  153. align="center"
  154. ></el-table-column>
  155. <!-- <el-table-column label="主键id" align="center" prop="id" /> -->
  156. <el-table-column label="项目名称" align="center" prop="projectName">
  157. <template slot-scope="scope">
  158. <div
  159. :title="scope.row.projectName"
  160. class="public-text-blue public-cursor"
  161. @click.stop="handleDetail(scope.row)"
  162. >
  163. {{ scope.row.projectName }}
  164. </div>
  165. </template>
  166. </el-table-column>
  167. <el-table-column
  168. label="公司名称"
  169. align="center"
  170. prop="tProjectCompany.companyName"
  171. >
  172. <template slot-scope="scope">
  173. <div :title="scope.row.tProjectCompany.companyName">
  174. {{ scope.row.tProjectCompany.companyName }}
  175. </div>
  176. </template>
  177. </el-table-column>
  178. <el-table-column
  179. label="项目所属城市"
  180. align="center"
  181. prop="tProjectCompany.registeredAddress"
  182. >
  183. <template slot-scope="scope">
  184. <div :title="scope.row.tProjectCompany.registeredAddress">
  185. {{ scope.row.tProjectCompany.registeredAddress }}
  186. </div>
  187. </template>
  188. </el-table-column>
  189. <el-table-column label="所属行业" align="center" prop="industry"
  190. ><template slot-scope="scope">
  191. <dict-tag
  192. :options="dict.type.CUSTOMER_TRADE"
  193. :value="scope.row.industry"
  194. />
  195. </template>
  196. </el-table-column>
  197. <el-table-column label="项目阶段" align="center" prop="projectStage">
  198. <template slot-scope="scope">
  199. <dict-tag
  200. :options="dict.type.project_stage"
  201. :value="scope.row.projectStage"
  202. />
  203. </template>
  204. </el-table-column>
  205. <!-- <el-table-column label="项目状态" align="center" prop="projectState">
  206. <template slot-scope="scope">
  207. <dict-tag
  208. :options="dict.type.project_state"
  209. :value="scope.row.projectState"
  210. />
  211. </template>
  212. </el-table-column> -->
  213. <el-table-column
  214. label="备案时间"
  215. align="center"
  216. prop="tProjectCompany.filingTime"
  217. >
  218. <template slot-scope="scope">
  219. <span>{{
  220. parseTime(scope.row.tProjectCompany.filingTime, "{y}-{m}-{d}")
  221. }}</span>
  222. </template>
  223. </el-table-column>
  224. <el-table-column label="立项通过日期" align="center" prop="projectDate">
  225. <template slot-scope="scope">
  226. <span>{{ parseTime(scope.row.projectDate, "{y}-{m}-{d}") }}</span>
  227. </template>
  228. </el-table-column>
  229. <el-table-column
  230. label="已发起尽调申请"
  231. align="center"
  232. prop="investigateFlag"
  233. >
  234. <template slot-scope="scope">
  235. <div>
  236. {{ scope.row.investigateFlag === "1" ? "是" : "否" }}
  237. </div>
  238. </template>
  239. </el-table-column>
  240. <!-- <el-table-column label="投决通过日期" align="center" prop="decisionDate">
  241. <template slot-scope="scope">
  242. <span>{{ parseTime(scope.row.decisionDate, "{y}-{m}-{d}") }}</span>
  243. </template>
  244. </el-table-column> -->
  245. <el-table-column label="项目负责人" align="center" prop="investHead">
  246. <template slot-scope="scope">
  247. <div :title="scope.row.investHead">
  248. {{ scope.row.investHead }}
  249. </div>
  250. </template>
  251. </el-table-column>
  252. <!-- <el-table-column label="项目编号" align="center" prop="projectCode" /> -->
  253. <el-table-column
  254. label="渠道"
  255. align="center"
  256. prop="tProjectChannel.channelName"
  257. >
  258. <template slot-scope="scope">
  259. <div
  260. v-if="
  261. scope.row.tProjectChannel && scope.row.tProjectChannel.channelName
  262. "
  263. :title="scope.row.tProjectChannel.channelName"
  264. >
  265. {{ scope.row.tProjectChannel.channelName }}
  266. </div>
  267. </template>
  268. </el-table-column>
  269. <!-- <el-table-column
  270. label="所属组别"
  271. align="center"
  272. prop="tProjectChannel.channelGroup"
  273. >
  274. <template slot-scope="scope">
  275. <dict-tag
  276. :options="dict.type.project_group"
  277. :value="scope.row.tProjectChannel.channelGroup"
  278. />
  279. </template>
  280. </el-table-column> -->
  281. <!-- <el-table-column
  282. label="项目联系人"
  283. align="center"
  284. prop="tProjectContacts.name"
  285. >
  286. <template slot-scope="scope">
  287. <div :title="scope.row.tProjectContacts.name">
  288. {{ scope.row.tProjectContacts.name }}
  289. </div>
  290. </template>
  291. </el-table-column> -->
  292. <!--<el-table-column
  293. label="创建人"
  294. width="120"
  295. align="center"
  296. prop="createBy"
  297. />
  298. <el-table-column
  299. label="创建时间"
  300. align="center"
  301. prop="createTime"
  302. width="160"
  303. /> -->
  304. <!-- delFlag -->
  305. <el-table-column
  306. label="状态"
  307. align="center"
  308. prop="investHead"
  309. width="50px"
  310. >
  311. <template slot-scope="scope">
  312. <div :title="scope.row.delFlag === '1' ? '终止' : '正常'">
  313. {{ scope.row.delFlag === "1" ? "终止" : "正常" }}
  314. </div>
  315. </template>
  316. </el-table-column>
  317. </el-table>
  318. <pagination
  319. v-show="total > 0"
  320. :total="total"
  321. :page.sync="queryParams.pageNum"
  322. :limit.sync="queryParams.pageSize"
  323. @pagination="getList"
  324. />
  325. <!-- 尽调组件 -->
  326. <dueDiligenceList
  327. ref="dueDiligenceLists"
  328. :projectId="projectId"
  329. @getList="getList"
  330. ></dueDiligenceList>
  331. <!-- 设置项目状态对话框 -->
  332. <businessUpdate @getList="getList" ref="businessUpdate"></businessUpdate>
  333. </div>
  334. </template>
  335. <script>
  336. import {
  337. listInvestigateList,
  338. delPool,
  339. editStage,
  340. addInvestigate,
  341. } from "@/api/invest/pool";
  342. import { selectByFlowKey } from "@/api/flowable/definition";
  343. import { listChannel } from "@/api/invest/channel";
  344. import dueDiligenceList from "../components/dueDiligenceList";
  345. import businessUpdate from "../components/businessUpdate";
  346. import { mapGetters } from "vuex";
  347. export default {
  348. name: "Pool4",
  349. dicts: ["project_group", "project_stage", "project_state", "CUSTOMER_TRADE"],
  350. components: {
  351. dueDiligenceList,
  352. businessUpdate,
  353. },
  354. data() {
  355. return {
  356. projectId: "",
  357. // 遮罩层
  358. loading: false,
  359. // 选中id数组
  360. ids: [],
  361. idsName: [],
  362. // 非单个禁用
  363. single: true,
  364. // 非多个禁用
  365. multiple: true,
  366. // 选中数组
  367. selectRowList: [],
  368. // 显示搜索条件
  369. showSearch: false,
  370. // 总条数
  371. total: 0,
  372. // 项目池表格数据
  373. poolList: [],
  374. // 查询参数
  375. queryParams: {
  376. id: null,
  377. pageNum: 1,
  378. pageSize: 10,
  379. projectName: null,
  380. projectGroup: "",
  381. projectCode: null,
  382. channel: null,
  383. contactDate: null,
  384. projectDate: null,
  385. decisionDate: null,
  386. industry: null,
  387. company: null,
  388. projectContacts: null,
  389. investHead: null,
  390. previousFinancing: null,
  391. financingStage: null,
  392. financingMoney: null,
  393. financingDate: null,
  394. investValuation: null,
  395. investMoney: null,
  396. investType: null,
  397. investPloy: null,
  398. investWorth: null,
  399. projectStage: null,
  400. projectState: null,
  401. orderByColumn: "createTime",
  402. isAsc: "desc",
  403. createTime: null,
  404. },
  405. channelList: [],
  406. };
  407. },
  408. computed: {
  409. ...mapGetters(["user"]),
  410. },
  411. created() {},
  412. mounted() {
  413. this.getList();
  414. // 渠道
  415. listChannel({
  416. pageNum: 1,
  417. pageSize: 100,
  418. }).then((response) => {
  419. this.channelList = response.rows;
  420. });
  421. },
  422. methods: {
  423. /** 查询项目池列表 */
  424. getList() {
  425. this.loading = true;
  426. listInvestigateList(this.queryParams).then((response) => {
  427. this.poolList = response.rows;
  428. this.total = response.total;
  429. this.loading = false;
  430. });
  431. },
  432. /** 搜索按钮操作 */
  433. handleQuery() {
  434. this.queryParams.pageNum = 1;
  435. this.getList();
  436. },
  437. /** 重置按钮操作 */
  438. resetQuery() {
  439. this.resetForm("queryForm");
  440. this.queryParams.orderByColumn = "createTime";
  441. this.queryParams.isAsc = "desc";
  442. this.handleQuery();
  443. },
  444. // 多选框选中数据
  445. handleSelectionChange(selection) {
  446. this.ids = selection.map((item) => item.id);
  447. if (selection.length > 1) {
  448. //移除上一次选中行数据
  449. selection.shift();
  450. //修改选中图标为未选中状态
  451. this.$refs.dataTable.clearSelection();
  452. //将当前选中行改为选中状态
  453. this.$refs.dataTable.toggleRowSelection(selection[0]);
  454. }
  455. this.idsName = selection.map((item) => item.projectName);
  456. this.single = selection.length !== 1;
  457. this.multiple = !selection.length;
  458. this.selectRowList = selection;
  459. },
  460. clickRow(row) {
  461. this.$refs.dataTable.toggleRowSelection(row);
  462. },
  463. /** 新增按钮操作 */
  464. handleAdd() {
  465. this.$router.push({ path: "/invest/pool/add" });
  466. },
  467. handleSelectData(type, otherData) {
  468. // type 1=修改 2=详情 3=设置项目阶段 4=终止 5=上传评估意见
  469. // 6=立项申请 7=发起立项会议 8=上传打分表(立项)
  470. // 9=尽调申请 10=上传尽调报告
  471. // 11=投决申请 12=发起投决会议 13=上传打分表(投决)
  472. if (this.selectRowList.length == 1) {
  473. const row = this.selectRowList[0];
  474. // 1.单条数据 2.项目是否终止 3.是否能操作
  475. if (row.delFlag === "1") {
  476. this.$message({
  477. message: "项目已终止",
  478. duration: 1500,
  479. type: "error",
  480. });
  481. } else if (type === 10) {
  482. // 是否有尽调申请
  483. if (row.investigateFlag === "1") {
  484. // 是否被选为参与人
  485. if (
  486. row.tProjectInvestigate &&
  487. row.tProjectInvestigate.investigatePerson.indexOf(
  488. this.user.nickName
  489. ) > -1
  490. ) {
  491. //是否上传了尽调报告
  492. if (!row.tProjectInvestigatePerson) {
  493. // 上传尽调报告
  494. this.$refs.dueDiligenceLists.handleShowReportPop(row);
  495. } else {
  496. this.$message({
  497. message: "您已上传尽调报告,无需重复操作",
  498. duration: 1500,
  499. type: "warning",
  500. });
  501. }
  502. } else {
  503. this.$message({
  504. message: "无权限",
  505. duration: 1500,
  506. type: "error",
  507. });
  508. }
  509. } else {
  510. if (row.investHead === this.user.nickName) {
  511. this.$message({
  512. message: "请先尽调申请",
  513. duration: 1500,
  514. type: "warning",
  515. });
  516. } else {
  517. this.$message.warning("无权限");
  518. }
  519. }
  520. } else if (row.investHead === this.user.nickName) {
  521. // 未终止
  522. if (type === 2) {
  523. // 详情
  524. this.handleDetail(row);
  525. } else if (type === 3) {
  526. // 设置项目阶段
  527. this.$refs.businessUpdate.handleBusinessUpdate(row);
  528. } else if (type === 4) {
  529. this.handleDelete(row);
  530. } else if (type === 9) {
  531. // 是否有尽调申请
  532. if (row.investigateFlag === "0") {
  533. // 尽调申请
  534. this.$refs.dueDiligenceLists.handleShowApplyPop(row);
  535. } else {
  536. this.$message({
  537. message: "您已发起尽调申请,无需重复操作",
  538. duration: 1500,
  539. type: "warning",
  540. });
  541. }
  542. }
  543. } else {
  544. this.$message({
  545. message: "无权限",
  546. duration: 1500,
  547. type: "error",
  548. });
  549. }
  550. } else {
  551. this.$message({
  552. message: "只能选择一条数据",
  553. duration: 1500,
  554. type: "warning",
  555. });
  556. }
  557. },
  558. handleDetail(row) {
  559. const id = row.id || this.ids;
  560. this.$router.push({ path: "/invest/pool/detail", query: { id: id } });
  561. },
  562. /** 修改按钮操作 */
  563. handleUpdate(row) {
  564. const id = row.id;
  565. this.$router.push({ path: "/invest/pool/add", query: { id: id } });
  566. },
  567. /**终止按钮操作 */
  568. handleDelete(row) {
  569. const ids = row.id || this.ids;
  570. const idsName = row.projectName ? row.projectName : this.idsName;
  571. this.$modal
  572. .confirm('是否终止"' + idsName + '"项目?')
  573. .then(function () {
  574. return delPool(ids);
  575. })
  576. .then(() => {
  577. this.getList();
  578. this.$modal.msgSuccess("已终止");
  579. })
  580. .catch(() => {});
  581. },
  582. /** 导出按钮操作 */
  583. handleExport() {
  584. this.download(
  585. "invest/pool/export",
  586. {
  587. ...this.queryParams,
  588. },
  589. `pool_${new Date().getTime()}.xlsx`
  590. );
  591. },
  592. },
  593. };
  594. </script>
  595. <style lang="scss" scoped>
  596. .tableWrapper {
  597. font-size: 12px;
  598. color: #000;
  599. ::v-deep .el-table__header-wrapper th {
  600. font-size: 12px;
  601. font-weight: bolder;
  602. color: #000;
  603. }
  604. ::v-deep td.el-table__cell:not(:last-child) div {
  605. text-overflow: -o-ellipsis-lastline;
  606. overflow: hidden;
  607. text-overflow: ellipsis;
  608. display: -webkit-box;
  609. -webkit-line-clamp: 1;
  610. line-clamp: 1;
  611. -webkit-box-orient: vertical;
  612. }
  613. }
  614. /**找到表头那一行,然后把里面的复选框隐藏掉**/
  615. .tableWrapper::v-deep .el-table__header-wrapper .el-table__header .el-checkbox {
  616. display: none;
  617. }
  618. </style>