3、修改报名人信息的按钮逻辑显示

This commit is contained in:
wangzimeng 2025-08-12 14:10:28 +08:00
parent aa6d9a2c1b
commit 40791d9ce8

View File

@ -38,7 +38,7 @@
</view> </view>
<view style="width: 75%;"> <view style="width: 75%;">
<input :cursor-spacing="300" type="text" placeholder="请填写真实姓名" class="input" <input :cursor-spacing="300" type="text" placeholder="请填写真实姓名" class="input"
v-model="form.name" /> v-model="form.name" @confirm="checkFormValidity"/>
</view> </view>
</view> </view>
<view style="height: 1px;background-color: #eeeeee;width: 100%;margin-top: 20rpx;"></view> <view style="height: 1px;background-color: #eeeeee;width: 100%;margin-top: 20rpx;"></view>
@ -48,7 +48,7 @@
</view> </view>
<view style="width: 75%;"> <view style="width: 75%;">
<input :cursor-spacing="300" type="idcard" placeholder="请填写身份证号" class="input" <input :cursor-spacing="300" type="idcard" placeholder="请填写身份证号" class="input"
v-model="form.idnum" /> v-model="form.idnum" @confirm="checkFormValidity"/>
</view> </view>
</view> </view>
<view style="height: 1px;background-color: #eeeeee;width: 100%;"></view> <view style="height: 1px;background-color: #eeeeee;width: 100%;"></view>
@ -58,7 +58,7 @@
</view> </view>
<view style="width: 75%;"> <view style="width: 75%;">
<input :cursor-spacing="300" type="number" placeholder="请填写手机号" class="input" <input :cursor-spacing="300" type="number" placeholder="请填写手机号" class="input"
v-model="form.mobile" /> v-model="form.mobile" @confirm="checkFormValidity"/>
</view> </view>
</view> </view>
<view style="height: 1px;background-color: #eeeeee;width: 100%;"></view> <view style="height: 1px;background-color: #eeeeee;width: 100%;"></view>
@ -79,7 +79,7 @@
</view> </view>
</view> </view>
<view style="margin-top: 40rpx;"> <view style="margin-top: 40rpx;">
<view class="btn_1" @click="save" v-if="form.name != '' && form.idnum != '' && form.mobile != ''">确认 <view class="btn_1" v-if="btnShow == true" @click="save">确认
</view> </view>
<view class="btn_3" v-else @click="unSave">确认</view> <view class="btn_3" v-else @click="unSave">确认</view>
</view> </view>
@ -92,6 +92,7 @@
data() { data() {
return { return {
privacyShow: false, privacyShow: false,
btnShow: false,
show: false, show: false,
form: { form: {
name: '', name: '',
@ -101,18 +102,36 @@
isAdd: 1, isAdd: 1,
list: [] list: []
} }
},
watch() {
}, },
onLoad() { onLoad() {
this.getList() this.getList()
}, },
methods: { methods: {
checkFormValidity() {
console.log('checkFormValidity?',this.form);
if(this.form.name.length > 0 && this.form.idnum.length > 0 && this.form.mobile.length > 0 ) {
console.log('true?');
this.btnShow = true;
}
console.log('btnShow', this.btnShow);
},
edit(item) { edit(item) {
this.isAdd = 0; this.isAdd = 0;
this.form.name = item.name; this.form.name = item.name;
this.form.idnum = item.idnum; this.form.idnum = item.idnum;
this.form.ids = item.id; this.form.ids = item.id;
this.form.mobile = item.mobile; this.form.mobile = item.mobile;
this.form.open = item.open;
this.show = true; this.show = true;
if(this.form.open == 0) {
this.privacyShow = true;
}else {
this.privacyShow = false;
}
this.checkFormValidity();
}, },
del(item) { del(item) {
var that = this; var that = this;