仓库管理h5

master
jyx 1 week ago
parent 7102055fe1
commit fbd8124bcb

@ -31,5 +31,12 @@ export const userSend = (data) => {
data,
});
};
//出库
export const outbound = (data) => {
return request({
url: "/containeradm/v1/box_rel_bucket/outbound",
method: "POST",
data,
});
};

@ -4,22 +4,18 @@
<navBar v-if="state.boxRelBucketStatus == 2"> </navBar>
<view class="container-box" >
<span style="font-weight: bold;text-align: center;" v-if="state.boxRelBucketStatus == 1">
保存要出库A000-B3
保存要出库{{state.locateAddress}}
</span>
<span style="font-weight: bold;text-align: center;margin-top: 20rpx;" v-if="state.boxRelBucketStatus == 1"> PT00000004</span>
<span style="font-weight: bold;text-align: center;" v-if="state.boxRelBucketStatus == 2"></span>
<span style="font-weight: bold;text-align: center;margin-top: 20rpx;" v-if="state.boxRelBucketStatus == 1"> {{state.pid}}</span>
<span style="font-weight: bold;text-align: center;" v-if="state.boxRelBucketStatus == 2">{{state.pid}}</span>
<span style="font-weight: bold;text-align: center;margin-top: 20rpx;" v-if="state.boxRelBucketStatus == 2"></span>
<view class="painting-box" >
<span>画作名称</span>
<span style="margin-top: 20rpx;">画家</span>
<span>画作名称{{ state.drawName }}</span>
<span style="margin-top: 20rpx;">画家{{ state.drawerName }}</span>
<span style="margin-top: 20rpx;">预览图</span>
<view class="image-container">
<up-image
:show-loading="true"
:src="src"
width="98%"
height="100px"
@click="click"
:src=state.drawThumbnail
></up-image>
</view>
</view>
@ -31,7 +27,7 @@
style="width: 326rpx; margin: auto; height: 80rpx;"
color="#BCBCBC"
throttleTime="5"
:loading="loading"
v-if="state.boxRelBucketStatus == 1"
>取消</up-button
>
@ -39,7 +35,7 @@
style="width: 326rpx; margin: auto; height: 80rpx;"
color="#EFC54E"
throttleTime="5"
:loading="loading"
@click="doneSet"
v-if="state.boxRelBucketStatus == 1"
>确认</up-button
>
@ -47,7 +43,7 @@
style="width: 426rpx; margin: auto; height: 86rpx;"
color="#EFC54E"
throttleTime="5"
:loading="loading"
@click="login"
v-if="state.boxRelBucketStatus == 2"
>返回继续扫码</up-button
@ -59,20 +55,54 @@
<script setup>
import { ref,reactive,onBeforeMount } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import useToast from "@/hooks/toast/useToast.js";
import { pbDetail,outbound } from "@/api/login.js";
const { showMessage } = useToast();
const isDetail = ref(false);
const loading = ref(false);
const state = reactive({
id: "",
pid: "",
containerName:"",
boxRelBucketStatus:"",
drawName:"",
drawerName:"",
drawThumbnail:"",
locateAddress:"",
});
onLoad((options) =>{
state.id = options.id;
state.pid = options.pid;
state.boxRelBucketStatus = options.boxRelBucketStatus;
console.log("qqq",state.boxRelBucketStatus)
paintingDetail()
});
const paintingDetail = async () => {
loading.value = true;
const res = await pbDetail({
id: state.id,
pid: state.pid,
});
if (res.status === 0) {
state.drawName = res.data.drawName;
state.drawerName = res.data.drawerName;
state.drawThumbnail = res.data.drawThumbnail;
state.locateAddress = res.data.locateAddress;
}
};
const doneSet = async () => {
loading.value = true;
const res = await outbound({
id: state.id,
pid: state.pid,
});
if (res.status === 0) {
showMessage({ type: "sucess", message: "出库成功" });
}else{
showMessage({ type: "error", message: res.msg });
}
loading.value = false;
};
</script>
<style lang="scss" scoped>
@ -118,6 +148,7 @@
justify-content: center;
align-items: center;
margin-top: 20rpx;
height:auto;
}
}
.button-container {

@ -17,7 +17,7 @@
margin-top: 20rpx;
"
>
A1
{{state.boxName}}
</span>
<span style="text-align: center; margin-top: 20rpx"> A列1行 </span>
</view>
@ -52,18 +52,25 @@ const state = reactive({
id: "",
pid: "",
containerName: "",
boxName:"",
});
onLoad((options) => {
state.id = options.id;
state.pid = options.id;
state.pid = options.pid;
bindShelfHole();
});
const bindShelfHole = async () => {
loading.value = true;
const res = await freebox();
if (res.status === 0) {
state.containerName = res.data.containerName;
state.boxName = res.data.boxName;
}
loading.value = false;
};
</script>

Loading…
Cancel
Save