瀏覽代碼

扣分值不能为空

zhangxc 5 年之前
父節點
當前提交
9f2b61ac09
共有 3 個文件被更改,包括 18 次插入4 次删除
  1. 11 2
      src/components/recordInput/AddRecordItem.vue
  2. 6 1
      src/components/recordInput/ManageItemBatch.vue
  3. 1 1
      vue.config.js

+ 11 - 2
src/components/recordInput/AddRecordItem.vue

@@ -420,7 +420,17 @@
           let  casesEntryHospitals = []
           for(let i = 0; i < this.multipleSelection.length; i++){
             const item = this.multipleSelection[i]
-            if((item.scoreRun === null || item.value ==='')&&item.isUsed =="1"){
+            if((item.scoreRun === null || item.scoreRun ==='') ||(item.value === null || item.value ==='')){
+              this.$message({
+                message:`请填写所需医院扣分值`,
+                type:'warning',
+                showClose: true
+              })
+              this.canSave = true
+              return
+            }
+           
+            if((item.value === null || item.value ==='')&&item.isUsed =="1"){
               this.$message({
                 message:`请填写${item.hospitalName}终末扣分值`,
                 type:'warning',
@@ -429,7 +439,6 @@
               this.canSave = true
               return
             }
-            console.log('scoreRun.',item.scoreRun,'item.isUsedRun',item.isUsedRun)
             if((item.scoreRun === null || item.scoreRun ==='')&&item.isUsedRun =="1"){
               this.$message({
                 message:`请填写请填写${item.hospitalName}运行扣分值`,

+ 6 - 1
src/components/recordInput/ManageItemBatch.vue

@@ -409,7 +409,7 @@
         for(let i = 0; i < values.length; i++){
           for(let j = 0; j < values[i].length;j++){
             const value = values[i][j];
-            if(!valueTypeWr.length&&(!value.msg||value.score==="")){
+            if(!valueTypeWr.length&&(!value.msg||value.score===""||value.score===null||value.scoreRun===""||value.scoreRun===null)){
               tempItemIdx=this.caseLIst[i].qcCasesEntry.findIndex(item =>item.id === value.id);
               requiredValNull.push(value.casesId);
               $(".el-collapse .el-collapse-item:eq("+i+") table tr:eq("+(+tempItemIdx+1)+")").addClass("wrong");
@@ -420,6 +420,11 @@
               $(".el-collapse .el-collapse-item:eq("+i+") table tr:eq("+(+tempItemIdx+1)+")").addClass("wrong");
               valueTypeWr.push(value.casesId);
             }
+            if(!requiredValNull.length&&(!reg.test(value.scoreRun) || value.scoreRun >100)){
+              tempItemIdx=this.caseLIst[i].qcCasesEntry.findIndex(item =>item.id === value.id);
+              $(".el-collapse .el-collapse-item:eq("+i+") table tr:eq("+(+tempItemIdx+1)+")").addClass("wrong");
+              valueTypeWr.push(value.casesId);
+            }
             let item = {
               "casesEntryId": value.id,
               "creator": "0",

+ 1 - 1
vue.config.js

@@ -1,5 +1,5 @@
 const path = require('path');
-const proxy_path = 'http://192.168.2.236:80';
+const proxy_path = 'http://192.168.2.241:80';
 // const proxy_path = 'http://192.168.2.241:88';
 // const proxy_path = 'http://192.168.2.236:88';
 // const proxy_path = 'http://192.168.3.101:5050';