完善点位value

master
Mr.sun 2 years ago
parent 5864ddfec4
commit e26121ff5c
  1. 1
      common/config.js
  2. 74
      pages/AvgCarry/index.vue
  3. 38
      pages/release/index.vue
  4. 20
      uni_modules/select-lay/components/select-lay/select-lay.vue

@ -12,6 +12,7 @@ const config = {
// config.baseUrl = 'http://120.77.94.227:8030' // config.baseUrl = 'http://120.77.94.227:8030'
config.baseUrl = 'http://127.0.0.1:8030'; config.baseUrl = 'http://127.0.0.1:8030';
// config.baseUrl = 'http://192.168.7.24:8030'; // config.baseUrl = 'http://192.168.7.24:8030';
// config.baseUrl = 'http://192.168.229.120:8030';
// config.baseUrl = 'http://120.77.94.227:8030'; // config.baseUrl = 'http://120.77.94.227:8030';
//现场 //现场
// config.baseUrl = 'http://192.168.1.199:8030'; // config.baseUrl = 'http://192.168.1.199:8030';

@ -9,17 +9,18 @@
<span>搬运起始点位:</span> <span>搬运起始点位:</span>
<u-input v-model="begin" border type="select" placeholder="请选择起始点位" prop="wareHouse" class="u-input" <u-input v-model="begin" border type="select" placeholder="请选择起始点位" prop="wareHouse" class="u-input"
placeholder-style="color:#000000" @click="show = true" /> placeholder-style="color:#000000" @click="show = true" />
<u-select v-model="show" :list="pointList" @confirm="confirm" mode="single-column" ></u-select> <u-select v-model="show" :list="pointList1" @confirm="confirm" mode="single-column" ></u-select>
</view> </view>
<view class="" style="text-align: center;"> <view class="img1" style="text-align: center;">
<img src="/static/down.png" alt="" srcset="" style="width: 400rpx;"> <!-- <img src="@/static/icon/down.png" alt="" style="width: 300rpx;"> -->
</view> </view>
<view class="task" > <view class="task" >
<span>搬运目标点位:</span> <span>搬运目标点位:</span>
<u-input v-model="dataForm.endPoint" border type="select" placeholder="请选择目标点位" prop="wareHouse" class="u-input" <u-input v-model="end" border type="select" placeholder="请选择目标点位" prop="wareHouse" class="u-input"
placeholder-style="color:#000000" @click="showTwo = true" /> placeholder-style="color:#000000" @click="showTwo = true" />
<u-select v-model="showTwo" :list="pointList" @confirm="confirmTwo" mode="single-column"></u-select> <u-select v-model="showTwo" :list="pointList1" @confirm="confirmTwo" mode="single-column"></u-select>
</view> </view>
<view class="footer" style="position: absolute;bottom:8%;left: 50%;transform: translateX(-50%);"> <view class="footer" style="position: absolute;bottom:8%;left: 50%;transform: translateX(-50%);">
<u-button type="success" @click="checkOutPick()" style="width: 400rpx;">开始搬运</u-button> <u-button type="success" @click="checkOutPick()" style="width: 400rpx;">开始搬运</u-button>
@ -41,7 +42,8 @@
containerCode:'', containerCode:'',
endPoint:'', endPoint:'',
}, },
pointList:[] pointList:[],
pointList1:[],
} }
}, },
onLoad(){ onLoad(){
@ -50,15 +52,16 @@
this.$u.api.AvgCarry.getPointList({pageNum: 1, this.$u.api.AvgCarry.getPointList({pageNum: 1,
pageSize: 100}).then(res=>{ pageSize: 100}).then(res=>{
this.pointList=[] this.pointList=[]
this.pointList1=[]
if(res.code==200){ if(res.code==200){
let dataArry = res.rows; let dataArry = res.rows;
for (var i = 0; i < dataArry.length; i++) { for (var i = 0; i < dataArry.length; i++) {
var obj = { var obj = {
value: dataArry[i].pointName, value: dataArry[i].pointNo,
label: dataArry[i].pointName, label: dataArry[i].pointName,
}; };
this.pointList.push(obj); this.pointList.push(obj);
console.log(this.pointList); this.pointList1.push(obj);
} }
} }
}) })
@ -76,8 +79,15 @@
// } // }
// this.getDataList() // this.getDataList()
this.$u.api.AvgCarry.queryBillingDByContainerCode({containerCode:this.dataForm.containerCode}).then(res=>{ this.$u.api.AvgCarry.queryBillingDByContainerCode({containerCode:this.dataForm.containerCode}).then(res=>{
this.dataForm.endPoint = res.data // console.log(res);
this.pointList = this.pointList.filter(item=>item.value != this.beginValue && item.value != this.dataForm.endPoint) this.endValue = res.data
this.pointList.forEach(item=>{
if(this.endValue == item.value){
this.end = item.label
}
})
// this.end = res.data
this.pointList1 = this.pointList.filter(item=>item.value != this.beginValue && item.value != this.endPoint)
} }
) )
}, },
@ -91,7 +101,31 @@
// this.judge() // this.judge()
// } // }
// }).catch(err=>console.log(err)) // }).catch(err=>console.log(err))
this.$u.api.AvgCarry.agvCarry({startPoint:this.begin,toLocation:this.dataForm.endPoint,containerCode:this.dataForm.containerCode}).then(res=>{ if(this.dataForm.containerCode == null
|| this.dataForm.containerCode === ''
|| this.dataForm.containerCode === 0
|| this.dataForm.containerCode === undefined
|| this.dataForm.containerCode ==='undefined'){
this.$u.toast("请扫描台车编号");
return;
} if(this.beginValue == null
|| this.beginValue === ''
|| this.beginValue === 0
|| this.beginValue === undefined
|| this.beginValue ==='undefined'){
this.$u.toast("请选择起始位置");
return;
}
if(this.endValue == null
|| this.endValue === ''
|| this.endValue === 0
|| this.endValue === undefined
|| this.endValue ==='undefined'){
this.$u.toast("请选择目标位置");
return;
}
this.$u.api.AvgCarry.agvCarry({startPoint:this.beginValue,toLocation:this.endValue,
containerCode:this.dataForm.containerCode}).then(res=>{
this.$u.toast(res.msg) this.$u.toast(res.msg)
if(res.code==200){ if(res.code==200){
this.begin='' this.begin=''
@ -103,19 +137,21 @@
this.$u.api.AvgCarry.getPointList({pageNum: 1, this.$u.api.AvgCarry.getPointList({pageNum: 1,
pageSize: 100}).then(res=>{ pageSize: 100}).then(res=>{
this.pointList=[] this.pointList=[]
this.pointList1=[]
if(res.code==200){ if(res.code==200){
let dataArry = res.rows; let dataArry = res.rows;
for (var i = 0; i < dataArry.length; i++) { for (var i = 0; i < dataArry.length; i++) {
var obj = { var obj = {
value: dataArry[i].pointName, value: dataArry[i].pointNo,
label: dataArry[i].pointName, label: dataArry[i].pointName,
}; };
this.pointList.push(obj); this.pointList.push(obj);
this.pointList1.push(obj);
} }
} }
}) })
} }
}).catch(err=>console.log(err)) }).catch(err=>{})
}, },
// //
async getList(){ async getList(){
@ -141,7 +177,7 @@
judge(e){ judge(e){
// console.log(e); // console.log(e);
// console.log(this.pointList); // console.log(this.pointList);
this.pointList = this.pointList.filter(item=>item.value != this.beginValue && item.value != this.endValue) this.pointList1 = this.pointList.filter(item=>item.value != this.beginValue && item.value != this.endValue)
}, },
confirm(e) { confirm(e) {
this.begin = e[0].label this.begin = e[0].label
@ -149,7 +185,8 @@
this.judge(e) this.judge(e)
}, },
confirmTwo(e) { confirmTwo(e) {
this.dataForm.endPoint= e[0].label // this.dataForm.endPoint= e[0].label
this.end= e[0].label
this.endValue = e[0].value this.endValue = e[0].value
this.judge(e) this.judge(e)
}, },
@ -159,4 +196,11 @@
<style lang="scss"> <style lang="scss">
@import "index.scss"; @import "index.scss";
.img1{
height: 220px;
background-image: url(@/static/down.png);
background-size: 50% 100%;
background-repeat: no-repeat;
background-position:center;
}
</style> </style>

@ -6,8 +6,8 @@
<!-- <u-input v-model="dataForm.containerCode" border input-align="left" height="70" style="background-color: #ffffff;height: 38px;line-height: 38px;" placeholder="请扫描台车编号" <!-- <u-input v-model="dataForm.containerCode" border input-align="left" height="70" style="background-color: #ffffff;height: 38px;line-height: 38px;" placeholder="请扫描台车编号"
@confirm="inputQuery()" :focus="firstFocus"> @confirm="inputQuery()" :focus="firstFocus">
</u-input> --> </u-input> -->
<select-lay :options="datalist1" @itemclick="cpnclick" style="width: 92%;margin-left: 2vh; margin-top: 4vh;" <select-lay :options="pointList" @itemclick="cpnclick" style="width: 92%;margin-left: 2vh; margin-top: 4vh;"
smoldName="ptName" slabel="ptDesc" smodel="ptName" name="name3" svalue="id" @selectitem="queryList" smoldName="ptName" slabel="label" smodel="ptName" name="name3" svalue="value" @selectitem="queryList"
:value="dataForm.ptName" placeholder="扫描或选择要释放位置编码"> </select-lay> :value="dataForm.ptName" placeholder="扫描或选择要释放位置编码"> </select-lay>
</u-form-item> </u-form-item>
</u-form> </u-form>
@ -105,12 +105,13 @@
showDiv:false, showDiv:false,
queryFlag: '', queryFlag: '',
dataForm: { dataForm: {
containerCode: null, pointNo: null,
keywords: "", keywords: "",
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 10
}, },
datalist1:[], datalist1:[],
pointList:[],
pickUpObj:{ pickUpObj:{
pointNo:'', pointNo:'',
taskCode:'', taskCode:'',
@ -150,6 +151,23 @@
// this.$u.api.mouldStorage.queryMouldStorage({pageNum: 1,pageSize:9999,type:'out'}).then(res=>{ // this.$u.api.mouldStorage.queryMouldStorage({pageNum: 1,pageSize:9999,type:'out'}).then(res=>{
// console.log(res); // console.log(res);
// }) // })
this.$u.api.AvgCarry.getPointList({pageNum: 1,
pageSize: 100}).then(res=>{
this.pointList=[]
if(res.code==200){
let dataArry = res.rows;
for (var i = 0; i < dataArry.length; i++) {
var obj = {
value: dataArry[i].pointNo,
label: dataArry[i].pointName,
};
this.pointList.push(obj);
}
}
})
}, },
//(100pages.json) //(100pages.json)
onReachBottom() { onReachBottom() {
@ -206,7 +224,7 @@
}, },
queryList(index,item){ queryList(index,item){
console.log(index,item); console.log(index,item);
this.dataForm.containerCode=item.containerCode this.dataForm.pointNo=item.value
}, },
enterUp(item){ enterUp(item){
@ -221,7 +239,7 @@
// clearTimeout(this.queryFlag); // clearTimeout(this.queryFlag);
// this.loadList() // this.loadList()
// } // }
if (this.dataForm.containerCode == '' || this.dataForm.containerCode == null || this.dataForm.containerCode == if (this.dataForm.pointNo == '' || this.dataForm.pointNo == null || this.dataForm.pointNo ==
undefined) { undefined) {
return return
} }
@ -250,7 +268,7 @@
// //
let flag = true let flag = true
if(flag===false) return if(flag===false) return
if (this.dataForm.containerCode == '' || this.dataForm.containerCode == null || this.dataForm.containerCode == if (this.dataForm.pointNo == '' || this.dataForm.pointNo == null || this.dataForm.pointNo ==
undefined) { undefined) {
return return
} }
@ -270,9 +288,9 @@
}) })
this.dataList=res.data this.dataList=res.data
setTimeout(()=>{ setTimeout(()=>{
this.dataForm.containerCode1=this.dataForm.containerCode this.dataForm.pointNo=this.dataForm.pointNo
this.dataForm.containerTypeLabel=this.dataForm.containerCode this.dataForm.containerTypeLabel=this.dataForm.pointNo
this.dataForm.containerCode='' this.dataForm.pointNo=''
},0) },0)
this.$nextTick(()=>{ this.$nextTick(()=>{
@ -291,7 +309,7 @@
url: 'pages/BusinPickup/index1', url: 'pages/BusinPickup/index1',
type: 'navigateTo', type: 'navigateTo',
params:{ params:{
containerCode:item.containerCode pointNo:item.pointNo
} }
}) })
}, },

@ -1,6 +1,6 @@
<template> <template>
<view class="uni-select-lay" :style="{'z-index':zindex}"> <view class="uni-select-lay" :style="{'z-index':zindex}">
<input type="text" :name="name" v-model="value" @input="()=>{console.log(111)}" class="uni-select-input"> <input type="text" :name="name" v-model="value" class="uni-select-input">
<view class="uni-select-lay-select" :class="{'active':active}"> <view class="uni-select-lay-select" :class="{'active':active}">
<!-- 禁用mask --> <!-- 禁用mask -->
<view class="uni-disabled" v-if="disabled"></view> <view class="uni-disabled" v-if="disabled"></view>
@ -219,12 +219,26 @@
}, },
// //
// selectitem(index, item) {
// this.changevalue = this.oldvalue;
// this.active = false;
// this.$emit("selectitem", index, item)
// },
// //
selectitem(index, item) { selectitem(index, item) {
this.changevalue = this.oldvalue;
this.active = false; this.active = false;
this.$emit("selectitem", index, item) if(index == -1) {
this.changevalue = ''
}else{
this.changevalue = item[this.slabel]
} }
this.$emit("selectitem", index, item)
},
} }
} }
</script> </script>

Loading…
Cancel
Save