فهرست منبع

Merge branch 'feature_20250311_物料任务设置最大值' into release

zhujindu 8 ماه پیش
والد
کامیت
6f96fa5b38
1فایلهای تغییر یافته به همراه13 افزوده شده و 1 حذف شده
  1. 13 1
      src/views/deviceWithin/addStoreVisit.vue

+ 13 - 1
src/views/deviceWithin/addStoreVisit.vue

@@ -72,7 +72,7 @@
             ><van-field
               v-model="scope.row.value"
               placeholder="请输入"
-              type="number"
+              type="digit"
               @blur="inputbluwl(scope.row.value, scope.$index, '2')"
           /></template>
         </el-table-column>
@@ -3092,6 +3092,12 @@ export default {
           if (Number(val) > Number(this.tableData1[index].inventoryNum)) {
             this.$toast('请输入小于等于销售部库存量');
             this.tableData1[index].value = '';
+            return;
+          }
+          let maxValue = this.tableData1[index].maxValue;
+          if (maxValue && Number(val) > Number(maxValue)) {
+            this.$toast('请输入小于等于最大发放量');
+            this.tableData1[index].value = '';
           }
         } else if (!this.insert) {
           if (
@@ -3101,6 +3107,12 @@ export default {
           ) {
             this.$toast('请输入小于等于销售部库存量+发放量');
             this.tableData1[index].value = this.tableData1[index].contrastValue;
+            return;
+          }
+          let maxValue = this.tableData1[index].maxValue;
+          if (maxValue && Number(val) > Number(maxValue)) {
+            this.$toast('请输入小于等于最大发放量');
+            this.tableData1[index].value = '';
           }
         } else {
           this.tableData1[index].value = val.replace(/[^\d.]/g, ''); //清除"数字"和"."以外的字符