Commit a549fdd9 authored by huangjie's avatar huangjie

联系人

parent 27d03bfd
......@@ -65,7 +65,8 @@ export function removeLabel(param) {
//查询项目联系人
export function getLXR(param) {
return request({
url: '/business/contacts/list',
// url: '/business/contacts/list',
url: '/contact/info/list',
method: 'GET',
params:param
})
......@@ -73,8 +74,9 @@ export function getLXR(param) {
//修改项目联系人
export function editLXR(param) {
return request({
url: '/business/contacts/edit',
method: 'POST',
// url: '/business/contacts/edit',
url: '/contact/info',
method: 'PUT',
data:param
})
}
......@@ -82,12 +84,21 @@ export function editLXR(param) {
//新增项目联系人
export function addLXR(param) {
return request({
url: '/business/contacts/add',
// url: '/business/contacts/add',
url: '/contact/info',
method: 'POST',
data:param
})
}
//删除项目联系人
export function delLXR(param) {
return request({
url: '/contact/info/'+param,
method: 'DELETE',
})
}
//跟进记录
export function getGJJL(param) {
return request({
......
......@@ -11,7 +11,7 @@
<div class="flex-box avatar-wrapper">
<img v-if="avatar" class="pic-avatar" :src="avatar">
<span v-else class="user-avatar">{{ name&&name.slice(0, 1).toUpperCase() }}</span>
{{ name }}
{{ name.length>10?name.slice(0, 10)+'...':name}}
</div>
<el-dropdown-menu slot="dropdown" class="user-dropdown">
<router-link to="/user/profile">
......
......@@ -384,14 +384,14 @@ export default {
}
}
.alltags{
position: absolute;
position: fixed;
align-items: center;
border-radius: 9px;
height: 17px;
justify-content: center;
width: 36px;
right: -130px;
bottom: 0px;
right: 10px;
top: 37px;
cursor: pointer;
text-align: center;
&:hover{
......
<template>
<div class="decisionMaking">
<!--<div class="decisionMaking">-->
<template v-if="ifEmpty">
<div class="flex-box query-box">
<div class="flex-box query-params"></div>
<div class="flex-box query-add">
<el-button type="primary" icon="el-icon-plus" @click="opennew">新增联系人</el-button>
</div>
</div>
<!--<template v-if="ifEmpty">-->
<!--<div class="flex-box query-box">-->
<!--<div class="flex-box query-params"></div>-->
<!--<div class="flex-box query-add">-->
<!--<el-button type="primary" icon="el-icon-plus" @click="opennew">新增联系人1</el-button>-->
<!--</div>-->
<!--</div>-->
<div class="table-item">
<tables
:indexFixed="true"
:tableLoading="tableLoading"
:tableData="tableData"
:forData="forData"
:tableDataTotal="tableDataTotal"
:queryParams="queryParams"
@handle-current-change="handleCurrentChange"
/>
</div>
<!--<div class="table-item">-->
<!--<tables-->
<!--:indexFixed="true"-->
<!--:tableLoading="tableLoading"-->
<!--:tableData="tableData"-->
<!--:forData="forData"-->
<!--:tableDataTotal="tableDataTotal"-->
<!--:queryParams="queryParams"-->
<!--@handle-current-change="handleCurrentChange"-->
<!--/>-->
<!--</div>-->
</template>
<template v-else>
<div class="cooperate_empty">
<img src="@/assets/images/project/empty.png"/>
<div class="empty-t">暂无客户联系人数据</div>
<div class="empty-d">抱歉,你还未添加客户联系人,快去添加吧</div>
<el-button type="primary" class="empty-b" @click="opennew">添加联系人</el-button>
</div>
</template>
<!--</template>-->
<!--<template v-else>-->
<!--<div class="cooperate_empty">-->
<!--<img src="@/assets/images/project/empty.png"/>-->
<!--<div class="empty-t">暂无客户联系人数据</div>-->
<!--<div class="empty-d">抱歉,你还未添加客户联系人,快去添加吧</div>-->
<!--<el-button type="primary" class="empty-b" @click="opennew">添加联系人</el-button>-->
<!--</div>-->
<!--</template>-->
<!-- 弹窗添加联系人 -->
<el-dialog
class="popups1"
:visible.sync="dialogVisible"
:before-close="cancel"
width="464px">
<div class="poptitle">
<img src="@/assets/images/economies/icon.png">
<span>{{ companyInfo && companyInfo.companyName || customerInfo.companyName }}</span>
</div>
<el-form :model="addRorm" :rules="addRules" ref="addRorm" class="popform" label-width="90px">
<el-form-item label="姓名:" prop="name">
<el-input v-model="addRorm.name" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="角色:" prop="role">
<el-input v-model="addRorm.role" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="职位:" prop="workUnit">
<el-input v-model="addRorm.workUnit" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="公司/机关:" prop="position">
<el-input v-model="addRorm.position" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="联系方式:" prop="contactInformation">
<el-input v-model="addRorm.contactInformation" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="备注:" prop="remark">
<el-input v-model="addRorm.remark" placeholder="请输入"></el-input>
</el-form-item>
<div class="popbot">
<div class="btn btn_cancel h32" @click="cancel">返回</div>
<div class="btn btn_primary h32" @click="add">保存</div>
</div>
</el-form>
</el-dialog>
<!--&lt;!&ndash; 弹窗添加联系人 &ndash;&gt;-->
<!--<el-dialog-->
<!--class="popups1"-->
<!--:visible.sync="dialogVisible"-->
<!--:before-close="cancel"-->
<!--width="464px">-->
<!--<div class="poptitle">-->
<!--<img src="@/assets/images/economies/icon.png">-->
<!--<span>{{ companyInfo && companyInfo.companyName || customerInfo.companyName }}</span>-->
<!--</div>-->
<!--<el-form :model="addRorm" :rules="addRules" ref="addRorm" class="popform" label-width="90px">-->
<!--<el-form-item label="姓名:" prop="name">-->
<!--<el-input v-model="addRorm.name" placeholder="请输入"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="角色:" prop="role">-->
<!--<el-input v-model="addRorm.role" placeholder="请输入"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="职位:" prop="workUnit">-->
<!--<el-input v-model="addRorm.workUnit" placeholder="请输入"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="公司/机关:" prop="position">-->
<!--<el-input v-model="addRorm.position" placeholder="请输入"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="联系方式:" prop="contactInformation">-->
<!--<el-input v-model="addRorm.contactInformation" placeholder="请输入"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="备注:" prop="remark">-->
<!--<el-input v-model="addRorm.remark" placeholder="请输入"></el-input>-->
<!--</el-form-item>-->
<!--<div class="popbot">-->
<!--<div class="btn btn_cancel h32" @click="cancel">返回</div>-->
<!--<div class="btn btn_primary h32" @click="add">保存</div>-->
<!--</div>-->
<!--</el-form>-->
<!--</el-dialog>-->
</div>
<!--</div>-->
<lxr :isDisabled='isDisabled' :detailId="detailId" :customname="companyInfo.companyName" listtype="custom"></lxr>
</template>
<script>
import Tables from "../component/Tables"
import {
getList,
addChain
} from '@/api/detail/party-a/decisionMaking'
// import Tables from "../component/Tables"
// import {
// getList,
// addChain
// } from '@/api/detail/party-a/decisionMaking'
import lxr from '../../../project/projectList/component/lxr.vue'
export default {
name: 'DecisionMaking',
components: {
Tables
// Tables
lxr
},
props: ['customerIds','companyInfo','customerInfo'],
data() {
return {
ifEmpty:false,
queryParams:{
customerId:this.customerIds,
pageNum:1,
pageSize:20,
},
forData: [
{label: '姓名', prop: 'name', width: '124'},
{label: '角色', prop: 'role', width: '110'},
{label: '公司/机关', prop: 'position', width: '268'},
{label: '职位', prop: 'workUnit', width: '110'},
{label: '联系方式', prop: 'contactInformation', width: '105'},
{label: '内部维护人', prop: 'updateBy', width: '100'},
{label: '备注', prop: 'remark'},
],
addRorm: {
customerId:this.customerIds,
name:'',
role:'',
workUnit:'',
position:'',
contactInformation:'',
remark:'',
},
addRules:{
name: [
{ required: true, message: '请输入姓名', trigger: 'blur' },
],
},
stageOptions:[],
statusOptions:[],
//列表
tableLoading:false,
tableData:[],
tableDataTotal:0,
//弹窗
dialogVisible: false,
isDisabled:false,
detailId:this.customerIds,
// ifEmpty:false,
// queryParams:{
// customerId:this.customerIds,
// pageNum:1,
// pageSize:20,
// },
// forData: [
// {label: '姓名', prop: 'name', width: '124'},
// {label: '角色', prop: 'role', width: '110'},
// {label: '公司/机关', prop: 'position', width: '268'},
// {label: '职位', prop: 'workUnit', width: '110'},
// {label: '联系方式', prop: 'contactInformation', width: '105'},
// {label: '内部维护人', prop: 'updateBy', width: '100'},
// {label: '备注', prop: 'remark'},
// ],
// addRorm: {
// customerId:this.customerIds,
// name:'',
// role:'',
// workUnit:'',
// position:'',
// contactInformation:'',
// remark:'',
// },
// addRules:{
// name: [
// { required: true, message: '请输入姓名', trigger: 'blur' },
// ],
// },
// stageOptions:[],
// statusOptions:[],
// //列表
// tableLoading:false,
// tableData:[],
// tableDataTotal:0,
// //弹窗
// dialogVisible: false,
}
},
created() {
this.list();
// this.list();
},
computed: {
},
methods: {
list(){
this.tableLoading = true
getList(this.queryParams).then((res) => {
if(res.code == 200){
if(res.rows.length >0){
this.tableData = res.rows
this.tableDataTotal = res.total
this.ifEmpty = true
}
this.tableLoading = false
}
})
},
//分页
handleCurrentChange(e){
this.queryParams.pageNum = e
this.list()
},
add(){
this.$refs.addRorm.validate((valid) => {
if (valid) {
addChain(this.addRorm).then((res) => {
if(res.data){
this.$message({
message: '新增成功',
type: 'success'
});
this.cancel()
this.list()
}else{
this.$message({
message: res.msg,
type: 'error'
});
}
})
}
});
},
cancel(){
this.$refs.addRorm.resetFields();
this.dialogVisible = false
},
//打开新建窗口
opennew(){
this.dialogVisible = true
},
// list(){
// this.tableLoading = true
// getList(this.queryParams).then((res) => {
// if(res.code == 200){
// if(res.rows.length >0){
// this.tableData = res.rows
// this.tableDataTotal = res.total
// this.ifEmpty = true
// }
// this.tableLoading = false
// }
// })
// },
// //分页
// handleCurrentChange(e){
// this.queryParams.pageNum = e
// this.list()
// },
// add(){
// this.$refs.addRorm.validate((valid) => {
// if (valid) {
// addChain(this.addRorm).then((res) => {
// if(res.data){
// this.$message({
// message: '新增成功',
// type: 'success'
// });
// this.cancel()
// this.list()
// }else{
// this.$message({
// message: res.msg,
// type: 'error'
// });
// }
// })
// }
// });
// },
// cancel(){
// this.$refs.addRorm.resetFields();
// this.dialogVisible = false
// },
// //打开新建窗口
// opennew(){
// this.dialogVisible = true
// },
}
}
</script>
<style lang="scss" scoped>
.decisionMaking{
background: #ffffff;
border-radius: 4px;
padding: 16px;
input{
border: 1px solid #EFEFEF;
}
::v-deep .el-form-item{
margin-bottom: 16px;
}
::v-deep .el-input__inner{
border-radius: 2px 0 2px 0;
height: 32px;
line-height: 32px;
}
.cooperate-name{
::v-deep .el-form-item__content{
display: flex;
span{
width: 60px;
height: 32px;
background: #F5F5F5;
text-align: center;
color: #0081FF;
border: 1px solid #EFEFEF;
border-left: 0;
cursor: pointer;
}
}
/*.decisionMaking{*/
/*background: #ffffff;*/
/*border-radius: 4px;*/
/*padding: 16px;*/
/*input{*/
/*border: 1px solid #EFEFEF;*/
/*}*/
/*::v-deep .el-form-item{*/
/*margin-bottom: 16px;*/
/*}*/
/*::v-deep .el-input__inner{*/
/*border-radius: 2px 0 2px 0;*/
/*height: 32px;*/
/*line-height: 32px;*/
/*}*/
/*.cooperate-name{*/
/*::v-deep .el-form-item__content{*/
/*display: flex;*/
/*span{*/
/*width: 60px;*/
/*height: 32px;*/
/*background: #F5F5F5;*/
/*text-align: center;*/
/*color: #0081FF;*/
/*border: 1px solid #EFEFEF;*/
/*border-left: 0;*/
/*cursor: pointer;*/
/*}*/
/*}*/
}
.query-add{
button{
width: 124px;
line-height: 32px;
height: 32px;
background: #0081FF;
border-radius: 2px 2px 2px 2px;
padding: 0;
color: #ffffff;
span{
color: #ffff;
margin-left: 4px;
}
}
}
.cooperate_empty{
text-align: center;
height: calc(100vh - 170px);
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
img{
width: 108px;
height: 108px;
border-radius: 50%;
margin-bottom: 24px;
}
.empty-t{
font-size: 16px;
color: #333333;
margin-bottom: 8px;
}
.empty-d{
font-size: 14px;
font-weight: 400;
color: #999999;
margin-bottom: 24px;
}
.empty-b{
width: 116px;
height: 36px;
background: #0081FF;
border-radius: 4px;
padding: 0;
}
}
.table-item{
margin-top: 10px;
}
// 弹窗
.popups1{
.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;
}
}
::v-deep .el-dialog__body{
padding: 24px 24px 18px;
}
.popform {
padding-top: 14px;
::v-deep .el-form-item__label{
padding:0;
}
.row {
padding-bottom: 16px;
.left {
width: 137px;
display: inline-block;
text-align: right;
opacity: 0.8;
}
::v-deep .el-input {
display: inline-block;
width: 240px;
}
}
.popbot {
text-align: right;
padding-top: 8px;
}
}
}
}
::v-deep .el-table__fixed::before, ::v-deep .el-table__fixed-right::before{
background-color:unset;
}
::v-deep .el-dialog__headerbtn{
z-index: 9;
}
/*}*/
/*.query-add{*/
/*button{*/
/*width: 124px;*/
/*line-height: 32px;*/
/*height: 32px;*/
/*background: #0081FF;*/
/*border-radius: 2px 2px 2px 2px;*/
/*padding: 0;*/
/*color: #ffffff;*/
/*span{*/
/*color: #ffff;*/
/*margin-left: 4px;*/
/*}*/
/*}*/
/*}*/
/*.cooperate_empty{*/
/*text-align: center;*/
/*height: calc(100vh - 170px);*/
/*display: flex;*/
/*align-items: center;*/
/*justify-content: center;*/
/*flex-direction: column;*/
/*img{*/
/*width: 108px;*/
/*height: 108px;*/
/*border-radius: 50%;*/
/*margin-bottom: 24px;*/
/*}*/
/*.empty-t{*/
/*font-size: 16px;*/
/*color: #333333;*/
/*margin-bottom: 8px;*/
/*}*/
/*.empty-d{*/
/*font-size: 14px;*/
/*font-weight: 400;*/
/*color: #999999;*/
/*margin-bottom: 24px;*/
/*}*/
/*.empty-b{*/
/*width: 116px;*/
/*height: 36px;*/
/*background: #0081FF;*/
/*border-radius: 4px;*/
/*padding: 0;*/
/*}*/
/*}*/
/*.table-item{*/
/*margin-top: 10px;*/
/*}*/
/*// 弹窗*/
/*.popups1{*/
/*.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;*/
/*}*/
/*}*/
/*::v-deep .el-dialog__body{*/
/*padding: 24px 24px 18px;*/
/*}*/
/*.popform {*/
/*padding-top: 14px;*/
/*::v-deep .el-form-item__label{*/
/*padding:0;*/
/*}*/
/*.row {*/
/*padding-bottom: 16px;*/
/*.left {*/
/*width: 137px;*/
/*display: inline-block;*/
/*text-align: right;*/
/*opacity: 0.8;*/
/*}*/
/*::v-deep .el-input {*/
/*display: inline-block;*/
/*width: 240px;*/
/*}*/
/*}*/
/*.popbot {*/
/*text-align: right;*/
/*padding-top: 8px;*/
/*}*/
/*}*/
/*}*/
/*}*/
/*::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>
......@@ -26,39 +26,37 @@
<!--<div class="btn btn_primary h36 w102" @click="opennew" v-if="isDisableds == false">新增联系人</div>-->
<!--</div>-->
<!--</template>-->
<el-table-column
prop="name"
label="姓名"
width="113">
<el-table-column label="序号" width="60">
<template slot-scope="scope">
{{scope.row.name || '--'}}
<span>{{(searchParam.pageNum - 1) *searchParam.pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column
prop="name"
label="操作"
width="118">
label="姓名"
width="113">
<template slot-scope="scope">
<div class="edit" @click="getDetail(scope.row)">
<img src="@/assets/images/project/edit.png">
<span>编辑</span>
</div>
<div class="wordprimary"><span @click="getDetail(scope.row)">{{scope.row.name || '--'}} </span><img v-if="isDisabled == false" @click="deltip(scope.row.id)" src="@/assets/images/delete.png"></div>
</template>
</el-table-column>
<!--<el-table-column-->
<!--prop="name"-->
<!--label="操作"-->
<!--width="118">-->
<!--<template slot-scope="scope">-->
<!--<div class="edit" @click="getDetail(scope.row)">-->
<!--<img src="@/assets/images/project/edit.png">-->
<!--<span>编辑</span>-->
<!--</div>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column
prop="role"
label="角色"
label="联系人性别"
sortable
width="146">
<template slot-scope="scope">
{{scope.row.role || '--'}}
</template>
</el-table-column>
<el-table-column
prop="office"
label="关联企业">
<template slot-scope="scope">
{{scope.row.office || '--'}}
{{scope.row.sex==0?'女':'男' || '--'}}
</template>
</el-table-column>
<el-table-column
......@@ -70,19 +68,47 @@
</template>
</el-table-column>
<el-table-column
prop="phone"
prop="role"
label="联系人角色"
sortable
width="146">
<template slot-scope="scope">
{{scope.row.role || '--'}}
</template>
</el-table-column>
<el-table-column
prop="contactInformation"
label="联系方式"
width="175">
<template slot-scope="scope">
{{scope.row.phone || '--'}}
{{scope.row.contactInformation || '--'}}
</template>
</el-table-column>
<el-table-column
prop="office"
label="关联企业">
<template slot-scope="scope">
<router-link :to="scope.row.uipId?`/enterprise/${encodeStr(scope.row.uipId)}`:`/company/${encodeStr(scope.row.companyId)}`" tag="a" class="a-link" v-if="(scope.row.companyId||scope.row.uipId)&&scope.row.office" v-html="scope.row.office"></router-link>
<div v-else v-html="scope.row.office || '--'"></div>
</template>
</el-table-column>
<el-table-column
prop="accendant"
prop="updateBy"
label="内部维护人"
width="146">
<template slot-scope="scope">
{{scope.row.accendant || '--'}}
{{scope.row.updateBy || '--'}}
</template>
</el-table-column>
<el-table-column v-if="thistype == 'custom'"
prop="projectName"
label="来源"
width="146">
<template slot-scope="scope">
<div v-if="scope.row.projectName && scope.row.projectId" class="wordprimary" @click="todetail(scope.row.projectId)">
{{scope.row.projectName || '--'}}
</div>
<div v-else>自主填报</div>
</template>
</el-table-column>
</el-table>
......@@ -104,7 +130,8 @@
width="464px">
<div class="poptitle">
<img src="@/assets/images/economies/icon.png">
<span>{{projectname}}</span>
<span v-if="thistype == 'project'">{{projectname}}</span>
<span v-if="thistype == 'custom'">{{companyName}}</span>
</div>
<el-form class="popform" :model="queryParam" ref="ruleForm" label-width="137px" :rules="rules" >
<el-form-item label="联系人姓名:" class="row" prop="name">
......@@ -119,7 +146,7 @@
<el-form-item label="联系人角色:" class="row">
<el-input type="text" v-model="queryParam.role" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="关联企业:" class="row">
<el-form-item label="关联企业:" class="row" v-if="thistype == 'project'">
<el-input type="text" v-model="queryParam.office" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="联系人职位:" class="row">
......@@ -129,7 +156,15 @@
<!--<el-input type="text" v-model="queryParam.accendant" placeholder="请输入"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="联系方式:" class="row">
<el-input type="text" v-model="queryParam.phone" placeholder="请输入"></el-input>
<el-input type="text" v-model="queryParam.contactInformation" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="备注:" class="row">
<el-input
type="textarea"
:rows="2"
placeholder="请输入"
v-model="queryParam.remark">
</el-input>
</el-form-item>
<div class="popbot">
<div class="btn btn_cancel h32" @click="cancel">返回</div>
......@@ -137,26 +172,40 @@
</div>
</el-form>
</el-dialog>
<div class="delform" v-if="isdel">
<div class="words">是否删除联系人</div>
<div>
<div class="btnsmall btn_primary h28" @click="deletes">确定</div>
<div class="btnsmall btn_cancel h28" @click="isdel=false">取消</div>
</div>
</div>
</el-card>
</div>
</template>
<script>
import "@/assets/styles/project.scss"
import {getLXR,editLXR,addLXR} from '@/api/project/project'
import {getLXR,editLXR,addLXR,delLXR} from '@/api/project/project'
import skeleton from './skeleton'
import {encodeStr} from "@/assets/js/common.js"
export default {
encodeStr,
components:{skeleton},
name: 'lxr',
props: {
detailId: { //从企业详情跳转过来ID
detailId: { //从项目、客户列表详情跳转过来ID
type: Number,
default: 0
},
isDisabled:false,
listtype:'',//project项目详情 custom客户列表
customname:'',//企业名称
},
data(){
return{
isdel:false,
thistype:this.listtype,
rules:{
name:[{ required: true, message: '请输入非空格字符!', trigger: 'blur' },],
},
......@@ -170,20 +219,44 @@
searchParam:{
pageNum:1,
pageSize:20,
businessId:this.detailId ? this.detailId : this.$route.query.id
},
id:this.detailId ? this.detailId : this.$route.query.id,
total:0,
projectname:this.$route.query.projectname,
companyName:this.customname,
queryParam:[],
isDisableds:this.isDisabled,
isSkeleton:true,
delid:null,
}
},
created(){
this.getList()
if(this.thistype == 'project'){
this.searchParam.projectId = this.detailId ? this.detailId : this.$route.query.id
}
if(this.thistype == 'custom'){
this.searchParam.customerId = this.customerId ? this.customerId : this.$route.query.id
}
},
methods:{
todetail(id){
this.$router.push({ path: '/project/projectList/detail', query: {id:id,tag:'xmsl'} });
},
deltip(id){
this.delid = id
this.isdel = true
},
deletes(){
delLXR(this.delid).then(res=>{
if(res.code == 200){
this.$message.success('删除成功!')
this.handleCurrentChange(1)
this.isdel = false
}
})
},
getDetail(item){
if(this.isDisableds == true){
return this.$message.warning("您无权限进行操作")
......@@ -191,7 +264,7 @@
this.dialogVisible = true
item.sex = item.sex.toString()
this.queryParam = item
this.queryParam = JSON.parse(JSON.stringify(item))
this.isnew = false
},
getList(){
......@@ -207,13 +280,13 @@
if (valid) {
let param = JSON.parse(JSON.stringify(this.queryParam))
param.sex = parseInt(param.sex)
if (!this.queryParam.phone) {
if (!this.queryParam.contactInformation) {
this.$message.error('请输入电话号码')
return false
}
var regPartton = /1[3-9]+\d{9}/;
var regPartton1 = /0\d{2,3}-\d{7,8}|\(?0\d{2,3}[)-]?\d{7,8}|\(?0\d{2,3}[)-]*\d{7,8}/;
if (!regPartton.test(this.queryParam.phone) && !regPartton1.test(this.queryParam.phone)) {
if (!regPartton.test(this.queryParam.contactInformation) && !regPartton1.test(this.queryParam.contactInformation)) {
this.$message.error("请输入正确的电话");
return false
}
......@@ -251,15 +324,21 @@
this.dialogVisible = true
this.isnew = true
this.queryParam = {
businessId:this.id,
name:"",
sex:"1",
role:"",
office:"",
position:"",
phone:"",
contactInformation:"",
remark:"",
// accendant:"",
}
if(this.thistype == 'project'){
this.queryParam.projectId = this.searchParam.projectId
this.office = ""
}
if(this.thistype == 'custom'){
this.queryParam.customerId = this.searchParam.customerId
}
},
}
}
......@@ -275,5 +354,25 @@
margin-right: 8px;
background: url('../../../../../src/assets/images/project/add_2.png')no-repeat center center;
background-size: 100%;
}
.wordprimary{
img{
display: none;
height: 20px;
position: absolute;
margin-left: 10px;
}
&:hover{
img{
display: inline-block;
}
}
}
.delform{
position: fixed;
left: 50%;
top: 50%;
margin-left: -100px;
margin-top: -57px;
}
</style>
......@@ -117,7 +117,7 @@
<!--建设内容-->
<jsnr v-if="thistag == 'jsnr'" :key="keys1" :isDisabled='isDisabled' @Refrehmoney="getXMSL" :detailId="detailId"></jsnr>
<!--联系人-->
<lxr v-if="thistag == 'lxr'" :isDisabled='isDisabled' :detailId="detailId"></lxr>
<lxr v-if="thistag == 'lxr'" :isDisabled='isDisabled' :detailId="detailId" listtype="project"></lxr>
<!--跟进记录-->
<gjjl v-if="thistag == 'gjjl'" :isDisabled='isDisabled' types="gjjl" :detailId="detailId"></gjjl>
<!--工作待办-->
......
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