diff --git a/src/App.vue b/src/App.vue index 68f378d..caf380b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -42,9 +42,6 @@ .el-message-box{ width: auto !important; } -.el-table .success-row { - background-color: lightgray; -} .el-table .el-table__cell { text-align: center !important; diff --git a/src/App.vue b/src/App.vue index 68f378d..caf380b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -42,9 +42,6 @@ .el-message-box{ width: auto !important; } -.el-table .success-row { - background-color: lightgray; -} .el-table .el-table__cell { text-align: center !important; diff --git a/src/api/product/category.js b/src/api/product/category.js index e9d1e39..19ff711 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -1,41 +1,84 @@ import { instance } from '../request/http' - +/** + * 品类相关接口 + */ +import request from '@/utils/request' // 获取平类列表 -const C_listPage = (str, data) => { - return instance.post(`/categoryInfo/listPage?${str}`, data) +// 根据部门找其默认区域 +export function C_listPage(str, data) { + return request({ + url: `/categoryInfo/listPage?${str}`, + method: 'post', + data + }) } // 获取品类列表(下拉框) -const C_list = () => { - return instance.post('/categoryInfo/list', {}) +export function C_list(data = { categoryCode: '', categoryName: '' }) { + return request({ + url: `/categoryInfo/list`, + method: 'post', + data + }) } // 品类更新 -const detail = (data) => { - return instance.post('/categoryInfo/detail', data) +export function detail(data) { + return request({ + url: `/categoryInfo/detail`, + method: 'post', + data + }) } // 品类更新 -const C_update = (data) => { - return instance.post('/categoryInfo/update', data) +export function C_update(data) { + return request({ + url: `/categoryInfo/update`, + method: 'post', + data + }) } // 平类新增 -const C_add = (data) => { - return instance.post('/categoryInfo/add', data) +export function C_add(data) { + return request({ + url: `/categoryInfo/add`, + method: 'post', + data + }) } // 平类删除 -const C_delete = (data) => { - return instance.post('/categoryInfo/delete', data) +export function C_delete(data) { + return request({ + url: `/categoryInfo/delete`, + method: 'post', + data + }) } // 品类批量删除 -const C_batchDelete = (data) => { - return instance.post('/categoryInfo/batchDelete', data) +export function C_batchDelete(data) { + return request({ + url: '/categoryInfo/batchDelete', + method: 'post', + data + }) } // 平类批量导出 -const C_listExport = () => { - return instance.post('/categoryInfo/listExport', {}) +export function C_listExport(data) { + return request({ + url: '/categoryInfo/listExport', + method: 'post', + data + }) } -export { C_listPage, C_update, C_listExport, C_batchDelete, C_delete, C_add, C_list, detail } +// 品类参数查询 +export function C_paramsList(categoryId) { + return request({ + url: `productParam//list/${categoryId}`, + method: 'post' + }) +} + diff --git a/src/App.vue b/src/App.vue index 68f378d..caf380b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -42,9 +42,6 @@ .el-message-box{ width: auto !important; } -.el-table .success-row { - background-color: lightgray; -} .el-table .el-table__cell { text-align: center !important; diff --git a/src/api/product/category.js b/src/api/product/category.js index e9d1e39..19ff711 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -1,41 +1,84 @@ import { instance } from '../request/http' - +/** + * 品类相关接口 + */ +import request from '@/utils/request' // 获取平类列表 -const C_listPage = (str, data) => { - return instance.post(`/categoryInfo/listPage?${str}`, data) +// 根据部门找其默认区域 +export function C_listPage(str, data) { + return request({ + url: `/categoryInfo/listPage?${str}`, + method: 'post', + data + }) } // 获取品类列表(下拉框) -const C_list = () => { - return instance.post('/categoryInfo/list', {}) +export function C_list(data = { categoryCode: '', categoryName: '' }) { + return request({ + url: `/categoryInfo/list`, + method: 'post', + data + }) } // 品类更新 -const detail = (data) => { - return instance.post('/categoryInfo/detail', data) +export function detail(data) { + return request({ + url: `/categoryInfo/detail`, + method: 'post', + data + }) } // 品类更新 -const C_update = (data) => { - return instance.post('/categoryInfo/update', data) +export function C_update(data) { + return request({ + url: `/categoryInfo/update`, + method: 'post', + data + }) } // 平类新增 -const C_add = (data) => { - return instance.post('/categoryInfo/add', data) +export function C_add(data) { + return request({ + url: `/categoryInfo/add`, + method: 'post', + data + }) } // 平类删除 -const C_delete = (data) => { - return instance.post('/categoryInfo/delete', data) +export function C_delete(data) { + return request({ + url: `/categoryInfo/delete`, + method: 'post', + data + }) } // 品类批量删除 -const C_batchDelete = (data) => { - return instance.post('/categoryInfo/batchDelete', data) +export function C_batchDelete(data) { + return request({ + url: '/categoryInfo/batchDelete', + method: 'post', + data + }) } // 平类批量导出 -const C_listExport = () => { - return instance.post('/categoryInfo/listExport', {}) +export function C_listExport(data) { + return request({ + url: '/categoryInfo/listExport', + method: 'post', + data + }) } -export { C_listPage, C_update, C_listExport, C_batchDelete, C_delete, C_add, C_list, detail } +// 品类参数查询 +export function C_paramsList(categoryId) { + return request({ + url: `productParam//list/${categoryId}`, + method: 'post' + }) +} + diff --git a/src/components/mycomponent/dialog/ElbrandDialog.vue b/src/components/mycomponent/dialog/ElbrandDialog.vue index 90305d9..6511b59 100644 --- a/src/components/mycomponent/dialog/ElbrandDialog.vue +++ b/src/components/mycomponent/dialog/ElbrandDialog.vue @@ -158,7 +158,7 @@ // 获取品类列表 C_list().then(res => { console.log(res, '品类列表') - this.categoryList = res + this.categoryList = res.data }) // 获取供应商列表 S_list().then(res => { diff --git a/src/App.vue b/src/App.vue index 68f378d..caf380b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -42,9 +42,6 @@ .el-message-box{ width: auto !important; } -.el-table .success-row { - background-color: lightgray; -} .el-table .el-table__cell { text-align: center !important; diff --git a/src/api/product/category.js b/src/api/product/category.js index e9d1e39..19ff711 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -1,41 +1,84 @@ import { instance } from '../request/http' - +/** + * 品类相关接口 + */ +import request from '@/utils/request' // 获取平类列表 -const C_listPage = (str, data) => { - return instance.post(`/categoryInfo/listPage?${str}`, data) +// 根据部门找其默认区域 +export function C_listPage(str, data) { + return request({ + url: `/categoryInfo/listPage?${str}`, + method: 'post', + data + }) } // 获取品类列表(下拉框) -const C_list = () => { - return instance.post('/categoryInfo/list', {}) +export function C_list(data = { categoryCode: '', categoryName: '' }) { + return request({ + url: `/categoryInfo/list`, + method: 'post', + data + }) } // 品类更新 -const detail = (data) => { - return instance.post('/categoryInfo/detail', data) +export function detail(data) { + return request({ + url: `/categoryInfo/detail`, + method: 'post', + data + }) } // 品类更新 -const C_update = (data) => { - return instance.post('/categoryInfo/update', data) +export function C_update(data) { + return request({ + url: `/categoryInfo/update`, + method: 'post', + data + }) } // 平类新增 -const C_add = (data) => { - return instance.post('/categoryInfo/add', data) +export function C_add(data) { + return request({ + url: `/categoryInfo/add`, + method: 'post', + data + }) } // 平类删除 -const C_delete = (data) => { - return instance.post('/categoryInfo/delete', data) +export function C_delete(data) { + return request({ + url: `/categoryInfo/delete`, + method: 'post', + data + }) } // 品类批量删除 -const C_batchDelete = (data) => { - return instance.post('/categoryInfo/batchDelete', data) +export function C_batchDelete(data) { + return request({ + url: '/categoryInfo/batchDelete', + method: 'post', + data + }) } // 平类批量导出 -const C_listExport = () => { - return instance.post('/categoryInfo/listExport', {}) +export function C_listExport(data) { + return request({ + url: '/categoryInfo/listExport', + method: 'post', + data + }) } -export { C_listPage, C_update, C_listExport, C_batchDelete, C_delete, C_add, C_list, detail } +// 品类参数查询 +export function C_paramsList(categoryId) { + return request({ + url: `productParam//list/${categoryId}`, + method: 'post' + }) +} + diff --git a/src/components/mycomponent/dialog/ElbrandDialog.vue b/src/components/mycomponent/dialog/ElbrandDialog.vue index 90305d9..6511b59 100644 --- a/src/components/mycomponent/dialog/ElbrandDialog.vue +++ b/src/components/mycomponent/dialog/ElbrandDialog.vue @@ -158,7 +158,7 @@ // 获取品类列表 C_list().then(res => { console.log(res, '品类列表') - this.categoryList = res + this.categoryList = res.data }) // 获取供应商列表 S_list().then(res => { diff --git a/src/components/mycomponent/dialog/brandAddDialog.vue b/src/components/mycomponent/dialog/brandAddDialog.vue index ebe9a91..952978e 100644 --- a/src/components/mycomponent/dialog/brandAddDialog.vue +++ b/src/components/mycomponent/dialog/brandAddDialog.vue @@ -140,7 +140,7 @@ // 获取品类列表 C_list().then(res => { console.log(res, '品类列表') - this.categoryList = res + this.categoryList = res.data }) // 获取供应商列表 S_list().then(res => { diff --git a/src/App.vue b/src/App.vue index 68f378d..caf380b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -42,9 +42,6 @@ .el-message-box{ width: auto !important; } -.el-table .success-row { - background-color: lightgray; -} .el-table .el-table__cell { text-align: center !important; diff --git a/src/api/product/category.js b/src/api/product/category.js index e9d1e39..19ff711 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -1,41 +1,84 @@ import { instance } from '../request/http' - +/** + * 品类相关接口 + */ +import request from '@/utils/request' // 获取平类列表 -const C_listPage = (str, data) => { - return instance.post(`/categoryInfo/listPage?${str}`, data) +// 根据部门找其默认区域 +export function C_listPage(str, data) { + return request({ + url: `/categoryInfo/listPage?${str}`, + method: 'post', + data + }) } // 获取品类列表(下拉框) -const C_list = () => { - return instance.post('/categoryInfo/list', {}) +export function C_list(data = { categoryCode: '', categoryName: '' }) { + return request({ + url: `/categoryInfo/list`, + method: 'post', + data + }) } // 品类更新 -const detail = (data) => { - return instance.post('/categoryInfo/detail', data) +export function detail(data) { + return request({ + url: `/categoryInfo/detail`, + method: 'post', + data + }) } // 品类更新 -const C_update = (data) => { - return instance.post('/categoryInfo/update', data) +export function C_update(data) { + return request({ + url: `/categoryInfo/update`, + method: 'post', + data + }) } // 平类新增 -const C_add = (data) => { - return instance.post('/categoryInfo/add', data) +export function C_add(data) { + return request({ + url: `/categoryInfo/add`, + method: 'post', + data + }) } // 平类删除 -const C_delete = (data) => { - return instance.post('/categoryInfo/delete', data) +export function C_delete(data) { + return request({ + url: `/categoryInfo/delete`, + method: 'post', + data + }) } // 品类批量删除 -const C_batchDelete = (data) => { - return instance.post('/categoryInfo/batchDelete', data) +export function C_batchDelete(data) { + return request({ + url: '/categoryInfo/batchDelete', + method: 'post', + data + }) } // 平类批量导出 -const C_listExport = () => { - return instance.post('/categoryInfo/listExport', {}) +export function C_listExport(data) { + return request({ + url: '/categoryInfo/listExport', + method: 'post', + data + }) } -export { C_listPage, C_update, C_listExport, C_batchDelete, C_delete, C_add, C_list, detail } +// 品类参数查询 +export function C_paramsList(categoryId) { + return request({ + url: `productParam//list/${categoryId}`, + method: 'post' + }) +} + diff --git a/src/components/mycomponent/dialog/ElbrandDialog.vue b/src/components/mycomponent/dialog/ElbrandDialog.vue index 90305d9..6511b59 100644 --- a/src/components/mycomponent/dialog/ElbrandDialog.vue +++ b/src/components/mycomponent/dialog/ElbrandDialog.vue @@ -158,7 +158,7 @@ // 获取品类列表 C_list().then(res => { console.log(res, '品类列表') - this.categoryList = res + this.categoryList = res.data }) // 获取供应商列表 S_list().then(res => { diff --git a/src/components/mycomponent/dialog/brandAddDialog.vue b/src/components/mycomponent/dialog/brandAddDialog.vue index ebe9a91..952978e 100644 --- a/src/components/mycomponent/dialog/brandAddDialog.vue +++ b/src/components/mycomponent/dialog/brandAddDialog.vue @@ -140,7 +140,7 @@ // 获取品类列表 C_list().then(res => { console.log(res, '品类列表') - this.categoryList = res + this.categoryList = res.data }) // 获取供应商列表 S_list().then(res => { diff --git a/src/components/mycomponent/dialog/categoryAddDialog.vue b/src/components/mycomponent/dialog/categoryAddDialog.vue index e842e37..c48b9cf 100644 --- a/src/components/mycomponent/dialog/categoryAddDialog.vue +++ b/src/components/mycomponent/dialog/categoryAddDialog.vue @@ -213,7 +213,7 @@ }, mounted() { C_list().then(res => { - this.categoryList = res + this.categoryList = res.data }) getCertification().then(res => { console.log(res) diff --git a/src/App.vue b/src/App.vue index 68f378d..caf380b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -42,9 +42,6 @@ .el-message-box{ width: auto !important; } -.el-table .success-row { - background-color: lightgray; -} .el-table .el-table__cell { text-align: center !important; diff --git a/src/api/product/category.js b/src/api/product/category.js index e9d1e39..19ff711 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -1,41 +1,84 @@ import { instance } from '../request/http' - +/** + * 品类相关接口 + */ +import request from '@/utils/request' // 获取平类列表 -const C_listPage = (str, data) => { - return instance.post(`/categoryInfo/listPage?${str}`, data) +// 根据部门找其默认区域 +export function C_listPage(str, data) { + return request({ + url: `/categoryInfo/listPage?${str}`, + method: 'post', + data + }) } // 获取品类列表(下拉框) -const C_list = () => { - return instance.post('/categoryInfo/list', {}) +export function C_list(data = { categoryCode: '', categoryName: '' }) { + return request({ + url: `/categoryInfo/list`, + method: 'post', + data + }) } // 品类更新 -const detail = (data) => { - return instance.post('/categoryInfo/detail', data) +export function detail(data) { + return request({ + url: `/categoryInfo/detail`, + method: 'post', + data + }) } // 品类更新 -const C_update = (data) => { - return instance.post('/categoryInfo/update', data) +export function C_update(data) { + return request({ + url: `/categoryInfo/update`, + method: 'post', + data + }) } // 平类新增 -const C_add = (data) => { - return instance.post('/categoryInfo/add', data) +export function C_add(data) { + return request({ + url: `/categoryInfo/add`, + method: 'post', + data + }) } // 平类删除 -const C_delete = (data) => { - return instance.post('/categoryInfo/delete', data) +export function C_delete(data) { + return request({ + url: `/categoryInfo/delete`, + method: 'post', + data + }) } // 品类批量删除 -const C_batchDelete = (data) => { - return instance.post('/categoryInfo/batchDelete', data) +export function C_batchDelete(data) { + return request({ + url: '/categoryInfo/batchDelete', + method: 'post', + data + }) } // 平类批量导出 -const C_listExport = () => { - return instance.post('/categoryInfo/listExport', {}) +export function C_listExport(data) { + return request({ + url: '/categoryInfo/listExport', + method: 'post', + data + }) } -export { C_listPage, C_update, C_listExport, C_batchDelete, C_delete, C_add, C_list, detail } +// 品类参数查询 +export function C_paramsList(categoryId) { + return request({ + url: `productParam//list/${categoryId}`, + method: 'post' + }) +} + diff --git a/src/components/mycomponent/dialog/ElbrandDialog.vue b/src/components/mycomponent/dialog/ElbrandDialog.vue index 90305d9..6511b59 100644 --- a/src/components/mycomponent/dialog/ElbrandDialog.vue +++ b/src/components/mycomponent/dialog/ElbrandDialog.vue @@ -158,7 +158,7 @@ // 获取品类列表 C_list().then(res => { console.log(res, '品类列表') - this.categoryList = res + this.categoryList = res.data }) // 获取供应商列表 S_list().then(res => { diff --git a/src/components/mycomponent/dialog/brandAddDialog.vue b/src/components/mycomponent/dialog/brandAddDialog.vue index ebe9a91..952978e 100644 --- a/src/components/mycomponent/dialog/brandAddDialog.vue +++ b/src/components/mycomponent/dialog/brandAddDialog.vue @@ -140,7 +140,7 @@ // 获取品类列表 C_list().then(res => { console.log(res, '品类列表') - this.categoryList = res + this.categoryList = res.data }) // 获取供应商列表 S_list().then(res => { diff --git a/src/components/mycomponent/dialog/categoryAddDialog.vue b/src/components/mycomponent/dialog/categoryAddDialog.vue index e842e37..c48b9cf 100644 --- a/src/components/mycomponent/dialog/categoryAddDialog.vue +++ b/src/components/mycomponent/dialog/categoryAddDialog.vue @@ -213,7 +213,7 @@ }, mounted() { C_list().then(res => { - this.categoryList = res + this.categoryList = res.data }) getCertification().then(res => { console.log(res) diff --git a/src/components/mycomponent/dialog/categoryInfoDialog.vue b/src/components/mycomponent/dialog/categoryInfoDialog.vue index 3ac4407..ad5fd28 100644 --- a/src/components/mycomponent/dialog/categoryInfoDialog.vue +++ b/src/components/mycomponent/dialog/categoryInfoDialog.vue @@ -1,62 +1,101 @@