修改发票显示问题和暂存工作台修改

This commit is contained in:
2025-02-19 19:54:02 +08:00
parent 103c10347c
commit 616c6a53fb
47 changed files with 1142 additions and 82 deletions

View File

@@ -0,0 +1,50 @@
import { alertInfo, alertSuccess } from "../../../../../../utils/index";
import request from "../../../../../../utils/request"
const { OK } = request
// pages/workBench/components/account/components/editModal/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
type: String,
title: String,
visible: Boolean,
onOk: Function,
onCancel: Function,
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
async onSubmit() {
const { phone, name } = this.data;
if (!phone) {
alertInfo("请输入手机号")
return
}
if (!name) {
alertInfo("请输入昵称")
return
}
// const { code, message } = await update()
// if (code !== OK) {
// alertInfo(message)
// return;
// }
// alertSuccess("操作成功")
// if (this.onOk) {
// this.onOk()
// }
}
}
})

View File

@@ -0,0 +1,8 @@
{
"component": true,
"usingComponents": {
"van-dialog": "@vant/weapp/dialog/index",
"search-select": "/components/searchSelect/index",
"van-field": "@vant/weapp/field/index"
}
}

View File

@@ -0,0 +1,30 @@
<!--pages/workBench/components/account/components/editModal/index.wxml-->
<van-dialog
use-slot
title="{{title}}"
show="{{ visible }}"
show-cancel-button
bind:confirm="onSubmit"
>
<view class="modalContentWrapper">
<van-field
value=""
label="昵称"
readonly
type="textarea"
autosize="{{true}}"
title-width="120rpx"
border="{{false}}"
/>
<van-field
value="{{ meterName }}"
placeholder="请选择电表"
label="手机号"
readonly
border="{{ false }}"
title-width="120rpx"
>
</van-field>
</view>
</van-dialog>

View File

@@ -0,0 +1 @@
/* pages/workBench/components/account/components/editModal/index.wxss */

View File

@@ -0,0 +1,77 @@
// pages/workBench/components/account/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
onParkFocus(e) {
this.setData({
show: true,
title: "园区",
type: 'park'
})
},
onTenementFocus(e) {
const { park } = this.data;
if (!park) {
alertInfo("请先选择园区")
return;
}
this.setData({
show: true,
title: "商户",
type: 'tenement'
})
},
onConfirm(e) {
const { type, data } = e.detail;
switch(type) {
case "park":
this.setData({
park: data.id,
parkName: data.name,
show: false,
})
break;
case "tenement":
this.setData({
tenement: data.id,
tenementName: data.name,
show: false,
})
break;
}
},
handleDelete(e) {
const {} = e;
wx.showModal({
title: '提示',
content: '确认要移除该用户吗?',
complete: (res) => {
if (res.cancel) {
}
if (res.confirm) {
}
}
})
}
}
})

View File

@@ -0,0 +1,16 @@
{
"component": true,
"usingComponents": {
"van-field": "@vant/weapp/field/index",
"van-button": "@vant/weapp/button/index",
"search-select": "/components/searchSelect/index",
"van-empty": "@vant/weapp/empty/index",
"table": "/components/table/table",
"pagination": "/components/pagination/index",
"empty": "/components/empty/index",
"van-radio": "@vant/weapp/radio/index",
"van-radio-group": "@vant/weapp/radio-group/index",
"van-tag": "@vant/weapp/tag/index",
"edit-modal": "./components/editModal/index"
}
}

View File

@@ -0,0 +1,98 @@
<!--pages/workBench/components/account/index.wxml-->
<view>
<van-field
required
value="{{ parkName }}"
label="园区"
placeholder="请选择园区"
border="{{ true }}"
readonly
use-button-slot
>
<van-button slot="button" size="small" type="primary" bind:click="onParkFocus">
选择
</van-button>
</van-field>
<van-field
required
value="{{ tenementName }}"
label="商户"
placeholder="请选择商户"
border="{{ true }}"
readonly
use-button-slot
>
<van-button slot="button" size="small" type="primary" bind:click="onTenementFocus">
选择
</van-button>
</van-field>
</view>
<van-empty wx:if="{{!tenement}}" description="选择园区和商户后查看" />
<view wx:else>
<van-field
value="{{item.tenement.name}}"
label="商户名称"
readonly
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.address}}"
label="预留电话"
readonly
title-width="140rpx"
/>
<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: 200rpx"> 手机号 </view>
<view class="th" style="width: 200rpx"> 操作 </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="tr">
<view class="th" style="width: 200rpx"> {{ index }} </view>
<view class="th" style="width: 200rpx"> {{ item.tenement.shortName }} </view>
<view class="th" style="width: 200rpx"> {{ item.money }} </view>
<view class="th" style="width: 200rpx">
<view class="primaryTextBtn" bind:tap="handleDelete" data-id="{{item.id}}">
移除
</view>
</view>
</view>
</block>
</van-radio-group>
</view>
</view>
</view>
<view class="operateBox">
<van-button type="primary" size="small" style="margin-right: 20rpx;"> 添加子账号 </van-button>
<van-button type="primary" size="small" style="margin-right: 20rpx;"> 修改主账号 </van-button>
</view>
</view>
</view>
<search-select
show="{{show}}"
title="{{title}}"
type="{{type}}"
park="{{park}}"
bindconfirm="onConfirm"
bindcancel="onConcal"
/>
<kaihu park="{{park}}" visible="{{kaihuVisible}}" />

View File

@@ -0,0 +1 @@
/* pages/workBench/components/account/index.wxss */