|
|
|
@ -3,13 +3,18 @@ |
|
|
|
<!-- 查询条件 --> |
|
|
|
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()"> |
|
|
|
<el-form-item :label="'客户代码'"> |
|
|
|
<el-input v-model="searchData.customerNo" style="width: 120px"></el-input> |
|
|
|
<el-input v-model="searchData.customerNo" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'客户名称'"> |
|
|
|
<el-input v-model="searchData.customerDesc" style="width: 120px"></el-input> |
|
|
|
<el-input v-model="searchData.customerDesc" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'客户状态'"> |
|
|
|
<el-input v-model="searchData.customerStatus" style="width: 120px"></el-input> |
|
|
|
<el-select v-model="searchData.customerStatus" style="width: 120px"> |
|
|
|
<el-option label="全部" value=""></el-option> |
|
|
|
<el-option label="非客户" value="非客户"></el-option> |
|
|
|
<el-option label="潜在客户" value="潜在客户"></el-option> |
|
|
|
<el-option label="目标客户" value="目标客户"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button @click="getDataList()">查询</el-button> |
|
|
|
@ -179,8 +184,8 @@ |
|
|
|
<el-input v-model="contactModalData.contactLandlineNumber" :readonly="contactDetailModalFlag" style="width: 222px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="contactModalData" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="联系电话(1):"> |
|
|
|
<el-form :inline="true" label-position="top" :model="contactModalData" :rules="contactRules" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="联系电话(1):" prop="contactPhoneNumber1" :rules="contactRules.contactPhoneNumber1"> |
|
|
|
<el-input v-model="contactModalData.contactPhoneNumber1" :readonly="contactDetailModalFlag" style="width: 222px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="联系电话(2):"> |
|
|
|
@ -520,29 +525,41 @@ |
|
|
|
|
|
|
|
<!-- 项目经理选择模态框 --> |
|
|
|
<el-dialog |
|
|
|
width="530px" |
|
|
|
width="620px" |
|
|
|
title="项目经理" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:visible.sync="managerFlag"> |
|
|
|
<el-transfer v-model="projectManagerList" :props="{key: 'operatorId',label: 'operatorName'}" :data="operatorList" :titles="['未选择', '已选择']"></el-transfer> |
|
|
|
<el-transfer |
|
|
|
ref="managerTransfer" |
|
|
|
v-model="projectManagerList" |
|
|
|
:props="{key: 'operatorId',label: 'operatorName'}" |
|
|
|
:data="operatorList" |
|
|
|
:titles="['未选择', '已选择']"> |
|
|
|
</el-transfer> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<div style="margin-top: 5px"> |
|
|
|
<el-button type="primary" @click="saveManagerList()">确定</el-button> |
|
|
|
<el-button @click="managerFlag=false" type="primary">取消</el-button> |
|
|
|
<el-button type="primary" @click="managerFlag=false">取消</el-button> |
|
|
|
</div> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
<!-- 项目负责人选择模态框 --> |
|
|
|
<el-dialog |
|
|
|
width="530px" |
|
|
|
width="620px" |
|
|
|
title="项目负责人" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:visible.sync="ownerFlag"> |
|
|
|
<el-transfer v-model="projectOwnerList" :props="{key: 'operatorId',label: 'operatorName'}" :data="operatorList" :titles="['未选择', '已选择']"></el-transfer> |
|
|
|
<el-transfer |
|
|
|
ref="ownerTransfer" |
|
|
|
v-model="projectOwnerList" |
|
|
|
:props="{key: 'operatorId',label: 'operatorName'}" |
|
|
|
:data="operatorList" |
|
|
|
:titles="['未选择', '已选择']"> |
|
|
|
</el-transfer> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<div style="margin-top: 5px"> |
|
|
|
<el-button type="primary" @click="saveOwnerList()">确定</el-button> |
|
|
|
<el-button @click="ownerFlag=false" type="primary">取消</el-button> |
|
|
|
<el-button type="primary" @click="ownerFlag=false">取消</el-button> |
|
|
|
</div> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
@ -631,7 +648,7 @@ |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<div style="margin-top: 5px"> |
|
|
|
<el-button type="primary" @click="saveUserList()">确定</el-button> |
|
|
|
<el-button @click="userRoleFlag = false" type="primary">取消</el-button> |
|
|
|
<el-button type="primary" @click="userRoleFlag = false">取消</el-button> |
|
|
|
</div> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
@ -1600,6 +1617,13 @@ |
|
|
|
message: ' ', |
|
|
|
trigger: 'change' |
|
|
|
} |
|
|
|
], |
|
|
|
contactPhoneNumber1: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: 'change' |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
addressRules: { |
|
|
|
@ -2287,31 +2311,68 @@ |
|
|
|
this.$message.warning('请勾选要删除的联系人!') |
|
|
|
return |
|
|
|
} |
|
|
|
this.$confirm(`是否删除这 `+ this.contactSelections.length +` 条联系人信息?`, '提示', { |
|
|
|
this.$confirm(`是否删除这 `+ this.contactSelections.length +` 条联系人信息?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
let tempData = { |
|
|
|
contactList: this.contactSelections |
|
|
|
let tempContactName = null |
|
|
|
for (let i = 0; i < this.contactSelections.length; i++){ |
|
|
|
// 判断是否有主联系人 |
|
|
|
if (this.contactSelections[i].primaryContact === 'Y') { |
|
|
|
tempContactName = this.contactSelections[i].contactName |
|
|
|
} |
|
|
|
} |
|
|
|
customerContactDelete(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getDataList() |
|
|
|
this.contactSelections = [] |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
if (tempContactName !== '' || tempContactName != null) { |
|
|
|
this.$confirm(tempContactName +` 为主联系人,是否确认删除?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
let tempData = { |
|
|
|
contactList: this.contactSelections |
|
|
|
} |
|
|
|
customerContactDelete(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getCustomerContactList() |
|
|
|
this.contactSelections = [] |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
} else { |
|
|
|
let tempData = { |
|
|
|
contactList: this.contactSelections |
|
|
|
} |
|
|
|
}) |
|
|
|
customerContactDelete(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getCustomerContactList() |
|
|
|
this.contactSelections = [] |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -2328,26 +2389,63 @@ |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
let tempData = { |
|
|
|
addressList: this.addressSelections |
|
|
|
let tempAddressName = null |
|
|
|
for (let i = 0; i < this.addressSelections.length; i++){ |
|
|
|
// 判断是否有主联系地址 |
|
|
|
if (this.addressSelections[i].primaryAddress === 'Y') { |
|
|
|
tempAddressName = this.addressSelections[i].addressName |
|
|
|
} |
|
|
|
} |
|
|
|
customerAddressDelete(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getCustomerAddressList() |
|
|
|
this.addressSelections = [] |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
if (tempAddressName !== '' || tempAddressName != null) { |
|
|
|
this.$confirm(tempAddressName +` 为主联系地址,是否确认删除?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
let tempData = { |
|
|
|
addressList: this.addressSelections |
|
|
|
} |
|
|
|
customerAddressDelete(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getCustomerAddressList() |
|
|
|
this.addressSelections = [] |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
} else { |
|
|
|
let tempData = { |
|
|
|
addressList: this.addressSelections |
|
|
|
} |
|
|
|
}) |
|
|
|
customerAddressDelete(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getCustomerAddressList() |
|
|
|
this.addressSelections = [] |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -2437,6 +2535,10 @@ |
|
|
|
this.$message.warning('请输入联系人!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.contactModalData.contactPhoneNumber1 === '' || this.contactModalData.contactPhoneNumber1 == null) { |
|
|
|
this.$message.warning('请输入联系人电话(1)!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.contactModalData.position === '' || this.contactModalData.position == null) { |
|
|
|
this.$message.warning('请输入公司职务!') |
|
|
|
return |
|
|
|
@ -2732,6 +2834,11 @@ |
|
|
|
* 项目经理选择模态框 |
|
|
|
*/ |
|
|
|
managerChooseModal () { |
|
|
|
// 清空穿梭框的选中值 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.managerTransfer.$refs.leftPanel.checked = [] |
|
|
|
this.$refs.managerTransfer.$refs.rightPanel.checked = [] |
|
|
|
}) |
|
|
|
let inData = { |
|
|
|
site: this.projectInformationModalData.site, |
|
|
|
projectId: this.projectInformationModalData.projectId, |
|
|
|
@ -2739,14 +2846,14 @@ |
|
|
|
searchOperatorWithSite(inData).then(({data}) => { |
|
|
|
this.operatorList = data.rows |
|
|
|
}) |
|
|
|
this.projectManagerList = JSON.parse(JSON.stringify(this.projectInformationModalData.projectManagerList)); |
|
|
|
this.projectManagerList = JSON.parse(JSON.stringify(this.projectInformationModalData.projectManagerList)) |
|
|
|
this.managerFlag = true |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 项目经理选择 |
|
|
|
*/ |
|
|
|
saveManagerList () { |
|
|
|
let projectManagerName = ''; |
|
|
|
let projectManagerName = '' |
|
|
|
for (let i = 0; i < this.projectManagerList.length; i++) { |
|
|
|
let select = this.operatorList.filter(item => item.operatorId === this.projectManagerList[i]) |
|
|
|
if (select.length > 0) { |
|
|
|
@ -2754,13 +2861,18 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
this.projectInformationModalData.projectManagerName = projectManagerName |
|
|
|
this.projectInformationModalData.projectManagerList = JSON.parse(JSON.stringify(this.projectManagerList)); |
|
|
|
this.projectInformationModalData.projectManagerList = JSON.parse(JSON.stringify(this.projectManagerList)) |
|
|
|
this.managerFlag = false |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 项目负责人选择模态框 |
|
|
|
*/ |
|
|
|
ownerChooseModal () { |
|
|
|
// 清空穿梭框的选中值 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.ownerTransfer.$refs.leftPanel.checked = [] |
|
|
|
this.$refs.ownerTransfer.$refs.rightPanel.checked = [] |
|
|
|
}) |
|
|
|
let inData = { |
|
|
|
site: this.projectInformationModalData.site, |
|
|
|
projectId: this.projectInformationModalData.projectId, |
|
|
|
@ -2899,5 +3011,36 @@ |
|
|
|
/deep/ .customer-tab .el-tabs__content { |
|
|
|
padding: 0px !important; |
|
|
|
} |
|
|
|
.el-transfer-panel { |
|
|
|
border: 2px solid #17b3a3; |
|
|
|
border-radius: 4px; |
|
|
|
overflow: hidden; |
|
|
|
background: #fff; |
|
|
|
display: inline-block; |
|
|
|
vertical-align: middle; |
|
|
|
width: 200px; |
|
|
|
max-height: 100%; |
|
|
|
-webkit-box-sizing: border-box; |
|
|
|
box-sizing: border-box; |
|
|
|
position: relative; |
|
|
|
} |
|
|
|
|
|
|
|
.el-transfer-panel .el-transfer-panel__header { |
|
|
|
height: 40px; |
|
|
|
line-height: 40px; |
|
|
|
background: #17b3a3; |
|
|
|
margin: 0; |
|
|
|
padding-left: 15px; |
|
|
|
border-bottom: 1px solid #17b3a3; |
|
|
|
-webkit-box-sizing: border-box; |
|
|
|
box-sizing: border-box; |
|
|
|
color: #000; |
|
|
|
} |
|
|
|
|
|
|
|
.el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label { |
|
|
|
font-size: 14px; |
|
|
|
color: #303133; |
|
|
|
font-weight: 400; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|