修复bug
This commit is contained in:
parent
f1ed72008c
commit
83dd177a42
@ -143,7 +143,7 @@
|
|||||||
const item = value[i];
|
const item = value[i];
|
||||||
for (const key in item) {
|
for (const key in item) {
|
||||||
// 检查每个属性值是否为空
|
// 检查每个属性值是否为空
|
||||||
if (!item[key]) {
|
if (!item[key]&&item[key]!==0) {
|
||||||
callback(new Error('以上四项基本信息必填'));
|
callback(new Error('以上四项基本信息必填'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -243,49 +243,46 @@
|
|||||||
// let flag3 = await this.$refs.breedingRef.validate();
|
// let flag3 = await this.$refs.breedingRef.validate();
|
||||||
// let flag4 = await this.$refs.plantRef.validate();
|
// let flag4 = await this.$refs.plantRef.validate();
|
||||||
// return console.log(flag1);
|
// return console.log(flag1);
|
||||||
this.$refs.archives.validate().then(async (e) => {
|
await this.$refs.archives.validate();
|
||||||
if (e == true && flag2 == true) {
|
uni.showLoading({
|
||||||
uni.showLoading({
|
title: '登记中',
|
||||||
title: '登记中',
|
mask: true
|
||||||
mask: true
|
})
|
||||||
})
|
// let districtForm = {
|
||||||
// let districtForm = {
|
// area_id: this.$refs.districtSelectorRef.formData.area,
|
||||||
// area_id: this.$refs.districtSelectorRef.formData.area,
|
// street_id: this.$refs.districtSelectorRef.formData.street,
|
||||||
// street_id: this.$refs.districtSelectorRef.formData.street,
|
// village_id: this.$refs.districtSelectorRef.formData.village,
|
||||||
// village_id: this.$refs.districtSelectorRef.formData.village,
|
// brigade_id: this.$refs.districtSelectorRef.formData.brigade,
|
||||||
// brigade_id: this.$refs.districtSelectorRef.formData.brigade,
|
// }
|
||||||
// }
|
let res = await informationAdd({
|
||||||
let res = await informationAdd({
|
...this.formData,
|
||||||
...this.formData,
|
// ...districtForm,
|
||||||
// ...districtForm,
|
...this.$refs.residentsRef.residents,
|
||||||
...this.$refs.residentsRef.residents,
|
// datas: [{
|
||||||
datas: [{
|
// card_id: 32,
|
||||||
card_id: 32,
|
// datas: {
|
||||||
datas: {
|
// ...this.$refs.breedingRef.formData
|
||||||
...this.$refs.breedingRef.formData
|
// }
|
||||||
}
|
// },
|
||||||
},
|
// {
|
||||||
{
|
// card_id: 7,
|
||||||
card_id: 7,
|
// datas: {
|
||||||
datas: {
|
// ...this.$refs.plantRef.formData
|
||||||
...this.$refs.plantRef.formData
|
// }
|
||||||
}
|
// },
|
||||||
},
|
// ...refsDatas
|
||||||
...refsDatas
|
// ]
|
||||||
]
|
});
|
||||||
});
|
uni.hideLoading()
|
||||||
uni.hideLoading()
|
uni.showToast({
|
||||||
uni.showToast({
|
icon: "none",
|
||||||
icon: "none",
|
title: "添加成功",
|
||||||
title: "添加成功",
|
success: () => {
|
||||||
success: () => {
|
setTimeout(() => {
|
||||||
setTimeout(() => {
|
uni.navigateBack()
|
||||||
uni.navigateBack()
|
}, 1000)
|
||||||
}, 1000)
|
}
|
||||||
}
|
})
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
Toast('请填写完整信息')
|
Toast('请填写完整信息')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user