提交
This commit is contained in:
1 parent
771f010a39
commit
ee4abd361e
102 files changed
+8021
-4094
No files matched your search
@@ -802,12 +802,7 @@
|
||||
}
|
||||
|
||||
const uploadCategoryImageFile = async (file: File) => {
|
||||
const maxSizeMb = 10
|
||||
if (file.size / 1024 / 1024 > maxSizeMb) {
|
||||
ElMessage.error(`图片大小不能超过 ${maxSizeMb}MB`)
|
||||
categoryImageUploadRef.value?.clearFiles()
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
ElMessage.info('图片正在上传...')
|
||||
|
||||
@@ -1474,7 +1474,7 @@
|
||||
<el-table-column label="供货价" min-width="110" align="center">
|
||||
<template #default="{ row }">
|
||||
<span v-if="!orderPriceVersionDetail?.quotationId">-</span>
|
||||
<span v-else>¥{{ (Number(row.supplierPrice || 0) || 0).toFixed(2) }}</span>
|
||||
<span v-else>¥{{ formatAmount(row.supplierPrice || 0) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供货金额" min-width="110" align="center">
|
||||
@@ -1482,7 +1482,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="商品售价" min-width="110" align="center">
|
||||
<template #default="{ row }"
|
||||
>¥{{ (Number(row.finalPrice ?? row.price) || 0).toFixed(2) }}</template
|
||||
>¥{{ formatAmount(row.finalPrice ?? row.price) }}</template
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品金额" min-width="110" align="center">
|
||||
@@ -1548,6 +1548,7 @@
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { fetchAllPagedRecords } from '@/utils/fetch-paged-list'
|
||||
import { ensureCategoryPathDataLoaded, formatCategoryPathLabel } from '@/utils/category-path-display'
|
||||
import { formatMoneyDisplay } from '@/utils/money-format'
|
||||
|
||||
defineOptions({ name: 'OrderManagement' })
|
||||
|
||||
@@ -2061,8 +2062,8 @@
|
||||
}
|
||||
|
||||
const formatAmount = (amount: number | string) => {
|
||||
const num = typeof amount === 'string' ? parseFloat(amount) : amount
|
||||
return isNaN(num) ? '0.00' : num.toFixed(2)
|
||||
if (amount == null || amount === '') return '0.00'
|
||||
return formatMoneyDisplay(amount)
|
||||
}
|
||||
|
||||
const displayValue = (value: any) => {
|
||||
|
||||
@@ -318,7 +318,7 @@
|
||||
</el-upload>
|
||||
</div>
|
||||
<div class="media-spec-hint">
|
||||
尺寸要求:请上传 1:1 正方形主图(推荐 800×800 至 2000×2000 像素,JPG/PNG/WebP);小程序商品卡片会按固定方图展示,非 1:1 图片将被自动居中裁切;单张不超过 10MB。
|
||||
尺寸要求:请上传 1:1 正方形主图(推荐 800×800 至 2000×2000 像素,JPG/PNG/WebP);小程序商品卡片会按固定方图展示,非 1:1 图片将被自动居中裁切。
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -356,7 +356,7 @@
|
||||
<span class="section-tip">支持拖拽排序,最多上传9张图片/视频</span>
|
||||
</div>
|
||||
<p class="media-spec-hint">
|
||||
尺寸要求:轮播图建议按 4:3(宽:高)上传(推荐宽度约 750px,例如 750×562);小程序端详情页顶部轮播区域按 4:3 展示,非 4:3 图片会以「居中裁切填充」方式展示;图片单张不超过 10MB,视频单文件不超过 100MB。
|
||||
尺寸要求:轮播图建议按 4:3(宽:高)上传(推荐宽度约 750px,例如 750×562);小程序端详情页顶部轮播区域按 4:3 展示,非 4:3 图片会以「居中裁切填充」方式展示。
|
||||
</p>
|
||||
<div class="banner-upload-section">
|
||||
<div v-if="bannerList.length > 0" class="banner-list">
|
||||
@@ -1989,13 +1989,6 @@
|
||||
const status = (uploadFile as any).status
|
||||
if (status && status !== 'ready') return
|
||||
|
||||
const maxSizeMb = 10
|
||||
if (file.size / 1024 / 1024 > maxSizeMb) {
|
||||
ElMessage.error(`图片大小不能超过 ${maxSizeMb}MB`)
|
||||
mainImageUploadRef.value?.clearFiles()
|
||||
return
|
||||
}
|
||||
|
||||
mainImageUploading.value = true
|
||||
revokeMainImageLocalPreview()
|
||||
mainImageLocalPreview.value = URL.createObjectURL(file)
|
||||
@@ -2094,12 +2087,6 @@
|
||||
return
|
||||
}
|
||||
|
||||
const maxSizeMb = isVideo ? 100 : 10
|
||||
if (file.size / 1024 / 1024 > maxSizeMb) {
|
||||
ElMessage.error(`${isVideo ? '视频' : '图片'}大小不能超过 ${maxSizeMb}MB`)
|
||||
return
|
||||
}
|
||||
|
||||
if (bannerList.value.length >= 9) {
|
||||
ElMessage.warning('最多上传9张轮播图')
|
||||
return
|
||||
@@ -2183,12 +2170,6 @@
|
||||
return
|
||||
}
|
||||
|
||||
const maxSizeMb = isVideo ? 100 : 10
|
||||
if (file.size / 1024 / 1024 > maxSizeMb) {
|
||||
ElMessage.error(`${isVideo ? '视频' : '图片'}大小不能超过 ${maxSizeMb}MB`)
|
||||
return
|
||||
}
|
||||
|
||||
if (detailMediaList.value.length >= 30) {
|
||||
ElMessage.warning('最多上传30个详情媒体')
|
||||
return
|
||||
|
||||
@@ -257,6 +257,7 @@ import { withFullscreenLoading, fullscreenLoadingText } from '@/utils/fullscreen
|
||||
import { ArrowLeft, Close, Check } from '@element-plus/icons-vue'
|
||||
import { fetchUserDetail, fetchUpdateUser, fetchActiveRegions } from '@/api/admin'
|
||||
import { resolveUserAvatarUrl } from '@/utils/user-avatar'
|
||||
import { formatMoneyDisplay } from '@/utils/money-format'
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
|
||||
defineOptions({ name: 'UserDetail' })
|
||||
@@ -375,8 +376,8 @@ const getRoleText = (role: string) => {
|
||||
|
||||
// 格式化金额
|
||||
const formatAmount = (amount: number | string) => {
|
||||
const num = typeof amount === 'string' ? parseFloat(amount) : amount
|
||||
return isNaN(num) ? '0.00' : num.toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
||||
if (amount == null || amount === '') return '0.00'
|
||||
return formatMoneyDisplay(amount)
|
||||
}
|
||||
|
||||
// 返回列表
|
||||
|
||||
Reference in new issue
Block a user