Commit 21a82f87 authored by 邓春圆's avatar 邓春圆

添加潜在客户

parent 62166953
import request from '@/utils/request' import request from '@/utils/request'
import query from "@/views/ecw/customer/query"; import query from "@/views/ecw/customer/query";
import * as url from "url"; import * as url from "url";
import {methods} from "vue2-ace-editor";
// 创建客户 // 创建客户
export function createCustomer(data) { export function createCustomer(data) {
...@@ -26,7 +27,14 @@ export function updateCustomer(data) { ...@@ -26,7 +27,14 @@ export function updateCustomer(data) {
data: data data: data
}) })
} }
// 新建潜在客户
export function createPotential(data){
return request({
url:'/ecw/customer/create-potential',
method:'post',
data
})
}
// 删除客户 // 删除客户
export function deleteCustomer(id) { export function deleteCustomer(id) {
return request({ return request({
...@@ -72,6 +80,14 @@ export function getCustomerSelect(query) { ...@@ -72,6 +80,14 @@ export function getCustomerSelect(query) {
params: query params: query
}) })
} }
// 潜在客户
export function getPotential(query){
return request({
url:'/ecw/customer/get-potential',
method:'get',
params:query
})
}
// 根据客户id集合获得客户详情列表 // 根据客户id集合获得客户详情列表
export function getCustomerList(query) { export function getCustomerList(query) {
......
...@@ -68,7 +68,8 @@ ...@@ -68,7 +68,8 @@
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" <el-button v-if="path === '/customer/potential'" type="primary" plain icon="el-icon-plus" size="mini" @click="handleAddPotential">{{$t('新增潜在客户')}}</el-button>
<el-button v-else type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="[ selectAuthorityFn('ecw:customer:create')]">{{$t('新增')}}</el-button> v-hasPermi="[ selectAuthorityFn('ecw:customer:create')]">{{$t('新增')}}</el-button>
</el-col> </el-col>
<el-col :span="1.5" > <el-col :span="1.5" >
...@@ -512,13 +513,14 @@ ...@@ -512,13 +513,14 @@
<customer-follow-list :customer-id="customerId" :id="customerId" ref="CustomerFollowList"></customer-follow-list> <customer-follow-list :customer-id="customerId" :id="customerId" ref="CustomerFollowList"></customer-follow-list>
<customer-complaints :customer-id="customerId" ref="customerComplaints"></customer-complaints> <customer-complaints :customer-id="customerId" ref="customerComplaints"></customer-complaints>
<transfer-customer :show.sync="transferShow" :customer-ids.sync="selectCustomerList"></transfer-customer> <transfer-customer :show.sync="transferShow" :customer-ids.sync="selectCustomerList"></transfer-customer>
<add-potential-custom ref="potentialCustom" @change="getList" ></add-potential-custom>
</div> </div>
</template> </template>
<script> <script>
import { import {
createCustomer, updateCustomer, deleteCustomer, getCustomer, createCustomer, updateCustomer, deleteCustomer, getCustomer,
getCustomerPage, exportCustomerExcel, testEnterToOpenSea, getCustomerDeptPage, changeCustomerAir getCustomerPage, exportCustomerExcel, testEnterToOpenSea, getCustomerDeptPage, changeCustomerAir, getPotential
} from "@/api/ecw/customer"; } from "@/api/ecw/customer";
import { getDictDatas, DICT_TYPE } from '@/utils/dict'; import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import {CommonStatusEnum} from '@/utils/constants' import {CommonStatusEnum} from '@/utils/constants'
...@@ -533,10 +535,12 @@ import { getCountryListAll } from '@/api/ecw/country' ...@@ -533,10 +535,12 @@ import { getCountryListAll } from '@/api/ecw/country'
import {getCreditPage} from "@/api/customer/credit"; import {getCreditPage} from "@/api/customer/credit";
import transferCustomer from "@/views/ecw/customer/transferCustomer"; import transferCustomer from "@/views/ecw/customer/transferCustomer";
import Template from "@/views/cms/template/index.vue"; import Template from "@/views/cms/template/index.vue";
import AddPotentialCustom from "@/views/ecw/customer/addPotentialCustom.vue";
export default { export default {
name: "EcwCustomerIndex", name: "EcwCustomerIndex",
components: { components: {
AddPotentialCustom,
Template, Template,
upload, upload,
CustomerFollowList, CustomerFollowList,
...@@ -604,6 +608,9 @@ export default { ...@@ -604,6 +608,9 @@ export default {
}; };
}, },
computed:{ computed:{
path(){
return this.$route.path
},
channel(){ channel(){
return (val)=>{ return (val)=>{
return !!val ? this.getDictDatas(this.DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE).filter(i => (val.split(',') || []).includes(i.value)).map(i => this.isChinese ? i.label : i.labelEn ).join('') :'' return !!val ? this.getDictDatas(this.DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE).filter(i => (val.split(',') || []).includes(i.value)).map(i => this.isChinese ? i.label : i.labelEn ).join('') :''
...@@ -642,9 +649,6 @@ export default { ...@@ -642,9 +649,6 @@ export default {
this.creditList = r.data.list this.creditList = r.data.list
}) })
this.getList(); this.getList();
// getNodeList().then(r => {
// this.nodeList = r.data
// })
listServiceUser().then(r=>{ listServiceUser().then(r=>{
this.customerServiceList = r.data; this.customerServiceList = r.data;
}) })
...@@ -709,6 +713,9 @@ export default { ...@@ -709,6 +713,9 @@ export default {
case '/customer/department-customers': case '/customer/department-customers':
getCustomerDeptPage(params).then(this.setData); getCustomerDeptPage(params).then(this.setData);
break; break;
case '/customer/potential':
getPotential(params).then(this.setData)
break;
} }
}, },
...@@ -719,6 +726,10 @@ export default { ...@@ -719,6 +726,10 @@ export default {
// this.open = true; // this.open = true;
// this.title = this.$t("添加客户"); // this.title = this.$t("添加客户");
}, },
// 新增潜在客户
handleAddPotential(){
this.$refs.potentialCustom.dialogTableVisible = true;
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id;
......
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