From 891cd66faef35292910048a15749a7d89ce5dd0e Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期五, 15 三月 2024 14:29:30 +0800
Subject: [PATCH] #
---
pages/home/home.vue | 14 +++---
pages/mat/matSelected.vue | 2
pages/order/orderPakin.vue | 56 +++++++++++++++++++++++++--
pages/pakin/pakin.vue | 3 +
4 files changed, 61 insertions(+), 14 deletions(-)
diff --git a/pages/home/home.vue b/pages/home/home.vue
index 3adeb88..ff3c5e6 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -143,13 +143,13 @@
success(res) {
res = res.data
that.elements = [
- {
- title: '缁勪欢鍏ュ簱',
- name: 'modulePakin',
- color: 'green',
- cuIcon: 'order',
- url: '/pakin/modulePakin'
- },
+ // {
+ // title: '缁勪欢鍏ュ簱',
+ // name: 'modulePakin',
+ // color: 'green',
+ // cuIcon: 'order',
+ // url: '/pakin/modulePakin'
+ // },
]
if (res.code === 200) {
if (res.data == undefined || res.data == null || res.data == "") {
diff --git a/pages/mat/matSelected.vue b/pages/mat/matSelected.vue
index 69ab306..10d3118 100644
--- a/pages/mat/matSelected.vue
+++ b/pages/mat/matSelected.vue
@@ -63,7 +63,7 @@
eventChannel.on('mat', function(data) {
that.mat = data.data
console.log(data.data);
- // that.mat.anfme = 0
+ that.mat.anfme = 1
})
diff --git a/pages/order/orderPakin.vue b/pages/order/orderPakin.vue
index 0e03e10..e12d97a 100644
--- a/pages/order/orderPakin.vue
+++ b/pages/order/orderPakin.vue
@@ -4,7 +4,7 @@
<view class="item">
<view class="code-decs">鎵樼洏鐮�:</view>
<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @confirm="barcodeInput()">
+ @input="barcodeInput()">
</view>
<view class="item">
<view class="code-decs">鐗╂枡鐮�:</view>
@@ -182,13 +182,50 @@
this.msgType1 = type
this.$refs.message.open()
},
+ barcodeInput() {
+ // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
+ setTimeout(() => {
+ var len = this.barcode.length
+ if (len != 8) {
+ uni.showToast({
+ title: '鎵樼洏鐮佹湁璇閲嶈瘯',
+ icon: "none",
+ position: 'top'
+ });
+ this.barcodeFocuss()
+ return;
+ }
+ this.focuss()
+ }, 200)
+ },
+ // 鎵樼洏鐮佹湁璇噸缃�
+ barcodeFocuss() {
+ let that = this;
+ that.barcodeFocus = false;
+ setTimeout(() => {
+ that.barcode = '';
+ that.barcodeFocus = true;
+ }, 100);
+ },
+ // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
+ focuss() {
+ this.matFocus = false;
+ setTimeout(() => {
+ this.matnr = '';
+ this.matFocus = true;
+ }, 100);
+ },
// 鎼滅储鐗╂枡
findMat() {
let that = this
var matnr = that.matnr.split(";")
- that.order = matnr[0]
- that.anfme = matnr[3]
- that.matnr = matnr[1]
+ if (matnr[1]) {
+
+ that.order = matnr[0]
+ that.anfme = matnr[3]
+ that.matnr = matnr[1]
+ }
+ console.log(11112);
uni.request({
url: that.baseUrl + '/mat/auth',
data: {
@@ -199,7 +236,16 @@
},
success(result) {
result = result.data
- if (result.code === 200 && result.data) {
+ if (result.code === 200) {
+ if (result.data === null) {
+ uni.showToast({
+ title: '鏃犵墿鏂�',
+ icon: "error",
+ position: 'top'
+ })
+ that.focuss()
+ return
+ }
that.matData = result.data
that.matnr = ''
diff --git a/pages/pakin/pakin.vue b/pages/pakin/pakin.vue
index 8af03fd..b476887 100644
--- a/pages/pakin/pakin.vue
+++ b/pages/pakin/pakin.vue
@@ -198,7 +198,8 @@
},
// 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
focuss() {
- this.focus = false;
+ this.barcodeFocus = false;
+ this.matFocus = false;
setTimeout(() => {
this.matnr = '';
this.matFocus = true;
--
Gitblit v1.9.1