index4.vue 17 KB

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