fix
This commit is contained in:
parent
a2a27e334f
commit
7102055fe1
@ -112,16 +112,16 @@ const loading = ref(false);
|
|||||||
const isCode = ref(false);
|
const isCode = ref(false);
|
||||||
const haveCode = ref(false);
|
const haveCode = ref(false);
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
console.log('options',options)
|
if (options.id && options.pid) {
|
||||||
state.id = options.id;
|
console.log("options", options);
|
||||||
state.pid = options.pid;
|
state.id = options.id;
|
||||||
console.log("222", state.id);
|
state.pid = options.pid;
|
||||||
const token = uni.getStorageSync("token");
|
const token = uni.getStorageSync("token");
|
||||||
const userInfo = uni.getStorageSync("userInfo");
|
const userInfo = uni.getStorageSync("userInfo");
|
||||||
console.log('userInfo',token,userInfo)
|
// 已经登录了
|
||||||
// 已经登录了
|
if (token && userInfo) {
|
||||||
if (token && userInfo) {
|
paintingDetail();
|
||||||
paintingDetail();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -134,18 +134,17 @@ onLoad((options) => {
|
|||||||
});
|
});
|
||||||
const paintingDetail = async () => {
|
const paintingDetail = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
console.log('state',state)
|
console.log("state", state);
|
||||||
const res = await pbDetail({
|
const res = await pbDetail({
|
||||||
id: state.id,
|
id: state.id,
|
||||||
pid: state.pid,
|
pid: state.pid,
|
||||||
});
|
});
|
||||||
console.log(1111111111111,res)
|
|
||||||
if (res.status === 0) {
|
if (res.status === 0) {
|
||||||
state.boxRelBucketStatus=res.data.boxRelBucketStatus;
|
state.boxRelBucketStatus = res.data.boxRelBucketStatus;
|
||||||
console.log("boxRelBucketStatus",state.boxRelBucketStatus)
|
console.log("boxRelBucketStatus", state.boxRelBucketStatus);
|
||||||
if (res.data.pbStatus == 1) {
|
if (res.data.pbStatus == 1) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/index/index?id="+state.id+'&pid='+state.pid,
|
url: "/pages/index/index?id=" + state.id + "&pid=" + state.pid,
|
||||||
success: () => {
|
success: () => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
},
|
},
|
||||||
@ -157,7 +156,7 @@ const paintingDetail = async () => {
|
|||||||
} else {
|
} else {
|
||||||
if (res.data.boxRelBucketStatus == 3) {
|
if (res.data.boxRelBucketStatus == 3) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/painting/index?id="+state.id+'&pid='+state.pid,
|
url: "/pages/painting/index?id=" + state.id + "&pid=" + state.pid,
|
||||||
success: () => {
|
success: () => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
},
|
},
|
||||||
@ -166,9 +165,15 @@ const paintingDetail = async () => {
|
|||||||
showMessage({ type: "default", message: "跳转失败" });
|
showMessage({ type: "default", message: "跳转失败" });
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}else {
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/detail/index?id="+state.id+'&pid='+state.pid+'&boxRelBucketStatus='+state.boxRelBucketStatus,
|
url:
|
||||||
|
"/pages/detail/index?id=" +
|
||||||
|
state.id +
|
||||||
|
"&pid=" +
|
||||||
|
state.pid +
|
||||||
|
"&boxRelBucketStatus=" +
|
||||||
|
state.boxRelBucketStatus,
|
||||||
success: () => {
|
success: () => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
},
|
},
|
||||||
@ -177,7 +182,6 @@ const paintingDetail = async () => {
|
|||||||
showMessage({ type: "default", message: "跳转失败" });
|
showMessage({ type: "default", message: "跳转失败" });
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -218,7 +222,7 @@ const logining = async () => {
|
|||||||
if (res.status === 0) {
|
if (res.status === 0) {
|
||||||
uni.setStorageSync("token", res.data.Token);
|
uni.setStorageSync("token", res.data.Token);
|
||||||
uni.setStorageSync("userInfo", res.data.AccountInfo);
|
uni.setStorageSync("userInfo", res.data.AccountInfo);
|
||||||
await paintingDetail();
|
await paintingDetail();
|
||||||
|
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
|
@ -1,130 +1,120 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<navBar> 入库 </navBar>
|
<navBar> 入库 </navBar>
|
||||||
<view class="container-box">
|
<view class="container-box">
|
||||||
<span style="font-weight: bold">
|
<span style="font-weight: bold"> 已扫画筒号:{{ state.pid }} </span>
|
||||||
已扫画筒号:{{state.pid }}
|
<span style="margin-top: 40rpx"> 请放入: </span>
|
||||||
|
<view class="painting-box">
|
||||||
|
<span style="font-weight: bold; text-align: center"
|
||||||
|
>{{ state.containerName }}货架</span
|
||||||
|
>
|
||||||
|
<up-line style="margin-top: 20rpx"></up-line>
|
||||||
|
<span
|
||||||
|
style="
|
||||||
|
color: #cf3050;
|
||||||
|
font-size: 24px;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
A1
|
||||||
</span>
|
</span>
|
||||||
<span style="margin-top: 40rpx;">
|
<span style="text-align: center; margin-top: 20rpx"> A列1行 </span>
|
||||||
请放入:
|
|
||||||
</span>
|
|
||||||
<view class="painting-box" >
|
|
||||||
<span style="font-weight: bold;text-align: center;">{{ state.containerName }}货架</span>
|
|
||||||
<up-line style="margin-top: 20rpx;"></up-line>
|
|
||||||
<span style="color: #CF3050;font-size: 24px;text-align: center;margin-top: 20rpx;">
|
|
||||||
A1
|
|
||||||
</span>
|
|
||||||
<span style="text-align: center;margin-top: 20rpx;">
|
|
||||||
A列1行
|
|
||||||
</span>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="button-container">
|
</view>
|
||||||
<up-button
|
<view class="button-container">
|
||||||
style="width: 326rpx; margin: auto; height: 80rpx;"
|
<up-button
|
||||||
color="#BCBCBC"
|
style="width: 326rpx; margin: auto; height: 80rpx"
|
||||||
throttleTime="5"
|
color="#BCBCBC"
|
||||||
:loading="loading"
|
throttleTime="5"
|
||||||
>取消</up-button
|
:loading="loading"
|
||||||
>
|
>取消</up-button
|
||||||
<up-button
|
>
|
||||||
style="width: 326rpx; margin: auto; height: 80rpx;"
|
<up-button
|
||||||
color="#EFC54E"
|
style="width: 326rpx; margin: auto; height: 80rpx"
|
||||||
throttleTime="5"
|
color="#EFC54E"
|
||||||
:loading="loading"
|
throttleTime="5"
|
||||||
>确认</up-button
|
:loading="loading"
|
||||||
>
|
>确认</up-button
|
||||||
</view>
|
>
|
||||||
</template>
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
<script setup>
|
import { ref, reactive, onBeforeMount } from "vue";
|
||||||
import { ref,reactive,onBeforeMount } from "vue";
|
import useToast from "@/hooks/toast/useToast.js";
|
||||||
import useToast from "@/hooks/toast/useToast.js";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { freebox } from "@/api/login.js";
|
||||||
import { freebox } from "@/api/login.js";
|
const { showMessage } = useToast();
|
||||||
const { showMessage } = useToast();
|
const loading = ref(false);
|
||||||
const loading = ref(false);
|
const state = reactive({
|
||||||
const state = reactive({
|
|
||||||
id: "",
|
id: "",
|
||||||
pid: "",
|
pid: "",
|
||||||
containerName:"",
|
containerName: "",
|
||||||
});
|
});
|
||||||
onLoad((options) =>{
|
onLoad((options) => {
|
||||||
state.id = options.id;
|
state.id = options.id;
|
||||||
state.pid = options.pid;
|
state.pid = options.id;
|
||||||
const token = uni.getStorageSync("token");
|
bindShelfHole();
|
||||||
const userInfo = uni.getStorageSync("userInfo");
|
});
|
||||||
if(token && userInfo){
|
const bindShelfHole = async () => {
|
||||||
bindShelfHole();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
onBeforeMount(() => {
|
</script>
|
||||||
bindShelfHole();
|
|
||||||
// getPositionList();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
page {
|
page {
|
||||||
background: url("@/static/bgp.png") no-repeat;
|
background: url("@/static/bgp.png") no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.container-box {
|
||||||
|
height: 100%;
|
||||||
|
width: 98%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-top: 60rpx;
|
||||||
|
padding: 40rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.painting-box {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
margin-top: 20rpx;
|
||||||
justify-content: center;
|
padding: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
.container-box {
|
background-color: #fff;
|
||||||
height: 100%;
|
box-shadow: 0 0 6px rgba(219, 218, 218, 0.5);
|
||||||
width: 98%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
margin-top: 60rpx;
|
|
||||||
padding: 40rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.painting-box {
|
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
margin-top: 20rpx;
|
|
||||||
padding: 20rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: #fff;
|
|
||||||
box-shadow: 0 0 6px rgba(219, 218, 218, 0.5);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.button-container {
|
}
|
||||||
display: flex;
|
.button-container {
|
||||||
justify-content: space-between;
|
display: flex;
|
||||||
width: 100%;
|
justify-content: space-between;
|
||||||
position: fixed;
|
width: 100%;
|
||||||
bottom: 20rpx;
|
position: fixed;
|
||||||
left: 0;
|
bottom: 20rpx;
|
||||||
padding: 0 20rpx;
|
left: 0;
|
||||||
box-sizing: border-box;
|
padding: 0 20rpx;
|
||||||
background-color: #fff;
|
box-sizing: border-box;
|
||||||
height: 8%;
|
background-color: #fff;
|
||||||
}
|
height: 8%;
|
||||||
</style>
|
}
|
||||||
|
</style>
|
||||||
|
@ -27,13 +27,12 @@ const request = new Request({
|
|||||||
if (response.data.status === 1) {
|
if (response.data.status === 1) {
|
||||||
showMessage({ type: "error", message: response.data.msg });
|
showMessage({ type: "error", message: response.data.msg });
|
||||||
}
|
}
|
||||||
if(response.data.status === 0){
|
// if(response.data.status === 0){
|
||||||
uni.setStorageSync("token", response.data.data.Token);
|
// uni.setStorageSync("token", response.data.data.Token);
|
||||||
uni.setStorageSync("userInfo", response.data.data.AccountInfo);
|
// uni.setStorageSync("userInfo", response.data.data.AccountInfo);
|
||||||
response.config.headers["Authorization"] = response.data.data.Token;
|
// response.config.headers["Authorization"] = response.data.data.Token;
|
||||||
}
|
// }
|
||||||
if (response.data.code === 401) {
|
if (response.data.code === 401) {
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/login/index",
|
url: "/pages/login/index",
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user