Compare commits
5 Commits
7bc344e90b
...
dev
Author | SHA1 | Date | |
---|---|---|---|
af749eb638 | |||
3340f1f3af | |||
3e640c3633 | |||
a8312b89d5 | |||
f0dee5bc77 |
@@ -277,7 +277,12 @@ Page({
|
|||||||
type: "meter",
|
type: "meter",
|
||||||
columns: [
|
columns: [
|
||||||
// { id: "", name: "全部", code: "" },
|
// { 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,
|
show: true,
|
||||||
title: "表计"
|
title: "表计"
|
||||||
})
|
})
|
||||||
@@ -292,6 +297,8 @@ Page({
|
|||||||
},
|
},
|
||||||
onOk(e) {
|
onOk(e) {
|
||||||
const { id, code, address } = e.detail.value;
|
const { id, code, address } = e.detail.value;
|
||||||
|
console.log('e', e)
|
||||||
|
console.log("id, code, address", id, code, address)
|
||||||
this.setData({
|
this.setData({
|
||||||
// year: currentYear,
|
// year: currentYear,
|
||||||
meterId: id,
|
meterId: id,
|
||||||
|
@@ -54,7 +54,7 @@ Page({
|
|||||||
this.noPermission()
|
this.noPermission()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
alertSuccess("注册成功")
|
alertSuccess("登录成功")
|
||||||
const { token, ...user } = data
|
const { token, ...user } = data
|
||||||
wx.setStorageSync('user', user)
|
wx.setStorageSync('user', user)
|
||||||
wx.setStorageSync('token', data?.token)
|
wx.setStorageSync('token', data?.token)
|
||||||
|
@@ -16,6 +16,26 @@ Page({
|
|||||||
list: [],
|
list: [],
|
||||||
page: 1,
|
page: 1,
|
||||||
size: 999,
|
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: '电表余额' },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
"van-tag": "@vant/weapp/tag/index",
|
"van-tag": "@vant/weapp/tag/index",
|
||||||
"van-row": "@vant/weapp/row/index",
|
"van-row": "@vant/weapp/row/index",
|
||||||
"empty": "/components/empty/index",
|
"empty": "/components/empty/index",
|
||||||
|
"table": "/components/table/table",
|
||||||
"van-col": "@vant/weapp/col/index"
|
"van-col": "@vant/weapp/col/index"
|
||||||
},
|
},
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="customTable" wx:if="{{list.length}}">
|
<view class="customTable" wx:if="{{list.length}}">
|
||||||
<view class="customTableTile">
|
<!-- <view class="customTableTile">
|
||||||
<van-row>
|
<van-row>
|
||||||
<van-col span="4">
|
<van-col span="4">
|
||||||
<view style="text-align: center;"> 日期 </view>
|
<view style="text-align: center;"> 日期 </view>
|
||||||
@@ -50,7 +50,15 @@
|
|||||||
</van-row>
|
</van-row>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view> -->
|
||||||
|
<table
|
||||||
|
header="{{header}}"
|
||||||
|
list="{{list}}"
|
||||||
|
border="{{true}}"
|
||||||
|
topStyle="text-align: center"
|
||||||
|
bodyStyle="text-align: center"
|
||||||
|
topColor="rgb(242,248,246)"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<empty bind:refresh="getList" wx:else />
|
<empty bind:refresh="getList" wx:else />
|
||||||
</view>
|
</view>
|
||||||
|
@@ -84,3 +84,8 @@
|
|||||||
border-top: 0rpx;
|
border-top: 0rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
page {
|
||||||
|
background-color: var(--transparent-green);
|
||||||
|
}
|
@@ -27,8 +27,8 @@
|
|||||||
"name": "pages/workBench/index",
|
"name": "pages/workBench/index",
|
||||||
"pathName": "pages/workBench/index",
|
"pathName": "pages/workBench/index",
|
||||||
"query": "",
|
"query": "",
|
||||||
"scene": null,
|
"launchMode": "default",
|
||||||
"launchMode": "default"
|
"scene": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pages/workBench/index",
|
"name": "pages/workBench/index",
|
||||||
|
Reference in New Issue
Block a user