applyList.vue 17 KB

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