对接了发票中心的合并发票的数据,活动列表的开发票和查看发票的按钮对接,填写发票信息的静态页面70%

This commit is contained in:
wangzimeng 2025-06-28 18:26:53 +08:00
parent 4015500d34
commit 4bcbc1494c
7 changed files with 576 additions and 37 deletions

View File

@ -49,6 +49,10 @@
@click="toPay(item.id, item.order_no)">去支付</view>
<view v-if="item.status == 2 || item.status == 3" class="btnhx"
@click="toDetail(item.id, item.order_no, item.status)">核销码</view>
<view v-if="item.status == 9 && item.invoice_status == 0" class="btn_Inv"
@click="toAddInvoic(item.id, item.order_no)">申请开票</view>
<view v-if="item.status == 9 && item.invoice_status != 0" class="btn_Inv"
@click="checkInvoice(item.id, item.order_no)">查看开票</view>
<view v-if="item.status != 0" class="btn_xq"
@click="toDetail(item.id, item.order_no, item.status)">查看详情</view>
</view>
@ -332,6 +336,18 @@
url: "/packageA/center/detail?id=" + id
})
},
//
toAddInvoic(id, order_no) {
uni.navigateTo({
url:'/packageB/invoice/addInvoice?id=' + id + "&order_no=" + order_no
})
},
//
checkInvoice(id, order_no) {
uni.navigateTo({
url:'/packageB/invoice/invoiceInfo?id=' + id + "&order_no=" + order_no
})
},
//
toDetail(id, order_no, status) {
if (status == 2 || status == 3) {
@ -536,6 +552,17 @@
border-radius: 276rpx 276rpx 276rpx 276rpx;
}
.btn_Inv {
width: 180rpx;
height: 70rpx;
line-height: 70rpx;
text-align: center;
color: #999999;
border: 2rpx solid #999999;
border-radius: 276rpx 276rpx 276rpx 276rpx;
margin-right: 10rpx;
}
.btnhx {
width: 180rpx;

View File

@ -0,0 +1,307 @@
<template>
<!-- <view>填写发票信息</view> -->
<view class="container">
<view class="invoiceInfo">
<view class="invoiceList-item flex">
<view class="item-img">
<image style="width: 170rpx;height: 170rpx;border-radius: 20rpx;" src="../../static/index/about.png"
mode=""></image>
</view>
<view class="item-con">
<view class="itenCon-actName" style="">活动名</view>
<view class="itenCon-actPrice" style=""> 价格</view>
</view>
</view>
</view>
<!-- 表单 -->
<view style="height: auto;">
<u-form :model="form" :rules="rules" ref="uForm" label-width="auto" labelPostition="left">
<view class="formBox">
<u-form-item label="发票类型" prop="username">
<view class="typeBOx">
<view class="normalInv">
<view class="typeImgs">
<image style="width: 44rpx;height: 44rpx;" src="../../static/fabu/check.png" mode=""></image>
<image style="width: 44rpx;height: 44rpx;" src="../../static/fabu/nocheck.png" mode=""></image>
</view>
<view class="typeText">普通发票</view>
</view>
<view class="specialInv"></view>
</view>
</u-form-item>
<u-form-item label="发票内容" prop="password" required>
<image style="width: 38rpx;height: 38rpx;" src="/static/tips.png" mode=""></image>
<!-- <u-input inputAlign="right" v-model="form.password" placeholder="请输入密码" border="none"/> -->
</u-form-item>
<u-form-item label="抬头类型" prop="confirmPassword" required>
<!-- name和range-key绑定的值都是抬头类型的字段-->
<picker @change="clickUpTypeShow" name="isUpType" :value="upTypelist" :range="upTypelist" range-key="isUpType">
<view class="form_right">
请选择抬头类型
<u-icon name="arrow-right"></u-icon>
</view>
</picker>
</u-form-item>
<u-form-item label="发票抬头" prop="email">
<u-input inputAlign="right" v-model="form.email" placeholder="请输入邮箱" border="none"/>
</u-form-item>
<u-form-item label="抬头名称" prop="age">
<u-input inputAlign="right" v-model="form.age" type="number" placeholder="请输入抬头名称" border="none"/>
</u-form-item>
<u-form-item label="单位税号" prop="age">
<u-input inputAlign="right" v-model="form.age" type="number" placeholder="请输入单位税号" border="none"/>
</u-form-item>
<u-form-item label="注册地址" prop="age">
<u-input inputAlign="right" v-model="form.age" type="number" placeholder="必填" border="none"/>
</u-form-item>
<u-form-item label="注册电话" prop="age">
<u-input inputAlign="right" v-model="form.age" type="number" placeholder="必填" border="none"/>
</u-form-item>
<u-form-item label="开户银行" prop="age">
<u-input inputAlign="right" v-model="form.age" type="number" placeholder="必填" border="none"/>
</u-form-item>
<u-form-item label="银行账号" prop="age">
<u-input inputAlign="right" v-model="form.age" type="number" placeholder="必填" border="none"/>
</u-form-item>
</view>
<!-- <view style="background-color: #f5f5f5;height: 40rpx;"></view> -->
<view class="recipientInfo" >
<u-form-item label="手机号" prop="age">
<u-input inputAlign="right" v-model="form.age" type="number" placeholder="请输入手机号" border="none"/>
</u-form-item>
<u-form-item label="邮箱地址" prop="age">
<u-input inputAlign="right" v-model="form.age" type="number" placeholder="请输入邮箱地址" border="none"/>
</u-form-item>
</view>
<!--<u-form-item>
<u-button type="primary" @click="submit">申请开票</u-button>
<u-button @click="reset" style="margin-left: 30rpx">重置</u-button>
</u-form-item>-->
</u-form>
<view style="width: 100%;height: 140rpx;"></view>
</view>
<!-- 提交按钮 -->
<view class="footer-btn">
<u-button color="#323232" shape="circle">申请开票</u-button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
upTypelist:[],//
id:1,
order_no:'',
form: {
username: '',
password: '',
confirmPassword: '',
email: '',
age: ''
},
rules: {
username: [{
required: true,
message: '请输入用户名',
trigger: 'blur'
},
{
min: 3,
max: 10,
message: '用户名长度在3到10个字符',
trigger: 'blur'
}
],
email: [{
type: 'email',
message: '邮箱格式不正确',
trigger: 'blur'
}],
age: [{
type: 'number',
message: '年龄必须为数字',
trigger: 'blur'
},
{
min: 18,
max: 60,
type: 'number',
message: '年龄必须在18到60岁之间',
trigger: 'blur'
}
]
}
}
},
onLoad(options) {
// this.userInfo = uni.getStorageSync("userInfo")
this.id = options.id
this.order_no = options.order_no
console.log('id:',this.id,'order_no:',this.order_no);
},
methods: {
submit() {
this.$refs.uForm.validate(valid => {
if (valid) {
uni.showToast({
title: '提交成功',
icon: 'success'
})
console.log('表单数据:', this.form)
} else {
console.log('验证失败')
}
})
},
reset() {
this.$refs.uForm.resetFields()
}
},
onReady() {
this.$refs.uForm.setRules(this.rules)
}
}
</script>
<style lang="scss" scoped>
.form_right {
display: flex;
align-items: center;
margin-left: auto;
color: #848484;
width: 300rpx;
padding: 0rpx 0rpx 0rpx 20rpx;
position: relative;
left:2rpx;
font-size: 26rpx;
font-weight: 400;
text-align: right;
justify-content: flex-end;
}
.typeBOx {
width: 400rpx;
display: flex;
align-items: center;
margin-left: auto;
justify-content: center;
.normalInv {
display: flex;
align-items: center;
justify-content: center;
.typeImgs {
width: 44rpx;
height:44rpx;
}
.typeText {
font-size:30rpx;
font-weight: 400;
color: #999999;
}
.typeText2 {
font-size:30rpx;
font-weight: 400;
color: #323232;
}
}
}
.container {
padding: 40rpx 0;
background-color: #f5f5f5;
.invoiceInfo {
.invoiceList-item {
display: flex;
justify-content: left;
align-items: center;
background-color: #ffffff;
width: 100%;
// margin-top: 20rpx;
// padding: 20rpx;
height: 220rpx;
.item-img {
width: 170rpx;
height: 170rpx;
margin-left: 40rpx;
}
.item-con {
margin-left: 20rpx;
width: 60%;
height: 160rpx;
position: relative;
color: #323232;
.itenCon-actName {
position: absolute;
top: 0;
font-size: 28rpx;
font-weight: 400;
}
.itenCon-actPrice {
position: absolute;
bottom: 0;
font-size: 32rpx;
font-weight: 900;
}
}
}
}
.formBox {
// width: 100%;
margin-top: 30rpx;
background-color: #ffffff;
padding: 10rpx 20rpx;
border-radius: 20rpx;
}
.recipientInfo {
margin-top: 30rpx;
background-color: #ffffff;
padding: 10rpx 20rpx;
border-radius: 20rpx;
}
.footer-btn {
width: 95%;
padding: 20rpx 20rpx 60rpx;
display: flex;
position: fixed;
bottom: 0;
// left: 0;
right: -2rpx;
z-index: 99;
background-color: #ffffff;
}
}
</style>

