调整样式

This commit is contained in:
qiaomu 2025-02-26 13:41:44 +08:00
parent 71194fbf1c
commit 902b4726c6
15 changed files with 250 additions and 219 deletions

View File

@ -19,7 +19,11 @@ Component({
parentName:String,
parentId:String,
},
observers: {
"parentPhone": function (newPhone) {
this.setData({ phone: newPhone })
}
},
/**
* 组件的初始数据
*/

View File

@ -103,7 +103,9 @@ Component({
this.handleCancel();
},
onUpdatePhoneConfirm() {
this.setData({ parentPhone: "", phone: "", type: "", title: "" })
this.getTenementInfo();
this.initUserList()
},
async getTenementInfo() {
const { tenement, park } = this.data;
@ -135,18 +137,12 @@ Component({
})
},
handleChangeMain() {
// const { list = [] } = this.data;
// const main = list?.find(item => item.Permissions)
// if (!main) {
// alertInfo("没有主账号")
// return
// }
// console.log("main", main)
const { tenementInfo = {} } = this.data;
this.setData({
updatePhoneVisible: true,
type: "update",
title: "编辑管理员",
// phone: main.WechatPhone,
parentPhone: tenementInfo.phone,
// name: main.WechatUserName,
// id: main.WechatUserID,
})
@ -156,6 +152,7 @@ Component({
updatePhoneVisible: false,
type: "",
phone: "",
parentPhone: "",
name: "",
id: "",
})

View File

@ -12,6 +12,8 @@
"van-radio-group": "@vant/weapp/radio-group/index",
"van-tag": "@vant/weapp/tag/index",
"edit-modal": "./components/editModal/index",
"updatePhoneModal": "./components/updatePhoneModal/index"
"updatePhoneModal": "./components/updatePhoneModal/index",
"van-row": "@vant/weapp/row/index",
"van-col": "@vant/weapp/col/index"
}
}

View File

@ -29,60 +29,66 @@
</view>
<van-empty wx:if="{{!tenement}}" description="选择园区和商户后查看" />
<view wx:else>
<van-field
value="{{tenementInfo.fullName}}"
label="商户名称"
readonly
title-width="140rpx"
/>
<van-field
value="{{tenementInfo.shortName}}"
label="商户简称"
readonly
title-width="140rpx"
/>
<van-field
value="{{tenementInfo.phone}}"
label="预留电话"
readonly
title-width="140rpx"
/>
<view class="operateBox">
<van-button type="info" size="small" style="margin-right: 20rpx;" bind:click="handleAddSon"> 添加子账号 </van-button>
<van-button type="info" size="small" style="margin-right: 20rpx;" bind:click="handleChangeMain"> 修改主账号 </van-button>
</view>
<view wx:if="{{list.length}}">
<view class="tableWrapper">
<view class="table">
<view class="thead">
<view class="th" style="width: 70rpx"> 序号 </view>
<view class="th" style="width: 200rpx"> 昵称 </view>
<view class="th" style="width: 300rpx"> 手机号 </view>
<view class="th" style="width: 100rpx"> 操作 </view>
</view>
<view class="tbody">
<van-radio-group value="{{ record }}" bind:change="onChangeSelectRecharge">
<block wx:for="{{list}}" wx:for-index="itemIndex" wx:key="item">
<view class="customTable">
<view class="customTableTile">
<van-row>
<van-col span="24">
<view class="tableTitleRow">
<van-row gutter="5">
<van-col span="8">{{tenementInfo.shortName}}</van-col>
<van-col span="16">{{tenementInfo.fullName}}</van-col>
</van-row>
</view>
</van-col>
<van-col span="24">
<view class="tableTitleRow">
<van-row gutter="5">
<van-col span="8" wx:if="{{tenementInfo.feeType === 0}}"> 华昌宝能收费 </van-col>
<van-col span="8" wx:elif="{{tenementInfo.feeType === 1}}"> 物业代收1 </van-col>
<van-col span="8" wx:elif="{{tenementInfo.feeType === 2}}"> 物业代收2 </van-col>
<van-col span="8" wx:else> 物业代收线损 </van-col>
<van-col span="16">{{tenementInfo.contact}} {{tenementInfo.phone}} </van-col>
</van-row>
</view>
</van-col>
</van-row>
</view>
<view class="customTableContent">
<van-row wx:if="{{list.length}}">
<van-radio-group value="{{ record }}" bind:change="onChangeSelectRecharge">
<block wx:for="{{list}}" wx:for-index="itemIndex" wx:key="item">
<view class="tbody">
<view class="tr">
<view class="th" style="width: 70rpx"> {{ itemIndex + 1 }} </view>
<view class="th" style="width: 200rpx"> {{ item.WechatUserName }} </view>
<view class="th" style="width: 300rpx"> {{ item.WechatPhone }} </view>
<view class="th" style="width: 100rpx; display: flex;">
<view class="primaryTextBtn" bind:tap="handleDelete" data-id="{{item.WechatUserID}}" data-name="{{item.WechatUserName}}" wx:if="{{!item.Permissions}}">
<view
class="primaryTextBtn"
bind:tap="handleDelete"
data-id="{{item.WechatUserID}}"
data-name="{{item.WechatUserName}}"
wx:if="{{!item.Permissions}}"
>
移除
</view>
<van-tag type="info" wx:else>管理员</van-tag>
<van-tag type="primary" wx:else>管理员</van-tag>
</view>
</view>
</block>
</van-radio-group>
</view>
</view>
</view>
</view>
</block>
</van-radio-group>
</van-row>
<empty wx:else bind:refresh="initUserList" />
</view>
</view>
<empty wx:else bind:refresh="initUserList" />
</view>
<search-select
show="{{show}}"
@ -109,6 +115,7 @@
visible="{{updatePhoneVisible}}"
tenement="{{tenement}}"
park="{{park}}"
parentPhone="{{parentPhone}}"
bind:ok="onUpdatePhoneConfirm"
bind:cancel="handleUpdatePhoneCancel"
/>

View File

@ -47,3 +47,23 @@
.primaryTextBtn {
color: #1989fa;
}
.customTable {
margin: 20rpx;
font-size: 32rpx;
}
.customTableTile {
background-color: var(--light-green);
box-sizing: border-box;
}
.tableTitleRow {
padding: 16rpx;
}
.tableRow {
padding: 16rpx;
border: 1rpx solid #ccc;
border-top: 0rpx;
}

View File

@ -28,6 +28,25 @@
</van-field>
<view>
<view wx:if="{{list.length}}">
<view class="operate" wx:if="{{status === 2}}">
<view style="margin-top: 60rpx; margin-bottom: 60rpx;display: flex; justify-content: center; align-items: center;">
<van-button
type="info"
size="small"
style="margin-right: 30rpx;"
bind:click="handleApprove"
data-status="0"
disabled="{{!record}}"
> 同意 </van-button>
<van-button
size="small"
bind:click="handleClear"
disabled="{{!record}}"
bind:click="handleApprove"
data-status="1"
> 拒绝 </van-button>
</view>
</view>
<view class="tableWrapper">
<view class="table">
<view class="thead">
@ -65,25 +84,7 @@
</view>
<empty bind:refresh="init" wx:else />
<view class="operate" wx:if="{{status === 2}}">
<view style="margin-top: 60rpx; margin-bottom: 60rpx;display: flex; justify-content: center; align-items: center;">
<van-button
type="info"
size="small"
style="margin-right: 30rpx;"
bind:click="handleApprove"
data-status="0"
disabled="{{!record}}"
> 同意 </van-button>
<van-button
size="small"
bind:click="handleClear"
disabled="{{!record}}"
bind:click="handleApprove"
data-status="1"
> 拒绝 </van-button>
</view>
</view>
</view>

View File

@ -1,9 +1,11 @@
<!--pages/workBench/components/recharge/index.wxml-->
<segmented
list="{{segmentedList}}"
active="{{active}}"
bind:change="handleChange"
/>
<view style="margin-top: 20rpx;">
<segmented
list="{{segmentedList}}"
active="{{active}}"
bind:change="handleChange"
/>
</view>
<approve status="{{2}}" wx:if="{{active === 0}}" />
<approve status="{{1}}" wx:if="{{active === 1}}" />

View File

@ -122,11 +122,10 @@ Component({
},
async handleMeterSwitchOn() {
const that = this;
const { meter, list } = this.data;
const item = list.find(ele => ele.id === meter)
const { meter, meterName } = this.data;
wx.showModal({
title: '提示',
content: `您确认要对${item?.address || 当前电表}进行合闸吗?`,
content: `您确认要对${meterName || 当前电表}进行合闸吗?`,
complete: async (res) => {
if (res.cancel) {
@ -149,11 +148,10 @@ Component({
},
async handleMeterSwitchOff() {
const that = this;
const { meter, list } = this.data;
const item = list.find(ele => ele.id === meter)
const { meter, meterName } = this.data;
wx.showModal({
title: '提示',
content: `您确认要对${item?.address || 当前电表}进行拉闸吗?`,
content: `您确认要对${meterName || 当前电表}进行拉闸吗?`,
complete: async (res) => {
if (res.cancel) {
return;

View File

@ -10,6 +10,8 @@
"empty": "/components/empty/index",
"van-radio": "@vant/weapp/radio/index",
"van-radio-group": "@vant/weapp/radio-group/index",
"van-tag": "@vant/weapp/tag/index"
"van-tag": "@vant/weapp/tag/index",
"van-row": "@vant/weapp/row/index",
"van-col": "@vant/weapp/col/index"
}
}

View File

@ -31,112 +31,71 @@
<van-empty wx:if="{{!meter}}" description="选择电表后查看" />
<view>
<view wx:if="{{list.length}}">
<van-radio-group value="{{ radio }}" bind:change="onChangeSelectMeter">
<view class="classWrapper" wx:for="{{list}}" wx:key="id">
<van-field
value="{{item.tenement.name}}"
label="商户名称"
readonly
title-width="140rpx"
/>
<van-field
value="商户电表"
label="电表类型"
readonly
wx:if="{{item.type === 0}}"
title-width="140rpx"
/>
<van-field
value="公摊电表"
label="电表类型"
readonly
wx:if="{{item.type === 2}}"
title-width="140rpx"
/>
<van-field
value="园区电表"
label="电表类型"
readonly
wx:else
title-width="140rpx"
/>
<van-field
value="{{item.meterNo}}"
label="表号"
readonly
title-width="140rpx"
/>
<van-field
value="{{item.address}}"
label="表计地址"
readonly
title-width="140rpx"
/>
<van-field
value="{{item.meterSn}}"
label="SN"
readonly
title-width="140rpx"
/>
<van-field
value="{{item.amount}}"
label="表字"
readonly
title-width="140rpx"
/>
<van-field
value="{{item.money}}"
label="电表余额"
readonly
title-width="140rpx"
/>
<van-field
value="合闸"
label="合闸状态"
readonly
wx:if="{{item.onPosition === 0}}"
title-width="140rpx"
/>
<van-field
value="拉闸"
label="合闸状态"
readonly
wx:else
title-width="140rpx"
/>
<van-field
value="在线"
label="在线状态"
readonly
wx:if="{{item.canConnect}}"
title-width="140rpx"
/>
<van-field
value="失联"
label="在线状态"
readonly
wx:else
title-width="140rpx"
/>
<view class="operate">
<view style="margin-top: 60rpx; margin-bottom: 60rpx;display: flex; justify-content: center; align-items: center;">
<van-button
type="info"
size="small"
style="margin-right: 30rpx;"
bind:click="handleMeterSwitchOn"
disabled="{{!meter}}"
> 合闸 </van-button>
<van-button size="small" bind:click="handleClear" disabled="{{!meter}}" bind:click="handleMeterSwitchOff"> 拉闸 </van-button>
</view>
</view>
<view class="customTable" wx:for="{{list}}" wx:key="id">
<view class="customTableTile">
<van-row>
<van-col span="8">{{item.tenement.shortName}}</van-col>
<van-col span="16">{{item.tenement.name}}</van-col>
</van-row>
</view>
<view class="customTableContent">
<van-row >
<van-col span="24">
<view class="tableRow">
<van-row gutter="5">
<van-col span="8" wx:if="{{item.type === 0}}">商户电表</van-col>
<van-col span="8" wx:elif="{{item.type === 2}}">公摊电表</van-col>
<van-col span="8" wx:else>园区电表</van-col>
<van-col span="16">表号:{{item.meterNo}}</van-col>
</van-row>
</view>
</van-col>
<van-col span="24">
<view class="tableRow">
<van-row gutter="5">
<van-col span="8">{{item.address}}</van-col>
<van-col span="16">SN{{item.meterSn}}</van-col>
</van-row>
</view>
</van-col>
<van-col span="24">
<view class="tableRow">
<van-row gutter="5">
<van-col span="8">{{item.amount}}</van-col>
<van-col span="16">余额:{{item.money}}</van-col>
</van-row>
</view>
</van-col>
<van-col span="24">
<view class="tableRow">
<van-row gutter="5">
<van-col span="8" wx:if="{{item.onPosition === 0}}">合闸</van-col>
<van-col span="8" wx:else>拉闸</van-col>
<van-col span="8" wx:if="{{item.canConnect}}">在线</van-col>
<van-col span="8" wx:else>失联</van-col>
</van-row>
</view>
</van-col>
</van-radio-group>
</view>
<empty bind:refresh="init" wx:else />
<view class="operate">
<view style="margin-top: 60rpx; margin-bottom: 60rpx;display: flex; justify-content: center; align-items: center;">
<van-button
type="info"
size="small"
style="margin-right: 30rpx;"
bind:click="handleMeterSwitchOn"
disabled="{{!meter}}"
> 合闸 </van-button>
<van-button size="small" bind:click="handleClear" disabled="{{!meter}}" bind:click="handleMeterSwitchOff"> 拉闸 </van-button>
</van-row>
</view>
</view>
</view>
<empty bind:refresh="init" wx:else />
</view>
</view>

View File

@ -39,3 +39,19 @@
word-break: break-all;
text-align: center;
}
.customTable {
margin: 20rpx;
}
.customTableTile {
background-color: var(--light-green);
padding: 16rpx;
box-sizing: border-box;
}
.tableRow {
padding: 16rpx;
border: 1rpx solid #ccc;
border-top: 0rpx;
}

View File

@ -7,6 +7,8 @@
"van-empty": "@vant/weapp/empty/index",
"kaihu": "./components/kaihu/index",
"bindMeter": "./components/bindMeter/index",
"unBindMeter": "./components/unBindMeter/index"
"unBindMeter": "./components/unBindMeter/index",
"van-row": "@vant/weapp/row/index",
"van-col": "@vant/weapp/col/index"
}
}

View File

@ -46,36 +46,37 @@
</view>
<van-empty wx:if="{{!tenement}}" description="选择园区和商户后查看" />
<view wx:else>
<van-field
value="{{tenementInfo.fullName}}"
label="商户名称"
readonly
title-width="140rpx"
/>
<view class="customTable">
<view class="customTableTile">
<van-row>
<van-col span="24">
<view class="tableTitleRow">
<van-row gutter="5">
<van-col span="8">{{tenementInfo.shortName}}</van-col>
<van-col span="16">{{tenementInfo.fullName}}</van-col>
</van-row>
</view>
</van-col>
<van-col span="24">
<view class="tableTitleRow">
<van-row gutter="5">
<van-col span="8" wx:if="{{tenementInfo.feeType === 0}}"> 华昌宝能收费 </van-col>
<van-col span="8" wx:elif="{{tenementInfo.feeType === 1}}"> 物业代收1 </van-col>
<van-col span="8" wx:elif="{{tenementInfo.feeType === 2}}"> 物业代收2 </van-col>
<van-col span="8" wx:else> 物业代收线损 </van-col>
<van-col span="16">{{tenementInfo.contact}} {{tenementInfo.phone}} </van-col>
</van-row>
</view>
</van-col>
<van-field
value="{{tenementInfo.shortName}}"
label="商户简称"
readonly
title-width="140rpx"
/>
<van-field
value="{{tenementInfo.phone}}"
label="预留电话"
readonly
title-width="140rpx"
/>
<view wx:if="{{meterList.length}}">
<view class="tableWrapper">
<view class="table">
<view class="thead">
<view class="th" style="width: 250rpx"> 电表地址 </view>
<view class="th" style="width: 250rpx"> SN </view>
<view class="th" style="width: 200rpx"> 操作 </view>
</view>
<view class="tbody">
<van-radio-group value="{{ record }}" bind:change="onChangeSelectRecharge">
<block wx:for="{{meterList}}" wx:for-index="itemIndex" wx:key="item">
</van-row>
</view>
<view class="customTableContent">
<van-row>
<van-radio-group value="{{ record }}" bind:change="onChangeSelectRecharge">
<block wx:for="{{meterList}}" wx:for-index="itemIndex" wx:key="item">
<view class="tbody">
<view class="tr">
<view class="th" style="width: 250rpx"> {{ item.address }} </view>
<view class="th" style="width: 250rpx"> {{ item.meterSn }} </view>
@ -90,12 +91,11 @@
</view>
</view>
</view>
</block>
</van-radio-group>
</view>
</view>
</view>
</block>
</van-radio-group>
</van-row>
</view>
</view>
</view>
<search-select

View File

@ -43,3 +43,24 @@
.primaryTextBtn {
color: #1989fa;
}
.customTable {
margin: 20rpx;
font-size: 32rpx;
}
.customTableTile {
background-color: var(--light-green);
box-sizing: border-box;
}
.tableTitleRow {
padding: 16rpx;
}
.tableRow {
padding: 16rpx;
border: 1rpx solid #ccc;
border-top: 0rpx;
}

View File

@ -5,7 +5,7 @@ Page({
* 页面的初始数据
*/
data: {
active: 0
active: 3
},
/**