Commit 188c891a authored by dcy's avatar dcy

完善客户接口修改

parent d0009909
...@@ -10,7 +10,14 @@ export function createCustomer(data) { ...@@ -10,7 +10,14 @@ export function createCustomer(data) {
data: data data: data
}) })
} }
//完善客户
export function fillupCustomeInfo(data){
return request({
url:'/ecw/customer/fillup-customer-info',
method:'put',
data
})
}
// 更新客户 // 更新客户
export function updateCustomer(data) { export function updateCustomer(data) {
return request({ return request({
......
...@@ -270,6 +270,12 @@ export const constantRoutes = [ ...@@ -270,6 +270,12 @@ export const constantRoutes = [
props: true, props: true,
name: 'customerEdit', name: 'customerEdit',
meta: {title: '新建客户', icon: ''} meta: {title: '新建客户', icon: ''}
},{
path: 'perfect/:customerId(\\d+)',
component: (resolve) => import('@/views/ecw/customer/edit'),
props: true,
name: 'perfect',
meta: {title: '完善客户', icon: ''}
}, },
{ {
path: 'query/:customerId(\\d+)', path: 'query/:customerId(\\d+)',
......
...@@ -411,7 +411,7 @@ import { ...@@ -411,7 +411,7 @@ import {
getCustomerPage, memberUserList, getCustomerPage, memberUserList,
updateCustomer, updateCustomer,
userMemberUserList, userMemberUserList,
getCustomerLines getCustomerLines, fillupCustomeInfo
} from '@/api/ecw/customer' } from '@/api/ecw/customer'
import {getNodeList} from "@/api/ecw/node" import {getNodeList} from "@/api/ecw/node"
import { getProductTypeList } from '@/api/ecw/productType' import { getProductTypeList } from '@/api/ecw/productType'
...@@ -673,14 +673,23 @@ export default { ...@@ -673,14 +673,23 @@ export default {
this.form.customerContacts.forEach(e => { this.form.customerContacts.forEach(e => {
e.customerId = this.customerId e.customerId = this.customerId
}) })
if(this.$route.name === 'perfect'){
fillupCustomeInfo(form).then(r => {
this.$modal.msgSuccess(this.$t('修改成功'));
this.open = false;
const obj = { path: "/customer/customer" };
this.$tab.closeOpenPage(obj);
})
}else {
updateCustomer(form).then(response => {
this.$modal.msgSuccess(this.$t('修改成功'));
this.open = false;
// this.getList();
const obj = { path: "/customer/customer" };
this.$tab.closeOpenPage(obj);
})
}
updateCustomer(form).then(response => {
this.$modal.msgSuccess(this.$t('修改成功'));
this.open = false;
// this.getList();
const obj = { path: "/customer/customer" };
this.$tab.closeOpenPage(obj);
})
return; return;
} }
// 添加的提交 // 添加的提交
......
...@@ -517,7 +517,7 @@ export default { ...@@ -517,7 +517,7 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const id = row.id; const id = row.id;
this.$router.push('/customer/edit/'+id); this.$router.push('/customer/perfect/'+id);
// getCustomer(id).then(response => { // getCustomer(id).then(response => {
// this.form = response.data; // this.form = response.data;
// this.open = true; // this.open = 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