fix
This commit is contained in:
parent
2159256e53
commit
a2ec8f55c3
@ -5,6 +5,8 @@ export default {
|
||||
},
|
||||
onShow: function () {
|
||||
console.log("App Show");
|
||||
console.log(window.location.href);
|
||||
|
||||
},
|
||||
onHide: function () {
|
||||
console.log("App Hide");
|
||||
|
@ -39,8 +39,7 @@ const currentWebView = plus.webview.getWebviewById("wv");
|
||||
const root = document.documentElement;
|
||||
root.style.setProperty(
|
||||
"--statusBarHeight",
|
||||
`${
|
||||
currentWebView.RunTime === "app"
|
||||
`${currentWebView.RunTime === "app"
|
||||
? plus.navigator.getStatusbarHeight()
|
||||
: 0 ?? 0
|
||||
}px`
|
||||
@ -51,9 +50,11 @@ root.style.setProperty(
|
||||
.status_bar {
|
||||
height: var(--status-bar-height);
|
||||
}
|
||||
|
||||
:deep(.u-status-bar) {
|
||||
margin-top: var(--statusBarHeight);
|
||||
}
|
||||
|
||||
@mixin flex($direction: row) {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
|
@ -1,84 +1,69 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<navBar v-if="state.boxRelBucketStatus == 1"> 出库 </navBar>
|
||||
<navBar v-if="state.boxRelBucketStatus == 2||state.boxRelBucketStatus ==4"> 画筒详情 </navBar>
|
||||
<view class="container-box" >
|
||||
<navBar v-if="state.boxRelBucketStatus == 2 || state.boxRelBucketStatus == 4"> 画筒详情 </navBar>
|
||||
<view class="container-box">
|
||||
<span style="font-weight: bold;text-align: center;" v-if="state.boxRelBucketStatus == 1">
|
||||
确定要出库{{state.locateAddress}}的
|
||||
确定要出库{{ state.locateAddress }}的
|
||||
</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.boxRelBucketStatus ==4">画筒号:{{state.pid}}</span>
|
||||
<span style="font-weight: bold;text-align: center;margin-top: 20rpx;" v-if="state.boxRelBucketStatus == 2||state.boxRelBucketStatus ==4">所在位置:{{ state.locateAddress }}</span>
|
||||
<view class="painting-box" >
|
||||
<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.boxRelBucketStatus == 4">画筒号:{{ state.pid }}</span>
|
||||
<span style="font-weight: bold;text-align: center;margin-top: 20rpx;"
|
||||
v-if="state.boxRelBucketStatus == 2 || state.boxRelBucketStatus == 4">所在位置:{{ state.locateAddress }}</span>
|
||||
<view class="painting-box">
|
||||
<span>画作名称:{{ state.drawName }}</span>
|
||||
<span style="margin-top: 20rpx;">画家:{{ state.drawerName }}</span>
|
||||
<span style="margin-top: 20rpx;">预览图:</span>
|
||||
<view class="image-container">
|
||||
<up-image
|
||||
:src=state.drawThumbnail
|
||||
></up-image>
|
||||
<up-image :src=state.drawThumbnail></up-image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="button-container">
|
||||
<up-button
|
||||
style="width: 336rpx; margin: auto; height: 80rpx"
|
||||
color="#BABABA"
|
||||
throttleTime="5"
|
||||
v-if="state.boxRelBucketStatus == 1"
|
||||
>取消</up-button
|
||||
>
|
||||
<up-button
|
||||
style="width: 336rpx; margin: auto; height: 80rpx;"
|
||||
color="#EFC54E"
|
||||
throttleTime="5"
|
||||
@click="doneSet"
|
||||
v-if="state.boxRelBucketStatus == 1"
|
||||
:disabled="isButtonDisabled"
|
||||
> {{ buttonText }}</up-button
|
||||
>
|
||||
<up-button
|
||||
style="width: 426rpx; margin: auto; height: 86rpx;"
|
||||
color="#EFC54E"
|
||||
throttleTime="5"
|
||||
@click="login"
|
||||
v-if="state.boxRelBucketStatus == 2||state.boxRelBucketStatus ==4"
|
||||
>返回继续扫码</up-button
|
||||
>
|
||||
<up-button style="width: 336rpx; margin: auto; height: 80rpx" color="#BABABA" throttleTime="5"
|
||||
v-if="state.boxRelBucketStatus == 1">取消</up-button>
|
||||
<up-button style="width: 336rpx; margin: auto; height: 80rpx;" color="#EFC54E" throttleTime="5" @click="doneSet"
|
||||
v-if="state.boxRelBucketStatus == 1" :disabled="isButtonDisabled"> {{ buttonText }}</up-button>
|
||||
<up-button style="width: 426rpx; margin: auto; height: 86rpx;" color="#EFC54E" throttleTime="5" @click="login"
|
||||
v-if="state.boxRelBucketStatus == 2 || state.boxRelBucketStatus == 4">返回继续扫码</up-button>
|
||||
</view>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
|
||||
<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 isButtonDisabled = ref(false);
|
||||
const buttonText = ref("确认");
|
||||
const state = reactive({
|
||||
<script setup>
|
||||
import { ref, reactive, onBeforeMount } from "vue";
|
||||
// import { closeWebview, runTimeEnv } from "@/utils/index.js"
|
||||
|
||||
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 isButtonDisabled = ref(false);
|
||||
const buttonText = ref("确认");
|
||||
const state = reactive({
|
||||
id: "",
|
||||
pid: "",
|
||||
containerName:"",
|
||||
boxRelBucketStatus:"",
|
||||
drawName:"",
|
||||
drawerName:"",
|
||||
drawThumbnail:"",
|
||||
locateAddress:"",
|
||||
boxUid:"",
|
||||
containerName: "",
|
||||
boxRelBucketStatus: "",
|
||||
drawName: "",
|
||||
drawerName: "",
|
||||
drawThumbnail: "",
|
||||
locateAddress: "",
|
||||
boxUid: "",
|
||||
});
|
||||
onLoad((options) =>{
|
||||
onLoad((options) => {
|
||||
state.id = options.id;
|
||||
state.pid = options.pid;
|
||||
state.boxRelBucketStatus = options.boxRelBucketStatus;
|
||||
paintingDetail()
|
||||
});
|
||||
const paintingDetail = async () => {
|
||||
});
|
||||
const paintingDetail = async () => {
|
||||
loading.value = true;
|
||||
const res = await pbDetail({
|
||||
id: state.id,
|
||||
@ -98,29 +83,29 @@ const doneSet = async () => {
|
||||
const res = await outbound({
|
||||
id: state.id,
|
||||
pid: state.pid,
|
||||
boxUid:state.boxUid,
|
||||
boxUid: state.boxUid,
|
||||
});
|
||||
if (res.status === 0) {
|
||||
showMessage({ type: "sucess", message: "出库成功" });
|
||||
isButtonDisabled.value = true;
|
||||
buttonText.value = "已出库";
|
||||
}else{
|
||||
} else {
|
||||
showMessage({ type: "error", message: res.msg });
|
||||
}
|
||||
loading.value = false;
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background: url("@/static/bgp.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
background-attachment: fixed;
|
||||
height: 100vh;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
@ -149,15 +134,17 @@ const doneSet = async () => {
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 6px rgba(219, 218, 218, 0.5);
|
||||
}
|
||||
|
||||
.image-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 20rpx;
|
||||
height:auto;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
.button-container {
|
||||
}
|
||||
|
||||
.button-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
@ -168,6 +155,5 @@ const doneSet = async () => {
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
height: 8%;
|
||||
}
|
||||
</style>
|
||||
|
||||
}
|
||||
</style>
|
@ -5,25 +5,45 @@
|
||||
<span style="font-weight: bold"> 已扫画筒号:{{ state.pid }} </span>
|
||||
<span style="margin-top: 40rpx"> 请放入: </span>
|
||||
<view class="painting-box">
|
||||
<span style="font-weight: bold; text-align: center">{{ state.containerName }}货架</span>
|
||||
<span style="font-weight: bold; text-align: center"
|
||||
>{{ state.containerName }}货架</span
|
||||
>
|
||||
<up-line style="margin-top: 20rpx"></up-line>
|
||||
<span style="
|
||||
<span
|
||||
style="
|
||||
color: #cf3050;
|
||||
font-size: 24px;
|
||||
text-align: center;
|
||||
margin-top: 20rpx;
|
||||
">
|
||||
"
|
||||
>
|
||||
{{ state.boxName }}
|
||||
</span>
|
||||
<span style="text-align: center; margin-top: 20rpx"> {{ state.column }}列{{ state.row }}行 </span>
|
||||
<span style="text-align: center; margin-top: 20rpx">
|
||||
{{ state.column }}列{{ state.row }}行
|
||||
</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="button-container">
|
||||
<up-button style="width: 336rpx; margin: auto; height: 80rpx" color="#BABABA" throttleTime="5"
|
||||
:disabled="closeButton" @click="closeFn" :loading="loading">取消</up-button>
|
||||
<up-button style="width: 336rpx; margin: auto; height: 80rpx" color="#EFC54E" throttleTime="5" @click="doneSet"
|
||||
:disabled="isButtonDisabled" :loading="loading">{{ buttonText }}</up-button>
|
||||
<up-button
|
||||
style="width: 336rpx; margin: auto; height: 80rpx"
|
||||
color="#BABABA"
|
||||
throttleTime="5"
|
||||
:disabled="closeButton"
|
||||
@click="closeFn"
|
||||
:loading="loading"
|
||||
>取消</up-button
|
||||
>
|
||||
<up-button
|
||||
style="width: 336rpx; margin: auto; height: 80rpx"
|
||||
color="#EFC54E"
|
||||
throttleTime="5"
|
||||
@click="doneSet"
|
||||
:disabled="isButtonDisabled"
|
||||
:loading="loading"
|
||||
>{{ buttonText }}</up-button
|
||||
>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -32,7 +52,7 @@ import { ref, reactive, onBeforeMount } from "vue";
|
||||
import useToast from "@/hooks/toast/useToast.js";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { freebox, bind, check_freebox, cancel } from "@/api/login.js";
|
||||
import { closeWebview, runTimeEnv } from "@/utils/index.js"
|
||||
import { closeWebview, runTimeEnv } from "@/utils/index.js";
|
||||
const { showMessage } = useToast();
|
||||
const loading = ref(false);
|
||||
const isButtonDisabled = ref(false);
|
||||
@ -44,10 +64,9 @@ const state = reactive({
|
||||
containerName: "",
|
||||
boxName: "",
|
||||
boxUid: "",
|
||||
containerUid: '',
|
||||
containerUid: "",
|
||||
});
|
||||
onLoad((options) => {
|
||||
|
||||
state.id = options.id;
|
||||
state.pid = options.pid;
|
||||
bindShelfHole();
|
||||
@ -61,13 +80,12 @@ const bindShelfHole = async () => {
|
||||
state.boxName = res.data.boxName;
|
||||
state.containerUid = res.data.containerUid;
|
||||
state.boxUid = res.data.boxUid;
|
||||
check()
|
||||
check();
|
||||
if (state.boxName) {
|
||||
const parts = state.boxName.split(/(\d+)/);
|
||||
state.column = parts[0]; // 字母部分
|
||||
state.row = parts[1]; // 数字部分
|
||||
}
|
||||
|
||||
}
|
||||
loading.value = false;
|
||||
};
|
||||
@ -86,6 +104,7 @@ const doneSet = async () => {
|
||||
showMessage({ type: "sucess", message: "入库成功" });
|
||||
isButtonDisabled.value = true;
|
||||
buttonText.value = "已入库";
|
||||
closeWebview();
|
||||
} else {
|
||||
showMessage({ type: "error", message: res.msg });
|
||||
}
|
||||
@ -95,7 +114,7 @@ const doneSet = async () => {
|
||||
const closeFn = async () => {
|
||||
loading.value = true;
|
||||
const res = await cancel({
|
||||
boxUid: state.boxUid
|
||||
boxUid: state.boxUid,
|
||||
});
|
||||
if (res.status === 0) {
|
||||
showMessage({ type: "error", message: "取消入库" });
|
||||
@ -105,18 +124,17 @@ const closeFn = async () => {
|
||||
showMessage({ type: "error", message: res.msg });
|
||||
}
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
//查孔洞是否能用
|
||||
const check = async () => {
|
||||
const res = await check_freebox({
|
||||
boxUid: state.boxUid
|
||||
boxUid: state.boxUid,
|
||||
});
|
||||
if (res.status === 0) {
|
||||
} else {
|
||||
showMessage({ type: "error", message: res.msg });
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -32,14 +32,14 @@ const request = new Request({
|
||||
// response.config.headers["Authorization"] = response.data.data.Token;
|
||||
// }
|
||||
if (response.data.code === 401) {
|
||||
uni.clearStorageSync()//清缓存
|
||||
const params = new URLSearchParams(window.location.search)//属性包含当前 URL 的查询字符串部分
|
||||
const id = params.get('id')
|
||||
const pid = params.get('pid')
|
||||
uni.clearStorageSync(); //清缓存
|
||||
const params = new URLSearchParams(window.location.search); //属性包含当前 URL 的查询字符串部分
|
||||
const id = params.get("id");
|
||||
const pid = params.get("pid");
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/index?id="+id+'&pid='+pid,
|
||||
url: "/pages/login/index?id=" + id + "&pid=" + pid,
|
||||
});
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
if ([200, 201, 204].includes(response.status)) {
|
||||
return response.config.responseType === "blob" ? response : response;
|
||||
|
Loading…
Reference in New Issue
Block a user