diff --git a/image/apply/icon_end.png b/image/apply/icon_end.png new file mode 100644 index 0000000..c9c2d66 Binary files /dev/null and b/image/apply/icon_end.png differ diff --git a/pages/Bookkeeping/Bookkeeping.js b/pages/Bookkeeping/Bookkeeping.js index cf3a939..718f8d4 100644 --- a/pages/Bookkeeping/Bookkeeping.js +++ b/pages/Bookkeeping/Bookkeeping.js @@ -15,7 +15,8 @@ Page({ flowList:[], showProjectFundType:false, checkedStatusText:'未提交', - checkedStatus:'1' + checkedStatus:'1', + incomeExpensesType:'1' }, /** @@ -54,8 +55,8 @@ Page({ pageNum:'1', pageSize:'999', accountType:'', - checkedStatus:'1', - incomeExpensesType:'1', + checkedStatus:that.data.checkedStatus, + incomeExpensesType:that.data.incomeExpensesType, } UTIL.httpRequest(API.URL_GET_GETFLOWLIST,data ,{ success: (res) => { @@ -81,8 +82,8 @@ Page({ pageNum:'1', pageSize:'999', accountType:'', - checkedStatus:'1', - incomeExpensesType:'2', + checkedStatus:that.data.checkedStatus, + incomeExpensesType:that.data.incomeExpensesType, } UTIL.httpRequest(API.URL_GET_GETFLOWLIST,data2 ,{ success: (res) => { @@ -109,7 +110,12 @@ Page({ }, switchTab(e){ var that = this; - this.setData({showGroup:e.currentTarget.dataset.gid,result:[],result2:[]}) + this.setData({ + showGroup:e.currentTarget.dataset.gid, + result:[], + result2:[], + incomeExpensesType:e.currentTarget.dataset.gid == true?'1':'2', + }) if(e.currentTarget.dataset.gid){ //收入事项 let data = { diff --git a/pages/apply/approval/approval.js b/pages/apply/approval/approval.js index a2e8017..6d61ba4 100644 --- a/pages/apply/approval/approval.js +++ b/pages/apply/approval/approval.js @@ -41,22 +41,22 @@ Page({ if(options.type == 'template'){ let list = []; let array = JSON.parse(options.applyOptions).approvalTemplateDetailList; - console.log(JSON.parse(options.applyOptions)); + let indexList ; UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { success: (res2) => { JSON.parse(options.applyOptions).approvalTemplateDetailList.map((rr,index )=> { - console.log(rr); - console.log(JSON.parse(options.applyOptions).approvalTemplateDetailList); - console.log(rr.nickName == res2.user.nickName); - console.log(index); if(rr.nickName == res2.user.nickName){ - array.splice(index,1); + indexList = index ; }else{ list.push(rr.userId+"") } }) + + array.splice(indexList,1) + + console.log(array); array.map((rrr,index)=>{ - array.name = index+1 + rrr.name = index+1 }) this.setData({ templateDetailList:array, @@ -242,15 +242,22 @@ Page({ success: (res) => { if (res.code == API.SUCCESS_CODE) { let list = []; - res.data.map((rr,index) => { - if(rr.nickName == res2.user.nickName){ - res.data.splice(index,1); + console.log(res); + let index ; + for (let i = 0; i < res.data.length; i++) { + const element = res.data[i]; + if(element.nickName == res2.user.nickName){ + // res.data.splice(i,1); + index = i ; + }else{ + list.push(element.userId+"") } - list.push(rr.userId+"") - }) + } + res.data.splice(index,1) res.data.map((rrr,index)=>{ rrr.name = index+1 }) + console.log(list); this.setData({templateDetailList:res.data,result:list}); this.closeBox(); } diff --git a/pages/apply/approval/approval.wxml b/pages/apply/approval/approval.wxml index ae16814..6508791 100644 --- a/pages/apply/approval/approval.wxml +++ b/pages/apply/approval/approval.wxml @@ -101,7 +101,7 @@ - +