|
|
@@ -1,14 +1,16 @@
|
|
|
import request from '@/utils/request';
|
|
|
// 物品信息列表
|
|
|
-export async function getList (data) {
|
|
|
- const res = await request.post('/main/category/getList', data);
|
|
|
+export async function getList(data) {
|
|
|
+ const res = await request.get(
|
|
|
+ `/main/category/getList?categoryLevelId=${data.categoryLevelId}&pageNum=${data.pageNum}&size=${data.size}&searchKey=${data.searchKey}`
|
|
|
+ );
|
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|
|
|
}
|
|
|
return Promise.reject(new Error(res.data.message));
|
|
|
}
|
|
|
// 物品信息保存
|
|
|
-export async function informationAdd (data) {
|
|
|
+export async function informationAdd(data) {
|
|
|
const res = await request.post('/main/category/add', data);
|
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|
|
|
@@ -17,7 +19,7 @@ export async function informationAdd (data) {
|
|
|
}
|
|
|
|
|
|
// 物品信息编辑
|
|
|
-export async function informationEdit (data) {
|
|
|
+export async function informationEdit(data) {
|
|
|
const res = await request.post('/main/category/edit', data);
|
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|
|
|
@@ -26,7 +28,7 @@ export async function informationEdit (data) {
|
|
|
}
|
|
|
|
|
|
// 物品信息详情
|
|
|
-export async function getDetails (id) {
|
|
|
+export async function getDetails(id) {
|
|
|
const res = await request.get(`/main/category/info/${id}`);
|
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|
|
|
@@ -35,7 +37,7 @@ export async function getDetails (id) {
|
|
|
}
|
|
|
|
|
|
// 物品信息删除
|
|
|
-export async function removeItem (id) {
|
|
|
+export async function removeItem(id) {
|
|
|
const res = await request.get(`/main/category/remove/${id}`, {});
|
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|
|
|
@@ -44,7 +46,7 @@ export async function removeItem (id) {
|
|
|
}
|
|
|
|
|
|
// 物品信息获取编码
|
|
|
-export async function getOrderNo (prefix) {
|
|
|
+export async function getOrderNo(prefix) {
|
|
|
const res = await request.get(`/main/category/createOrderNo/${prefix}`, {});
|
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|