去除打印,抄表路线支持所有园区,支持部分选择框清除内容
This commit is contained in:
@@ -25,7 +25,6 @@ Component({
|
|||||||
observers: {
|
observers: {
|
||||||
"show,type,filterBind": function(newShow, newType) {
|
"show,type,filterBind": function(newShow, newType) {
|
||||||
if (newShow && newType) {
|
if (newShow && newType) {
|
||||||
console.log("newShow", newShow,"newType", newType)
|
|
||||||
this.onSearch()
|
this.onSearch()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -68,7 +67,6 @@ Component({
|
|||||||
},
|
},
|
||||||
onConfirm(event) {
|
onConfirm(event) {
|
||||||
const { index } = event.detail;
|
const { index } = event.detail;
|
||||||
console.log("index", index)
|
|
||||||
const { list = [], type } = this.data;
|
const { list = [], type } = this.data;
|
||||||
const item = list[index];
|
const item = list[index];
|
||||||
if (!item) {
|
if (!item) {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ Component({
|
|||||||
hideBorder: Boolean,
|
hideBorder: Boolean,
|
||||||
required: Boolean,
|
required: Boolean,
|
||||||
transparent: Boolean,
|
transparent: Boolean,
|
||||||
|
allowClear: Boolean,
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,12 +43,14 @@ Component({
|
|||||||
},
|
},
|
||||||
onChangeText(e) {
|
onChangeText(e) {
|
||||||
this.setData({ text: e.detail });
|
this.setData({ text: e.detail });
|
||||||
console.log("----------")
|
|
||||||
this.triggerEvent("changeText", e.detail)
|
this.triggerEvent("changeText", e.detail)
|
||||||
},
|
},
|
||||||
onSearchKeyword() {
|
onSearchKeyword() {
|
||||||
this.triggerEvent("searchKeyword", this.data.keyword)
|
this.triggerEvent("searchKeyword", this.data.keyword)
|
||||||
this.setData({ keyword: "" })
|
this.setData({ keyword: "" })
|
||||||
|
},
|
||||||
|
onClear() {
|
||||||
|
this.triggerEvent("clear")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<view class="content" bind:tap="clickTime" bind:tap="onSearch" style="background-color: {{transparent ? 'transparent' : 'white'}};">
|
<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:if="{{!text}}" style="color: #ccc;"> {{placeholder}} </view>
|
||||||
<view class="text" wx:else> {{text}} </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" />
|
<van-icon name="arrow-down" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ Page({
|
|||||||
const { token, ...user } = data
|
const { token, ...user } = data
|
||||||
wx.setStorageSync('user', user)
|
wx.setStorageSync('user', user)
|
||||||
wx.setStorageSync('token', data?.token)
|
wx.setStorageSync('token', data?.token)
|
||||||
console.log("user.workStatus", user.workStatus)
|
|
||||||
if (user.workStatus) {
|
if (user.workStatus) {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '/pages/workBenchNew/index',
|
url: '/pages/workBenchNew/index',
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ Page({
|
|||||||
data: {
|
data: {
|
||||||
time: "",
|
time: "",
|
||||||
area: "",
|
area: "",
|
||||||
|
placeholder: "",
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -151,7 +152,6 @@ Page({
|
|||||||
mediaType: ['image'],
|
mediaType: ['image'],
|
||||||
sourceType: ['album', 'camera'],
|
sourceType: ['album', 'camera'],
|
||||||
success: async function(res) {
|
success: async function(res) {
|
||||||
console.log("res", res)
|
|
||||||
const path = res.tempFiles?.[0]?.tempFilePath.toLowerCase()
|
const path = res.tempFiles?.[0]?.tempFilePath.toLowerCase()
|
||||||
if (!/(\.jpg|\.png|\.jpeg)$/.test(path)) {
|
if (!/(\.jpg|\.png|\.jpeg)$/.test(path)) {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
@@ -293,6 +293,30 @@ Page({
|
|||||||
}
|
}
|
||||||
this.onCancel();
|
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) {
|
changeAddress(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
address: e.detail
|
address: e.detail
|
||||||
|
|||||||
@@ -85,24 +85,32 @@
|
|||||||
placeholder="请选择卡绑定(选填)"
|
placeholder="请选择卡绑定(选填)"
|
||||||
text="{{cardName}}"
|
text="{{cardName}}"
|
||||||
bind:search="onBindCard"
|
bind:search="onBindCard"
|
||||||
|
allowClear="{{true}}"
|
||||||
|
bind:clear="clearCard"
|
||||||
/>
|
/>
|
||||||
<searchSelectWrapper
|
<searchSelectWrapper
|
||||||
label="互感器A"
|
label="互感器A"
|
||||||
placeholder="请选择互感器绑定"
|
placeholder="请选择互感器绑定"
|
||||||
text="{{collectionAName}}"
|
text="{{collectionAName}}"
|
||||||
bind:search="onBindCollectionA"
|
bind:search="onBindCollectionA"
|
||||||
|
allowClear="{{true}}"
|
||||||
|
bind:clear="clearCollectionA"
|
||||||
/>
|
/>
|
||||||
<searchSelectWrapper
|
<searchSelectWrapper
|
||||||
label="互感器B"
|
label="互感器B"
|
||||||
placeholder="请选择互感器绑定"
|
placeholder="请选择互感器绑定"
|
||||||
text="{{collectionBName}}"
|
text="{{collectionBName}}"
|
||||||
bind:search="onBindCollectionB"
|
bind:search="onBindCollectionB"
|
||||||
|
allowClear="{{true}}"
|
||||||
|
bind:clear="clearCollectionB"
|
||||||
/>
|
/>
|
||||||
<searchSelectWrapper
|
<searchSelectWrapper
|
||||||
label="互感器C"
|
label="互感器C"
|
||||||
placeholder="请选择互感器绑定"
|
placeholder="请选择互感器绑定"
|
||||||
text="{{collectionCName}}"
|
text="{{collectionCName}}"
|
||||||
bind:search="onBindCollectionC"
|
bind:search="onBindCollectionC"
|
||||||
|
allowClear="{{true}}"
|
||||||
|
bind:clear="clearCollectionC"
|
||||||
/>
|
/>
|
||||||
<searchSelectWrapper
|
<searchSelectWrapper
|
||||||
label="商户"
|
label="商户"
|
||||||
@@ -174,6 +182,7 @@
|
|||||||
park="{{park}}"
|
park="{{park}}"
|
||||||
bindconfirm="onConfirm"
|
bindconfirm="onConfirm"
|
||||||
bindcancel="onCancel"
|
bindcancel="onCancel"
|
||||||
|
placeholder="{{placeholder}}"
|
||||||
wx:if="{{show}}"
|
wx:if="{{show}}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -171,7 +171,6 @@ Page({
|
|||||||
mediaType: ['image'],
|
mediaType: ['image'],
|
||||||
sourceType: ['album', 'camera'],
|
sourceType: ['album', 'camera'],
|
||||||
success: async function(res) {
|
success: async function(res) {
|
||||||
console.log("res", res)
|
|
||||||
const path = res.tempFiles?.[0]?.tempFilePath.toLowerCase()
|
const path = res.tempFiles?.[0]?.tempFilePath.toLowerCase()
|
||||||
if (!/(\.jpg|\.png|\.jpeg)$/.test(path)) {
|
if (!/(\.jpg|\.png|\.jpeg)$/.test(path)) {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ Page({
|
|||||||
await that.init();
|
await that.init();
|
||||||
this.setData({
|
this.setData({
|
||||||
mode: null,
|
mode: null,
|
||||||
|
modeName: null,
|
||||||
days: null,
|
days: null,
|
||||||
reason: null,
|
reason: null,
|
||||||
url: null,
|
url: null,
|
||||||
@@ -130,7 +131,6 @@ Page({
|
|||||||
mediaType: ['image'],
|
mediaType: ['image'],
|
||||||
sourceType: ['album', 'camera'],
|
sourceType: ['album', 'camera'],
|
||||||
success: async function(res) {
|
success: async function(res) {
|
||||||
console.log("res", res)
|
|
||||||
const path = res.tempFiles?.[0]?.tempFilePath.toLowerCase()
|
const path = res.tempFiles?.[0]?.tempFilePath.toLowerCase()
|
||||||
if (!/(\.jpg|\.png|\.jpeg)$/.test(path)) {
|
if (!/(\.jpg|\.png|\.jpeg)$/.test(path)) {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ Page({
|
|||||||
alertError(message)
|
alertError(message)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log("data", data, "num", num)
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
wx.showModal({
|
wx.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -146,10 +145,6 @@ Page({
|
|||||||
* 生命周期函数--监听页面显示
|
* 生命周期函数--监听页面显示
|
||||||
*/
|
*/
|
||||||
onShow() {
|
onShow() {
|
||||||
const { parkName } = this.data;
|
|
||||||
if (!parkName) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.init()
|
this.init()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -23,9 +23,8 @@
|
|||||||
bindcancel="onConcal"
|
bindcancel="onConcal"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<van-empty description="请先选择园区" wx:if="{{!park}}" />
|
|
||||||
|
|
||||||
<view wx:else>
|
<view>
|
||||||
<view wx:if="{{list.length}}">
|
<view wx:if="{{list.length}}">
|
||||||
<van-cell
|
<van-cell
|
||||||
wx:for="{{list}}"
|
wx:for="{{list}}"
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ Page({
|
|||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
console.log("options", options)
|
|
||||||
const { park, parkName, name, id } = options
|
const { park, parkName, name, id } = options
|
||||||
this.setData({
|
this.setData({
|
||||||
park,
|
park,
|
||||||
|
|||||||
@@ -16,9 +16,6 @@ Page({
|
|||||||
actionItems: [{
|
actionItems: [{
|
||||||
name: '详情',
|
name: '详情',
|
||||||
value: 'detail'
|
value: 'detail'
|
||||||
},{
|
|
||||||
name: '确认',
|
|
||||||
value: 'ok'
|
|
||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
showActionMenu(e) {
|
showActionMenu(e) {
|
||||||
@@ -26,6 +23,38 @@ Page({
|
|||||||
currentActionSheet: e.currentTarget.dataset.id
|
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() {
|
hideActionMenu() {
|
||||||
this.setData({
|
this.setData({
|
||||||
currentActionSheet: null
|
currentActionSheet: null
|
||||||
@@ -173,11 +202,11 @@ onMenuSelect(e) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
list: data?.map(item => {
|
list: Array.isArray(data) ? data?.map(item => {
|
||||||
item.time = item?.created_at?.slice(0, 10)
|
item.time = item?.created_at?.slice(0, 10)
|
||||||
item.address = item?.target?.meter_data?.address;
|
item.address = item?.target?.meter_data?.address;
|
||||||
return item;
|
return item;
|
||||||
}),
|
}) : [],
|
||||||
totalPage: Math.ceil(total / size),
|
totalPage: Math.ceil(total / size),
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
placeholder="请选择园区"
|
placeholder="请选择园区"
|
||||||
text="{{parkName}}"
|
text="{{parkName}}"
|
||||||
bind:search="onParkFocus"
|
bind:search="onParkFocus"
|
||||||
|
allowClear="{{true}}"
|
||||||
|
bind:clear="onClearPark"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<searchSelectWrapper
|
<searchSelectWrapper
|
||||||
@@ -13,18 +15,24 @@
|
|||||||
placeholder="请选择电表"
|
placeholder="请选择电表"
|
||||||
text="{{meterName}}"
|
text="{{meterName}}"
|
||||||
bind:search="onMeterFocus"
|
bind:search="onMeterFocus"
|
||||||
|
allowClear="{{true}}"
|
||||||
|
bind:clear="onClearMeter"
|
||||||
/>
|
/>
|
||||||
<searchSelectWrapper
|
<searchSelectWrapper
|
||||||
label="流程类型"
|
label="流程类型"
|
||||||
placeholder="请选择流程类型"
|
placeholder="请选择流程类型"
|
||||||
text="{{noticeFlowTypeName}}"
|
text="{{noticeFlowTypeName}}"
|
||||||
bind:search="onNoticeFlowFocus"
|
bind:search="onNoticeFlowFocus"
|
||||||
|
allowClear="{{true}}"
|
||||||
|
bind:clear="onClearType"
|
||||||
/>
|
/>
|
||||||
<searchSelectWrapper
|
<searchSelectWrapper
|
||||||
label="确认状态"
|
label="确认状态"
|
||||||
placeholder="请选择确认状态"
|
placeholder="请选择确认状态"
|
||||||
text="{{noticeFlowStatusName}}"
|
text="{{noticeFlowStatusName}}"
|
||||||
bind:search="onNoticeFlowStatusFocus"
|
bind:search="onNoticeFlowStatusFocus"
|
||||||
|
allowClear="{{true}}"
|
||||||
|
bind:clear="onClearStatus"
|
||||||
/>
|
/>
|
||||||
<view>
|
<view>
|
||||||
<view wx:if="{{list.length}}">
|
<view wx:if="{{list.length}}">
|
||||||
@@ -52,7 +60,7 @@
|
|||||||
{{ item.address }}
|
{{ item.address }}
|
||||||
</view>
|
</view>
|
||||||
<view class="th" style="flex: 0 0 150rpx;">
|
<view class="th" style="flex: 0 0 150rpx;">
|
||||||
{{ item.flow_status === 1 ? "处理中" : "已确认" }}
|
{{ item.current_user_audit_status === 0 ? "处理中" : "已确认" }}
|
||||||
</view>
|
</view>
|
||||||
<view class="th" style="flex: 0 0 120rpx; justify-content: flex-end; display: flex; align-items: center;">
|
<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" />
|
<van-icon name="ellipsis" size="24px" bind:tap="showActionMenu" data-id="{{item.id}}" data-data="{{index}}" class="more-icon" />
|
||||||
|
|||||||
@@ -47,9 +47,12 @@ Page({
|
|||||||
}
|
}
|
||||||
alertSuccess("确认成功")
|
alertSuccess("确认成功")
|
||||||
const that = this;
|
const that = this;
|
||||||
|
setTimeout(() => {
|
||||||
loadingFunc(async () => {
|
loadingFunc(async () => {
|
||||||
that.getDetail(id)
|
await that.getDetail(id)
|
||||||
})
|
})
|
||||||
|
}, 300)
|
||||||
|
|
||||||
},
|
},
|
||||||
async getDetail(id) {
|
async getDetail(id) {
|
||||||
const { code, data ,message } = await getNoticeFlowDetail(id)
|
const { code, data ,message } = await getNoticeFlowDetail(id)
|
||||||
|
|||||||
@@ -23,6 +23,13 @@
|
|||||||
"condition": {
|
"condition": {
|
||||||
"miniprogram": {
|
"miniprogram": {
|
||||||
"list": [
|
"list": [
|
||||||
|
{
|
||||||
|
"name": "pages/workBenchNew/components/installMeter/index",
|
||||||
|
"pathName": "pages/workBenchNew/components/installMeter/index",
|
||||||
|
"query": "",
|
||||||
|
"launchMode": "default",
|
||||||
|
"scene": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "pages/workBenchTodoList/index",
|
"name": "pages/workBenchTodoList/index",
|
||||||
"pathName": "pages/workBenchTodoList/index",
|
"pathName": "pages/workBenchTodoList/index",
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export function getConfigByEnv() {
|
|||||||
switch (envVersion) {
|
switch (envVersion) {
|
||||||
// 开发版
|
// 开发版
|
||||||
case 'develop':
|
case 'develop':
|
||||||
api = "http://localhost:8000"
|
// api = "http://localhost:8000"
|
||||||
// api = "https://zgd.hbhcbn.com/api3"
|
// api = "https://zgd.hbhcbn.com/api3"
|
||||||
// TODO: 发布正式时使用此路径
|
// TODO: 发布正式时使用此路径
|
||||||
// api = "https://zgd.hbhcbn.com/wxApi"
|
api = "https://zgd.hbhcbn.com/wxApi"
|
||||||
// api = "http://127.0.0.1:4523/m1/4143821-0-default"
|
// api = "http://127.0.0.1:4523/m1/4143821-0-default"
|
||||||
break;
|
break;
|
||||||
// 体验版
|
// 体验版
|
||||||
|
|||||||
Reference in New Issue
Block a user