仓库管理h5
This commit is contained in:
parent
7102055fe1
commit
fbd8124bcb
@ -31,5 +31,12 @@ export const userSend = (data) => {
|
|||||||
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>
|
<navBar v-if="state.boxRelBucketStatus == 2"> 画作详情 </navBar>
|
||||||
<view class="container-box" >
|
<view class="container-box" >
|
||||||
<span style="font-weight: bold;text-align: center;" v-if="state.boxRelBucketStatus == 1">
|
<span style="font-weight: bold;text-align: center;" v-if="state.boxRelBucketStatus == 1">
|
||||||
保存要出库A000-B3的
|
保存要出库{{state.locateAddress}}的
|
||||||
</span>
|
</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;margin-top: 20rpx;" v-if="state.boxRelBucketStatus == 1"> {{state.pid}}画筒吗?</span>
|
||||||
<span style="font-weight: bold;text-align: center;" v-if="state.boxRelBucketStatus == 2">画筒号:</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>
|
<span style="font-weight: bold;text-align: center;margin-top: 20rpx;" v-if="state.boxRelBucketStatus == 2">所在位置:</span>
|
||||||
<view class="painting-box" >
|
<view class="painting-box" >
|
||||||
<span>画作名称:</span>
|
<span>画作名称:{{ state.drawName }}</span>
|
||||||
<span style="margin-top: 20rpx;">画家:</span>
|
<span style="margin-top: 20rpx;">画家:{{ state.drawerName }}</span>
|
||||||
<span style="margin-top: 20rpx;">预览图:</span>
|
<span style="margin-top: 20rpx;">预览图:</span>
|
||||||
<view class="image-container">
|
<view class="image-container">
|
||||||
<up-image
|
<up-image
|
||||||
:show-loading="true"
|
:src=state.drawThumbnail
|
||||||
:src="src"
|
|
||||||
width="98%"
|
|
||||||
height="100px"
|
|
||||||
@click="click"
|
|
||||||
></up-image>
|
></up-image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -31,7 +27,7 @@
|
|||||||
style="width: 326rpx; margin: auto; height: 80rpx;"
|
style="width: 326rpx; margin: auto; height: 80rpx;"
|
||||||
color="#BCBCBC"
|
color="#BCBCBC"
|
||||||
throttleTime="5"
|
throttleTime="5"
|
||||||
:loading="loading"
|
|
||||||
v-if="state.boxRelBucketStatus == 1"
|
v-if="state.boxRelBucketStatus == 1"
|
||||||
>取消</up-button
|
>取消</up-button
|
||||||
>
|
>
|
||||||
@ -39,7 +35,7 @@
|
|||||||
style="width: 326rpx; margin: auto; height: 80rpx;"
|
style="width: 326rpx; margin: auto; height: 80rpx;"
|
||||||
color="#EFC54E"
|
color="#EFC54E"
|
||||||
throttleTime="5"
|
throttleTime="5"
|
||||||
:loading="loading"
|
@click="doneSet"
|
||||||
v-if="state.boxRelBucketStatus == 1"
|
v-if="state.boxRelBucketStatus == 1"
|
||||||
>确认</up-button
|
>确认</up-button
|
||||||
>
|
>
|
||||||
@ -47,7 +43,7 @@
|
|||||||
style="width: 426rpx; margin: auto; height: 86rpx;"
|
style="width: 426rpx; margin: auto; height: 86rpx;"
|
||||||
color="#EFC54E"
|
color="#EFC54E"
|
||||||
throttleTime="5"
|
throttleTime="5"
|
||||||
:loading="loading"
|
|
||||||
@click="login"
|
@click="login"
|
||||||
v-if="state.boxRelBucketStatus == 2"
|
v-if="state.boxRelBucketStatus == 2"
|
||||||
>返回继续扫码</up-button
|
>返回继续扫码</up-button
|
||||||
@ -59,20 +55,54 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref,reactive,onBeforeMount } from "vue";
|
import { ref,reactive,onBeforeMount } from "vue";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
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 isDetail = ref(false);
|
||||||
|
const loading = ref(false);
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
id: "",
|
id: "",
|
||||||
pid: "",
|
pid: "",
|
||||||
containerName:"",
|
containerName:"",
|
||||||
boxRelBucketStatus:"",
|
boxRelBucketStatus:"",
|
||||||
|
drawName:"",
|
||||||
|
drawerName:"",
|
||||||
|
drawThumbnail:"",
|
||||||
|
locateAddress:"",
|
||||||
});
|
});
|
||||||
onLoad((options) =>{
|
onLoad((options) =>{
|
||||||
state.id = options.id;
|
state.id = options.id;
|
||||||
state.pid = options.pid;
|
state.pid = options.pid;
|
||||||
state.boxRelBucketStatus = options.boxRelBucketStatus;
|
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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -118,6 +148,7 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
|
height:auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.button-container {
|
.button-container {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
A1
|
{{state.boxName}}
|
||||||
</span>
|
</span>
|
||||||
<span style="text-align: center; margin-top: 20rpx"> A列1行 </span>
|
<span style="text-align: center; margin-top: 20rpx"> A列1行 </span>
|
||||||
</view>
|
</view>
|
||||||
@ -52,18 +52,25 @@ const state = reactive({
|
|||||||
id: "",
|
id: "",
|
||||||
pid: "",
|
pid: "",
|
||||||
containerName: "",
|
containerName: "",
|
||||||
|
boxName:"",
|
||||||
});
|
});
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
|
|
||||||
state.id = options.id;
|
state.id = options.id;
|
||||||
state.pid = options.id;
|
state.pid = options.pid;
|
||||||
bindShelfHole();
|
bindShelfHole();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
const bindShelfHole = async () => {
|
const bindShelfHole = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
|
||||||
const res = await freebox();
|
const res = await freebox();
|
||||||
if (res.status === 0) {
|
if (res.status === 0) {
|
||||||
state.containerName = res.data.containerName;
|
state.containerName = res.data.containerName;
|
||||||
|
state.boxName = res.data.boxName;
|
||||||
}
|
}
|
||||||
|
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user