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

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,35 @@
// pages/workBench/components/tenement/components/bindMeter/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
onMeterFocus(e) {
const { park } = this.data;
if (!park) {
alertInfo("请先选择园区")
return;
}
this.setData({
show: true,
title: "电表",
type: 'meter'
})
},
}
})

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,41 @@
<!--pages/workBench/components/tenement/components/bindMeter/index.wxml-->
<van-dialog
use-slot
title="绑定表计"
show="{{ show }}"
show-cancel-button
bind:confirm="onSubmit"
>
<view class="modalContentWrapper">
<van-field
value=""
label="商户名称"
readonly
type="textarea"
autosize="{{true}}"
title-width="132rpx"
border="{{false}}"
/>
<van-field
value="{{ meterName }}"
placeholder="请选择电表"
label="电表"
readonly
border="{{ false }}"
use-button-slot
title-width="100rpx"
>
<van-button slot="button" size="small" type="primary" bind:click="onMeterFocus">
选择
</van-button>
</van-field>
<van-field
value="{{ money }}"
label="表字"
readonly
title-width="132rpx"
border="{{false}}"
/>
</view>
</van-dialog>

View File

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

View File

@@ -0,0 +1,103 @@
// pages/workBench/components/tenement/components/createTenement/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData(options)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
onBuildingFocus() {
const { park } = this.data;
if (!park) {
alertInfo("请先选择园区")
return;
}
this.setData({
show: true,
title: "建筑",
type: 'building'
})
},
onFeeTypeFocus() {
const { park } = this.data;
if (!park) {
alertInfo("请先选择园区")
return;
}
this.setData({
show: true,
title: "建筑",
type: 'building'
})
},
beforeBack() {
let pages = getCurrentPages(); // 获取当前页面栈
let prevPage = pages[pages.length - 2]; // 获取上一页
const { tenement = '', tenementName = '', park = '', parkName = '' } = this.data;
// 修改上一页的数据
prevPage.setData({
needBackShow: true,
tenement,
tenementName,
park,
parkName
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

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

View File

@@ -0,0 +1,74 @@
<!--pages/workBench/components/tenement/components/createTenement/index.wxml-->
<navigator title="开户" canBack="{{true}}" beforeBack="beforeBack" />
<view class="modalContentWrapper">
<van-field
value=""
label="商户全称"
type="textarea"
autosize="{{true}}"
title-width="132rpx"
required
/>
<van-field
value=""
label="商户简称"
type="textarea"
autosize="{{true}}"
title-width="132rpx"
/>
<van-field
value=""
label="联系地址"
type="textarea"
autosize="{{true}}"
title-width="132rpx"
required
/>
<van-field
value=""
label="联系人"
type="textarea"
autosize="{{true}}"
title-width="132rpx"
required
/>
<van-field
value=""
label="联系电话"
type="textarea"
autosize="{{true}}"
title-width="132rpx"
required
/>
<van-field
value="{{ meterName }}"
placeholder="请选择建筑"
label="建筑"
use-button-slot
title-width="120rpx"
>
<van-button slot="button" size="small" type="primary" bind:click="onBuildingFocus">
选择
</van-button>
</van-field>
<van-field
value="{{ meterName }}"
placeholder="请选择收费类型"
label="收费类型"
use-button-slot
title-width="120rpx"
>
<van-button slot="button" size="small" type="primary" bind:click="onFeeTypeFocus">
选择
</van-button>
</van-field>
</view>
<search-select
show="{{show}}"
title="{{title}}"
type="{{type}}"
park="{{park}}"
bindconfirm="onConfirm"
bindcancel="onConcal"
/>

View File

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

View File

@@ -0,0 +1,57 @@
// pages/workBench/components/tenement/components/kaihu/index.js
import { alertInfo } from "../../../../../../utils/index"
Component({
/**
* 组件的属性列表
*/
properties: {
park: String,
visible: Boolean,
},
// observers: {
// 'visible': function(newVisible) {
// this.setData({
// show: newVisible
// })
// }
// },
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
onBuildingFocus() {
const { park } = this.data;
if (!park) {
alertInfo("请先选择园区")
return;
}
this.setData({
show: true,
title: "建筑",
type: 'building'
})
},
onFeeTypeFocus() {
const { park } = this.data;
if (!park) {
alertInfo("请先选择园区")
return;
}
this.setData({
show: true,
title: "建筑",
type: 'building'
})
},
},
})

View File

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

View File

@@ -0,0 +1,81 @@
<!--pages/workBench/components/tenement/components/kaihu/index.wxml-->
<van-dialog
use-slot
title="开户"
show="{{ visible }}"
show-cancel-button
bind:confirm="onSubmit"
>
<view class="modalContentWrapper">
<van-field
value=""
label="商户全称"
type="textarea"
autosize="{{true}}"
title-width="132rpx"
required
/>
<van-field
value=""
label="商户简称"
type="textarea"
autosize="{{true}}"
title-width="132rpx"
/>
<van-field
value=""
label="联系地址"
type="textarea"
autosize="{{true}}"
title-width="132rpx"
required
/>
<van-field
value=""
label="联系人"
type="textarea"
autosize="{{true}}"
title-width="132rpx"
required
/>
<van-field
value=""
label="联系电话"
type="textarea"
autosize="{{true}}"
title-width="132rpx"
required
/>
<van-field
value="{{ meterName }}"
placeholder="请选择建筑"
label="建筑"
use-button-slot
title-width="120rpx"
>
<van-button slot="button" size="small" type="primary" bind:click="onBuildingFocus">
选择
</van-button>
</van-field>
<van-field
value="{{ meterName }}"
placeholder="请选择收费类型"
label="收费类型"
use-button-slot
title-width="120rpx"
>
<van-button slot="button" size="small" type="primary" bind:click="onFeeTypeFocus">
选择
</van-button>
</van-field>
</view>
</van-dialog>
<search-select
show="{{show}}"
title="{{title}}"
type="{{type}}"
park="{{park}}"
bindconfirm="onConfirm"
bindcancel="onConcal"
/>

View File

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

View File

@@ -0,0 +1,72 @@
import { alertInfo } from "../../../../utils/index";
// pages/workBench/components/tenement/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
lifetimes: {
ready() {
console.log("this.data", this.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'
})
},
async init() {
},
onConfirm(e) {
const { type, data } = e.detail;
switch(type) {
case "park":
this.setData({
park: data.id,
parkName: data.name,
show: false,
})
break;
}
},
startKh() {
this.setData({
kaihuVisible: true
})
// const { park = '', parkName = '', tenement = '', tenementName = '' } = this.data;
// wx.navigateTo({
// url: `/pages/workBench/components/tenement/components/createTenement/index?park=${park}&tenement=${tenement}&parkName=${parkName}&${tenementName}=${tenementName}`,
// })
}
}
})

View File

@@ -0,0 +1,10 @@
{
"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",
"kaihu": "./components/kaihu/index"
}
}

View File

@@ -0,0 +1,100 @@
<!--pages/workBench/components/tenement/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>
<view style="display: flex; align-items: center;margin: 20rpx">
<view wx:if="{{tenement}}">
<van-button style="margin-right: 20rpx;" type="info" size="small" bind:click="startBind"> 绑定电表 </van-button>
<van-button style="margin-right: 20rpx;" type="info" size="small" bind:tap="startUpdateInfo"> 修改信息 </van-button>
</view>
<van-button type="info" size="small" bind:click="startKh" wx:if="{{!!park}}"> 开户 </van-button>
</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: 250rpx"> 电表地址 </view>
<view class="th" style="width: 150rpx"> SN </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"> {{ item.tenement.shortName }} </view>
<view class="th" style="width: 200rpx"> {{ item.money }} </view>
<view class="th" style="width: 200rpx">
<view class="primaryTextBtn" bind:tap="jumpToDetail" data-id="{{item.id}}">
解绑
</view>
</view>
</view>
</block>
</van-radio-group>
</view>
</view>
</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/tenement/index.wxss */