This commit is contained in:
魏啾
2024-11-23 13:55:01 +08:00
parent 2147f86b93
commit bfd37cddf5
18 changed files with 1237 additions and 350 deletions

View File

@@ -201,6 +201,7 @@
background: #FFFFFF;
.contentboxitemtop {
flex-wrap: nowrap;
padding-bottom: 18rpx;
border-bottom: 1rpx solid #E3E3E3;

View File

@@ -16,6 +16,11 @@
</view>
</view>
<view
style="margin-top:80rpx;text-align: center;color:#3088fd;position: fixed; bottom:40rpx;left: 50%;transform: translate(-50%,-50%);"
@click="qushangjia()">
我是商家
</view>
</view>
<view class="Box flex-between" v-if="restype == 1 && improveinformation">
<view class="content flex-colum" @click="merchantindex" v-if="store_status == 2">
@@ -48,6 +53,14 @@
<button class="btn">打开小程序</button>
</script>
</wx-open-launch-weapp> -->
<view class="flex-colum"
style=" width: 100%;margin-top:80rpx;text-align: center;position: fixed; font-size:24rpx; bottom:40rpx;left: 50%;transform: translate(-50%,-50%);padding: 0 40rpx;">
<text>{{improveinformationform.store.title}}</text>
<text v-if="improveinformationform.is_tax == 1"
style="margin-top:20rpx;text-align: center;color:#3088fd;margin-left: 10rpx;"
@click="clickswitch()">切换商户</text>
</view>
</view>
<!-- <view class="setClipboardDataclass" @click="setClipboardData" v-if="infos.deviceType != 'pc'">
网页版地址:https://h5-invoice.sxczgkj.cn
@@ -77,121 +90,99 @@
onLoaduserId: '',
infos: uni.getSystemInfoSync(),
store_status: uni.cache.get('store_status'),
list: [{
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item2.png',
name: '后台管理',
show: true,
text: 'houtai',
url: 'electric/index',
type: 2 //1是内链 2是外链 类型
},
{
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item1.png',
name: '开票记录',
show: true,
text: 'jilu',
url: 'electric/index',
type: 1 //1是内链 2是外链 类型
}, {
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item6.png',
name: '绑定通知',
show: true,
text: 'tongzhi',
url: 'electric/index',
type: 1 //1是内链 2是外链 类型
}, {
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item5.png',
name: '开票员列表',
show: true,
text: 'kaipiaoyuan',
url: 'electric/index',
type: 1 //1是内链 2是外链 类型
}, {
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item7.png',
name: '开票码',
show: true,
text: 'kaipiaoma',
url: 'electric/index',
type: 1 //1是内链 2是外链 类型
}, {
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item8.png',
name: '审核开票',
show: true,
text: 'shenhe',
url: 'electric/index',
type: 1 //1是内链 2是外链 类型
}, {
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item10.png',
name: '退出登录',
show: true,
text: 'tuchu',
url: 'electric/index',
type: 3 //1是内链 2是外链 3退出 类型
list: [],
is_k_list: '', // 开票员列表 1 显示 2不显示
improveinformationform: {
is_tax: '',
store: {
title: ''
}
]
}
};
},
async onLoad(e) {
await this.$onLaunched;
// #ifdef MP-WEIXIN
// 判断商家还是个体
let restype = await this.api.judgeuseridentity({
open_id: uni.cache.get('open_id') //临时登录凭证
})
console.log(restype.data)
this.restype = restype.data.type
if (this.restype == 1 && !uni.getStorageSync('logintoken')) {
uni.reLaunch({
url: '/pages/login/login'
})
return false;
}
// #endif
// // #ifdef MP-WEIXIN
// // 判断商家还是个体
// let restype = await this.api.judgeuseridentity({
// open_id: uni.cache.get('open_id') //临时登录凭证
// })
// console.log(restype.data)
// this.restype = restype.data.type
// if (this.restype == 1 && !uni.getStorageSync('logintoken')) {
// uni.reLaunch({
// url: '/pages/login/login'
// })
// return false;
// }
// // #endif
try {
if (e.userId) {
uni.cache.set('Type', e.type);
uni.cache.set('userId', e.userId);
// 传参进来肯定是极速开票固然store_status=1
uni.cache.set('store_status', 1);
if (e.restype) {
this.restype = e.restype
}
} catch (e) {
//TODO handle the exception
}
// 总?
let token = await this.api.h5encryption({
store_id: uni.cache.get('userId')
})
if (token.code == 1) {
uni.cache.set('token', token.data.token);
}
let res = await this.api.storestorestatus({
store_id: uni.cache.get('userId')
})
if (res.code == 1 && uni.cache.get('store_status') == 1) {
this.improveinformationform = res.data.store
uni.cache.set('form', this.improveinformationform);
if (res.data.sz_status == 0) {
uni.reLaunch({
url: '/pages/index/information'
});
// try {
// if (e.userId) {
// uni.cache.set('Type', e.type);
// uni.cache.set('userId', e.userId);
// // 传参进来肯定是极速开票固然store_status=1
// uni.cache.set('store_status', 1);
// }
// } catch (e) {
// //TODO handle the exception
// }
if (this.restype == 1) {
if (uni.cache.get('userId')) {
// 总?
let token = await this.api.h5encryption({
store_id: uni.cache.get('userId')
})
if (token.code == 1) {
uni.cache.set('token', token.data.token);
}
let res = await this.api.storestorestatus({
store_id: uni.cache.get('userId')
})
// try {
// this.is_k_list = res.data.is_k_list
// } catch (e) {
// //TODO handle the exception
// }
if (res.code == 1 && uni.cache.get('store_status') == 1) {
this.improveinformationform = res.data
uni.cache.set('form', this.improveinformationform);
if (res.data.sz_status == 0) {
uni.reLaunch({
url: '/pages/index/information'
});
} else {
this.improveinformation = true
}
} else {
// 这是固定开票的判断
if (res.data.status == 4) { //如果极速开票和固定开票共存的情况下 直接跳转到极速开票的上传信息
this.improveinformation = true
return false
} else {
if (res.data.status == -1 || res.data.status == 2 || res.data.status == 0) {
uni.pro.navigateTo('merchant/information', res.data.store);
} else {
uni.pro.navigateTo('merchant/index');
}
}
}
} else {
this.improveinformation = true
uni.reLaunch({
url: '/pages/login/login'
});
}
} else {
// 这是固定开票的判断
if (res.data.status == 4) { //如果极速开票和固定开票共存的情况下 直接跳转到极速开票的上传信息
this.improveinformation = true
return false
} else {
if (res.data.status == -1 || res.data.status == 2 || res.data.status == 0) {
uni.pro.navigateTo('merchant/information', res.data.store);
} else {
uni.pro.navigateTo('merchant/index');
}
}
this.restype == 2
}
},
// 监听跳转
handleLaunch() {
@@ -304,6 +295,11 @@
success: function() {}
});
},
clickswitch() {
uni.navigateTo({
url: '/pages/login/switch'
})
},
// 跳转
async clickcontent(item) {
switch (item.type) {
@@ -335,6 +331,23 @@
break;
}
},
qushangjia() {
uni.showModal({
title: '提示',
content: '确定去商家开票系统吗?',
success: (res) => {
if (res.confirm) {
uni.removeStorageSync('logintoken');
uni.removeStorageSync('token');
uni.reLaunch({
url: '/pages/login/login'
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
},
auditbilling() {
uni.pro.navigateTo('index/auditbilling');
},
@@ -348,7 +361,7 @@
uni.pro.navigateTo('index/merchant');
},
information() {
uni.pro.navigateTo('index/information', this.improveinformationform);
uni.pro.navigateTo('index/information', this.improveinformationform.store);
},
notification() {
uni.pro.navigateTo('index/notification');

View File

@@ -12,7 +12,7 @@
<view class="content_boxtoptow" v-if="datalsit.status == 4">已作废</view>
</view>
<view class="content_boxt_one">
<view class="content_boxt_oneone" v-if="datalsit.status == 2">
<view class="content_boxt_oneone" v-if="datalsit.string2">
{{ datalsit.string2 }}
</view>
<view class="classvie_item flex-start" v-if="datalsit.status == 2 || datalsit.status == 4">
@@ -36,6 +36,14 @@
<text class="classvie_itemone">项目名称</text>
<text class="classvie_itemtow">{{ datalsit.article }}</text>
</view>
<view class="classvie_item flex-start" v-if="datalsit.email">
<text class="classvie_itemone">邮箱</text>
<text class="classvie_itemtow">{{ datalsit.email }}</text>
</view>
<view class="classvie_item flex-start" v-if="datalsit.mobile">
<text class="classvie_itemone">手机号</text>
<text class="classvie_itemtow">{{ datalsit.mobile }}</text>
</view>
<view class="classvie_item flex-start">
<text class="classvie_itemone">开票时间</text>
<text class="classvie_itemtow">{{ datalsit.createtime }}</text>

View File

@@ -28,7 +28,7 @@
</view>
</view>
<view class="content_boxt_one">
<view class="content_boxt_oneone" v-if="datalsit.status == 2">
<view class="content_boxt_oneone" v-if="datalsit.status == 2 && datalsit.string2">
{{datalsit.string2}}
</view>
<view class="classvie_item flex-start" v-if="datalsit.status == 2 || datalsit.status == 4">

View File

@@ -22,7 +22,7 @@
</view>
</view>
<view class="content_boxt_one">
<view class="content_boxt_oneone" v-if="datalsit.status == 2">
<view class="content_boxt_oneone" v-if="datalsit.string2">
{{datalsit.string2}}
</view>
<view class="classvie_item flex-start" v-if="datalsit.status == 2 || datalsit.status == 4">
@@ -46,12 +46,20 @@
<text class="classvie_itemone">项目名称</text>
<text class="classvie_itemtow">{{datalsit.article}}</text>
</view>
<view class="classvie_item flex-start" v-if="datalsit.email">
<text class="classvie_itemone">邮箱</text>
<text class="classvie_itemtow">{{ datalsit.email }}</text>
</view>
<view class="classvie_item flex-start" v-if="datalsit.mobile">
<text class="classvie_itemone">手机号</text>
<text class="classvie_itemtow">{{ datalsit.mobile }}</text>
</view>
<view class="classvie_item flex-start">
<text class="classvie_itemone">开票时间</text>
<text class="classvie_itemtow">{{datalsit.createtime}}</text>
</view>
</view>
<view class="content_boxt_tow">
<view class="content_boxt_tow" v-if="datalsit.url">
<view class="content_boxt_towtext">
微信扫一扫即可开票
</view>