@@ -15,7 +15,8 @@ Page({ | |||||
flowList:[], | flowList:[], | ||||
showProjectFundType:false, | showProjectFundType:false, | ||||
checkedStatusText:'未提交', | checkedStatusText:'未提交', | ||||
checkedStatus:'1' | |||||
checkedStatus:'1', | |||||
incomeExpensesType:'1' | |||||
}, | }, | ||||
/** | /** | ||||
@@ -54,8 +55,8 @@ Page({ | |||||
pageNum:'1', | pageNum:'1', | ||||
pageSize:'999', | pageSize:'999', | ||||
accountType:'', | accountType:'', | ||||
checkedStatus:'1', | |||||
incomeExpensesType:'1', | |||||
checkedStatus:that.data.checkedStatus, | |||||
incomeExpensesType:that.data.incomeExpensesType, | |||||
} | } | ||||
UTIL.httpRequest(API.URL_GET_GETFLOWLIST,data ,{ | UTIL.httpRequest(API.URL_GET_GETFLOWLIST,data ,{ | ||||
success: (res) => { | success: (res) => { | ||||
@@ -81,8 +82,8 @@ Page({ | |||||
pageNum:'1', | pageNum:'1', | ||||
pageSize:'999', | pageSize:'999', | ||||
accountType:'', | accountType:'', | ||||
checkedStatus:'1', | |||||
incomeExpensesType:'2', | |||||
checkedStatus:that.data.checkedStatus, | |||||
incomeExpensesType:that.data.incomeExpensesType, | |||||
} | } | ||||
UTIL.httpRequest(API.URL_GET_GETFLOWLIST,data2 ,{ | UTIL.httpRequest(API.URL_GET_GETFLOWLIST,data2 ,{ | ||||
success: (res) => { | success: (res) => { | ||||
@@ -109,7 +110,12 @@ Page({ | |||||
}, | }, | ||||
switchTab(e){ | switchTab(e){ | ||||
var that = this; | 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){ | if(e.currentTarget.dataset.gid){ | ||||
//收入事项 | //收入事项 | ||||
let data = { | let data = { | ||||
@@ -41,22 +41,22 @@ Page({ | |||||
if(options.type == 'template'){ | if(options.type == 'template'){ | ||||
let list = []; | let list = []; | ||||
let array = JSON.parse(options.applyOptions).approvalTemplateDetailList; | let array = JSON.parse(options.applyOptions).approvalTemplateDetailList; | ||||
console.log(JSON.parse(options.applyOptions)); | |||||
let indexList ; | |||||
UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { | ||||
success: (res2) => { | success: (res2) => { | ||||
JSON.parse(options.applyOptions).approvalTemplateDetailList.map((rr,index )=> { | 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){ | if(rr.nickName == res2.user.nickName){ | ||||
array.splice(index,1); | |||||
indexList = index ; | |||||
}else{ | }else{ | ||||
list.push(rr.userId+"") | list.push(rr.userId+"") | ||||
} | } | ||||
}) | }) | ||||
array.splice(indexList,1) | |||||
console.log(array); | |||||
array.map((rrr,index)=>{ | array.map((rrr,index)=>{ | ||||
array.name = index+1 | |||||
rrr.name = index+1 | |||||
}) | }) | ||||
this.setData({ | this.setData({ | ||||
templateDetailList:array, | templateDetailList:array, | ||||
@@ -242,15 +242,22 @@ Page({ | |||||
success: (res) => { | success: (res) => { | ||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
let list = []; | 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)=>{ | res.data.map((rrr,index)=>{ | ||||
rrr.name = index+1 | rrr.name = index+1 | ||||
}) | }) | ||||
console.log(list); | |||||
this.setData({templateDetailList:res.data,result:list}); | this.setData({templateDetailList:res.data,result:list}); | ||||
this.closeBox(); | this.closeBox(); | ||||
} | } | ||||
@@ -101,7 +101,7 @@ | |||||
<van-icon slot="icon" name="https://636c-cloud1-8gya17a31667774d-1310628902.tcb.qcloud.la/icon_mb.png?sign=2a8bbe2cb4d4e0f28a99fddbe042d26c&t=1648620032" class="custom-icon" size="40" style="margin-right: 10px;" /> | <van-icon slot="icon" name="https://636c-cloud1-8gya17a31667774d-1310628902.tcb.qcloud.la/icon_mb.png?sign=2a8bbe2cb4d4e0f28a99fddbe042d26c&t=1648620032" class="custom-icon" size="40" style="margin-right: 10px;" /> | ||||
</van-cell> | </van-cell> | ||||
<view slot="right" class="deleteBox" bindtap='deleteTemplate' data-index="{{index}}" data-id="{{item.id}}"> | <view slot="right" class="deleteBox" bindtap='deleteTemplate' data-index="{{index}}" data-id="{{item.id}}"> | ||||
<image src="/image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;"></image> | |||||
<image src="/image/apply/icon_end.png" style="width: 25px;height: 25px;margin: 0 auto;"></image> | |||||
</view> | </view> | ||||
</van-swipe-cell> | </van-swipe-cell> | ||||
</scroll-view> | </scroll-view> | ||||