仓库管理h5
This commit is contained in:
parent
66f214e66e
commit
9d6b183146
@ -47,4 +47,11 @@ export const creChangepainting = (data) => {
|
|||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
//画桶绑定到空闲货架孔
|
||||||
|
export const bind = (data) => {
|
||||||
|
return request({
|
||||||
|
url: "/containeradm/v1/box_rel_bucket/bind",
|
||||||
|
method: "POST",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
@ -24,30 +24,22 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="button-container">
|
<view class="button-container">
|
||||||
<up-button
|
<up-button
|
||||||
style="width: 326rpx; margin: auto; height: 80rpx;"
|
style="width: 456rpx; margin: auto; height: 86rpx;"
|
||||||
color="#BCBCBC"
|
|
||||||
throttleTime="5"
|
|
||||||
|
|
||||||
v-if="state.boxRelBucketStatus == 1"
|
|
||||||
>取消</up-button
|
|
||||||
>
|
|
||||||
<up-button
|
|
||||||
style="width: 326rpx; margin: auto; height: 80rpx;"
|
|
||||||
color="#EFC54E"
|
color="#EFC54E"
|
||||||
throttleTime="5"
|
throttleTime="5"
|
||||||
@click="doneSet"
|
@click="doneSet"
|
||||||
v-if="state.boxRelBucketStatus == 1"
|
v-if="state.boxRelBucketStatus == 1"
|
||||||
>确认</up-button
|
:disabled="isButtonDisabled"
|
||||||
|
> {{ buttonText }}</up-button
|
||||||
>
|
>
|
||||||
<up-button
|
<!-- <up-button
|
||||||
style="width: 426rpx; margin: auto; height: 86rpx;"
|
style="width: 426rpx; margin: auto; height: 86rpx;"
|
||||||
color="#EFC54E"
|
color="#EFC54E"
|
||||||
throttleTime="5"
|
throttleTime="5"
|
||||||
|
|
||||||
@click="login"
|
@click="login"
|
||||||
v-if="state.boxRelBucketStatus == 2||state.boxRelBucketStatus ==3"
|
v-if="state.boxRelBucketStatus == 2||state.boxRelBucketStatus ==3"
|
||||||
>返回继续扫码</up-button
|
>返回继续扫码</up-button
|
||||||
>
|
> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -60,6 +52,8 @@
|
|||||||
const { showMessage } = useToast();
|
const { showMessage } = useToast();
|
||||||
const isDetail = ref(false);
|
const isDetail = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
const isButtonDisabled = ref(false);
|
||||||
|
const buttonText = ref("确认");
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
id: "",
|
id: "",
|
||||||
pid: "",
|
pid: "",
|
||||||
@ -101,6 +95,8 @@ const doneSet = async () => {
|
|||||||
});
|
});
|
||||||
if (res.status === 0) {
|
if (res.status === 0) {
|
||||||
showMessage({ type: "sucess", message: "出库成功" });
|
showMessage({ type: "sucess", message: "出库成功" });
|
||||||
|
isButtonDisabled.value = true;
|
||||||
|
buttonText.value = "已出库";
|
||||||
}else{
|
}else{
|
||||||
showMessage({ type: "error", message: res.msg });
|
showMessage({ type: "error", message: res.msg });
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
margin-top: 15rpx;
|
margin-top: 15rpx;
|
||||||
margin-left: 15rpx;" color="#EFC54E" throttleTime="5" :loading="loading" @click="login">搜索</up-button>
|
margin-left: 15rpx;" color="#EFC54E" throttleTime="5" :loading="loading" @click="login">搜索</up-button>
|
||||||
</view>
|
</view>
|
||||||
|
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y"
|
||||||
|
@scrolltolower="lower" @scroll="scroll">
|
||||||
<view class="painting-box" v-for="(painting,index) in state.tableData" :key="index">
|
<view class="painting-box" v-for="(painting,index) in state.tableData" :key="index">
|
||||||
<span style="display: flex; align-items: center;position: relative;" >
|
<span style="display: flex; align-items: center;position: relative;" >
|
||||||
<up-image :show-loading="true" :src="painting.HdPic" width="100px" height="100px" @click="click"></up-image>
|
<up-image :show-loading="true" :src="painting.HdPic" width="100px" height="100px" @click="click"></up-image>
|
||||||
@ -37,23 +39,17 @@
|
|||||||
</up-radio-group>
|
</up-radio-group>
|
||||||
</span>
|
</span>
|
||||||
</view>
|
</view>
|
||||||
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="button-container">
|
<view class="button-container">
|
||||||
<up-button
|
<up-button
|
||||||
style="width: 326rpx; margin: auto; height: 80rpx;"
|
style="width: 456rpx; margin: auto; height: 86rpx;"
|
||||||
color="#BCBCBC"
|
color="#EFC54E"
|
||||||
throttleTime="5"
|
throttleTime="5"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
>取消</up-button
|
:disabled="isButtonDisabled"
|
||||||
>
|
> {{ buttonText }}</up-button
|
||||||
<up-button
|
|
||||||
style="width: 326rpx; margin: auto; height: 80rpx;"
|
|
||||||
color="#EFC54E"
|
|
||||||
throttleTime="5"
|
|
||||||
:loading="loading"
|
|
||||||
>确认</up-button
|
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -62,15 +58,19 @@
|
|||||||
<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,onReachBottom } from "@dcloudio/uni-app";
|
||||||
import { creChangepainting } from "@/api/login.js";
|
import { creChangepainting } from "@/api/login.js";
|
||||||
const { showMessage } = useToast();
|
const { showMessage } = useToast();
|
||||||
const value = ref(null)
|
const value = ref(null)
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
const isButtonDisabled = ref(false);
|
||||||
|
const buttonText = ref("确认");
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
id: "",
|
id: "",
|
||||||
pid: "",
|
pid: "",
|
||||||
tableData:[],
|
tableData:[],
|
||||||
|
page:1,
|
||||||
|
pageSize:10,
|
||||||
});
|
});
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
state.id = options.id;
|
state.id = options.id;
|
||||||
@ -88,17 +88,24 @@ const paintingList = async (param) => {
|
|||||||
ArtworkName: "",
|
ArtworkName: "",
|
||||||
Tnum: "",
|
Tnum: "",
|
||||||
ArtistName: "",
|
ArtistName: "",
|
||||||
|
page:state.page,
|
||||||
|
pageSize:state.pageSize,
|
||||||
...param,
|
...param,
|
||||||
});
|
});
|
||||||
if (res.status === 0) {
|
if (res.status === 0) {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
state.tableData = res.data.Data
|
state.tableData = res.data.Data
|
||||||
console.log("1111",state.tableData)
|
|
||||||
} else {
|
} else {
|
||||||
showMessage({ type: "error", message: res.msg });
|
showMessage({ type: "error", message: res.msg });
|
||||||
}
|
}
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
|
const lower=() =>{
|
||||||
|
console.log(888888)
|
||||||
|
}
|
||||||
|
const scroll =(e) =>{
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
<span style="color: #888888">已发送验证码至 </span>
|
<span style="color: #888888">已发送验证码至 </span>
|
||||||
<span style="font-weight: bold">{{ state.TelNum }}</span>
|
<span style="font-weight: bold">{{ state.TelNum }}</span>
|
||||||
</view>
|
</view>
|
||||||
<up-code-input v-model="code" :maxlength="6"></up-code-input>
|
<up-code-input v-model="state.code" :maxlength="6"></up-code-input>
|
||||||
<view
|
<view
|
||||||
style="
|
style="
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -103,9 +103,10 @@ import { onLoad } from "@dcloudio/uni-app";
|
|||||||
import { userLogin, userSend, pbDetail } from "@/api/login.js";
|
import { userLogin, userSend, pbDetail } from "@/api/login.js";
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
TelNum: "15190039212",
|
TelNum: "15190039212",
|
||||||
Password: "Jia011225",
|
Password: "",
|
||||||
id: "",
|
id: "",
|
||||||
pid: "",
|
pid: "",
|
||||||
|
code:"",
|
||||||
});
|
});
|
||||||
const { showMessage } = useToast();
|
const { showMessage } = useToast();
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
@ -154,7 +155,7 @@ const paintingDetail = async () => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (res.data.boxRelBucketStatus == 3 && res.data.LocateAddress == '公司内') {
|
if (res.data.boxRelBucketStatus == 3 && res.data.locateAddress == "公司内") {
|
||||||
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: () => {
|
||||||
@ -193,6 +194,7 @@ const paintingDetail = async () => {
|
|||||||
const toCode = () => {
|
const toCode = () => {
|
||||||
isCode.value = true;
|
isCode.value = true;
|
||||||
};
|
};
|
||||||
|
//获取验证码
|
||||||
const obtainCode = async () => {
|
const obtainCode = async () => {
|
||||||
console.log("获取验证码");
|
console.log("获取验证码");
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
@ -202,8 +204,12 @@ const obtainCode = async () => {
|
|||||||
if (res.status === 0) {
|
if (res.status === 0) {
|
||||||
haveCode.value = true;
|
haveCode.value = true;
|
||||||
showMessage({ type: "default", message: "验证码已发送" });
|
showMessage({ type: "default", message: "验证码已发送" });
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
showMessage({ type: "error", message: res.msg });
|
if(res.msg == '已经发送过,验证码尚可用'){
|
||||||
|
haveCode.value = true;
|
||||||
|
}else{showMessage({ type: "error", message: res.msg });}
|
||||||
|
|
||||||
}
|
}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
@ -218,6 +224,7 @@ const logining = async () => {
|
|||||||
const res = await userLogin({
|
const res = await userLogin({
|
||||||
TelNum: state.TelNum ?? "",
|
TelNum: state.TelNum ?? "",
|
||||||
Password: state.Password ?? "",
|
Password: state.Password ?? "",
|
||||||
|
code:state.code ?? "",
|
||||||
});
|
});
|
||||||
if (res.status === 0) {
|
if (res.status === 0) {
|
||||||
uni.setStorageSync("token", res.data.Token);
|
uni.setStorageSync("token", res.data.Token);
|
||||||
|
@ -19,24 +19,19 @@
|
|||||||
>
|
>
|
||||||
{{state.boxName}}
|
{{state.boxName}}
|
||||||
</span>
|
</span>
|
||||||
<span style="text-align: center; margin-top: 20rpx"> A列1行 </span>
|
<span style="text-align: center; margin-top: 20rpx"> {{state.column}}列{{state.row}}行 </span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="button-container">
|
<view class="button-container">
|
||||||
<up-button
|
<up-button
|
||||||
style="width: 326rpx; margin: auto; height: 80rpx"
|
style="width: 456rpx; margin: auto; height: 80rpx"
|
||||||
color="#BCBCBC"
|
|
||||||
throttleTime="5"
|
|
||||||
:loading="loading"
|
|
||||||
>取消</up-button
|
|
||||||
>
|
|
||||||
<up-button
|
|
||||||
style="width: 326rpx; margin: auto; height: 80rpx"
|
|
||||||
color="#EFC54E"
|
color="#EFC54E"
|
||||||
throttleTime="5"
|
throttleTime="5"
|
||||||
|
@click="doneSet"
|
||||||
|
:disabled="isButtonDisabled"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
>确认</up-button
|
>{{ buttonText }}</up-button
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -45,14 +40,18 @@
|
|||||||
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,bind} from "@/api/login.js";
|
||||||
const { showMessage } = useToast();
|
const { showMessage } = useToast();
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
const isButtonDisabled = ref(false);
|
||||||
|
const buttonText = ref("确认");
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
id: "",
|
id: "",
|
||||||
pid: "",
|
pid: "",
|
||||||
containerName: "",
|
containerName: "",
|
||||||
boxName:"",
|
boxName:"",
|
||||||
|
boxUid:"",
|
||||||
|
containerUid:'',
|
||||||
});
|
});
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
|
|
||||||
@ -61,18 +60,43 @@ onLoad((options) => {
|
|||||||
bindShelfHole();
|
bindShelfHole();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
const bindShelfHole = async () => {
|
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;
|
||||||
state.boxName = res.data.boxName;
|
state.boxName = res.data.boxName;
|
||||||
|
state.containerUid=res.data.containerUid;
|
||||||
|
state.boxUid=res.data.boxUid;
|
||||||
|
if (state.boxName) {
|
||||||
|
const parts = state.boxName.split(/(\d+)/);
|
||||||
|
state.column = parts[0]; // 字母部分
|
||||||
|
state.row = parts[1]; // 数字部分
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
|
//入库
|
||||||
|
const doneSet = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
const res = await bind({
|
||||||
|
paintingBucketId: state.id,
|
||||||
|
paintingBucketUid: state.pid,
|
||||||
|
boxUid:state.boxUid,
|
||||||
|
containerUid:state.containerUid,
|
||||||
|
containerName:state.containerName,
|
||||||
|
boxName:state.boxName,
|
||||||
|
});
|
||||||
|
if (res.status === 0) {
|
||||||
|
showMessage({ type: "sucess", message: "入库成功" });
|
||||||
|
isButtonDisabled.value = true;
|
||||||
|
buttonText.value = "已入库";
|
||||||
|
}else{
|
||||||
|
showMessage({ type: "error", message: res.msg });
|
||||||
|
}
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
Loading…
Reference in New Issue
Block a user