智慧农业后台管理页面
guoshilong
2022-10-24 ed837240f8d93432f1da05a4332658a90ceb117c
农资管理打开窗口表单重置;用户管理打开窗口移除验证
3 files modified
24 ■■■■ changed files
src/util/validate.js 7 ●●●●● patch | view | raw | blame | history
src/views/stock/stockmanage.vue 11 ●●●● patch | view | raw | blame | history
src/views/system/user.vue 6 ●●●●● patch | view | raw | blame | history
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}
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) {
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;