Mr.Zhang
2023-09-18 ca2200ba53b236e8902b706c444375408c782f07
minipro_standard/pages_adjust/pages/manualFeed/manualFeed.vue
@@ -41,7 +41,7 @@
               <div class="tl_list_item">
                  <div class="tl_list_item_label">投料数量{{ item.unitAttribute }}</div>
                  <div class="tl_list_item_go">
                     <input type="text" @blur="changeNumber(item.num, index, item.unitAttribute)"
                     <input type="text"  @blur="changeNumber(item.num, index, item.unitAttribute)"
                        v-model="item.num" />
                  </div>
               </div>
@@ -153,26 +153,21 @@
               unitAttribute: ''
            })
         },
         changeNumber(num, index, unitAttribute) {
         changeNumber(num, index, unitAttribute) {
            if (unitAttribute === 0 && num !== '') {
               if (!positiveInteger.test(num)) {
                  uni.$u.toast({
                     message: '只能输入正整数'
                  })
                  uni.$u.toast('只能输入正整数')
                  this.materialList[index].num = ''
               }
            } else if (unitAttribute === 1 && num !== '') {
               if (!number.test(num)) {
                  uni.$u.toast({
                     message: '只能输入正整数或小数(最多四位)'
                  })
                  uni.$u.toast('只能输入正整数或小数(最多四位)')
                  this.materialList[index].num = ''
               }
            }
            if (num <= 0) {
               uni.$u.toast({
                  message: '投料数量不能小于等于0'
               })
               uni.$u.toast('投料数量不能小于等于0')
               this.materialList[index].num = ''
            }
         },