更新主持人老师。

This commit is contained in:
zhonghua.li
2026-05-28 16:15:59 +08:00
parent 77d46ec359
commit 7752c8b875
3 changed files with 55 additions and 34 deletions

View File

@@ -302,8 +302,12 @@ export default {
{ label: '张宝凤老师', value: '张宝凤老师' },
{ label: '付韾蕊老师', value: '付韾蕊老师' },
{ label: '陈晓琴老师', value: '陈晓琴老师' },
{ label: '李军老师', value: '李军老师' },
{ label: '刘伟翔老师', value: '刘伟翔老师' }
{ label: '李军A老师', value: '李军A老师' },
{ label: '刘伟翔老师', value: '刘伟翔老师' },
{ label: '李家让老师', value: '李家让老师' },
{ label: '张伟老师', value: '张伟老师' },
{ label: '林显竹老师', value: '林显竹老师' },
{ label: '袁慧榕老师', value: '袁慧榕老师' }
],
assessmentTeacherOptions: [
{ label: '张健老师', value: '张健老师' },

View File

@@ -2,9 +2,6 @@
<div class="app-container">
<el-card class="filter-container" shadow="never">
<el-form :model="queryParams" :inline="true" label-width="90px">
<el-form-item label="旧商品ID">
<el-input v-model="queryParams.oldId" clearable placeholder="旧商品ID" style="width: 140px" />
</el-form-item>
<el-form-item label="用户ID">
<el-input v-model="queryParams.userId" clearable placeholder="所属用户ID" style="width: 140px" />
</el-form-item>
@@ -70,28 +67,30 @@
<el-card class="table-container" shadow="never">
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table-column label="商品ID" prop="id" min-width="110" show-overflow-tooltip />
<el-table-column label="旧商品ID" prop="oldId" min-width="110" show-overflow-tooltip />
<el-table-column label="用户ID" prop="userId" min-width="100" show-overflow-tooltip />
<el-table-column label="商品标题" prop="title" min-width="160" show-overflow-tooltip />
<el-table-column label="图片" prop="image" min-width="120" show-overflow-tooltip />
<el-table-column label="单价" prop="price" min-width="90" align="right">
<template slot-scope="scope">
{{ formatAmount(scope.row.price) }}
</template>
</el-table-column>
<el-table-column label="卖家ID" prop="sellerId" min-width="100" show-overflow-tooltip />
<el-table-column label="总金额" prop="totalMoney" min-width="90" align="right">
<template slot-scope="scope">
{{ formatAmount(scope.row.totalMoney) }}
</template>
</el-table-column>
<el-table-column label="数量描述" prop="quantity" min-width="100" show-overflow-tooltip />
<el-table-column label="卖家ID" prop="sellerId" min-width="100" show-overflow-tooltip />
<el-table-column label="第二天" min-width="130" align="right">
<template slot-scope="scope">
<div class="day-amount-cell">{{ formatDayAmountList(getDay2Amounts(scope.row.totalMoney)) }}</div>
</template>
</el-table-column>
<el-table-column label="第三天" min-width="130" align="right">
<template slot-scope="scope">
<div class="day-amount-cell">{{ formatDayAmountList(getDay3Amounts(scope.row.totalMoney)) }}</div>
</template>
</el-table-column>
<el-table-column label="是否展示" width="90" align="center">
<template slot-scope="scope">
{{ formatYesNo(scope.row.isShow) }}
</template>
</el-table-column>
<el-table-column label="状态" prop="status" width="80" align="center" />
<el-table-column label="图片" prop="image" min-width="120" show-overflow-tooltip />
<el-table-column label="创建时间" prop="createdAt" min-width="160">
<template slot-scope="scope">
{{ formatDateTime(scope.row.createdAt) }}
@@ -123,18 +122,9 @@
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="760px" @close="resetForm">
<el-form ref="dataForm" :model="form" :rules="formRules" label-width="110px">
<el-row :gutter="16">
<el-col :span="12">
<el-form-item label="商品ID" prop="id">
<el-input v-model="form.id" :disabled="isEdit" placeholder="外部商品主键,新增时必填" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="旧商品ID" prop="oldId">
<el-input v-model="form.oldId" placeholder="旧商品ID" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="商品ID" prop="id">
<el-input v-model="form.id" :disabled="isEdit" placeholder="外部商品主键,新增时必填" />
</el-form-item>
<el-row :gutter="16">
<el-col :span="12">
<el-form-item label="所属用户ID" prop="userId">
@@ -226,7 +216,6 @@ import { getBusinessHeaders } from '@/utils/business-headers'
function emptyForm() {
return {
id: '',
oldId: '',
userId: '',
title: '',
image: '',
@@ -284,7 +273,6 @@ export default {
queryParams: {
current: 1,
size: 10,
oldId: '',
userId: '',
title: '',
sellerId: '',
@@ -357,7 +345,6 @@ export default {
const params = {
current: this.queryParams.current,
size: this.queryParams.size,
oldId: parseOptionalLong(this.queryParams.oldId),
userId: parseOptionalLong(this.queryParams.userId),
title: this.queryParams.title || undefined,
sellerId: parseOptionalLong(this.queryParams.sellerId),
@@ -389,7 +376,6 @@ export default {
this.queryParams = {
current: 1,
size: 10,
oldId: '',
userId: '',
title: '',
sellerId: '',
@@ -412,7 +398,6 @@ export default {
const pickLong = (k) => (row[k] !== undefined && row[k] !== null ? String(row[k]) : '')
return {
id: pickLong('id'),
oldId: pickLong('oldId'),
userId: pickLong('userId'),
title: row.title || '',
image: row.image || '',
@@ -487,7 +472,6 @@ export default {
buildPayload() {
const payload = {
id: parseOptionalLong(this.form.id),
oldId: parseOptionalLong(this.form.oldId),
userId: parseOptionalLong(this.form.userId),
title: this.form.title || undefined,
image: this.form.image || undefined,
@@ -514,6 +498,26 @@ export default {
const n = Number(val)
return Number.isNaN(n) ? String(val) : n.toFixed(2)
},
computeDayAmounts(baseAmount) {
const base = Number(baseAmount)
if (!Number.isFinite(base)) return []
const value = base * 1.02
if (value > 40000) {
const half = value / 2
return [half, half]
}
return [value]
},
getDay2Amounts(totalMoney) {
return this.computeDayAmounts(totalMoney)
},
getDay3Amounts(totalMoney) {
return this.getDay2Amounts(totalMoney).flatMap((amount) => this.computeDayAmounts(amount))
},
formatDayAmountList(amounts) {
if (!amounts || !amounts.length) return '-'
return amounts.map((amount) => this.formatAmount(amount)).join('\n')
},
formatYesNo(value) {
if (value === 1) return '是'
if (value === 0) return '否'
@@ -546,6 +550,11 @@ export default {
}
.table-container {
.day-amount-cell {
white-space: pre-line;
line-height: 1.5;
}
.el-pagination {
margin-top: 20px;
text-align: right;

View File

@@ -695,9 +695,17 @@ export default {
this.syncForm.buyTimeRange = normalized
}
},
getTodayBuyTimeRange() {
const date = new Date()
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
const dateStr = `${year}-${month}-${day}`
return [`${dateStr} 00:00:00`, `${dateStr} 23:59:59`]
},
openSyncDialog() {
this.syncForm = {
buyTimeRange: null,
buyTimeRange: this.getTodayBuyTimeRange(),
isResell: undefined
}
this.syncDialogVisible = true