chenxuhui 7 years ago
parent
commit
f4d3febde4
3 changed files with 33 additions and 21 deletions
  1. +17
    -12
      pages/statementOfAccount/statementOfAccount.js
  2. +9
    -8
      pages/statementOfAccount/statementOfAccount.wxml
  3. +7
    -1
      pages/statementOfAccount/statementOfAccount.wxss

+ 17
- 12
pages/statementOfAccount/statementOfAccount.js View File

@ -10,20 +10,22 @@ var method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Customer/AccountBalanceRpc/Get
Page({
data: {
dates: new Date().getFullYear() + '-' + (new Date().getMonth() + 1),
list:[],
list:[{
Detail:[],
}],
},
bindDateChange: function (e) {
this.setData({
dates: e.detail.value,
list: [],
list: [{
Detail: [],
},],
})
var year=this.data.dates.split('-')[0];
var month = this.data.dates.split('-')[1];
// var day = this.data.dates.split('-')[2];
var i1 = parseInt(year)
var i2 = parseInt(month)
// var i3 = parseInt(day)
var that=this;
pageindex = 0;
var params = [i1, i2, pageindex,pagesize];
@ -42,7 +44,11 @@ Page({
onLoad: function (options) {
this.setData({
list: [],
list: [
{
Detail:[],
},
],
});
var that = this;
pageindex = 0;
@ -69,18 +75,16 @@ Page({
array[i].Date = timechage.formatTimeTwo(array[i].Date.substring(6, 19), "Y/M/D");
}
let arrLast = that.data.list.concat(array);
that.setData({
list: arrLast
list: arrLast,
// detailArr: arrLast.Detail
})
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/*
touchS: function (e) {
if (e.touches.length == 1) {
this.setData({
@ -135,7 +139,6 @@ Page({
});
}
},
//点击删除按钮事件
delItem: function (e) {
//获取列表中要删除项的下标
@ -148,4 +151,6 @@ Page({
list: list
});
},
*/
})

+ 9
- 8
pages/statementOfAccount/statementOfAccount.wxml View File

@ -8,16 +8,11 @@
<view class='listContainer'>
<block wx:for="{{list}}" wx:for-item="item" wx:key="item" wx:for-index="idx">
<template is="statementTemplate" data="{{item,idx}}" />
</block>
</view>
<template name="statementTemplate">
<view class='item'>
<view class='header'>
<view class='header' wx:if="{{item.Detail.length>0}}">
<view class='headerSectionTop'>
<view class='dateView'>日期:{{item.Date}}</view>
<view class='dateView'>余额:{{item.Balance}}</view>
<view class='balanceView'>余额:{{item.Balance}}</view>
</view>
<view class='headerSectionBottom'>
<view class='titleView'>单据类型</view>
@ -36,4 +31,10 @@
</block>
</view>
</view>
</template>
<!-- <template is="statementTemplate" data="{{item,idx}}" /> -->
</block>
</view>
<!-- <template name="statementTemplate">
</template> -->

+ 7
- 1
pages/statementOfAccount/statementOfAccount.wxss View File

@ -59,6 +59,12 @@ page{
font-size: 18px;
}
.balanceView{
height: 100%;
width: 50%;
font-size: 18px;
}
.titleView{
height: 100%;
width: 33.3%;
@ -82,7 +88,7 @@ page{
.item {
display: flex;
padding: 10rpx 20rpx;
padding: 0 20rpx;
flex-direction: column;
background-color: #fff;
}


Loading…
Cancel
Save