watchList.vue 16 KB

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