diff --git a/src/api/login.js b/src/api/login.js index 840fdf3..d24f36d 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -63,3 +63,11 @@ export const add = (data) => { data, }); }; +//查询货架号是否可用 +export const check_freebox = (data) => { + return request({ + url: "/containeradm/v1/box_rel_bucket/check_freebox", + method: "POST", + data, + }); +}; diff --git a/src/pages/detail/index.vue b/src/pages/detail/index.vue index fcbdfac..5185201 100644 --- a/src/pages/detail/index.vue +++ b/src/pages/detail/index.vue @@ -162,7 +162,7 @@ const doneSet = async () => { justify-content: space-between; width: 100%; position: fixed; - bottom: 20rpx; + bottom: 1rpx; left: 0; padding: 0 20rpx; box-sizing: border-box; diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 1c0b02e..faf4451 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -21,7 +21,7 @@ - + {{painting.ArtworkName}} 画作编号:{{ painting.Tfnum }} diff --git a/src/pages/painting/index.vue b/src/pages/painting/index.vue index 4ad1e23..c133457 100644 --- a/src/pages/painting/index.vue +++ b/src/pages/painting/index.vue @@ -46,7 +46,7 @@ import { ref, reactive, onBeforeMount } from "vue"; import useToast from "@/hooks/toast/useToast.js"; import { onLoad } from "@dcloudio/uni-app"; -import { freebox,bind} from "@/api/login.js"; +import { freebox,bind,check_freebox} from "@/api/login.js"; const { showMessage } = useToast(); const loading = ref(false); const isButtonDisabled = ref(false); @@ -74,13 +74,14 @@ const bindShelfHole = async () => { state.boxName = res.data.boxName; state.containerUid=res.data.containerUid; state.boxUid=res.data.boxUid; + check() if (state.boxName) { const parts = state.boxName.split(/(\d+)/); state.column = parts[0]; // 字母部分 state.row = parts[1]; // 数字部分 } + } - loading.value = false; }; //入库 @@ -103,6 +104,17 @@ const doneSet = async () => { } loading.value = false; }; +//查孔洞是否能用 +const check = async () => { + const res = await check_freebox({ + boxUid : state.boxUid + }); + if(res.status === 0){ + }else{ + showMessage({ type: "error", message: res.msg }); + } +} +