fix: 新增代理系列授权-建议售价使用套餐
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m38s

This commit is contained in:
sexygoat
2026-06-12 10:41:37 +08:00
parent d23e896f97
commit e04a283319
98 changed files with 4279 additions and 6170 deletions

View File

@@ -86,7 +86,7 @@
:label="role.role_name"
:value="role.ID"
>
<div style="display: flex; justify-content: space-between; align-items: center">
<div style="display: flex; align-items: center; justify-content: space-between">
<span>{{ role.role_name }}</span>
<ElTag :type="role.role_type === 1 ? 'primary' : 'success'" size="small">
{{ role.role_type === 1 ? '平台角色' : '客户角色' }}
@@ -1010,13 +1010,13 @@
width: 100%;
.role-item {
box-sizing: border-box;
display: block;
width: 100%;
padding: 10px 12px;
border: 1px solid var(--el-border-color-lighter);
border-radius: 4px;
transition: all 0.2s;
box-sizing: border-box;
&:hover {
background: var(--el-fill-color-light);
@@ -1026,8 +1026,8 @@
.role-info {
display: flex;
flex: 1;
justify-content: space-between;
align-items: center;
justify-content: space-between;
}
:deep(.el-checkbox),

View File

@@ -251,8 +251,8 @@
}
:deep(.el-card__header) .card-header {
align-items: stretch;
flex-direction: column;
align-items: stretch;
.el-button {
width: 100%;
@@ -261,13 +261,13 @@
}
.iccid-search {
align-items: stretch;
flex-direction: column;
align-items: stretch;
.iccid-input-wrapper {
flex-basis: auto;
min-width: 0;
width: 100%;
min-width: 0;
.iccid-magnifier {
right: 0;

View File

@@ -29,7 +29,9 @@
<!-- 卡专属字段 -->
<template v-if="cardInfo?.asset_type === 'card'">
<ElDescriptionsItem label="ICCID">{{ cardInfo?.iccid || '-' }}</ElDescriptionsItem>
<ElDescriptionsItem label="IMEI">{{ cardInfo?.gateway_card_imei || '-' }}</ElDescriptionsItem>
<ElDescriptionsItem label="IMEI">{{
cardInfo?.gateway_card_imei || '-'
}}</ElDescriptionsItem>
<ElDescriptionsItem label="运营商账户">{{
cardInfo?.carrier_name || '-'
}}</ElDescriptionsItem>
@@ -182,7 +184,7 @@
<el-icon
class="copy-icon"
@click="handleCopyICCID(scope.row.iccid)"
style="cursor: pointer; color: var(--el-color-primary)"
style=" color: var(--el-color-primary);cursor: pointer"
>
<CopyDocument />
</el-icon>
@@ -844,8 +846,8 @@
@media (width <= 768px) {
.card-header {
align-items: flex-start;
flex-direction: column;
align-items: flex-start;
.card-header-left,
.card-header-right {

View File

@@ -193,7 +193,7 @@
<ElDescriptionsItem label="套餐名称">
{{ currentPackage.package_name || '-' }}
</ElDescriptionsItem>
<ElDescriptionsItem label="套餐成本价格" v-if="isAdminOrPlatform">
<ElDescriptionsItem label="套餐成本价格" v-if="isAdminOrPlatform">
{{ formatAmount(currentPackage.paid_amount || 0) }}
</ElDescriptionsItem>
<ElDescriptionsItem label="套餐零售价">
@@ -285,7 +285,8 @@
hasAuth('asset_info:view_current_package_virtual_usage')
)
const canShowCurrentPackageVirtualUsage = computed(
() => canViewCurrentPackageVirtualUsage.value && props.currentPackage?.enable_virtual_data !== false
() =>
canViewCurrentPackageVirtualUsage.value && props.currentPackage?.enable_virtual_data !== false
)
const shouldShowTrafficCard = computed(() => {
if (!isAdminOrPlatform.value) return true
@@ -322,11 +323,11 @@
<style scoped lang="scss">
.current-package-card {
.card-header {
display: flex;
gap: 12px;
align-items: center;
justify-content: space-between;
.card-header {
display: flex;
gap: 12px;
align-items: center;
justify-content: space-between;
.header-title {
font-size: 16px;
@@ -336,24 +337,24 @@
.flow-progress-card {
padding: 20px;
margin-bottom: 20px;
background: var(--el-fill-color-light);
border-radius: 8px;
margin-bottom: 20px;
.flow-stats-container {
display: flex;
gap: 40px;
min-width: 0;
.flow-stats-container {
display: flex;
gap: 40px;
min-width: 0;
.flow-stat-section {
flex: 1;
min-width: 0;
.flow-stat-label {
font-size: 13px;
color: var(--el-text-color-secondary);
margin-bottom: 8px;
font-size: 13px;
font-weight: 500;
color: var(--el-text-color-secondary);
}
.flow-stat-row {
@@ -364,8 +365,8 @@
.stat-item {
display: flex;
align-items: baseline;
gap: 4px;
align-items: baseline;
.stat-label {
font-size: 12px;
@@ -390,8 +391,8 @@
.flow-stat-item {
display: flex;
align-items: baseline;
gap: 8px;
align-items: baseline;
.flow-stat-label {
font-size: 13px;
@@ -410,16 +411,16 @@
padding: 0 4px;
.progress-label {
margin-bottom: 4px;
font-size: 12px;
color: var(--el-text-color-secondary);
margin-bottom: 4px;
}
}
.progress-wrapper {
display: flex;
align-items: center;
gap: 1px;
align-items: center;
.progress-track {
position: relative;
@@ -429,13 +430,13 @@
.breakpoint-marker {
position: absolute;
top: 50%;
z-index: 1;
width: 8px;
height: 8px;
cursor: pointer;
background-color: var(--el-color-danger);
border-radius: 50%;
transform: translate(-50%, -50%);
z-index: 1;
cursor: pointer;
}
}
@@ -472,8 +473,8 @@
@media (width <= 768px) {
.card-header {
align-items: flex-start;
flex-direction: column;
align-items: flex-start;
.header-actions {
width: 100%;
@@ -490,9 +491,9 @@
}
.progress-wrapper {
align-items: stretch;
flex-direction: column;
gap: 6px;
align-items: stretch;
.progress-percentage {
min-width: 0;

View File

@@ -604,10 +604,10 @@
.operation-logs-card {
.card-header {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 12px;
align-items: center;
justify-content: space-between;
.header-title {
font-size: 16px;
@@ -616,9 +616,9 @@
.filter-section {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
gap: 8px;
align-items: center;
justify-content: flex-end;
min-width: 0;
@@ -651,20 +651,20 @@
.change-item {
display: flex;
align-items: center;
gap: 4px;
align-items: center;
font-size: 12px;
.field-name {
color: var(--el-text-color-secondary);
min-width: 72px;
color: var(--el-text-color-secondary);
}
.field-value {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 4px;
align-items: center;
word-break: break-all;
.new-value {
@@ -691,8 +691,8 @@
@media (width <= 1200px) {
.card-header {
align-items: stretch;
flex-direction: column;
align-items: stretch;
.filter-section {
justify-content: flex-start;
@@ -703,12 +703,12 @@
@media (width <= 768px) {
.card-header {
align-items: stretch;
flex-direction: column;
align-items: stretch;
.filter-section {
align-items: stretch;
flex-direction: column;
align-items: stretch;
:deep(.el-select),
.el-button,
@@ -723,9 +723,9 @@
}
.logs-table-wrapper {
padding: 0 12px;
margin-right: -12px;
margin-left: -12px;
padding: 0 12px;
:deep(.el-pagination) {
justify-content: flex-start !important;

View File

@@ -444,8 +444,8 @@
.package-table-wrapper {
.table-scroll-container {
overflow-x: auto;
width: 100%;
overflow-x: auto;
}
.package-table {
@@ -459,9 +459,9 @@
.package-name-text {
display: block;
overflow: hidden;
font-weight: 500;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 500;
}
.traffic-progress {
@@ -489,8 +489,8 @@
.progress-wrapper {
display: flex;
align-items: center;
gap: 1px;
align-items: center;
.progress-track {
position: relative;
@@ -500,13 +500,13 @@
.breakpoint-marker {
position: absolute;
top: 50%;
z-index: 1;
width: 8px;
height: 8px;
cursor: pointer;
background-color: var(--el-color-danger);
border-radius: 50%;
transform: translate(-50%, -50%);
z-index: 1;
cursor: pointer;
}
}
@@ -523,15 +523,15 @@
}
.pagination {
margin-top: 16px;
justify-content: flex-end;
margin-top: 16px;
}
@media (width <= 768px) {
.card-header {
align-items: stretch;
flex-direction: column;
gap: 12px;
align-items: stretch;
.card-header-right,
.card-header-right .el-button {
@@ -546,15 +546,15 @@
.traffic-progress {
.progress-text {
align-items: flex-start;
flex-direction: column;
gap: 4px;
align-items: flex-start;
}
.progress-wrapper {
align-items: stretch;
flex-direction: column;
gap: 6px;
align-items: stretch;
.progress-percentage {
min-width: 0;

View File

@@ -421,8 +421,8 @@
@media (width <= 1200px) {
.wallet-header {
align-items: flex-start;
flex-direction: column;
align-items: flex-start;
.header-left,
.filter-section {
@@ -437,8 +437,8 @@
@media (width <= 768px) {
.wallet-header {
align-items: stretch;
flex-direction: column;
align-items: stretch;
.header-left,
.filter-section {
@@ -446,8 +446,8 @@
}
.filter-section {
align-items: stretch;
flex-direction: column;
align-items: stretch;
:deep(.el-select),
:deep(.el-date-editor),
@@ -462,9 +462,9 @@
}
.header-left {
align-items: flex-start;
flex-direction: column;
gap: 6px;
align-items: flex-start;
.wallet-divider {
display: none;
@@ -490,9 +490,9 @@
@media (width <= 480px) {
.wallet-table-wrapper {
padding: 0 12px;
margin-right: -12px;
margin-left: -12px;
padding: 0 12px;
}
}
}

View File

@@ -44,17 +44,17 @@
</ElOption>
</ElSelect>
<template v-if="noSeriesId">
<div style="color: var(--el-text-color-warning); font-size: 12px; margin-top: 4px">
<div style=" margin-top: 4px; font-size: 12px;color: var(--el-text-color-warning)">
该设备未关联套餐系列无法购买套餐
</div>
</template>
<template v-else-if="packagesEmptyWithSeriesId">
<div style="color: var(--el-text-color-info); font-size: 12px; margin-top: 4px">
<div style=" margin-top: 4px; font-size: 12px;color: var(--el-text-color-info)">
该系列暂无可用套餐
</div>
</template>
<template v-else-if="selectedPackageIsGift">
<div style="color: var(--el-color-warning); font-size: 12px; margin-top: 4px">
<div style=" margin-top: 4px; font-size: 12px;color: var(--el-color-warning)">
提示: 赠送套餐只能使用线下支付方式且必须上传支付凭证
</div>
</template>
@@ -95,9 +95,7 @@
:limit="1"
>
<el-icon class="payment-voucher-upload__icon"><UploadFilled /></el-icon>
<div class="payment-voucher-upload__text">
将支付凭证拖到此处<em>点击上传</em>
</div>
<div class="payment-voucher-upload__text"> 将支付凭证拖到此处<em>点击上传</em> </div>
<template #tip>
<div class="el-upload__tip">支持 jpgpng 格式文件大小不超过 5MB</div>
</template>
@@ -459,8 +457,8 @@
<style lang="scss" scoped>
.dialog-footer {
display: flex;
justify-content: flex-end;
gap: 12px;
justify-content: flex-end;
}
.payment-voucher-upload {
@@ -487,8 +485,8 @@
color: var(--el-text-color-regular);
em {
color: var(--el-color-primary);
font-style: normal;
color: var(--el-color-primary);
}
}
}

View File

@@ -245,7 +245,7 @@ export function useAssetInfo() {
order_no: pkg.order_no || '',
package_name: pkg.package_name || '',
paid_amount: pkg.paid_amount || 0,
retail_amount : pkg.retail_amount || 0,
retail_amount: pkg.retail_amount || 0,
real_total_mb: pkg.real_total_mb || 0,
real_used_mb: pkg.real_used_mb || 0,
real_remaining_mb: (pkg.real_total_mb || 0) - (pkg.real_used_mb || 0),

View File

@@ -690,8 +690,8 @@
}
.single-card-page {
padding: 20px;
max-width: 100%;
padding: 20px;
overflow-x: hidden;
// 资产查询卡片
@@ -836,8 +836,8 @@
.row {
display: flex;
gap: 24px;
min-width: 0;
width: 100%;
min-width: 0;
&.full-width {
.info-card {
@@ -910,10 +910,10 @@
:deep(.el-card__header) {
padding: 20px 24px 16px;
.card-header {
display: flex;
flex-wrap: wrap;
gap: 8px;
.card-header {
display: flex;
flex-wrap: wrap;
gap: 8px;
align-items: center;
justify-content: space-between;
font-size: 16px;
@@ -946,8 +946,8 @@
height: 26px;
.el-switch__core {
height: 26px;
min-width: 50px;
height: 26px;
.el-switch__inner {
font-size: 13px;

File diff suppressed because it is too large Load Diff

View File

@@ -86,7 +86,7 @@
<!-- 卡列表 -->
<div
class="card-selection-info"
style="display: flex; justify-content: space-between; align-items: center"
style="display: flex; align-items: center; justify-content: space-between"
>
<span>已选择 {{ selectedAvailableCards.length }} 张卡</span>
<ElButton
@@ -1312,6 +1312,7 @@
.enterprise-cards-page {
.enterprise-info-card {
margin-bottom: 16px;
:deep(.el-card__body) {
display: none;
}
@@ -1319,8 +1320,8 @@
.card-header {
display: flex;
align-items: center;
gap: 12px;
align-items: center;
}
.card-selection-info {

View File

@@ -87,7 +87,7 @@
<!-- 设备列表 -->
<div
class="device-selection-info"
style="display: flex; justify-content: space-between; align-items: center"
style="display: flex; align-items: center; justify-content: space-between"
>
<span>已选择 {{ selectedAvailableDevices.length }} 台设备</span>
<ElButton
@@ -1057,12 +1057,13 @@
.enterprise-devices-page {
.card-header {
display: flex;
align-items: center;
gap: 12px;
align-items: center;
}
.enterprise-info-card {
margin-bottom: 16px;
:deep(.el-card__body) {
display: none;
}

View File

@@ -73,7 +73,8 @@
},
{
label: '流程类型',
formatter: (_, data) => data.flow_type_name || (flowType === 'direct' ? '直接换货' : '物流换货')
formatter: (_, data) =>
data.flow_type_name || (flowType === 'direct' ? '直接换货' : '物流换货')
},
{
label: '换货原因',

View File

@@ -514,7 +514,8 @@
prop: 'flow_type',
label: '流程类型',
width: 120,
formatter: (row: any) => row.flow_type_name || (row.flow_type === 'direct' ? '直接换货' : '物流换货')
formatter: (row: any) =>
row.flow_type_name || (row.flow_type === 'direct' ? '直接换货' : '物流换货')
},
{
prop: 'old_asset_type',

File diff suppressed because it is too large Load Diff

View File

@@ -957,8 +957,8 @@
.asset-identifier-link {
color: var(--el-color-primary);
cursor: pointer;
text-decoration: underline;
cursor: pointer;
}
:deep(.el-table__row.table-row-with-context-menu) {

View File

@@ -822,13 +822,13 @@
width: 100%;
.role-item {
box-sizing: border-box;
display: block;
width: 100%;
padding: 10px 12px;
border: 1px solid var(--el-border-color-lighter);
border-radius: 4px;
transition: all 0.2s;
box-sizing: border-box;
&:hover {
background: var(--el-fill-color-light);
@@ -838,8 +838,8 @@
.role-info {
display: flex;
flex: 1;
justify-content: space-between;
align-items: center;
justify-content: space-between;
}
:deep(.el-checkbox),

View File

@@ -222,17 +222,17 @@
.stats-chart {
display: flex;
align-items: flex-end;
gap: 8px;
align-items: flex-end;
height: 120px;
padding-top: 10px;
.chart-bar {
flex: 1;
display: flex;
flex: 1;
flex-direction: column;
align-items: center;
gap: 4px;
align-items: center;
.bar-label {
font-size: 11px;
@@ -240,16 +240,16 @@
}
.bar-value {
width: 100%;
display: flex;
justify-content: center;
width: 100%;
.bar-fill {
width: 80%;
max-width: 24px;
cursor: pointer;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 4px 4px 0 0;
cursor: pointer;
transition: opacity 0.2s;
&:hover {
@@ -292,8 +292,8 @@
}
.stats-chart {
overflow-x: auto;
padding-bottom: 10px;
overflow-x: auto;
}
}
}

View File

@@ -24,7 +24,7 @@
<el-table-column label="头像" prop="avatar" width="150px">
<template #default="scope">
<div style="display: flex; align-items: center">
<img class="avatar" :src="scope.row.avatar" />
<span class="avatar">{{ scope.row.username.slice(0, 1) }}</span>
<span class="user-name">{{ scope.row.username }}</span>
</div>
</template>
@@ -49,12 +49,6 @@
<script setup lang="ts">
import { onMounted, ref, reactive } from 'vue-demi'
import avatar1 from '@/assets/img/avatar/avatar1.webp'
import avatar2 from '@/assets/img/avatar/avatar2.webp'
import avatar3 from '@/assets/img/avatar/avatar3.webp'
import avatar4 from '@/assets/img/avatar/avatar4.webp'
import avatar5 from '@/assets/img/avatar/avatar5.webp'
import avatar6 from '@/assets/img/avatar/avatar6.webp'
const radio2 = ref('本月')
@@ -66,8 +60,7 @@
age: 22,
percentage: 60,
pro: 0,
color: 'rgb(var(--art-primary)) !important',
avatar: avatar1
color: 'rgb(var(--art-primary)) !important'
},
{
username: '何小荷',
@@ -76,8 +69,7 @@
age: 21,
percentage: 20,
pro: 0,
color: 'rgb(var(--art-secondary)) !important',
avatar: avatar2
color: 'rgb(var(--art-secondary)) !important'
},
{
username: '誶誶淰',
@@ -86,8 +78,7 @@
age: 23,
percentage: 60,
pro: 0,
color: 'rgb(var(--art-warning)) !important',
avatar: avatar3
color: 'rgb(var(--art-warning)) !important'
},
{
username: '发呆草',
@@ -96,8 +87,7 @@
age: 28,
percentage: 50,
pro: 0,
color: 'rgb(var(--art-info)) !important',
avatar: avatar4
color: 'rgb(var(--art-info)) !important'
},
{
username: '甜筒',
@@ -106,8 +96,7 @@
age: 26,
percentage: 70,
pro: 0,
color: 'rgb(var(--art-error)) !important',
avatar: avatar5
color: 'rgb(var(--art-error)) !important'
},
{
username: '冷月呆呆',
@@ -116,8 +105,7 @@
age: 25,
percentage: 90,
pro: 0,
color: 'rgb(var(--art-success)) !important',
avatar: avatar6
color: 'rgb(var(--art-success)) !important'
}
])
@@ -164,8 +152,14 @@
}
.avatar {
display: inline-flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
font-weight: 600;
color: #fff;
background: rgb(var(--art-primary));
border-radius: 6px;
}

View File

@@ -47,14 +47,6 @@
<!-- </el-col>-->
<!--</el-row>-->
<!--<el-row :gutter="20">-->
<!-- <el-col :md="24" :lg="8">-->
<!-- <RecentTransaction />-->
<!-- </el-col>-->
<!-- <el-col :md="24" :lg="16" class="no-margin-bottom">-->
<!-- <HotProductsList />-->
<!-- </el-col>-->
<!--</el-row>-->
</div>
</template>
@@ -71,7 +63,6 @@
import ProductSales from './widget/ProductSales.vue'
import SalesGrowth from './widget/SalesGrowth.vue'
import CartConversionRate from './widget/CartConversionRate.vue'
import HotProductsList from './widget/HotProductsList.vue'
defineOptions({ name: 'Ecommerce' })
</script>

View File

@@ -1,231 +0,0 @@
<template>
<div class="card art-custom-card" style="height: 27.8rem">
<div class="card-header">
<p class="title">热销产品</p>
<p class="subtitle">本月销售情况</p>
</div>
<div class="table">
<el-scrollbar style="height: 21.55rem">
<art-table
:data="tableData"
:pagination="false"
style="margin-top: 0 !important"
size="large"
:border="false"
:stripe="false"
:show-header-background="false"
>
<template #default>
<el-table-column label="产品" prop="product" width="220px">
<template #default="scope">
<div style="display: flex; align-items: center">
<img class="product-image" :src="scope.row.image" />
<div class="product-info">
<div class="product-name">{{ scope.row.name }}</div>
<div class="product-category">{{ scope.row.category }}</div>
</div>
</div>
</template>
</el-table-column>
<el-table-column label="价格" prop="price">
<template #default="scope">
<span class="price">¥{{ scope.row.price.toLocaleString() }}</span>
</template>
</el-table-column>
<el-table-column label="库存" prop="stock">
<template #default="scope">
<div class="stock-badge" :class="getStockClass(scope.row.stock)">
{{ getStockStatus(scope.row.stock) }}
</div>
</template>
</el-table-column>
<el-table-column label="销量" prop="sales" />
<el-table-column label="销售趋势" width="240">
<template #default="scope">
<el-progress
:percentage="scope.row.pro"
:color="scope.row.color"
:stroke-width="4"
/>
</template>
</el-table-column>
</template>
</art-table>
</el-scrollbar>
</div>
</div>
</template>
<script setup lang="ts">
import { reactive, onMounted } from 'vue'
// 导入产品图片
import product1 from '@/assets/img/3d/icon1.webp'
import product2 from '@/assets/img/3d/icon2.webp'
import product3 from '@/assets/img/3d/icon3.webp'
import product4 from '@/assets/img/3d/icon4.webp'
import product5 from '@/assets/img/3d/icon5.webp'
import product6 from '@/assets/img/3d/icon6.webp'
const tableData = reactive([
{
name: '智能手表 Pro',
category: '电子设备',
price: 1299,
stock: 156,
sales: 423,
percentage: 75,
pro: 0,
color: 'rgb(var(--art-primary)) !important',
image: product1
},
{
name: '无线蓝牙耳机',
category: '音频设备',
price: 499,
stock: 89,
sales: 652,
percentage: 85,
pro: 0,
color: 'rgb(var(--art-success)) !important',
image: product2
},
{
name: '机械键盘',
category: '电脑配件',
price: 399,
stock: 12,
sales: 238,
percentage: 45,
pro: 0,
color: 'rgb(var(--art-warning)) !important',
image: product3
},
{
name: '超薄笔记本电脑',
category: '电子设备',
price: 5999,
stock: 0,
sales: 126,
percentage: 30,
pro: 0,
color: 'rgb(var(--art-error)) !important',
image: product4
},
{
name: '智能音箱',
category: '智能家居',
price: 799,
stock: 45,
sales: 321,
percentage: 60,
pro: 0,
color: 'rgb(var(--art-info)) !important',
image: product5
},
{
name: '游戏手柄',
category: '游戏配件',
price: 299,
stock: 78,
sales: 489,
percentage: 70,
pro: 0,
color: 'rgb(var(--art-secondary)) !important',
image: product6
}
])
// 根据库存获取状态文本
const getStockStatus = (stock: number) => {
if (stock === 0) return '缺货'
if (stock < 20) return '低库存'
if (stock < 50) return '适中'
return '充足'
}
// 根据库存获取状态类名
const getStockClass = (stock: number) => {
if (stock === 0) return 'out-of-stock'
if (stock < 20) return 'low-stock'
if (stock < 50) return 'medium-stock'
return 'in-stock'
}
onMounted(() => {
addAnimation()
})
const addAnimation = () => {
setTimeout(() => {
for (let i = 0; i < tableData.length; i++) {
let item = tableData[i]
tableData[i].pro = item.percentage
}
}, 100)
}
</script>
<style lang="scss" scoped>
.table {
width: 100%;
.card-header {
padding-left: 25px !important;
}
.product-image {
width: 50px;
height: 50px;
object-fit: cover;
border-radius: 6px;
}
.product-info {
display: flex;
flex-direction: column;
margin-left: 12px;
}
.product-name {
font-weight: 500;
}
.product-category {
font-size: 12px;
color: #64748b;
}
.price {
font-weight: 600;
}
.stock-badge {
display: inline-block;
padding: 4px 8px;
font-size: 12px;
font-weight: 500;
border-radius: 4px;
}
.in-stock {
color: rgb(var(--art-success));
background-color: rgba(var(--art-success-rgb), 0.1);
}
.medium-stock {
color: rgb(var(--art-info));
background-color: rgba(var(--art-info-rgb), 0.1);
}
.low-stock {
color: rgb(var(--art-warning));
background-color: rgba(var(--art-warning-rgb), 0.1);
}
.out-of-stock {
color: rgb(var(--art-error));
background-color: rgba(var(--art-error-rgb), 0.1);
}
}
</style>

View File

@@ -879,8 +879,8 @@
color: var(--el-text-color-regular);
em {
color: var(--el-color-primary);
font-style: normal;
color: var(--el-color-primary);
}
}
}

View File

@@ -62,7 +62,15 @@
<script setup lang="ts">
import { h, onMounted, ref, computed } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { ElButton, ElCard, ElIcon, ElImage, ElMessage, ElTable, ElTableColumn } from 'element-plus'
import {
ElButton,
ElCard,
ElIcon,
ElImage,
ElMessage,
ElTable,
ElTableColumn
} from 'element-plus'
import { ArrowLeft, Loading } from '@element-plus/icons-vue'
import DetailPage from '@/components/common/DetailPage.vue'
import type { DetailSection } from '@/components/common/DetailPage.vue'
@@ -207,8 +215,7 @@
baseFields.push({
label: '实付金额',
prop: 'actual_paid_amount',
formatter: (value) =>
value !== undefined && value !== null ? formatCurrency(value) : '-'
formatter: (value) => (value !== undefined && value !== null ? formatCurrency(value) : '-')
})
}
@@ -254,8 +261,7 @@
},
{
label: '订单渠道',
formatter: (_, data) =>
data.purchase_role ? getPurchaseRoleText(data.purchase_role) : '-'
formatter: (_, data) => (data.purchase_role ? getPurchaseRoleText(data.purchase_role) : '-')
},
{
label: '购买备注',

View File

@@ -152,17 +152,17 @@
</ElOption>
</ElSelect>
<template v-if="noSeriesId">
<div style="color: var(--el-text-color-warning); font-size: 12px; margin-top: 4px">
<div style=" margin-top: 4px; font-size: 12px;color: var(--el-text-color-warning)">
该设备未关联套餐系列无法购买套餐
</div>
</template>
<template v-else-if="packagesEmptyWithSeriesId">
<div style="color: var(--el-text-color-info); font-size: 12px; margin-top: 4px">
<div style=" margin-top: 4px; font-size: 12px;color: var(--el-text-color-info)">
该系列暂无可用套餐
</div>
</template>
<template v-else-if="selectedPackageIsGift">
<div style="color: var(--el-color-warning); font-size: 12px; margin-top: 4px">
<div style=" margin-top: 4px; font-size: 12px;color: var(--el-color-warning)">
提示: 赠送套餐只能使用线下支付方式且必须上传支付凭证
</div>
</template>
@@ -1403,8 +1403,8 @@
color: var(--el-text-color-regular);
em {
color: var(--el-color-primary);
font-style: normal;
color: var(--el-color-primary);
}
}
}

View File

@@ -1542,25 +1542,25 @@
.gift-switch-wrapper {
display: flex;
align-items: center;
gap: 12px;
align-items: center;
}
.gift-hint {
display: flex;
align-items: center;
gap: 6px;
align-items: center;
padding: 6px 10px;
border-radius: 4px;
font-size: 12px;
line-height: 1.4;
color: var(--el-color-warning);
white-space: nowrap;
background-color: var(--el-color-warning-light-9);
color: var(--el-color-warning);
border-radius: 4px;
&--info {
background-color: var(--el-fill-color-light);
color: var(--el-text-color-secondary);
background-color: var(--el-fill-color-light);
}
.gift-hint-icon {

View File

@@ -113,7 +113,7 @@
style="width: 100%"
/>
<span
style="color: var(--el-text-color-secondary); font-size: 12px; margin-left: 8px"
style=" margin-left: 8px; font-size: 12px;color: var(--el-text-color-secondary)"
>单位</span
>
</ElFormItem>
@@ -138,7 +138,7 @@
style="width: 100%"
/>
<span
style="color: var(--el-text-color-secondary); font-size: 12px; margin-left: 8px"
style=" margin-left: 8px; font-size: 12px;color: var(--el-text-color-secondary)"
>单位</span
>
</ElFormItem>
@@ -156,7 +156,7 @@
>
<ElCard shadow="hover">
<div style="display: flex; gap: 12px; align-items: flex-start">
<div style="flex: 1; display: flex; flex-direction: column; gap: 12px">
<div style=" display: flex;flex: 1; flex-direction: column; gap: 12px">
<!-- 第一行比较运算符和阈值 -->
<div style="display: flex; gap: 12px">
<div style="flex: 1">
@@ -269,10 +269,10 @@
@click="removeTier(index)"
style="
flex-shrink: 0;
margin-top: 28px;
width: 32px;
height: 32px;
padding: 0;
margin-top: 28px;
"
/>
</div>
@@ -308,7 +308,7 @@
style="width: 100%"
/>
<span
style="color: var(--el-text-color-secondary); font-size: 12px; margin-left: 8px"
style=" margin-left: 8px; font-size: 12px;color: var(--el-text-color-secondary)"
>单位</span
>
</ElFormItem>
@@ -362,7 +362,7 @@
style="width: 100%"
/>
<span
style="color: var(--el-text-color-secondary); font-size: 12px; margin-left: 8px"
style=" margin-left: 8px; font-size: 12px;color: var(--el-text-color-secondary)"
>单位</span
>
</ElFormItem>

View File

@@ -1147,7 +1147,7 @@
if (suggestedRetailPrice === undefined || suggestedRetailPrice === null) {
return '-'
}
return `¥${(suggestedRetailPrice * 1.5).toFixed(2)}`
return `¥${suggestedRetailPrice.toFixed(2)}`
}
// 监听套餐选择变化

View File

@@ -439,13 +439,13 @@
.header-left {
display: flex;
align-items: center;
gap: 16px;
align-items: center;
}
.grant-name {
font-weight: 600;
font-size: 16px;
font-weight: 600;
color: var(--el-text-color-primary);
}
}
@@ -456,9 +456,9 @@
}
.form-tip {
margin-top: 4px;
font-size: 12px;
color: var(--el-text-color-secondary);
margin-top: 4px;
}
.dialog-footer {

View File

@@ -60,14 +60,14 @@
<template #default>
<el-table-column v-for="col in columns" :key="col.prop || col.type" v-bind="col">
<template v-if="col.slots?.default === 'progress'" #default="scope">
<div style="display: flex; align-items: center; gap: 8px">
<div style="display: flex; gap: 8px; align-items: center">
<el-progress
:percentage="getProgressPercentage(scope.row)"
stroke-width="6"
:show-text="false"
style="flex: 1"
/>
<span style="font-size: 12px; width: 50px"
<span style=" width: 50px;font-size: 12px"
>{{ getProgressPercentage(scope.row) }}%</span
>
</div>
@@ -103,7 +103,7 @@
label="任务类型"
prop="task_type"
label-width="80"
style="margin-bottom: 0; width: 300px"
style=" width: 300px;margin-bottom: 0"
>
<el-select
v-model="batchForm.task_type"

View File

@@ -585,11 +585,15 @@
trigger: 'blur'
}
],
wx_serial_no: [{ validator: requiredValidator(isWechatProvider, '证书序列号'), trigger: 'blur' }],
wx_serial_no: [
{ validator: requiredValidator(isWechatProvider, '证书序列号'), trigger: 'blur' }
],
wx_cert_content: [
{ validator: requiredValidator(isWechatProvider, '支付证书内容'), trigger: 'blur' }
],
wx_key_content: [{ validator: requiredValidator(isWechatProvider, '支付密钥内容'), trigger: 'blur' }],
wx_key_content: [
{ validator: requiredValidator(isWechatProvider, '支付密钥内容'), trigger: 'blur' }
],
oa_oauth_redirect_url: [{ validator: urlValidator, trigger: 'blur' }],
wx_notify_url: [{ validator: urlValidator, trigger: 'blur' }],
ali_notify_url: [{ validator: urlValidator, trigger: 'blur' }],
@@ -704,7 +708,9 @@
})
}
return h(ElTag, { type: row.is_active ? 'success' : 'info' }, () => getStatusText(row.is_active))
return h(ElTag, { type: row.is_active ? 'success' : 'info' }, () =>
getStatusText(row.is_active)
)
}
},
{

View File

@@ -1108,8 +1108,8 @@
.role-info {
display: flex;
justify-content: space-between;
align-items: center;
justify-content: space-between;
.role-name {
font-size: 14px;

View File

@@ -1,771 +0,0 @@
<template>
<div class="chat" :style="{ height: containerMinHeight }">
<ElRow>
<ElCol :span="12">
<div class="grid-content ep-bg-purple" />
</ElCol>
<ElCol :span="12">
<div class="grid-content ep-bg-purple-light" />
</ElCol>
</ElRow>
<div class="person-list">
<div class="person-item-header">
<div class="user-info">
<ElAvatar :size="50" :src="selectedPerson?.avatar" />
<div class="user-details">
<div class="name">{{ selectedPerson?.name }}</div>
<div class="email">{{ selectedPerson?.email }}</div>
</div>
</div>
<div class="search-box">
<ElInput v-model="searchQuery" placeholder="搜索联系人" prefix-icon="Search" clearable />
</div>
<ElDropdown trigger="click" placement="bottom-start">
<span class="sort-btn">
排序方式
<ElIcon class="el-icon--right">
<arrow-down />
</ElIcon>
</span>
<template #dropdown>
<ElDropdownMenu>
<ElDropdownItem>按时间排序</ElDropdownItem>
<ElDropdownItem>按名称排序</ElDropdownItem>
<ElDropdownItem>全部标为已读</ElDropdownItem>
</ElDropdownMenu>
</template>
</ElDropdown>
</div>
<ElScrollbar>
<div
v-for="item in personList"
:key="item.id"
class="person-item"
:class="{ active: selectedPerson?.id === item.id }"
@click="selectPerson(item)"
>
<div class="avatar-wrapper">
<ElAvatar :size="40" :src="item.avatar">
{{ item.name.charAt(0) }}
</ElAvatar>
<div class="status-dot" :class="{ online: item.online }"></div>
</div>
<div class="person-info">
<div class="info-top">
<span class="person-name">{{ item.name }}</span>
<span class="last-time">{{ item.lastTime }}</span>
</div>
<div class="info-bottom">
<span class="email">{{ item.email }}</span>
</div>
</div>
</div>
</ElScrollbar>
</div>
<div class="chat-modal">
<div class="header">
<div class="header-left">
<span class="name">Art Bot</span>
<div class="status">
<div class="dot" :class="{ online: isOnline, offline: !isOnline }"></div>
<span class="status-text">{{ isOnline ? '在线' : '离线' }}</span>
</div>
</div>
<div class="header-right">
<div class="btn">
<i class="iconfont-sys">&#xe776;</i>
</div>
<div class="btn">
<i class="iconfont-sys">&#xe778;</i>
</div>
<div class="btn">
<i class="iconfont-sys">&#xe6df;</i>
</div>
</div>
</div>
<div class="chat-container">
<!-- 聊天消息区域 -->
<div class="chat-messages" ref="messageContainer">
<template v-for="(message, index) in messages" :key="index">
<div :class="['message-item', message.isMe ? 'message-right' : 'message-left']">
<ElAvatar :size="32" :src="message.avatar" class="message-avatar" />
<div class="message-content">
<div class="message-info">
<span class="sender-name">{{ message.sender }}</span>
<span class="message-time">{{ message.time }}</span>
</div>
<div class="message-text">{{ message.content }}</div>
</div>
</div>
</template>
</div>
<!-- 聊天输入区域 -->
<div class="chat-input">
<ElInput
v-model="messageText"
type="textarea"
:rows="3"
placeholder="输入消息"
resize="none"
@keyup.enter.prevent="sendMessage"
>
<template #append>
<div class="input-actions">
<ElButton :icon="Paperclip" circle plain />
<ElButton :icon="Picture" circle plain />
<ElButton type="primary" @click="sendMessage" v-ripple>发送</ElButton>
</div>
</template>
</ElInput>
<div class="chat-input-actions">
<div class="left">
<i class="iconfont-sys">&#xe634;</i>
<i class="iconfont-sys">&#xe809;</i>
</div>
<ElButton type="primary" @click="sendMessage" v-ripple>发送</ElButton>
</div>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { Picture, Paperclip } from '@element-plus/icons-vue'
import { mittBus } from '@/utils/sys'
import meAvatar from '@/assets/img/avatar/avatar5.webp'
import aiAvatar from '@/assets/img/avatar/avatar10.webp'
import avatar2 from '@/assets/img/avatar/avatar2.webp'
import avatar3 from '@/assets/img/avatar/avatar3.webp'
import avatar4 from '@/assets/img/avatar/avatar4.webp'
import avatar5 from '@/assets/img/avatar/avatar5.webp'
import avatar6 from '@/assets/img/avatar/avatar6.webp'
import avatar7 from '@/assets/img/avatar/avatar7.webp'
import avatar8 from '@/assets/img/avatar/avatar8.webp'
import avatar9 from '@/assets/img/avatar/avatar9.webp'
import avatar10 from '@/assets/img/avatar/avatar10.webp'
import { useCommon } from '@/composables/useCommon'
const { containerMinHeight } = useCommon()
const searchQuery = ref('')
// 抽屉显示状态
const isDrawerVisible = ref(false)
// 是否在线
const isOnline = ref(true)
interface Person {
id: number
name: string
email: string
avatar: string
online?: boolean
lastTime: string
unread?: number
}
const selectedPerson = ref<Person | null>(null)
const personList = ref<Person[]>([
{
id: 1,
name: '梅洛迪·梅西',
email: 'melody@altbox.com',
avatar: meAvatar,
online: true,
lastTime: '20小时前',
unread: 0
},
{
id: 2,
name: '马克·史密斯',
email: 'max@kt.com',
avatar: avatar2,
online: true,
lastTime: '2周前',
unread: 6
},
{
id: 3,
name: '肖恩·宾',
email: 'sean@dellito.com',
avatar: avatar3,
online: false,
lastTime: '5小时前',
unread: 5
},
{
id: 4,
name: '爱丽丝·约翰逊',
email: 'alice@domain.com',
avatar: avatar4,
online: true,
lastTime: '1小时前',
unread: 2
},
{
id: 5,
name: '鲍勃·布朗',
email: 'bob@domain.com',
avatar: avatar5,
online: false,
lastTime: '3天前',
unread: 1
},
{
id: 6,
name: '查理·戴维斯',
email: 'charlie@domain.com',
avatar: avatar6,
online: true,
lastTime: '10分钟前',
unread: 0
},
{
id: 7,
name: '戴安娜·普林斯',
email: 'diana@domain.com',
avatar: avatar7,
online: true,
lastTime: '15分钟前',
unread: 3
},
{
id: 8,
name: '伊桑·亨特',
email: 'ethan@domain.com',
avatar: avatar8,
online: true,
lastTime: '5分钟前',
unread: 0
},
{
id: 9,
name: '杰西卡·琼斯',
email: 'jessica@domain.com',
avatar: avatar9,
online: false,
lastTime: '1天前',
unread: 4
},
{
id: 10,
name: '彼得·帕克',
email: 'peter@domain.com',
avatar: avatar10,
online: true,
lastTime: '2小时前',
unread: 1
},
{
id: 11,
name: '克拉克·肯特',
email: 'clark@domain.com',
avatar: avatar3,
online: true,
lastTime: '30分钟前',
unread: 2
},
{
id: 12,
name: '布鲁斯·韦恩',
email: 'bruce@domain.com',
avatar: avatar5,
online: false,
lastTime: '3天前',
unread: 0
},
{
id: 13,
name: '韦德·威尔逊',
email: 'wade@domain.com',
avatar: avatar6,
online: true,
lastTime: '10分钟前',
unread: 5
}
])
const selectPerson = (person: Person) => {
selectedPerson.value = person
}
// 消息相关数据
const messageText = ref('')
const messages = ref([
{
id: 1,
sender: 'Art Bot',
content: '你好我是你的AI助手有什么我可以帮你的吗',
time: '10:00',
isMe: false,
avatar: aiAvatar
},
{
id: 2,
sender: 'Ricky',
content: '我想了解一下系统的使用方法。',
time: '10:01',
isMe: true,
avatar: meAvatar
},
{
id: 3,
sender: 'Art Bot',
content: '好的,我来为您介绍系统的主要功能。首先,您可以通过左侧菜单访问不同的功能模块...',
time: '10:02',
isMe: false,
avatar: aiAvatar
},
{
id: 4,
sender: 'Ricky',
content: '听起来很不错,能具体讲讲数据分析部分吗?',
time: '10:05',
isMe: true,
avatar: meAvatar
},
{
id: 5,
sender: 'Art Bot',
content: '当然可以。数据分析模块可以帮助您实时监控关键指标,并生成详细的报表...',
time: '10:06',
isMe: false,
avatar: aiAvatar
},
{
id: 6,
sender: 'Ricky',
content: '太好了,那我如何开始使用呢?',
time: '10:08',
isMe: true,
avatar: meAvatar
},
{
id: 7,
sender: 'Art Bot',
content: '您可以先创建一个项目,然后在项目中添加相关的数据源,系统会自动进行分析。',
time: '10:09',
isMe: false,
avatar: aiAvatar
},
{
id: 8,
sender: 'Ricky',
content: '明白了,谢谢你的帮助!',
time: '10:10',
isMe: true,
avatar: meAvatar
},
{
id: 9,
sender: 'Art Bot',
content: '不客气,有任何问题随时联系我。',
time: '10:11',
isMe: false,
avatar: aiAvatar
}
])
const messageId = ref(10) // 用于生成唯一的消息ID
const userAvatar = ref(meAvatar) // 使用导入的头像
// 发送消息
const sendMessage = () => {
const text = messageText.value.trim()
if (!text) return
messages.value.push({
id: messageId.value++,
sender: 'Ricky',
content: text,
time: new Date().toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }),
isMe: true,
avatar: userAvatar.value
})
messageText.value = ''
scrollToBottom()
}
// 滚动到底部
const messageContainer = ref<HTMLElement | null>(null)
const scrollToBottom = () => {
setTimeout(() => {
if (messageContainer.value) {
messageContainer.value.scrollTop = messageContainer.value.scrollHeight
}
}, 100)
}
const openChat = () => {
isDrawerVisible.value = true
}
onMounted(() => {
scrollToBottom()
mittBus.on('openChat', openChat)
selectedPerson.value = personList.value[0]
})
</script>
<style lang="scss">
.chat-modal {
.el-overlay {
background-color: rgb(0 0 0 / 20%) !important;
}
}
</style>
<style lang="scss" scoped>
.chat {
display: flex;
overflow: hidden;
background-color: var(--art-main-bg-color);
border: 1px solid var(--art-border-color);
border-radius: 10px;
.person-list {
box-sizing: border-box;
width: 360px;
height: 100%;
padding: 20px;
border-right: 1px solid var(--art-border-color);
.person-item-header {
padding-bottom: 20px;
.user-info {
display: flex;
gap: 12px;
align-items: center;
.user-details {
.name {
font-size: 16px;
font-weight: 500;
color: var(--art-gray-900);
}
.email {
margin-top: 4px;
font-size: 13px;
color: var(--art-gray-500);
}
}
}
.search-box {
margin-top: 12px;
}
.sort-btn {
margin-top: 20px;
cursor: pointer;
}
}
.person-item {
display: flex;
align-items: center;
padding: 12px;
cursor: pointer;
border-radius: 8px;
transition: all 0.3s ease;
&:hover,
&.active {
background-color: var(--el-fill-color-light);
}
.avatar-wrapper {
position: relative;
margin-right: 12px;
.status-dot {
position: absolute;
right: 1px;
bottom: 1px;
width: 9px;
height: 9px;
background-color: var(--el-color-error);
border-radius: 50%;
&.online {
background-color: var(--el-color-success);
}
}
}
.person-info {
flex: 1;
min-width: 0;
.info-top {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 4px;
.person-name {
font-size: 14px;
font-weight: 500;
color: var(--el-text-color-primary);
}
.last-time {
font-size: 12px;
color: var(--el-text-color-secondary);
}
}
.info-bottom {
display: flex;
align-items: center;
justify-content: space-between;
.email {
overflow: hidden;
font-size: 12px;
color: var(--el-text-color-secondary);
text-overflow: ellipsis;
white-space: nowrap;
}
.unread-badge {
:deep(.el-badge__content) {
border: none;
}
}
}
}
}
}
.chat-modal {
box-sizing: border-box;
flex: 1;
height: 100%;
}
.header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 16px 0;
margin-bottom: 20px;
.header-left {
.name {
font-size: 16px;
font-weight: 500;
}
.status {
display: flex;
gap: 4px;
align-items: center;
margin-top: 6px;
.dot {
width: 8px;
height: 8px;
border-radius: 50%;
&.online {
background-color: var(--el-color-success);
}
&.offline {
background-color: var(--el-color-danger);
}
}
.status-text {
font-size: 12px;
color: var(--art-gray-600);
}
}
}
.header-right {
display: flex;
gap: 8px;
align-items: center;
.btn {
width: 42px;
height: 42px;
line-height: 42px;
text-align: center;
cursor: pointer;
border-radius: 50%;
transition: background-color 0.2s ease;
&:hover {
background-color: var(--art-gray-200);
}
i {
font-size: 20px;
color: var(--art-text-gray-700);
}
}
}
}
.chat-container {
display: flex;
flex-direction: column;
height: calc(100% - 85px);
.chat-messages {
flex: 1;
padding: 30px 16px;
overflow-y: auto;
border-top: 1px solid var(--el-border-color-lighter);
&::-webkit-scrollbar {
width: 5px !important;
}
.message-item {
display: flex;
flex-direction: row;
gap: 8px;
align-items: flex-start;
width: 100%;
margin-bottom: 30px;
.message-text {
font-size: 14px;
color: var(--art-gray-900);
border-radius: 6px;
}
&.message-left {
justify-content: flex-start;
.message-content {
align-items: flex-start;
.message-info {
flex-direction: row;
}
.message-text {
background-color: var(--art-gray-200);
}
}
}
&.message-right {
flex-direction: row-reverse;
.message-content {
align-items: flex-end;
.message-info {
flex-direction: row-reverse;
}
.message-text {
background-color: #e9f3ff;
background-color: rgb(var(--art-bg-secondary));
}
}
}
.message-avatar {
flex-shrink: 0;
}
.message-content {
display: flex;
flex-direction: column;
max-width: 70%;
.message-info {
display: flex;
gap: 8px;
margin-bottom: 4px;
font-size: 12px;
.message-time {
color: var(--el-text-color-secondary);
}
.sender-name {
font-weight: 500;
}
}
.message-text {
padding: 10px 14px;
line-height: 1.4;
}
}
}
}
.chat-input {
padding: 16px; // 增加填充以提升输入区域的布局
.input-actions {
display: flex;
gap: 8px;
padding: 8px 0;
}
.chat-input-actions {
display: flex;
align-items: center; // 修正为单数
justify-content: space-between;
margin-top: 12px;
.left {
display: flex;
align-items: center;
i {
margin-right: 20px;
font-size: 16px;
color: var(--art-gray-500);
cursor: pointer;
}
}
// 确保发送按钮与输入框对齐
el-button {
min-width: 80px;
}
}
}
}
}
@media only screen and (max-width: $device-ipad-pro) {
.chat {
flex-direction: column;
.person-list {
width: 100%;
height: 170px;
border-right: none;
.person-item-header {
display: none;
}
}
.chat-modal {
height: calc(70% - 30px);
}
}
}
</style>