完善点位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. 22
      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://127.0.0.1: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://192.168.1.199:8030';

@ -9,17 +9,18 @@
<span>搬运起始点位:</span>
<u-input v-model="begin" border type="select" placeholder="请选择起始点位" prop="wareHouse" class="u-input"
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 class="" style="text-align: center;">
<img src="/static/down.png" alt="" srcset="" style="width: 400rpx;">
<view class="img1" style="text-align: center;">
<!-- <img src="@/static/icon/down.png" alt="" style="width: 300rpx;"> -->
</view>
<view class="task" >
<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" />
<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 class="footer" style="position: absolute;bottom:8%;left: 50%;transform: translateX(-50%);">
<u-button type="success" @click="checkOutPick()" style="width: 400rpx;">开始搬运</u-button>
@ -41,7 +42,8 @@
containerCode:'',
endPoint:'',
},
pointList:[]
pointList:[],
pointList1:[],
}
},
onLoad(){
@ -50,15 +52,16 @@
this.$u.api.AvgCarry.getPointList({pageNum: 1,
pageSize: 100}).then(res=>{
this.pointList=[]
this.pointList1=[]
if(res.code==200){
let dataArry = res.rows;
for (var i = 0; i < dataArry.length; i++) {
var obj = {
value: dataArry[i].pointName,
value: dataArry[i].pointNo,
label: dataArry[i].pointName,
};
this.pointList.push(obj);
console.log(this.pointList);
this.pointList1.push(obj);
}
}
})
@ -76,8 +79,15 @@
// }
// this.getDataList()
this.$u.api.AvgCarry.queryBillingDByContainerCode({containerCode:this.dataForm.containerCode}).then(res=>{
this.dataForm.endPoint = res.data
this.pointList = this.pointList.filter(item=>item.value != this.beginValue && item.value != this.dataForm.endPoint)
// console.log(res);
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()
// }
// }).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)
if(res.code==200){
this.begin=''
@ -103,19 +137,21 @@
this.$u.api.AvgCarry.getPointList({pageNum: 1,
pageSize: 100}).then(res=>{
this.pointList=[]
this.pointList1=[]
if(res.code==200){
let dataArry = res.rows;
for (var i = 0; i < dataArry.length; i++) {
var obj = {
value: dataArry[i].pointName,
value: dataArry[i].pointNo,
label: dataArry[i].pointName,
};
this.pointList.push(obj);
this.pointList1.push(obj);
}
}
})
}
}).catch(err=>console.log(err))
}).catch(err=>{})
},
//
async getList(){
@ -141,7 +177,7 @@
judge(e){
// console.log(e);
// 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) {
this.begin = e[0].label
@ -149,7 +185,8 @@
this.judge(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.judge(e)
},
@ -159,4 +196,11 @@
<style lang="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>

@ -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="请扫描台车编号"
@confirm="inputQuery()" :focus="firstFocus">
</u-input> -->
<select-lay :options="datalist1" @itemclick="cpnclick" style="width: 92%;margin-left: 2vh; margin-top: 4vh;"
smoldName="ptName" slabel="ptDesc" smodel="ptName" name="name3" svalue="id" @selectitem="queryList"
<select-lay :options="pointList" @itemclick="cpnclick" style="width: 92%;margin-left: 2vh; margin-top: 4vh;"
smoldName="ptName" slabel="label" smodel="ptName" name="name3" svalue="value" @selectitem="queryList"
:value="dataForm.ptName" placeholder="扫描或选择要释放位置编码"> </select-lay>
</u-form-item>
</u-form>
@ -105,12 +105,13 @@
showDiv:false,
queryFlag: '',
dataForm: {
containerCode: null,
pointNo: null,
keywords: "",
pageNum: 1,
pageSize: 10
},
datalist1:[],
pointList:[],
pickUpObj:{
pointNo:'',
taskCode:'',
@ -150,6 +151,23 @@
// this.$u.api.mouldStorage.queryMouldStorage({pageNum: 1,pageSize:9999,type:'out'}).then(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)
onReachBottom() {
@ -206,7 +224,7 @@
},
queryList(index,item){
console.log(index,item);
this.dataForm.containerCode=item.containerCode
this.dataForm.pointNo=item.value
},
enterUp(item){
@ -221,7 +239,7 @@
// clearTimeout(this.queryFlag);
// 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) {
return
}
@ -250,7 +268,7 @@
//
let flag = true
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) {
return
}
@ -270,9 +288,9 @@
})
this.dataList=res.data
setTimeout(()=>{
this.dataForm.containerCode1=this.dataForm.containerCode
this.dataForm.containerTypeLabel=this.dataForm.containerCode
this.dataForm.containerCode=''
this.dataForm.pointNo=this.dataForm.pointNo
this.dataForm.containerTypeLabel=this.dataForm.pointNo
this.dataForm.pointNo=''
},0)
this.$nextTick(()=>{
@ -291,7 +309,7 @@
url: 'pages/BusinPickup/index1',
type: 'navigateTo',
params:{
containerCode:item.containerCode
pointNo:item.pointNo
}
})
},

@ -1,6 +1,6 @@
<template>
<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}">
<!-- 禁用mask -->
<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) {
this.changevalue = this.oldvalue;
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>

Loading…
Cancel
Save