diff --git a/packageA/my/exercise.vue b/packageA/my/exercise.vue index 02e06d7..32d3305 100644 --- a/packageA/my/exercise.vue +++ b/packageA/my/exercise.vue @@ -49,6 +49,10 @@ @click="toPay(item.id, item.order_no)">去支付 核销码 + 申请开票 + 查看开票 查看详情 @@ -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; diff --git a/packageB/invoice/addInvoice.vue b/packageB/invoice/addInvoice.vue new file mode 100644 index 0000000..19b7cb7 --- /dev/null +++ b/packageB/invoice/addInvoice.vue @@ -0,0 +1,307 @@ + + + + + \ No newline at end of file diff --git a/packageB/invoice/invoiceCenter.vue b/packageB/invoice/invoiceCenter.vue index 2bae139..9bffda5 100644 --- a/packageB/invoice/invoiceCenter.vue +++ b/packageB/invoice/invoiceCenter.vue @@ -13,24 +13,25 @@ - + - - - + + + + - + - 活动名 - ¥ 价格 + {{item.detail.title}} + ¥ {{item.payprice}} - + 申请开票 @@ -108,25 +109,53 @@ - - - + + + + 抬头信息仅用于开具发票,请勿用于转账等其他用途谨防受骗 - - - 活动名 - ¥ 价格 + + + 专业发票抬头 + + + + + 默认 + 洛阳灵睿网络技术有限公司 + + 9741212154551411C + + + + + + + 个人发票抬头 + + + + + + 默认 + 洛阳灵睿网络技术有限公司 + + + + + + + + + + + 添加发票抬头 + + - @@ -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; + } } } diff --git a/packageB/invoice/invoiceInfo.vue b/packageB/invoice/invoiceInfo.vue new file mode 100644 index 0000000..a82d636 --- /dev/null +++ b/packageB/invoice/invoiceInfo.vue @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/pages.json b/pages.json index 32e2610..c1965a9 100644 --- a/pages.json +++ b/pages.json @@ -358,7 +358,20 @@ "style": { "navigationBarTitleText": "发票中心" } - }] + }, + { + "path": "invoice/addInvoice", + "style": { + "navigationBarTitleText": "填写发票信息" + } + }, + { + "path": "invoice/invoiceInfo", + "style": { + "navigationBarTitleText": "查看发票" + } + } + ] } ], "preloadRule": { // 分包预载配置 diff --git a/static/invoice/manageEdit.png b/static/invoice/manageEdit.png new file mode 100644 index 0000000..1ce3468 Binary files /dev/null and b/static/invoice/manageEdit.png differ diff --git a/static/invoice/manageRecord.png b/static/invoice/manageRecord.png new file mode 100644 index 0000000..f72ca59 Binary files /dev/null and b/static/invoice/manageRecord.png differ