From 1be1b02ce28638c92076e4d40afec70a3f4c2249 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期二, 07 五月 2024 14:37:02 +0800
Subject: [PATCH] 产品模块 启用多单位点击取消关闭复选框+点击确定的时候增加至少填写一项的校验
---
src/api/warehouseManage/warehouse.js | 67 +++++++++++++++++++++++++++------
1 files changed, 55 insertions(+), 12 deletions(-)
diff --git a/src/api/warehouseManage/warehouse.js b/src/api/warehouseManage/warehouse.js
index b68f3f9..d9b2874 100644
--- a/src/api/warehouseManage/warehouse.js
+++ b/src/api/warehouseManage/warehouse.js
@@ -1,9 +1,10 @@
import request from "@/common/untils/request.js"
-import axios from "axios"
// 浠撳簱鍒楄〃
-export const getWarehouseList = async (data) => {
- return await axios.get(`/api-wms/v1/warehouse/warehouse`, {
+export const getWarehouseList = (data) => {
+ return request({
+ url: "/api-wms/v1/warehouse/warehouse",
+ method: "get",
params: data
})
}
@@ -18,22 +19,24 @@
// 鍒犻櫎浠撳簱
export function deleteWarehouse(data) {
return request({
- url: "/api-wms/v1/warehouse/warehouse/"+data.id,
+ url: "/api-wms/v1/warehouse/warehouse/" + data.id,
method: "delete",
data
})
}
-// 鏇存柊浠撳簱
+// 鏇存柊浠撳簱
export function updateWarehouse(data) {
return request({
- url: "/api-wms/v1/warehouse/warehouse/"+data.id,
- method: "put",
+ url: "/api-wms/v1/warehouse/updateWarehouse",
+ method: "post",
data
})
}
// 涓氬姟绫诲瀷 鍒楄〃
-export const getOperationTypeList = async (data) => {
- return await axios.get(`/api-wms/v1/operationType/operationType`, {
+export const getOperationTypeList = (data) => {
+ return request({
+ url: "/api-wms/v1/operationType/operationType",
+ method: "get",
params: data
})
}
@@ -48,16 +51,56 @@
// 鍒犻櫎涓氬姟绫诲瀷
export function deleteOperationType(data) {
return request({
- url: "/api-wms/v1/operationType/operationType/"+data.id,
+ url: "/api-wms/v1/operationType/operationType/" + data.id,
method: "delete",
data
})
}
-// 鏇存柊涓氬姟绫诲瀷
+// 鏇存柊涓氬姟绫诲瀷
export function updateOperationType(data) {
return request({
- url: "/api-wms/v1/operationType/operationType/"+data.id,
+ url: "/api-wms/v1/operationType/operationType/" + data.id,
method: "put",
data
})
}
+// 浣嶇疆 鍒楄〃
+export function getLocationList(data) {
+ return request({
+ url: "/api-wms/v1/location/getLocationList",
+ method: "post",
+ data
+ })
+}
+// 鍒涘缓浣嶇疆
+export function addLocation(data) {
+ return request({
+ url: "/api-wms/v1/location/addLocation",
+ method: "post",
+ data
+ })
+}
+// 鍒犻櫎浣嶇疆
+export function deleteLocation(data) {
+ return request({
+ url: "/api-wms/v1/location/deleteLocation/" + data.id,
+ method: "delete",
+ data
+ })
+}
+// 浣嶇疆 璇︽儏
+export function getLocationDetails(data) {
+ return request({
+ url: "/api-wms/v1/location/getLocationDetails/" + data.id,
+ method: "get",
+ data
+ })
+}
+// 鏇存柊浣嶇疆
+export function updateLocation(data) {
+ return request({
+ url: "/api-wms/v1/location/updateLocation",
+ method: "post",
+ data
+ })
+}
--
Gitblit v1.8.0