新增确认框

This commit is contained in:
weipengfei 2023-09-08 11:45:29 +08:00
parent d66f376091
commit 90c80e57cc

View File

@ -287,9 +287,11 @@
</u-upload> </u-upload>
</u-form-item> --> </u-form-item> -->
</u--form> </u--form>
<button @click="$u.throttle(addAcountNum, 2000)" type="primary" class="btn" <button @click="modelShow=true" type="primary" class="btn"
style="margin: 28rpx;">创建</button> style="margin: 28rpx;">创建</button>
</view> </view>
<u-modal :show="modelShow" title="提示" content='请确认人员信息无误后再创建' closeOnClickOverlay showCancelButton
@close="modelShow=false" @cancel="modelShow=false" @confirm="$u.throttle(addAcountNum, 2000)"></u-modal>
</view> </view>
</template> </template>
@ -312,6 +314,7 @@
}, },
data() { data() {
return { return {
modelShow: false,
formData: { formData: {
account: '', // account: '', //
password: '123456', // password: '123456', //
@ -431,7 +434,9 @@
}) })
}, },
// //
addAcountNum() { async addAcountNum() {
this.modelShow = false;
await this.$nextTick();
if (!this.formData.avatar) return Toast('头像未上传'); if (!this.formData.avatar) return Toast('头像未上传');
let flag = this.$refs.districtSelectorRef.validate(); let flag = this.$refs.districtSelectorRef.validate();
if (!this.formData.qualification.id_card || !this.formData.qualification.id_card_b) return Toast('身份证未上传'); if (!this.formData.qualification.id_card || !this.formData.qualification.id_card_b) return Toast('身份证未上传');