Browse Source

对账单页面完成

master
chenxuhui 7 years ago
parent
commit
b43f3c90fc
4 changed files with 65 additions and 97 deletions
  1. +0
    -14
      pages/login/login.js
  2. +0
    -4
      pages/statementOfAccount/statementOfAccount.js
  3. +24
    -26
      pages/statementOfAccount/statementOfAccount.wxml
  4. +41
    -53
      pages/statementOfAccount/statementOfAccount.wxss

+ 0
- 14
pages/login/login.js View File

@ -209,20 +209,6 @@ Page({
// 页面初始化 静默登录相关判断 // 页面初始化 静默登录相关判断
onShow: function() { onShow: function() {
var that = this; var that = this;
// wx.getStorage({
// key: 'CustomerId',
// success: function(res) {
// app.globalData.CustomerId = res.data;
// if (app.globalData.CustomerId) {
// that.setData({
// showCustomerChoise: false,
// })
// }
// },
// fail: function(res) {
// that.choiceCustomer();
// }
// })
that.choiceCustomer(); that.choiceCustomer();
getOpenId(function(res) { getOpenId(function(res) {
openid = res; openid = res;


+ 0
- 4
pages/statementOfAccount/statementOfAccount.js View File

@ -11,8 +11,6 @@ Page({
data: { data: {
dates: new Date().getFullYear() + '-' + (new Date().getMonth() + 1), dates: new Date().getFullYear() + '-' + (new Date().getMonth() + 1),
list:[], list:[],
delBtnWidth: 90,
startX: ""
}, },
bindDateChange: function (e) { bindDateChange: function (e) {
@ -57,7 +55,6 @@ Page({
getBalanceList : function (that,params) { getBalanceList : function (that,params) {
var reslut = []; var reslut = [];
network.requestLoading(method, params, function (res) { network.requestLoading(method, params, function (res) {
console.log(res);
var array = JSON.parse(res.result); var array = JSON.parse(res.result);
if (array.length <= 0) { if (array.length <= 0) {
wx.showToast({ wx.showToast({
@ -71,7 +68,6 @@ Page({
for (var i = 0; i < array.length; i++) { for (var i = 0; i < array.length; i++) {
array[i].Date = timechage.formatTimeTwo(array[i].Date.substring(6, 19), "Y/M/D"); array[i].Date = timechage.formatTimeTwo(array[i].Date.substring(6, 19), "Y/M/D");
} }
console.log(array);
let arrLast = that.data.list.concat(array); let arrLast = that.data.list.concat(array);
that.setData({ that.setData({
list: arrLast list: arrLast


+ 24
- 26
pages/statementOfAccount/statementOfAccount.wxml View File

@ -7,35 +7,33 @@
</view> </view>
<view class='listContainer'> <view class='listContainer'>
<scroll-view scroll-x="false" scroll-y="true" class='scroll-views' bindscrolltolower="addOtherTenOrder">
<block wx:for="{{list}}" wx:for-item="item" wx:for-index="idx">
<template is="statementTemplate" data="{{item,idx}}" />
</block>
</scroll-view>
<block wx:for="{{list}}" wx:key="item" wx:for-index="idx">
<template is="statementTemplate" data="{{item,idx}}" />
</block>
</view> </view>
<!-- <view class='listContainer'>
<scroll-view scroll-x="false" scroll-y="true" class='scroll-views' bindscrolltolower="addOtherTenOrder">
<block wx:for="{{list}}" wx:for-item="item" wx:for-index="idx">
<template is="statementTemplate" data="{{item}}" />
</block>
</scroll-view>
</view> -->
<!-- 原界面 -->
<!-- <template name="statementTemplate">
<view class='yonghu'>
<view class='view1'>日期:{{item.GatheringTime}}</view>
<view class='view2'>收款:{{item.GatheringMoney}}</view>
</view>
</template> -->
<template name="statementTemplate"> <template name="statementTemplate">
<view class="item">
<view bindtouchstart="touchS" bindtouchmove="touchM" bindtouchend="touchE" data-index="{{idx}}" style="{{item.txtStyle}}" class="inner txt">
<view class='view1'>日期:{{item.GatheringTime}}</view>
<view class='view2'>收款:{{item.GatheringMoney}}</view>
<view class='item'>
<view class='header'>
<view class='headerSectionTop'>
<view class='dateView'>日期:{{item.Date}}</view>
<view class='dateView'>余额:{{item.Balance}}</view>
</view>
<view class='headerSectionBottom'>
<view class='titleView'>单据类型</view>
<view class='titleView'>单据号</view>
<view class='titleView'>金额</view>
</view>
</view>
<view class='infoView'>
<block wx:for="{{item.Detail}}" wx:for-item="detailItem" wx:key="detailItem" wx:for-index="idx">
<view class="infoDetail">
<view class='titleView'>{{detailItem.BillType}}</view>
<view class='titleView'>{{detailItem.ID}}</view>
<view class='titleView'>{{detailItem.Money}}</view>
</view>
</block>
</view> </view>
<view data-index="{{idx}}" bindtap="delItem" class="inner del">删除</view>
</view> </view>
</template> </template>

+ 41
- 53
pages/statementOfAccount/statementOfAccount.wxss View File

@ -1,4 +1,4 @@
page {
page{
background: #f4f4f4; background: #f4f4f4;
height: 100%; height: 100%;
} }
@ -6,7 +6,6 @@ page {
.section { .section {
background: #fff; background: #fff;
margin-top: 10px; margin-top: 10px;
width: 80%;
text-align: center; text-align: center;
height: 30px; height: 30px;
margin-left: 10%; margin-left: 10%;
@ -22,80 +21,69 @@ page {
} }
.listContainer { .listContainer {
width: 100%;
margin-top: 10px;
height: calc(100% - 50px); height: calc(100% - 50px);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.scroll-views {
height: 100%;
.header{
height: 60px;
width: 100%;
display: flex;
flex-direction: column;
} }
/* .yonghu {
background: #fff;
height: 50px;
border-bottom: 0.5px solid #ccc;
margin-top: 10px;
border-top: 0.5px solid #ccc;
.headerSectionTop{
/* height: 50%; */
height: 30px;
width: 100%;
line-height: 30px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} */
border-bottom: 1rpx solid #ccc;
}
.view1 {
height: 100%;
width: 50%;
color: #464646;
line-height: 50px;
text-align: center;
.headerSectionBottom{
/* height: 50%; */
height: 30px;
width: 100%;
line-height: 30px;
display: flex;
flex-direction: row;
} }
.view2 {
.dateView{
height: 100%; height: 100%;
width: 50%; width: 50%;
color: #464646;
line-height: 50px;
padding-right: 20rpx;
text-align: center;
font-size: 18px;
} }
.item {
position: relative;
margin-top: 10rpx;
border-top: 2rpx solid #eee;
height: 50px;
line-height: 50rpx;
overflow: hidden;
.titleView{
height: 100%;
width: 33.3%;
font-size: 16px;
text-align: center;
} }
.inner {
position: absolute;
top: 0;
.infoView{
width: 100%;
display: flex;
flex-direction: column;
} }
.inner.txt {
background-color: #fff;
.infoDetail{
height: 30px;
line-height: 30px;
width: 100%; width: 100%;
height: 100%;
z-index: 5;
padding: 0 10rpx;
transition: left 0.2s ease-in-out;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
.inner.del {
background-color: red;
font-family: Monaco;
width: 90px;
height: 50px;
line-height: 50px;
text-align: center;
z-index: 4;
right: 0;
color: #fff;
.item {
display: flex;
padding: 10rpx 20rpx;
flex-direction: column;
background-color: #fff;
} }

Loading…
Cancel
Save