Commit 8b0fb410 authored by youjie's avatar youjie

客户团队成员

parent 15bc06f9
......@@ -1691,20 +1691,6 @@
bTotalPriceTo: '',
show: false,
}
// this.HandlingChargeType++
//月结制单 HandlingChargeType 1转账手续费 2转账手续费差额
// if(this.orderObj.CostType2&&this.HandlingChargeType==1){
// this.detailList.Number = 1
// this.detailList.UnitPrice = this.orderObj.HandlingChargeMoney
// this.detailList.CostTypeId = this.orderObj.CostType2
// this.detailList.CostTypeName = '转账手续费'
// }
// if(this.orderObj.CostType3&&((!this.orderObj.CostType2&&this.HandlingChargeType==1)||this.HandlingChargeType==2)){
// this.detailList.Number = 1
// this.detailList.UnitPrice = this.orderObj.balanceMoney
// this.detailList.CostTypeId = this.orderObj.CostType3
// this.detailList.CostTypeName = '转账手续费'
// }
this.chooseHandFee()
},
chages(e) { //处理输入框不能输入问题
......
<style>
</style>
<template>
<el-dialog custom-class="w800" title="团队成员" :visible.sync="showVisible" center @close="close">
<div style="margin-bottom: 0px;text-align: right;">
<el-button class="hollowFixedBtn el-icon-plus" @click="addTeammanShow=true"
v-if="detailsData&&detailsData.IsRead === 0">团队成员</el-button>
<el-button class="normalBtn" @click="bianji" v-if="detailsData&&detailsData.IsRead === 0">编辑</el-button>
<el-button class="normalBtn" @click="yichu" v-if="detailsData&&detailsData.IsRead === 0" :loading="loadingRom">移除</el-button>
<el-button class="normalBtn" @click="tuichu" :loading="loadingOut">退出团队</el-button>
</div>
<el-table
v-loading="loading"
stripe
ref="multipleTable"
:data="dataList"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
row-class-name="font-size-12">
<el-table-column :selectable='checkboxT' fixed type="selection" width="50"></el-table-column>
<el-table-column
prop="EmpName"
label="销售名称"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="PostName"
label="岗位"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="RoleName"
label="角色名称"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="RoleType"
label="角色属性"
show-overflow-tooltip>
<template slot-scope="scope">
<p v-if="scope.row.RoleType === 1">负责人</p>
<p v-else>普通员工</p>
</template>
</el-table-column>
<el-table-column
prop="JurisdictionName"
label="权限"
show-overflow-tooltip>
</el-table-column>
</el-table>
<addTeamman v-if="addTeammanShow" :ID="customerId" @addTeammanOk="addTeammanOk"
@closeaddTeamman="addTeammanShow=false"/>
<editTeamPower v-if="editTeamPowerShow" :CustomerId="customerId" :ID="IDs" @addTeammanOk="addTeammanOk"
@closeeditTeamPower="editTeamPowerShow=false" :IsRead="detailsData&&detailsData.IsRead"/>
</el-dialog>
</template>
<script>
import addTeamman from "./addTeamman";
import editTeamPower from "./editTeamPower";
export default {
props: ["customerId"],
components: {addTeamman,editTeamPower},
data() {
return {
loadingOut: false,
loadingRom: false,
rowData:null,
IDs: null,
detailsData: null,
editTeamPowerShow: false,
addTeammanShow: false,
IsRead: null,
multipleSelection: [],
showVisible: true,
loading: false,
dataList: []
};
},
filters: {
},
methods: {
addTeammanOk(){
this.editTeamPowerShow = false
this.GetCustomerTeamList()
},
bianji(){
if(this.multipleSelection.length < 1) {
return this.$message.error('请勾选需要操作的团队成员')
}
let str = ''
this.multipleSelection.map((x, i)=>{
str = str + x + ','
})
this.IDs = str.substring(0, str.length - 1)
this.editTeamPowerShow = true
},
yichu(){
if(this.multipleSelection.length < 1) {
return this.$message.error('请勾选需要操作的团队成员')
}
this.$confirm('此操作将移除这些团队成员是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let str = ''
this.multipleSelection.map((x, i)=>{
str = str + x + ','
})
let msg = {
CustomerIds: this.customerId,
IDs: str.substring(0, str.length - 1)
}
this.loadingRom = true
this.crmapipost('/api/Customer/RemoveCustomerListJurisdiction', msg, res=>{
if (res.data.resultCode == 1) {
this.loadingRom = false
this.$message.success(res.data.message)
this.GetCustomerTeamList()
}else{
this.$message.error(res.data.message);
this.loadingRom = false
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
tuichu(){
this.$confirm('确定退出团队?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let str = ''
this.multipleSelection.map((x, i)=>{
str = str + x + ','
})
let msg = {
CustomerId: this.customerId,
IDs: str.substring(0, str.length - 1)
}
this.loadingOut = true
this.crmapipost('/api/Customer/ExitCustomerJurisdiction', msg, res=>{
if (res.data.resultCode == 1) {
this.loadingOut = false
this.$message.success(res.data.message)
this.GetCustomerTeamList()
}else{
this.$message.error(res.data.message);
this.loadingOut = false
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
success(){
this.$emit('success')
this.close()
},
close(){
this.$emit('close')
},
checkboxT(row,index){
if(row.JurisdictionName==='负责人权限'){
return 0;
}else{
return 1;
}
},
GetCustomerTeamList(){
if(this.customerId === 0) return
this.loading = true
this.crmapipost('/api/Customer/GetCustomerTeamList', {CustomerId: this.customerId}, res=>{
if (res.data.resultCode == 1) {
this.loading = false
this.dataList = res.data.data
}else{
this.loading = false
}
})
},
init() {
this.crmapipost('/api/Customer/GetAllCustmersModel', {
CustomerId: this.customerId
}, res => {
if (res.data.resultCode == 1) {
let data = res.data.data
if (!data.HousePhotos) {
data.HousePhotos = []
}
if (!data.BusinessCardPhotos) {
data.BusinessCardPhotos = []
}
if (!data.Images) {
data.Images = []
}
if (!data.CustomerSourceType) {
data.CustomerSourceType = ''
}
if (!data.CustomerSource) {
data.CustomerSource = ''
}
if (!data.Province) {
data.Province = ''
}
if (!data.Country) {
data.Country = ''
}
if (!data.City) {
data.City = ''
}
if (!data.District) {
data.District = ''
}
this.detailsData = data
console.log(this.detailsData,'=====')
}
})
},
handleSelectionChange(val) {
this.multipleSelection = val.map(x=>
x.ID
)
},
},
mounted() {
this.init()
this.GetCustomerTeamList()
},
};
</script>
<style>
.addTeamman .add-tit {
display: flex;
justify-content: space-between;
align-items: center;
height: 20px;
}
.addTeamman .add-tit p {
display: flex;
align-items: center;
font-weight: bold;
color: rgba(17, 17, 17, 1);
font-size: 14px;
}
.addTeamman .add-tit p span {
display: inline-block;
width: 6px;
height: 6px;
/* background: #409efe; */
border-radius: 50%;
margin-right: 10px;
}
.addTeamman .el-dialog__header {
padding: 15px 20px;
background: rgba(255, 255, 255, 1);
}
.addTeamman .dialog-footer {
text-align: center;
background-color: rgba(248, 250, 251, 1);
padding-bottom: 20px;
}
.addTeamman .el-dialog__footer {
padding: 0;
}
.addTeamman .el-tag.el-tag--info {
background-color: rgba(0, 0, 0, 0);
border-color: rgba(0, 0, 0, 0);
display: inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
<template>
<el-dialog @closed="closedDialog" :modal="false" :visible.sync="dialogTableVisible" width="450px" :close-on-click-modal="false" class="addTeamman">
<div class="add-tit" slot="title">
<p><span></span>添加团队成员</p>
<span icon="el-icon-close"></span>
</div>
<div class="form-box" v-loading="loadingList">
<el-form :model="form" ref="form" class="MyEditForm">
<div class="MyEditForm-item">
<el-form-item label="成员" class="label-pad-left" prop="ContactDuty">
<el-select
collapse-tags
multiple
filterable
v-model="EmpIdsS" placeholder="请选择">
<el-option
v-for="item in EmployeeList"
:label='item.EmName'
:value='item.EmployeeId'
:key='item.EmployeeId'>
</el-option>
</el-select>
</el-form-item>
</div>
<!-- <div class="MyEditForm-item" >
<el-form-item label="权限" class="label-pad-left form-check">
<div class="pad-left-10">
<el-radio v-model="form.IsRead" :label="1">只读</el-radio>
<el-radio v-model="form.IsRead" :label="0">读写</el-radio>
</div>
</el-form-item>
</div> -->
<div class="MyEditForm-item">
<el-form-item label="同时添加至" class="label-pad-left form-check">
<div class="pad-left-10">
<el-checkbox-group v-model="TransferOther">
<el-checkbox :value="4" :label="4">订单</el-checkbox>
<el-checkbox :value="2" :label="2">商机</el-checkbox>
<el-checkbox :value="3" :label="3">合同</el-checkbox>
</el-checkbox-group>
</div>
</el-form-item>
</div>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" class="add-box-btn" @click="submitForm('form')" :loading="loading">确 定</el-button>
<el-button class="add-box-btn add-box-cancel" @click="dialogTableVisible = false, resetForm('form')">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
props: ["ID"],
data() {
return {
loadingList: true,
loading: false,
dialogTableVisible: true,
EmployeeList: [],
EmpIdsS: [],
TransferOther: [],
form: {
CustomerIds: 0,
EmpIds: "",
IsRead: 0,
TransferOther: "",
},
};
},
watch: {},
mounted() {
this.Employee();
let $this = this;
setTimeout(() => {
$this.dialogTableVisible = true;
}, 50);
},
methods: {
closedDialog() {
this.$emit("closeaddTeamman");
},
addData() {
this.form.CustomerIds = this.ID;
if (this.EmpIdsS.length < 1) {
return this.$message.error("请选择成员");
} else {
let str = "";
this.EmpIdsS.map((x, i) => {
str = str + x + ",";
});
this.form.EmpIds = str.substring(0, str.length - 1);
}
if (this.TransferOther.length < 1) {
let str2 = "";
this.TransferOther.map((x, i) => {
str2 = str2 + x + ",";
});
this.form.TransferOther = str2.substring(0, str2.length - 1);
}
this.loading = true
this.crmapipost("/api/Customer/AddTeamMembers", this.form, (res) => {
if (res.data.resultCode == 1) {
this.loading = false
this.resetForm("form");
this.dialogTableVisible = false;
this.$emit("addTeammanOk");
this.$message.success(res.data.message);
} else {
this.loading = false
this.$message.error(res.data.message);
}
});
},
submitForm(addMsg) {
//提交创建、修改表单
this.$refs[addMsg].validate((valid) => {
if (valid) {
this.addData();
} else {
return false;
}
});
},
Employee() {
let userInfo = this.getLocalStorage();
let msg = {
RB_Group_id: userInfo.RB_Group_id,
BranchId: -1,
DepartmentId: 0,
PostId: 0,
IsLeave: 0,
};
this.apipost(
"admin_get_EmployeeGetList",
this.msg,
(res) => {
if (res.data.resultCode == 1) {
this.loadingList = false
this.EmployeeList = res.data.data;
} else {
this.loadingList = false
}
},
(err) => {}
);
},
resetForm(formName) {
// 重置表单
this.form = {
CustomerId: 0,
EmpIds: [],
IsRead: 0,
TransferOther: [],
};
this.$refs[formName].resetFields();
},
},
};
</script>
<style>
.editTeamPower .add-tit {
display: flex;
justify-content: space-between;
align-items: center;
height: 20px;
}
.editTeamPower .add-tit p {
display: flex;
align-items: center;
font-weight: bold;
color: rgba(17, 17, 17, 1);
font-size: 14px;
}
.editTeamPower .add-tit p span {
display: inline-block;
width: 6px;
height: 6px;
/* background: #409efe; */
border-radius: 50%;
margin-right: 10px;
}
.editTeamPower .el-dialog__header {
padding: 15px 20px;
background: rgba(255, 255, 255, 1);
}
.editTeamPower .dialog-footer {
text-align: center;
background-color: rgba(248, 250, 251, 1);
padding-bottom: 20px;
}
.editTeamPower .el-dialog__footer {
padding: 0;
}
</style>
<template>
<el-dialog @closed="closedDialog" :modal="false" width="400px" :visible.sync="dialogTableVisible" :close-on-click-modal="false" class="editTeamPower">
<div class="add-tit" slot="title">
<p><span></span>编辑权限</p>
<span icon="el-icon-close"></span>
</div>
<div class="form-box" >
<el-form :model="form" ref="form" class="MyEditForm">
<div class="MyEditForm-item">
<el-form-item label="权限" class="label-pad-left form-check">
<div class="pad-left-10">
<el-radio v-model="form.IsRead" :label="1">只读</el-radio>
<el-radio v-model="form.IsRead" :label="0">读写</el-radio>
</div>
</el-form-item>
</div>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" class="add-box-btn" @click="submitForm('form')" :loading="loading">确 定</el-button>
<el-button class="add-box-btn add-box-cancel" @click="dialogTableVisible = false, resetForm('form')">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
props: {
ID: {
type: "",
default: 0,
},
CustomerId: {
type: Number,
default: 0,
},
IsRead:{
type: Number,
default: 0,
}
},
data() {
return {
loading: false,
detailsData: null,
dialogTableVisible: true,
zwList: [],
form: {
CustomerId: 0,
ID: "",
IsRead: 0,
},
};
},
watch: {},
mounted() {
this.form.IsRead = this.IsRead
let $this = this;
setTimeout(() => {
$this.dialogTableVisible = true;
}, 50);
},
methods: {
closedDialog() {
this.$emit("closeeditTeamPower");
},
addData() {
this.form.CustomerId = this.CustomerId;
this.form.IDs = this.ID;
this.loading = true
this.crmapipost(
"/api/Customer/EditCustomerJurisdiction",
this.form,
(res) => {
if (res.data.resultCode == 1) {
this.loading = false
this.$message.success(res.data.message);
this.resetForm("form");
this.$emit("addTeammanOk");
}else{
this.$message.error(res.data.message);
this.loading = false
}
}
);
},
submitForm(addMsg) {
//提交创建、修改表单
this.$refs[addMsg].validate((valid) => {
if (valid) {
this.addData();
} else {
return false;
}
});
},
resetForm(formName) {
// 重置表单
this.form = {
CustomerId: 0,
ID: "",
IsRead: 0,
};
this.$refs[formName].resetFields();
},
},
};
</script>
......@@ -500,6 +500,7 @@
<th>签约额度</th>
<th>未结算额度</th>
<th>签约到期时间</th>
<th>操作</th>
</tr>
<tr v-for="(item, i) in list" :key="i">
<td>
......@@ -515,19 +516,32 @@
<td><span @click="goUrlCCC(item.customerId,1)"
style="cursor: pointer;text-decoration: underline;">{{item.signingUnsettledPrice}}</span></td>
<td>{{item.signingEndTime}}</td>
<td>
<el-tooltip class="item" effect="dark" content="团队成员" placement="top-start">
<el-button style="padding:4px" @click="goTeamMember(item)" type="primary"
icon="el-icon-user-solid" circle></el-button>
</el-tooltip>
</td>
</tr>
<tr v-if="list.length == 0">
<td colspan="12" style="text-align: center">暂无数据</td>
</tr>
</table>
<!-- 团队成员 -->
<TeamMemberList v-if="ShowTeamMember" :customerId="customerId"
@close="ShowTeamMember=false,customerId=null"
@success="reSearchPage"></TeamMemberList>
</div>
</template>
<script>
import TeamMemberList from './TeamMemberList'
export default {
props: ["loading", "list", "pagesTitle", "isVisa"],
components: {},
components: { TeamMemberList },
data() {
return {
customerId: null,
ShowTeamMember: false,
editNum: false,
showDialog: false,
queryData: {},
......@@ -598,6 +612,10 @@ export default {
},
},
methods: {
goTeamMember(row){
this.customerId = row.customerId
this.ShowTeamMember = true
},
//刷新页面
reSearchPage() {
this.isShowTeamOrder = false;
......
......@@ -448,7 +448,7 @@
<th>所属联盟</th>
<th>优惠券</th>
<th>预存余额</th>
<th>操作</th>
<th width="200px">操作</th>
</tr>
<tr v-for="(item,i) in dataList" :key="i">
<td>
......@@ -514,6 +514,10 @@
<el-button style="padding:4px" @click.stop="goUrC('CustomerAnalysis',item.customerId)" type="success"
icon="iconfont icon-icon-test6" circle></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="团队成员" placement="top-start">
<el-button style="padding:4px" @click.stop="goTeamMember(item)" type="primary"
icon="el-icon-user-solid" circle></el-button>
</el-tooltip>
</td>
</tr>
<tr v-if="dataList.length==0">
......@@ -871,18 +875,26 @@
</el-form>
</div>
<detailList v-if="showdetail" :ClientId="detailObj&&detailObj.customerId" @cancel="showdetail=false"></detailList>
<!-- 团队成员 -->
<TeamMemberList v-if="ShowTeamMember" :customerId="customerId"
@close="ShowTeamMember=false,customerId=null"
@success="getList"></TeamMemberList>
</div>
</template>
<script>
import detailList from "../FinancialModule/PrestorageManagement/components/detailList.vue";
import signedClientList from './Common/signedClientList'
import TeamMemberList from './Common/TeamMemberList'
export default {
components:{
signedClientList,
detailList
detailList,
TeamMemberList
},
data() {
return {
customerId: null,
ShowTeamMember: false,
detailObj: null,
showdetail: false,
isVisa: false, // 是否是签证下面的菜单
......@@ -1060,6 +1072,10 @@
}
},
methods: {
goTeamMember(row){
this.customerId = row.customerId
this.ShowTeamMember = true
},
seeDeta(row){
this.detailObj = row
this.showdetail = true
......
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