applyList.vue 15 KB

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