From eb48d3bada053e26def2a94d46dbe115a5a7bb2f Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期六, 18 十一月 2023 16:46:18 +0800
Subject: [PATCH] 问题项修改

---
 src/views/eam/modules/inspectionProject/InspectionProjectModel.vue |  239 +++++++++++++++++++++++++++++------------------------------
 1 files changed, 118 insertions(+), 121 deletions(-)

diff --git a/src/views/eam/modules/inspectionProject/InspectionProjectModel.vue b/src/views/eam/modules/inspectionProject/InspectionProjectModel.vue
index b78c688..196cf8c 100644
--- a/src/views/eam/modules/inspectionProject/InspectionProjectModel.vue
+++ b/src/views/eam/modules/inspectionProject/InspectionProjectModel.vue
@@ -62,7 +62,7 @@
         </a-row>
         <a-row :gutter="24">
 
-          <a-col :span="12">
+          <!-- <a-col :span="12">
             <a-form-item
               label="妫�楠屽�肩被鍨�"
               :labelCol="labelCol"
@@ -78,11 +78,9 @@
                 @change="(e)=>handleChange(e)"
               />
             </a-form-item>
-          </a-col>
-          <a-col
-            v-if="testValueType == '2'"
-            :span="12"
-          >
+          </a-col> -->
+          <a-col :span="12">
+            <!-- v-if="testValueType == '2'" -->
             <a-form-item
               label="妫�娴嬫爣鍑�"
               :labelCol="labelCol"
@@ -116,7 +114,7 @@
             </a-form-item>
           </a-col> -->
 
-          <a-col
+          <!-- <a-col
             v-if="testValueType == '1'"
             :span="12"
           >
@@ -133,9 +131,9 @@
                 v-decorator="['surfaceValue', validatorRules.surfaceValue ]"
               />
             </a-form-item>
-          </a-col>
+          </a-col> -->
         </a-row>
-        <a-row
+        <!-- <a-row
           v-if="testValueType == '1'"
           :gutter="24"
         >
@@ -169,8 +167,8 @@
               />
             </a-form-item>
           </a-col>
-        </a-row>
-        <a-row :gutter="24">
+        </a-row> -->
+        <!-- <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item
               label="鐐规鏂规硶"
@@ -202,8 +200,8 @@
                 v-decorator="['unitId', validatorRules.unitId]"
               />
             </a-form-item>
-          </a-col>
-          <!-- <a-col :span="12">
+          </a-col> -->
+        <!-- <a-col :span="12">
             <a-form-item
               label="鐐规宸ュ叿"
               :labelCol="labelCol"
@@ -217,7 +215,7 @@
               />
             </a-form-item>
           </a-col> -->
-        </a-row>
+        <!-- </a-row> -->
 
         <a-row :gutter="24">
           <a-col :span="24">
@@ -246,13 +244,13 @@
       >
         鍏抽棴
       </a-button>
-      <a-button
+      <!-- <a-button
         v-if="!this.model.id"
         :disabled="disableSubmit || confirmLoading"
         :loading="confirmLoading"
         @click="handleOkAndAdd"
         type="primary"
-      >淇濆瓨骞剁户缁柊澧�</a-button>
+      >淇濆瓨骞剁户缁柊澧�</a-button> -->
       <a-button
         :disabled="disableSubmit || confirmLoading"
         :loading="confirmLoading"
@@ -361,25 +359,24 @@
       this.model = Object.assign({}, record);
       this.visible = true;
       this.disableSubmit = false;
-      this.testValueType = record.testValueType
+      // this.testValueType = record.testValueType
       this.$nextTick(() => {
         this.form.setFieldsValue(pick(this.model, 'inspectionProjectCategoryNumName',
-          'num', 'name', 'unitId', 'detectionStandard', 'testValueType', 'inspectionMethod', 'inspectionTool', 'remark'))
+          'name', 'detectionStandard', 'remark'))
       });
