瀏覽代碼

优化

master
pangdongxu 3 年之前
父節點
當前提交
9cf6df36cc
共有 4 個文件被更改,包括 32 次插入19 次删除
  1. 二進制
      image/apply/icon_end.png
  2. +12
    -6
      pages/Bookkeeping/Bookkeeping.js
  3. +19
    -12
      pages/apply/approval/approval.js
  4. +1
    -1
      pages/apply/approval/approval.wxml

二進制
image/apply/icon_end.png 查看文件

Before After
Width: 26  |  Height: 26  |  Size: 794 B

+ 12
- 6
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 = {


+ 19
- 12
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();
}


+ 1
- 1
pages/apply/approval/approval.wxml 查看文件

@@ -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-cell>
<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>
</van-swipe-cell>
</scroll-view>


Loading…
取消
儲存