修改样式

This commit is contained in:
qiaomu 2024-06-17 17:36:07 +08:00
parent 56e08863de
commit 75713f1e97
16 changed files with 72 additions and 40 deletions

View File

@ -8,7 +8,7 @@ page {
} }
.border { .border {
border: 0.5rpx solid #f0f0f0; border: 0.5rpx solid #cfc9c9;
} }
.radius12 { .radius12 {

View File

@ -1,10 +1,13 @@
/* components/dot/index.wxss */ /* components/dot/index.wxss */
.dot { .dot {
background-color: #ee0a24; background-color: #ee0a24;
width: 56rpx; width: 52rpx;
height: 56rpx; height: 52rpx;
border-radius: 50%; border-radius: 50%;
text-align: center; text-align: center;
color: #fff; color: #fff;
font-size: 28rpx; font-size: 26rpx;
display: flex;
justify-content: center;
align-items: center;
} }

View File

@ -23,7 +23,7 @@ Page({
const { page, list } = this.data; const { page, list } = this.data;
const { code, data, message } = await getBillList(page) const { code, data, message } = await getBillList(page)
if (!data?.length) { if (!data?.length) {
alertInfo("没更多了") alertInfo("没更多了")
return; return;
} }
this.setData({ this.setData({

View File

@ -1,7 +1,8 @@
{ {
"usingComponents": { "usingComponents": {
"navigator": "/components/navigator/index", "navigator": "/components/navigator/index",
"van-icon": "@vant/weapp/icon/index" "van-icon": "@vant/weapp/icon/index",
"empty": "/components/empty/index"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }

View File

@ -1,8 +1,12 @@
<!--pages/billList/index.wxml--> <!--pages/billList/index.wxml-->
<navigator title="电费账单" canBack="{{true}}" /> <navigator title="电费账单" canBack="{{true}}" />
<view wx:if="{{!list.length}}">
<view class="itemWrapper" wx:for="{{list}}" wx:key="index"> <empty bind:refresh="init" />
</view>
<view wx:else>
<view class="itemWrapper" wx:for="{{list}}" wx:key="index">
<van-icon name="balance-list-o" /> <van-icon name="balance-list-o" />
<view class="time"> {{ item.time }} </view> <view class="time"> {{ item.time }} </view>
<view class="operate" bind:tap="jumpToDetail" data-id="{{item.id}}"> 查看详细 </view> <view class="operate" bind:tap="jumpToDetail" data-id="{{item.id}}"> 查看详细 </view>
</view>
</view> </view>

View File

@ -6,17 +6,17 @@ page {
.queryWrapper { .queryWrapper {
margin: 20rpx 0rpx; margin: 20rpx 0rpx;
background-color: #fff; background-color: #fff;
padding: 30rpx; padding:15rpx 20rpx;
box-sizing: border-box; box-sizing: border-box;
border-radius: 20rpx; border-radius: 20rpx;
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 32rpx;
} }
.label { .label {
width: 180rpx; width: 180rpx;
font-size: 34rpx; font-size: 32rpx;
} }
.sum { .sum {
@ -32,9 +32,9 @@ page {
.typeQueryText { .typeQueryText {
text-align: center; text-align: center;
padding: 30rpx; padding: 20rpx;
background-color: var(--light-green); background-color: var(--light-green);
font-size: 34rpx; font-size: 32rpx;
} }
.select { .select {
@ -44,13 +44,14 @@ page {
flex: 1; flex: 1;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 30rpx;
} }
.timeQueryText { .timeQueryText {
text-align: center; text-align: center;
padding: 30rpx; padding: 20rpx;
background-color: rgb(242,248,246); background-color: rgb(242,248,246);
font-size: 34rpx; font-size: 30rpx;
} }
.wrapper { .wrapper {
@ -61,12 +62,13 @@ page {
.tooltip { .tooltip {
margin: 20rpx 0; margin: 20rpx 0;
font-size: 32rpx; font-size: 28rpx;
color: rgb(119, 114, 114); color: rgb(97, 93, 93);
} }
.timeChooseWrapper { .timeChooseWrapper {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 30rpx;
} }
.time { .time {

View File

@ -24,7 +24,7 @@
<view class="logined" wx:else> <view class="logined" wx:else>
<avatar text="{{ user.nickName }}" /> <avatar text="{{ user.nickName }}" />
<view> <view>
<van-button type="info" size="small" plain="{{true}}" class="loginBtn" bind:click="chooseTenement">{{tenement.name}} <van-icon name="arrow-down" style="margin-left: 16rpx;" /></van-button> <van-button type="info" size="small" plain="{{true}}" class="loginBtn" custom-style="font-size: 32rpx;" bind:click="chooseTenement">{{tenement.name}} <van-icon name="arrow-down" style="margin-left: 16rpx;" /></van-button>
<view class="welcome"> 欢迎使用华昌宝能用电管理系统! </view> <view class="welcome"> 欢迎使用华昌宝能用电管理系统! </view>
</view> </view>
</view> </view>
@ -53,10 +53,10 @@
</view> </view>
<view class="cardItem"> <view class="cardItem">
<view class="cardItemLabel"> 电表余额: </view> <view class="cardItemLabel"> 电表余额: </view>
<view class="cardItemValue"> <view class="cardItemValue" style="position: relative;">
<view class="text" wx:if="{{user.id}}"> {{meter.money}} </view> <view class="text" wx:if="{{user.id}}"> {{meter.money}} </view>
<view class="text" wx:else> --- </view> <view class="text" wx:else> --- </view>
<van-button type="info" size="small" plain="{{true}}" bind:click="refreshMeter" wx:if="{{user.id}}"> <van-button type="info" size="small" plain="{{true}}" custom-style="position: absolute; right: 0; bottom: 0;z-index: 99;" bind:click="refreshMeter" wx:if="{{user.id}}">
<van-icon name="replay" /> <van-icon name="replay" />
刷新 刷新
</van-button> </van-button>

View File

@ -26,6 +26,7 @@
.parkContent { .parkContent {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 32rpx;
} }
.notLoginWrapper, .logined { .notLoginWrapper, .logined {
@ -63,6 +64,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
flex: 1; flex: 1;
font-size: 33rpx;
} }
.cardContent { .cardContent {
@ -73,7 +75,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 30rpx; margin-bottom: 30rpx;
font-size: 34rpx; font-size: 32rpx;
} }
.cardItemValue { .cardItemValue {
@ -105,8 +107,8 @@
.welcome { .welcome {
margin-top: 20rpx; margin-top: 20rpx;
margin-left: 30rpx; margin-left: 30rpx;
font-size: 32rpx; font-size: 30rpx;
color: #fff; color: rgba(255,255,255, .85);
} }
.moneyBox { .moneyBox {

View File

@ -35,7 +35,7 @@ Component({
const { page, list = [] } = this.data; const { page, list = [] } = this.data;
const { code, message, data } = await getAlreadyInvoiceList(page); const { code, message, data } = await getAlreadyInvoiceList(page);
if (!data.length) { if (!data.length) {
alertInfo("没更多数据了") alertInfo("没更多数据了")
return return
} }
this.setData({ this.setData({

View File

@ -70,7 +70,7 @@
> >
</van-field> </van-field>
<van-field <van-field
value="{{detail.bank}}" value="{{detail.bank || '-'}}"
label="开户行" label="开户行"
wx:if="{{detail.headerType === 0}}" wx:if="{{detail.headerType === 0}}"
custom-style="padding-left: 0; padding-right: 0;" custom-style="padding-left: 0; padding-right: 0;"
@ -306,6 +306,7 @@
border="{{ editType === 'detail' ? false : true }}" border="{{ editType === 'detail' ? false : true }}"
bind:change="onChangeText" bind:change="onChangeText"
data-name="email" data-name="email"
placeholder="请输入电子邮箱"
/> />
</view> </view>
</card> </card>

View File

@ -38,7 +38,7 @@ Page({
if (user.isAdmin) { if (user.isAdmin) {
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
content: '当前公司没开票信息,请先前往开票信息页面编辑开票信息', content: '当前公司没开票信息,请先前往开票信息页面编辑开票信息',
confirmText: '前往编辑', confirmText: '前往编辑',
cancelText: '取消', cancelText: '取消',
complete: (res) => { complete: (res) => {
@ -57,7 +57,7 @@ Page({
} else { } else {
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
content: '当前公司没开票信息,请联系管理员编辑完开票信息之后再开票', content: '当前公司没开票信息,请联系管理员编辑完开票信息之后再开票',
showCancel: false, showCancel: false,
confirmText: '返回', confirmText: '返回',
complete: (res) => { complete: (res) => {

View File

@ -23,7 +23,9 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
// this.getList() // this.getList()
this.getCode() loadingFunc(async () => {
await this.getCode()
})
}, },
async getList() { async getList() {
const { code, message, data } = await getOwnTenementList() const { code, message, data } = await getOwnTenementList()

View File

@ -1,4 +1,5 @@
import { getRechargeDetail } from "../../service/recharge"; import { getRechargeDetail } from "../../service/recharge";
import { alertError, alertInfo, loadingFunc } from "../../utils/index";
import { getRechargeOperateType, getRechargeOperateWay } from "../../utils/data"; import { getRechargeOperateType, getRechargeOperateWay } from "../../utils/data";
import request from "../../utils/request" import request from "../../utils/request"
const { OK } = request const { OK } = request
@ -17,10 +18,16 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
const { id } = options; const { id } = options;
this.init(id) loadingFunc(async () => {
await this.init(id)
})
}, },
async init(id) { async init(id) {
const { code, message, data } = await getRechargeDetail(id) const { code, message, data } = await getRechargeDetail(id)
if (code !== OK) {
alertInfo(message)
return;
}
this.setData({ this.setData({
detail: { ...data, way: getRechargeOperateWay(data.way), type: getRechargeOperateType(data.type) } detail: { ...data, way: getRechargeOperateWay(data.way), type: getRechargeOperateType(data.type) }
}) })

View File

@ -1,6 +1,6 @@
import { getRechargeList } from "../../service/recharge"; import { getRechargeList } from "../../service/recharge";
import { getTenementMeterList } from "../../service/meter"; import { getTenementMeterList } from "../../service/meter";
import { getYears, alertInfo } from "../../utils/index"; import { getYears, alertInfo, loadingFunc } from "../../utils/index";
import request from "../../utils/request"; import request from "../../utils/request";
const { OK } = request; const { OK } = request;
// pages/rechargeRecord/index.js // pages/rechargeRecord/index.js
@ -95,10 +95,14 @@ Page({
onShow() { onShow() {
const { year } = this.data; const { year } = this.data;
const tenement = wx.getStorageSync('tenement') const tenement = wx.getStorageSync('tenement')
this.init(year, ''); loadingFunc(async () => {
this.getMeters(tenement?.id); await this.init(year, '');
await this.getMeters(tenement?.id);
});
}, },
refreshEmpty() { refreshEmpty() {
const { year } = this.data;
const tenement = wx.getStorageSync('tenement') const tenement = wx.getStorageSync('tenement')
this.init(year, ''); this.init(year, '');
this.init(year, tenement); this.init(year, tenement);

View File

@ -4,14 +4,14 @@
<!-- <picker bindchange="onChangeYear" value="{{index}}" range="{{years}}"> --> <!-- <picker bindchange="onChangeYear" value="{{index}}" range="{{years}}"> -->
<view class="yearPicker" bind:tap="clickYear"> <view class="yearPicker" bind:tap="clickYear">
{{ year }}年 {{ year }}年
<image src="/assets/images/down.png" mode="" class="down" /> <van-icon name="arrow-down" custom-class="down" />
</view> </view>
<!-- </picker> --> <!-- </picker> -->
<!-- <picker bindchange="onChangeYear" value="{{index}}" range="{{years}}"> --> <!-- <picker bindchange="onChangeYear" value="{{index}}" range="{{years}}"> -->
<view class="tenementPicker" bind:tap="clickMeter"> <view class="tenementPicker" bind:tap="clickMeter">
<view wx:if="{{meterCode}}" class="tenementName"> {{ meterCode }} </view> <view wx:if="{{meterCode}}" class="tenementName"> {{ meterCode }} </view>
<view wx:else> 全部 </view> <view wx:else> 全部 </view>
<image src="/assets/images/down.png" mode="" class="down" /> <van-icon name="arrow-down" custom-class="down" />
</view> </view>
<!-- </picker> --> <!-- </picker> -->
<view class="allMoney"> <view class="allMoney">

View File

@ -3,6 +3,8 @@
.yearPicker { .yearPicker {
display: flex; display: flex;
align-items: center; align-items: center;
color: #fff;
font-size: 32rpx;
} }
.down { .down {
@ -35,11 +37,12 @@
font-size: 34rpx; font-size: 34rpx;
} }
.time { .time {
margin-top: 16rpx; margin-top: 12rpx;
font-size: 28rpx; font-size: 28rpx;
color:rgb(158, 154, 154);
} }
.money { .money {
font-size: 40rpx; font-size: 36rpx;
font-weight: 500; font-weight: 500;
margin-right: 30rpx; margin-right: 30rpx;
} }
@ -61,6 +64,8 @@
margin-left: 30rpx; margin-left: 30rpx;
display: flex; display: flex;
align-items: center; align-items: center;
color: #fff;
font-size: 32rpx;
} }
.allMoney { .allMoney {
@ -73,8 +78,9 @@
} }
.type { .type {
margin-right: 46rpx; margin-right: 40rpx;
font-weight: 600; font-weight: 600;
font-size: 36rpx;
} }
.codeTime { .codeTime {