准备联调抄表记录

This commit is contained in:
2025-09-16 17:35:49 +08:00
194 changed files with 6560 additions and 1095 deletions

View File

@@ -0,0 +1,84 @@
// pages/workBench/components/tenement/components/bindMeter/index.js
// 0015980101
import { bindMeter, } from "../../../../service/tenement"
import { getWorkMeterDetail } from "../../../../service/meter"
import { alertInfo, alertSuccess } from "../../../../utils/index";
import request from "../../../../utils/request"
import dayjs from "../../../../utils/dayjs"
const { OK } = request
Component({
/**
* 组件的属性列表
*/
properties: {
visible: Boolean,
title: String,
timeProps: String,
numberProps: String,
id: String
},
observers: {
"timeProps": function(newValue) {
this.setData({
time: newValue
})
},
"numberProps": function(newValue) {
this.setData({
number: newValue
})
},
},
/**
* 组件的初始数据
*/
data: {
dateTimeShow: false,
},
/**
* 组件的方法列表
*/
methods: {
onCancel() {
this.setData({
show: false,
title: "",
type: "",
})
// this.triggerEvent("close")
},
onClose() {
this.setData({
show: false,
title: "",
type: "",
})
},
onChange(e) {
const { name } = e.currentTarget.dataset;
this.setData({
[name]: e.detail
})
},
async onSubmit() {
const { time, number } = this.data;
if (time == null || number == null) {
alertInfo("请正确填写后保存")
return;
}
this.triggerEvent("ok")
},
dateTimeConfirm(e) {
this.setData({ time: e.detail.time, dateTimeShow: false })
},
dateTimeCancal(e) {
this.setData({ dateTimeShow: false })
},
onTimeFocus() {
this.setData({ dateTimeShow: true })
}
}
})

View File

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

View File

@@ -0,0 +1,50 @@
<!--pages/workBench/components/tenement/components/bindMeter/index.wxml-->
<van-dialog
use-slot
title="{{title}}"
show="{{ visible }}"
show-cancel-button
bind:confirm="onSubmit"
bind:close="onClose"
>
<view class="modalContentWrapper">
<van-field
value="{{ time }}"
placeholder="请选择绑定时间"
label="时间"
readonly
border="{{ false }}"
use-button-slot
title-width="100rpx"
>
<van-button slot="button" size="small" type="info" bind:click="onTimeFocus">
选择
</van-button>
</van-field>
<van-field
value="{{ number }}"
placeholder="请输入读数"
label="读数"
type="digit"
border="{{ false }}"
title-width="100rpx"
>
</van-field>
</view>
</van-dialog>
<search-select
show="{{show}}"
title="{{title}}"
type="{{type}}"
park="{{park}}"
bindconfirm="onConfirm"
bindcancel="onCancel"
/>
<date-time-picker
show="{{dateTimeShow}}"
bind:confirm="dateTimeConfirm"
bind:cancel="dateTimeCancal"
/>

View File

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