Commit 6359e437 authored by dcy's avatar dcy

我的客户列表添加,待接收客户列表添加客户

parent 02b7cfbb
<template xmlns=""> <template xmlns="">
<div> <div>
<el-row type="flex" style="margin-top: 15px;margin-bottom: 15px" justify="center"> <el-row type="flex" style="margin-top: 15px;margin-bottom: 15px" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="22" :xl="20"> <el-col :xs="24" :sm="24" :md="24" :lg="22" :xl="20">
<el-form ref="form" :model="form" :rules="rules" label-width="150px"> <el-form ref="form" :model="form" :rules="rules" label-width="150px">
...@@ -103,7 +102,7 @@ ...@@ -103,7 +102,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('客户经理')" prop="customerService"> <el-form-item :label="$t('客户经理')" prop="customerService">
<el-select v-model="form.customerService" :placeholder="$t('请选择客户经理')" :disabled="!!(customerId !== '0' && form.customerService)"> <el-select v-model="form.customerService" :placeholder="$t('请选择客户经理')" :disabled="(!!(customerId !== '0' && form.customerService) || isCustomerServiceConfirmed)">
<el-option v-for="item in serviceUserList" <el-option v-for="item in serviceUserList"
:key="item.id" :label="item.nickname" :value="item.id" /> :key="item.id" :label="item.nickname" :value="item.id" />
</el-select> </el-select>
...@@ -430,7 +429,7 @@ import {customerDropDownList} from "@/api/ecw/customerCommissionInfo"; ...@@ -430,7 +429,7 @@ import {customerDropDownList} from "@/api/ecw/customerCommissionInfo";
export default { export default {
name: "edit", name: "edit",
props: { props: {
customerId: String customerId: String,
}, },
components: { components: {
Template, Template,
...@@ -438,6 +437,7 @@ export default { ...@@ -438,6 +437,7 @@ export default {
CustomerLineTable CustomerLineTable
}, },
created() { created() {
this.isCustomerServiceConfirmed = this.$route.query.isCustomerServiceConfirmed ? true : false
this.getCustomerSelect() this.getCustomerSelect()
this.reset() this.reset()
this.getUserMemberUserFn() this.getUserMemberUserFn()
...@@ -462,6 +462,10 @@ export default { ...@@ -462,6 +462,10 @@ export default {
} else { } else {
// 新建客户 // 新建客户
this.handleAddContact() this.handleAddContact()
if(this.isCustomerServiceConfirmed){
console.log(this.userId);
this.form.customerService = this.userId
}
} }
getNodeList().then(r => { getNodeList().then(r => {
...@@ -489,6 +493,7 @@ export default { ...@@ -489,6 +493,7 @@ export default {
}, },
data(){ data(){
return { return {
isCustomerServiceConfirmed:false,
getDictDatas, getDictDatas,
DICT_TYPE, DICT_TYPE,
...@@ -642,6 +647,8 @@ export default { ...@@ -642,6 +647,8 @@ export default {
return; return;
} }
// 添加的提交 // 添加的提交
//我的客户页面跳转直接
form.isCustomerServiceConfirmed = true;
createCustomer(form).then(response => { createCustomer(form).then(response => {
this.$modal.msgSuccess(this.$t('新增成功')); this.$modal.msgSuccess(this.$t('新增成功'));
this.open = false; this.open = false;
...@@ -752,6 +759,9 @@ export default { ...@@ -752,6 +759,9 @@ export default {
} }
}, },
computed: { computed: {
userId(){
return this.$store.state.user.id
},
userMemberUser(){ userMemberUser(){
let list = this.memberList.filter(item => { let list = this.memberList.filter(item => {
return this.selectMemberList.findIndex(i => i.id === item.id) < 0 return this.selectMemberList.findIndex(i => i.id === item.id) < 0
......
...@@ -67,6 +67,10 @@ ...@@ -67,6 +67,10 @@
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['ecw:customer:export']">{{$t('导出')}}</el-button> v-hasPermi="['ecw:customer:export']">{{$t('导出')}}</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="$router.push({path:'/customer/add-edit/0',query:{isCustomerServiceConfirmed:true,}})"
v-hasPermi="['ecw:customer:create']">{{$t('新增')}}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
......
...@@ -303,7 +303,7 @@ export default { ...@@ -303,7 +303,7 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.$router.push('/customer/add-edit/0') this.$router.push({path:'/customer/add-edit/0',query:{isCustomerServiceConfirmed:true,}})
// this.reset(); // this.reset();
// this.open = true; // this.open = true;
// this.title = "添加客户"; // this.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