Commit e7f634de authored by 华国豪's avatar 华国豪 🙄

商机

parent c564e44d
......@@ -83,4 +83,59 @@
}
.customerManage .add-box2 .el-form-item__label{
text-align: left;
}
.customerManage .selection-box{
display: flex;
align-items: center;
}
.customerManage .selection-box span{
font-size: 12px;
text-align: center;
}
.customerManage .selection-box .el-button {
color: #666;
background-color: #f6f8fa;
border-color: #f6f8fa;
font-size: 12px;
height: 28px;
border-radius: 14px;
padding: 5px 12px;
margin-left: 15px;
}
.customerManage .selection-box .el-button i{
margin-right: 5px;
}
.customerManage .selection-box .el-button:hover {
background: #2362fb;
border-color: #2362fb;
color: #fff;
}
.customerManage .dialog-footer{
text-align: center;
background-color: rgba(248,250,251,1);
padding-bottom: 20px;
}
.customerManage .el-dialog__footer{
padding: 0;
}
.transfer-box .add-tit{
display: flex;
justify-content: space-between;
align-items: center;
height: 20px;
}
.transfer-box .add-tit p{
display: flex;
align-items: center;
font-weight: bold;
color:rgba(17,17,17,1);
font-size:14px;
}
.transfer-box .add-tit p span{
display: inline-block;
width:6px;
height:6px;
background:rgba(13,36,129,1);
border-radius:50%;
margin-right: 10px;
}
\ No newline at end of file
......@@ -28,6 +28,9 @@ table { border-collapse:collapse; border-spacing:0; }
text-align: center;
margin-right: 20px;
}
.crm-btn.crm-btn-mini.el-button{
padding: 5px 10px;
}
.crm-btn-mini.el-button{
border-radius: 0;
padding: 6px 12px;
......@@ -135,7 +138,16 @@ table { border-collapse:collapse; border-spacing:0; }
.MyEditForm .MyEditForm-item .form-check .el-form-item__label{
display: block;
width: 100%;
text-align: left;
}
.MyEditForm .MyEditForm-item .el-date-editor.el-input{
width: 100%;
}
.MyEditForm .MyEditForm-item .el-input__prefix{
right: 5px;
top: -17px;
left: inherit;
}
.cp{
cursor: pointer;
}
......@@ -185,4 +197,32 @@ textarea{
/* margin */
.margin-right0{
margin-right: 0 !important;
}
/* el */
.el-dialog__body{
background-color: rgba(248,250,251,1);
padding-top: 20px;
max-height: 500px;
overflow: auto;
}
.add-box-btn.el-button{
border-radius: 0;
background-color: rgba(13, 36, 129, .8);
border-color: rgba(13, 36, 129, .8);
color: white;
padding: 12px 43px;
}
.add-box-btn.el-button:hover{
background-color: rgba(13, 36, 129, 1);
border-color: rgba(13, 36, 129, 1);
color: white;
}
.add-box-btn.el-button.add-box-cancel{
color: rgba(13, 36, 129, .8);
background-color: white;
}
.add-box-btn.el-button.add-box-cancel:hover{
color: rgba(13, 36, 129, 1);
background-color: white;
}
\ No newline at end of file
......@@ -112,7 +112,8 @@ export default {
},
{
class: "iconfont iconshangji",
name: "商机"
name: "商机",
path: '/businessManagement'
},
{
class: "iconfont iconhetong",
......
......@@ -8,7 +8,7 @@
align-items: center;
}
.activity .btn-list .btn-list-item{
padding: 8px;
padding: 5px 10px;
font-size: 12px;
color: #666666;
background:rgba(13,36,129, .1);
......@@ -69,7 +69,7 @@
padding-right: 10px;
}
.activity .genjin-ctrl .fabu-btn{
padding: 6px 23px;
padding: 5px 10px;
border:1px solid rgba(13, 36, 129, 1);
color: #0D2481;
font-size: 12px;
......@@ -350,7 +350,7 @@
</div>
</template>
<script>
import addContacts from "./addContacts";
import addContacts from "../dialogModel/addContacts";
export default {
components: {
addContacts
......
......@@ -10,7 +10,7 @@
<template>
<div class="Contacts">
<div class="add-contacts">
<el-button icon="el-icon-plus" class="crm-btn query-btn margin-right0" @click="addContactsShow=true">新建联系人</el-button>
<el-button icon="el-icon-plus" class="crm-btn query-btn crm-btn-mini margin-right0" @click="addContactsShow=true">新建联系人</el-button>
</div>
<el-table
v-loading="loading"
......@@ -51,7 +51,7 @@
</div>
</template>
<script>
import addContacts from "./addContacts";
import addContacts from "../dialogModel/addContacts";
export default {
components: {
addContacts
......
<style>
.addTeamman-ctrl{
text-align: right;
padding: 10px 0;
}
</style>
<template>
<div class="TeamMembers">
TeamMembers
<div class="addTeamman">
<div class="addTeamman-ctrl">
<el-button icon="el-icon-plus" class="crm-btn crm-btn-mini query-btn" @click="addTeammanShow=true">团队成员</el-button>
<el-button class="crm-btn query-btn crm-btn-mini easy-btn" @click="bianji">编辑</el-button>
<el-button class="crm-btn query-btn crm-btn-mini easy-btn" @click="yichu">移除</el-button>
<el-button class="crm-btn query-btn crm-btn-mini org-btn margin-right0" @click="tuichu">退出团队</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="40"></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>
<div v-if="addTeammanShow">
<addTeamman :ID="CustomerId" @addTeammanOk="addTeammanOk"/>
</div>
<div v-if="editTeamPowerShow">
<editTeamPower :CustomerId="CustomerId" :ID="IDs" @addTeammanOk="addTeammanOk"/>
</div>
</div>
</template>
<script>
import addTeamman from "../dialogModel/addTeamman";
import editTeamPower from "../dialogModel/editTeamPower";
export default {
props:{
components: {
addTeamman,
editTeamPower
},
props:{
CustomerId: {
type: Number,
default: 0
}
},
data() {
return {
loading: false,
addTeammanShow: false,
editTeamPowerShow: false,
dataList: [],
multipleSelection: [],
IDs: ''
};
},watch:{
},
CustomerId: {
handler(val, oldVal){
console.log(val)
this.GetCustomerTeamList()
},
deep:true
}
},
mounted() {
this.GetCustomerTeamList()
let $this = this
this.MsgBus.$on('closeaddTeamman', function (){
$this.addTeammanShow = false
})
this.MsgBus.$on('closeeditTeamPower', function(){
$this.editTeamPowerShow = false
})
},
methods: {
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.apipost('/api/Customer/ExitCustomerJurisdiction', msg, res=>{
if (res.data.resultCode == 1) {
this.$message.success('操作成功')
this.GetCustomerTeamList()
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
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 = {
CustomerId: this.CustomerId,
IDs: str.substring(0, str.length - 1)
}
this.apipost('/api/Customer/RemoveCustomerListJurisdiction', msg, res=>{
if (res.data.resultCode == 1) {
this.$message.success('操作成功')
this.GetCustomerTeamList()
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
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
},
checkboxT(row,index){
if(row.JurisdictionName==='负责人权限'){
return 0;
}else{
return 1;
}
},
handleSelectionChange(val) {
this.multipleSelection = val.map(x=>
x.ID
)
},
addTeammanOk(){
this.GetCustomerTeamList()
},
GetCustomerTeamList(){
if(this.CustomerId === 0) return
this.loading = true
this.apipost('/api/Customer/GetCustomerTeamList', {CustomerId: this.CustomerId}, res=>{
if (res.data.resultCode == 1) {
this.loading = false
this.dataList = res.data.data
}
})
},
}
}
</script>
\ No newline at end of file
......@@ -70,7 +70,7 @@
<i class="iconfont icongengduo"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="z"><i class="iconfont iconplus-transfer"></i> 转移111</el-dropdown-item>
<el-dropdown-item command="z"><i class="iconfont iconplus-transfer"></i> 转移</el-dropdown-item>
<el-dropdown-item command="g"><i class="iconfont icongonghaiguanli"></i> 放入公海</el-dropdown-item>
<el-dropdown-item command="s"><i class="iconfont iconsuoguan"></i> 锁定</el-dropdown-item>
<el-dropdown-item command="j"><i class="iconfont iconsuokai"></i> 解锁</el-dropdown-item>
......@@ -110,7 +110,7 @@
<Contacts :CustomerId="CustomerId" />
</el-tab-pane>
<el-tab-pane label="团队成员" name="4">
<TeamMembers />
<TeamMembers :CustomerId="CustomerId"/>
</el-tab-pane>
<el-tab-pane label="商机" name="5">
<Business />
......@@ -170,6 +170,7 @@ export default {
CustomerId: {
handler(val, oldVal){
this.init()
this.activeName = '1'
},
deep:true
}
......
<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:rgba(13,36,129,1);
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" >
<el-form :model="form" ref="form" class="MyEditForm">
<div class="MyEditForm-item">
<el-form-item label="成员" class="label-pad-left" prop="ContactDuty">
<el-select
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="0">只读</el-radio>
<el-radio v-model="form.IsRead" :label="1">读写</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="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')">确 定</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 {
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.MsgBus.$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.apipost('/api/Customer/AddTeamMembers', this.form, res=>{
if (res.data.resultCode == 1) {
this.resetForm("form");
this.dialogTableVisible = false;
this.$emit('addTeammanOk')
this.$message.success(res.data.message)
} else {
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.apipost2(
"admin_get_EmployeeGetList",
this.msg,
res => {
if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data;
} else {
}
},
err => {}
);
},
resetForm(formName) { // 重置表单
this.form = {
CustomerId: 0,
EmpIds: [],
IsRead: 0,
TransferOther: []
}
this.$refs[formName].resetFields();
},
}
}
</script>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -12,7 +12,7 @@
</div>
<div class="rightmenu">
<el-button class="crm-btn query-btn" @click="getList">查询</el-button>
<el-button icon="el-icon-plus" class="crm-btn org-btn" @click="CustomerId = 0,dialogTableVisible=true">新增</el-button>
<el-button icon="el-icon-plus" class="crm-btn org-btn" @click="CustomerId = 0, dialogTableVisibleName = '新增客户', dialogTableVisible=true">新增</el-button>
<el-dropdown>
<el-button class="crm-btn crm-btn-more easy-btn margin-right0">
<i class="iconfont icongengduo"></i>
......@@ -255,12 +255,12 @@
:visible.sync="drawer"
direction="rtl"
:before-close="handleClose">
<customerInfoBox :CustomerId="CustomerId" :detailsData="details" @transferS="transfer" @watersS="waters" @editCustS="editCust"/>
<customerInfoBox :CustomerId="CustomerId" @transferS="transfer" @watersS="waters" @editCustS="editCust"/>
</el-drawer>
<div v-if="dialogTableVisible">
<customerDialogBox @getList="getList" :CustomerId="CustomerId"/>
<customerDialogBox @getList="getList" :name="dialogTableVisibleName" :CustomerId="CustomerId"/>
</div>
<el-dialog :visible.sync="transferVisible" :close-on-click-modal="false" width="450px" custom-class="add-box add-box2">
<el-dialog :visible.sync="transferVisible" :close-on-click-modal="false" width="450px" custom-class="transfer-box add-box add-box2">
<div class="add-tit" slot="title">
<p><span></span>客户转移</p>
<span icon="el-icon-close"></span>
......@@ -313,17 +313,23 @@
<el-button class="add-box-btn add-box-cancel" @click="transferVisible = false">取 消</el-button>
</div>
</el-dialog>
<!-- 添加团队成员弹窗 -->
<div v-if="addTeammanShow">
<addTeamman :ID="CustomerIdStr" @addTeammanOk="addTeammanOk"/>
</div>
</div>
</template>
<script>
import mySelect from "../assembly/select";
import mySelect from "../dialogModel/select";
import customerInfoBox from "../assembly/customerInfoBox";
import customerDialogBox from "../assembly/customerDialogBox";
import customerDialogBox from "../dialogModel/customerDialogBox";
import addTeamman from "../dialogModel/addTeamman";
export default {
components: {
mySelect,
customerInfoBox,
customerDialogBox
customerDialogBox,
addTeamman
},
data() {
return {
......@@ -447,36 +453,17 @@ export default {
show: true,
},
],
form: {
CustomerId: 0,
CustomerName: '',
CustomerLevel: '',
Contact: '',
ContactNumber: '',
Address: '',
Remark: '',
Premises: '',
CustomerStatus: 0,
CustomerSourceType: '',
CustomerSource: '',
Country: '',
Province: '',
City: '',
District: '',
BrandIds: [],
Images: [],
BusinessCardPhotos: [],
HousePhotos: [],
},
CustomerId: 0,
CustomerIdStr: '',
addTeammanShow: false,
transferVisible: false,
mySelectCtrl: false,
drawer: false,
loading: true,
dialogTableVisible: false,
dialogTableVisibleName: '新增客户',
tableData: [],
multipleSelection: [],
details: {},
EmployeeList: [],
value: '',
userInfo: {},
......@@ -548,11 +535,12 @@ export default {
name: '添加团队成员',
class:'iconfont icontianjia',
myFun: this.addCust
},{
name: '删除团队成员',
class:'iconfont iconjian',
myFun: this.delCust
},
// {
// name: '删除团队成员',
// class:'iconfont iconjian',
// myFun: this.delCust,
// },
]
};
},
......@@ -564,6 +552,9 @@ export default {
this.MsgBus.$on('closeCustomerDialogBox', function (){
$this.dialogTableVisible = false
})
this.MsgBus.$on('closeaddTeamman', function (){
$this.addTeammanShow = false
})
},
methods: {
Employee(){
......@@ -595,9 +586,17 @@ export default {
Unlock(){
console.log('解锁')
},
addTeammanOk(){
this.addTeammanShow = false
},
//添加团队成员
addCust(){
console.log('添加团队成员')
let str = ''
this.multipleSelection.map((x, i)=>{
str = str + x + ','
})
this.CustomerIdStr = str.substring(0, str.length - 1)
this.addTeammanShow = true
},
//删除团队成员
delCust(){
......@@ -698,47 +697,14 @@ export default {
}
},
editCust(){
this.dialogTableVisibleName = '修改客户'
this.dialogTableVisible = true
this.form = this.details
},
openDetails(scope){
this.drawer = true
this.CustomerId = scope.row.CustomerId
this.CustomerName = scope.row.CustomerName
this.apipost('/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.details = data
this.drawer = true
}
})
this.drawer = true
},
handleSizeChange(val) {
this.msg.pageSize = val
......
......@@ -32,32 +32,6 @@
.addContacts .el-dialog__footer{
padding: 0;
}
.addContacts .el-dialog__body{
background-color: rgba(248,250,251,1);
padding-top: 20px;
max-height: 500px;
overflow: auto;
}
.addContacts .add-box-btn.el-button{
border-radius: 0;
background-color: rgba(13, 36, 129, .8);
border-color: rgba(13, 36, 129, .8);
color: white;
padding: 12px 43px;
}
.addContacts .add-box-btn.el-button:hover{
background-color: rgba(13, 36, 129, 1);
border-color: rgba(13, 36, 129, 1);
color: white;
}
.addContacts .add-box-btn.el-button.add-box-cancel{
color: rgba(13, 36, 129, .8);
background-color: white;
}
.addContacts .add-box-btn.el-button.add-box-cancel:hover{
color: rgba(13, 36, 129, 1);
background-color: white;
}
</style>
<template>
<el-dialog @closed="closedDialog" :modal="false" :visible.sync="dialogTableVisible" :close-on-click-modal="false" class="addContacts">
......@@ -202,6 +176,7 @@ export default {
this.form.CustomerId = this.ID
this.apipost('/api/Customer/CreateMyCustomerContact', this.form, res=>{
if (res.data.resultCode == 1) {
this.$message.success('操作成功')
this.resetForm("form");
this.dialogTableVisible = false;
this.$emit('addContactsOk')
......
<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:rgba(13,36,129,1);
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" >
<el-form :model="form" ref="form" class="MyEditForm">
<div class="MyEditForm-item">
<el-form-item label="成员" class="label-pad-left" prop="ContactDuty">
<el-select
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="0">只读</el-radio>
<el-radio v-model="form.IsRead" :label="1">读写</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="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')">确 定</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 {
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.MsgBus.$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.apipost('/api/Customer/AddTeamMembers', this.form, res=>{
if (res.data.resultCode == 1) {
this.resetForm("form");
this.dialogTableVisible = false;
this.$emit('addTeammanOk')
this.$message.success(res.data.message)
} else {
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.apipost2(
"admin_get_EmployeeGetList",
this.msg,
res => {
if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data;
} else {
}
},
err => {}
);
},
resetForm(formName) { // 重置表单
this.form = {
CustomerId: 0,
EmpIds: [],
IsRead: 0,
TransferOther: []
}
this.$refs[formName].resetFields();
},
}
}
</script>
\ No newline at end of file
......@@ -76,32 +76,6 @@
border-radius:50%;
margin-right: 10px;
}
.customerDialogBox .selection-box{
display: flex;
align-items: center;
}
.customerDialogBox .selection-box span{
font-size: 12px;
text-align: center;
}
.customerDialogBox .selection-box .el-button {
color: #666;
background-color: #f6f8fa;
border-color: #f6f8fa;
font-size: 12px;
height: 28px;
border-radius: 14px;
padding: 5px 12px;
margin-left: 15px;
}
.customerDialogBox .selection-box .el-button i{
margin-right: 5px;
}
.customerDialogBox .selection-box .el-button:hover {
background: #2362fb;
border-color: #2362fb;
color: #fff;
}
.customerDialogBox .up-img-box .uib-item{
margin-right: 30px;
width: 120px;
......@@ -160,7 +134,7 @@
<template>
<el-dialog :visible.sync="dialogTableVisible" @closed="closedDialog" :close-on-click-modal="false" class="add-box add-box1 customerDialogBox">
<div class="add-tit" slot="title">
<p><span></span>新建客户</p>
<p><span></span>{{name}}</p>
<span icon="el-icon-close"></span>
</div>
<div class="form-box" v-if="show">
......@@ -414,6 +388,10 @@ export default {
CustomerId: {
type: Number,
default: 0
},
name: {
type: String,
default: '新增客户'
}
},
data() {
......@@ -661,14 +639,14 @@ export default {
Id: ID
};
if (type == 1) {
this.Province = "";
this.City = "";
this.District = "";
this.form.Province = "";
this.form.City = "";
this.form.District = "";
} else if (type == 2) {
this.City = "";
this.District = "";
this.form.City = "";
this.form.District = "";
} else if (type == 3) {
this.District = "";
this.form.District = "";
}
if (this.QCountry !== "") {
this.apipost2(
......
<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:rgba(13,36,129,1);
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')">确 定</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
}
},
data() {
return {
dialogTableVisible: true,
zwList: [],
form: {
CustomerId: 0,
ID: '',
IsRead: 1,
}
};
},watch:{
},
mounted() {
let $this = this
setTimeout(()=>{
$this.dialogTableVisible = true
},50)
},
methods: {
closedDialog(){
this.MsgBus.$emit('closeeditTeamPower')
},
addData(){
this.form.CustomerId = this.CustomerId
this.form.IDs = this.ID
this.apipost('/api/Customer/EditCustomerJurisdiction', this.form, res=>{
if (res.data.resultCode == 1) {
this.$message.success('操作成功')
this.resetForm("form");
this.dialogTableVisible = false;
this.$emit('addTeammanOk')
}
})
},
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>
\ No newline at end of file
......@@ -5,6 +5,7 @@ import login from "./views/login";
import Home from "./components/Home"
import customerManage from "./components/customerManage/customerManage"
import customerManageDemo from "./components/customerManage/customerManageDemo"
import businessManagement from "./components/businessManagement/businessManagement"
Vue.use(Router);
export default new Router({
......@@ -64,6 +65,14 @@ export default new Router({
meta: {
title: "客户管理"
}
},
{
path: "/businessManagement",
name: "businessManagement",
component: businessManagement,
meta: {
title: "商机管理"
}
}
]
},
......
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