去除打印,抄表路线支持所有园区,支持部分选择框清除内容

This commit is contained in:
2025-11-13 17:10:33 +08:00
parent d7d5366230
commit edfd386e1b
16 changed files with 100 additions and 28 deletions

View File

@@ -25,7 +25,6 @@ Component({
observers: {
"show,type,filterBind": function(newShow, newType) {
if (newShow && newType) {
console.log("newShow", newShow,"newType", newType)
this.onSearch()
}
}
@@ -68,7 +67,6 @@ Component({
},
onConfirm(event) {
const { index } = event.detail;
console.log("index", index)
const { list = [], type } = this.data;
const item = list[index];
if (!item) {

View File

@@ -20,6 +20,7 @@ Component({
hideBorder: Boolean,
required: Boolean,
transparent: Boolean,
allowClear: Boolean,
},
/**
@@ -42,12 +43,14 @@ Component({
},
onChangeText(e) {
this.setData({ text: e.detail });
console.log("----------")
this.triggerEvent("changeText", e.detail)
},
onSearchKeyword() {
this.triggerEvent("searchKeyword", this.data.keyword)
this.setData({ keyword: "" })
},
onClear() {
this.triggerEvent("clear")
}
}
})

View File

@@ -4,7 +4,7 @@
<view class="content" bind:tap="clickTime" bind:tap="onSearch" style="background-color: {{transparent ? 'transparent' : 'white'}};">
<view class="text" wx:if="{{!text}}" style="color: #ccc;"> {{placeholder}} </view>
<view class="text" wx:else> {{text}} </view>
<!-- <van-icon name="close" custom-style="margin-right: 16rpx" /> -->
<van-icon name="close" custom-style="margin-right: 16rpx" wx:if="{{allowClear}}" catch:tap="onClear" />
<van-icon name="arrow-down" />
</view>
</view>

View File

@@ -58,7 +58,6 @@ Page({
const { token, ...user } = data
wx.setStorageSync('user', user)
wx.setStorageSync('token', data?.token)
console.log("user.workStatus", user.workStatus)
if (user.workStatus) {
wx.redirectTo({
url: '/pages/workBenchNew/index',

View File

@@ -14,6 +14,7 @@ Page({
data: {
time: "",
area: "",
placeholder: "",
},
/**
@@ -151,7 +152,6 @@ Page({
mediaType: ['image'],
sourceType: ['album', 'camera'],
success: async function(res) {
console.log("res", res)
const path = res.tempFiles?.[0]?.tempFilePath.toLowerCase()
if (!/(\.jpg|\.png|\.jpeg)$/.test(path)) {
wx.showToast({
@@ -293,6 +293,30 @@ Page({
}
this.onCancel();
},
clearCard() {
this.setData({
card: null,
cardName: null,
})
},
clearCollectionA() {
this.setData({
collectionA: null,
collectionAName: null,
})
},
clearCollectionB() {
this.setData({
collectionB: null,
collectionBName: null,
})
},
clearCollectionC() {
this.setData({
collectionC: null,
collectionCName: null,
})
},
changeAddress(e) {
this.setData({
address: e.detail

View File

@@ -85,24 +85,32 @@
placeholder="请选择卡绑定(选填)"
text="{{cardName}}"
bind:search="onBindCard"
allowClear="{{true}}"
bind:clear="clearCard"
/>
<searchSelectWrapper
label="互感器A"
placeholder="请选择互感器绑定"
text="{{collectionAName}}"
bind:search="onBindCollectionA"
allowClear="{{true}}"
bind:clear="clearCollectionA"
/>
<searchSelectWrapper
label="互感器B"
placeholder="请选择互感器绑定"
text="{{collectionBName}}"
bind:search="onBindCollectionB"
allowClear="{{true}}"
bind:clear="clearCollectionB"
/>
<searchSelectWrapper
label="互感器C"
placeholder="请选择互感器绑定"
text="{{collectionCName}}"
bind:search="onBindCollectionC"
allowClear="{{true}}"
bind:clear="clearCollectionC"
/>
<searchSelectWrapper
label="商户"
@@ -174,6 +182,7 @@
park="{{park}}"
bindconfirm="onConfirm"
bindcancel="onCancel"
placeholder="{{placeholder}}"
wx:if="{{show}}"
/>

View File

@@ -171,7 +171,6 @@ Page({
mediaType: ['image'],
sourceType: ['album', 'camera'],
success: async function(res) {
console.log("res", res)
const path = res.tempFiles?.[0]?.tempFilePath.toLowerCase()
if (!/(\.jpg|\.png|\.jpeg)$/.test(path)) {
wx.showToast({

View File

@@ -114,6 +114,7 @@ Page({
await that.init();
this.setData({
mode: null,
modeName: null,
days: null,
reason: null,
url: null,
@@ -130,7 +131,6 @@ Page({
mediaType: ['image'],
sourceType: ['album', 'camera'],
success: async function(res) {
console.log("res", res)
const path = res.tempFiles?.[0]?.tempFilePath.toLowerCase()
if (!/(\.jpg|\.png|\.jpeg)$/.test(path)) {
wx.showToast({

View File

@@ -93,7 +93,6 @@ Page({
alertError(message)
return;
}
console.log("data", data, "num", num)
if (!data) {
wx.showModal({
title: '提示',
@@ -146,10 +145,6 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
const { parkName } = this.data;
if (!parkName) {
return
}
this.init()
},

View File

@@ -23,9 +23,8 @@
bindcancel="onConcal"
/>
<van-empty description="请先选择园区" wx:if="{{!park}}" />
<view wx:else>
<view>
<view wx:if="{{list.length}}">
<van-cell
wx:for="{{list}}"

View File

@@ -20,7 +20,6 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log("options", options)
const { park, parkName, name, id } = options
this.setData({
park,

View File

@@ -16,16 +16,45 @@ Page({
actionItems: [{
name: '详情',
value: 'detail'
},{
name: '确认',
value: 'ok'
}],
}],
},
showActionMenu(e) {
this.setData({
currentActionSheet: e.currentTarget.dataset.id
});
},
onClearPark() {
const that = this;
this.setData({ park: null, parkName: null, meter: null, meterName: null }, () => {
loadingFunc(async () => {
await that.init()
})
})
},
onClearMeter() {
const that = this;
this.setData({ meter: null, meterName: null }, () => {
loadingFunc(async () => {
await that.init()
})
})
},
onClearType() {
const that = this;
this.setData({ noticeFlowType: null, noticeFlowTypeName: null }, () => {
loadingFunc(async () => {
await that.init()
})
})
},
onClearStatus() {
const that = this;
this.setData({ noticeFlowStatus: null, noticeFlowStatusName: null }, () => {
loadingFunc(async () => {
await that.init()
})
})
},
hideActionMenu() {
this.setData({
currentActionSheet: null
@@ -173,11 +202,11 @@ onMenuSelect(e) {
return;
}
this.setData({
list: data?.map(item => {
list: Array.isArray(data) ? data?.map(item => {
item.time = item?.created_at?.slice(0, 10)
item.address = item?.target?.meter_data?.address;
return item;
}),
}) : [],
totalPage: Math.ceil(total / size),
})
},

View File

@@ -6,6 +6,8 @@
placeholder="请选择园区"
text="{{parkName}}"
bind:search="onParkFocus"
allowClear="{{true}}"
bind:clear="onClearPark"
/>
<searchSelectWrapper
@@ -13,18 +15,24 @@
placeholder="请选择电表"
text="{{meterName}}"
bind:search="onMeterFocus"
allowClear="{{true}}"
bind:clear="onClearMeter"
/>
<searchSelectWrapper
label="流程类型"
placeholder="请选择流程类型"
text="{{noticeFlowTypeName}}"
bind:search="onNoticeFlowFocus"
allowClear="{{true}}"
bind:clear="onClearType"
/>
<searchSelectWrapper
label="确认状态"
placeholder="请选择确认状态"
text="{{noticeFlowStatusName}}"
bind:search="onNoticeFlowStatusFocus"
allowClear="{{true}}"
bind:clear="onClearStatus"
/>
<view>
<view wx:if="{{list.length}}">
@@ -52,7 +60,7 @@
{{ item.address }}
</view>
<view class="th" style="flex: 0 0 150rpx;">
{{ item.flow_status === 1 ? "处理中" : "已确认" }}
{{ item.current_user_audit_status === 0 ? "处理中" : "已确认" }}
</view>
<view class="th" style="flex: 0 0 120rpx; justify-content: flex-end; display: flex; align-items: center;">
<van-icon name="ellipsis" size="24px" bind:tap="showActionMenu" data-id="{{item.id}}" data-data="{{index}}" class="more-icon" />

View File

@@ -47,9 +47,12 @@ Page({
}
alertSuccess("确认成功")
const that = this;
loadingFunc(async () => {
that.getDetail(id)
})
setTimeout(() => {
loadingFunc(async () => {
await that.getDetail(id)
})
}, 300)
},
async getDetail(id) {
const { code, data ,message } = await getNoticeFlowDetail(id)

View File

@@ -23,6 +23,13 @@
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/workBenchNew/components/installMeter/index",
"pathName": "pages/workBenchNew/components/installMeter/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/workBenchTodoList/index",
"pathName": "pages/workBenchTodoList/index",

View File

@@ -45,10 +45,10 @@ export function getConfigByEnv() {
switch (envVersion) {
// 开发版
case 'develop':
api = "http://localhost:8000"
// api = "http://localhost:8000"
// api = "https://zgd.hbhcbn.com/api3"
// TODO: 发布正式时使用此路径
// api = "https://zgd.hbhcbn.com/wxApi"
api = "https://zgd.hbhcbn.com/wxApi"
// api = "http://127.0.0.1:4523/m1/4143821-0-default"
break;
// 体验版