From eed846f7b4d8b8dfc253dd583ee2bbb45c4d4f7d Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期一, 18 九月 2023 17:06:16 +0800
Subject: [PATCH] #
---
pages/AGV/AGVPakinBing.vue | 57 ++++++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 42 insertions(+), 15 deletions(-)
diff --git a/pages/AGV/AGVPakinBing.vue b/pages/AGV/AGVPakinBing.vue
index 0f20eed..7f1848f 100644
--- a/pages/AGV/AGVPakinBing.vue
+++ b/pages/AGV/AGVPakinBing.vue
@@ -8,7 +8,8 @@
</view>
<view class="item">
<view class="code-decs">鏆傚瓨浣�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="stationCode" :focus="matFocus">
+ <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="stationCode" :focus="stationCodeFocus"
+ @input="stationCodeInput()">
<view class="item-right">
<button></button>
<!-- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text> -->
@@ -27,7 +28,7 @@
<view class="left-item">{{i + 1}}</view>
</view>
<view class="list-left-item">
- <view class="desc">缂栫爜锛�</view>
+ <view class="desc">鏂欏彿锛�</view>
<view class="left-item">
<uni-tag :text="item.matnr" type="primary"></uni-tag>
</view>
@@ -46,12 +47,12 @@
<uni-tag :text="item.batch" type="warning"></uni-tag>
</view>
</view>
- <view class="list-left-item">
+ <!-- <view class="list-left-item">
<view class="desc">閲嶉噺锛�</view>
<view class="left-item">
<uni-tag :text="item.weight" type="warning"></uni-tag>
</view>
- </view>
+ </view> -->
<view class="list-left-item">
<view class="desc">鏁伴噺锛�</view>
<view class="left-item">{{item.anfme}}</view>
@@ -66,7 +67,7 @@
<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
<view class="buttom">
<button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">涓婃灦</button>
+ <button size="mini" type="primary" @click="combConfirm('warn')">缁戝畾</button>
</view>
<!-- 寮圭獥 -->
<!-- 淇敼鏁伴噺 -->
@@ -76,20 +77,20 @@
<!-- 鏍囬 -->
<view class="title">淇敼</view>
<view class="popup-item">
- <view class="popup-item-left">缂栫爜:</view>
+ <view class="popup-item-left">鏂欏彿:</view>
<view class="popup-item-right">
<input type="text" v-model="matnr" disabled="true"
style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
</view>
</view>
- <!-- <view class="popup-item">
+ <view class="popup-item">
<view class="popup-item-left">鎵瑰彿:</view>
<view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view> -->
- <view class="popup-item">
+ </view>
+ <!-- <view class="popup-item">
<view class="popup-item-left">閲嶉噺:</view>
<view class="popup-item-right"><input type="text" v-model="weight"></view>
- </view>
+ </view> -->
<view class="popup-item">
<view class="popup-item-left">鏁伴噺:</view>
<view class="popup-item-right" style="border: none;justify-content: center;">
@@ -117,7 +118,7 @@
<uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
</uni-popup>
</view>
- <!-- 纭涓婃灦 -->
+ <!-- 纭缁戝畾 -->
<view>
<uni-popup ref="combConfirm" type="dialog">
<uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
@@ -142,6 +143,7 @@
token: '',
barcode: '',
stationCode: '',
+ stationCodeFocus: false,
dataList: [],
count: 0,
rowNum: '',
@@ -171,12 +173,28 @@
this.msgType1 = type
this.$refs.message.open()
},
+ stationCodeInput() {
+ setTimeout(() => {
+ var len = this.stationCode.length
+ if (len != 15) {
+ this.stationCode = ''
+ this.stationCodeFocus = true
+ uni.showToast({
+ title: '鏆傚瓨鐮佹湁璇閲嶈瘯',
+ icon: "none",
+ position: 'top'
+ });
+ return;
+ }
+ this.focuss()
+ }, 200)
+ },
// barcode input 浜嬩欢
barcodeInput() {
// 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
setTimeout(() => {
var len = this.barcode.length
- if (len != 8) {
+ if (len != 10) {
uni.showToast({
title: '鎵樼洏鐮佹湁璇閲嶈瘯',
icon: "none",
@@ -185,8 +203,16 @@
this.barcodeFocuss()
return;
}
- this.focuss()
+ this.stationCodeFocuss()
}, 200)
+ },
+ // 鏆傚瓨浣嶆湁璇噸缃�
+ stationCodeFocuss() {
+ let that = this;
+ that.stationCodeFocus = false;
+ setTimeout(() => {
+ that.stationCodeFocus = true;
+ }, 100);
},
// 鎵樼洏鐮佹湁璇噸缃�
barcodeFocuss() {
@@ -363,7 +389,7 @@
combConfirm(type) {
this.msgType = type
this.title = '璀﹀憡'
- this.content = '鏄惁鐜板湪涓婃灦!'
+ this.content = '鏄惁鐜板湪缁戝畾!'
this.$refs.combConfirm.open()
},
combClose() {
@@ -391,7 +417,7 @@
var res = result.data
if (res.code === 200) {
that.resst();
- that.messageText = "涓婃灦鎴愬姛"
+ that.messageText = "缁戝畾鎴愬姛"
that.messageToggle('success')
// const innerAudioContext = uni.createInnerAudioContext();
// innerAudioContext.src = '/static/music/pakinOk.mp3';
@@ -420,6 +446,7 @@
// 纭閲嶇疆
resetConfirm() {
this.dataList = []
+ this.barcode = ''
this.stationCode = ''
this.messageText = "閲嶇疆瀹屾垚"
this.messageToggle('success')
--
Gitblit v1.9.1