发票管理,剩余通过后显示下载发票图片
This commit is contained in:
parent
8bbe186208
commit
dd1c290fe2
3
app.json
3
app.json
@ -19,7 +19,8 @@
|
||||
"pages/mine/mineAccount/mineInvoice/mineInvoice",
|
||||
"pages/mine/mineAccount/invoiceInfo/invoiceInfo",
|
||||
"pages/mine/mineAccount/makeInvoice/makeInvoice",
|
||||
"pages/mine/mineAccount/invoiceOrder/invoiceOrder"
|
||||
"pages/mine/mineAccount/invoiceOrder/invoiceOrder",
|
||||
"pages/mine/mineAccount/invoiceRecordDetail/invoiceRecordDetail"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTextStyle": "black",
|
||||
|
12
app.wxss
12
app.wxss
@ -2,7 +2,9 @@
|
||||
@import "/static/style/icon.wxss";
|
||||
|
||||
page {
|
||||
background-color: #FAFAFA;
|
||||
background: linear-gradient(to bottom, #F0F0F0, #FFFFFF);
|
||||
background-size: 100% 100vh;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.page-container {
|
||||
@ -54,7 +56,13 @@ page {
|
||||
.star::after {
|
||||
content: "*";
|
||||
color: red;
|
||||
margin-left: 3px;
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
|
||||
.gray-star::after {
|
||||
content: '*';
|
||||
color: #525252;
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
|
||||
.bottom-footer {
|
||||
|
@ -11,7 +11,7 @@ const apiPath = {
|
||||
deleteInvoiceInfo: '/api/invoice-config/remove/{ids}', //删除开票信息
|
||||
mineInvoiceRecordList: '/api/invoicerecharge/listpage/{userId}', //我的开票记录
|
||||
saveInvoiceRecord: '/api/invoicerecharge/save/{userId}', // 保存开票申请
|
||||
updateInvoiceRecord: '/api/invoicerecharge/save/{userId}', //修改开票申请
|
||||
updateInvoiceRecord: '/api/invoicerecharge/update/{invoiceRechargeId}', //修改开票申请
|
||||
cancelInvoiceRecord: '/api/invoicerecharge/cancel/{invoiceRechargeId}', //取消开票申请
|
||||
dicByPId: '/api/data/listbyparentid/{pId}', //数据字典
|
||||
}
|
||||
@ -55,7 +55,7 @@ class InvoiceApi {
|
||||
//取消开票申请
|
||||
static doCancelInvoiceRecord(id) {
|
||||
const path = apiPath.cancelInvoiceRecord.replace('{invoiceRechargeId}', id)
|
||||
return request(path, "DELETE", null, null, 'plug')
|
||||
return request(path, "PUT", null, null, 'plug')
|
||||
}
|
||||
//提交开票申请
|
||||
static doSaveInvoiceRecord(data) {
|
||||
@ -63,8 +63,8 @@ class InvoiceApi {
|
||||
return request(path, "POST", data, null, 'plug')
|
||||
}
|
||||
//修改开票申请
|
||||
static doUpdateInvoiceRecord(data) {
|
||||
const path = apiPath.updateInvoiceRecord.replace('{userId}', this.userId)
|
||||
static doUpdateInvoiceRecord(id, data) {
|
||||
const path = apiPath.updateInvoiceRecord.replace('{invoiceRechargeId}', id)
|
||||
return request(path, 'PUT', data, null, 'plug')
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,4 @@
|
||||
page {
|
||||
background: linear-gradient(to bottom, #F0F0F0, #FFFFFF);
|
||||
background-size: 100% 100vh;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
|
||||
.custom-wx-checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
color: #fff !important;
|
||||
|
@ -1,8 +1,4 @@
|
||||
page {
|
||||
background: linear-gradient(to bottom, #F0F0F0, #FFFFFF);
|
||||
background-size: 100% 100vh;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
|
||||
.custom-checkbox {
|
||||
font-size: 14px;
|
||||
|
@ -1,9 +1,4 @@
|
||||
/* pages/copyright/payment/payment.wxss */
|
||||
page {
|
||||
background: linear-gradient(to bottom, #F0F0F0, #FFFFFF);
|
||||
background-size: 100% 100vh;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
|
||||
.input-money {
|
||||
font-size: 48rpx;
|
||||
|
@ -1,9 +1,4 @@
|
||||
/* pages/copyright/publicPay/publicPay.wxss */
|
||||
page {
|
||||
background: linear-gradient(to bottom, #F0F0F0, #FFFFFF);
|
||||
background-size: 100vw 100vh;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
|
||||
.container-box {
|
||||
display: flex;
|
||||
|
@ -23,7 +23,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="service-desc ml-10">纳税识别号:{{item.invoiceNumber}}</view>
|
||||
<view class="service-desc ml-10">企业电话:{{item.invoiceOrgtel}}</view>
|
||||
<view wx:if="{{item.invoiceOrgtel != ''}}" class="service-desc ml-10">企业电话:{{item.invoiceOrgtel}}</view>
|
||||
<view class="service-desc ml-5" wx:if="{{item.invoiceOrgaddress != ''}}">
|
||||
<view class="icon-yellow-location" style="width: 32rpx;height: 32rpx;"></view>
|
||||
<view class="ml-10">{{item.invoiceOrgaddress}}</view>
|
||||
|
@ -1,11 +1,4 @@
|
||||
/* pages/mine/mineAccount/mineInvoice/mineInvoice.wxss */
|
||||
page {
|
||||
background: linear-gradient(to bottom, #F0F0F0, #FFFFFF);
|
||||
background-size: 100% 100vh;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.ic-user {
|
||||
|
@ -157,7 +157,7 @@ Page({
|
||||
} else {
|
||||
const idArray = this.data.checkList.map(item => item.accountRechargeId)
|
||||
const ids = idArray.join(',')
|
||||
wx.navigateTo({
|
||||
wx.redirectTo({
|
||||
url: `/pages/mine/mineAccount/makeInvoice/makeInvoice?money=${this.data.money}&ids=${ids}`,
|
||||
})
|
||||
}
|
||||
|
@ -1,9 +1,3 @@
|
||||
/* pages/mine/mineAccount/invoiceOrder/invoiceOrder.wxss */
|
||||
page {
|
||||
background: linear-gradient(to bottom, #F0F0F0, #FFFFFF);
|
||||
background-size: 100% 100vh;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
|
||||
.list-title-btns {
|
||||
|
@ -0,0 +1,33 @@
|
||||
// pages/mine/mineAccount/invoiceRecordDetail/invoiceRecordDetail.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
detailBean: null
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
const beanStr = options.bean
|
||||
const bean = JSON.parse(beanStr)
|
||||
this.setData({
|
||||
detailBean: bean
|
||||
})
|
||||
wx.setNavigationBarTitle({
|
||||
title: '详情',
|
||||
})
|
||||
wx.setNavigationBarColor({
|
||||
frontColor: '#000000', // 必写项,字体颜色仅支持#ffffff和#000000
|
||||
backgroundColor: '#F0F0F0', // 传递的颜色值,仅支持十六进制颜色
|
||||
animation: { // 可选项
|
||||
duration: 500,
|
||||
timingFunc: 'easeIn'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
<view class="page-container">
|
||||
<swiper indicator-dots style="height: 120rpx;" autoplay indicator-active-color="#fff">
|
||||
<swiper-item>
|
||||
<image src="https://www.aimzhu.com/miniapp-assets/banner_1.png" style="width: 100vw;height: 120rpx;"></image>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<image src="https://www.aimzhu.com/miniapp-assets/banner_2.png" style="width: 100vw;height: 120rpx;"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="invoice-info-title mt-40">
|
||||
<view>开票信息</view>
|
||||
<view class="record-title-status {{tools.invoiceStatusColor(detailBean.invoiceStatus)}}">{{tools.invoiceStatus(detailBean.invoiceStatus)}}</view>
|
||||
</view>
|
||||
<view class="invoice-info-box mt-20">
|
||||
<view class="invoice-info-item">
|
||||
<view class="invoice-info-item-title gray-star">公司名称</view>
|
||||
<view class="invoice-info-item-content">
|
||||
{{detailBean.invoiceName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="invoice-info-item">
|
||||
<view class="invoice-info-item-title gray-star">纳税人识别号</view>
|
||||
<view class="invoice-info-item-content">
|
||||
{{detailBean.invoiceNumber}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="invoice-info-item">
|
||||
<view class="invoice-info-item-title gray-star">公司地址</view>
|
||||
<view class="invoice-info-item-content">
|
||||
{{detailBean.invoiceOrgaddress}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="invoice-info-item">
|
||||
<view class="invoice-info-item-title gray-star">联系电话</view>
|
||||
<view class="invoice-info-item-content">
|
||||
{{detailBean.invoiceOrgtel}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="invoice-info-item">
|
||||
<view class="invoice-info-item-title gray-star">开户行</view>
|
||||
<view class="invoice-info-item-content">
|
||||
{{detailBean.invoiceBank}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="invoice-info-item">
|
||||
<view class="invoice-info-item-title gray-star">开户行账号</view>
|
||||
<view class="invoice-info-item-content">
|
||||
{{detailBean.invoiceBanknumber}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="invoice-info-item">
|
||||
<view class="invoice-info-item-title gray-star">开票内容</view>
|
||||
<view class="invoice-info-item-content">
|
||||
{{detailBean.invoicePurpose}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="invoice-info-item">
|
||||
<view class="invoice-info-item-title gray-star">开票税率</view>
|
||||
<view class="invoice-info-item-content">
|
||||
{{detailBean.invoiceTaxrate}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="invoice-info-item">
|
||||
<view class="invoice-info-item-title gray-star">发票类型</view>
|
||||
<view class="invoice-info-item-content">
|
||||
{{detailBean.invoiceClassify}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="invoice-info-title mt-40">开票内容</view>
|
||||
<view class="invoice-info-box mt-20">
|
||||
<view class="invoice-info-item">
|
||||
<view class="invoice-info-item-title gray-star">开票金额</view>
|
||||
<view class="invoice-info-item-content">
|
||||
<rich-text style="font-size: 28rpx;color: red;font-weight: bold;" nodes="{{tools.moneyTxt(10,detailBean.invoiceRechargeMoney)}}"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="invoice-info-item-ver">
|
||||
<view class="invoice-info-item-title" style="align-self: flex-start;">开票备注</view>
|
||||
<view class="invoice-remark">{{detailBean.invoiceRecord}}</view>
|
||||
</view>
|
||||
<view wx:if="{{detailBean != null && detailBean.invoiceStatus =='0'}}">
|
||||
<view class="invoice-info-item-title" style="color: red;">失败原因</view>
|
||||
<view style="padding-left:20rpx;font-size: 28rpx;color: red;font-weight: bold;">{{detailBean.invoiceFinalRecord}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <mp-toptips msg="{{msgHint}}" type="{{msgType}}" show="{{msgShow}}" delay="{{2000}}"></mp-toptips> -->
|
||||
<wxs src="../../../../utils/comm.wxs" module="tools"></wxs>
|
@ -0,0 +1,96 @@
|
||||
/* pages/mine/mineAccount/invoiceRecordDetail/invoiceRecordDetail.wxss */
|
||||
.invoice-info-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.record-title-status {
|
||||
font-size: 24rpx;
|
||||
line-height: 32rpx;
|
||||
height: 32rpx;
|
||||
text-align: center;
|
||||
padding: 5rpx 10rpx;
|
||||
font-weight: bold;
|
||||
min-width: 80rpx;
|
||||
border-radius: 5rpx;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
|
||||
.col-yellow {
|
||||
background-color: #FFA900;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.col-gray {
|
||||
background-color: #ccc;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.col-green {
|
||||
background-color: #90ee90;
|
||||
color: #006400;
|
||||
}
|
||||
|
||||
.col-red {
|
||||
background-color: #f08080;
|
||||
color: #8b0000;
|
||||
}
|
||||
|
||||
|
||||
.invoice-info-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 30rpx;
|
||||
background-color: white;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.invoice-info-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
.invoice-info-item:nth-of-type(n+2) {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.invoice-info-item-title {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.invoice-info-item-content {
|
||||
font-size: 28rpx;
|
||||
padding-left: 20rpx;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
|
||||
.invoice-remark {
|
||||
height: 120rpx;
|
||||
border: 1rpx solid #dbdbdb;
|
||||
align-self: center;
|
||||
border-radius: 10rpx;
|
||||
width: 95%;
|
||||
padding: 10rpx;
|
||||
margin-top: 10rpx;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.invoice-info-item-ver {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
margin-top: 20rpx;
|
||||
}
|
@ -21,6 +21,7 @@ Page({
|
||||
invoiceInfoList: [], //开票信息
|
||||
payOrderIds: '', //开票记录id
|
||||
remark: '', //备注信息
|
||||
editBean: null, //编辑页面传递过来的
|
||||
},
|
||||
|
||||
/**
|
||||
@ -38,10 +39,32 @@ Page({
|
||||
timingFunc: 'easeIn'
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
invoiceMoney: options.money,
|
||||
payOrderIds: options.ids
|
||||
})
|
||||
const ids = options.ids
|
||||
if (ids) {
|
||||
this.setData({
|
||||
invoiceMoney: options.money,
|
||||
payOrderIds: options.ids
|
||||
})
|
||||
} else {
|
||||
const beanStr = options.bean
|
||||
const bean = JSON.parse(beanStr)
|
||||
this.setData({
|
||||
editBean: bean,
|
||||
rateId: bean.invoiceTaxrate,
|
||||
contentId: bean.invoicePurpose,
|
||||
typeId: bean.invoiceClassify,
|
||||
invoiceMoney: bean.invoiceRechargeMoney,
|
||||
payOrderIds: bean.invoiceRechargeIds,
|
||||
remark: bean.invoiceRecord,
|
||||
invoiceInfo: {
|
||||
invoiceId: bean.invoiceId,
|
||||
invoiceName: bean.invoiceName,
|
||||
invoiceNumber: bean.invoiceNumber,
|
||||
invoiceOrgaddress: bean.invoiceOrgaddress,
|
||||
invoiceOrgtel: bean.invoiceOrgtel
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取开票类型
|
||||
//获取开票内容
|
||||
//获取开票税率
|
||||
@ -65,7 +88,6 @@ Page({
|
||||
rateList: res[1],
|
||||
typeList: res[2]
|
||||
})
|
||||
console.log(res)
|
||||
})
|
||||
.catch(err => {
|
||||
wx.hideLoading()
|
||||
@ -173,6 +195,7 @@ Page({
|
||||
return data
|
||||
},
|
||||
doSaveInfo() {
|
||||
//判断编辑 新增
|
||||
const isLegal = this.checkParams()
|
||||
if (isLegal) {
|
||||
wx.showLoading({
|
||||
@ -190,6 +213,9 @@ Page({
|
||||
msgHint: '开票信息提交成功!我们会以最快速度完成开票,还请耐心等待!',
|
||||
msgShow: true
|
||||
})
|
||||
setTimeout(() => {
|
||||
_self.backPageRefresh()
|
||||
}, 1800);
|
||||
} else {
|
||||
this.setData({
|
||||
msgType: 'error',
|
||||
@ -200,7 +226,11 @@ Page({
|
||||
})
|
||||
.catch(err => {
|
||||
wx.hideLoading()
|
||||
console.log(err)
|
||||
this.setData({
|
||||
msgType: 'error',
|
||||
msgHint: err.msg ? err.msg : '发票开取失败,请稍后重试',
|
||||
msgShow: true
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
@ -239,6 +269,59 @@ Page({
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
//提交
|
||||
confirmSubmit() {
|
||||
if (this.data.bean != null && this.data.bean.invoiceRechargeId != '') {
|
||||
this.doSaveInfo()
|
||||
} else {
|
||||
this.doEditInfo()
|
||||
}
|
||||
},
|
||||
//编辑
|
||||
doEditInfo() {
|
||||
const isLegal = this.checkParams()
|
||||
if (isLegal) {
|
||||
const data = this.buildParams()
|
||||
const _self = this
|
||||
wx.showLoading({
|
||||
title: '提交中...',
|
||||
})
|
||||
InvoiceApi.doUpdateInvoiceRecord(_self.data.editBean.invoiceRechargeId, data)
|
||||
.then(res => {
|
||||
wx.hideLoading()
|
||||
if (res.data && res.data != '') {
|
||||
this.setData({
|
||||
msgType: 'success',
|
||||
msgHint: '开票信息编辑成功!我们会以最快速度完成开票,还请耐心等待!',
|
||||
msgShow: true
|
||||
})
|
||||
setTimeout(() => {
|
||||
_self.backPageRefresh()
|
||||
}, 1800);
|
||||
} else {
|
||||
this.setData({
|
||||
msgType: 'error',
|
||||
msgHint: '发票信息编辑失败,请稍后重试',
|
||||
msgShow: true
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
wx.hideLoading()
|
||||
this.setData({
|
||||
msgType: 'error',
|
||||
msgHint: err.msg ? err.msg : '发票信息编辑失败,请稍后重试',
|
||||
msgShow: true
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
backPageRefresh() {
|
||||
const _self = this
|
||||
let pages = getCurrentPages();
|
||||
let beforePage = pages[pages.length - 2];
|
||||
beforePage.doRefreshList()
|
||||
wx.navigateBack()
|
||||
}
|
||||
|
||||
})
|
@ -19,7 +19,7 @@
|
||||
<view class="invoice-info-item-content">
|
||||
<radio-group class="custom-radio-group" bindchange="changeType">
|
||||
<block wx:for="{{typeList}}" wx:key="index">
|
||||
<radio class="custom-radio" value="{{item.dataName}}">{{item.dataName}}</radio>
|
||||
<radio checked="{{typeId==item.dataName}}" class="custom-radio" value="{{item.dataName}}">{{item.dataName}}</radio>
|
||||
</block>
|
||||
</radio-group>
|
||||
</view>
|
||||
@ -29,7 +29,7 @@
|
||||
<view class="invoice-info-item-content">
|
||||
<radio-group class="custom-radio-group" bindchange="changeContent">
|
||||
<block wx:for="{{contentList}}" wx:key="index">
|
||||
<radio class="custom-radio" value="{{item.dataName}}">{{item.dataName}}</radio>
|
||||
<radio checked="{{contentId==item.dataName}}" class="custom-radio" value="{{item.dataName}}">{{item.dataName}}</radio>
|
||||
</block>
|
||||
</radio-group>
|
||||
</view>
|
||||
@ -39,7 +39,7 @@
|
||||
<view class="invoice-info-item-content">
|
||||
<radio-group class="custom-radio-group" bindchange="changeRate">
|
||||
<block wx:for="{{rateList}}" wx:key="index">
|
||||
<radio class="custom-radio" value="{{item.dataName}}">{{item.dataName}}</radio>
|
||||
<radio checked="{{rateId==item.dataName}}" class="custom-radio" value="{{item.dataName}}">{{item.dataName}}</radio>
|
||||
</block>
|
||||
</radio-group>
|
||||
</view>
|
||||
@ -55,11 +55,15 @@
|
||||
</view>
|
||||
<view class="invoice-info-item-ver">
|
||||
<view class="invoice-info-item-title" style="align-self: flex-start;">开票备注</view>
|
||||
<textarea class="invoice-remark" bindinput="inputRemark" placeholder-style="color:#dbdbdb;" placeholder="请输入备注信息"></textarea>
|
||||
<textarea class="invoice-remark" value="{{remark}}" bindinput="inputRemark" placeholder-style="color:#dbdbdb;" placeholder="请输入备注信息"></textarea>
|
||||
</view>
|
||||
<view wx:if="{{editBean != null && editBean.invoiceStatus == '0'}}">
|
||||
<view class="invoice-info-item-title" style="color: red;">失败原因</view>
|
||||
<view style="padding-left:20rpx;font-size: 28rpx;color: red;font-weight: bold;">{{editBean.invoiceFinalRecord}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom-btn">
|
||||
<view class="confirm-btn" bind:tap="doSaveInfo">提交</view>
|
||||
<view class="confirm-btn" bind:tap="confirmSubmit">提交</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 开票信息 -->
|
||||
|
@ -1,9 +1,4 @@
|
||||
/* pages/mine/mineAccount/makeInvoice/makeInvoice.wxss */
|
||||
page {
|
||||
background: linear-gradient(to bottom, #F0F0F0, #FFFFFF);
|
||||
background-size: 100% 100vh;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
|
||||
.invoice-info-title {
|
||||
font-size: 36rpx;
|
||||
|
@ -1,11 +1,3 @@
|
||||
page {
|
||||
background: linear-gradient(to bottom, #F0F0F0, #FFFFFF);
|
||||
background-size: 100% 100vh;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.ic-user {
|
||||
background-image: url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB0PSIxNzQzOTg4MzkwNjkwIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjM0MDkiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTUxMiAxMDI0QzIyOS4yMDUzMzMgMTAyNCAwIDc5NC43OTQ2NjcgMCA1MTJTMjI5LjIwNTMzMyAwIDUxMiAwczUxMiAyMjkuMjA1MzMzIDUxMiA1MTItMjI5LjIwNTMzMyA1MTItNTEyIDUxMnogbTAtNDk2LjQ2OTMzM2ExNzAuNjY2NjY3IDE3MC42NjY2NjcgMCAxIDAgMC0zNDEuMzMzMzM0IDE3MC42NjY2NjcgMTcwLjY2NjY2NyAwIDAgMCAwIDM0MS4zMzMzMzR6IG0yNjMuNzY1MzMzIDI2My43MjI2NjZhMjYzLjc2NTMzMyAyNjMuNzY1MzMzIDAgMSAwLTUyNy41MzA2NjYgMGg1MjcuNTMwNjY2eiIgcC1pZD0iMzQxMCIgZmlsbD0iIzEyOTZkYiI+PC9wYXRoPjwvc3ZnPg==');
|
||||
background-size: cover;
|
||||
|
@ -1,9 +1,3 @@
|
||||
/* pages/mine/mineAccount/mineCoupons/mineCoupons.wxss */
|
||||
page {
|
||||
background: linear-gradient(to bottom, #F0F0F0, #FFFFFF);
|
||||
background-size: 100% 100vh;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.list-title-btns {
|
||||
position: fixed;
|
||||
|
@ -1,9 +1,4 @@
|
||||
/* pages/mine/mineAccount/mineInfo/mineInfo.wxss */
|
||||
page {
|
||||
background: linear-gradient(to bottom, #F0F0F0, #FFFFFF);
|
||||
background-size: 100% 100vh;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
|
||||
.info-container {
|
||||
height: 100vh;
|
||||
|
@ -122,5 +122,67 @@ Page({
|
||||
wx.navigateTo({
|
||||
url: '/pages/mine/mineAccount/invoiceOrder/invoiceOrder',
|
||||
})
|
||||
},
|
||||
//取消开票
|
||||
cancelRecord(e) {
|
||||
const item = e.currentTarget.dataset.value
|
||||
const _self = this
|
||||
wx.showModal({
|
||||
title: '警告',
|
||||
content: '请问您是否真的想要取消此次开票操作?',
|
||||
complete: (res) => {
|
||||
if (res.confirm) {
|
||||
_self.doCancelInvoiceRecord(item)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//取消开票
|
||||
doCancelInvoiceRecord(item) {
|
||||
const _self = this
|
||||
wx.showLoading({
|
||||
title: '取消中...',
|
||||
})
|
||||
InvoiceApi.doCancelInvoiceRecord(item.invoiceRechargeId)
|
||||
.then(res => {
|
||||
wx.hideLoading()
|
||||
console.log(res)
|
||||
_self.setData({
|
||||
msgHint: '取消成功',
|
||||
msgType: 'success',
|
||||
msgShow: true
|
||||
})
|
||||
_self.doRefreshList()
|
||||
})
|
||||
.catch(err => {
|
||||
wx.hideLoading()
|
||||
_self.setData({
|
||||
msgHint: err.msg ? err.msg : '取消出错了,请稍后重试',
|
||||
msgShow: true,
|
||||
msgType: 'error'
|
||||
})
|
||||
})
|
||||
},
|
||||
//去修改
|
||||
doUpdate(e) {
|
||||
const item = e.currentTarget.dataset.value
|
||||
const params = JSON.stringify(item)
|
||||
const _self = this
|
||||
wx.navigateTo({
|
||||
url: '/pages/mine/mineAccount/makeInvoice/makeInvoice?bean=' + params,
|
||||
events: {
|
||||
refreshData: function (data) {
|
||||
console.log('刷新')
|
||||
_self.doRefreshList()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
openDetail(e) {
|
||||
const item = e.currentTarget.dataset.value
|
||||
const params = JSON.stringify(item)
|
||||
wx.navigateTo({
|
||||
url: '/pages/mine/mineAccount/invoiceRecordDetail/invoiceRecordDetail?bean=' + params,
|
||||
})
|
||||
}
|
||||
})
|
@ -14,16 +14,16 @@
|
||||
<view class="order-item">
|
||||
<view class="record-title-box">
|
||||
<view class="record-title-status {{tools.invoiceStatusColor(item.invoiceStatus)}}">{{tools.invoiceStatus(item.invoiceStatus)}}</view>
|
||||
<view class="record-title-name">{{item.invoiceName}}</view>
|
||||
<view bind:tap="openDetail" data-value="{{item}}" class="record-title-name">{{item.invoiceName}}</view>
|
||||
<view class="record-options">
|
||||
<view wx:if="{{item.invoiceStatus==-1}}" class="options-btn green">修改</view>
|
||||
<view wx:if="{{item.invoiceStatus==1 || item.invoiceStatus==0}}" class="options-btn red" bind:tap="cancelRecord" data-value="{{item}}">取消</view>
|
||||
<view wx:if="{{item.invoiceStatus=='-1' || item.invoiceStatus=='0'}}" class="options-btn green" bind:tap="doUpdate" data-value="{{item}}">修改</view>
|
||||
<view wx:if="{{item.invoiceStatus=='1'}}" class="options-btn red" bind:tap="cancelRecord" data-value="{{item}}">取消</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="record-number mt-10">纳税人识别号: {{item.invoiceNumber}}</view>
|
||||
<view class="record-bottom-box mt-10">
|
||||
<rich-text style="font-size: 40rpx;color: red;" nodes="{{tools.moneyTxt(10,item.invoiceRechargeMoney)}}"></rich-text>
|
||||
<view bind:tap="openDetail" data-value="{{item}}" class="record-number mt-10">纳税人识别号: {{item.invoiceNumber}}</view>
|
||||
<view bind:tap="openDetail" data-value="{{item}}" class="record-bottom-box mt-10">
|
||||
<view class="record-time icon-time">{{item.gmtCreate}}</view>
|
||||
<rich-text style="font-size: 40rpx;color: red;" nodes="{{tools.moneyTxt(10,item.invoiceRechargeMoney)}}"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
@ -1,9 +1,3 @@
|
||||
/* pages/mine/mineAccount/mineInvoice/mineInvoice.wxss */
|
||||
page {
|
||||
background: linear-gradient(to bottom, #F0F0F0, #FFFFFF);
|
||||
background-size: 100% 100vh;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1,8 +1,3 @@
|
||||
page {
|
||||
background: linear-gradient(to bottom, #F0F0F0, #FFFFFF);
|
||||
background-size: 100vw 100vh;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
position: fixed;
|
||||
|
@ -1,8 +1,4 @@
|
||||
page {
|
||||
background: linear-gradient(to bottom, #F5F5F5, #FFFFFF);
|
||||
background-size: 100vw 100vh;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
|
||||
.search-box {
|
||||
position: fixed;
|
||||
|
@ -1,9 +1,4 @@
|
||||
/* pages/treaty/privacy/privacy.wxss */
|
||||
page {
|
||||
background: linear-gradient(to bottom, #F0F0F0, #FFFFFF);
|
||||
background-size: 100% 100vh;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.content-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -55,16 +55,16 @@ var invoiceStatusColor = function (status) {
|
||||
var str = 'col-yellow'
|
||||
// -1:用户取消,0:开票失败,1:开票中,2:开票完成
|
||||
switch (status) {
|
||||
case -1:
|
||||
case '-1':
|
||||
str = 'col-gray'
|
||||
break
|
||||
case 0:
|
||||
case '0':
|
||||
str = 'col-red'
|
||||
break
|
||||
case 1:
|
||||
case '1':
|
||||
str = 'col-yellow'
|
||||
break
|
||||
case 2:
|
||||
case '2':
|
||||
str = 'col-green'
|
||||
break
|
||||
|
||||
@ -75,19 +75,18 @@ var invoiceStatus = function (status) {
|
||||
var str = '待审核'
|
||||
// -1:用户取消,0:开票失败,1:开票中,2:开票完成
|
||||
switch (status) {
|
||||
case -1:
|
||||
case '-1':
|
||||
str = '已取消'
|
||||
break
|
||||
case 0:
|
||||
case '0':
|
||||
str = '未通过'
|
||||
break
|
||||
case 1:
|
||||
case '1':
|
||||
str = '待审核'
|
||||
break
|
||||
case 2:
|
||||
case '2':
|
||||
str = '完成'
|
||||
break
|
||||
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user