【update】 发票信息页面功能的增加、报名页面增加编辑、删除功能

This commit is contained in:
fengchenchen
2023-07-23 18:14:54 +08:00
parent 23b68045f9
commit 803d80d363
24 changed files with 1088 additions and 230 deletions
+125
View File
@@ -0,0 +1,125 @@
import UserApi from '../../assets/js/http/userApi'
import { appName } from '../../assets/js/project.config'
Page({
/**
* 页面的初始数据
*/
data: {
statusBarHeight: wx.getSystemInfoSync()['statusBarHeight'],
index: 0,
list: [], // 项目列表
searchParams: {
pageNo: 1,
pageSize: 10,
needInvoice: '', // 是否需要发票 0 4
pack: '', // 是否打包 0 1
year: '', // 运行年份
particularYear:'',// 资料网元的运行年份,
// 创建时间倒叙排序
column:'createTime',
order:'desc'
},
pageTitle:'发票'
},
goBack(){
wx.navigateBack()
},
// 发票改变
bindNeedInvoiceChange(e){
this.data.searchParams.pageNo = 1
if(e.detail.value == 0) {
this.setData({
"searchParams.needInvoice": 1,
})
}else{
this.setData({
"searchParams.needInvoice": 0,
})
}
this.loadData()
},
// 打包改变
bindPackChange(e){
this.data.searchParams.pageNo = 1
if(e.detail.value == 0) {
this.setData({
"searchParams.pack": 1,
})
}else{
this.setData({
"searchParams.pack": 0,
})
}
this.loadData()
},
bindDateChange(e){
this.data.searchParams.pageNo = 1
// 资料网员的年份查询字段与其他的不一样
if(this.data.type === 'ziliao'){
this.setData({
"searchParams.particularYear": e.detail.value
})
}else{
this.setData({
"searchParams.year": e.detail.value
})
}
this.loadData()
},
// 项目详情
projectDetail(e){
let project = e.currentTarget.dataset.project
let num = project.postNo
// num = 'SF1632615984954'
wx.navigateTo({
url: `plugin://kdPlugin/index?num=${num}&appName=${appName}`,
})
// wx.navigateTo({
// url: `../projectDetail/projectDetail?id=${e.currentTarget.dataset.project.id}&type=${this.data.type}&workingGroupId=${e.currentTarget.dataset.project.workingGroupId}`,
// })
},
loadData(){
const that = this
wx.showToast({
title: '加载中...',
icon: 'loading'
})
UserApi.getVoiceMailList(this.data.searchParams).then(res=>{
if(res.success){
// 搜索时,把原数据清空,重新筛选
if(that.data.searchParams.pageNo === 1) {
that.setData({
list: []
})
}
if(res.result.records && res.result.records.length){
that.setData({
list: [...that.data.list, ...res.result.records]
})
}
}
}).catch(err=>{
wx.showToast({
title: '加载失败',
icon: 'none',
duration: 2000
})
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.loadData()
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
this.data.searchParams.pageNo++
this.loadData()
},
})
+4
View File
@@ -0,0 +1,4 @@
{
"navigationStyle": "custom",
"usingComponents": {}
}
+57
View File
@@ -0,0 +1,57 @@
<!--发票信息 自定义头部start -->
<view class="custom flex_center" style="padding-top:{{statusBarHeight}}px">
<image src="../../assets/images/back.png" bindtap="goBack"></image>
<text>{{pageTitle}}</text>
</view>
<view class="empty_custom" style="padding-top:{{statusBarHeight}}px"></view><!-- 空view用来填充自定义头部的padding-top -->
<!-- 自定义头部end -->
<!--pages/meeting/meeting.wxml首页会议活动-->
<!-- <view class="select-list"> -->
<!-- 发票 -->
<!-- <view class="select-item">
<picker bindchange="bindNeedInvoiceChange" range="{{['是','否']}}">
<view class="picker">
<text>发票</text>
</view>
</picker>
</view> -->
<!-- 打包 -->
<!-- <view class="select-item">
<picker bindchange="bindPackChange" range="{{['是','否']}}">
<view class="picker">
<text>打包</text>
</view>
</picker>
</view> -->
<!-- 年份 -->
<!-- <view class="select-item">
<picker mode="date" fields="year" start="2000" end="2050" bindchange="bindDateChange">
<view class="picker">
<text>时间</text>
</view>
</picker>
</view> -->
<!-- </view> -->
<view class="list">
<view class="list-item" wx:for="{{list}}" bindtap="projectDetail" wx:key="item" data-project="{{item}}">
<!-- <view class="title"> -->
<!-- <text>{{item.projectName}}</text> -->
<!-- <text>{{item.year || item.particularYear}}年</text> -->
<!-- </view> -->
<!-- 工作组项目展示begin -->
<block>
<view class="item-content">项目名称:{{item.projectName }}</view>
<!-- <view class="item-content">项目类型:{{item.projectType }}</view> -->
<view class="item-content">开票金额:{{item.invoiceAmount }} 元</view>
<view class="item-content">项目负责人:{{item.principalName}}</view>
<view class="item-content">邮寄联系人:{{item.contactName}}</view>
<view class="item-content">状态:{{item.postStatus_dictText}}</view>
<!-- <view class="item-content">缴费凭证:{{item.paymentStatus_dictText || '无'}}</view> -->
</block>
</view>
</view>
<view wx:if="{{list.length === 0}}" class="no-data">
<text>暂无数据</text>
</view>
<popup visible="{{visible}}" bindclose="close" outClickCanClose="true" bindok="ok" data="{{data}}"></popup>
<dateMonth visible="{{visibleDate}}" mode="year" outClickCanClose="true" bindok="dateOk" bindclose="close"></dateMonth>
+103
View File
@@ -0,0 +1,103 @@
/* pages/meeting/meeting.wxss */
page {
background-color: #F5F5F5;
}
/* 头部筛选 start */
.select-list {
border-top: 0.5px solid #F5F5F5;
height: 40px;
font-size: 14px;
display: flex;
align-items: center;
background-color: #fff;
}
.select-item {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
}
.select-item image {
width: 11px;
height: 6px;
margin-left: 9px;
}
/* 头部筛选end */
/* 列表start */
.list{
padding: 15px;
}
.list-item{
height: auto;
background-color: #fff;
border-radius: 5px;
padding: 10px 15px;
display: flex;
justify-content: space-around;
align-items: center;
flex-direction: column;
}
.list-item:not(:first-child) {
margin-top: 10px;
}
.list-item .title{
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.list-item .title text:nth-child(1){
font-size: 14px;
color: #333;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.list-item .title text:nth-child(2){
font-size: 12px;
color: #999;
width: 70px;
text-align: right;
flex-shrink: 0;
}
.item-content {
width: 100%;
padding: 10rpx 0;
box-sizing: border-box;
font-size: 14px;
height: auto;
display: flex;
}
.item-content text{
flex-shrink: 0;
}
.content-text{
width: 100%;
color: #999;
font-size: 12px;
display: flex;
justify-content: space-between;
align-items: center;
}
/* 字体颜色 */
.color-gray {
color:#999
}
.color-green {
color:#069F99
}
.color-orange {
color: orange;
}
.half{
color: burlywood;
}
.all{
color: #069F99;
}