#
whycq
2022-08-19 9c1ef684c18a8c0d9516516c4067bd209ac98752
pages/basics/outPakin.vue
@@ -298,7 +298,6 @@
                  if(res.code === 200) {
                     // uni.showToast({title: "添加成功", icon: "none",position: 'center'})
                  }
               }
            })
            
@@ -322,6 +321,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 = '商品编码有误,请重试!';