fix查询bug

This commit is contained in:
贾旖璇 2024-09-29 14:15:56 +08:00
parent 3b83aeaa87
commit f7477e86b3
4 changed files with 25 additions and 5 deletions

View File

@ -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,
});
};

View File

@ -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;

View File

@ -21,7 +21,7 @@
<up-list @scrolltolower="scrolltolower" style="height:1120rpx">
<up-list-item class="painting-box" v-for="(painting,index) in state.tableData" :key="index">
<span style="display: flex; align-items: center;position: relative;" >
<up-image :show-loading="true" :src="painting.HdPic" width="100px" height="100px" @click="click"></up-image>
<up-image :show-loading="true" :src="painting.HdPic" width="100px" height="100px" @click="enlarge"></up-image>
<span style="display: flex; flex-direction: column; margin-left: 10px;">
<span style="font-weight: bold;" >{{painting.ArtworkName}}</span>
<span style="color:#BCBCBC;font-size: 16px;">画作编号{{ painting.Tfnum }}</span>

View File

@ -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 });
}
}
</script>
<style lang="scss" scoped>
@ -147,7 +159,7 @@ page {
justify-content: space-between;
width: 100%;
position: fixed;
bottom: 20rpx;
bottom: 1rpx;
left: 0;
padding: 0 20rpx;
box-sizing: border-box;