freebox 加两字段

This commit is contained in:
贾旖璇 2024-12-03 10:51:41 +08:00
parent 5c31c88caf
commit 5ec7af93dd
2 changed files with 12 additions and 4 deletions

View File

@ -110,12 +110,14 @@ const state = reactive({
id: "", id: "",
pid: "", pid: "",
code: "", code: "",
drawUid:"",
}); });
const { showMessage } = useToast(); const { showMessage } = useToast();
const loading = ref(false); 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("1111",options)
if (options.id && options.pid) { if (options.id && options.pid) {
state.id = options.id; state.id = options.id;
state.pid = options.pid; state.pid = options.pid;
@ -151,10 +153,11 @@ const paintingDetail = async () => {
}); });
if (res.status === 0) { if (res.status === 0) {
state.boxRelBucketStatus = res.data.boxRelBucketStatus; state.boxRelBucketStatus = res.data.boxRelBucketStatus;
console.log("boxRelBucketStatus", state.boxRelBucketStatus); state.drawUid = res.data.drawUid;
console.log("drawUid", state.drawUid);
if (res.data.pbStatus == 1) { if (res.data.pbStatus == 1) {
uni.redirectTo({ uni.redirectTo({
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;
}, },
@ -169,7 +172,7 @@ const paintingDetail = async () => {
res.data.locateAddress == "公司内" res.data.locateAddress == "公司内"
) { ) {
uni.redirectTo({ uni.redirectTo({
url: "/pages/painting/index?id=" + state.id + "&pid=" + state.pid, url: "/pages/painting/index?id=" + state.id + "&pid=" + state.pid+ "&drawUid=" + state.drawUid,
success: () => { success: () => {
loading.value = false; loading.value = false;
}, },

View File

@ -67,6 +67,7 @@ const state = reactive({
boxName: "", boxName: "",
boxUid: "", boxUid: "",
containerUid: "", containerUid: "",
drawUid:"",
}); });
onLoad((options) => { onLoad((options) => {
if (window.plus) { if (window.plus) {
@ -82,13 +83,17 @@ onLoad((options) => {
} }
state.id = options.id; state.id = options.id;
state.pid = options.pid; state.pid = options.pid;
state.drawUid = options.drawUid;
bindShelfHole(); bindShelfHole();
getBtngetRules(); getBtngetRules();
}); });
const bindShelfHole = async () => { const bindShelfHole = async () => {
loading.value = true; loading.value = true;
const res = await freebox(); const res = await freebox({
ptId:Number(state.id),
drawUid:state.drawUid,
});
if (res.status === 0) { if (res.status === 0) {
state.containerName = res.data.containerName; state.containerName = res.data.containerName;
state.boxName = res.data.boxName; state.boxName = res.data.boxName;