Commit 188c891a authored by dcy's avatar dcy

完善客户接口修改

parent d0009909
......@@ -10,7 +10,14 @@ export function createCustomer(data) {
data: data
})
}
//完善客户
export function fillupCustomeInfo(data){
return request({
url:'/ecw/customer/fillup-customer-info',
method:'put',
data
})
}
// 更新客户
export function updateCustomer(data) {
return request({
......
......@@ -270,6 +270,12 @@ export const constantRoutes = [
props: true,
name: 'customerEdit',
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+)',
......
......@@ -411,7 +411,7 @@ import {
getCustomerPage, memberUserList,
updateCustomer,
userMemberUserList,
getCustomerLines
getCustomerLines, fillupCustomeInfo
} from '@/api/ecw/customer'
import {getNodeList} from "@/api/ecw/node"
import { getProductTypeList } from '@/api/ecw/productType'
......@@ -673,14 +673,23 @@ export default {
this.form.customerContacts.forEach(e => {
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;
}
// 添加的提交
......
......@@ -517,7 +517,7 @@ export default {
handleUpdate(row) {
this.reset();
const id = row.id;
this.$router.push('/customer/edit/'+id);
this.$router.push('/customer/perfect/'+id);
// getCustomer(id).then(response => {
// this.form = response.data;
// 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