<template>
|
<view>
|
<cu-custom bgColor="bg-white" :isBack="true">
|
<block slot="backText">
|
</block>
|
<block slot="content">盘点</block>
|
</cu-custom>
|
<view class="flex justify-end align-center padding_right30rpx padding_top12rpx">
|
<text class="fontSize12rpx"> 操作人:{{operator}} </text>
|
</view>
|
<view class="serarch">
|
<view style="margin-right: 8px;font-size: 18px;">盘点单号:</view>
|
<u-input v-model="orderNo" type="select" placeholder="请选择" height="100" @click="orderVisible = true"></u-input>
|
</view>
|
<u-select v-model="orderVisible" value-name="id" label-name="orderNo" :list="orderList" @confirm="handlerConfirm"></u-select>
|
<view>
|
<view class="padding15 background_fff margin_bottom10rpx content-item" v-for="(item,index) in singlist" :key="index" @click="skip(item)">
|
<u-row>
|
<u-col :span='3' class='font_weight_bold fontSize36rpx'>盘点单号:</u-col>
|
<u-col :span='8' class='font_weight_bold color_f18202 fontSize36rpx'>{{item.orderNo}}</u-col>
|
</u-row>
|
<u-row style="margin-top: 10rpx;">
|
<u-col :span='3' class='font_weight_bold fontSize36rpx'>库位编号:</u-col>
|
<u-col :span='8' class='font_weight_bold color_f18202 fontSize36rpx'>{{item.wareContainerCode}}</u-col>
|
</u-row>
|
|
</view>
|
</view>
|
<u-loadmore :status="status" :load-text="loadText" />
|
</view>
|
</template>
|
|
<script>
|
import ButtonModal from '../../components/buttonModal.vue'
|
import ModalCode from '../../components/ModalCode.vue'
|
import {getContainerData,getCheckOrderList} from '@/api/check/check.js'
|
export default {
|
data() {
|
return {
|
orderNo: '',
|
orderList: [],
|
orderVisible: false,
|
modalshow: false,
|
show: false,
|
rescode: 0,
|
resmessage: "",
|
operator: '',
|
singlist: [], //物料详情
|
pageNo: 1,
|
checkTotal: 0,
|
status: "loadmore",
|
loadText: {
|
loadmore: '上拉加载更多',
|
loading: '努力加载中',
|
nomore: '已经到底了'
|
},
|
formQuery: {
|
OrderStatus:1,//计划状态 0-未盘点,1-盘点中,2-已盘点 [Editby shaocx,2023-12-23]
|
OrderId: '',
|
PageNo: 1,
|
PageSize: 10
|
}
|
};
|
},
|
components: {
|
ButtonModal,
|
ModalCode
|
},
|
//下拉刷新
|
onPullDownRefresh() {
|
this.singlist = [];
|
this.formQuery.PageNo = 1
|
this.formQuery.OrderId = ''
|
this.orderNo = ''
|
this.Status(()=> {
|
uni.stopPullDownRefresh(); //停止当前页面下拉刷新
|
})
|
},
|
// 触底事件
|
onReachBottom() {
|
if(this.checkTotal == this.singlist.length){
|
return;
|
}
|
this.formQuery.PageNo++
|
this.Status()
|
},
|
onLoad() {
|
this.operator = JSON.parse(uni.getStorageSync('userInfo')).name;
|
this.Status()
|
this.getOrderList()
|
},
|
methods: {
|
getOrderList() {
|
getCheckOrderList({Status: 1,PageNo: 1,PageSize: 1000}).then(res => {
|
this.orderList = res.data.rows
|
console.log(this.orderList,'orderList')
|
})
|
},
|
//盘点单号
|
Status(callback) {
|
////debugger
|
this.formQuery.OrderStatus=1;//计划状态 0-未盘点,1-盘点中,2-已盘点 [Editby shaocx,2023-12-23]
|
getContainerData(this.formQuery).then((res) => {
|
if (res.data.rows.length == 0 && !callback) {
|
this.status = 'nomore'
|
return;
|
}
|
this.checkTotal = res.data.totalRows;
|
this.singlist.push(...res.data.rows);
|
|
if(this.checkTotal == this.singlist.length) {
|
this.status = "nomore";
|
}
|
callback && callback();
|
|
})
|
|
},
|
//跳转
|
skip(item) {
|
uni.navigateTo({
|
url: `./index?wareContainerCode=${item.wareContainerCode}&orderId=${item.orderId}`
|
})
|
console.log(2222)
|
},
|
handlerConfirm(e) {
|
this.orderNo = e[0].label
|
this.formQuery.OrderId = e[0].value
|
this.singlist = []
|
this.formQuery.PageNo = 1
|
this.Status()
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
// 盘点中
|
.inventory {
|
border: 1px solid #08cd39;
|
border-radius: 40vh;
|
color: #08cd39;
|
background-color: #e6ffec;
|
}
|
.serarch {
|
width: 98%;
|
margin: 10px auto;
|
background: #fff;
|
padding: 15px;
|
box-sizing: border-box;
|
display: flex;
|
justify-content: flex-start;
|
align-items: center;
|
}
|
|
// 未盘点
|
.noinventory {
|
border: 1px solid #ff9d0c;
|
border-radius: 40vh;
|
color: #ff9d0c;
|
background-color: #fff7ea;
|
}
|
|
// 已盘点
|
.haveinventory {
|
border: 1px solid #0a8cff;
|
border-radius: 40vh;
|
color: #0a8cff;
|
background-color: #e7f5ff;
|
}
|
|
.col-0d11c9 {
|
color: #0d11c9;
|
}
|
|
.col-0ece3d {
|
color: #0ece3d;
|
}
|
|
.col-ff9d0b {
|
color: #ff9d0b;
|
}
|
|
.col-0589ff {
|
color: #0589ff;
|
}
|
.content-item {
|
width: 98%;
|
border-radius: 8rpx;
|
margin: 10rpx auto;
|
}
|
</style>
|