From 3a8223b71d18205d40b894fd0b4c0fa1ca773e86 Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期一, 13 十一月 2023 10:44:11 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/mdc-test' into mdc-test

---
 src/views/eam/modules/inspectionProject/InspectionProjectModel.vue |   89 +++++++++++++++++++++++++-------------------
 1 files changed, 51 insertions(+), 38 deletions(-)

diff --git a/src/views/eam/modules/inspectionProject/InspectionProjectModel.vue b/src/views/eam/modules/inspectionProject/InspectionProjectModel.vue
index b397106..b78c688 100644
--- a/src/views/eam/modules/inspectionProject/InspectionProjectModel.vue
+++ b/src/views/eam/modules/inspectionProject/InspectionProjectModel.vue
@@ -29,7 +29,7 @@
               />
             </a-form-item>
           </a-col>
-        </a-row>
+          <!-- </a-row>
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item
@@ -39,12 +39,12 @@
             >
               <a-input
                 allow-clear
-                :disabled="codeDisable"
+                :disabled="disableSubmit"
                 :placeholder="disableSubmit?'':'璇疯緭鍏ョ偣妫�椤圭洰缂栧彿'"
                 v-decorator="['num', validatorRules.num ]"
               />
             </a-form-item>
-          </a-col>
+          </a-col> -->
           <a-col :span="12">
             <a-form-item
               label="鐐规椤圭洰鍚嶇О"
@@ -61,22 +61,7 @@
           </a-col>
         </a-row>
         <a-row :gutter="24">
-          <a-col :span="12">
-            <a-form-item
-              label="璁¢噺鍗曚綅"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-            >
-              <j-dict-select-tag
-                allow-clear
-                :disabled="disableSubmit"
-                :placeholder="disableSubmit?'':'璇烽�夋嫨璁¢噺鍗曚綅'"
-                :triggerChange="true"
-                dictCode="mom_base_unit,name,id,status!='0' and del_flag!='1'"
-                v-decorator="['unitId', validatorRules.unitId]"
-              />
-            </a-form-item>
-          </a-col>
+
           <a-col :span="12">
             <a-form-item
               label="妫�楠屽�肩被鍨�"
@@ -91,6 +76,23 @@
                 dictCode="test_value_type"
                 v-decorator="['testValueType', validatorRules.testValueType]"
                 @change="(e)=>handleChange(e)"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col
+            v-if="testValueType == '2'"
+            :span="12"
+          >
+            <a-form-item
+              label="妫�娴嬫爣鍑�"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <a-input
+                allow-clear
+                :disabled="disableSubmit"
+                :placeholder="disableSubmit?'':'璇疯緭鍏ユ娴嬫爣鍑�'"
+                v-decorator="['detectionStandard', validatorRules.detectionStandard ]"
               />
             </a-form-item>
           </a-col>
@@ -113,23 +115,7 @@
               />
             </a-form-item>
           </a-col> -->
-          <a-col
-            v-if="testValueType == '2'"
-            :span="12"
-          >
-            <a-form-item
-              label="寰呭畾"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-            >
-              <a-input
-                allow-clear
-                :disabled="disableSubmit"
-                :placeholder="disableSubmit?'':'璇疯緭鍏ュ緟瀹氬��'"
-                v-decorator="['surfaceValue1', validatorRules.surfaceValue1 ]"
-              />
-            </a-form-item>
-          </a-col>
+
           <a-col
             v-if="testValueType == '1'"
             :span="12"
@@ -203,6 +189,22 @@
           </a-col>
           <a-col :span="12">
             <a-form-item
+              label="璁¢噺鍗曚綅"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <j-dict-select-tag
+                allow-clear
+                :disabled="disableSubmit"
+                :placeholder="disableSubmit?'':'璇烽�夋嫨璁¢噺鍗曚綅'"
+                :triggerChange="true"
+                dictCode="mom_base_unit,name,id,status!='0' and del_flag!='1'"
+                v-decorator="['unitId', validatorRules.unitId]"
+              />
+            </a-form-item>
+          </a-col>
+          <!-- <a-col :span="12">
+            <a-form-item
               label="鐐规宸ュ叿"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
@@ -214,7 +216,7 @@
                 v-decorator="['inspectionTool', validatorRules.inspectionTool ]"
               />
             </a-form-item>
-          </a-col>
+          </a-col> -->
         </a-row>
 
         <a-row :gutter="24">
@@ -309,6 +311,12 @@
         //     { required: true, message: '璇烽�夋嫨鍒嗘瀽鏂规硶!' },
         //   ]
         // },
+        detectionStandard: {
+          rules: [
+            { required: true, message: '璇疯緭鍏ユ娴嬫爣鍑�!' },
+            // { validator: this.validateSurfaceValue },
+          ]
+        },
         surfaceValue: {
           rules: [
             { required: true, message: '璇疯緭鍏ュ悕涔夊��!' },
@@ -356,7 +364,7 @@
       this.testValueType = record.testValueType
       this.$nextTick(() => {
         this.form.setFieldsValue(pick(this.model, 'inspectionProjectCategoryNumName',
-          'num', 'name', 'unitId', 'testValueType', 'inspectionMethod', 'inspectionTool', 'remark'))
+          'num', 'name', 'unitId', 'detectionStandard', 'testValueType', 'inspectionMethod', 'inspectionTool', 'remark'))
       });
       if (record.testValueType == '1') {
         this.$nextTick(() => {
@@ -366,7 +374,12 @@
       if (record.id) {
         this.codeDisable = true;
       } else {
+        debugger
         this.codeDisable = false;
+        this.$nextTick(() => {
+          this.form.setFieldsValue({ "testValueType": '2' })
+          this.testValueType = '2'
+        });
       }
     },
 

--
Gitblit v1.9.3