You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
cy_pda/pages/queryPoint/index.vue

199 lines
5.2 KiB

<template>
<view class="sh-content">
<view class="sh-search">
<u-form labelPosition="left" :model="dataForm" class="sh-form">
<u-form-item prop="barCode">
<select-lay style="width: 100%;" :zindex="200" smoldName="model" smodel="moldName" name="name3" slabel="label" svalue="value"
:options="nextDataList" @selectitem="queryList" >
</select-lay>
</u-form-item>
</u-form>
</view>
<view class='recommend'>
<text class='recommend-title'></text>
</view>
<!-- {{dataList}} -->
<view class="all-card">
<view class="sh-card" v-for="(item, index) in dataList" :key="item.id" :index="item.id" v-if="dataList.length > 0"
style="border-radius: 20rpx;">
<view :class="isActive===index? 'sh-card-title-two':'sh-card-title'" @click="btn(index,item)" style="border-radius: 20rpx;"><!--:class="{'borderBottom':!item.businInShelfDVoList.length}"-->
<view class="card-content">
<view class="card-content-item" >
<text class="item-title" ></text>
<text class="item-value"></text>
</view>
</view>
<view class="card-content">
<view class="card-content-item">
<text class="item-title">点位编号:</text>
<text class="item-value">{{item.pointNo}}</text>
</view>
</view>
<view class="card-content">
<view class="card-content-item">
<text class="item-title">名称名称:</text>
<text class="item-value">{{item.pointName}}</text>
</view>
</view>
<view class="card-content">
<view class="card-content-item">
<text class="item-title">所属分组:</text>
<text class="item-value">{{item.groupName}}</text>
</view>
</view>
<view class="card-content">
<view class="card-content-item">
<text class="item-title">是否占用:</text>
<text class="item-value">{{item.isOccupy == '0' ? '否':(item.isOccupy == '1'?'是':'已分配')}}</text>
</view>
</view>
<!-- <view class="card-content">
<view class="card-content-item">
<text class="item-title">容器类型:</text>
<text class="item-value">{{item.containerType == '0'? typeList[0].dictLabel:typeList[1].dictLabel}}</text>
</view>
</view> -->
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
showDiv:false,
queryFlag: '',
dataForm: {
pageNum: 1,
pageSize: 10
},
pickUpObj:{
pointNo:'',
taskCode:'',
taskId:'',
containerCode:'',
},
statusList:[],
typeList:[],
dataList:[],
nextDataList:[],
query: {
current: 1,
size: 20
},
isActive:0,
loadStatus: 'loadmore',
timer:0,
}
},
onLoad() {
// this.getDic(); //获取字典
// this.$u.api.containerStatus().then(res=>{
// this.statusList = res.data
// })
// this.$u.api.containerContainerType().then(res=>{
// this.typeList = res.data
// })
// this.loadList();
// this.$u.api.AvgCarry.getPointList(this.dataForm).then(res=>{
// if(res.code == '200'){
// this.dataList = res.rows
// }
// })
this.$u.api.AvgCarry.getPointList({...this.dataForm,pageSize: 9999}).then(res=>{
this.nextDataList=[]
if(res.code == '200'){
// this.dataList = res.rows
let dataArry = res.rows;
for (var i = 0; i < dataArry.length; i++) {
var obj = {
value: dataArry[i].pointNo,
label: dataArry[i].pointName,
};
this.nextDataList.push(obj);
}
}
})
},
//上拉刷新(当数据距离底部100时触发,距离在pages.json配置)
// onReachBottom() {
// this.loadStatus = "loading";
// setTimeout(() => {
// this.dataForm.pageNum += 1;
// this.loadList();
// }, 100);
// },
// onPullDownRefresh () {
// this.list = []
// //调用获取数据方法
// setTimeout(() => {
// //结束下拉刷新
// uni.stopPullDownRefresh ();
// }, 1000);
// },
methods: {
//点击变色
btn(index,item){
this.isActive = index
},
/**搜索框查询*/
queryList(row,item) {
this.dataForm.pointNo=item['value']
// this.dataForm.pointName=item['label']
this.loadList()
},
loadList() {
//防抖
this.timer =setTimeout(()=>{
//节流
let flag = true
if(flag===false) return
// if (this.dataForm.containerCode == '' || this.dataForm.containerCode == null || this.dataForm.containerCode ==
// undefined) {
// return
// }
this.$u.api.AvgCarry.getPointList(this.dataForm).then(res=>{
if(res.code == '200'){
this.dataList = res.rows
}
})
flag=false
setTimeout(()=>{
flag = true
}
,500)
},400)
},
pickUp(){
},
// 任务查看
searchClick() {
this.dataList = [];
this.dataForm.pageNum = 1;
this.loadList();
},
}
}
</script>
<style lang="scss">
@import "index.scss";
.footer {
display: flex;
padding: 20rpx 0;
}
</style>