diff --git a/src/router/index.js b/src/router/index.js index c97638d..12060ae 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,12 +13,12 @@ let router = new Router({ }, { path: '/', - component: () => import(/* webpackChunkName: "home" */ '../views/Home.vue'), + component: () => import('../views/Home.vue'), meta: { title: '自述文件' }, children: [ { path: '/customer', - component: () => import(/* webpackChunkName: "dashboard" */ '../views/customer/customer.vue'), + component: () => import( '../views/customer/customer.vue'), meta: { title: '客户管理' } }, { @@ -38,14 +38,20 @@ let router = new Router({ }, { path: '/order', - component: () => import( '../views/oder/Order.vue'), + component: () => import( '../views/order/Order.vue'), meta: { title: '订单管理' } }, { path: '/addorder', - component: () => import( '../views/oder/AddOrder.vue'), + component: () => import( '../views/order/AddOrder.vue'), meta: { title: '新增订单' } }, + { + path: '/selectClient', + component: () => import( '../views/order/selectClient.vue'), + meta: { title: '选择订单客户' } + }, + { path: '/configure', component: () => import( '../views/serve/Configure.vue'), @@ -88,19 +94,19 @@ let router = new Router({ }, { path: '/404', - component: () => import(/* webpackChunkName: "404" */ '../views/404.vue'), + component: () => import('../views/404.vue'), meta: { title: '404' } }, { path: '/403', - component: () => import(/* webpackChunkName: "403" */ '../views/403.vue'), + component: () => import('../views/403.vue'), meta: { title: '403' } } ] }, { path: '/login', - component: () => import(/* webpackChunkName: "login" */ '../views/Login.vue'), + component: () => import('../views/Login.vue'), meta: { title: '登录' } }, { diff --git a/src/utils/api.js b/src/utils/api.js index 97a38ba..bbae75f 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -32,40 +32,45 @@ export default { updateOR: `${host}/liuwanr/userInfo/updateOR`, //更新用户组织架构 // 客户管理 - delCustomers: `${host3}/nakadai/customer/delCustomers`, - updateCustomer: `${host3}/nakadai/customer/updateCustomer`, - addCustomer: `${host3}/nakadai/customer/addCustomer`, - queryCustomer: `${host3}/nakadai/customer/queryCustomer`, - queryCustomerDetails: `${host3}/nakadai/customer/queryCustomerDetails`, - resetPwdCustomer: `${host3}/nakadai/customer/resetPwd`, - queryCustomerIsExists: `${host3}/nakadai/customer/queryCustomerIsExists`, - updateEnabled: `${host3}/nakadai/customer/updateEnabled`, - queryCustomerIndustryClass: `${host3}/nakadai/hrIndustryClass/queryIndustryClass`, - queryCustomerIndustry: `${host3}/nakadai/hrIndustry/queryIndustry`, - querySchoolData: `${host3}/nakadai/school/querySchool`, + delCustomers: `${host}/nakadai/customer/delCustomers`, + updateCustomer: `${host}/nakadai/customer/updateCustomer`, + addCustomer: `${host}/nakadai/customer/addCustomer`, +// /nakadai/customer/queryCustomerDetails + queryCustomer: `${host}/nakadai/customer/queryCustomer`, + + queryCustomerDetails: `${host}/nakadai/customer/queryCustomerDetails`, + + resetPwdCustomer: `${host}/nakadai/customer/resetPwd`, + queryCustomerIsExists: `${host}/nakadai/customer/queryCustomerIsExists`, + updateEnabled: `${host}/nakadai/customer/updateEnabled`, + queryCustomerIndustryClass: `${host}/nakadai/hrIndustryClass/queryIndustryClass`, + queryCustomerIndustry: `${host}/nakadai/hrIndustry/queryIndustry`, + querySchoolData: `${host}/nakadai/school/querySchool`, queryPhone: `${host}/liuwanr/user/queryPhone`, queryPlatform: `${host}/liuwanr/userInfo/queryPlatform`, // 用户管理 - delUserAccount: `${host3}/users/userAccount/delUserAccount`, - queryUserInfoDetails: `${host3}/users/userAccount/queryUserInfoDetails`, - queryUserInfoList: `${host3}/users/userAccount/queryUserInfoList`, - resetPwd: `${host3}/users/userAccount/resetPwd`, - selectAccountDetail: `${host3}/users/userAccount/selectAccountDetail`, - selectUserSysBind: `${host3}/users/userAccount/selectUserSysBind`, - updatePersonCenter: `${host3}/users/userAccount/updatePersonCenter`, - updateUserAvatars: `${host3}/users/userAccount/updateUserAvatars`, - userInfo: `${host3}/users/userAccount/userInfo`, - bindPhone: `${host3}/users/userAccount/bindPhone`, - sendPhoneCode: `${host3}/users/userAccount/sendPhoneCode`, - findPasswordByPhone: `${host3}/users/userAccount/findPasswordByPhone`, - updateAccountEnable: `${host3}/users/userAccount/updateAccountEnable`, - updateAccountAllEnable: `${host3}/users/userAccount/updateAccountAllEnable`, + delUserAccount: `${host}/users/userAccount/delUserAccount`, + queryUserInfoDetails: `${host}/users/userAccount/queryUserInfoDetails`, + queryUserInfoList: `${host}/users/userAccount/queryUserInfoList`, + resetPwd: `${host}/users/userAccount/resetPwd`, + selectAccountDetail: `${host}/users/userAccount/selectAccountDetail`, + selectUserSysBind: `${host}/users/userAccount/selectUserSysBind`, + updatePersonCenter: `${host}/users/userAccount/updatePersonCenter`, + updateUserAvatars: `${host}/users/userAccount/updateUserAvatars`, + userInfo: `${host}/users/userAccount/userInfo`, + bindPhone: `${host}/users/userAccount/bindPhone`, + sendPhoneCode: `${host}/users/userAccount/sendPhoneCode`, + findPasswordByPhone: `${host}/users/userAccount/findPasswordByPhone`, + updateAccountEnable: `${host}/users/userAccount/updateAccountEnable`, + updateAccountAllEnable: `${host}/users/userAccount/updateAccountAllEnable`, queryOrder: `${host}/liuwanr/order/queryOrder`, //查询订单 queryOrderDetails: `${host}/liuwanr/order/queryOrderDetails`, //查询订单详情 queryOrderCustomer: `${host}/liuwanr/order/queryOrderCustomer`, //查询订单客户 + queryOrderCustomerContact: `${host}/liuwanr/order/queryOrderCustomerContact`, //查询订单客户联系人 + addOrder: `${host}/liuwanr/order/addOrder`, //添加订单 updateOrder: `${host}/liuwanr/order/updateOrder`, //编辑订单 deleteOrder: `${host}/liuwanr/order/deleteOrder`, //删除订单 @@ -94,8 +99,8 @@ export default { querySchool: `${host}/liuwanr/school/querySchool`, //查询学校 querySchoolDetails: `${host}/liuwanr/school/querySchoolDetails`, //查询学校详情 - queryProvince: `${host3}/nakadai/province/queryProvince`, //查询省份 - queryCity: `${host3}/nakadai/city/queryCity`, //查询城市 + queryProvince: `${host}/nakadai/province/queryProvince`, //查询省份 + queryCity: `${host}/nakadai/city/queryCity`, //查询城市 queryCourseDiscipline: `${host}/liuwanr/course/queryCourseDiscipline`, //查询课程学科 queryCourseProfessionalClass: `${host}/liuwanr/course/queryCourseProfessionalClass`, //查询专业类 diff --git a/src/utils/http.js b/src/utils/http.js index c635883..c9171dc 100644 --- a/src/utils/http.js +++ b/src/utils/http.js @@ -27,7 +27,6 @@ axios.interceptors.request.use(config => { } return config; }, err => { - console.log(err,'请求拦截30'); Message.error({ message: '退出登陆', onClose: function () { @@ -44,7 +43,6 @@ axios.interceptors.response.use( return Promise.resolve(response); } else { Message.error(response.message,'res'); - console.log(response,'response',48); return Promise.reject(response); } }, @@ -143,7 +141,6 @@ export function post(url, params) { return resolve(res.data); }) .catch(err => { - console.log(148,'err',err); return reject(err.data) }) }); diff --git a/src/views/oder/AddOrder.vue b/src/views/oder/AddOrder.vue deleted file mode 100644 index 997309c..0000000 --- a/src/views/oder/AddOrder.vue +++ /dev/null @@ -1,946 +0,0 @@ - - - - - diff --git a/src/views/order/AddOrder.vue b/src/views/order/AddOrder.vue new file mode 100644 index 0000000..9e8f3e5 --- /dev/null +++ b/src/views/order/AddOrder.vue @@ -0,0 +1,999 @@ + + + + + diff --git a/src/views/oder/Order.vue b/src/views/order/Order.vue similarity index 90% rename from src/views/oder/Order.vue rename to src/views/order/Order.vue index 62c2574..8620bc7 100644 --- a/src/views/oder/Order.vue +++ b/src/views/order/Order.vue @@ -69,7 +69,7 @@ - + @@ -83,10 +83,10 @@ @@ -156,12 +156,12 @@ export default { } this.$post(this.api.orderList,data).then(res => { console.log(res,'list'); - res.orderPage.records.forEach(e => { + res.orderPage.orders.forEach(e => { e.orderType = this.orderTypeFn(e.orderType) e.orderStatus = this.orderStatusFn(e.orderStatus) e.orderNature = this.orderNatureFn(e.orderNature) }) - this.orderData = res.orderPage.records + this.orderData = res.orderPage.orders this.totals =res.orderPage.total }).catch(res => {}); }, @@ -188,20 +188,18 @@ export default { this.$store.commit("systemData", { order_id : ''}); this.$router.push('/addorder'); }, - edit(row){ - this.$store.commit("systemData", { order_id : row.orderId}); - this.$router.push('/addorder'); + handle(val,row){ + this.$router.push('/addorder?'+val+'='+row.orderId); }, + // 删除订单 handleDelete(row) { this.$confirm('确定要删除吗?', '提示', { type: 'warning' }) .then(() => { - let result = row.orderId var arr = [] - arr.push(result) - let data = arr - this.$post(this.api.deleteOrder,data).then(res => { + arr.push(row.orderId) + this.$post(this.api.orderDelete,{ids:arr}).then(res => { this.$message.success('删除成功'); this.getData() }).catch(res => {}); @@ -216,24 +214,26 @@ export default { return row.orderId; }, handleSelectionChange(val) { - this.multipleSelection = val; + console.log(val,'xuan'); + if(val.length>0){ + this.multipleSelection = val.map(e=>e.orderId); + }else{ + this.multipleSelection = [] + } }, delAllSelection() { if(this.multipleSelection.length != ''){ - let arr = this.multipleSelection - let result = arr.map(e => e.orderId) // 批量删除 this.$confirm('确定要删除吗?', '提示', { type: 'warning' }) .then(() => { - let data = result - this.$post(this.api.deleteOrder,data).then(res => { + this.$post(this.api.orderDelete,{ids:this.multipleSelection}).then(res => { this.multipleSelection = []; this.$message.success('删除成功'); this.getData() - }).catch(res => {}); - }).catch(() => {}); + }).catch(err => {}); + }).catch(err => {}); }else{ this.$message.error('请先选择订单 !'); } @@ -245,6 +245,10 @@ export default { handleCurrentChange(val) { this.pageNo = val; this.getData(); + }, + // 选择客户触发 + gotoClient(){ + this.$router.push('') } } }; diff --git a/src/views/order/selectClient.vue b/src/views/order/selectClient.vue new file mode 100644 index 0000000..c54f313 --- /dev/null +++ b/src/views/order/selectClient.vue @@ -0,0 +1,253 @@ + + + \ No newline at end of file