去除打印,抄表路线支持所有园区,支持部分选择框清除内容
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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}}"
|
||||
/>
|
||||
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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()
|
||||
},
|
||||
|
||||
|
||||
@@ -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}}"
|
||||
|
||||
@@ -20,7 +20,6 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
console.log("options", options)
|
||||
const { park, parkName, name, id } = options
|
||||
this.setData({
|
||||
park,
|
||||
|
||||
@@ -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),
|
||||
})
|
||||
},
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user