index3.vue 18 KB

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