From ed837240f8d93432f1da05a4332658a90ceb117c Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 24 Oct 2022 11:09:45 +0800
Subject: [PATCH] 农资管理打开窗口表单重置;用户管理打开窗口移除验证

---
 src/util/validate.js            |    7 +++++++
 src/views/stock/stockmanage.vue |   11 +++++++++--
 src/views/system/user.vue       |    6 ++++--
 3 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/src/util/validate.js b/src/util/validate.js
index 14cdc71..f4ca885 100644
--- a/src/util/validate.js
+++ b/src/util/validate.js
@@ -299,6 +299,12 @@
   }
 };
 
+/**
+ * 限制输入的数字长度
+ * @param rule
+ * @param value
+ * @param callback
+ */
 const limitNumLength = (rule, value, callback) => {
   if (rule.required) {
     if (value) {
@@ -322,4 +328,5 @@
     }
   }
 }
+
   export {limitNumInt,limitNumLength}
diff --git a/src/views/stock/stockmanage.vue b/src/views/stock/stockmanage.vue
index 1c55f52..2813ea2 100644
--- a/src/views/stock/stockmanage.vue
+++ b/src/views/stock/stockmanage.vue
@@ -871,6 +871,10 @@
     ,
 // 往入库页面填充数据
     modifiedGrades(row) {
+      this.gradeBoxVisible = true;
+      this.$nextTick(()=>{
+        this.$refs.formR.resetForm()
+      })
       this.formR = {
         id: null,
         stockId1: row.stockId,
@@ -885,14 +889,18 @@
         sid: row.id,
       };
       this.formTemp = this.formR
-      this.gradeBoxVisible = true;
     }
     ,
     mod(row) {
+      this.formK = {}
       this.gradec = true;
     }
     ,
     modifiedGrades1(row) {
+      this.gradeBoxVisible1 = true;
+      this.$nextTick(()=>{
+        this.$refs.formC.resetForm()
+      })
       this.formC = {
         id: null,
         stockId1: row.stockId,
@@ -907,7 +915,6 @@
         sid: row.id,
       };
       this.formTemp = this.formC
-      this.gradeBoxVisible1 = true;
     }
     ,
     rowSave(row, done, loading) {
diff --git a/src/views/system/user.vue b/src/views/system/user.vue
index 63e6c14..a14cc6a 100644
--- a/src/views/system/user.vue
+++ b/src/views/system/user.vue
@@ -225,7 +225,6 @@
   import {dateNow} from "@/util/date";
   import NProgress from 'nprogress';
   import 'nprogress/nprogress.css';
-
   export default {
     data() {
       const validatePass = (rule, value, callback) => {
@@ -898,6 +897,10 @@
         });
       },
       update(row){
+        this.dialogVisible = true
+        this.$nextTick(()=>{
+          this.$refs.form.clearValidate()
+        })
         this.form = {
           id:row.id,
           account:row.account,
@@ -914,7 +917,6 @@
         var password2Column = this.findObject(this.option.group,"password2")
         passwordColumn.display = false;
         password2Column.display = false;
-        this.dialogVisible = true
       },
       submitUpdate(row, done, loading){
         this.form['deptId'] = this.userInfo.dept_id;

--
Gitblit v1.9.3