Преглед изворни кода

fix:qty数量判断少了=

zh пре 2 година
родитељ
комит
7f4def3cee
1 измењених фајлова са 3 додато и 4 уклоњено
  1. 3 4
      src/views/supply/engin/components/engin_form.vue

+ 3 - 4
src/views/supply/engin/components/engin_form.vue

@@ -299,7 +299,7 @@
         </el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-input v-model="scope.row.qty" size="small" type="number" @mousewheel.native.prevent />
+            <el-input v-model.number="scope.row.qty" size="small" type="number" @mousewheel.native.prevent />
           </template>
         </el-table-column>
         <el-table-column align="center" label="订单金额" prop="myTotalAmount" min-width="100" show-overflow-tooltip>
@@ -905,9 +905,8 @@ export default {
               this.$errorMsg('请选择销售类型')
               return
             }
-            console.log(this.goodsList[i].qty );
-            if (this.goodsList[i].qty == null || this.goodsList[i].qty == '' || Number(this.goodsList[i].qty) < 0) {
-              this.$errorMsg('数量不能为空或者小于0')
+            if (this.goodsList[i].qty == null || this.goodsList[i].qty === '' || Number(this.goodsList[i].qty) < 0) {
+              this.$errorMsg('数量不能为空或者不能小于0')
               return
             }
             if (!this.goodsList[i].materialNumber) {