Commit a9172361 authored by xiongjinke's avatar xiongjinke

修改

parent 5bb5cfe3
...@@ -59,7 +59,7 @@ import BasicIinformation from "./component/basicIinformation" ...@@ -59,7 +59,7 @@ import BasicIinformation from "./component/basicIinformation"
import ElCardinput from "./component/elCardinput" import ElCardinput from "./component/elCardinput"
export default { export default {
name: 'Business', name: 'Business',
props: ['customerIds', 'companyInfo'], props: ['customerIds', 'companyInfo', 'customerInfo'],
components: { components: {
Info, Info,
BasicIinformation, BasicIinformation,
...@@ -99,25 +99,40 @@ export default { ...@@ -99,25 +99,40 @@ export default {
} }
}, },
created() { created() {
this.handleQuery()
this.infos = this.customerInfo
},
mounted(){
this.customerInfos() this.customerInfos()
//企业性质 },
getDictType('company_nature_type').then(result=>{ methods: {
this.companyType.companyNaturelist = result.code == 200 ? result.data:[] async handleQuery() {
let [type1,type2,type3] = await Promise.all([
getDictType('company_nature_type'),
getDictType('company_level_type'),
getDictType('credit_level_type')
])
if(type1.code==200){
type1.data.forEach(item => {
this.companyType.companyNaturelist.push({dictLabel:item.dictLabel,dictValue:item.dictLabel})
}) })
//企业级别 }
getDictType('company_level_type').then(result=>{ if(type2.code==200){
this.companyType.companyLevellist = result.code == 200 ? result.data:[] type2.data.forEach(item => {
this.companyType.companyLevellist.push({dictLabel:item.dictLabel,dictValue:item.dictLabel})
}) })
//资信等级 }
getDictType('credit_level_type').then(result=>{ if(type3.code==200){
this.companyType.creditLevellist = result.code == 200 ? result.data:[] type3.data.forEach(item => {
this.companyType.creditLevellist.push({dictLabel:item.dictLabel,dictValue:item.dictLabel})
}) })
}
this.isInfo = true
}, },
methods: {
customerInfos(){ customerInfos(){
customerInfo(this.customerIds).then(res=>{ customerInfo(this.customerIds).then(res=>{
this.infos = res.data this.infos = res.data
this.isInfo = true
}) })
}, },
focusNowedits(e){ focusNowedits(e){
......
...@@ -33,7 +33,10 @@ ...@@ -33,7 +33,10 @@
</span> </span>
</template> </template>
<template slot="investmentAmount" slot-scope="scope"> <template slot="investmentAmount" slot-scope="scope">
{{ numbers(scope.row.investmentAmount) }} {{ scope.row.investmentAmount ? numbers(scope.row.investmentAmount) : '--' }}
</template>
<template slot="status" slot-scope="scope">
{{ scope.row.status || scope.row.status == 0 ? handleStatus(scope.row.status) : '--' }}
</template> </template>
</tables> </tables>
...@@ -47,70 +50,64 @@ ...@@ -47,70 +50,64 @@
</div> </div>
</template> </template>
<!-- 弹窗关联项目 --> <!-- 弹窗关联项目 -->
<el-drawer <el-dialog
title="添加合作情况" class="cooperate_addhzqk"
size="50%"
:visible.sync="drawer" :visible.sync="drawer"
:direction="direction" :before-close="handleClose"
:with-header="false" width="604px">
:before-close="handleClose"> <div class="poptitle">
<div class="cooperate_addhzqk"> <img src="@/assets/images/economies/icon.png">
<div class="addhzqk_top"> <span>{{ companyInfo.companyName }}</span>
<div class="addhzqk_top_t">
<div class="top_t_h1">
<img src="@/assets/images/economies/icon.png" />{{ companyInfo.companyName }}
</div>
<div class="top_t_close"><i class="el-icon-close" @click="handleClose"></i></div>
</div>
<div class="addhzqk_top_d">
<div class="top_d_item">
法定代表人:<span>{{ companyInfo.corporatePerson }}</span>
</div>
<div class="top_d_item">
注册资本:<span>{{ companyInfo.regCapital }}</span>
</div>
<div class="top_d_item">
注册地址:<span>{{ companyInfo.addressDetail }}</span>
</div>
</div>
</div> </div>
<div class="addhzqk_from"> <div class="addhzqk_from">
<el-form :model="addParam" :rules="rules" ref="addParam" size="small" label-width="126px"> <el-form :model="addParam" :rules="rules" ref="addParam" size="small" label-width="70px">
<el-form-item label="项目名称:" prop="projectName"> <el-form-item label="项目名称:" prop="projectName" label-width="120px">
<el-input v-model="addParam.projectName" placeholder="请输入项目名称" @input="getCompany1"></el-input> <el-input v-model="addParam.projectName" placeholder="请输入项目名称" @input="getCompany1"></el-input>
<div class="resultlist" v-if="showlist1"> <div class="resultlist" v-if="showlist1">
<div v-for="(item,index) in companData1" @click="selCompany1(item)"><span v-html="item"></span></div> <div v-for="(item,index) in companData1" @click="selCompany1(item)"><span v-html="item"></span></div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="业主单位:" prop="ownerCompany"> <div class="erow">
<el-input v-model="addParam.ownerCompany" placeholder="请输入业主单位" @input="getCompany"></el-input> <div class="elcol">
<div class="resultlist" v-if="showlist">
<div v-for="(item,index) in companData" @click="selCompany(item)"><span v-html="item.name"></span></div>
</div>
</el-form-item>
<el-form-item label="项目阶段:" prop="projectStage"> <el-form-item label="项目阶段:" prop="projectStage">
<el-select v-model="addParam.projectStage" style="width: 100%" class="form-content-width" placeholder="请选择项目阶段"> <el-select v-model="addParam.projectStage" style="width: 175px" class="form-content-width" placeholder="请选择项目阶段">
<el-option v-for="(item, index) in projectStage" :key="index" :label="item.dictLabel" :value="item.dictValue" /> <el-option v-for="(item, index) in projectStage" :key="index" :label="item.dictLabel" :value="item.dictValue" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</div>
<div class="elcol">
<el-form-item label="项目类型:" prop="projectType"> <el-form-item label="项目类型:" prop="projectType">
<el-select v-model="addParam.projectType" style="width: 100%" class="form-content-width" placeholder="请选择项目类型"> <el-select v-model="addParam.projectType" style="width: 175px" class="form-content-width" placeholder="请选择项目类型">
<el-option v-for="(item, index) in projectType" :key="index" :label="item.dictLabel" :value="item.dictValue" /> <el-option v-for="(item, index) in projectType" :key="index" :label="item.dictLabel" :value="item.dictValue" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</div>
</div>
<div class="erow">
<div class="elcol">
<el-form-item label="项目类别:" prop="projectCategory"> <el-form-item label="项目类别:" prop="projectCategory">
<el-select v-model="addParam.projectCategory" style="width: 100%" class="form-content-width" placeholder="请选择项目类别"> <el-select v-model="addParam.projectCategory" style="width: 175px" class="form-content-width" placeholder="请选择项目类别">
<el-option v-for="(item, index) in projectCategory" :key="index" :label="item.dictLabel" :value="item.dictValue" /> <el-option v-for="(item, index) in projectCategory" :key="index" :label="item.dictLabel" :value="item.dictValue" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="投资估算(万):" prop="investmentAmount"> </div>
<el-input v-model="addParam.investmentAmount" placeholder="请输入投资估算" @input="number"></el-input> <div class="elcol">
</el-form-item>
<el-form-item label="可见范围:" prop="isPrivate"> <el-form-item label="可见范围:" prop="isPrivate">
<el-select v-model="addParam.isPrivate" style="width: 100%" class="form-content-width" placeholder="请选择"> <el-select v-model="addParam.isPrivate" style="width: 175px" class="form-content-width" placeholder="请选择">
<el-option v-for="(item, index) in isPrivate" :key="index" :label="item.name" :value="item.value" /> <el-option v-for="(item, index) in isPrivate" :key="index" :label="item.name" :value="item.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</div>
</div>
<el-row>
<el-col :span="11">
<el-form-item label="投资估算(万):" prop="investmentAmount" label-width="120px">
<el-input v-model="addParam.investmentAmount" placeholder="请输入投资估算" style="width: 175px" @input="number"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item style="text-align: right;"> <el-form-item style="text-align: right;">
<el-button @click="handleClose">关闭</el-button> <el-button @click="handleClose">关闭</el-button>
<el-button type="primary" @click="submitForm">添加</el-button> <el-button type="primary" @click="submitForm">添加</el-button>
...@@ -118,8 +115,7 @@ ...@@ -118,8 +115,7 @@
</el-form> </el-form>
</div> </div>
</div> </el-dialog>
</el-drawer>
</div> </div>
</template> </template>
...@@ -146,7 +142,7 @@ export default { ...@@ -146,7 +142,7 @@ export default {
components: { components: {
Detail Detail
}, },
props: ['customerIds','companyInfo','cooDetail'], props: ['customerIds','companyInfo','cooDetail','customerInfo'],
data() { data() {
return { return {
ifEmpty:false, ifEmpty:false,
...@@ -159,7 +155,7 @@ export default { ...@@ -159,7 +155,7 @@ export default {
{label: '项目名称', prop: 'projectName', slot: true}, {label: '项目名称', prop: 'projectName', slot: true},
{label: '项目阶段', prop: 'projectStage', width: '120'}, {label: '项目阶段', prop: 'projectStage', width: '120'},
{label: '投资金额(万元)', prop: 'investmentAmount', width: '140', slot: true}, {label: '投资金额(万元)', prop: 'investmentAmount', width: '140', slot: true},
{label: '项目状态', prop: 'status', width: '90'} {label: '项目状态', prop: 'status', width: '90', slot: true}
], ],
formData: [ formData: [
{ type: 1, fieldName: 'projectStage', value: '', placeholder: '项目阶段', options: []}, { type: 1, fieldName: 'projectStage', value: '', placeholder: '项目阶段', options: []},
...@@ -174,6 +170,7 @@ export default { ...@@ -174,6 +170,7 @@ export default {
tableDataTotal:0, tableDataTotal:0,
//弹窗-关联项目 //弹窗-关联项目
drawer: false, drawer: false,
drawer1: false,
direction: 'rtl', direction: 'rtl',
//业主单位 //业主单位
showlist:false, showlist:false,
...@@ -216,7 +213,7 @@ export default { ...@@ -216,7 +213,7 @@ export default {
} }
],//可见访问 ],//可见访问
//客户详情 //客户详情
info: {}, info: this.customerInfo,
// //
detailId: null, detailId: null,
isDetailId: false, isDetailId: false,
...@@ -229,7 +226,6 @@ export default { ...@@ -229,7 +226,6 @@ export default {
}, },
created() { created() {
this.list() this.list()
this.customerInfos()
//项目阶段 //项目阶段
this.handleOptions('project_stage_type',0) this.handleOptions('project_stage_type',0)
//项目状态 //项目状态
...@@ -269,12 +265,6 @@ export default { ...@@ -269,12 +265,6 @@ export default {
} }
}) })
}, },
// 客户详情
customerInfos(){
customerInfo(this.queryParams.customerId).then(res=>{
this.info = res.data
})
},
//弹窗-添加项目 //弹窗-添加项目
handleClose(formName) { handleClose(formName) {
...@@ -355,6 +345,13 @@ export default { ...@@ -355,6 +345,13 @@ export default {
} }
}) })
}, },
//处理项目状态
handleStatus(val){
let da = this.formData[1].options.find(option => option.value == val)
if(da){
return da.name
}
},
//输入数字 //输入数字
number(value){ number(value){
this.addParam.investmentAmount = value.replace(/^\D*(\d*(?:\.\d{0,6})?).*$/g, '$1')//输入2位小数 this.addParam.investmentAmount = value.replace(/^\D*(\d*(?:\.\d{0,6})?).*$/g, '$1')//输入2位小数
...@@ -472,6 +469,31 @@ export default { ...@@ -472,6 +469,31 @@ export default {
} }
// 弹窗 // 弹窗
.cooperate_addhzqk{ .cooperate_addhzqk{
.poptitle {
line-height: 48px;
border-bottom: 1px solid #E1E1E1;
height: 48px;
position: absolute;
top: 0;
left: 0;
width: 100%;
img {
width: 17px;
margin: 16px;
float: left;
}
span {
font-weight: bold;
font-size: 16px;
color: #232323;
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
width: 385px;
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.addhzqk_top{ .addhzqk_top{
padding: 14px 16px; padding: 14px 16px;
border-bottom: 1px solid #E1E1E1; border-bottom: 1px solid #E1E1E1;
...@@ -528,7 +550,7 @@ export default { ...@@ -528,7 +550,7 @@ export default {
} }
} }
.addhzqk_from{ .addhzqk_from{
padding: 26px 16px; //padding: 26px 16px;
::v-deep .el-form-item__label{ ::v-deep .el-form-item__label{
padding: 0; padding: 0;
font-weight: 400; font-weight: 400;
...@@ -538,8 +560,58 @@ export default { ...@@ -538,8 +560,58 @@ export default {
content: "\e78f"; content: "\e78f";
color: rgba(35,35,35,0.4); color: rgba(35,35,35,0.4);
} }
::v-deep .el-form-item__label{
padding: 0;
}
::v-deep .el-form-item{
margin-right: 0 !important;
}
::v-deep .el-input{
.el-input__inner{
height: 32px;
line-height: 32px;
}
}
.erow{
display:flex;
.elcol{
&:nth-child(1){
margin-left: 50px
}
&:nth-child(2){
margin-left: 24px
}
}
} }
} }
::v-deep .el-dialog__body{
padding-top: 40px;
padding-bottom: 1px;
}
::v-deep .el-dialog__headerbtn{
z-index: 9;
}
}
::v-deep .el-dialog{
display: flex;
display: -ms-flex; /* 兼容IE */
flex-direction: column;
-ms-flex-direction: column; /* 兼容IE */
margin:0 !important;
position:absolute;
top:50%;
left:50%;
transform:translate(-50%,-50%);
max-height:calc(100% - 30px);
max-width:calc(100% - 30px);
}
::v-deep .el-dialog .el-dialog__body{
max-height: 100%;
flex: 1;
-ms-flex: 1 1 auto; /* 兼容IE */
overflow-y: auto;
overflow-x: hidden;
}
} }
::v-deep .cooperate-detail{ ::v-deep .cooperate-detail{
......
...@@ -320,5 +320,7 @@ export default { ...@@ -320,5 +320,7 @@ export default {
::v-deep .el-table__fixed::before, ::v-deep .el-table__fixed-right::before{ ::v-deep .el-table__fixed::before, ::v-deep .el-table__fixed-right::before{
background-color:unset; background-color:unset;
} }
::v-deep .el-dialog__headerbtn{
z-index: 9;
}
</style> </style>
...@@ -44,11 +44,11 @@ ...@@ -44,11 +44,11 @@
<OpenacourtsessionNotice v-if="currentPath.pathName=='openacourtsessionNotice'" :company-id="companyId" /> <OpenacourtsessionNotice v-if="currentPath.pathName=='openacourtsessionNotice'" :company-id="companyId" />
<template v-if="customerId"> <template v-if="customerId">
<!-- 商务信息 --> <!-- 商务信息 -->
<Business v-if="currentPath.pathName=='business'" :customer-ids="customerId" :companyInfo="companyInfo" /> <Business v-if="currentPath.pathName=='business'" :customer-ids="customerId" :companyInfo="companyInfo" :customerInfo="customerInfo" />
<!-- 招标偏好 --> <!-- 招标偏好 -->
<Preference v-if="currentPath.pathName=='preference'" :customer-ids="customerId" /> <Preference v-if="currentPath.pathName=='preference'" :customer-ids="customerId" :customerInfo="customerInfo" />
<!-- 合作情况 --> <!-- 合作情况 -->
<Cooperate v-if="currentPath.pathName=='cooperate'" :customer-ids="customerId" :companyInfo="companyInfo" :cooDetail="cooDetail" @detail="cooperateDetail" /> <Cooperate v-if="currentPath.pathName=='cooperate'" :customer-ids="customerId" :companyInfo="companyInfo" :cooDetail="cooDetail" :customerInfo="customerInfo" @detail="cooperateDetail" />
<!-- 决策链条 --> <!-- 决策链条 -->
<DecisionMaking v-if="currentPath.pathName=='decisionMaking'" :customer-ids="customerId" :companyInfo="companyInfo" /> <DecisionMaking v-if="currentPath.pathName=='decisionMaking'" :customer-ids="customerId" :companyInfo="companyInfo" />
<!-- 跟进记录 --> <!-- 跟进记录 -->
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
<script> <script>
import { idRemark } from '@/api/common' import { idRemark } from '@/api/common'
import { infoHeader } from '@/api/detail/party-a/index' import { infoHeader } from '@/api/detail/party-a/index'
import { customerInfo } from '@/api/detail/party-a/cooperate'
import elementResizeDetectorMaker from "element-resize-detector" import elementResizeDetectorMaker from "element-resize-detector"
import Header from "./component/Header" import Header from "./component/Header"
import SideBar from "./component/Sidebar" import SideBar from "./component/Sidebar"
...@@ -146,6 +147,7 @@ export default { ...@@ -146,6 +147,7 @@ export default {
data() { data() {
return { return {
companyInfo: {}, companyInfo: {},
customerInfo: {},
companyId: '', //企业Id(测试默认3068) companyId: '', //企业Id(测试默认3068)
customerId: '', //企业Id(测试默认'a00d582a6041f32c16aac804e4924736') customerId: '', //企业Id(测试默认'a00d582a6041f32c16aac804e4924736')
currentPath: { currentPath: {
...@@ -176,9 +178,6 @@ export default { ...@@ -176,9 +178,6 @@ export default {
if (this.$route.query.path) { // 获取跳转对应板块 if (this.$route.query.path) { // 获取跳转对应板块
this.currentPath.pathName = this.$route.query.path this.currentPath.pathName = this.$route.query.path
} }
if (this.$route.query.customerId) { // 判断是否显示
this.customerId = this.$route.query.customerId
}
}, },
mounted() { mounted() {
}, },
...@@ -197,6 +196,7 @@ export default { ...@@ -197,6 +196,7 @@ export default {
this.listenSider() this.listenSider()
}) })
this.handleQuery() this.handleQuery()
this.association(this.$route.query.customerId)
} }
}, },
async handleQuery() { async handleQuery() {
...@@ -216,7 +216,23 @@ export default { ...@@ -216,7 +216,23 @@ export default {
}, },
closeDetail(){ closeDetail(){
this.cooDetail = false this.cooDetail = false
},
// 判断客户是否关联显示修改
association(id){
customerInfo(id).then(res=>{
if(res.code == 200){
if(res.data.companyId == this.companyId && res.data.userId == this.$store.state.user.userId){
this.customerInfo = res.data
this.customerId = res.data.customerId
}else{
this.currentPath.pathName = 'overview'
}
} }
}).catch(err=>{
this.currentPath.pathName = 'overview'
})
}
} }
} }
</script> </script>
......
...@@ -160,7 +160,7 @@ export default { ...@@ -160,7 +160,7 @@ export default {
components: { components: {
}, },
props: ['customerIds'], props: ['customerIds','customerInfo'],
data() { data() {
return { return {
autosize: { autosize: {
...@@ -181,6 +181,9 @@ export default { ...@@ -181,6 +181,9 @@ export default {
} }
}, },
created() { created() {
this.queryParams = this.customerInfo
},
mounted(){
this.customerInfos() this.customerInfos()
}, },
computed: { computed: {
......
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