Commit f78e6d0d authored by 邓春圆's avatar 邓春圆

添加潜在客户

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