diff --git a/packageA/my/exercise.vue b/packageA/my/exercise.vue
index 32d3305..b990c29 100644
--- a/packageA/my/exercise.vue
+++ b/packageA/my/exercise.vue
@@ -51,7 +51,8 @@
@click="toDetail(item.id, item.order_no, item.status)">核销码
申请开票
- 开票中
+ 查看开票
查看详情
@@ -563,6 +564,17 @@
border-radius: 276rpx 276rpx 276rpx 276rpx;
margin-right: 10rpx;
}
+ .btn_InvIng {
+ width: 180rpx;
+ height: 70rpx;
+ line-height: 70rpx;
+ text-align: center;
+ color: #999999;
+ // border: 2rpx solid #999999;
+ background-color: #f0f0f0;
+ border-radius: 276rpx 276rpx 276rpx 276rpx;
+ margin-right: 10rpx;
+ }
.btnhx {
width: 180rpx;
diff --git a/packageB/invoice/addHead.vue b/packageB/invoice/addHead.vue
new file mode 100644
index 0000000..808d2ff
--- /dev/null
+++ b/packageB/invoice/addHead.vue
@@ -0,0 +1,482 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 普通发票
+
+
+
+
+
+
+ 专用发票
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 商品明细
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 个人或事业单位
+
+
+
+
+
+
+ 企业
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设为默认发票
+ 设置为默认,后续下单优先使用以上发票信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packageB/invoice/addInvoice.vue b/packageB/invoice/addInvoice.vue
index 8fcd7ae..a4497ea 100644
--- a/packageB/invoice/addInvoice.vue
+++ b/packageB/invoice/addInvoice.vue
@@ -16,7 +16,7 @@
已选择{{num}}个订单 预计发票金额:¥
- 43.25
+ {{totalPrice}}
预计金额仅作为参考,请以合并后的实际金额为准
@@ -26,7 +26,7 @@
-
+
-
-
+
+
+
+
+
-
-
+
+
商品明细
@@ -229,6 +233,46 @@
+
+
+
+
@@ -247,6 +291,16 @@
alignItems: 'center',
flexColumn: 'column'
},
+ popupStyRe: {
+ width: '540rpx',
+ padding: '24rpx 24rpx 42rpx 24rpx',
+ height: '384rpx',
+ margin: '0 auto', // 水平居中
+ display: 'flex',
+ justifyContent: 'start',
+ alignItems: 'center',
+ flexColumn: 'column'
+ },
style: {
// 字符串的形式
img: 'width: 100%'
@@ -307,6 +361,8 @@
limit: 10,
headList: [],
selectHeadIndex: null,
+ totalPrice:0,
+ explainShow:false,//发票内容显隐
// keywords: '',
}
},
@@ -318,8 +374,11 @@
this.id = options.id
console.log('id1', this.id);
this.getOrderInfo();
+ }else {
+ this.totalPrice = options.totalPrice
+ console.log('totalPrice:',this.totalPrice);
}
- console.log('num:', this.num, 'order_nos:', this.order_nos);
+ console.log('order_nos:', this.order_nos,'totalPrice:',this.totalPrice);
},
onReady() {
console.log('设置规则:', this.rules);
@@ -370,7 +429,7 @@
this.form.head_type = 'corporate'
},
openHeadShow() {
- this.headShow = true;
+ // this.headShow = true;
this.getHeadList();
},
closeHeadShow() {
@@ -388,6 +447,7 @@
console.log('res:', res);
this.headList = res.data.list
console.log('headlist', this.headList[2]);
+ this.headShow = true;
} else {
uni.showToast({
title: res.msg,
@@ -491,8 +551,12 @@
return;
}
}
+ console.log('submit:',this.order_nos);
+ // 如果存在意外引号,可以清理:
+ const cleanOrderNos = this.order_nos.replace(/^"+|"+$/g, '');
uni.$u.http.post('/api/school.header/apply', {
- order_nos: this.order_nos,
+ // order_nos: this.order_nos,
+ order_nos: cleanOrderNos,
head_type: this.form.head_type,
invoice_type: this.form.invoice_type,
invoice_header: this.form.invoice_header,
@@ -506,7 +570,7 @@
}).then(res => {
if (res.code == 1) {
uni.showToast({
- title: '提交申请成功',
+ title: res.msg,
icon: 'success',
duration: 2000
})
@@ -518,16 +582,6 @@
})
}
}).catch(error => {});
- // this.$refs.uForm.validate(valid => {
- // console.log('sub2');
- // if (valid) {
- // console.log('sub3');
-
- // console.log('表单数据:', this.form)
- // } else {
- // console.log('验证失败')
- // }
- // })
},
},
}
diff --git a/packageB/invoice/invoiceCenter.vue b/packageB/invoice/invoiceCenter.vue
index ee5e422..cce69c1 100644
--- a/packageB/invoice/invoiceCenter.vue
+++ b/packageB/invoice/invoiceCenter.vue
@@ -9,21 +9,24 @@
-
+
-
-
-
-
+
+
+
+
-
+
{{item.detail.title}}
@@ -34,104 +37,135 @@
申请开票
+
+
+
+ 暂无数据
+
+
+
+ :class="{ selected: recordIndexSelected(item.status) }"
+ @click="selecRecordIndex(item.status)">
{{ item.text }}
-
-
-
+
+
+
+
+
+
+ {{item.activityorders[0].title}}
+
+ ¥ {{item.activityorders[0].price}}
+
+ 查看发票
+
+
+
+ 开票中
+
+
+ 已作废
+
+
+
-
- 名字
-
- ¥ 价格
-
+
+
+
+
+
+
+
+
+ {{e.detail.title}}
+
+ ¥ {{e.detail.price}}
+
+
+
+
+
+
+
+
+ {{item.activityorders.length}}个订单 发票金额:¥{{item.price}}
+
查看发票
-
+
+ 开票中
-
-
-
-
-
-
-
-
-
-
- 名字
-
- ¥ 价格
+
+ 已作废
-
-
-
-
-
-
-
-
- 名字
-
- ¥ 价格
-
-
-
-
-
-
-
-
- 2个订单 发票金额:¥1213
-
-
- 开票中
-
+
+
+
+
+ 暂无数据
+
+
+
-
+
+
抬头信息仅用于开具发票,请勿用于转账等其他用途谨防受骗
-
- 专业发票抬头
+
+ 专业发票抬头
+ 个人发票抬头
- 默认
- 洛阳灵睿网络技术有限公司
+ 默认
+ {{item.invoice_header}}
- 9741212154551411C
+ {{item.tax_id}}
-
-
+
+
+
-
+
-
+ -->
-
+
添加发票抬头
+
+
+
+ 暂无数据
+
+
+
-
+
-
+
-
+
@@ -178,9 +219,8 @@
},
size: 13,
sortStyle: ['#ff557f', '#3f3f3f'],
- selected:'0',
- headers: [
- {
+ selected: '0',
+ headers: [{
index: '0',
text: '合开发票'
},
@@ -193,70 +233,90 @@
text: '抬头管理'
}
],
- invoiceCheck: '0',//和开发票选中状态:0未选中,1选中
- recordTypeList: [
- {
- index: '0',
+ invoiceCheck: '0', //和开发票选中状态:0未选中,1选中
+ recordTypeList: [{
+ status: '',
text: '全部'
},
{
- index: '1',
+ status: '1',
text: '已开票'
},
{
- index: '2',
+ status: '2',
text: '未开票'
}
- ],//提交记录的tabs数据
- recordeIndex: '0',//提交记录的tabs选中
+ ], //提交记录的tabs数据
+ recordeStatus: '', //提交记录的tabs选中状态
+ recordList: [], //提交记录
page: 1,
limit: 10,
loadStatus: 'loading',
- unInvoiceList:[],//可开发票列表
- invoicedList: [],//已开发票列表
- upList: [],//支票抬头列表
- count:0,
- order_nos: '',//选中的多个订单号
- num:0,
+ unInvoiceList: [], //可开发票列表
+ invoicedList: [], //已开发票列表
+ upList: [], //支票抬头列表
+ count: 0,
+ order_nos: '', //选中的多个订单号
+ totalPrice: 0,
+ num: 0,
id: 0,
+ headList: [], //抬头管理
};
},
- onLoad(option) {
+ onLoad(option) {
this.getInvoiceList()
+ this.getHeadList()
+ this.getRecordList()
},
onShow() {
this.getInvoiceList()
+ this.getHeadList()
+ this.getRecordList()
},
onPullDownRefresh() {
},
onReachBottom() {
-
+
},
-
+
methods: {
//三个列表的切换
selectheader(index) {
+ console.log('111');
const that = this;
that.selected = index;
- console.log(index, '')
+ console.log('selectheader:', that.selected)
+ if (that.selected == 0) {
+ console.log('合开');
+ this.getInvoiceList()
+ } else if (that.selected == 1) {
+ console.log('记录', this.recordeStatus);
+
+ this.getRecordList()
+ } else {
+ console.log('抬头');
+ this.getHeadList();
+ }
},
// 判断当前所选中列表
headerSelected(index) {
- console.log('index',index);
+ console.log('3333');
+ // console.log('index',index);
return this.selected === index;
},
//提交记录的列表状态切换
- selecRecordIndex(index) {
- const that = this;
- that.recordeIndex = index;
- console.log(index, '')
+ selecRecordIndex(recordStatus) {
+ // const that = this;
+ this.recordeStatus = recordStatus;
+ console.log('recordeStatus', this.recordeStatus)
+ this.getRecordList()
},
//判断当前的提交记录的列表选中状态
- recordIndexSelected(index) {
- console.log('index',index);
- return this.recordeIndex === index;
+ recordIndexSelected(recordStatus) {
+ console.log('recordStatus', recordStatus);
+ return this.recordeStatus === recordStatus;
},
//获取可开发票列表
getInvoiceList() {
@@ -269,11 +329,11 @@
invoice_status: 0,
}
}).then(res => {
- console.log('code',res.code);
+ console.log('code', res.code);
if (res.code === 1) {
this.count = res.data.count
this.unInvoiceList = [...res.data.list];
- console.log('unInvoiceList:',this.unInvoiceList);
+ console.log('unInvoiceList:', this.unInvoiceList);
if (this.unInvoiceList.length >= res.data.count) {
this.loadStatus = 'nomore';
} else {
@@ -282,7 +342,7 @@
this.unInvoiceList.forEach(item => {
item.invoiceCheck = 0
})
- // this.isInitialized = false; // 标记已初始化
+ // this.isInitialized = false; // 标记已初始化
} else {
uni.showToast({
title: res.msg,
@@ -297,45 +357,120 @@
});
},
//选择要开发票的订单
- checkInvoice(e,index) {
+ checkInvoice(e, index) {
this.$set(this.unInvoiceList, index, {
- ...this.unInvoiceList[index],
- invoiceCheck: e === 0 ? 1 : 0
- });
+ ...this.unInvoiceList[index],
+ invoiceCheck: e === 0 ? 1 : 0
+ });
},
//跳转填写发票信息
handleIssueInvoice() {
//拿到选中的订单
const list = this.unInvoiceList.filter(item => item.invoiceCheck == 1).map(item => item.order_no)
const idList = this.unInvoiceList.filter(item => item.invoiceCheck == 1).map(item => item.id)
- console.log('list:',list,idList);
+ console.log('list:', list, idList);
// this.order_nos = JSON.stringify(list)
this.order_nos = JSON.stringify(list.join(','))
this.num = list.length
- console.log('num:',this.num);
- if(list.length<1){
+ if(list.length) {
+ this.list.forEach(e => {
+ // if(e.payprice)
+ this.totalPrice += e.payprice
+ })
+ }
+
+ console.log('num:', this.num, 'totalPrice:', this.totalPrice);
+ console.log('unInvoiceList',this.unInvoiceList.length);
+ if(this.unInvoiceList.length == 0){
+ uni.showToast({
+ title: '暂无可开发票的订单,请先去参加活动下单',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ if (list.length < 1) {
uni.showToast({
title: '请选择需要开发票的订单',
icon: 'none',
duration: 2000
})
- }else if(list.length === 1){
+ } else if (list.length === 1) {
this.id = idList[0]
- console.log('id',this.id);
+ console.log('id', this.id);
uni.navigateTo({
- url:'/packageB/invoice/addInvoice?order_nos=' + this.order_nos + '&num=' + this.num + '&id=' + this.id
+ url: '/packageB/invoice/addInvoice?order_nos=' + this.order_nos + '&num=' + this.num +
+ '&id=' + this.id
+ })
+ } else {
+ uni.navigateTo({
+ url: '/packageB/invoice/addInvoice?order_nos=' + this.order_nos + '&num=' + this.num +
+ '&totalPrice=' + this.totalPrice
})
}
- else{
- uni.navigateTo({
- url:'/packageB/invoice/addInvoice?order_nos=' + this.order_nos + '&num=' + this.num
- })
- }
-
- }
+ // uni.navigateTo({
+ // url: '/packageB/invoice/addInvoice?order_nos=' + this.order_nos + '&num=' + this.num
+ // })
+ },
+ //提交记录
+ getRecordList() {
+ console.log('提交记录', this.recordeStatus);
+ uni.$u.http.get('/api/school.header/apply_list', {
+ params: {
+ // keywords: this.keywords,
+ page: this.page,
+ limit: this.limit,
+ status: this.recordeStatus
+ }
+ }).then(res => {
+ if (res.code == 1) {
+ console.log('res:', res);
+ this.recordList = res.data.list
+ console.log('recordList', this.recordList);
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ }).catch(error => {});
+ },
+ //抬头管理列表
+ getHeadList() {
+ uni.$u.http.get('/api/school.header/header_list', {
+ params: {
+ // keywords: this.keywords,
+ page: this.page,
+ limit: this.limit,
+ }
+ }).then(res => {
+ if (res.code == 1) {
+ console.log('res:', res);
+ this.headList = res.data.list
+ console.log('headlist', this.headList[2]);
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ }).catch(error => {});
+ },
+ addHead() {
+ uni.navigateTo({
+ url: '/packageB/invoice/addHead'
+ })
+ },
+ editHead(id) {
+ uni.navigateTo({
+ url: '/packageB/invoice/addInvoice?id=' + this.id
+ })
+ },
}
-
+
}
@@ -360,8 +495,8 @@
font-family: PingFang SC, PingFang SC;
position: fixed;
top: 0;
-
-
+
+
.s-header {
display: flex;
@@ -372,7 +507,7 @@
font-weight: 400;
font-size: 28rpx;
color: #9E9E9E;
-
+
line-height: 26rpx;
flex: 0 0 auto;
position: relative;
@@ -398,11 +533,11 @@
border-bottom: #323232 solid 8rpx;
}
}
-
+
.invoiceList {
width: 100%;
height: auto;
-
+
.invoiceList-item {
display: flex;
justify-content: center;
@@ -412,7 +547,7 @@
margin-top: 20rpx;
padding: 20rpx 30rpx;
height: 220rpx;
-
+
.changedBox {
width: 44rpx;
height: 44rpx;
@@ -420,34 +555,34 @@
display: flex;
justify-content: center;
align-items: center;
-
+
.changedBox-Img {
width: 44rpx;
height: 44rpx;
}
}
-
+
.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;
@@ -455,11 +590,11 @@
font-weight: 900;
}
}
-
+
}
}
-
+
.invoiceBtn {
width: 90%;
height: 90rpx;
@@ -480,14 +615,14 @@
bottom: 66rpx;
margin-left: 5%;
}
-
-
+
+
.recordList {
width: 100%;
height: auto;
display: block;
justify-content: center;
-
+
.record-tabs {
// background: #ffffff;
width: 100%;
@@ -497,8 +632,8 @@
border-radius: 30rpx;
-webkit-overflow-scrolling: touch;
font-family: PingFang SC, PingFang SC;
-
-
+
+
.s-header {
display: flex;
justify-content: center;
@@ -509,24 +644,25 @@
font-size: 28rpx;
color: #9E9E9E;
border-radius: 40rpx;
-
+ background-color: #ffffff;
+ margin-right: 20rpx;
line-height: 26rpx;
flex: 0 0 auto;
position: relative;
}
-
+
.s-header.selected {
width: 150rpx;
height: 80rpx;
- background: #ffffff;
+ background-color: #ffffff;
// font-weight: 800;
// font-size: 32rpx;
color: #323232;
line-height: 28rpx;
}
-
+
}
-
+
.recordList-item {
display: flex;
justify-content: center;
@@ -536,28 +672,28 @@
margin-top: 20rpx;
padding: 20rpx 30rpx;
height: 220rpx;
-
+
.item-img2 {
width: 170rpx;
height: 170rpx;
// margin-left: 40rpx;
-
+
}
-
+
.item-con2 {
margin-left: 30rpx;
width: 65%;
height: 160rpx;
position: relative;
color: #323232;
-
+
.itenCon2-actName {
position: absolute;
top: 0;
font-size: 28rpx;
font-weight: 400;
}
-
+
.itenCon2-actPrice {
width: 100%;
position: absolute;
@@ -566,7 +702,7 @@
font-weight: 900;
display: flex;
justify-content: space-between;
-
+
.lookInvoice {
width: 200rpx;
display: flex;
@@ -575,7 +711,7 @@
font-weight: 400;
font-size: 28rpx;
}
-
+
.lookInvoice2 {
width: 200rpx;
color: #ff4810;
@@ -588,7 +724,7 @@
}
}
}
-
+
.recordList-items {
display: block;
background-color: #ffffff;
@@ -596,7 +732,7 @@
margin-top: 20rpx;
padding: 20rpx 30rpx;
height: 220rpx auto;
-
+
.reListIts-item {
display: flex;
justify-content: center;
@@ -604,28 +740,28 @@
width: 100%;
margin-bottom: 20rpx;
// background-color: #9E9E9E;
-
+
.itsItem-img2 {
width: 170rpx;
height: 170rpx;
// margin-left: 40rpx;
-
+
}
-
+
.itsItem-con2 {
margin-left: 30rpx;
width: 65%;
height: 160rpx;
position: relative;
color: #323232;
-
+
.itsItemCon2-actName {
position: absolute;
top: 0;
font-size: 28rpx;
font-weight: 400;
}
-
+
.itsItemCon2-actPrice {
width: 100%;
position: absolute;
@@ -634,7 +770,7 @@
font-weight: 900;
display: flex;
justify-content: space-between;
-
+
.lookInvoice {
width: 200rpx;
display: flex;
@@ -643,7 +779,7 @@
font-weight: 400;
font-size: 28rpx;
}
-
+
.lookInvoice2 {
width: 200rpx;
color: #ff4810;
@@ -656,22 +792,22 @@
}
}
}
-
+
.reLine {
width: 100%;
height: 1rpx;
background-color: #D8D8D8;
margin: 10rpx 0;
-
+
}
-
+
.reListIts-itemData {
width: 100%;
margin-top: 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
-
+
.lookInvoices {
width: 200rpx;
display: flex;
@@ -680,7 +816,7 @@
font-weight: 400;
font-size: 28rpx;
}
-
+
.lookInvoices2 {
width: 200rpx;
color: #ff4810;
@@ -693,10 +829,10 @@
}
}
}
-
+
.manageList {
// padding-top: 20rpx;
-
+
.manageRecord {
margin: 20rpx;
font-family: PingFang SC, PingFang SC;
@@ -710,14 +846,14 @@
align-items: center;
display: flex;
}
-
+
.manageList-item {
background-color: #ffffff;
padding: 20rpx 0;
width: 100%;
margin-bottom: 20rpx;
border-radius: 20rpx;
-
+
.manage-type {
width: 100%;
height: 32rpx;
@@ -731,28 +867,28 @@
text-transform: none;
margin: 20rpx;
}
-
+
.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;
@@ -763,7 +899,7 @@
font-size: 26rpx;
font-weight: 500;
}
-
+
.manageName {
margin-left: 10rpx;
height: 32rpx;
@@ -776,7 +912,7 @@
text-transform: none;
}
}
-
+
.textSec {
margin-top: 20rpx;
height: 32rpx;
@@ -789,21 +925,21 @@
text-transform: none;
}
}
-
+
.manageEdit {
width: 50rpx;
height: 50rpx;
}
}
}
-
+
}
-
+
}
}
-
+
.flex {
display: flex;
}
@@ -837,5 +973,4 @@
border-radius: 0rpx 0rpx 0rpx 0rpx;
margin: 0 30rpx;
}
-
\ No newline at end of file
diff --git a/packageB/invoice/invoiceInfo.vue b/packageB/invoice/invoiceInfo.vue
index a82d636..8287296 100644
--- a/packageB/invoice/invoiceInfo.vue
+++ b/packageB/invoice/invoiceInfo.vue
@@ -1,9 +1,292 @@
- 查看发票
+
+
+
+
+
+
+
+ {{detailAny.invoice_status_text}}
+
+ 已开发票金额: ¥{{detail.price}}
+
+
+
+
+
+ 发票类型:普通发票
+ 专用发票
+ 发票内容:商品明细
+ 抬头类型:个人或事业单位
+ 企业
+
+
+
+ 共{{imagesNum}}张
+
+
+
+ 抬头名称:{{detail.invoice_header}}
+ 开票金额:{{detail.price}}
+ 申请时间:{{detail.createtime_text}}
+ 开票时间:{{detail.invoicingtime_text}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
diff --git a/pages.json b/pages.json
index c1965a9..987448c 100644
--- a/pages.json
+++ b/pages.json
@@ -370,6 +370,12 @@
"style": {
"navigationBarTitleText": "查看发票"
}
+ },
+ {
+ "path": "invoice/addHead",
+ "style": {
+ "navigationBarTitleText": "添加发票抬头信息"
+ }
}
]
}
diff --git a/static/invoice/conRecord.png b/static/invoice/conRecord.png
new file mode 100644
index 0000000..67bc370
Binary files /dev/null and b/static/invoice/conRecord.png differ
diff --git a/static/invoice/invInfoBk.png b/static/invoice/invInfoBk.png
new file mode 100644
index 0000000..d387c26
Binary files /dev/null and b/static/invoice/invInfoBk.png differ
diff --git a/static/invoice/statusInv.png b/static/invoice/statusInv.png
new file mode 100644
index 0000000..c7fb6b7
Binary files /dev/null and b/static/invoice/statusInv.png differ