-      if (record.testValueType == '1') {
-        this.$nextTick(() => {
-          this.form.setFieldsValue(pick(this.model, 'surfaceValue', 'upValue', 'downValue'))
-        });
-      }
+      // if (record.testValueType == '1') {
+      //   this.$nextTick(() => {
+      //     this.form.setFieldsValue(pick(this.model, 'surfaceValue', 'upValue', 'downValue'))
+      //   });
+      // }
       if (record.id) {
         this.codeDisable = true;
       } else {
-        debugger
         this.codeDisable = false;
-        this.$nextTick(() => {
-          this.form.setFieldsValue({ "testValueType": '2' })
-          this.testValueType = '2'
-        });
+        // this.$nextTick(() => {
+        //   this.form.setFieldsValue({ "testValueType": '2' })
+        //   this.testValueType = '2'
+        // });
       }
     },
 
@@ -391,32 +388,32 @@
 
 
     //淇濆瓨骞舵柊澧炴寜閽Е鍙�
-    handleOkAndAdd() {
-      const that = this
-      // 瑙﹀彂琛ㄥ崟楠岃瘉
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          that.confirmLoading = true;
-          let formData = Object.assign(this.model, values);
-          formData.inspectionProjectCategoryId = this.inspectionProjectCategoryId
-          postAction(this.url.add, formData).then((res) => {
-            if (res.success) {
-              that.$message.success(res.message);
-              that.$emit('ok');
-              that.alterFlag = new Date();
-            } else {
-              that.$message.warning(res.message);
-            }
-          }).finally(() => {
-            this.confirmLoading = false
-            this.form.setFieldsValue(pick(this.model, 'inspectionProjectCategoryNumName'))
-            this.form.setFieldsValue({ "inspectionContent": null, "inspectionRequire": null, "inspectionMethod": null, "inspectionTool": null, "num": null, "name": null, "remark": null })
-          })
-        } else {
-          return false
-        }
-      })
-    },
+    // handleOkAndAdd() {
+    //   const that = this
+    //   // 瑙﹀彂琛ㄥ崟楠岃瘉
+    //   this.form.validateFields((err, values) => {
+    //     if (!err) {
+    //       that.confirmLoading = true;
+    //       let formData = Object.assign(this.model, values);
+    //       formData.inspectionProjectCategoryId = this.inspectionProjectCategoryId
+    //       postAction(this.url.add, formData).then((res) => {
+    //         if (res.success) {
+    //           that.$message.success(res.message);
+    //           that.$emit('ok');
+    //           that.alterFlag = new Date();
+    //         } else {
+    //           that.$message.warning(res.message);
+    //         }
+    //       }).finally(() => {
+    //         this.confirmLoading = false
+    //         this.form.setFieldsValue(pick(this.model, 'inspectionProjectCategoryNumName'))
+    //         this.form.setFieldsValue({ "inspectionContent": null, "inspectionRequire": null, "inspectionMethod": null, "inspectionTool": null, "num": null, "name": null, "remark": null })
+    //       })
+    //     } else {
+    //       return false
+    //     }
+    //   })
+    // },
 
     handleOk() {
       const that = this;
@@ -452,79 +449,79 @@
       this.close()
     },
 
-    handleChange(val) {
-      this.testValueType = val
-    },
+    // handleChange(val) {
+    //   this.testValueType = val
+    // },
 
-    validateDownValue(rule, value, callback) {
-      let data = this.form.getFieldsValue(['surfaceValue']);
-      if (data.surfaceValue == null || data.surfaceValue == "") {
-        callback('鍚嶄箟鍊间笉鑳戒负绌猴紒')
-      } else {
-        if (value > data.surfaceValue) {
-          callback('涓嬪亸宸�间笉鑳藉ぇ浜庡悕涔夊�硷紒')
-        } else {
-          callback()
-        }
-      }
-    },
+    // validateDownValue(rule, value, callback) {
+    //   let data = this.form.getFieldsValue(['surfaceValue']);
+    //   if (data.surfaceValue == null || data.surfaceValue == "") {
+    //     callback('鍚嶄箟鍊间笉鑳戒负绌猴紒')
+    //   } else {
+    //     if (value > data.surfaceValue) {
+    //       callback('涓嬪亸宸�间笉鑳藉ぇ浜庡悕涔夊�硷紒')
+    //     } else {
+    //       callback()
+    //     }
+    //   }
+    // },
 
