agv搬运传参用value

master
judy 2 years ago
parent 5864ddfec4
commit a73ccf7b89
  1. 28
      pages/AvgCarry/index.vue

@ -1,16 +1,16 @@
<template> <template>
<view class="sh-content" style="padding: 50rpx 50rpx;"> <view class="sh-content" style="padding: 50rpx 50rpx;">
<view class="task" > <view class="task" >
<span>扫描托盘条码:</span> <span>扫描托盘条码:</span>
<u-input v-model="dataForm.containerCode" border style="background-color: #ffffff;margin-bottom: 20px;" <u-input v-model="dataForm.containerCode" border style="background-color: #ffffff;margin-bottom: 20px;"
placeholder="请输入或输入要搬运的托盘条码" @confirm="changeCode()"></u-input> placeholder="请输入或输入要搬运的托盘条码" @confirm="changeCode()"></u-input>
<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="pointList" @confirm="confirm" mode="single-column" ></u-select>
</view> </view>
<view class="" style="text-align: center;"> <view class="" style="text-align: center;">
<img src="/static/down.png" alt="" srcset="" style="width: 400rpx;"> <img src="/static/down.png" alt="" srcset="" style="width: 400rpx;">
@ -39,14 +39,14 @@
showList:[], showList:[],
dataForm:{ dataForm:{
containerCode:'', containerCode:'',
endPoint:'', endPoint:'',
}, },
pointList:[] pointList:[]
} }
}, },
onLoad(){ onLoad(){
// this.getDic() // this.getDic()
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=[]
@ -54,7 +54,7 @@
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);
@ -64,11 +64,11 @@
}) })
// this.getList() // this.getList()
}, },
methods:{ methods:{
changeCode() { changeCode() {
// this.query = { // this.query = {
// pageNum: 1, // pageNum: 1,
@ -90,8 +90,8 @@
// this.end='' // this.end=''
// 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=>{ 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=''
@ -107,7 +107,7 @@
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);
@ -159,4 +159,4 @@
<style lang="scss"> <style lang="scss">
@import "index.scss"; @import "index.scss";
</style> </style>

Loading…
Cancel
Save