From 2ea9e5491c6ec4b38bb87d1b20c66ade4cf6f583 Mon Sep 17 00:00:00 2001 From: schry <2433098676@qq.com> Date: Tue, 11 Jul 2023 19:10:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=86=E7=A0=81=E4=BF=AE=E6=94=B9=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Navbar.vue | 58 ++++++++++++-------- src/views/basic/product/rel/UdiRlCompany.vue | 5 +- 2 files changed, 40 insertions(+), 23 deletions(-) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 018e4fc..d3cf2be 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -103,7 +103,7 @@ width="35%" v-if="isVisible" > - + @@ -119,7 +119,7 @@ - + - + - + - 修改密码 - 取消 + 修改密码 + 取消 @@ -187,15 +187,15 @@ import router from "@/router"; export default { data() { - let validatePass2 = (rule, value, callback) => { - if (value === "") { - callback(new Error("请再次输入密码")); - } else if (value !== this.inputQuery.passWord) { - callback(new Error("两次输入密码不一致!")); - } else { - callback(); - } - }; + // let validatePass2 = (rule, value, callback) => { + // if (value === "") { + // callback(new Error("请再次输入密码")); + // } else if (value !== this.inputQuery.passWord) { + // callback(new Error("两次输入密码不一致!")); + // } else { + // callback(); + // } + // }; return { inputQuery: { passWord: "", @@ -216,19 +216,25 @@ export default { locDeptCode: [ {required: true, message: "请选择当前部门", trigger: "blur"} ], - locInvCode: [ - {required: true, message: "请选择当前仓库", trigger: "blur"} + // locInvCode: [ + // {required: true, message: "请选择当前仓库", trigger: "blur"} + // ], + password: [{required: true, message: "请输入密码", trigger: "blur"}], + newPassword: [{required: true, message: "请输入密码", trigger: "blur"}], + confirmPassword: [ + {required: true, message: "请确认密码", trigger: "blur"}, + // {validator: validatePass2, trigger: "blur"}, ], - }, rules: { password: [{required: true, message: "请输入密码", trigger: "blur"}], + newPassword: [{required: true, message: "请输入密码", trigger: "blur"}], confirmPassword: [ {required: true, message: "请确认密码", trigger: "blur"}, - {validator: validatePass2, trigger: "blur"}, + // {validator: validatePass2, trigger: "blur"}, ], - }, + }; }, components: { @@ -265,8 +271,16 @@ export default { } }, methods: { - onSubmit(formName) { - this.$refs[formName].validate((valid) => { + onSubmit() { + if (this.inputQuery.newPassword != this.inputQuery.confirmPassword) { + this.$message.error("新密码与确认密码不一致!!!!"); + return + } + if (this.inputQuery.passWord == this.inputQuery.newPassword) { + this.$message.error("旧密码与新密码不能相同!!!!"); + return + } + this.$refs["dataForm"].validate((valid) => { if (valid) { this.loading = true; modifyPasswd(this.inputQuery).then((response) => { diff --git a/src/views/basic/product/rel/UdiRlCompany.vue b/src/views/basic/product/rel/UdiRlCompany.vue index 7fbf636..194c3ce 100644 --- a/src/views/basic/product/rel/UdiRlCompany.vue +++ b/src/views/basic/product/rel/UdiRlCompany.vue @@ -73,7 +73,7 @@ + border highlight-current-row @row-click="getCompanyId"> @@ -248,6 +248,9 @@ export default { }, methods: { + getCompanyId(row) { + this.filterQuery.companyIdFk = row.id; + }, onReset() { this.$router.push({ path: "",