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