Commit a9172361 authored by xiongjinke's avatar xiongjinke

修改

parent 5bb5cfe3
......@@ -59,7 +59,7 @@ import BasicIinformation from "./component/basicIinformation"
import ElCardinput from "./component/elCardinput"
export default {
name: 'Business',
props: ['customerIds', 'companyInfo'],
props: ['customerIds', 'companyInfo', 'customerInfo'],
components: {
Info,
BasicIinformation,
......@@ -99,25 +99,40 @@ export default {
}
},
created() {
this.handleQuery()
this.infos = this.customerInfo
},
mounted(){
this.customerInfos()
//企业性质
getDictType('company_nature_type').then(result=>{
this.companyType.companyNaturelist = result.code == 200 ? result.data:[]
},
methods: {
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=>{
this.companyType.companyLevellist = result.code == 200 ? result.data:[]
}
if(type2.code==200){
type2.data.forEach(item => {
this.companyType.companyLevellist.push({dictLabel:item.dictLabel,dictValue:item.dictLabel})
})
//资信等级
getDictType('credit_level_type').then(result=>{
this.companyType.creditLevellist = result.code == 200 ? result.data:[]
}
if(type3.code==200){
type3.data.forEach(item => {
this.companyType.creditLevellist.push({dictLabel:item.dictLabel,dictValue:item.dictLabel})
})
}
this.isInfo = true
},
methods: {
customerInfos(){
customerInfo(this.customerIds).then(res=>{
this.infos = res.data
this.isInfo = true
})
},
focusNowedits(e){
......
......@@ -33,7 +33,10 @@
</span>
</template>
<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>
</tables>
......@@ -47,70 +50,64 @@
</div>
</template>
<!-- 弹窗关联项目 -->
<el-drawer
title="添加合作情况"
size="50%"
<el-dialog
class="cooperate_addhzqk"
:visible.sync="drawer"
:direction="direction"
:with-header="false"
:before-close="handleClose">
<div class="cooperate_addhzqk">
<div class="addhzqk_top">
<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>
:before-close="handleClose"
width="604px">
<div class="poptitle">
<img src="@/assets/images/economies/icon.png">
<span>{{ companyInfo.companyName }}</span>
</div>
<div class="addhzqk_from">
<el-form :model="addParam" :rules="rules" ref="addParam" size="small" label-width="126px">
<el-form-item label="项目名称:" prop="projectName">
<el-form :model="addParam" :rules="rules" ref="addParam" size="small" label-width="70px">
<el-form-item label="项目名称:" prop="projectName" label-width="120px">
<el-input v-model="addParam.projectName" placeholder="请输入项目名称" @input="getCompany1"></el-input>
<div class="resultlist" v-if="showlist1">
<div v-for="(item,index) in companData1" @click="selCompany1(item)"><span v-html="item"></span></div>
</div>
</el-form-item>
<el-form-item label="业主单位:" prop="ownerCompany">
<el-input v-model="addParam.ownerCompany" placeholder="请输入业主单位" @input="getCompany"></el-input>
<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>
<div class="erow">
<div class="elcol">
<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-select>
</el-form-item>
</div>
<div class="elcol">
<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-select>
</el-form-item>
</div>
</div>
<div class="erow">
<div class="elcol">
<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-select>
</el-form-item>
<el-form-item label="投资估算(万):" prop="investmentAmount">
<el-input v-model="addParam.investmentAmount" placeholder="请输入投资估算" @input="number"></el-input>
</el-form-item>
</div>
<div class="elcol">
<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-select>
</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-button @click="handleClose">关闭</el-button>
<el-button type="primary" @click="submitForm">添加</el-button>
......@@ -118,8 +115,7 @@
</el-form>
</div>
</div>
</el-drawer>
</el-dialog>
</div>
</template>
......@@ -146,7 +142,7 @@ export default {
components: {
Detail
},
props: ['customerIds','companyInfo','cooDetail'],
props: ['customerIds','companyInfo','cooDetail','customerInfo'],
data() {
return {
ifEmpty:false,
......@@ -159,7 +155,7 @@ export default {
{label: '项目名称', prop: 'projectName', slot: true},
{label: '项目阶段', prop: 'projectStage', width: '120'},
{label: '投资金额(万元)', prop: 'investmentAmount', width: '140', slot: true},
{label: '项目状态', prop: 'status', width: '90'}
{label: '项目状态', prop: 'status', width: '90', slot: true}
],
formData: [
{ type: 1, fieldName: 'projectStage', value: '', placeholder: '项目阶段', options: []},
......@@ -174,6 +170,7 @@ export default {
tableDataTotal:0,
//弹窗-关联项目
drawer: false,
drawer1: false,
direction: 'rtl',
//业主单位
showlist:false,
......@@ -216,7 +213,7 @@ export default {
}
],//可见访问
//客户详情
info: {},
info: this.customerInfo,
//
detailId: null,
isDetailId: false,
......@@ -229,7 +226,6 @@ export default {
},
created() {
this.list()
this.customerInfos()
//项目阶段
this.handleOptions('project_stage_type',0)
//项目状态
......@@ -269,12 +265,6 @@ export default {
}
})
},
// 客户详情
customerInfos(){
customerInfo(this.queryParams.customerId).then(res=>{
this.info = res.data
})
},
//弹窗-添加项目
handleClose(formName) {
......@@ -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){
this.addParam.investmentAmount = value.replace(/^\D*(\d*(?:\.\d{0,6})?).*$/g, '$1')//输入2位小数
......@@ -472,6 +469,31 @@ export default {
}
// 弹窗
.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{
padding: 14px 16px;
border-bottom: 1px solid #E1E1E1;
......@@ -528,7 +550,7 @@ export default {
}
}
.addhzqk_from{
padding: 26px 16px;
//padding: 26px 16px;
::v-deep .el-form-item__label{
padding: 0;
font-weight: 400;
......@@ -538,8 +560,58 @@ export default {
content: "\e78f";
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{
......
......@@ -320,5 +320,7 @@ export default {
::v-deep .el-table__fixed::before, ::v-deep .el-table__fixed-right::before{
background-color:unset;
}
::v-deep .el-dialog__headerbtn{
z-index: 9;
}
</style>
......@@ -44,11 +44,11 @@
<OpenacourtsessionNotice v-if="currentPath.pathName=='openacourtsessionNotice'" :company-id="companyId" />
<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" />
<!-- 跟进记录 -->
......@@ -64,6 +64,7 @@
<script>
import { idRemark } from '@/api/common'
import { infoHeader } from '@/api/detail/party-a/index'
import { customerInfo } from '@/api/detail/party-a/cooperate'
import elementResizeDetectorMaker from "element-resize-detector"
import Header from "./component/Header"
import SideBar from "./component/Sidebar"
......@@ -146,6 +147,7 @@ export default {
data() {
return {
companyInfo: {},
customerInfo: {},
companyId: '', //企业Id(测试默认3068)
customerId: '', //企业Id(测试默认'a00d582a6041f32c16aac804e4924736')
currentPath: {
......@@ -176,9 +178,6 @@ export default {
if (this.$route.query.path) { // 获取跳转对应板块
this.currentPath.pathName = this.$route.query.path
}
if (this.$route.query.customerId) { // 判断是否显示
this.customerId = this.$route.query.customerId
}
},
mounted() {
},
......@@ -197,6 +196,7 @@ export default {
this.listenSider()
})
this.handleQuery()
this.association(this.$route.query.customerId)
}
},
async handleQuery() {
......@@ -216,7 +216,23 @@ export default {
},
closeDetail(){
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>
......
......@@ -160,7 +160,7 @@ export default {
components: {
},
props: ['customerIds'],
props: ['customerIds','customerInfo'],
data() {
return {
autosize: {
......@@ -181,6 +181,9 @@ export default {
}
},
created() {
this.queryParams = this.customerInfo
},
mounted(){
this.customerInfos()
},
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