View File

@ -13,24 +13,25 @@
<view style="min-height: 100vh;margin-top: 80rpx;width: 100%;">
<!-- 合开发票 -->
<view v-if="selected == 0">
<view class="invoiceList" >
<view class="invoiceList" v-for="(item,index) in unInvoiceList" :key="index">
<view class="invoiceList-item flex">
<view class="changedBox">
<view class="changedBox-Img">
<image v-if="invoiceCheck == 0" style="width: 44rpx;height: 44rpx;" src="../../static/fabu/nocheck.png" mode=""></image>
<image v-else style="width: 44rpx;height: 44rpx;" src="../../static/fabu/check.png" mode=""></image>
<view class="changedBox-Img" @click="checkInvoice(item.invoiceCheck,index)">
<image v-if="item.invoiceCheck === 1" style="width: 44rpx;height: 44rpx;" src="../../static/fabu/check.png" mode=""></image>
<image v-else style="width: 44rpx;height: 44rpx;" src="../../static/fabu/nocheck.png" mode=""></image>
</view>
</view>
<view class="item-img">
<image style="width: 170rpx;height: 170rpx;border-radius: 20rpx;" src="../../static/index/about.png" mode=""></image>
<image style="width: 170rpx;height: 170rpx;border-radius: 20rpx;" :src="item.detail.images[0]" mode=""></image>
</view>
<view class="item-con">
<view class="itenCon-actName" style="">活动名</view>
<view class="itenCon-actPrice" style=""> 价格</view>
<view class="itenCon-actName" style="">{{item.detail.title}}</view>
<view class="itenCon-actPrice" style=""> {{item.payprice}}</view>
</view>
</view>
</view>
<view class="invoiceBtn">
<view class="invoiceBtn" @click="handleIssueInvoice()">
<view>申请开票</view>
</view>
</view>
@ -108,25 +109,53 @@
</view>
<!-- 抬头管理 -->
<view class="manageList" v-else>
<view class="manageList-recordCon">
<view class="record-image"></view>
<view class="record-text"></view>
<!-- 信息提醒 -->
<view class="manageRecord">
<image style="width: 36rpx;height: 36rpx;" src="/static/invoice/manageRecord.png" mode=""></image>
<text style="margin-left: 10rpx;">抬头信息仅用于开具发票请勿用于转账等其他用途谨防受骗</text>
</view>
<view class="manageList-item flex">
<view class="item-con3">
<view class="itenCon3-actName" style="">活动名</view>
<view class="itenCon3-actPrice" style=""> 价格</view>
<!-- 专用 -->
<view class="manageList-item">
<view class="manage-type">专业发票抬头</view>
<view class="manageLine"></view>
<view class="manageCon">
<view class="messContext">
<view class="textFir">
<view class="defaultBox">默认</view>
<view class="manageName">洛阳灵睿网络技术有限公司</view>
</view>
<view class="textSec">9741212154551411C</view>
</view>
<view class="manageEdit">
<image style="width: 50rpx;height: 50rpx;" src="/static/invoice/manageEdit.png" mode=""></image>
</view>
</view>
</view>
<!-- 个人 -->
<view class="manageList-item">
<view class="manage-type">个人发票抬头</view>
<view class="manageLine"></view>
<view class="manageCon">
<view class="messContext">
<view class="textFir">
<view class="defaultBox">
默认</view>
<view class="manageName">洛阳灵睿网络技术有限公司</view>
</view>
<!-- <view class="textSec">9741212154551411C</view> -->
</view>
<view class="manageEdit">
<image style="width: 50rpx;height: 50rpx;" src="/static/invoice/manageEdit.png" mode=""></image>
</view>
</view>
</view>
<!-- 按钮 -->
<view class="invoiceBtn">
<view>添加发票抬头</view>
</view>
</view>
<!-- <view class="flex flex-column flex-start align-items" v-if="list.length == 0"
style="margin-top: 300rpx;">
<image src="/static/message/activen.png" mode="" style="width: 180rpx;height: 180rpx;">
</image>
<view style="margin-top: 30rpx;font-size: 28rpx;color: #323232;">暂无参与活动</view>
<view class="tofb" @click="tofb">参与活动</view>
</view> -->
</view>
</view>
@ -160,7 +189,7 @@
text: '提交记录'
},
{
status: '2',
index: '2',
text: '抬头管理'
}
],
@ -180,11 +209,22 @@
}
],//tabs
recordeIndex: '0',//tabs
page: 1,
limit: 10,
loadStatus: 'loading',
unInvoiceList:[],//
invoicedList: [],//
upList: [],//
count:0,
order_nos: '',//
};
},
onLoad(option) {
this.getInvoiceList()
},
onShow() {
this.getInvoiceList()
},
onShow() {},
onPullDownRefresh() {
@ -194,24 +234,87 @@
},
methods: {
//
selectheader(index) {
const that = this;
that.selected = index;
console.log(index, '')
},
//
headerSelected(index) {
console.log('index',index);
return this.selected === index;
},
//
selecRecordIndex(index) {
const that = this;
that.recordeIndex = index;
console.log(index, '')
},
//
recordIndexSelected(index) {
console.log('index',index);
return this.recordeIndex === index;
},
//
getInvoiceList() {
uni.$u.http.get('/api/school.newactivity.order/order_list', {
params: {
page: this.page,
limit: this.limit,
// status: 9,
// keywords: this.keywords,
invoice_status: 0,
}
}).then(res => {
console.log('code',res.code);
if (res.code === 1) {
this.count = res.data.count
this.unInvoiceList = [...res.data.list];
console.log('unInvoiceList:',this.unInvoiceList);
if (this.unInvoiceList.length >= res.data.count) {
this.loadStatus = 'nomore';
} else {
this.loadStatus = 'loading';
}
this.unInvoiceList.forEach(item => {
item.invoiceCheck = 0
})
// this.isInitialized = false; //
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
this.loadStatus = 'loading';
}
}).catch(error => {
console.error('请求失败', error);
this.loadStatus = 'loading';
});
},
//
checkInvoice(e,index) {
this.$set(this.unInvoiceList, index, {
...this.unInvoiceList[index],
invoiceCheck: e === 0 ? 1 : 0
});
},
//
handleIssueInvoice() {
//
const list = this.unInvoiceList.filter(item => item.invoiceCheck == 1).map(item => item.order_no)
console.log('list:',list);
// this.order_nos = JSON.stringify(list)
this.order_nos = JSON.stringify(list.join(','))
const num = list.length
console.log('num:',num);
uni.navigateTo({
url:'/packageB/invoice/addInvoice?order_nos=' + this.order_nos + '&num?' + num
})
}
}
}
@ -575,23 +678,103 @@
.manageList {
// padding-top: 20rpx;
.manageList-recordCon {
.manageRecord {
margin: 20rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #EB1B1B;
line-height: 32rpx;
text-align: left;
font-style: normal;
text-transform: none;
align-items: center;
display: flex;
justify-content: center;
// color: #EB1B1B;
// font-size: 28rpx;
// font-weight: 400;
}
.manageList-item {
background-color: #ffffff;
padding: 20rpx 0;
width: 100%;
margin: 30rpx 20rpx;
margin-bottom: 20rpx;
border-radius: 20rpx;
.record-image {
width: 36rpx;
.manage-type {
width: 100%;
height: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #3D3D3D;
line-height: 32rpx;
// text-align: center;
font-style: normal;
text-transform: none;
margin: 20rpx;
}
.record-text {
color: #EB1B1B;
font-size: 28rpx;
font-weight: 400;
.manageLine {
width: 750rpx;
height: 1rpx;
background: #EEEEEE;
border-radius: 0rpx 0rpx 0rpx 0rpx;
}
.manageCon {
display: flex;
justify-content: space-between;
margin: 20rpx;
align-items: center;
.messContext {
display: block;
.textFir {
display: flex;
justify-content: left;
align-items: center;
.defaultBox {
width: 68rpx;
height: 32rpx;
background: #FFEEEE;
border-radius: 4rpx 4rpx 4rpx 4rpx;
border: 1rpx solid #EB1B1B;
text-align: center;
font-size: 26rpx;
font-weight: 500;
}
.manageName {
margin-left: 10rpx;
height: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #3D3D3D;
line-height: 32rpx;
font-style: normal;
text-transform: none;
}
}
.textSec {
margin-top: 20rpx;
height: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #999999;
line-height: 32rpx;
font-style: normal;
text-transform: none;
}
}
.manageEdit {
width: 50rpx;
height: 50rpx;
}
}
}

View File

@ -0,0 +1,9 @@
<template>
<view>查看发票</view>
</template>
<script>
</script>
<style>
</style>

View File

@ -358,7 +358,20 @@
"style": {
"navigationBarTitleText": "发票中心"
}
}]
},
{
"path": "invoice/addInvoice",
"style": {
"navigationBarTitleText": "填写发票信息"
}
},
{
"path": "invoice/invoiceInfo",
"style": {
"navigationBarTitleText": "查看发票"
}
}
]
}
],
"preloadRule": { //

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB