开始做工作台的抄表

This commit is contained in:
2025-09-05 17:32:27 +08:00
parent 399ef43d07
commit 71ad4995c8
21 changed files with 335 additions and 3 deletions

View File

@@ -27,7 +27,8 @@
"pages/aid/finance/index", "pages/aid/finance/index",
"pages/aid/law/index", "pages/aid/law/index",
"pages/aid/detail/index", "pages/aid/detail/index",
"pages/aid/consult/index" "pages/aid/consult/index",
"pages/writeReading/index"
], ],
"subPackages": [ "subPackages": [
{ {

View File

@@ -0,0 +1,60 @@
// pages/workBench/components/reading/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
onParkFocus(e) {
this.setData({
show: true,
title: "园区",
type: 'park'
})
},
async init() {
},
onConfirm(e) {
const { data } = e.detail;
const that = this;
this.setData({
parkName: data.name,
park: data.id,
}, () => {
loadingFunc(async () => {
await that.init();
})
})
this.onConcal();
},
onConcal() {
this.setData({
show: false,
title: "",
type: "",
})
},
jumpToReading(e) {
const { id } = e.currentTarget.dataset;
console.log("id", id, "e", e)
wx.navigateTo({
url: '/pages/writeReading/index',
})
}
}
})

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-dialog": "@vant/weapp/dialog/index",
"van-cell": "@vant/weapp/cell/index"
}
}

View File

@@ -0,0 +1,48 @@
<!--pages/workBench/components/reading/index.wxml-->
<van-field
value="{{ parkName }}"
placeholder="请选择园区"
label="园区"
readonly
border="{{ false }}"
use-button-slot
title-width="100rpx"
>
<van-button slot="button" size="small" type="primary" bind:click="onParkFocus">
选择
</van-button>
</van-field>
<search-select
show="{{show}}"
title="{{title}}"
type="{{type}}"
park="{{park}}"
bindconfirm="onConfirm"
bindcancel="onConcal"
/>
<van-cell
title="路线1"
label="包含12个抄表点"
>
<view slot="right-icon">
<!-- <van-icon name="search" class="search-icon" /> -->
<van-button type="primary" size="small" type="primary"> 去抄表 </van-button>
</view>
</van-cell>
<van-cell
title="路线2"
label="包含12个抄表点"
>
<view slot="right-icon">
<!-- <van-icon name="search" class="search-icon" /> -->
<van-button
type="primary"
size="small"
bind:tap="jumpToReading"
data-id="1234"
> 去抄表 </van-button>
</view>
</van-cell>

View File

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

View File

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

View File

@@ -5,7 +5,8 @@
"navigator": "/components/navigator/index", "navigator": "/components/navigator/index",
"approve": "./components/approve/index", "approve": "./components/approve/index",
"recharge": "./components/recharge/index", "recharge": "./components/recharge/index",
"record": "./components/record/index" "record": "./components/record/index",
"reading": "./components/reading/index"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }

View File

@@ -10,4 +10,7 @@
<van-tab title="审核"> <van-tab title="审核">
<approve /> <approve />
</van-tab> </van-tab>
<van-tab title="抄表">
<reading />
</van-tab>
</van-tabs> </van-tabs>

View File

@@ -0,0 +1,24 @@
// pages/writeReading/components/meterInfo/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1,2 @@
<!--pages/writeReading/components/meterInfo/index.wxml-->
<text>pages/writeReading/components/meterInfo/index.wxml</text>

View File

@@ -0,0 +1 @@
/* pages/writeReading/components/meterInfo/index.wxss */

View File

@@ -0,0 +1,41 @@
// pages/writeReading/components/meterList/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
animationData: {}, // 存储动画数据
position: -100
},
lifetimes: {
attached() {
// 在页面准备就绪时初始化动画实例
this.animation = wx.createAnimation({
duration: 500, // 动画持续时间,单位 ms
timingFunction: 'ease-out', // 动画缓动函数,还可以是 'linear', 'ease-in', 'ease-in-out'
delay: 0 // 动画延迟时间
});
}
},
/**
* 组件的方法列表
*/
methods: {
handleLeft() {
// 将动画数据设置到 data 中,从而触发视图更新
this.setData({
position: this.data.position - 100,
});
}
}
})

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
}
}

View File

@@ -0,0 +1,24 @@
<!--pages/writeReading/components/meterList/index.wxml-->
<view class="wrapper">
<view class="title">
<text> 电表列表 </text>
</view>
<view style="display: flex; align-items: center;">
<view bind:tap="handleLeft">
</view>
<scroll-view
scroll-x="{{true}}"
class="meterListScrollView"
>
<view style="width: 1000px; margin-left: {{position}}rpx">
12345623425346356356356 12345623425346356356356 12345623425346356356356 12345623425346356356356
</view>
</scroll-view>
<view>
</view>
</view>
</view>

View File

@@ -0,0 +1,16 @@
/* pages/writeReading/components/meterList/index.wxss */
.wrapper {
padding: 0 20rpx;
}
.title {
margin-top: 20rpx;
}
.meterListScrollView {
flex: 1;
margin-left: 20rpx;
margin-right: 20rpx;
overflow: hidden;
}

View File

@@ -0,0 +1,66 @@
// pages/writeReading/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@@ -0,0 +1,7 @@
{
"usingComponents": {
"navigator": "/components/navigator/index",
"meter-list": "./components/meterList/index"
},
"navigationStyle": "custom"
}

View File

@@ -0,0 +1,3 @@
<!--pages/writeReading/index.wxml-->
<navigator title="录入抄表记录" canBack="{{true}}" />
<meter-list />

View File

@@ -0,0 +1 @@
/* pages/writeReading/index.wxss */

View File

@@ -10,6 +10,13 @@
"condition": { "condition": {
"miniprogram": { "miniprogram": {
"list": [ "list": [
{
"name": "pages/writeReading/index",
"pathName": "pages/writeReading/index",
"query": "",
"launchMode": "default",
"scene": null
},
{ {
"name": "pages/aid/consult/index", "name": "pages/aid/consult/index",
"pathName": "pages/aid/consult/index", "pathName": "pages/aid/consult/index",