processList.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551
  1. <template>
  2. <div class="app-container">
  3. <!-- 尽职背调 -->
  4. <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px"
  5. label-position="top">
  6. <el-row :gutter="20">
  7. <el-col :span="6">
  8. <el-form-item label="项目名称" prop="projectName">
  9. <el-input v-model.trim="queryParams.projectName" placeholder="请输入项目名称" clearable
  10. @keyup.enter.native="handleQuery" />
  11. </el-form-item>
  12. </el-col>
  13. <el-col :span="6">
  14. <el-form-item label="尽调名称" prop="investigateName">
  15. <el-input v-model.trim="queryParams.investigateName" placeholder="请输入尽调名称"
  16. @keyup.enter.native="handleQuery" />
  17. </el-form-item>
  18. </el-col>
  19. <el-col :span="6">
  20. <el-form-item label="尽调地点" prop="investigatePlace">
  21. <el-input v-model.trim="queryParams.investigatePlace" placeholder="请输入尽调地址" clearable
  22. @keyup.enter.native="handleQuery" />
  23. </el-form-item>
  24. </el-col>
  25. <el-col :span="6">
  26. <el-form-item label="流程状态" prop="status">
  27. <!-- el-select 绑定表单字段 -->
  28. <el-select v-model="queryParams.status" placeholder="请选择" clearable style="width: 100%;">
  29. <!-- 静态选项 -->
  30. <el-option label="暂存" value="0"></el-option>
  31. <el-option label="已提交" value="1"></el-option>
  32. <el-option label="审批中" value="2"></el-option>
  33. <el-option label="审核完成" value="3"></el-option>
  34. <el-option label="关闭" value="4"></el-option>
  35. </el-select>
  36. </el-form-item>
  37. </el-col>
  38. </el-row>
  39. <!-- 可继续扩展其他查询表单项目,比如项目编号、负责人等 -->
  40. <el-row :gutter="20">
  41. <el-col :span="6">
  42. <el-form-item label="搜索">
  43. <el-button style="width: 100%;" type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
  44. </el-form-item>
  45. </el-col>
  46. <el-col :span="6">
  47. <el-form-item label="重置">
  48. <el-button style="width: 100%;" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
  49. </el-form-item>
  50. </el-col>
  51. </el-row>
  52. </el-form>
  53. <el-row :gutter="10" class="mb8">
  54. <!-- <el-col :span="1.5">
  55. <el-button
  56. type="warning"
  57. size="small"
  58. icon="el-icon-tickets"
  59. @click="handleAdd"
  60. v-hasPermi="['invest:pool:due']"
  61. >尽调申请</el-button
  62. >
  63. </el-col>-->
  64. <el-col :span="1.5">
  65. <el-button type="warning" icon="el-icon-download" size="small" @click="handleExport">导出</el-button>
  66. </el-col>
  67. <el-col :span="1.5">
  68. <el-button type="warning" size="small" icon="el-icon-tickets" @click="chooseApprove"
  69. v-hasPermi="['system:approve:add']">指定审批人</el-button>
  70. <!-- <button @click="showDialog = true">指定审批人员</button>-->
  71. </el-col>
  72. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  73. </el-row>
  74. <div class="border-card">
  75. <el-table height="450" ref="dataTable" @row-click="clickRow" class="tableWrapper" v-loading="loading" border
  76. :data="poolList" @selection-change="handleSelectionChange">
  77. <!-- <el-table-column type="selection" width="40" align="center" /> -->
  78. <el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
  79. <!-- <el-table-column label="主键id" align="center" prop="id" /> -->
  80. <!-- <el-table-column label="项目名称" align="center" prop="projectName">
  81. <template slot-scope="scope">
  82. <div
  83. :title="scope.row.projectName"
  84. class="public-text-blue public-cursor"
  85. @click.stop="handleDetail(scope.row)"
  86. >
  87. {{ scope.row.projectName }}
  88. </div>
  89. </template>
  90. </el-table-column>-->
  91. <el-table-column label="项目名称" align="center" prop="projectName">
  92. <template slot-scope="scope">
  93. <div :title="scope.row.projectName">
  94. {{ scope.row.projectName }}
  95. </div>
  96. </template>
  97. </el-table-column>
  98. <el-table-column label="所属行业" align="center" prop="industry"><template slot-scope="scope">
  99. <dict-tag :options="dict.type.CUSTOMER_TRADE" :value="scope.row.industry" />
  100. </template>
  101. </el-table-column>
  102. <el-table-column label="项目阶段" align="center" prop="projectStage">
  103. <template slot-scope="scope">
  104. <dict-tag :options="dict.type.project_stage" :value="scope.row.projectStage" />
  105. </template>
  106. </el-table-column>
  107. <el-table-column label="项目机会状态" align="center" prop="projectStatus">
  108. <template slot-scope="scope">
  109. <!-- 定义状态文本映射对象 -->
  110. <el-tag :type="{
  111. 0: 'success',
  112. 1: 'danger',
  113. 2: 'warning'
  114. }[scope.row.projectStatus] || 'info'">
  115. {{ {
  116. 0: '正常',
  117. 1: '终止',
  118. 2: '观望'
  119. }[scope.row.projectStatus] || '未知状态' }}
  120. </el-tag>
  121. </template>
  122. </el-table-column>
  123. <!-- <el-table-column
  124. label="已发起尽调申请"
  125. align="center"
  126. prop="investigateFlag"
  127. >
  128. <template slot-scope="scope">
  129. <div>
  130. {{ scope.row.investigateFlag === "1" ? "是" : "否" }}
  131. </div>
  132. </template>
  133. </el-table-column>-->
  134. <!-- <el-table-column label="投决通过日期" align="center" prop="decisionDate">
  135. <template slot-scope="scope">
  136. <span>{{ parseTime(scope.row.decisionDate, "{y}-{m}-{d}") }}</span>
  137. </template>
  138. </el-table-column> -->
  139. <el-table-column label="项目负责人" align="center" prop="investHead">
  140. <template slot-scope="scope">
  141. <div :title="scope.row.investHead">
  142. {{ scope.row.investHead }}
  143. </div>
  144. </template>
  145. </el-table-column>
  146. <!-- <el-table-column label="项目编号" align="center" prop="projectCode" /> -->
  147. <el-table-column label="尽调名称" align="center" prop="investigateName">
  148. <template slot-scope="scope">
  149. <div :title="scope.row.investigateName">
  150. {{ scope.row.investigateName }}
  151. </div>
  152. </template>
  153. </el-table-column>
  154. <el-table-column label="尽调地点" align="center" prop="investigatePlace">
  155. <template slot-scope="scope">
  156. <div :title="scope.row.investigatePlace">
  157. {{ scope.row.investigatePlace }}
  158. </div>
  159. </template>
  160. </el-table-column>
  161. <!-- delFlag -->
  162. <el-table-column label="状态" align="center" prop="investHead" width="50px">
  163. <template slot-scope="scope">
  164. <div :title="scope.row.delFlag === '1' ? '终止' : '正常'">
  165. {{ scope.row.delFlag === "1" ? "终止" : "正常" }}
  166. </div>
  167. </template>
  168. </el-table-column>
  169. <el-table-column label="申请人" align="center" prop="startUserName">
  170. <template slot-scope="scope">
  171. <div :title="scope.row.startUserName">
  172. {{ scope.row.startUserName }}
  173. </div>
  174. </template>
  175. </el-table-column>
  176. <el-table-column label="申请日期" align="center" prop="createTime">
  177. <template slot-scope="scope">
  178. <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
  179. </template>
  180. </el-table-column>
  181. <el-table-column label="当前节点" align="center" prop="taskName">
  182. <template slot-scope="scope">
  183. <div :title="scope.row.taskName" class="public-text-blue public-cursor" @click="handleReadImage(scope.row)">
  184. {{ scope.row.taskName }}
  185. </div>
  186. </template>
  187. </el-table-column>
  188. <el-table-column label="当前处理人" align="center" prop="assigneeName">
  189. <template slot-scope="scope">
  190. <div :title="scope.row.assigneeName">
  191. {{ scope.row.assigneeName }}
  192. </div>
  193. </template>
  194. </el-table-column>
  195. <el-table-column label="流程状态" align="center" prop="status">
  196. <template slot-scope="scope">
  197. <div :title="scope.row.status">
  198. <span v-if="scope.row.status === 0">暂存</span>
  199. <span v-else-if="scope.row.status === 1">已提交</span>
  200. <span v-else-if="scope.row.status === 2">审批中</span>
  201. <span v-else-if="scope.row.status === 3">审批完成</span>
  202. <span v-else-if="scope.row.status === 4">关闭</span>
  203. </div>
  204. </template>
  205. </el-table-column>
  206. <el-table-column label="操作" align="center" width="150" fixed="right" class-name="small-padding fixed-width">
  207. <template slot-scope="scope">
  208. <el-button type="text" size="mini" @click="handleDetailProcess(scope.row)">详情</el-button>
  209. </template>
  210. </el-table-column>
  211. </el-table>
  212. <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
  213. @pagination="getList" />
  214. </div>
  215. <!-- 尽调组件 -->
  216. <dueDiligenceList ref="dueDiligenceLists" :projectId="projectId" @getList="getList"></dueDiligenceList>
  217. <!-- 设置项目状态对话框 -->
  218. <businessUpdate @getList="getList" ref="businessUpdate"></businessUpdate>
  219. <!-- 指定审批人院 -->
  220. <approveDialog @getList="getList" ref="setApproval"></approveDialog>
  221. <!-- Flowable 流程图弹窗 -->
  222. <el-dialog :title="readImage.title" :visible.sync="readImage.open" width="70%" append-to-body>
  223. <!-- <el-image :src="readImage.src"></el-image> -->
  224. <flow :flowData="flowData" />
  225. </el-dialog>
  226. </div>
  227. </template>
  228. <script>
  229. import { getAllInvestigateList } from "@/api/project/investigate/pool";
  230. import { listChannel } from "@/api/invest/channel";
  231. import { flowXmlAndNode } from "@/api/flowable/definition";
  232. import dueDiligenceList from "../investigate/dueDiligenceList";
  233. import businessUpdate from "../../invest/components/businessUpdate";
  234. import approveDialog from "../investigate/approveDialog";
  235. import { mapGetters } from "vuex";
  236. export default {
  237. name: "Pool4",
  238. dicts: ["project_group", "project_stage", "project_state", "CUSTOMER_TRADE"],
  239. components: {
  240. dueDiligenceList,
  241. businessUpdate,
  242. approveDialog,
  243. },
  244. data() {
  245. return {
  246. projectId: "",
  247. // 遮罩层
  248. loading: false,
  249. // 选中id数组
  250. ids: [],
  251. idsName: [],
  252. // 非单个禁用
  253. single: true,
  254. // 非多个禁用
  255. multiple: true,
  256. // 选中数组
  257. selectRowList: [],
  258. // 显示搜索条件
  259. showSearch: true,
  260. // 总条数
  261. total: 0,
  262. // 项目池表格数据
  263. poolList: [],
  264. // 查询参数
  265. queryParams: {
  266. id: null,
  267. pageNum: 1,
  268. pageSize: 10,
  269. projectName: null,
  270. projectGroup: "",
  271. projectCode: null,
  272. channel: null,
  273. contactDate: null,
  274. projectDate: null,
  275. decisionDate: null,
  276. industry: null,
  277. company: null,
  278. projectContacts: null,
  279. investHead: null,
  280. previousFinancing: null,
  281. financingStage: null,
  282. financingMoney: null,
  283. financingDate: null,
  284. investValuation: null,
  285. investMoney: null,
  286. investType: null,
  287. investPloy: null,
  288. investWorth: null,
  289. projectStage: null,
  290. projectState: null,
  291. orderByColumn: "createTime",
  292. isAsc: "desc",
  293. createTime: null,
  294. },
  295. channelList: [],
  296. //流程图信息
  297. readImage: {
  298. open: false,
  299. src: "",
  300. },
  301. // xml
  302. flowData: {},
  303. };
  304. },
  305. computed: {
  306. ...mapGetters(["user"]),
  307. },
  308. created() {
  309. this.getList();
  310. },
  311. mounted() {
  312. // 渠道
  313. listChannel({
  314. pageNum: 1,
  315. pageSize: 100,
  316. }).then((response) => {
  317. this.channelList = response.rows;
  318. });
  319. },
  320. methods: {
  321. /** 查询所有尽职背调流程列表 */
  322. getList() {
  323. this.loading = true;
  324. getAllInvestigateList(this.queryParams).then((response) => {
  325. this.poolList = response.rows;
  326. this.total = response.total;
  327. this.loading = false;
  328. });
  329. },
  330. /** 搜索按钮操作 */
  331. handleQuery() {
  332. this.queryParams.pageNum = 1;
  333. this.getList();
  334. },
  335. /** 重置按钮操作 */
  336. resetQuery() {
  337. this.resetForm("queryForm");
  338. this.queryParams.orderByColumn = "createTime";
  339. this.queryParams.isAsc = "desc";
  340. this.handleQuery();
  341. },
  342. // 多选框选中数据
  343. handleSelectionChange(selection) {
  344. this.ids = selection.map((item) => item.id);
  345. if (selection.length > 1) {
  346. //移除上一次选中行数据
  347. selection.shift();
  348. //修改选中图标为未选中状态
  349. this.$refs.dataTable.clearSelection();
  350. //将当前选中行改为选中状态
  351. this.$refs.dataTable.toggleRowSelection(selection[0]);
  352. }
  353. this.idsName = selection.map((item) => item.projectName);
  354. this.single = selection.length !== 1;
  355. this.multiple = !selection.length;
  356. this.selectRowList = selection;
  357. },
  358. clickRow(row) {
  359. this.$refs.dataTable.toggleRowSelection(row);
  360. },
  361. /** 新增按钮操作 */
  362. handleAdd() {
  363. // 尽调申请
  364. this.$refs.dueDiligenceLists.handleShowApplyPop();
  365. // this.$router.push({ path: "/invest/pool/add" });
  366. },
  367. handleSelectData(type, otherData) {
  368. // type 1=修改 2=详情 3=设置项目阶段 4=终止 5=上传评估意见
  369. // 6=立项申请 7=发起立项会议 8=上传打分表(立项)
  370. // 9=尽调申请 10=上传尽调报告
  371. // 11=投决申请 12=发起投决会议 13=上传打分表(投决)
  372. if (this.selectRowList.length == 1) {
  373. const row = this.selectRowList[0];
  374. // 1.单条数据 2.项目是否终止 3.是否能操作
  375. if (row.delFlag === "1") {
  376. this.$message({
  377. message: "项目已终止",
  378. duration: 1500,
  379. type: "error",
  380. });
  381. } else if (type === 10) {
  382. // 是否有尽调申请
  383. if (row.investigateFlag === "1") {
  384. // 是否被选为参与人
  385. if (
  386. row.tProjectInvestigate &&
  387. row.tProjectInvestigate.investigatePerson.indexOf(
  388. this.user.nickName
  389. ) > -1
  390. ) {
  391. //是否上传了尽调报告
  392. if (!row.tProjectInvestigatePerson) {
  393. // 上传尽调报告
  394. this.$refs.dueDiligenceLists.handleShowReportPop(row);
  395. } else {
  396. this.$message({
  397. message: "您已上传尽调报告,无需重复操作",
  398. duration: 1500,
  399. type: "warning",
  400. });
  401. }
  402. } else {
  403. this.$message({
  404. message: "无权限",
  405. duration: 1500,
  406. type: "error",
  407. });
  408. }
  409. } else {
  410. if (row.investHead === this.user.nickName) {
  411. this.$message({
  412. message: "请先尽调申请",
  413. duration: 1500,
  414. type: "warning",
  415. });
  416. } else {
  417. this.$message.warning("无权限");
  418. }
  419. }
  420. } else if (row.investHead === this.user.nickName) {
  421. // 未终止
  422. if (type === 2) {
  423. // 详情
  424. this.handleDetail(row);
  425. } else if (type === 3) {
  426. // 设置项目阶段
  427. this.$refs.businessUpdate.handleBusinessUpdate(row);
  428. } else if (type === 4) {
  429. this.handleDelete(row);
  430. } else if (type === 9) {
  431. // 是否有尽调申请
  432. if (row.investigateFlag === "0") {
  433. // 尽调申请
  434. this.$refs.dueDiligenceLists.handleShowApplyPop(row);
  435. } else {
  436. this.$message({
  437. message: "您已发起尽调申请,无需重复操作",
  438. duration: 1500,
  439. type: "warning",
  440. });
  441. }
  442. }
  443. } else {
  444. this.$message({
  445. message: "无权限",
  446. duration: 1500,
  447. type: "error",
  448. });
  449. }
  450. } else {
  451. this.$message({
  452. message: "只能选择一条数据",
  453. duration: 1500,
  454. type: "warning",
  455. });
  456. }
  457. },
  458. handleDetail(row) {
  459. const id = row.id || this.ids;
  460. this.$router.push({ path: "/invest/pool/detail", query: { id: id } });
  461. },
  462. /** 修改按钮操作 */
  463. handleUpdate(row) {
  464. const id = row.id;
  465. this.$router.push({ path: "/invest/pool/add", query: { id: id } });
  466. },
  467. /**终止按钮操作 */
  468. handleDelete(row) {
  469. const ids = row.id || this.ids;
  470. const idsName = row.projectName ? row.projectName : this.idsName;
  471. this.$modal
  472. .confirm('是否终止"' + idsName + '"项目?')
  473. .then(function () {
  474. return delPool(ids);
  475. })
  476. .then(() => {
  477. this.getList();
  478. this.$modal.msgSuccess("已终止");
  479. })
  480. .catch(() => { });
  481. },
  482. /** 导出按钮操作 */
  483. handleExport() {
  484. this.download(
  485. "project/investigate/export",
  486. {
  487. ...this.queryParams,
  488. },
  489. `investigate_${new Date().getTime()}.xlsx`
  490. );
  491. },
  492. /*指定审批人员*/
  493. chooseApprove() {
  494. this.$refs.setApproval.handleShowApplyPop();
  495. },
  496. /** 流程图查看 */
  497. handleReadImage(row) {
  498. this.readImage.title = "流程图";
  499. this.readImage.open = true;
  500. // this.readImage.src = process.env.VUE_APP_BASE_API + "/flowable/definition/readImage/" + deploymentId;
  501. flowXmlAndNode({ procInsId: row.procInstId, deployId: row.deployId }).then(res => {
  502. this.flowData = res.data;
  503. })
  504. },
  505. /*流程详情*/
  506. handleDetailProcess(row) {
  507. const id = row.id || this.ids;
  508. const poolId = row.projectPoolId;
  509. const pInstId = row.procInstId;
  510. this.$router.push({ path: "/myTask/project/investigate/detail", query: { id: poolId, pInstId: pInstId } });
  511. },
  512. },
  513. };
  514. </script>
  515. <style lang="scss" scoped>
  516. .tableWrapper {
  517. font-size: 12px;
  518. color: #000;
  519. ::v-deep .el-table__header-wrapper th {
  520. font-size: 12px;
  521. font-weight: bolder;
  522. color: #000;
  523. }
  524. ::v-deep td.el-table__cell:not(:last-child) div {
  525. text-overflow: -o-ellipsis-lastline;
  526. overflow: hidden;
  527. text-overflow: ellipsis;
  528. display: -webkit-box;
  529. -webkit-line-clamp: 1;
  530. line-clamp: 1;
  531. -webkit-box-orient: vertical;
  532. }
  533. }
  534. /**找到表头那一行,然后把里面的复选框隐藏掉**/
  535. .tableWrapper::v-deep .el-table__header-wrapper .el-table__header .el-checkbox {
  536. display: none;
  537. }
  538. </style>