修改发票信息联调错误,修改充值记录按表计查询,我的新增发票抬头
This commit is contained in:
parent
b7e831662e
commit
cbe7db0ac1
6
app.json
6
app.json
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"pages": [
|
||||
"pages/home/index",
|
||||
"pages/rechargeRecord/index",
|
||||
"pages/invoiceList/index",
|
||||
"pages/invoiceDetail/index",
|
||||
"pages/invoiceDetailContent/index",
|
||||
"pages/invoicing/index",
|
||||
"pages/rechargeRecord/index",
|
||||
"pages/member/index",
|
||||
"pages/login/index",
|
||||
"pages/handleLogin/index",
|
||||
|
@ -18,8 +18,8 @@
|
|||
"pages/questions/index",
|
||||
"pages/editInvoice/index",
|
||||
"pages/rechargeDetail/index",
|
||||
"pages/agreements/index"
|
||||
|
||||
"pages/agreements/index",
|
||||
"pages/updateInvoice/index"
|
||||
],
|
||||
"tabBar": {
|
||||
"list": [
|
||||
|
|
|
@ -5,7 +5,10 @@ Component({
|
|||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
|
||||
text: {
|
||||
type: String,
|
||||
value: '暂无数据'
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -19,6 +22,8 @@ Component({
|
|||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
|
||||
refresh() {
|
||||
this.triggerEvent("refresh")
|
||||
}
|
||||
}
|
||||
})
|
|
@ -1,4 +1,4 @@
|
|||
<!--components/empty/index.wxml-->
|
||||
<van-empty description="描述文字">
|
||||
<van-button round type="danger" class="bottom-button">按钮</van-button>
|
||||
<van-empty description="{{text}}">
|
||||
<van-button type="info" bind:click="refresh" custom-style="width: 300rpx; margin-top:60rpx;" > 刷 新 </van-button>
|
||||
</van-empty>
|
|
@ -1 +1,5 @@
|
|||
/* components/empty/index.wxss */
|
||||
.bottom-button {
|
||||
width: 320rpx;
|
||||
height: 80rpx;
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
import { getAlreadyInvoiceList } from "../../../../service/invoice"
|
||||
import { alertInfo } from "../../../../utils/index";
|
||||
import { alertInfo, loadingFunc } from "../../../../utils/index";
|
||||
import request from '../../../../utils/request'
|
||||
const { OK } = request;
|
||||
// pages/invoiceList/components/already/index.js
|
||||
|
@ -43,8 +43,11 @@ Component({
|
|||
page: page + 1,
|
||||
})
|
||||
},
|
||||
onRefresh() {
|
||||
loadingFunc(() => this.getList())
|
||||
},
|
||||
scrollToLower() {
|
||||
this.getList();
|
||||
loadingFunc(() => this.getList())
|
||||
},
|
||||
jumpToDetail() {
|
||||
wx.navigateTo({
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"van-button": "@vant/weapp/button/index"
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"empty": "/components/empty/index"
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
<!--pages/invoiceList/components/already/index.wxml-->
|
||||
|
||||
|
||||
<scroll-view scroll-y lower-threshold="100px" bindscrolltolower="scrollToLower" style="height: 80vh;" scroll-top="{{topHeight}}px" class="scrView">
|
||||
<scroll-view wx:if="{{list.length}}" scroll-y lower-threshold="100px" bindscrolltolower="scrollToLower" style="height: 80vh;" scroll-top="{{topHeight}}px" class="scrView">
|
||||
<view class="card" wx:for="{{list}}">
|
||||
<view class="left">
|
||||
<view class="title">
|
||||
|
@ -29,3 +29,6 @@
|
|||
</view>
|
||||
<view style="height: 50rpx;"></view>
|
||||
</scroll-view>
|
||||
<view wx:else>
|
||||
<empty text="暂无数据" bind:refresh="onRefresh" />
|
||||
</view>
|
|
@ -29,8 +29,8 @@
|
|||
</view>
|
||||
|
||||
<view wx:else slot="input" style="margin-top: -10rpx;">
|
||||
<view wx:if="{{formData.type === 0}}"> 普通电子发票 </view>
|
||||
<view wx:elif="{{formData.type === 1}}"> 增值税专用电子发票 </view>
|
||||
<view wx:if="{{detail.type === 0}}"> 普通电子发票 </view>
|
||||
<view wx:elif="{{detail.type === 1}}"> 增值税专用电子发票 </view>
|
||||
<view wx:else>-</view>
|
||||
</view>
|
||||
</van-field>
|
||||
|
@ -44,7 +44,7 @@
|
|||
border="{{ editType === 'detail' ? false : true }}"
|
||||
>
|
||||
<view slot="input" style="margin-top: 16rpx;" wx:if="{{editType === 'edit'}}">
|
||||
<van-radio-group direction="horizontal" bind:change="onChangeHeaderType">
|
||||
<van-radio-group direction="horizontal" bind:change="onChangeHeaderType" value="{{formData.headerType}}">
|
||||
<van-radio name="{{0}}" icon-size="30rpx" style="font-size: 30rpx;margin-bottom: 20rpx;">企业单位</van-radio>
|
||||
<van-radio name="{{1}}" icon-size="30rpx" style="font-size: 30rpx;">个人/非企业单位</van-radio>
|
||||
</van-radio-group>
|
||||
|
@ -54,8 +54,8 @@
|
|||
slot="input"
|
||||
style="margin-top: -10rpx;"
|
||||
>
|
||||
<view wx:if="{{formData.headerType === 0}}"> 企业单位 </view>
|
||||
<view wx:elif="{{formData.headerType === 1}}"> 个人/非企业单位 </view>
|
||||
<view wx:if="{{detail.headerType === 0}}"> 企业单位 </view>
|
||||
<view wx:elif="{{detail.headerType === 1}}"> 个人/非企业单位 </view>
|
||||
<view wx:else>-</view>
|
||||
</view>
|
||||
</van-field>
|
||||
|
@ -83,7 +83,7 @@
|
|||
<van-field
|
||||
value="{{detail.tin}}"
|
||||
label="发票税号"
|
||||
wx:if="{{formData.headerType === 0}}"
|
||||
wx:if="{{(editType === 'edit' && formData.headerType === 0) || (editType === 'detail' && detail.headerType === 0)}}"
|
||||
placeholder="{{editType === 'edit' ? '请输入发票税号' : ''}}"
|
||||
custom-style="padding-left: 0; padding-right: 0;"
|
||||
readonly="{{editType === 'detail'}}"
|
||||
|
@ -104,7 +104,7 @@
|
|||
<van-field
|
||||
value="{{detail.bank}}"
|
||||
label="开户行"
|
||||
wx:if="{{formData.headerType === 0}}"
|
||||
wx:if="{{(editType === 'edit' && formData.headerType === 0) || (editType === 'detail' && detail.headerType === 0)}}"
|
||||
placeholder="{{editType === 'edit' ? '请输入开户行' : ''}}"
|
||||
custom-style="padding-left: 0; padding-right: 0;"
|
||||
readonly="{{editType === 'detail'}}"
|
||||
|
@ -125,7 +125,7 @@
|
|||
<van-field
|
||||
value="{{detail.account}}"
|
||||
label="银行账号"
|
||||
wx:if="{{formData.headerType === 0}}"
|
||||
wx:if="{{(editType === 'edit' && formData.headerType === 0) || (editType === 'detail' && detail.headerType === 0)}}"
|
||||
placeholder="{{editType === 'edit' ? '请输入银行账号' : ''}}"
|
||||
custom-style="padding-left: 0; padding-right: 0;"
|
||||
readonly="{{editType === 'detail'}}"
|
||||
|
@ -146,7 +146,7 @@
|
|||
<van-field
|
||||
value="{{detail.address}}"
|
||||
label="地址"
|
||||
wx:if="{{formData.headerType === 0}}"
|
||||
wx:if="{{(editType === 'edit' && formData.headerType === 0) || (editType === 'detail' && detail.headerType === 0)}}"
|
||||
placeholder="{{editType === 'edit' ? '请输入地址' : ''}}"
|
||||
custom-style="padding-left: 0; padding-right: 0;"
|
||||
readonly="{{editType === 'detail'}}"
|
||||
|
@ -167,7 +167,7 @@
|
|||
<van-field
|
||||
value="{{detail.phone}}"
|
||||
label="电话"
|
||||
wx:if="{{formData.headerType === 0}}"
|
||||
wx:if="{{(editType === 'edit' && formData.headerType === 0) || (editType === 'detail' && detail.headerType === 0)}}"
|
||||
placeholder="{{editType === 'edit' ? '请输入电话' : ''}}"
|
||||
custom-style="padding-left: 0; padding-right: 0;"
|
||||
readonly="{{editType === 'detail'}}"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// pages/invoiceList/components/notyet/index.js
|
||||
import { getInvoiceList } from '../../../../service/invoice';
|
||||
import { alertInfo } from '../../../../utils/index';
|
||||
import { alertInfo, loadingFunc } from '../../../../utils/index';
|
||||
import request from '../../../../utils/request';
|
||||
const { OK } = request;
|
||||
|
||||
|
@ -40,6 +40,9 @@ Component({
|
|||
// }
|
||||
this.setData({ list: data, selectList: new Array(data?.length).map(() => false) })
|
||||
},
|
||||
onRefresh() {
|
||||
loadingFunc(() => this.init())
|
||||
},
|
||||
onChange(e) {
|
||||
const { id, index } = e.currentTarget.dataset;
|
||||
// let newList = this.data.chooseList;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"component": true,
|
||||
"usingComponents": {
|
||||
"van-checkbox": "@vant/weapp/checkbox/index",
|
||||
"van-button": "@vant/weapp/button/index"
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"empty": "/components/empty/index"
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
<view wx:if="{{list.length}}">
|
||||
|
||||
<van-checkbox-group value="{{ chooseList }}" bind:change="onChange" max="{{ 2 }}">
|
||||
<van-checkbox-group value="{{ chooseList }}" bind:change="onChange" max="{{ 2 }}" >
|
||||
<view class="cardWrapper" wx:for="{{list}}" wx:key="index">
|
||||
<view class="content">
|
||||
<view class="left">
|
||||
|
@ -29,5 +30,8 @@
|
|||
<view class="allMoney"> ¥ {{selectMoney}} </view>
|
||||
<van-button size="small" type="info" bind:click="next" disabled="{{!selectCount}}"> 下一步 </van-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view wx:else>
|
||||
<empty bind:refresh="onRefresh" />
|
||||
</view>
|
||||
|
|
|
@ -17,7 +17,7 @@ Page({
|
|||
{ name: '删除', },
|
||||
],
|
||||
selectData: {},
|
||||
active: 1,
|
||||
active: 0,
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -67,6 +67,11 @@ Page({
|
|||
this.setData({ user: result.data })
|
||||
wx.setStorageSync('user', result.data)
|
||||
},
|
||||
jumpToUpdateInvoice() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/updateInvoice/index',
|
||||
})
|
||||
},
|
||||
async getUnReadNumber() {
|
||||
const dot = await getDot();
|
||||
this.setData({
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</van-cell>
|
||||
<van-cell title="发票抬头" value="" is-link bind:tap="jumpToUpdateInvoice" />
|
||||
<van-cell title="绑定企业" value="" is-link bind:tap="bindTenement" />
|
||||
<van-cell title="退出登录" value="" is-link bind:tap="logout" />
|
||||
<!-- </van-cell-group> -->
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getRechargeList } from "../../service/recharge";
|
||||
import { getOwnTenementList } from "../../service/tenement";
|
||||
import { getTenementMeterList } from "../../service/meter";
|
||||
import { getYears, alertInfo } from "../../utils/index";
|
||||
import request from "../../utils/request";
|
||||
const { OK } = request;
|
||||
|
@ -16,13 +16,13 @@ Page({
|
|||
list: [
|
||||
|
||||
],
|
||||
tenement: "",
|
||||
tenementName: "",
|
||||
show: false,
|
||||
columns: [],
|
||||
type: "",
|
||||
title: "",
|
||||
amount: 0,
|
||||
codeId: "",
|
||||
meterCode: ""
|
||||
},
|
||||
clickYear() {
|
||||
this.setData({
|
||||
|
@ -32,12 +32,12 @@ Page({
|
|||
title: "年份"
|
||||
})
|
||||
},
|
||||
clickTenement() {
|
||||
clickMeter() {
|
||||
this.setData({
|
||||
type: "tenement",
|
||||
columns: this.data.tenements,
|
||||
type: "meter",
|
||||
columns: this.data.meterList.map(item => ({ id: item.id, name: `${item.code}-${item.address}`, code: item.code })),
|
||||
show: true,
|
||||
title: "商户"
|
||||
title: "表计"
|
||||
})
|
||||
},
|
||||
onOk(e) {
|
||||
|
@ -46,8 +46,8 @@ Page({
|
|||
this.onChangeYear(value.id)
|
||||
return;
|
||||
}
|
||||
if (type === "tenement") {
|
||||
this.onChangeTenement(value)
|
||||
if (type === "meter") {
|
||||
this.onChangeMeter(value)
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
@ -75,14 +75,15 @@ Page({
|
|||
})
|
||||
this.init(currentYear, tenement)
|
||||
},
|
||||
onChangeTenement(e) {
|
||||
const { id, name } = e;
|
||||
onChangeMeter(e) {
|
||||
const { id, code } = e;
|
||||
console.log('e', e)
|
||||
const { year } = this.data;
|
||||
// const currentYear = years[Number(e)]
|
||||
this.setData({
|
||||
// year: currentYear,
|
||||
tenement: id,
|
||||
tenementName: name,
|
||||
codeId: id,
|
||||
meterCode: code,
|
||||
type: "",
|
||||
show: false,
|
||||
title: ""
|
||||
|
@ -93,26 +94,28 @@ Page({
|
|||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
const { year, tenement } = this.data;
|
||||
this.init(year, tenement);
|
||||
this.getTenementsList();
|
||||
const { year } = this.data;
|
||||
const tenement = wx.getStorageSync('tenement')
|
||||
this.init(year, '');
|
||||
this.getMeters(tenement?.id);
|
||||
},
|
||||
async getTenementsList() {
|
||||
const { code, message, data } = await getOwnTenementList()
|
||||
refreshEmpty() {
|
||||
const tenement = wx.getStorageSync('tenement')
|
||||
this.init(year, '');
|
||||
this.init(year, tenement);
|
||||
},
|
||||
async getMeters(id) {
|
||||
const { code, message, data } = await getTenementMeterList(id);
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
return
|
||||
}
|
||||
let tenements = [{id: "", name: "全部"}];
|
||||
data.forEach(item => {
|
||||
if (item.tenements) {
|
||||
tenements = [...tenements, ...item.tenements]
|
||||
return;
|
||||
}
|
||||
this.setData({
|
||||
meterList: data || [],
|
||||
})
|
||||
this.setData({ tenements })
|
||||
},
|
||||
async init(year, tenement) {
|
||||
const { code, message, data = [], amount = 0 } = await getRechargeList(year, tenement);
|
||||
async init(year, codeId) {
|
||||
const { code, message, data = [], amount = 0 } = await getRechargeList(year, codeId);
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
return;
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
"scrollPageWrapper": "/components/scrollPageWrapper/index",
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"custom-status-bar": "/components/customStatusBar/index",
|
||||
"custom-picker": "/components/picker/index"
|
||||
"custom-picker": "/components/picker/index",
|
||||
"empty": "/components/empty/index"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
}
|
|
@ -8,8 +8,8 @@
|
|||
</view>
|
||||
<!-- </picker> -->
|
||||
<!-- <picker bindchange="onChangeYear" value="{{index}}" range="{{years}}"> -->
|
||||
<view class="tenementPicker" bind:tap="clickTenement">
|
||||
<view wx:if="{{tenementName}}" class="tenementName"> {{ tenementName }} </view>
|
||||
<view class="tenementPicker" bind:tap="clickMeter">
|
||||
<view wx:if="{{meterCode}}" class="tenementName"> {{ meterCode }} </view>
|
||||
<view wx:else> 全部 </view>
|
||||
<image src="/assets/images/down.png" mode="" class="down" />
|
||||
</view>
|
||||
|
@ -18,7 +18,7 @@
|
|||
合计: {{amount}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrapper">
|
||||
<view class="wrapper" wx:if="{{list.length}}">
|
||||
<view class="recordsWrapper">
|
||||
<view class="recordsItem border" wx:for="{{list}}" wx:key="index" bind:tap="jumpToDetail" data-id="{{item.id}}">
|
||||
<view class="type"> 充值 </view>
|
||||
|
@ -31,5 +31,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view wx:else>
|
||||
<empty bind:refresh="refreshEmpty" />
|
||||
</view>
|
||||
<custom-picker title="{{title}}" show="{{show}}" valueKey="name" columns="{{columns}}" bind:ok="onOk" bind:cancel="onCancel" type="{{type}}" />
|
66
pages/updateInvoice/index.js
Normal file
66
pages/updateInvoice/index.js
Normal file
|
@ -0,0 +1,66 @@
|
|||
// pages/updateInvoice/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
7
pages/updateInvoice/index.json
Normal file
7
pages/updateInvoice/index.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"navigator": "/components/navigator/index",
|
||||
"info": "/pages/invoiceList/components/info/index"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
}
|
3
pages/updateInvoice/index.wxml
Normal file
3
pages/updateInvoice/index.wxml
Normal file
|
@ -0,0 +1,3 @@
|
|||
<!--pages/updateInvoice/index.wxml-->
|
||||
<navigator title="发票抬头" canBack="{{true}}" />
|
||||
<info />
|
1
pages/updateInvoice/index.wxss
Normal file
1
pages/updateInvoice/index.wxss
Normal file
|
@ -0,0 +1 @@
|
|||
/* pages/updateInvoice/index.wxss */
|
|
@ -2,8 +2,9 @@ import apis from '../utils/request';
|
|||
const { GET, POST, PUT, DELETE } = apis
|
||||
|
||||
// 获取充值记录
|
||||
export const getRechargeList = async function(year, tenement) {
|
||||
return await GET(`/wx/getRechargeList?year=${year}&tenement=${tenement}`);
|
||||
export const getRechargeList = async function(year, codeId) {
|
||||
const tenement = wx.getStorageSync('tenement')?.id
|
||||
return await GET(`/wx/getRechargeList?year=${year}&tenement=${tenement}&codeId=${codeId}`);
|
||||
}
|
||||
|
||||
// 预备充值请求
|
||||
|
|
Loading…
Reference in New Issue
Block a user