Files
smartDriveEEUniApp/pages/workbench/components/sales_scenario_new.vue
2026-04-18 17:15:26 +08:00

192 lines
4.8 KiB
Vue
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="scenario-wrapper" :style="{ top: contentTop, bottom: contentBottom }">
<scroll-view class="content-scroll" scroll-y="true">
<view class="category-section two-column">
<view class="category-header">
<text class="category-icon">🏷</text>
<text class="category-title">接待</text>
</view>
<view class="function-grid">
<view class="function-item" @click="openReceptionTab('reception')">
<view class="function-icon">🛎</view>
<text class="function-name">开始接待</text>
<text class="function-desc"></text>
</view>
<view class="function-item" @click="goReceptionInProgressPage('跳转服务中失败')">
<view class="function-icon">📌</view>
<text class="function-name">服务中</text>
<text class="function-desc"></text>
</view>
<view class="function-item" @click="openReceptionTab('tag')">
<view class="function-icon">🗂</view>
<text class="function-name">标签管理</text>
<text class="function-desc"></text>
</view>
</view>
</view>
<view class="category-section two-column">
<view class="category-header">
<text class="category-icon">👤</text>
<text class="category-title">客户</text>
</view>
<view class="function-grid">
<view class="function-item" @click="openCustomerTab('service')">
<view class="function-icon">📝</view>
<text class="function-name">服务记录</text>
<text class="function-desc"></text>
</view>
<view class="function-item" @click="openCustomerTab('customer')">
<view class="function-icon">👥</view>
<text class="function-name">客户</text>
<text class="function-desc"></text>
</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
export default {
name: 'SalesScenarioNew',
props: {
contentTop: {
type: String,
default: '0rpx',
},
contentBottom: {
type: String,
default: '0rpx',
},
},
methods: {
/** 与「服务记录」一致:直跳分包页 + query避免主包宿主页在微信上的 ref/占位问题 */
openReceptionTab(tab) {
const allowed = ['status', 'reception', 'tag'];
if (!allowed.includes(tab)) {
return;
}
const url = `/pages-subpackage/furniture_reception/furniture_reception_entry?tab=${encodeURIComponent(tab)}`;
uni.navigateTo({
url,
fail: () => {
uni.showToast({ title: '跳转接待页失败', icon: 'none' });
},
});
},
/** 独立「接待中 / 服务中」列表页:`/pages-subpackage/furniture_reception/reception_in_progress` */
goReceptionInProgressPage(failTitle) {
uni.navigateTo({
url: '/pages-subpackage/furniture_reception/reception_in_progress',
fail: () => {
uni.showToast({ title: failTitle || '页面打开失败', icon: 'none' });
},
});
},
openReceptionInProgress() {
this.goReceptionInProgressPage('跳转接待中失败');
},
openCustomerTab(tab) {
const url = `/pages-subpackage/furniture_customer/furniture_customer?tab=${tab}`;
uni.navigateTo({ url });
},
},
};
</script>
<style scoped>
.scenario-wrapper {
position: absolute;
left: 0;
right: 0;
}
.content-scroll {
height: 100%;
}
.category-section {
margin: 20rpx 30rpx;
background: #ffffff;
border-radius: 16rpx;
overflow: hidden;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
}
.category-section:first-child {
margin-top: 0;
}
.category-section:last-child {
margin-bottom: 0;
}
.category-header {
display: flex;
align-items: center;
padding: 30rpx;
background: #ffffff;
border-bottom: 1rpx solid #f0f0f0;
}
.category-icon {
font-size: 32rpx;
margin-right: 20rpx;
}
.category-title {
font-size: 32rpx;
font-weight: 500;
color: #333;
}
.function-grid {
display: flex;
flex-wrap: wrap;
padding: 10rpx;
}
/* 与 ai_analysis 页面保持一致的两列卡片风格 */
.two-column .function-item {
flex: 1;
background: #ffffff;
border-radius: 12rpx;
padding: 24rpx 16rpx;
margin: 0 5rpx;
text-align: center;
box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.04);
transition: all 0.3s ease;
border: 1rpx solid #f0f0f0;
}
.function-item {
min-width: 42%;
}
.function-item:active {
transform: scale(0.95);
box-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.1);
}
.function-icon {
font-size: 48rpx;
margin-bottom: 12rpx;
}
.function-name {
display: block;
font-size: 28rpx;
font-weight: 500;
color: #333;
margin-bottom: 8rpx;
}
.function-desc {
display: block;
font-size: 24rpx;
color: #666;
line-height: 1.4;
}
</style>