浏览代码

合班加限制

1
mo 4 年之前
父节点
当前提交
a05dc626dd
共有 1 个文件被更改,包括 10 次插入2 次删除
  1. 10 2
      src/views/teamDetail/componentClass/calenderStudentList.vue

+ 10 - 2
src/views/teamDetail/componentClass/calenderStudentList.vue

@@ -81,7 +81,7 @@
               v-for="(item, index) in scope.row.courseList"
               :key="index"
             >
-              <el-input v-model="item.courseCurrentPrice"></el-input>
+              <el-input v-model="item.courseCurrentPrice" type="number"></el-input>
               <!-- {{item.courseOriginalPrice}} -->
             </div>
           </div>
@@ -165,15 +165,23 @@ export default {
     },
     async submit() {
       let flag = false;
-      console.log(this.dataList)
+      let isNumber = false;
+      const lodash = this.$helpers.lodash
 
       this.dataList.forEach(stu=>{
         stu.courseList.forEach(course=>{
           if(!(course.courseCurrentPrice+'')){
             flag = true
           }
+          if(!lodash.isNumber(course.courseCurrentPrice*1) || course.courseCurrentPrice*1<0){
+            isNumber = true
+          }
         })
       })
+      if(isNumber){
+        this.$message.error('请填写正确的补交差价')
+        return
+      }
       if(flag){
         this.$message.error('请填写完成的缴费信息')
         return