Compare commits

..

5 Commits

7 changed files with 47 additions and 6 deletions

View File

@@ -277,7 +277,12 @@ Page({
type: "meter",
columns: [
// { id: "", name: "全部", code: "" },
...this.data.meterList.map(item => ({ id: item.id, name: `${item.code}-${item.address}`, code: item.code }))],
...this.data.meterList.map(item => ({
id: item.id,
name: `${item.code}-${item.address}`,
code: item.code,
address: item.address
}))],
show: true,
title: "表计"
})
@@ -292,6 +297,8 @@ Page({
},
onOk(e) {
const { id, code, address } = e.detail.value;
console.log('e', e)
console.log("id, code, address", id, code, address)
this.setData({
// year: currentYear,
meterId: id,

View File

@@ -54,7 +54,7 @@ Page({
this.noPermission()
return;
}
alertSuccess("注册成功")
alertSuccess("登录成功")
const { token, ...user } = data
wx.setStorageSync('user', user)
wx.setStorageSync('token', data?.token)

View File

@@ -16,6 +16,26 @@ Page({
list: [],
page: 1,
size: 999,
header: [
{ key: 'day', title: '日期', },
{ key: "money", title: '充值金额', renderBody: (item) => {
if (item.type === 1 || item.type === 7) {
return item.topFee
} else if (item.type === 5 || item.type === 6 || item.type === 8) {
return `-${item.topFee}`
} else {
return 0
}
} },
{ key: 'overall', title: '电费', renderBody: (item) => {
if (item.type == 1 || item.type === 5 || item.type === 6 || item.type === 7 || item.type === 8) {
return 0;
} else {
return item.money
}
} },
{ key: 'balance', title: '电表余额' },
],
},
/**

View File

@@ -6,6 +6,7 @@
"van-tag": "@vant/weapp/tag/index",
"van-row": "@vant/weapp/row/index",
"empty": "/components/empty/index",
"table": "/components/table/table",
"van-col": "@vant/weapp/col/index"
},
"navigationStyle": "custom"

View File

@@ -11,7 +11,7 @@
</view>
<view class="customTable" wx:if="{{list.length}}">
<view class="customTableTile">
<!-- <view class="customTableTile">
<van-row>
<van-col span="4">
<view style="text-align: center;"> 日期 </view>
@@ -50,7 +50,15 @@
</van-row>
</view>
</view>
</view> -->
<table
header="{{header}}"
list="{{list}}"
border="{{true}}"
topStyle="text-align: center"
bodyStyle="text-align: center"
topColor="rgb(242,248,246)"
/>
</view>
<empty bind:refresh="getList" wx:else />
</view>

View File

@@ -84,3 +84,8 @@
border-top: 0rpx;
font-size: 32rpx;
}
page {
background-color: var(--transparent-green);
}

View File

@@ -27,8 +27,8 @@
"name": "pages/workBench/index",
"pathName": "pages/workBench/index",
"query": "",
"scene": null,
"launchMode": "default"
"launchMode": "default",
"scene": null
},
{
"name": "pages/workBench/index",