From fbd8124bcbdb3c36a0a3a31e452d720f6ac61e54 Mon Sep 17 00:00:00 2001
From: jyx <2012969435@qq.com>
Date: Sat, 14 Sep 2024 15:57:06 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86h5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/login.js | 9 +++++-
src/pages/detail/index.vue | 59 +++++++++++++++++++++++++++---------
src/pages/painting/index.vue | 11 +++++--
3 files changed, 62 insertions(+), 17 deletions(-)
diff --git a/src/api/login.js b/src/api/login.js
index 7823c3f..4faa8a5 100644
--- a/src/api/login.js
+++ b/src/api/login.js
@@ -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,
+ });
+};
\ No newline at end of file
diff --git a/src/pages/detail/index.vue b/src/pages/detail/index.vue
index babc05d..1909b0f 100644
--- a/src/pages/detail/index.vue
+++ b/src/pages/detail/index.vue
@@ -4,22 +4,18 @@
画作详情
- 保存要出库A000-B3的
+ 保存要出库{{state.locateAddress}}的
- PT00000004画筒吗?
- 画筒号:
+ {{state.pid}}画筒吗?
+ 画筒号:{{state.pid}}
所在位置:
- 画作名称:
- 画家:
+ 画作名称:{{ state.drawName }}
+ 画家:{{ state.drawerName }}
预览图:
@@ -31,7 +27,7 @@
style="width: 326rpx; margin: auto; height: 80rpx;"
color="#BCBCBC"
throttleTime="5"
- :loading="loading"
+
v-if="state.boxRelBucketStatus == 1"
>取消
@@ -39,7 +35,7 @@
style="width: 326rpx; margin: auto; height: 80rpx;"
color="#EFC54E"
throttleTime="5"
- :loading="loading"
+ @click="doneSet"
v-if="state.boxRelBucketStatus == 1"
>确认
@@ -47,7 +43,7 @@
style="width: 426rpx; margin: auto; height: 86rpx;"
color="#EFC54E"
throttleTime="5"
- :loading="loading"
+
@click="login"
v-if="state.boxRelBucketStatus == 2"
>返回继续扫码
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;
+};