morphone1995 4 anni fa
parent
commit
ce128dd5f1

+ 25 - 15
src/components/icss/bill/AddBill.vue

@@ -155,7 +155,7 @@ export default {
         concept: [
           { required: true, validator: checkFrequency, trigger: 'blur' },
           { validator: checkFrequency2, trigger: 'change' }
-        ],
+        ]
         // conditionName: [
         //   { required: true, message: '请输入条件明细', trigger: 'change' }
         // ]
@@ -284,20 +284,30 @@ export default {
 
     onSubmit() {
       let goOn = true;
-      this.$refs.subForm.$refs.form.validate(valid => {
-        if (valid) {
-          // console.log(this.$refs.subForm.$refs.form, '=========');
-        } else {
-          goOn = false;
-        }
-      });
-      this.$refs.subForm.$refs.ruleForm.validate(valid => {
-        if (valid) {
-          // console.log(this.$refs.subForm.$refs.form, '=========');
-        } else {
-          goOn = false;
-        }
-      });
+      this.$refs.subForm.$refs.form1 &&
+        this.$refs.subForm.$refs.form1.validate(valid => {
+          if (valid) {
+            // console.log(this.$refs.subForm.$refs.form, '=========');
+          } else {
+            goOn = false;
+          }
+        });
+      this.$refs.subForm.$refs.form &&
+        this.$refs.subForm.$refs.form.validate(valid => {
+          if (valid) {
+            // console.log(this.$refs.subForm.$refs.form, '=========');
+          } else {
+            goOn = false;
+          }
+        });
+      this.$refs.subForm.$refs.ruleForm &&
+        this.$refs.subForm.$refs.ruleForm.validate(valid => {
+          if (valid) {
+            // console.log(this.$refs.subForm.$refs.form, '=========');
+          } else {
+            goOn = false;
+          }
+        });
       this.$refs.outForm.validate(valid => {
         if (valid) {
           if (!goOn) return;

+ 2 - 1
src/components/icss/bill/Bill.vue

@@ -22,7 +22,8 @@
         <el-table-column :resizable="false" prop="conceptName" label="开单项目" show-overflow-tooltip></el-table-column>
         <el-table-column :resizable="false" prop="ruleType" label="规则类型" show-overflow-tooltip>
           <template slot-scope="scope">
-            <span>{{scope.row.ruleType === 1 ? '文本类型' : '数值类型'}}</span>
+            <span>{{scope.row.ruleType === 1 ? '文本类型' : ''}}</span>
+            <span>{{scope.row.ruleType === 2 ? '数值类型' : ''}}</span>
           </template>
         </el-table-column>
         <el-table-column :resizable="false" prop="relationStatus" label="状态" show-overflow-tooltip>

+ 1 - 1
src/components/icss/bill/ConditionForm1.vue

@@ -4,7 +4,7 @@
     <el-col :span="24" v-if="ruleType == 1">
       <el-form
         :model="form"
-        ref="form"
+        ref="form1"
         class="sub-form"
         :validate-on-rule-change="false"
         :rules="rules"