This commit is contained in:
Aiden 2024-10-17 11:39:04 +08:00
parent 71807e8b76
commit 36d0ef2e31
3 changed files with 15 additions and 4 deletions

View File

@ -44,7 +44,7 @@
style="width: 336rpx; margin: auto; height: 80rpx"
color="#BABABA"
throttleTime="5"
v-if="state.boxRelBucketStatus == 1"
v-if="state.boxRelBucketStatus == 1 && runTimeEnv()"
@click="backScan"
>取消</up-button
>
@ -63,7 +63,10 @@
color="#EFC54E"
throttleTime="5"
@click="backScan"
v-if="state.boxRelBucketStatus == 2 || state.boxRelBucketStatus == 4"
v-if="
(state.boxRelBucketStatus == 2 || state.boxRelBucketStatus == 4) &&
runTimeEnv()
"
>返回继续扫码</up-button
>
</view>

View File

@ -77,6 +77,7 @@
color="#BABABA"
throttleTime="5"
@click="backScan"
v-if="runTimeEnv()"
>取消</up-button
>
<up-button
@ -97,6 +98,8 @@ import { ref, reactive, onBeforeMount } from "vue";
import useToast from "@/hooks/toast/useToast.js";
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
import { creChangepainting, add } from "@/api/login.js";
import { closeWebview, runTimeEnv } from "../../../utils/index";
const { showMessage } = useToast();
const loading = ref(false);
const isButtonDisabled = ref(false);

View File

@ -33,6 +33,7 @@
:disabled="closeButton"
@click="closeFn"
:loading="loading"
v-if="runTimeEnv()"
>取消</up-button
>
<up-button
@ -104,7 +105,9 @@ const doneSet = async () => {
showMessage({ type: "sucess", message: "入库成功" });
isButtonDisabled.value = true;
buttonText.value = "已入库";
closeWebview();
if (runTimeEnv()) {
closeWebview();
}
} else {
showMessage({ type: "error", message: res.msg });
}
@ -120,7 +123,9 @@ const closeFn = async () => {
showMessage({ type: "error", message: "取消入库" });
closeButton.value = true;
isButtonDisabled.value = true;
closeWebview();
if (runTimeEnv()) {
closeWebview();
}
} else {
showMessage({ type: "error", message: res.msg });
}