applyList.vue 16 KB

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