首页修改

This commit is contained in:
魏啾
2024-05-08 19:37:19 +08:00
parent 56863dd624
commit 9d6e4bb57c
36 changed files with 1003 additions and 288 deletions

View File

@@ -37,6 +37,34 @@
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.code"
placeholder="请填写" data-key="mobile" /></view>
</view>
<view class="Box_box flex-between">
<view>办税人姓名</view>
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.taxname"
placeholder="请填写" data-key="mobile" /></view>
</view>
<view class="Box_box flex-between">
<view>办税人手机号码</view>
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.taxphone"
placeholder="请填写" data-key="mobile" /></view>
</view>
<view class="Box_box flex-between">
<view>验证码</view>
<view class="Box_box_input" style="display: flex; justify-content: flex-start;align-items: center;">
<input class="Box_box_inpuinputt" type="text" v-model="form.verification" placeholder="请填写"
data-key="mobile" />
<view class="repeats">
<view v-if="showText == true"
style="padding: 8rpx 0;background: #288EFB; border-radius: 15rpx;"
@tap="$u.debounce(CodeRegister, 500)">
{{ Recapture }}
</view>
<view v-else
style="color: #ccc; background-color: #f9f9f9; padding: 8rpx 0; border-radius: 15rpx;">
{{ second }}s重新发送
</view>
</view>
</view>
</view>
</view>
<view class="Box_box_T">
<view class="Box_box_T_o">请上传法人身份证图片</view>
@@ -62,9 +90,10 @@
</view>
</view>
<view class="preservation flex-colum">
<view v-if="form.status == '2'" style="width: 100%; color: #FF2B2B; padding: 28rpx 0;word-wrap: break-word;">
拒接原因:({{form.no|| ''}})</view>
<view v-if="disabled" class="preservation_boxs">审核中</view>
<!-- <view v-if="form.status == '2'"
style="width: 100%; color: #FF2B2B; padding: 28rpx 0;word-wrap: break-word;">
拒接原因:({{form.no|| '无'}})</view> -->
<view v-if="!codefailed" class="preservation_boxs">提交</view>
<view v-else class="preservation_box" @tap="$u.throttle(saveMerchantBaseInfoV2, 1000)">提交</view>
</view>
@@ -81,13 +110,19 @@
data() {
return {
showpicker: false,
disabled: true,
disabled: false,
Uploadurlnumber: '',
namelang: '',
merchantAuditStatus: '',
columns: [
],
codefailed: false, //验证码是否发送成功
store_id: '',
// 注册定时器 初始值
second: 60,
showText: true,
Recapture: '发送验证码',
form: {
store_id: uni.getStorageSync('userId'),
title: '',
@@ -108,11 +143,12 @@
onLoad(e) {
console.log(e.store)
let data = uni.getStorageSync('form')
if (data.status == '0') {
this.disabled = true
} else {
this.disabled = false
}
console.log(data)
// if (data.status == '0') {
// this.disabled = true
// } else {
// this.disabled = false
// }
if (data.phone) {
this.form.store_id = uni.getStorageSync('userId')
this.form.title = data.title
@@ -128,14 +164,155 @@
this.form.code = data.invitation
this.form.provinceno = data.provinceno
this.form.provinceno_name = data.provinceno_name
this.form.taxname = data.bsryxm
this.form.taxphone = data.taxphone
}
},
onShow() {
this.onShowdata()
},
methods: {
onShowdata(){
async CodeRegister() {
if (this.form.title == null || this.form.title == '') {
uni.showToast({
title: '请填写公司名字',
icon: 'none'
});
return false;
}
if (this.form.phone == null || this.form.phone == '') {
uni.showToast({
title: '请填写法人手机号',
icon: 'none'
});
return false;
}
if (this.form.legal_person_name == null || this.form.legal_person_name == '') {
uni.showToast({
title: '请填写法人姓名',
icon: 'none'
});
return false;
}
if (this.form.id_card_straight == null || this.form.id_card_straight == '') {
uni.showToast({
title: '请上传身份证人像面',
icon: 'none'
});
return false;
}
if (this.form.id_card_reverse == null || this.form.id_card_reverse == '') {
uni.showToast({
title: '请上传身份证国徽面',
icon: 'none'
});
return false;
}
if (this.form.business_license == null || this.form.business_license == '') {
uni.showToast({
title: '请上传营业执照',
icon: 'none'
});
return false;
}
if (this.form.provinceno == null || this.form.provinceno == '') {
uni.showToast({
title: '请选择省份编码',
icon: 'none'
});
return false;
}
if (this.form.code == null || this.form.code == '') {
uni.showToast({
title: '请填写邀请码',
icon: 'none'
});
return false;
}
if (this.form.dlzh == null || this.form.dlzh == '') {
uni.showToast({
title: '请填写电子税局账号',
icon: 'none'
});
return false;
}
if (this.form.dlmm == null || this.form.dlmm == '') {
uni.showToast({
title: '请填写电子税局账密码',
icon: 'none'
});
return false;
}
if (this.form.taxname == null || this.form.taxname == '') {
uni.showToast({
title: '请填写办税人姓名',
icon: 'none'
});
return false;
}
if (this.form.taxphone == null || this.form.taxphone == '') {
uni.showToast({
title: '请填写办税人手机号码',
icon: 'none'
});
return false;
}
let res = await this.api.invoicerregistrationszzpy(this.form)
if (res.code == 1) {
uni.showToast({
title: res.message || res.msg,
icon: "none",
})
// 定时器
this.showText = false;
this.Recapture = '重新获取';
var interval = setInterval(() => {
let times = --this.second;
this.second = times < 10 ? '0' + times : times; //小于10秒补 0
}, 1000);
setTimeout(() => {
clearInterval(interval);
this.second = 60;
this.showText = true;
}, 60000);
this.store_id = res.data.store_id
this.codefailed = true
}
},
async saveMerchantBaseInfoV2() {
if (this.form.verification == null || this.form.verification == '') {
uni.showToast({
title: '请填写验证码',
icon: 'none'
});
return false;
}
let res = await this.api.szzpysendverification({
code: this.form.verification,
store_id: this.store_id
})
if (res.code == 1) {
this.store_id = res.data.store_id
//请求数电授权
this.szzpyauthorization()
}
},
async szzpyauthorization() {
let res = await this.api.szzpyauthorization({
store_id: this.store_id
})
if (res.code == 1) {
setTimeout(() => {
uni.cache.set('form', '');
uni.reLaunch({
url: '/pages/index/index'
});
}, 2000);
}
},
onShowdata() {
uni.request({
url: uni.conf.baseUrl + 'szzpy/getprovinceno',
data: this.form,
@@ -188,6 +365,7 @@
myLoginName: uni.cache.get('myLoginName')
},
success: res => {
console.log(res)
var thisdata_ = JSON.parse(res.data);
uni.showToast({
title: '上传成功',
@@ -224,124 +402,7 @@
}
},
async saveMerchantBaseInfoV2() {
console.log(this.form)
if (this.form.title == null || this.form.title == '') {
uni.showToast({
title: '请填写公司名字',
icon: 'none'
});
return false;
}
if (this.form.phone == null || this.form.phone == '') {
uni.showToast({
title: '请填写法人手机号',
icon: 'none'
});
return false;
}
if (this.form.legal_person_name == null || this.form.legal_person_name == '') {
uni.showToast({
title: '请填写法人姓名',
icon: 'none'
});
return false;
}
if (this.form.id_card_straight == null || this.form.id_card_straight == '') {
uni.showToast({
title: '请上传身份证人像面',
icon: 'none'
});
return false;
}
if (this.form.id_card_reverse == null || this.form.id_card_reverse == '') {
uni.showToast({
title: '请上传身份证国徽面',
icon: 'none'
});
return false;
}
if (this.form.business_license == null || this.form.business_license == '') {
uni.showToast({
title: '请上传营业执照',
icon: 'none'
});
return false;
}
if (this.form.provinceno == null || this.form.provinceno == '') {
uni.showToast({
title: '请选择省份编码',
icon: 'none'
});
return false;
}
if (this.form.dlzh == null || this.form.dlzh == '') {
uni.showToast({
title: '请填写电子税局账号',
icon: 'none'
});
return false;
}
if (this.form.dlmm == null || this.form.dlmm == '') {
uni.showToast({
title: '请填写电子税局账密码',
icon: 'none'
});
return false;
}
if (this.form.code == null || this.form.code == '') {
uni.showToast({
title: '请填写邀请码',
icon: 'none'
});
return false;
}
// if (/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/ig
// .test(this.form.alias)) {
// uni.showToast({
// title: '请不要输入Emoji!!!',
// icon: 'none'
// });
// return false;
// }
uni.request({
url: uni.conf.baseUrl + 'store/storeinfo',
data: this.form,
method: 'POST', //请求方式,必须为大写
success: res => {
uni.showToast({
title: res.data.message || res.data.msg,
icon: 'none',
success: () => {
uni.pro.hideLoading();
}
});
if (res.data.code == 1) {
setTimeout(() => {
uni.cache.set('form','');
uni.reLaunch({
url: '/pages/index/index'
});
// uni.navigateBack();
}, 2000);
}
console.log(res)
// this.form = res.data.data
console.log('接口返回------', res);
},
fail(res) {
uni.showToast({
title: res.data.message || res.data.msg,
icon: 'none',
success: () => {
uni.pro.hideLoading();
}
});
}
});
}
}
};
</script>
@@ -365,7 +426,22 @@
color: #333333;
.Box_box_input {
position: relative;
width: 60%;
.Box_box_inpuinputt {
padding-right: 15rpx;
}
.repeats {
width: 280rpx;
text-align: center;
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #ffffff;
border-radius: 12rpx;
}
}
}
}