| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530 |
- <template>
- <div class="app-container">
- <!-- 项目投决 -->
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px"
- label-position="top">
- <el-row :gutter="20">
- <el-col :span="6">
- <el-form-item label="项目名称" prop="projectName">
- <el-input v-model.trim="queryParams.projectName" placeholder="请输入项目名称" clearable
- @keyup.enter.native="handleQuery" />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="股权/其他合作商务条款" prop="provision">
- <el-input v-model.trim="queryParams.provision" placeholder="请输入股权/其他合作商务条款" clearable
- @keyup.enter.native="handleQuery" />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="流程状态" prop="status">
- <!-- el-select 绑定表单字段 -->
- <el-select v-model="queryParams.status" placeholder="请选择" clearable style="width: 100%;">
- <!-- 静态选项 -->
- <el-option label="暂存" value="0"></el-option>
- <el-option label="已提交" value="1"></el-option>
- <el-option label="审批中" value="2"></el-option>
- <el-option label="审核完成" value="3"></el-option>
- <el-option label="关闭" value="4"></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- </el-col>
- </el-row>
- <!-- 可继续扩展其他查询表单项目,比如项目编号、负责人等 -->
- <el-row :gutter="20">
- <el-col :span="6">
- <el-form-item label="搜索">
- <el-button style="width: 100%;" type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="重置">
- <el-button style="width: 100%;" icon="el-icon-refresh" type="primary" @click="resetQuery">重置</el-button>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <el-row :gutter="10" class="mb8">
- <!-- <el-col :span="1.5">
- <el-button
- type="warning"
- size="small"
- icon="el-icon-document"
- @click="handleAdd"
- >投决申请</el-button
- >
- </el-col>-->
- <el-col :span="1.5">
- <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
- </el-col>
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
- </el-row>
- <div class="border-card">
- <el-table height="450" ref="dataTable" @row-click="clickRow" class="tableWrapper" v-loading="loading" border
- :data="poolList" @selection-change="handleSelectionChange">
- <!-- <el-table-column type="selection" width="40" align="center" /> -->
- <el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
- <!-- <el-table-column label="主键id" align="center" prop="id" /> -->
- <!-- <el-table-column label="项目名称" align="center" prop="projectName">
- <template slot-scope="scope">
- <div
- :title="scope.row.projectName"
- class="public-text-blue public-cursor"
- @click.stop="handleDetail(scope.row)"
- >
- {{ scope.row.projectName }}
- </div>
- </template>
- </el-table-column>-->
- <el-table-column label="项目名称" align="center" prop="projectName">
- <template slot-scope="scope">
- <div :title="scope.row.projectName">
- {{ scope.row.projectName }}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="所属行业" align="center" prop="industry"><template slot-scope="scope">
- <dict-tag :options="dict.type.CUSTOMER_TRADE" :value="scope.row.industry" />
- </template>
- </el-table-column>
- <el-table-column label="项目阶段" align="center" prop="projectStage">
- <template slot-scope="scope">
- <dict-tag :options="dict.type.project_stage" :value="scope.row.projectStage" />
- </template>
- </el-table-column>
- <!-- <el-table-column
- label="项目状态"
- align="center"
- prop="projectState"
- width="120"
- >
- <template slot-scope="scope">
- <dict-tag
- :options="dict.type.project_state"
- :value="scope.row.projectState"
- />
- </template>
- </el-table-column>-->
- <el-table-column label="项目机会状态" align="center" prop="projectStatus">
- <template slot-scope="scope">
- <!-- 定义状态文本映射对象 -->
- <el-tag :type="{
- 0: 'success',
- 1: 'danger',
- 2: 'warning'
- }[scope.row.projectStatus] || 'info'">
- {{ {
- 0: '正常',
- 1: '终止',
- 2: '观望'
- }[scope.row.projectStatus] || '未知状态' }}
- </el-tag>
- </template>
- </el-table-column>
- <!-- <el-table-column
- label="已发起投决申请"
- align="center"
- prop="decisionFlag"
- >
- <template slot-scope="scope">
- <div>
- {{ scope.row.decisionFlag === "1" ? "是" : "否" }}
- </div>
- </template>
- </el-table-column>-->
- <el-table-column label="项目负责人" align="center" prop="investHead">
- <template slot-scope="scope">
- <div :title="scope.row.investHead">
- {{ scope.row.investHead }}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="股权/其他合作商务条款" align="center" prop="provision">
- <template slot-scope="scope">
- <div :title="scope.row.provision">
- {{ scope.row.provision }}
- </div>
- </template>
- </el-table-column>
- <!-- delFlag -->
- <el-table-column label="状态" align="center" prop="investHead" width="50px">
- <template slot-scope="scope">
- <div :title="scope.row.delFlag === '1' ? '终止' : '正常'">
- {{ scope.row.delFlag === "1" ? "终止" : "正常" }}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="申请人" align="center" prop="startUserName">
- <template slot-scope="scope">
- <div :title="scope.row.startUserName">
- {{ scope.row.startUserName }}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="申请日期" align="center" prop="createTime">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
- </template>
- </el-table-column>
- <el-table-column label="当前节点" align="center" prop="taskName">
- <template slot-scope="scope">
- <div :title="scope.row.taskName" class="public-text-blue public-cursor" @click="handleReadImage(scope.row)">
- {{ scope.row.taskName }}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="当前处理人" align="center" prop="assigneeName">
- <template slot-scope="scope">
- <div :title="scope.row.assigneeName">
- {{ scope.row.assigneeName }}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="流程状态" align="center" prop="status">
- <template slot-scope="scope">
- <div :title="scope.row.status">
- <span v-if="scope.row.status === 0">暂存</span>
- <span v-else-if="scope.row.status === 1">已提交</span>
- <span v-else-if="scope.row.status === 2">审批中</span>
- <span v-else-if="scope.row.status === 3">审批完成</span>
- <span v-else-if="scope.row.status === 4">关闭</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width">
- <template slot-scope="scope">
- <el-button type="text" size="mini" @click="handleDetailProcess(scope.row)">详情</el-button>
- </template>
- </el-table-column>
- </el-table>
- <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
- @pagination="getList" />
- </div>
- <!-- 会议管理组件 -->
- <meetingList :type="'3'" ref="meetingList" :projectId="projectId" @getList="getList"></meetingList>
- <!-- 设置项目状态对话框 -->
- <businessUpdate @getList="getList" ref="businessUpdate"></businessUpdate>
- <!-- Flowable 流程图弹窗 -->
- <el-dialog :title="readImage.title" :visible.sync="readImage.open" width="70%" append-to-body>
- <!-- <el-image :src="readImage.src"></el-image> -->
- <flow :flowData="flowData" />
- </el-dialog>
- </div>
- </template>
- <script>
- import { getAllDecisionList } from "@/api/project/decision/pool";
- import { listChannel } from "@/api/invest/channel";
- import { flowXmlAndNode } from "@/api/flowable/definition";
- import meetingList from "../meetingList.vue";
- import businessUpdate from "../../invest/components/businessUpdate";
- import { mapGetters } from "vuex";
- export default {
- name: "Pool5",
- dicts: ["project_group", "project_stage", "project_state", "CUSTOMER_TRADE"],
- components: {
- meetingList,
- businessUpdate,
- },
- data() {
- return {
- // 遮罩层
- loading: false,
- // 选中id数组
- ids: [],
- idsName: [],
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 选中数组
- selectRowList: [],
- // 显示搜索条件
- showSearch: true,
- // 总条数
- total: 0,
- // 项目池表格数据
- poolList: [],
- // 查询参数
- queryParams: {
- id: null,
- pageNum: 1,
- pageSize: 10,
- projectName: null,
- projectGroup: "",
- projectCode: null,
- channel: null,
- contactDate: null,
- projectDate: null,
- decisionDate: null,
- industry: null,
- company: null,
- projectContacts: null,
- investHead: null,
- previousFinancing: null,
- financingStage: null,
- financingMoney: null,
- financingDate: null,
- investValuation: null,
- investMoney: null,
- investType: null,
- investPloy: null,
- investWorth: null,
- projectStage: null,
- projectState: null,
- orderByColumn: "createTime",
- isAsc: "desc",
- createTime: null,
- },
- channelList: [],
- projectId: "",
- //流程图信息
- readImage: {
- open: false,
- src: "",
- },
- // xml
- flowData: {},
- };
- },
- computed: {
- ...mapGetters(["user"]),
- },
- created() {
- this.getList();
- },
- mounted() {
- // 渠道
- listChannel({
- pageNum: 1,
- pageSize: 100,
- }).then((response) => {
- this.channelList = response.rows;
- });
- },
- methods: {
- /** 查询所有项目投决流程列表 */
- getList() {
- this.loading = true;
- getAllDecisionList(this.queryParams).then((response) => {
- this.poolList = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
- /** 搜索按钮操作 */
- handleQuery() {
- this.queryParams.pageNum = 1;
- this.getList();
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.resetForm("queryForm");
- this.queryParams.orderByColumn = "createTime";
- this.queryParams.isAsc = "desc";
- this.handleQuery();
- },
- // 多选框选中数据
- handleSelectionChange(selection) {
- this.ids = selection.map((item) => item.id);
- if (selection.length > 1) {
- //移除上一次选中行数据
- selection.shift();
- //修改选中图标为未选中状态
- this.$refs.dataTable.clearSelection();
- //将当前选中行改为选中状态
- this.$refs.dataTable.toggleRowSelection(selection[0]);
- }
- this.idsName = selection.map((item) => item.projectName);
- this.single = selection.length !== 1;
- this.multiple = !selection.length;
- this.selectRowList = selection;
- },
- clickRow(row) {
- this.$refs.dataTable.toggleRowSelection(row);
- },
- /** 新增按钮操作 */
- handleAdd() {
- // 投决申请
- this.$refs.meetingList.showTJApplyPop();
- // this.$router.push({ path: "/invest/pool/add" });
- },
- handleSelectData(type, otherData) {
- // type 1=修改 2=详情 3=设置项目阶段 4=终止 5=上传评估意见
- // 6=立项申请 7=发起立项会议 8=上传打分表(立项)
- // 9=尽调申请 10=上传尽调报告
- // 11=投决申请 12=发起投决会议 13=上传打分表(投决)
- if (this.selectRowList.length == 1) {
- const row = this.selectRowList[0];
- // 1.单条数据 2.项目是否终止 3.是否能操作
- if (row.delFlag === "1") {
- this.$message({
- message: "项目已终止",
- duration: 1500,
- type: "error",
- });
- } else if (type === 13) {
- // 有立项会议
- if (row.tProjectMeeting) {
- // 参与人
- if (
- row.tProjectMeeting.participants.indexOf(this.user.nickName) > -1
- ) {
- // 是否打过分
- if (row.tProjectScoring) {
- this.$message.warning("您已打分,无需重复操作");
- } else {
- // 投决-去打分
- this.$refs.meetingList.handleMark(
- row.tProjectMeeting,
- "3",
- false
- );
- }
- } else {
- this.$message.warning("无权限");
- }
- } else {
- if (row.investHead === this.user.nickName) {
- this.$message({
- message: "请先发起投决会议",
- duration: 1500,
- type: "warning",
- });
- } else {
- this.$message.warning("无权限");
- }
- }
- } else if (row.investHead === this.user.nickName) {
- if (type === 2) {
- // 详情
- this.handleDetail(row);
- } else if (type === 3) {
- // 设置项目阶段
- this.$refs.businessUpdate.handleBusinessUpdate(row);
- } else if (type === 4) {
- this.handleDelete(row);
- } else if (type === 11) {
- if (row.decisionFlag === "0") {
- // 投决申请
- this.$refs.meetingList.showTJApplyPop(row);
- } else {
- this.$message({
- message: "您已发起投决申请,无需重复操作",
- duration: 1500,
- type: "warning",
- });
- }
- } else if (type === 12) {
- // 发起投决会议
- this.handleMeeting(row, otherData);
- }
- } else {
- this.$message({
- message: "无权限",
- duration: 1500,
- type: "error",
- });
- }
- } else {
- this.$message({
- message: "只能选择一条数据",
- duration: 1500,
- type: "warning",
- });
- }
- },
- // 发起会议
- handleMeeting(row, meetingType) {
- this.$store.commit("SET_PROJECTITEMMESSAGE", row);
- this.$refs.meetingList.handleAdd(row.id, meetingType);
- },
- handleDetail(row) {
- const id = row.id || this.ids;
- this.$router.push({ path: "/invest/pool/detail", query: { id: id } });
- },
- /**终止按钮操作 */
- handleDelete(row) {
- const ids = row.id || this.ids;
- const idsName = row.projectName ? row.projectName : this.idsName;
- this.$modal
- .confirm('是否终止"' + idsName + '"项目?')
- .then(function () {
- return delPool(ids);
- })
- .then(() => {
- this.getList();
- this.$modal.msgSuccess("已终止");
- })
- .catch(() => { });
- },
- /** 导出按钮操作 */
- handleExport() {
- this.download(
- "project/decision/export",
- {
- ...this.queryParams,
- },
- `decision_${new Date().getTime()}.xlsx`
- );
- },
- /** 流程图查看 */
- handleReadImage(row) {
- this.readImage.title = "流程图";
- this.readImage.open = true;
- // this.readImage.src = process.env.VUE_APP_BASE_API + "/flowable/definition/readImage/" + deploymentId;
- flowXmlAndNode({ procInsId: row.procInstId, deployId: row.deployId }).then(res => {
- this.flowData = res.data;
- })
- },
- /*流程详情*/
- handleDetailProcess(row) {
- const id = row.id || this.ids;
- const poolId = row.projectPoolId;
- const pInstId = row.procInstId;
- this.$router.push({ path: "/myTask/project/decision/detail", query: { id: poolId, pInstId: pInstId } });
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .tableWrapper {
- font-size: 12px;
- color: #000;
- ::v-deep .el-table__header-wrapper th {
- font-size: 12px;
- font-weight: bolder;
- color: #000;
- }
- ::v-deep td.el-table__cell:not(:last-child) div {
- text-overflow: -o-ellipsis-lastline;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 1;
- line-clamp: 1;
- -webkit-box-orient: vertical;
- }
- }
- /**找到表头那一行,然后把里面的复选框隐藏掉**/
- .tableWrapper::v-deep .el-table__header-wrapper .el-table__header .el-checkbox {
- display: none;
- }
- </style>
|