Commit e5445ac3 authored by tyn's avatar tyn

供应商合作记录 合作记录弹窗

parent 121744ec
import request from '@/utils/request'; import request from '@/utils/request';
/** /**
* 获取(常合作业主单位、常合作施工单位、常合作集团)列表 * 获取咨询机构合作列表
* @param {*} data * @param {*} data
* @returns * @returns
*/ */
...@@ -9,4 +9,38 @@ export const getConsultingAgencyCooperationListApi = (data) => request({ ...@@ -9,4 +9,38 @@ export const getConsultingAgencyCooperationListApi = (data) => request({
url: "/customerInfo/advisoryList", url: "/customerInfo/advisoryList",
method: "get", method: "get",
data data
});
/**
* 供应商准入情况
* @param {*} params
* @returns
*/
export const getSupplierAccessInfoApi = (params) => request({
url: "/customerInfo/approveInfo",
method: "get",
params
});
/**
* 导出咨询机构合作记录excel文件
* @param {*} params
* @returns
*/
export const exportRecordOfCooperationExcelApi = (params) => request({
url: "/customerInfo/advisoryExport",
method: "get",
params,
responseType: "blob"
});
/**
* 供应商合作记录列表
* @param {*} params
* @returns
*/
export const getSupplierCooperationRecordListApi = (params) => request({
url: "/customerInfo/cooperationList",
method: "get",
params,
}); });
\ No newline at end of file
...@@ -976,3 +976,9 @@ li { ...@@ -976,3 +976,9 @@ li {
.min1370 { .min1370 {
min-width: 1370px; min-width: 1370px;
} }
// 重置全局 溢出弹出提示宽度
.el-tooltip__popper {
max-width: 70%;
}
...@@ -64,6 +64,7 @@ export default { ...@@ -64,6 +64,7 @@ export default {
} }
}, },
tabChoose(item) { tabChoose(item) {
if (item.value == this.currentValue) return;
this.$emit("currentTabChange", item.value); this.$emit("currentTabChange", item.value);
this.$emit("tabToggle", item.value); this.$emit("tabToggle", item.value);
this.initSlidingBar(); this.initSlidingBar();
......
...@@ -638,14 +638,15 @@ export function getTreeSelectAreaList(nodeList = [], tree, idkey = "id") { ...@@ -638,14 +638,15 @@ export function getTreeSelectAreaList(nodeList = [], tree, idkey = "id") {
let _tempTree = JSON.parse(JSON.stringify(tree)); let _tempTree = JSON.parse(JSON.stringify(tree));
if (_tempTree instanceof Array) { if (_tempTree instanceof Array) {
_tempTree = { childrenLength: _tempTree.length, children: _tempTree }; _tempTree = { childrenLength: _tempTree.length, children: _tempTree, level: 0 };
} }
// 根据所选节点生成tree // 根据所选节点生成tree
const newTree = generateDirectSubtreeAndRemove(nodeList, _tempTree, idkey); const newTree = generateDirectSubtreeAndRemove(nodeList, _tempTree, idkey);
if (newTree) { if (newTree) {
// 循环找到每个节点的父节点 的选中状态 const result = nodeList.map(item => {
return findParentStatus(nodeList, newTree, idkey); return createAreaSelect(item, newTree, idkey);
});
} }
} catch (error) { } catch (error) {
...@@ -657,47 +658,67 @@ export function getTreeSelectAreaList(nodeList = [], tree, idkey = "id") { ...@@ -657,47 +658,67 @@ export function getTreeSelectAreaList(nodeList = [], tree, idkey = "id") {
/** /**
* *
*/ */
export function findParentStatus(nodeList, tree, idkey) { export function createAreaSelect(node, tree, idkey) {
const _temp = nodeList.map(item => { // console.log(node, tree, idkey);
// 找节点parent
const parent = findParentNode(tree, item, idkey); const selfNode = findNodeFromTree(tree, node, [], idkey);
console.log("父节点", parent);
// 有parent console.log(selfNode);
if (parent) {
const count = parent.childrenLength; // 查找chidren
const len = parent.children?.length; if (selfNode?.children?.length) {
// 比较 count 跟 length 看子节点是否全选中 const childTempArray = [];
const flag = count == len && parent.children?.every(childItem => nodeList.includes(childItem[idkey])) ? true : false; for (const child of selfNode?.children) {
// flag为true 当前节点下的子节点全选中返回父节点id 没有则是根节点 根节点返回所有child id const _temp = createAreaSelect(child[idkey], tree, idkey);
if (flag) { if (_temp) childTempArray.push(childTempArray);
return parent[idkey] ? parent[idkey] : parent.children?.map(childItem => childItem[idkey]);
} else {
console.log("没有全选中");
// 没有全选中 看当前子节点是否有选中状态
const itemNode = findNodeFromTree(tree, item, [], idkey);
console.log(itemNode);
// 当前节点有子节点
if (itemNode?.children?.length) {
// 当前节点的子节点选中结果 子节点是全选状态 传递自身 否则传递子节点
const childResult = itemNode?.children?.every(childItem => nodeList.includes(childItem[idkey])) && itemNode?.children?.length == itemNode?.childrenLength;
if (childResult) {
return item;
}
const childNodes = itemNode?.children?.filter(childItem => nodeList.includes(childItem[idkey]));
return childNodes ? childNodes.map(childItem => childItem[idkey]) : [];
}
// 当前节点没有子节点 看父节点是否全选 父节点全选 返回父节点
const childResult = parent.children?.every(childItem => nodeList.includes(childItem[idkey])) && parent.children?.length == parent?.childrenLength;
if (childResult) {
return item;
}
const childNodes = parent.children?.filter(childItem => nodeList.includes(childItem[idkey]));
return childNodes ? childNodes.map(childItem => childItem[idkey]) : [];
}
} }
}); return childTempArray;
}
return Array.from(new Set(_temp.flat())); // 没有children 已经是最底层 看parent
const parentNode = findParentNode(tree, node, idkey);
console.log(parentNode,"没有children");
// const _temp = nodeList.map(item => {
// // 找节点parent
// const parent = findParentNode(tree, item, idkey);
// console.log("父节点", parent);
// // 有parent
// if (parent) {
// const count = parent.childrenLength;
// const len = parent.children?.length;
// // 比较 count 跟 length 看子节点是否全选中
// const flag = count == len && parent.children?.every(childItem => nodeList.includes(childItem[idkey])) ? true : false;
// // flag为true 当前节点下的子节点全选中返回父节点id 没有则是根节点 根节点返回所有child id
// if (flag) {
// return parent[idkey] ? parent[idkey] : parent.children?.map(childItem => childItem[idkey]);
// } else {
// console.log("没有全选中");
// // 没有全选中 看当前子节点是否有选中状态
// const itemNode = findNodeFromTree(tree, item, [], idkey);
// console.log(itemNode);
// // 当前节点有子节点
// if (itemNode?.children?.length) {
// // 当前节点的子节点选中结果 子节点是全选状态 传递自身 否则传递子节点
// const childResult = itemNode?.children?.every(childItem => nodeList.includes(childItem[idkey])) && itemNode?.children?.length == itemNode?.childrenLength;
// if (childResult) {
// return item;
// }
// const childNodes = itemNode?.children?.filter(childItem => nodeList.includes(childItem[idkey]));
// return childNodes ? childNodes.map(childItem => childItem[idkey]) : [];
// }
// // 当前节点没有子节点 看父节点是否全选 父节点全选 返回父节点
// const childResult = parent.children?.every(childItem => nodeList.includes(childItem[idkey])) && parent.children?.length == parent?.childrenLength;
// if (childResult) {
// return item;
// }
// const childNodes = parent.children?.filter(childItem => nodeList.includes(childItem[idkey]));
// return childNodes ? childNodes.map(childItem => childItem[idkey]) : [];
// }
// }
// });
// return Array.from(new Set(_temp.flat()));
} }
......
...@@ -164,8 +164,8 @@ export default { ...@@ -164,8 +164,8 @@ export default {
methods: { methods: {
async init() { async init() {
try { try {
if (!this.$routes?.params?.advisoryBodyCid) return this.$message.error("缺少咨询机构Id"); if (!this.$route?.params?.advisoryBodyCid) return this.$message.error("缺少咨询机构Id");
this.queryParams.advisoryBodyCid = !this.$routes?.params?.advisoryBodyCid; this.queryParams.advisoryBodyCid = this.$route?.params?.advisoryBodyCid;
await this.getList(this.queryParams); await this.getList(this.queryParams);
} catch (error) { } catch (error) {
......
...@@ -48,6 +48,16 @@ ...@@ -48,6 +48,16 @@
</div> </div>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
<!-- 经营范围 -->
<template slot="businessScope" scope="{data,row}">
<el-tooltip effect="dark" placement="top" v-if="row.businessScope" class="business-text-tooltip">
<template slot="content">
<div class="business-text-line">{{row.businessScope}}</div>
</template>
<div class="business-text-line">{{row.businessScope}}</div>
</el-tooltip>
<span v-else>-</span>
</template>
</table-list-com> </table-list-com>
</div> </div>
...@@ -87,12 +97,12 @@ export default { ...@@ -87,12 +97,12 @@ export default {
{ label: '序号', prop: "staticSerialNumber", type: "index", lock: true, fixed: false, uid: v4() }, { label: '序号', prop: "staticSerialNumber", type: "index", lock: true, fixed: false, uid: v4() },
{ label: '咨询机构名称', prop: 'advisoryBodyName', width: "198px", lock: true, fixed: false, slot: true, uid: v4(), showOverflowTooltip: true }, { label: '咨询机构名称', prop: 'advisoryBodyName', width: "198px", lock: true, fixed: false, slot: true, uid: v4(), showOverflowTooltip: true },
{ label: '最近一次合作时间', prop: 'lastCooperateTime', width: "201px", uid: v4() }, { label: '最近一次合作时间', prop: 'lastCooperateTime', width: "201px", uid: v4() },
{ label: '经营状态', prop: 'businessStatus', width: "74px", uid: v4() }, { label: '经营状态', prop: 'businessStatus', minWidth: "74px", uid: v4(), showOverflowTooltip: true },
{ label: '法定代表人', prop: 'corporatePerson', width: "86px", uid: v4() }, { label: '法定代表人', prop: 'corporatePerson', width: "86px", uid: v4() },
{ label: '注册资本', prop: 'regCapital', width: "107px", uid: v4() }, { label: '注册资本', prop: 'regCapital', width: "120px", uid: v4() },
{ label: '注册地区', prop: 'regArea', width: "149px", uid: v4() }, { label: '注册地区', prop: 'regArea', width: "149px", uid: v4() },
{ label: '成立日期', prop: 'registeredDate', width: "97px", uid: v4() }, { label: '成立日期', prop: 'registeredDate', width: "97px", uid: v4() },
{ label: '经营范围', prop: 'businessScope', width: "417px", uid: v4() }, { label: '经营范围', prop: 'businessScope', width: "417px", uid: v4(), slot: true },
{ label: '合作项目数量', prop: 'cooperateProjectCount', width: "98px", uid: v4(), slot: true }, { label: '合作项目数量', prop: 'cooperateProjectCount', width: "98px", uid: v4(), slot: true },
], ],
queryParams: { queryParams: {
...@@ -274,6 +284,16 @@ export default { ...@@ -274,6 +284,16 @@ export default {
padding: 0px; padding: 0px;
margin-top: 16px; margin-top: 16px;
} }
.business-text-line {
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
} }
} }
} }
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
v-else-if="!tableLoading" :height="'100%'" @handle-current-change="handleCurrentChange"> v-else-if="!tableLoading" :height="'100%'" @handle-current-change="handleCurrentChange">
<!-- 项目列表 --> <!-- 项目列表 -->
<template slot="projectName" slot-scope="{data,row}"> <template slot="projectName" slot-scope="{data,row}">
<div v-if="row.projectName" class="no-line-feed">{{row.projectName}}</div> <div v-if="row.projectName" class="no-line-feed" v-html="row.projectName">{{row.projectName}}</div>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
<!-- 业主单位 --> <!-- 业主单位 -->
......
...@@ -44,7 +44,10 @@ export default { ...@@ -44,7 +44,10 @@ export default {
}, },
//可访问data属性 //可访问data属性
created() { created() {
const target = this.$route.query.target;
if (target && ["project", "enterprise"].includes(target)) {
this.currentList = target;
}
}, },
//计算集 //计算集
computed: { computed: {
...@@ -52,7 +55,6 @@ export default { ...@@ -52,7 +55,6 @@ export default {
}, },
//方法集 //方法集
methods: { methods: {
}, },
} }
</script> </script>
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<span class="flex-box ability-total" v-if="isTotal">共有{{ total }}条</span> <span class="flex-box ability-total" v-if="isTotal">共有{{ total }}条</span>
<span class="flex-box ability-excel" v-hasPermi="['combine:info:export:win:bid','combine:info:export:bid']" <span class="flex-box ability-excel" v-hasPermi="['combine:info:export:win:bid','combine:info:export:bid']"
v-if="isExcel && title ==='集团业绩'|| title ==='集团招标' " @click="clickEXCEL"><img src="@/assets/images/ability_excel.png">导出EXCEL</span> v-if="isExcel && title ==='集团业绩'|| title ==='集团招标' " @click="clickEXCEL"><img src="@/assets/images/ability_excel.png">导出EXCEL</span>
<span class="flex-box ability-excel" v-else @click="clickEXCEL"><img src="@/assets/images/ability_excel.png">导出EXCEL</span> <span class="flex-box ability-excel" v-else-if="isExcel" @click="clickEXCEL"><img src="@/assets/images/ability_excel.png">导出EXCEL</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -297,14 +297,7 @@ export default { ...@@ -297,14 +297,7 @@ export default {
this.$emit('handle-search'); this.$emit('handle-search');
}, },
clickEXCEL() { clickEXCEL() {
if (this.title === '集团业绩' || this.title === '集团招标' || this.title === '集团成员') { this.$emit('handle-excel');
this.$emit('handle-excel');
} else {
this.$message({
message: '功能正在开发中',
type: 'warning'
});
}
}, },
clickFocus(e) { clickFocus(e) {
document.getElementById(e).classList.toggle('span-ba'); document.getElementById(e).classList.toggle('span-ba');
......
...@@ -56,6 +56,10 @@ ...@@ -56,6 +56,10 @@
<!-- 1、咨询机构合作 --> <!-- 1、咨询机构合作 -->
<consulting-agency-cooperation v-if="currentPath.pathName=='consultingAgencyCooperation'" <consulting-agency-cooperation v-if="currentPath.pathName=='consultingAgencyCooperation'"
:company-id="companyId"></consulting-agency-cooperation> :company-id="companyId"></consulting-agency-cooperation>
<!-- 2、准入情况 -->
<access-condition v-if="currentPath.pathName=='accessCondition'" :company-id="companyId" :companyInfo="companyInfo"></access-condition>
<!-- 3、供应商合作记录 -->
<cooperation-record v-if="currentPath.pathName=='cooperationRecord'" :company-id="companyId"></cooperation-record>
</template> </template>
<template v-if="customerId && isCustomer"> <template v-if="customerId && isCustomer">
<!-- 商务信息 --> <!-- 商务信息 -->
...@@ -125,6 +129,8 @@ import Cooperate from "./cooperate"; //合作情况 ...@@ -125,6 +129,8 @@ import Cooperate from "./cooperate"; //合作情况
import DecisionMaking from "./decisionMaking"; //决策链条 import DecisionMaking from "./decisionMaking"; //决策链条
import Gjjl from "../../project/projectList/component/gjjl"; //跟进记录 import Gjjl from "../../project/projectList/component/gjjl"; //跟进记录
import ConsultingAgencyCooperation from "@/views/detail/party-a/internalCooperation/consultingAgencyCooperation"; //内部合作 咨询机构合作 import ConsultingAgencyCooperation from "@/views/detail/party-a/internalCooperation/consultingAgencyCooperation"; //内部合作 咨询机构合作
import AccessCondition from "@/views/detail/party-a/internalCooperation/accessCondition"; //内部合作 准入情况
import CooperationRecord from "@/views/detail/party-a/internalCooperation/cooperationRecord"; //内部合作 准入情况
import { import {
urbanInvestmentPage, urbanInvestmentPage,
} from '@/api/detail/party-a/urbanLnvestment'; } from '@/api/detail/party-a/urbanLnvestment';
...@@ -172,7 +178,9 @@ export default { ...@@ -172,7 +178,9 @@ export default {
DecisionMaking, DecisionMaking,
Gjjl, Gjjl,
CooperativeOwnerUnits, CooperativeOwnerUnits,
ConsultingAgencyCooperation ConsultingAgencyCooperation,
AccessCondition,
CooperationRecord
}, },
data() { data() {
return { return {
......
<template>
<div class="access-condition">
<!-- 基本信息 -->
<div class="basic-information">
<div class="info-module-title"><span>基本信息</span></div>
<!-- 基本信息表格 -->
<table>
<tr>
<td class="table-key">资源平台分类</td>
<td colspan="3">-</td>
</tr>
<tr>
<td class="table-key">公司名称</td>
<td>-</td>
<td class="table-key">注册资本(万元)</td>
<td>-</td>
</tr>
<tr>
<td class="table-key">证件选择</td>
<td>-</td>
<td class="table-key">统一社会信用代码</td>
<td>-</td>
</tr>
<tr>
<td class="table-key">工商注册号</td>
<td>-</td>
<td class="table-key">组织机构代码证号</td>
<td>-</td>
</tr>
<tr>
<td class="table-key">税务登记号</td>
<td colspan="3">-</td>
</tr>
<tr>
<td class="table-key">身份选择</td>
<td>-</td>
<td class="table-key">法人身份证号/护照...</td>
<td>-</td>
</tr>
<tr>
<td class="table-key">纳税人身份</td>
<td>-</td>
<td class="table-key">纳税人税率</td>
<td>-</td>
</tr>
<tr>
<td class="table-key lot">享受优惠政策说明</td>
<td colspan="3">-</td>
</tr>
</table>
<table style="margin-top:16px;">
<tr>
<td class="table-key">法人代表</td>
<td>-</td>
<td class="table-key">公司联系人</td>
<td>-</td>
</tr>
<tr>
<td class="table-key">公司联系人电话</td>
<td>-</td>
<td class="table-key">主项资质</td>
<td>-</td>
</tr>
<tr>
<td class="table-key">公司性质</td>
<td>-</td>
<td class="table-key">资质等级</td>
<td>-</td>
</tr>
<tr>
<td class="table-key">施工承包范围</td>
<td>-</td>
<td class="table-key">专业类别</td>
<td>-</td>
</tr>
<tr>
<td class="table-key">公司注册地所属区域</td>
<td>-</td>
<td class="table-key">公司注册地所属省</td>
<td>-</td>
</tr>
<tr>
<td class="table-key">公司注册地所属城市</td>
<td>-</td>
<td class="table-key">注册地址</td>
<td>-</td>
</tr>
<tr>
<td class="table-key">开户行</td>
<td>-</td>
<td class="table-key">银行账号</td>
<td>-</td>
</tr>
</table>
</div>
<!-- 上传证书及其他信息 -->
<div class="certificate-details table-item">
<div class="info-module-title"><span>上传证书及其他信息</span></div>
<el-table :data="textTabel" border stripe>
<el-table-column label="证书类型" width="194px">
</el-table-column>
<el-table-column label="到期时间" width="194px">
</el-table-column>
<el-table-column label="状态" width="194px">
</el-table-column>
<el-table-column label="查看" min-width="194px">
</el-table-column>
<el-table-column label="操作" width="194px">
</el-table-column>
</el-table>
</div>
<!-- 审批意见 -->
<div class="approval-opinions">
<div class="info-module-title"><span>审批意见</span></div>
<!-- 项目部意见 -->
<div class="project-opinion">
<div class="opinion-title">项目部意见</div>
<table>
<tr>
<td class="table-key">准入情况</td>
<td colspan="3">-</td>
</tr>
<tr>
<td class="table-key">经办人</td>
<td>-</td>
<td class="table-key">准入时间</td>
<td>-</td>
</tr>
<tr>
<td class="table-key">商务经理</td>
<td>-</td>
<td class="table-key">准入时间</td>
<td>-</td>
</tr>
<tr>
<td class="table-key">项目经理</td>
<td>-</td>
<td class="table-key">准入时间</td>
<td>-</td>
</tr>
</table>
</div>
<!-- 公司意见 -->
<div class="company-opinion">
<div class="opinion-title">公司意见</div>
<table>
<tr>
<td class="table-key">公司意见</td>
<td>-</td>
<td class="table-key">准入时间</td>
<td>-</td>
</tr>
</table>
</div>
</div>
</div>
</template>
<script>
import { getSupplierAccessInfoApi } from "@/api/internalCooperation";
export default {
name: "accessCondition",
props: ['companyId', "companyInfo"],
data() {
return {
comCompanyInfo: this.companyInfo,
queryParams: {
advisoryBodyCid: this.companyId,
},
supplierAccessInfo: {},
textTabel: []
};
},
//可访问data属性
created() {
this.init();
},
//计算集
computed: {
},
//方法集
methods: {
async init() {
try {
const result = await getSupplierAccessInfoApi({
customerName: this.comCompanyInfo.companyName
});
if (result.code == 200 && result.data) {
this.supplierAccessInfo = { ...this.supplierAccessInfo, ...result.data };
}
console.log(result);
} catch (error) {
}
}
},
}
</script>
<style lang="scss" scoped>
.access-condition {
width: 100%;
height: 100%;
padding: 16px;
box-sizing: border-box;
overflow: auto;
.info-module-title {
line-height: 24px;
color: #232323;
font-weight: bold;
font-size: 16px;
margin-bottom: 16px;
display: flex;
align-items: center;
& > span {
display: inline-block;
position: relative;
padding-left: 8px;
box-sizing: border-box;
&::before {
content: "";
position: absolute;
left: 0px;
top: 50%;
transform: translateY(-50%);
background: rgba(35, 35, 35, 0.8);
width: 2px;
height: 14px;
}
}
}
table {
width: 100%;
border-spacing: 0;
border-collapse: collapse;
&,
th,
td {
border: 1px solid #e6eaf1;
box-sizing: border-box;
}
td {
padding: 9px 12px;
line-height: 22px;
color: #232323;
font-size: 12px;
}
.table-key {
width: 140px;
background: #f0f3fa;
color: rgba(35, 35, 35, 0.8);
&.lot {
height: 62px;
}
}
}
.approval-opinions,
.certificate-details {
margin-top: 32px;
}
.certificate-details {
&.table-item {
::v-deep .el-table {
.el-table__header-wrapper {
position: static;
}
}
}
}
.approval-opinions {
.company-opinion,
.project-opinion {
margin-top: 16px;
.opinion-title {
color: #232323;
font-size: 14px;
line-height: 24px;
margin-bottom: 16px;
}
}
}
}
</style>
<template> <template>
<div class="consulting-agency-cooperation"> <div class="consulting-agency-cooperation">
<head-form-new title="咨询机构合作" :form-data="formData" :query-params="queryParams" :total="tableDataTotal" :isExcel="true" <head-form-new title="咨询机构合作" :form-data="formData" :query-params="queryParams" :total="tableDataTotal" :isExcel="true"
@handle-search="handleSearch" ref="searchFormNew" /> @handle-search="handleSearch" ref="searchFormNew" @handle-excel="handleExcel" />
<skeleton v-if="isSkeleton" style="padding: 16px"></skeleton> <skeleton v-if="isSkeleton" style="padding: 16px"></skeleton>
<tables v-if="!isSkeleton" :indexFixed="true" :tableData="tableData" :forData="forData" :tableDataTotal="tableDataTotal" <tables v-if="!isSkeleton" :indexFixed="true" :tableData="tableData" :forData="forData" :tableDataTotal="tableDataTotal"
:queryParams="queryParams" @handle-current-change="handleCurrentChange"> :queryParams="queryParams" @handle-current-change="handleCurrentChange">
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<script> <script>
import skeleton from '../component/skeleton'; import skeleton from '../component/skeleton';
import mixin from '@/views/detail/party-a/mixins/mixin'; import mixin from '@/views/detail/party-a/mixins/mixin';
import { getConsultingAgencyCooperationListApi } from "@/api/internalCooperation"; import { getConsultingAgencyCooperationListApi, exportRecordOfCooperationExcelApi } from "@/api/internalCooperation";
import { getAllAreaApi } from "@/api/common"; import { getAllAreaApi } from "@/api/common";
import { getTreeSelectAreaList } from "@/utils"; import { getTreeSelectAreaList } from "@/utils";
export default { export default {
...@@ -147,6 +147,15 @@ export default { ...@@ -147,6 +147,15 @@ export default {
} }
}, },
// 导出excel
async handleExcel() {
try {
const result = await exportRecordOfCooperationExcelApi(this.queryParams);
this.$download.saveAs(result);
} catch (error) {
}
},
// 跳转项目详情 // 跳转项目详情
viewProjectDetail(row) { viewProjectDetail(row) {
......
<template>
<div class="cooperation-record">
<head-form-new title="供应商合作记录" :form-data="formData" :query-params="queryParams" :total="tableDataTotal" :isExcel="true"
@handle-search="handleSearch" ref="searchFormNew" @handle-excel="handleExcel" />
<skeleton v-if="isSkeleton" style="padding: 16px"></skeleton>
<tables v-if="!isSkeleton" :indexFixed="true" :tableData="tableData" :forData="forData" :tableDataTotal="tableDataTotal"
:queryParams="queryParams" @handle-current-change="handleCurrentChange">
<!-- 项目列表 -->
<template slot="projectName" slot-scope="scope">
<span v-if="scope.row.projectName" style="color: #0081FF;cursor: pointer;"
@click="viewProjectDetail(scope.row)">{{scope.row.projectName}}</span>
<span v-else>-</span>
</template>
</tables>
<el-dialog :title="dialogTitle" :visible.sync="cooperationRecordDialog" width="1100px" @close="dialogClose"
class="cooperation-record-dialog-container" custom-class="cooperation-record-dialog">
<div class="cooperation-record-dialog-innner">
<dialog-head-form-new title="" :form-data="dialogFormData" :query-params="dialogQueryParams" :total="dialogtableDataTotal" :isExcel="false"
@handle-search="dialogHandleSearch" ref="dialogSearchFormNew" />
<skeleton v-if="dialogIsSkeleton" style="padding: 16px"></skeleton>
<!-- 列表 -->
<dialog-tables v-if="!dialogIsSkeleton" :indexFixed="true" :tableData="dialogTableData" :forData="forData"
:tableDataTotal="dialogtableDataTotal" :queryParams="dialogQueryParams" @handle-current-change="dialogCurrentChange">
</dialog-tables>
</div>
</el-dialog>
</div>
</template>
<script>
import skeleton from '../component/skeleton';
import mixin from '@/views/detail/party-a/mixins/mixin';
import { getSupplierCooperationRecordListApi } from "@/api/internalCooperation";
import { getAllAreaApi } from "@/api/common";
import { getTreeSelectAreaList } from "@/utils";
import DialogHeadFormNew from "../component/HeadFormNew";
import DialogTables from "../component/Tables";
export default {
name: "cooperationRecord",
mixins: [mixin],
components: {
skeleton,
DialogHeadFormNew,
DialogTables
},
props: ['companyId'],
data() {
return {
queryParams: {
customerId: this.companyId,
pageNum: 1,
pageSize: 10,
},
forData: [
{ label: '工程名称', prop: 'projectName', width: '244', slot: true, showOverflowTooltip: true },
{ label: '合作区域', prop: 'areaName', width: '102' },
{ label: '省份', prop: 'provinceName', width: '102' },
{ label: '城市', prop: 'cityName', width: '102' },
{ label: '项目联系人', prop: 'projectManagerName', width: '86' },
{ label: '联系电话', prop: 'projectManagerPhone', width: '102' },
{ label: '资源平台类型', prop: 'projectType2', width: '98' },
{ label: '合同签订日期', prop: 'signDate', width: '149' },
{ label: '合同总价', prop: 'subcontractValue', width: '79' },
{ label: '结算总价', prop: 'settleValue', width: '79' },
{ label: '分包内容', prop: 'jobScope', width: '126' },
{ label: '工程类型', prop: 'projectType2', width: '78' },
{ label: '队伍完工评价', prop: '', minWidth: '98' },
{ label: '合同完工评价', prop: '', minWidth: '98' },
{ label: '评价有效性', prop: '', minWidth: '86' },
{ label: '无效原因', prop: '', minWidth: '74' },
],
formData: [
{
type: 7, fieldName: 'businessTypes', value: '', placeholder: '项目地区', uid: this.getUid(), options: [], props: {
multiple: true,
value: "value",
label: "value",
// checkStrictly: true
}
},
{ type: 4, fieldName: 'causeAction', value: '', placeholder: '招标品类', options: [], uid: this.getUid() },
{ type: 4, fieldName: 'causeAction', value: '', placeholder: '采购类型', options: [], uid: this.getUid() },
{ type: 3, fieldName: 'advisoryBodyName', value: '', placeholder: '请输入', uid: this.getUid() },
],
//列表
tableLoading: false,
tableData: [],
tableDataTotal: 0,
isSkeleton: true,
areaList: [],
// 合作记录弹窗
cooperationRecordDialog: true,
dialogTitle: "",
dialogQueryParams: {
},
dialogFormData: [
{ type: 4, fieldName: 'causeAction', value: '', placeholder: '合作项目类型', options: [], uid: this.getUid() },
{ type: 6, fieldName: 'causeAction', value: '', placeholder: '合作金额', options: [], uid: this.getUid() },
{ type: 4, fieldName: 'causeAction', value: '', placeholder: '数据来源', options: [], uid: this.getUid() },
{ type: 3, fieldName: 'advisoryBodyName', value: '', placeholder: '请输入', uid: this.getUid() },
],
dialogIsSkeleton: true,
dialogtableDataTotal: 0,
dialogTableData: [],
};
},
//可访问data属性
created() {
this.initDetail();
},
//计算集
computed: {
},
//方法集
methods: {
async initDetail() {
try {
await this.handleQuery();
await this.getAllArea();
} catch (error) {
}
},
async getAllArea() {
try {
const area = await getAllAreaApi();
if (area.code == 200) {
this.areaList = area.data;
this.$set(this.formData[0], "options", this.areaList);
console.log();
}
} catch (error) {
}
},
async handleQuery(params) {
try {
let data = params ? params : this.queryParams;
this.isSkeleton = true;
const res = await getSupplierCooperationRecordListApi(data);
this.tableData = res.rows ? res.rows : [];
this.tableDataTotal = res.total ? res.total : 0;
} catch (error) {
console.log(error);
} finally {
this.isSkeleton = false;
}
},
async handleSearch() {
try {
const areaSearchList = this.$refs["searchFormNew"].$refs["cascader"][0].getCheckedNodes();
if (areaSearchList?.length) {
const valueList = areaSearchList.map(item => item.value);
const result = getTreeSelectAreaList(valueList, this.areaList, "value");
console.log(result);
}
} catch (error) {
}
},
handleExcel() {
},
dialogClose() {
},
dialogHandleSearch() {
},
dialogCurrentChange() {
}
},
}
</script>
<style lang="scss" scoped>
.cooperation-record {
background: #ffffff;
border-radius: 4px;
padding: 16px;
input {
border: 1px solid #efefef;
}
::v-deep .el-form-item {
margin-right: 8px !important;
}
.query-box {
margin: 10px 0 20px;
}
.cell-span {
display: inline-block;
position: relative;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 4;
cursor: pointer;
> span {
display: inline-block;
width: 37px;
position: absolute;
right: 0;
bottom: 0;
background-color: #fff;
z-index: 1;
}
}
@import "@/assets/styles/search-common.scss";
::v-deep .cooperation-record-dialog-container {
.cooperation-record-dialog {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
border-radius: 4px;
margin: 0px !important;
.el-dialog__header {
padding: 20px;
height: 56px;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
border-bottom: 1px solid #eeeeee;
.el-dialog__title {
color: #232323;
font-weight: bold;
line-height: 16px;
}
.el-dialog__headerbtn {
position: static;
width: 16px;
height: 16px;
}
}
.el-dialog__body {
padding: 24px 20px;
box-sizing: border-box;
.cooperation-record-dialog-innner {
width: 100%;
height: 100%;
}
}
}
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment