From 36fc4fa64ba5a7fd9f23b33c94c918d4b3ca70e3 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期三, 24 八月 2022 12:17:37 +0800 Subject: [PATCH] Merge branch 'jkwms' of http://47.97.1.152:5880/r/~whycq/wms-app into jkwms --- pages/basics/outPakin.vue | 37 +++++++++++++++++++++++++++++++++---- 1 files changed, 33 insertions(+), 4 deletions(-) diff --git a/pages/basics/outPakin.vue b/pages/basics/outPakin.vue index 6e6ce09..2b42673 100644 --- a/pages/basics/outPakin.vue +++ b/pages/basics/outPakin.vue @@ -298,7 +298,6 @@ if(res.code === 200) { // uni.showToast({title: "娣诲姞鎴愬姛", icon: "none",position: 'center'}) } - } }) @@ -312,6 +311,12 @@ that.addLog(matCode,userName) // that.foucss(); // return; + if(that.matList.length > 15) { + that.messageToggle('warn'); + that.messageText = '缁勬墭鍟嗗搧鏁伴噺宸茶秴杩�16浠讹紝璇峰畬鎴愬綋鍓嶇粍鎵�'; + that.foucss(); + return; + } if (that.matnrId.length > 25){ that.messageToggle('warn'); that.messageText = '鍟嗗搧缂栫爜瓒呴暱锛岃閲嶈瘯'; @@ -322,6 +327,31 @@ let matnr = str[0] + '-' + str[1] // 妫�鏌ユ潯鐮佷腑闈炴暟瀛� that.checkNum(str[2]) + // 妫�鏌ュ簭鍒楃爜闀垮害 + if (str[2].length != 11) { + that.messageToggle('warn'); + that.messageText = '鍟嗗搧搴忓垪鐮侀暱搴︽湁璇紝璇烽噸璇曪紒'; + that.foucss(); + return; + } + // 妫�鏌ュ勾浠� + var dt = new Date(); + var year = (dt.getFullYear() + '').substring(2,4) + var month = (dt.getMonth()+1) < 10 ? '0'+ (dt.getMonth()+1) : (dt.getMonth()+1); + if (str[2].substring(0,2) > year) { + that.messageToggle('warn'); + that.messageText = '鍟嗗搧搴忓垪鐮佸勾浠芥湁璇紝璇烽噸璇曪紒'; + that.foucss(); + return; + } + // 妫�鏌ユ湀浠� + if (str[2].substring(2,4) > 12) { + that.messageToggle('warn'); + that.messageText = '鍟嗗搧搴忓垪鐮佹湀浠芥湁璇紝璇烽噸璇曪紒'; + that.foucss(); + return; + } + if (str) if (that.isNum == false) { that.messageToggle('warn'); that.messageText = '鍟嗗搧缂栫爜鏈夎锛岃閲嶈瘯锛�'; @@ -340,15 +370,14 @@ // return; // uni.showLoading(); uni.request({ - url: that.commonUrl + '/mat/auth', + url: that.commonUrl + '/barcode/check/auth', data: { - matnr:matnr + barcode:that.matnrId }, header: { 'token':uni.getStorageSync('token') }, success(result) { - console.log(result) uni.hideLoading(); // uni.vibrateShort(); let res = result.data -- Gitblit v1.9.1