资料网员的修改

This commit is contained in:
fengachen
2021-10-19 16:02:26 +08:00
parent e167a380cc
commit 06b5ac09db
4 changed files with 40 additions and 8 deletions
+3 -1
View File
@@ -69,6 +69,8 @@ const UserApi = {
committeeList: (params) => http.get(`${URL_CONFIG}payCaseCommittee/payCaseCommittee/list`, params),
// 分标委详情
committeeDetail: (params) => http.get(`${URL_CONFIG}payCaseCommittee/payCaseCommittee/detail`, params),
// 资料网员分页接口
queryDataMemberList: (params) => http.get(`${URL_CONFIG}jero/memberProjectSubitem/pageCompany`, params),
}
export default UserApi
export default UserApi
+1 -1
View File
@@ -83,7 +83,7 @@ Page({
url = '../meeting/meeting'
} else{ // 资料网员
// url = '../data/data'
url = '../project/project'
url = '../project/project?type=ziliao'
}
wx.navigateTo({
url,
+34 -4
View File
@@ -6,7 +6,7 @@ Page({
*/
data: {
index: 0,
type: '', // project 是来款项目 work 是工作组
type: '', // project 是来款项目 work 是工作组 ziliao是资料网员
list: [], // 项目列表
searchParams: {
pageNo: 1,
@@ -14,6 +14,7 @@ Page({
needInvoice: '', // 是否需要发票 0 4
pack: '', // 是否打包 0 1
year: '', // 运行年份
particularYear:'',// 资料网元的运行年份
}
},
// 发票改变
@@ -47,9 +48,16 @@ Page({
},
bindDateChange(e){
this.data.searchParams.pageNo = 1
this.setData({
"searchParams.year": e.detail.value
})
// 资料网员的年份查询字段与其他的不一样
if(this.data.type === 'ziliao'){
this.setData({
"searchParams.particularYear": e.detail.value
})
}else{
this.setData({
"searchParams.year": e.detail.value
})
}
this.loadData()
},
// 项目详情
@@ -108,6 +116,28 @@ Page({
duration: 2000
})
})
}else if(this.data.type == 'ziliao'){
UserApi.queryDataMemberList(this.data.searchParams).then(res=>{
if(res.success){
// 搜索时,把原数据清空,重新筛选
if(this.data.searchParams.pageNo === 1) {
this.setData({
list: []
})
}
if(res.result.records && res.result.records.length){
this.setData({
list: [...this.data.list, ...res.result.records]
})
}
}
}).catch(err=>{
wx.showToast({
title: '加载失败',
icon: 'fail',
duration: 2000
})
})
}
},
/**
+2 -2
View File
@@ -28,8 +28,8 @@
<view class="list">
<view class="list-item" wx:for="{{list}}" bindtap="projectDetail" wx:key="item" data-project="{{item}}">
<view class="title">
<text>{{item.chargeProject}}</text>
<text>{{item.year}}年</text>
<text>{{item.chargeProject || item.projectName}}</text>
<text>{{item.year || item.particularYear}}年</text>
</view>
<view class="content-text">
<text class="{{item.needInvoice === 0 ? '' : 'all'}}">{{item.needInvoice === 0 ? '不需要发票' : '需要发票'}}</text>