资料网员的修改

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
+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
})
})
}
},
/**