processList.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659
  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 label="直接触达" value="1" />
  46. <el-option label="内部推荐" value="2" />
  47. <!-- <el-option label="无" value="-1"/>-->
  48. </el-select>
  49. </el-form-item>
  50. <el-form-item label="所属组别" prop="projectGroup">
  51. <el-select
  52. v-model="queryParams.projectGroup"
  53. placeholder="全部"
  54. clearable
  55. >
  56. <el-option
  57. v-for="dict in dict.type.project_group"
  58. :key="dict.value"
  59. :label="dict.label"
  60. :value="dict.value"
  61. />
  62. </el-select>
  63. </el-form-item>
  64. <el-form-item label="项目公司" prop="company">
  65. <el-input
  66. v-model.trim="queryParams.company"
  67. placeholder="请输入项目所属公司"
  68. clearable
  69. @keyup.enter.native="handleQuery"
  70. />
  71. </el-form-item>
  72. <el-form-item label="流程状态" prop="status">
  73. <!-- el-select 绑定表单字段 -->
  74. <el-select v-model="queryParams.status" placeholder="请选择" clearable>
  75. <!-- 静态选项 -->
  76. <el-option label="暂存" value="0"></el-option>
  77. <el-option label="已提交" value="1"></el-option>
  78. <el-option label="审批中" value="2"></el-option>
  79. <el-option label="审核完成" value="3"></el-option>
  80. <el-option label="关闭" value="4"></el-option>
  81. </el-select>
  82. </el-form-item>
  83. <el-form-item class="searchWrapper">
  84. <el-button
  85. type="primary"
  86. icon="el-icon-search"
  87. size="mini"
  88. @click="handleQuery"
  89. >搜索</el-button
  90. >
  91. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  92. >重置</el-button
  93. >
  94. </el-form-item>
  95. </el-form>
  96. <el-row :gutter="10" class="mb8">
  97. <!-- <el-col :span="1.5">
  98. <el-button
  99. plain
  100. type="warning"
  101. size="mini"
  102. icon="el-icon-document"
  103. @click="handleAdd"
  104. >项目机会申请</el-button
  105. >
  106. </el-col>-->
  107. <el-col :span="1.5">
  108. <el-button
  109. type="warning"
  110. plain
  111. icon="el-icon-download"
  112. size="mini"
  113. @click="handleExport"
  114. >导出</el-button>
  115. </el-col>
  116. <right-toolbar
  117. :showSearch.sync="showSearch"
  118. @queryTable="getList"
  119. ></right-toolbar>
  120. </el-row>
  121. <el-table
  122. ref="dataTable"
  123. @row-click="clickRow"
  124. class="tableWrapper"
  125. v-loading="loading"
  126. border
  127. :data="poolList"
  128. @selection-change="handleSelectionChange"
  129. >
  130. <!-- <el-table-column type="selection" width="40" align="center" /> -->
  131. <el-table-column
  132. type="index"
  133. label="序号"
  134. width="50"
  135. align="center"
  136. ></el-table-column>
  137. <!-- <el-table-column label="主键id" align="center" prop="id" /> -->
  138. <!-- <el-table-column label="项目名称" align="center" prop="projectName">
  139. <template slot-scope="scope">
  140. <div
  141. :title="scope.row.projectName"
  142. class="public-text-blue public-cursor"
  143. @click.stop="handleDetail(scope.row)"
  144. >
  145. {{ scope.row.projectName }}
  146. </div>
  147. </template>
  148. </el-table-column>-->
  149. <el-table-column label="项目名称" align="center" prop="projectName">
  150. <template slot-scope="scope">
  151. <div :title="scope.row.projectName">
  152. {{ scope.row.projectName }}
  153. </div>
  154. </template>
  155. </el-table-column>
  156. <el-table-column
  157. label="公司名称"
  158. align="center"
  159. prop="tProjectCompany.companyName"
  160. >
  161. <template slot-scope="scope">
  162. <div :title="scope.row.tProjectCompany.companyName">
  163. {{ scope.row.tProjectCompany.companyName }}
  164. </div>
  165. </template>
  166. </el-table-column>
  167. <el-table-column
  168. label="项目所属城市"
  169. align="center"
  170. prop="tProjectCompany.registeredAddress"
  171. >
  172. <template slot-scope="scope">
  173. <div :title="scope.row.tProjectCompany.registeredAddress">
  174. {{ scope.row.tProjectCompany.registeredAddress }}
  175. </div>
  176. </template>
  177. </el-table-column>
  178. <el-table-column label="所属行业" align="center" prop="industry"
  179. ><template slot-scope="scope">
  180. <dict-tag
  181. :options="dict.type.CUSTOMER_TRADE"
  182. :value="scope.row.industry"
  183. />
  184. </template>
  185. </el-table-column>
  186. <el-table-column label="项目阶段" align="center" prop="projectStage">
  187. <template slot-scope="scope">
  188. <dict-tag
  189. :options="dict.type.project_stage"
  190. :value="scope.row.projectStage"
  191. />
  192. </template>
  193. </el-table-column>
  194. <el-table-column label="项目机会状态" align="center" prop="projectStatus">
  195. <template slot-scope="scope">
  196. <!-- 定义状态文本映射对象 -->
  197. <el-tag
  198. :type="{
  199. 0: 'success',
  200. 1: 'danger',
  201. 2: 'warning'
  202. }[scope.row.projectStatus] || 'info'"
  203. >
  204. {{ {
  205. 0: '正常',
  206. 1: '终止',
  207. 2: '观望'
  208. }[scope.row.projectStatus] || '未知状态' }}
  209. </el-tag>
  210. </template>
  211. </el-table-column>
  212. <!-- <el-table-column
  213. label="项目状态"
  214. align="center"
  215. prop="projectState"
  216. width="120"
  217. >
  218. <template slot-scope="scope">
  219. <dict-tag
  220. :options="dict.type.project_state"
  221. :value="scope.row.projectState"
  222. />
  223. </template>
  224. </el-table-column>-->
  225. <el-table-column
  226. label="备案时间"
  227. align="center"
  228. prop="tProjectCompany.filingTime"
  229. >
  230. <template slot-scope="scope">
  231. <span>{{
  232. parseTime(scope.row.tProjectCompany.filingTime, "{y}-{m}-{d}")
  233. }}</span>
  234. </template>
  235. </el-table-column>
  236. <el-table-column label="项目负责人" align="center" prop="investHead">
  237. <template slot-scope="scope">
  238. <div :title="scope.row.investHead">
  239. {{ scope.row.investHead }}
  240. </div>
  241. </template>
  242. </el-table-column>
  243. <el-table-column
  244. label="渠道"
  245. align="center"
  246. prop="tProjectChannel.channelName"
  247. >
  248. <template slot-scope="scope">
  249. <div
  250. v-if="
  251. scope.row.tProjectChannel && scope.row.tProjectChannel.channelName
  252. "
  253. :title="scope.row.tProjectChannel.channelName"
  254. >
  255. {{ scope.row.tProjectChannel.channelName }}
  256. </div>
  257. <div v-else-if="scope.row.channel=='1'" >
  258. 直接触达
  259. </div>
  260. <div v-else="scope.row.channel=='2'" >
  261. 内部推荐
  262. </div>
  263. </template>
  264. </el-table-column>
  265. <!-- delFlag -->
  266. <el-table-column
  267. label="状态"
  268. align="center"
  269. prop="investHead"
  270. width="50px"
  271. >
  272. <template slot-scope="scope">
  273. <div :title="scope.row.delFlag === '1' ? '终止' : '正常'">
  274. {{ scope.row.delFlag === "1" ? "终止" : "正常" }}
  275. </div>
  276. </template>
  277. </el-table-column>
  278. <el-table-column label="申请人" align="center" prop="startUserName">
  279. <template slot-scope="scope">
  280. <div :title="scope.row.startUserName">
  281. {{ scope.row.startUserName }}
  282. </div>
  283. </template>
  284. </el-table-column>
  285. <el-table-column label="申请日期" align="center" prop="createTime">
  286. <template slot-scope="scope">
  287. <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
  288. </template>
  289. </el-table-column>
  290. <el-table-column label="当前节点" align="center" prop="taskName">
  291. <template slot-scope="scope">
  292. <div :title="scope.row.taskName" class="public-text-blue public-cursor" @click="handleReadImage(scope.row)">
  293. {{ scope.row.taskName}}
  294. </div>
  295. </template>
  296. </el-table-column>
  297. <el-table-column label="当前处理人" align="center" prop="assigneeName">
  298. <template slot-scope="scope">
  299. <div :title="scope.row.assigneeName">
  300. {{ scope.row.assigneeName}}
  301. </div>
  302. </template>
  303. </el-table-column>
  304. <el-table-column label="流程状态" align="center" prop="status">
  305. <template slot-scope="scope">
  306. <div :title="scope.row.status">
  307. <span v-if="scope.row.status === 0">暂存</span>
  308. <span v-else-if="scope.row.status === 1">已提交</span>
  309. <span v-else-if="scope.row.status === 2">审批中</span>
  310. <span v-else-if="scope.row.status === 3">审批完成</span>
  311. <span v-else-if="scope.row.status === 4">关闭</span>
  312. </div>
  313. </template>
  314. </el-table-column>
  315. <el-table-column label="操作" align="center" width="150" fixed="right" class-name="small-padding fixed-width">
  316. <template slot-scope="scope">
  317. <el-button type="text" size="mini" @click="handleDetailProcess(scope.row)">详情</el-button>
  318. </template>
  319. </el-table-column>
  320. </el-table>
  321. <pagination
  322. v-show="total > 0"
  323. :total="total"
  324. :page.sync="queryParams.pageNum"
  325. :limit.sync="queryParams.pageSize"
  326. @pagination="getList"
  327. />
  328. <!-- 会议管理组件 -->
  329. <meetingList
  330. :type="'3'"
  331. ref="meetingList"
  332. :projectId="projectId"
  333. @getList="getList"
  334. ></meetingList>
  335. <!-- 设置项目状态对话框 -->
  336. <businessUpdate @getList="getList" ref="businessUpdate"></businessUpdate>
  337. <!-- Flowable 流程图弹窗 -->
  338. <el-dialog :title="readImage.title" :visible.sync="readImage.open" width="70%" append-to-body>
  339. <flow :flowData="flowData"/>
  340. </el-dialog>
  341. </div>
  342. </template>
  343. <script>
  344. import { getAllInvestOppList } from "@/api/project/investOpp/pool";
  345. import { listChannel } from "@/api/invest/channel";
  346. import { flowXmlAndNode } from "@/api/flowable/definition";
  347. import meetingList from "../meetingList";
  348. import businessUpdate from "../../invest/components/businessUpdate";
  349. import { mapGetters } from "vuex";
  350. export default {
  351. name: "apply",
  352. dicts: ["project_group", "project_stage", "project_state", "CUSTOMER_TRADE"],
  353. components: {
  354. meetingList,
  355. businessUpdate,
  356. },
  357. data() {
  358. return {
  359. // 遮罩层
  360. loading: false,
  361. // 选中id数组
  362. ids: [],
  363. idsName: [],
  364. // 非单个禁用
  365. single: true,
  366. // 非多个禁用
  367. multiple: true,
  368. // 选中数组
  369. selectRowList: [],
  370. // 显示搜索条件
  371. showSearch: false,
  372. // 总条数
  373. total: 0,
  374. // 项目池表格数据
  375. poolList: [],
  376. // 查询参数
  377. queryParams: {
  378. id: null,
  379. pageNum: 1,
  380. pageSize: 10,
  381. projectName: null,
  382. projectGroup: "",
  383. projectCode: null,
  384. channel: null,
  385. contactDate: null,
  386. projectDate: null,
  387. decisionDate: null,
  388. industry: null,
  389. company: null,
  390. projectContacts: null,
  391. investHead: null,
  392. previousFinancing: null,
  393. financingStage: null,
  394. financingMoney: null,
  395. financingDate: null,
  396. investValuation: null,
  397. investMoney: null,
  398. investType: null,
  399. investPloy: null,
  400. investWorth: null,
  401. projectStage: null,
  402. projectState: null,
  403. orderByColumn: "createTime",
  404. isAsc: "desc",
  405. createTime: null,
  406. status:"",
  407. },
  408. channelList: [],
  409. projectId: "",
  410. //流程图信息
  411. readImage:{
  412. open: false,
  413. src: "",
  414. },
  415. // xml
  416. flowData: {},
  417. };
  418. },
  419. computed: {
  420. ...mapGetters(["user"]),
  421. },
  422. created() {
  423. this.getList();
  424. },
  425. mounted() {
  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. getAllInvestOppList(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. // 立项申请
  478. // this.$refs.meetingList.showLXApplyPop();
  479. this.$router.push({ path: "/project/investOpp/apply" });
  480. },
  481. handleSelectData(type, otherData) {
  482. // type 1=修改 2=详情 3=设置项目阶段 4=终止 5=上传评估意见
  483. // 6=立项申请 7=发起立项会议 8=上传打分表(立项)
  484. // 9=尽调申请 10=上传尽调报告
  485. // 11=投决申请 12=发起投决会议 13=上传打分表(投决)
  486. if (this.selectRowList.length == 1) {
  487. const row = this.selectRowList[0];
  488. // 1.单条数据 2.项目是否终止 3.是否能操作
  489. if (row.delFlag === "1") {
  490. this.$message({
  491. message: "项目已终止",
  492. duration: 1500,
  493. type: "error",
  494. });
  495. } else if (type === 8) {
  496. // 有立项会议
  497. if (row.tProjectMeeting) {
  498. // 参与人
  499. if (
  500. row.tProjectMeeting.participants.indexOf(this.user.nickName) > -1
  501. ) {
  502. // 是否打过分
  503. if (row.tProjectScoring) {
  504. this.$message.warning("您已打分,无需重复操作");
  505. } else {
  506. // 立项-去打分
  507. this.$refs.meetingList.handleMark(row.tProjectMeeting, "1", false);
  508. }
  509. } else {
  510. this.$message.warning("无权限");
  511. }
  512. } else {
  513. if (row.investHead === this.user.nickName) {
  514. this.$message({
  515. message: "请先发起立项会议",
  516. duration: 1500,
  517. type: "warning",
  518. });
  519. } else {
  520. this.$message.warning("无权限");
  521. }
  522. }
  523. } else if (row.investHead === this.user.nickName) {
  524. // 项目负责人
  525. if (type === 2) {
  526. // 详情
  527. this.handleDetail(row);
  528. } else if (type === 3) {
  529. // 设置项目阶段
  530. this.$refs.businessUpdate.handleBusinessUpdate(row);
  531. } else if (type === 4) {
  532. this.handleDelete(row);
  533. } else if (type === 6) {
  534. if (row.approvalFlag === "0") {
  535. // 立项申请
  536. this.$refs.meetingList.showLXApplyPop(row);
  537. } else {
  538. this.$message({
  539. message: "您已发起立项申请,无需重复操作",
  540. duration: 1500,
  541. type: "warning",
  542. });
  543. }
  544. } else if (type === 7) {
  545. if (row.approvalFlag === "1") {
  546. // 发起立项会议
  547. this.handleMeeting(row, otherData);
  548. } else {
  549. this.$message({
  550. message: "请先立项申请",
  551. duration: 1500,
  552. type: "warning",
  553. });
  554. }
  555. }
  556. } else {
  557. this.$message({
  558. message: "无权限",
  559. duration: 1500,
  560. type: "error",
  561. });
  562. }
  563. } else {
  564. this.$message({
  565. message: "只能选择一条数据",
  566. duration: 1500,
  567. type: "warning",
  568. });
  569. }
  570. },
  571. handleDetail(row) {
  572. const id = row.id || this.ids;
  573. this.$router.push({ path: "/invest/pool/detail", query: { id: id } });
  574. },
  575. /** 修改按钮操作 */
  576. handleUpdate(row) {
  577. const id = row.id;
  578. this.$router.push({ path: "/invest/pool/add", query: { id: id } });
  579. },
  580. // 发起会议
  581. handleMeeting(row, meetingType) {
  582. this.$store.commit("SET_PROJECTITEMMESSAGE", row);
  583. this.$refs.meetingList.handleAdd(row.id, meetingType);
  584. },
  585. /**终止按钮操作 */
  586. handleDelete(row) {
  587. const ids = row.id || this.ids;
  588. const idsName = row.projectName ? row.projectName : this.idsName;
  589. this.$modal
  590. .confirm('是否终止"' + idsName + '"项目?')
  591. .then(function () {
  592. return delPool(ids);
  593. })
  594. .then(() => {
  595. this.getList();
  596. this.$modal.msgSuccess("已终止");
  597. })
  598. .catch(() => {});
  599. },
  600. /** 导出按钮操作 */
  601. handleExport() {
  602. this.download(
  603. "project/investmentOpportunity/export",
  604. {
  605. ...this.queryParams,
  606. },
  607. `investOpp_${new Date().getTime()}.xlsx`
  608. );
  609. },
  610. /** 流程图查看 */
  611. handleReadImage(row){
  612. this.readImage.title = "流程图";
  613. this.readImage.open = true;
  614. // this.readImage.src = process.env.VUE_APP_BASE_API + "/flowable/definition/readImage/" + deploymentId;
  615. flowXmlAndNode({procInsId: row.procInstId,deployId:row.deployId}).then(res => {
  616. this.flowData = res.data;
  617. })
  618. },
  619. /*流程详情*/
  620. handleDetailProcess(row) {
  621. const id = row.id || this.ids;
  622. const pInstId=row.procInstId;
  623. this.$router.push({ path: "/project/investOpp/detail", query: { id: id , pInstId: pInstId } });
  624. },
  625. },
  626. };
  627. </script>
  628. <style lang="scss" scoped>
  629. .tableWrapper {
  630. font-size: 12px;
  631. color: #000;
  632. ::v-deep .el-table__header-wrapper th {
  633. font-size: 12px;
  634. font-weight: bolder;
  635. color: #000;
  636. }
  637. ::v-deep td.el-table__cell:not(:last-child) div {
  638. text-overflow: -o-ellipsis-lastline;
  639. overflow: hidden;
  640. text-overflow: ellipsis;
  641. display: -webkit-box;
  642. -webkit-line-clamp: 1;
  643. line-clamp: 1;
  644. -webkit-box-orient: vertical;
  645. }
  646. }
  647. /**找到表头那一行,然后把里面的复选框隐藏掉**/
  648. .tableWrapper::v-deep .el-table__header-wrapper .el-table__header .el-checkbox {
  649. display: none;
  650. }
  651. </style>