调整接待中验页面的4个按钮。
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
ref="serviceListRef"
|
||||
class="service-status-container"
|
||||
:style="{ top: computedContentTop || contentTop }"
|
||||
:show-record-state-indicator="false"
|
||||
></service-list-furniture>
|
||||
|
||||
<!-- 开始接待表单 -->
|
||||
|
||||
@@ -63,29 +63,41 @@
|
||||
<text class="staff-name">{{ item.staffName || '未分配销售' }}</text>
|
||||
</view>
|
||||
<view class="service-status">
|
||||
<view class="action-trigger">
|
||||
<view class="action-trigger__primary" @click.stop="finishService(item)">
|
||||
<text class="action-trigger__primary-text">结束服务</text>
|
||||
</view>
|
||||
<view class="action-trigger__more" @click.stop="toggleActionMenu(item.id)">
|
||||
<uni-icons type="bottom" size="16" color="#007AFF"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
v-if="!isRecordingItem(item.id)"
|
||||
class="service-action-btn service-action-btn--record"
|
||||
@click.stop="startPhoneRecord(item)"
|
||||
v-if="actionMenuForId && String(actionMenuForId) === String(item.id)"
|
||||
class="action-menu"
|
||||
@click.stop
|
||||
>
|
||||
<text>录音</text>
|
||||
</view>
|
||||
<view
|
||||
v-else
|
||||
class="service-action-btn service-action-btn--record service-action-btn--recording"
|
||||
@click.stop="stopPhoneRecordAndUpload(item)"
|
||||
>
|
||||
<text>停止</text>
|
||||
</view>
|
||||
<view class="service-action-btn service-action-btn--supplement" @click.stop="showSupplementDialog(item)">
|
||||
<text>补录</text>
|
||||
</view>
|
||||
<view class="service-action-btn service-action-btn--upload" @click.stop="chooseAndUploadFile(item)">
|
||||
<text>{{ isUploading(item.id) ? '上传中' : '上传' }}</text>
|
||||
</view>
|
||||
<view class="service-action-btn service-action-btn--finish" @click.stop="finishService(item)">
|
||||
<text>结束</text>
|
||||
<view
|
||||
class="action-menu-item"
|
||||
@click.stop="onActionMenuSelect('record', item)"
|
||||
>
|
||||
<text>{{ isRecordingItem(item.id) ? '停止录音' : '开始录音' }}</text>
|
||||
</view>
|
||||
<view
|
||||
class="action-menu-item"
|
||||
@click.stop="onActionMenuSelect('supplement', item)"
|
||||
>
|
||||
<text>补录客户</text>
|
||||
</view>
|
||||
<view
|
||||
class="action-menu-item"
|
||||
:class="{ 'action-menu-item--disabled': isUploading(item.id) }"
|
||||
@click.stop="onActionMenuSelect('upload', item)"
|
||||
>
|
||||
<text>{{ isUploading(item.id) ? '上传中' : '上传录音' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<template v-if="showRecordStateIndicator">
|
||||
<uni-icons type="bars" size="16" color="#007AFF"></uni-icons>
|
||||
<text>{{ recordStateLabel }}</text>
|
||||
@@ -142,6 +154,12 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<view
|
||||
v-if="actionMenuForId"
|
||||
class="action-menu-mask"
|
||||
@click="closeActionMenu"
|
||||
/>
|
||||
|
||||
<!-- 补录弹窗 -->
|
||||
<view class="supplement-dialog-mask" v-if="showSupplementModal" @click="closeSupplementDialog">
|
||||
<view class="supplement-dialog" @click.stop>
|
||||
@@ -268,7 +286,8 @@ export default {
|
||||
recorderSupported: false,
|
||||
recorderManager: null,
|
||||
recordingServiceId: null,
|
||||
recordingContext: null
|
||||
recordingContext: null,
|
||||
actionMenuForId: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -289,6 +308,51 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggleActionMenu(recordId) {
|
||||
const id = recordId === undefined || recordId === null ? null : String(recordId);
|
||||
if (!id) {
|
||||
this.actionMenuForId = null;
|
||||
return;
|
||||
}
|
||||
this.actionMenuForId = this.actionMenuForId === id ? null : id;
|
||||
},
|
||||
closeActionMenu() {
|
||||
this.actionMenuForId = null;
|
||||
},
|
||||
onActionMenuSelect(action, item) {
|
||||
if (!item || !item.id) {
|
||||
this.closeActionMenu();
|
||||
return;
|
||||
}
|
||||
const id = String(item.id);
|
||||
if (this.actionMenuForId && String(this.actionMenuForId) !== id) {
|
||||
// 避免列表复用导致错点
|
||||
this.actionMenuForId = id;
|
||||
}
|
||||
if (action === 'record') {
|
||||
if (this.isRecordingItem(item.id)) {
|
||||
this.stopPhoneRecordAndUpload(item);
|
||||
} else {
|
||||
this.startPhoneRecord(item);
|
||||
}
|
||||
this.closeActionMenu();
|
||||
return;
|
||||
}
|
||||
if (action === 'supplement') {
|
||||
this.showSupplementDialog(item);
|
||||
this.closeActionMenu();
|
||||
return;
|
||||
}
|
||||
if (action === 'upload') {
|
||||
if (this.isUploading(item.id)) {
|
||||
return;
|
||||
}
|
||||
this.chooseAndUploadFile(item);
|
||||
this.closeActionMenu();
|
||||
return;
|
||||
}
|
||||
this.closeActionMenu();
|
||||
},
|
||||
initServiceRecorder() {
|
||||
this.recorderSupported = typeof uni.getRecorderManager === 'function';
|
||||
if (!this.recorderSupported) {
|
||||
@@ -756,6 +820,7 @@ export default {
|
||||
},
|
||||
async uploadFileForRecord(item, selectedFile) {
|
||||
const recordId = String(item.id);
|
||||
this.closeActionMenu();
|
||||
this.uploadingIds = [...this.uploadingIds, recordId];
|
||||
try {
|
||||
uni.showLoading({
|
||||
@@ -813,6 +878,7 @@ export default {
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.closeActionMenu();
|
||||
|
||||
uni.showModal({
|
||||
title: '确认结束',
|
||||
@@ -1155,6 +1221,7 @@ export default {
|
||||
margin-bottom: 24rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
@@ -1225,6 +1292,82 @@ export default {
|
||||
gap: 8rpx;
|
||||
}
|
||||
|
||||
.action-trigger {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
padding: 0;
|
||||
border-radius: 10rpx;
|
||||
background-color: #EEF4FF;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.action-trigger__primary {
|
||||
padding: 6rpx 12rpx;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.action-trigger__primary-text {
|
||||
font-size: 26rpx;
|
||||
color: #007AFF;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.action-trigger__more {
|
||||
padding: 6rpx 10rpx 6rpx 6rpx;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-left: 1px solid rgba(0, 122, 255, 0.15);
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.action-menu {
|
||||
position: absolute;
|
||||
right: 24rpx;
|
||||
top: 96rpx;
|
||||
min-width: 220rpx;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.12);
|
||||
border: 1px solid #EEF0F3;
|
||||
z-index: 50;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.action-menu-item {
|
||||
padding: 22rpx 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.action-menu-item text {
|
||||
font-size: 28rpx;
|
||||
color: #111827;
|
||||
}
|
||||
|
||||
.action-menu-item:active {
|
||||
background-color: #F5F7FA;
|
||||
}
|
||||
|
||||
.action-menu-item--disabled {
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
.action-menu-mask {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: transparent;
|
||||
z-index: 40;
|
||||
}
|
||||
|
||||
.service-status text {
|
||||
font-size: 26rpx;
|
||||
color: #007AFF;
|
||||
@@ -1387,58 +1530,6 @@ export default {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.service-action-btn {
|
||||
padding: 6rpx 16rpx;
|
||||
border-radius: 4rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 12rpx;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.service-action-btn--finish {
|
||||
color: #007AFF;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.service-action-btn--finish:active {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.service-action-btn--supplement {
|
||||
color: #10B981;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.service-action-btn--supplement:active {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.service-action-btn--upload {
|
||||
color: #7C3AED;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.service-action-btn--upload:active {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.service-action-btn--record {
|
||||
color: #007AFF;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.service-action-btn--record:active {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.service-action-btn--recording {
|
||||
color: #FF3B30;
|
||||
}
|
||||
|
||||
.service-status-empty {
|
||||
padding: 48rpx 0;
|
||||
text-align: center;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
<view class="page"><uni-nav-bar wx:if="{{b}}" bindclickLeft="{{a}}" u-i="638dc4bb-0" bind:__l="__l" u-p="{{b}}"></uni-nav-bar><view class="content"><view class="tabs" style="{{'top:' + i}}"><view class="{{['tab-item', c && 'active']}}" bindtap="{{d}}"><text>开始接待</text></view><view class="{{['tab-item', e && 'active']}}" bindtap="{{f}}"><text>服务中</text></view><view class="{{['tab-item', g && 'active']}}" bindtap="{{h}}"><text>标签管理</text></view></view><service-list-furniture wx:if="{{j}}" u-r="serviceListRef" class="service-status-container r" style="{{'top:' + l}}" u-i="638dc4bb-1" bind:__l="__l"></service-list-furniture><common-begin-reception wx:if="{{m}}" class="reception-form-container" style="{{'top:' + n}}" bindcancel="{{o}}" bindsaveSuccess="{{p}}" bindsaveError="{{q}}" u-i="638dc4bb-2" bind:__l="__l" u-p="{{r}}"/><tag-management-panel wx:if="{{s}}" class="r" u-r="tagPanelRef" u-i="638dc4bb-3" bind:__l="__l" u-p="{{v}}"/></view></view>
|
||||
<view class="page"><uni-nav-bar wx:if="{{b}}" bindclickLeft="{{a}}" u-i="638dc4bb-0" bind:__l="__l" u-p="{{b}}"></uni-nav-bar><view class="content"><view class="tabs" style="{{'top:' + i}}"><view class="{{['tab-item', c && 'active']}}" bindtap="{{d}}"><text>开始接待</text></view><view class="{{['tab-item', e && 'active']}}" bindtap="{{f}}"><text>服务中</text></view><view class="{{['tab-item', g && 'active']}}" bindtap="{{h}}"><text>标签管理</text></view></view><service-list-furniture wx:if="{{j}}" u-r="serviceListRef" class="service-status-container r" style="{{'top:' + l}}" u-i="638dc4bb-1" bind:__l="__l" u-p="{{m}}"></service-list-furniture><common-begin-reception wx:if="{{n}}" class="reception-form-container" style="{{'top:' + o}}" bindcancel="{{p}}" bindsaveSuccess="{{q}}" bindsaveError="{{r}}" u-i="638dc4bb-2" bind:__l="__l" u-p="{{s}}"/><tag-management-panel wx:if="{{t}}" class="r" u-r="tagPanelRef" u-i="638dc4bb-3" bind:__l="__l" u-p="{{w}}"/></view></view>
|
||||
@@ -1 +1 @@
|
||||
<view class="page"><uni-nav-bar wx:if="{{b}}" bindclickLeft="{{a}}" u-i="199fff57-0" bind:__l="__l" u-p="{{b}}"/><view class="content"><view class="tabs" style="{{'top:' + i}}"><view class="{{['tab-item', c && 'active']}}" bindtap="{{d}}"><text>开发接待</text></view><view class="{{['tab-item', e && 'active']}}" bindtap="{{f}}"><text>接待中</text></view><view class="{{['tab-item', g && 'active']}}" bindtap="{{h}}"><text>标签管理</text></view></view><common-begin-reception wx:if="{{j}}" class="reception-form-container" style="{{'top:' + k}}" bindcancel="{{l}}" bindsaveSuccess="{{m}}" bindsaveError="{{n}}" u-i="199fff57-1" bind:__l="__l" u-p="{{o}}"/><service-list-furniture wx:if="{{p}}" u-r="serviceListRef" class="service-status-container r" style="{{'top:' + r}}" u-i="199fff57-2" bind:__l="__l" u-p="{{s}}"/><tag-management-panel wx:if="{{t}}" class="r" u-r="tagPanelRef" u-i="199fff57-3" bind:__l="__l" u-p="{{w}}"/></view></view>
|
||||
<view class="page"><uni-nav-bar wx:if="{{b}}" bindclickLeft="{{a}}" u-i="199fff57-0" bind:__l="__l" u-p="{{b}}"/><view class="content"><view class="tabs" style="{{'top:' + i}}"><view class="{{['tab-item', c && 'active']}}" bindtap="{{d}}"><text>客户接待</text></view><view class="{{['tab-item', e && 'active']}}" bindtap="{{f}}"><text>接待中</text></view><view class="{{['tab-item', g && 'active']}}" bindtap="{{h}}"><text>标签管理</text></view></view><common-begin-reception wx:if="{{j}}" class="reception-form-container" style="{{'top:' + k}}" bindcancel="{{l}}" bindsaveSuccess="{{m}}" bindsaveError="{{n}}" u-i="199fff57-1" bind:__l="__l" u-p="{{o}}"/><service-list-furniture wx:if="{{p}}" u-r="serviceListRef" class="service-status-container r" style="{{'top:' + r}}" u-i="199fff57-2" bind:__l="__l" u-p="{{s}}"/><tag-management-panel wx:if="{{t}}" class="r" u-r="tagPanelRef" u-i="199fff57-3" bind:__l="__l" u-p="{{w}}"/></view></view>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user