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

@@ -48,6 +48,12 @@
</view>
<u-popup :show="canvasshow" @close="canvasshow = !canvasshow" mode="center" :round="14">
<view class="messagebox">
<view class="flex-center tabs">
<text :class="accountqrcodetype == 1?'tabsselect':''"
@click="accountqrcodetype=1,accountqrcode()">电子税务局</text>
<text :class="accountqrcodetype == 2?'tabsselect':''"
@click="accountqrcodetype=2,accountqrcode()">个人所得税</text>
</view>
<view style="text-align: center; margin: 16rpx;">
{{formCode.text}}
</view>
@@ -90,9 +96,10 @@
<u-popup :show="showpopup" @close="showpopup = !showpopup" mode="center" :round="14">
<view class="popupbox">
<view class="popupboxtop">
开票人登记信息
<u-icon style="position: absolute;right:22rpx;top: 40rpx; " name="close" color="#999999"
@click="showpopup = false" size="20"></u-icon>
<text>开票人登记信息</text>
<view style="position: absolute;right:22rpx;top: 40rpx; ">
<u-icon name="close" color="#999999" @click="showpopup = false" size="20"></u-icon>
</view>
</view>
<view class="popupboxform">
<view class="addshowboxinput flex-colum-start" @click="selectshowlslbs = !selectshowlslbs">
@@ -190,8 +197,9 @@
regionshow: false, //省份显示
// 注册定时器 初始值
second: 60,
showText: true,
showText: false,
Recapture: '发送验证码',
accountqrcodetype: 1,
form: {
user_name: '',
time: "",
@@ -202,8 +210,6 @@
},
addform: {},
region: [], //省份
}
},
async onLoad() {
@@ -281,6 +287,7 @@
// 人脸前获取验证码
async accountqrcode() {
let res = await this.api.accountqrcode({
type: this.accountqrcodetype,
id: this.loginid
})
if (res.data.url) {
@@ -609,6 +616,24 @@
border-radius: 24rpx 24rpx 24rpx 24rpx;
padding: 28rpx 32rpx;
.tabs {
text {
margin-left: 10rpx;
font-size: 34rpx;
text-align: center;
margin: 16rpx;
}
text:nth-child(1) {
margin-left: 0;
}
.tabsselect {
color: #318afe;
font-weight: bold;
}
}
.messageboxtop {
padding: 10rpx 0;
font-family: Source Han Sans CN, Source Han Sans CN;

View File

@@ -81,6 +81,14 @@
<text>开票税额</text>
<text>{{details.tax_amount}}</text>
</view>
<view class="detailsclassboxitem" v-if="details.email">
<text>邮箱</text>
<text>{{details.email}}</text>
</view>
<view class="detailsclassboxitem" v-if="details.mobile">
<text>手机号</text>
<text>{{details.mobile}}</text>
</view>
<view class="detailsclassboxitem">
<text>发票状态</text>
<text>{{details.status}}</text>
@@ -92,15 +100,15 @@
<view class="detailsclassbox" v-if="details.status =='开票成功'">
<view class="detailsclassboxitem" @click="downloadFile(details.pdfUrl)">
<text>PDF版式文件</text>
<text>下载</text>
<text style="color:#3089fd;">下载</text>
</view>
<view class="detailsclassboxitem" @click="downloadFile(details.ofdUrl)">
<text>OFD版式文件</text>
<text>下载</text>
<text style="color: #3089fd;">下载</text>
</view>
<view class="detailsclassboxitem" @click="downloadFile(details.xmlUrl)">
<text>XML版式文件</text>
<text>下载</text>
<text style="color:#3089fd;">下载</text>
</view>
</view>
</view>
@@ -218,14 +226,30 @@
},
// 下载
downloadFile(url) {
// uni.downloadFile({
// url: url, //仅为示例,并非真实的资源
// success: (res) => {
// if (res.statusCode === 200) {
// console.log('下载成功');
// }
// }
// });
uni.downloadFile({
url: url, //仅为示例,并非真实的资源
success: (res) => {
url: url,
success: res => {
console.log(res)
if (res.statusCode === 200) {
console.log('下载成功');
// 预览pdf文件
uni.openDocument({
filePath: res.tempFilePath,
showMenu: true, // 右上角菜单可以进行分享保存pdf
success: function(file) {
console.log("文件打开成功", file)
}
})
}
}
});
})
},
clickdatastatuslist(item, index) {
this.datastatuslistshow = item.id

View File

@@ -43,7 +43,9 @@
<view class="detailsclass">
<view class="detailsclasstop">
<text> 详情</text>
<u-icon class="icon" name="close" @click="detailsshow = false" color="#999999" size="20"></u-icon>
<view class="icon">
<u-icon name="close" @click="detailsshow = false" color="#999999" size="20"></u-icon>
</view>
</view>
<view class="detailsclassbox">
<view class="detailsclassboxitem">
@@ -79,6 +81,14 @@
<text>开票税额</text>
<text>{{details.tax_amount}}</text>
</view>
<view class="detailsclassboxitem" v-if="details.email">
<text>邮箱</text>
<text>{{details.email}}</text>
</view>
<view class="detailsclassboxitem" v-if="details.mobile">
<text>手机号</text>
<text>{{details.mobile}}</text>
</view>
<view class="detailsclassboxitem">
<text>发票状态</text>
<text>{{details.status}}</text>
@@ -90,15 +100,15 @@
<view class="detailsclassbox" v-if="details.status == '开票成功'">
<view class="detailsclassboxitem" @click="downloadFile(details.pdfUrl)">
<text>PDF版式文件</text>
<text>下载</text>
<text style="color:#3089fd;">下载</text>
</view>
<view class="detailsclassboxitem" @click="downloadFile(details.ofdUrl)">
<text>OFD版式文件</text>
<text>下载</text>
<text style="color:#3089fd;">下载</text>
</view>
<view class="detailsclassboxitem" @click="downloadFile(details.xmlUrl)">
<text>XML版式文件</text>
<text>下载</text>
<text style="color:#3089fd;">下载</text>
</view>
</view>
</view>
@@ -294,14 +304,30 @@
},
// 下载
downloadFile(url) {
// uni.downloadFile({
// url: url, //仅为示例,并非真实的资源
// success: (res) => {
// if (res.statusCode === 200) {
// console.log('下载成功');
// }
// }
// });
uni.downloadFile({
url: url, //仅为示例,并非真实的资源
success: (res) => {
url: url,
success: res => {
console.log(res)
if (res.statusCode === 200) {
console.log('下载成功');
// 预览pdf文件
uni.openDocument({
filePath: res.tempFilePath,
showMenu: true, // 右上角菜单可以进行分享保存pdf
success: function(file) {
console.log("文件打开成功", file)
}
})
}
}
});
})
}
}
}