From b8c1b13f3b805241362d4ecd38930dd88c020f27 Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期五, 15 十一月 2024 16:42:47 +0800 Subject: [PATCH] # --- pages/AGV/AGVStart.vue | 68 +++++++++++++++++++--------------- 1 files changed, 38 insertions(+), 30 deletions(-) diff --git a/pages/AGV/AGVStart.vue b/pages/AGV/AGVStart.vue index 7a699bc..e48fca6 100644 --- a/pages/AGV/AGVStart.vue +++ b/pages/AGV/AGVStart.vue @@ -4,13 +4,17 @@ <view class="item"> <view class="code-decs">鏆傚瓨浣�:</view> <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="stationCode" :focus="stationCodeFocus" - @input="stationCodeInput()"> + @input="stationCodeInput()" > + </view> + <view class="item"> + <view class="code-decs">鍏ュ簱绔�:</view> + <uni-combox :candidates="staList" placeholder="璇烽�夋嫨绔欑偣" v-model="sta"></uni-combox> </view> </view> - <!-- <view class="mat-list-title"> - <view style="-webkit-flex: 1;flex: 1;">绔欑偣鍒楄〃</view> - </view> --> + <view class="mat-list-title"> + <view style="-webkit-flex: 1;flex: 1;"></view> + </view> <scroll-view> <view class="list" v-for="(item,i) in dataList" :key="i" :class="'bg-'+item.color"> <view class="aside"> @@ -122,7 +126,9 @@ removeNum: 0, floorList: [1,3], floor: "", - devNo: [] + devNo: [], + staList:[], + sta:'' } }, onLoad() { @@ -134,19 +140,22 @@ methods: { stationCodeInput() { setTimeout(() => { - var len = this.stationCode.length - if (len != 15) { - this.stationCode = '' - this.stationCodeFocus = true - uni.showToast({ - title: '鏆傚瓨鐮佹湁璇閲嶈瘯', - icon: "none", - position: 'top' - }); - return; + console.log(this.stationCode.substring(0,1)) + this.staList=[] + this.sta = '' + if(this.stationCode.substring(0,1) == 'a'){ + this.staList.push(1040) + this.sta = 1040 + }else if(this.stationCode.substring(0,1) == 'b'){ + this.staList.push(2010) + this.staList.push(2000) + this.sta = 2010 + }else if(this.stationCode.substring(0,1) == 'c'){ + this.staList.push(3010) + this.sta = 3010 + } - this.pushDevNo() - this.stationCodeFocuss() + }, 200) }, pushDevNo() { @@ -419,19 +428,18 @@ combClose() { this.$refs.combConfirm.close() }, - comb() { - this.devNo = [] - uni.vibrateShort(); + comb() { let that = this; - for (var i = 0; i < this.dataList.length; i++) { - if (this.dataList[i].checked) { - this.devNo.push(this.dataList[i].devNo) - } + if (that.stationCode === '') { + this.messageText = "璇锋壂鎻忔殏瀛樹綅鏉$爜" + this.messageToggle('error') + return; } uni.request({ - url: that.baseUrl + '/agvMobile/pakin/auth', + url: that.baseUrl + '/mobile/agv/start', data: JSON.stringify({ - devNo: that.devNo + sta: that.stationCode, + inSta: that.sta }), method: 'POST', header: { @@ -478,8 +486,8 @@ }, // 娓呯┖ resst() { - this.dataList = [] - this.barcode = '' + this.staList = [] + this.sta = '' this.stationCode = '' this.floor = '' this.barcodeFocuss() @@ -549,11 +557,11 @@ .mat-list-title { display: flex; align-items: center; - height: 80rpx; + height: 30rpx; width: 100%; background-color: white; position: fixed; - margin-top: 100rpx; + margin-top: 200rpx; z-index: 9; /* border-top: 1px solid #DCDFE6; */ text-align: center; -- Gitblit v1.9.1