优化验证逻辑
This commit is contained in:
parent
4f60150d48
commit
ba20f9b800
@ -149,12 +149,11 @@
|
||||
// 新增档案
|
||||
async addArchives() {
|
||||
Toast('开发中')
|
||||
let flag = true;
|
||||
flag = this.$refs.districtSelectorRef.validate();
|
||||
if(flag) flag = this.$refs.residentsRef.validate();
|
||||
if(flag) flag = this.$refs.breedingRef.validate();
|
||||
if(flag) this.$refs.archives.validate().then(async (e) => {
|
||||
if (e) {
|
||||
let flag1 = this.$refs.districtSelectorRef.validate();
|
||||
let flag2 = this.$refs.residentsRef.validate();
|
||||
let flag3 = this.$refs.breedingRef.validate();
|
||||
this.$refs.archives.validate().then(async (e) => {
|
||||
if (e&&flag1&&flag2&&flag3) {
|
||||
uni.showLoading()
|
||||
let districtForm = {
|
||||
area_id:this.$refs.districtSelectorRef.formData.area,
|
||||
|
Loading…
x
Reference in New Issue
Block a user