小程序工单联调

This commit is contained in:
2025-11-12 17:35:23 +08:00
parent 391219bde1
commit b940d7a6cc
8 changed files with 25 additions and 11 deletions

View File

@@ -19,6 +19,7 @@ Component({
useSlot: Boolean, useSlot: Boolean,
hideBorder: Boolean, hideBorder: Boolean,
required: Boolean, required: Boolean,
transparent: Boolean,
}, },
/** /**

View File

@@ -1,7 +1,7 @@
<!--components/searchSelectWrapper/index.wxml--> <!--components/searchSelectWrapper/index.wxml-->
<view class="wrapper" wx:if="{{type === 'select'}}"> <view class="wrapper" wx:if="{{type === 'select'}}">
<view class="label"><text class="required" wx:if="{{required}}">*</text>{{ label }}</view> <view class="label"><text class="required" wx:if="{{required}}">*</text>{{ label }}</view>
<view class="content" bind:tap="clickTime" bind:tap="onSearch"> <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" /> -->
@@ -10,7 +10,7 @@
</view> </view>
<view class="wrapper" wx:if="{{type === 'inputSearch'}}"> <view class="wrapper" wx:if="{{type === 'inputSearch'}}">
<view class="label"><text class="required" wx:if="{{required}}">*</text>{{ label }}</view> <view class="label"><text class="required" wx:if="{{required}}">*</text>{{ label }}</view>
<view class="inputContent" bind:tap="clickTime"> <view class="inputContent" bind:tap="clickTime" style="background-color: {{transparent ? 'transparent' : 'white'}};">
<van-field <van-field
value="{{ value }}" value="{{ value }}"
placeholder="{{placeholder}}" placeholder="{{placeholder}}"
@@ -23,7 +23,7 @@
</view> </view>
<view class="wrapper" wx:if="{{type === 'input'}}"> <view class="wrapper" wx:if="{{type === 'input'}}">
<view class="label"><text class="required" wx:if="{{required}}">*</text>{{ label }}</view> <view class="label"><text class="required" wx:if="{{required}}">*</text>{{ label }}</view>
<view class="inputContent" bind:tap="clickTime"> <view class="inputContent" bind:tap="clickTime" style="background-color: {{transparent ? 'transparent' : 'white'}};">
<van-field <van-field
value="{{ value }}" value="{{ value }}"
placeholder="{{placeholder}}" placeholder="{{placeholder}}"
@@ -37,7 +37,7 @@
<view class="wrapper" wx:if="{{useSlot}}"> <view class="wrapper" wx:if="{{useSlot}}">
<view class="label"><text class="required" wx:if="{{required}}">*</text>{{ label }}</view> <view class="label"><text class="required" wx:if="{{required}}">*</text>{{ label }}</view>
<view class="inputContent" bind:tap="clickTime" style="{{hideBorder ? 'border: none;' : ''}}"> <view class="inputContent" bind:tap="clickTime" style="{{hideBorder ? 'border: none;' : ''}} {{transparent ? 'background-color: transparent;' : ''}}">
<slot></slot> <slot></slot>
</view> </view>
</view> </view>

View File

@@ -381,7 +381,7 @@ Page({
return; return;
} }
const { code, data, message } = await installMeter({ const { code, data, message } = await installMeter({
park, meter, address, building, meterBox, meterType, park, meterSn: meter, address, building, meterBox, meterType,
ratio, area, card, collectionA, collectionB, collectionC, ratio, area, card, collectionA, collectionB, collectionC,
tenement, sharp, peak, flat, valley, overall, url, sn tenement, sharp, peak, flat, valley, overall, url, sn
}) })

View File

@@ -112,6 +112,12 @@ Page({
alertSuccess("操作成功") alertSuccess("操作成功")
await that.init(); await that.init();
this.setData({
mode: null,
days: null,
reason: null,
url: null,
})
}) })
} }
} }

View File

@@ -4,6 +4,7 @@
"van-button": "@vant/weapp/button/index", "van-button": "@vant/weapp/button/index",
"search-select": "/components/searchSelect/index", "search-select": "/components/searchSelect/index",
"van-empty": "@vant/weapp/empty/index", "van-empty": "@vant/weapp/empty/index",
"van-image": "@vant/weapp/image/index",
"table": "/components/table/table", "table": "/components/table/table",
"pagination": "/components/pagination/index", "pagination": "/components/pagination/index",
"empty": "/components/empty/index", "empty": "/components/empty/index",

View File

@@ -117,6 +117,7 @@
text="{{days}}" text="{{days}}"
type="input" type="input"
bind:changeText="changeDays" bind:changeText="changeDays"
required="{{true}}"
/> />
<searchSelectWrapper <searchSelectWrapper
label="原因" label="原因"
@@ -130,6 +131,7 @@
useSlot="{{true}}" useSlot="{{true}}"
type="" type=""
hideBorder="{{true}}" hideBorder="{{true}}"
transparent="{{true}}"
> >
<view style="display: flex; align-items: center;"> <view style="display: flex; align-items: center;">
<view> <view>
@@ -138,7 +140,7 @@
<van-button type="danger" size="small" bind:click="clearImage" custom-style="margin-right: 20rpx;"> 清除 </van-button> <van-button type="danger" size="small" bind:click="clearImage" custom-style="margin-right: 20rpx;"> 清除 </van-button>
</view> </view>
</view> </view>
<van-image wx:if="{{!!url}}" width="100" height="100" src="{{url}}" custom-style="margin-left: 20rpx;" /> <van-image wx:if="{{url}}" width="100" height="100" src="{{url}}" custom-style="margin-left: 20rpx;" />
</view> </view>
</searchSelectWrapper> </searchSelectWrapper>

View File

@@ -35,8 +35,12 @@ onMenuSelect(e) {
} = e.detail; } = e.detail;
const id = e.currentTarget.dataset.id; const id = e.currentTarget.dataset.id;
if (value === 'detail') { switch(value) {
case "detail":
this.jumpToDetail(id); this.jumpToDetail(id);
break;
case "ok":
break;
} }
}, },
jumpToDetail(id) { jumpToDetail(id) {

View File

@@ -55,7 +55,7 @@
{{ item.flow_status === 1 ? "处理中" : "已确认" }} {{ item.flow_status === 1 ? "处理中" : "已确认" }}
</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-data="{{index}}" class="more-icon" /> <van-icon name="ellipsis" size="24px" bind:tap="showActionMenu" data-data="{{index}}" class="more-icon" />
<van-action-sheet <van-action-sheet
show="{{ currentActionSheet === item.id }}" show="{{ currentActionSheet === item.id }}"
actions="{{ actionItems }}" actions="{{ actionItems }}"
@@ -63,12 +63,12 @@
bind:select="onMenuSelect" bind:select="onMenuSelect"
data-id="{{item.id}}" data-id="{{item.id}}"
close-on-click-action close-on-click-action
/> --> />
<view <!-- <view
class="primaryTextBtn" class="primaryTextBtn"
wx:if="{{item.flow_status === 1}}" wx:if="{{item.flow_status === 1}}"
data-id="{{item.id}}" data-id="{{item.id}}"
> 确认 </view> > 确认 </view> -->
</view> </view>
</view> </view>