-    validateSurfaceValue(rule, value, callback) {
-      this.form.setFieldsValue({ "upValue": null, "downValue": null })
-      // let data = this.form.getFieldsValue(['surfaceValue']);
-      // if (value > data.surfaceValue) {
-      //   callback('涓嶅悎鏍兼暟閲忓簲灏忎簬妫�楠屾暟閲忥紒')
-      // } else {
-      //   callback()
-      // }
-    },
+    // validateSurfaceValue(rule, value, callback) {
+    //   this.form.setFieldsValue({ "upValue": null, "downValue": null })
+    //   // let data = this.form.getFieldsValue(['surfaceValue']);
+    //   // if (value > data.surfaceValue) {
+    //   //   callback('涓嶅悎鏍兼暟閲忓簲灏忎簬妫�楠屾暟閲忥紒')
+    //   // } else {
+    //   //   callback()
+    //   // }
+    // },
 
-    validateAnalysisMethod(rule, value, callback) {
-      let data = this.form.getFieldsValue(['surfaceValue']);
-      if (value > data.surfaceValue) {
-        callback('涓嶅悎鏍兼暟閲忓簲灏忎簬妫�楠屾暟閲忥紒')
-      } else {
-        callback()
-      }
-    },
+    // validateAnalysisMethod(rule, value, callback) {
+    //   let data = this.form.getFieldsValue(['surfaceValue']);
+    //   if (value > data.surfaceValue) {
+    //     callback('涓嶅悎鏍兼暟閲忓簲灏忎簬妫�楠屾暟閲忥紒')
+    //   } else {
+    //     callback()
+    //   }
+    // },
 
     //楠岃瘉 缂栧彿
-    validateNum(rule, value, callback) {
-      var params = {
-        tableName: 'mom_eam_inspection_project',
-        fieldName: 'num',
-        fieldVal: value,
-        dataId: this.model.id,
-        //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
-        delFlag: '0',
-      };
-      duplicateCheck(params).then((res) => {
-        if (res.success) {
-          callback();
-        } else {
-          callback("缂栧彿宸插瓨鍦�!");
-        }
-      })
-    },
+    // validateNum(rule, value, callback) {
+    //   var params = {
+    //     tableName: 'mom_eam_inspection_project',
+    //     fieldName: 'num',
+    //     fieldVal: value,
+    //     dataId: this.model.id,
+    //     //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
+    //     delFlag: '0',
+    //   };
+    //   duplicateCheck(params).then((res) => {
+    //     if (res.success) {
+    //       callback();
+    //     } else {
+    //       callback("缂栧彿宸插瓨鍦�!");
+    //     }
+    //   })
+    // },
 
-    //楠岃瘉 鍚嶇О
-    validateName(rule, value, callback) {
-      var params = {
-        tableName: 'mom_eam_inspection_project',
-        fieldName: 'name',
-        fieldVal: value,
-        dataId: this.model.id,
-        //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
-        delFlag: '0',
-      };
-      duplicateCheck(params).then((res) => {
-        if (res.success) {
-          callback();
-        } else {
-          callback("鍚嶇О宸插瓨鍦�!");
-        }
-      })
-    },
+    // //楠岃瘉 鍚嶇О
+    // validateName(rule, value, callback) {
+    //   var params = {
+    //     tableName: 'mom_eam_inspection_project',
+    //     fieldName: 'name',
+    //     fieldVal: value,
+    //     dataId: this.model.id,
+    //     //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
+    //     delFlag: '0',
+    //   };
+    //   duplicateCheck(params).then((res) => {
+    //     if (res.success) {
+    //       callback();
+    //     } else {
+    //       callback("鍚嶇О宸插瓨鍦�!");
+    //     }
+    //   })
+    // },
 
   },
   watch: {

--
Gitblit v1.9.3