增加按钮状态不可点击

This commit is contained in:
魏啾
2024-12-26 17:48:45 +08:00
parent 374c561803
commit 6188622e7c
3 changed files with 24 additions and 8 deletions

View File

@@ -94,7 +94,8 @@
<u-icon name="weixin-fill" color="#04be02" size="28"></u-icon>
微信抬头一键导入
</view>
<view class="content_bottom" @click="saveMerchantBaseInfo">确定</view>
<view class="content_bottom" :style="disabled?'':'background:rgb(219 214 214);color: #666666;'"
@click="saveMerchantBaseInfo">确定</view>
</view>
</template>
@@ -110,6 +111,7 @@
data() {
return {
showtext: 0,
disabled: false,
subCategoryList: [],
form: {
user_type: 2,
@@ -163,6 +165,14 @@
this.showtitle = true
this.form.open_id = uni.cache.get('open_id')
// #endif
let RES = await this.api.checkqrcodestatus({
id: this.form.id
})
if (RES.code == 1) {
this.disabled = true
} else {
this.disabled = false
}
// 开票失败的回显
if (e.view_type == 'fail') {
this.form.view_type = e.view_type;
@@ -335,6 +345,9 @@
});
},
async saveMerchantBaseInfo() {
if (!this.disabled) {
return false;
}
if (this.form.user_name == null || this.form.user_name == '') {
uni.showToast({
title: '请输入名称',