更新主持人老师。
This commit is contained in:
@@ -302,8 +302,12 @@ export default {
|
|||||||
{ label: '张宝凤老师', value: '张宝凤老师' },
|
{ label: '张宝凤老师', value: '张宝凤老师' },
|
||||||
{ label: '付韾蕊老师', value: '付韾蕊老师' },
|
{ label: '付韾蕊老师', value: '付韾蕊老师' },
|
||||||
{ label: '陈晓琴老师', value: '陈晓琴老师' },
|
{ label: '陈晓琴老师', value: '陈晓琴老师' },
|
||||||
{ label: '李军老师', value: '李军老师' },
|
{ label: '李军A老师', value: '李军A老师' },
|
||||||
{ label: '刘伟翔老师', value: '刘伟翔老师' }
|
{ label: '刘伟翔老师', value: '刘伟翔老师' },
|
||||||
|
{ label: '李家让老师', value: '李家让老师' },
|
||||||
|
{ label: '张伟老师', value: '张伟老师' },
|
||||||
|
{ label: '林显竹老师', value: '林显竹老师' },
|
||||||
|
{ label: '袁慧榕老师', value: '袁慧榕老师' }
|
||||||
],
|
],
|
||||||
assessmentTeacherOptions: [
|
assessmentTeacherOptions: [
|
||||||
{ label: '张健老师', value: '张健老师' },
|
{ label: '张健老师', value: '张健老师' },
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card class="filter-container" shadow="never">
|
<el-card class="filter-container" shadow="never">
|
||||||
<el-form :model="queryParams" :inline="true" label-width="90px">
|
<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-form-item label="用户ID">
|
||||||
<el-input v-model="queryParams.userId" clearable placeholder="所属用户ID" style="width: 140px" />
|
<el-input v-model="queryParams.userId" clearable placeholder="所属用户ID" style="width: 140px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -70,28 +67,30 @@
|
|||||||
<el-card class="table-container" shadow="never">
|
<el-card class="table-container" shadow="never">
|
||||||
<el-table v-loading="loading" :data="list" style="width: 100%">
|
<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="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="title" min-width="160" show-overflow-tooltip />
|
||||||
<el-table-column label="图片" prop="image" min-width="120" show-overflow-tooltip />
|
<el-table-column label="卖家ID" prop="sellerId" min-width="100" 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="总金额" prop="totalMoney" min-width="90" align="right">
|
<el-table-column label="总金额" prop="totalMoney" min-width="90" align="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ formatAmount(scope.row.totalMoney) }}
|
{{ formatAmount(scope.row.totalMoney) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量描述" prop="quantity" min-width="100" show-overflow-tooltip />
|
<el-table-column label="第二天" min-width="130" align="right">
|
||||||
<el-table-column label="卖家ID" prop="sellerId" min-width="100" show-overflow-tooltip />
|
<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">
|
<el-table-column label="是否展示" width="90" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ formatYesNo(scope.row.isShow) }}
|
{{ formatYesNo(scope.row.isShow) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="状态" prop="status" width="80" align="center" />
|
<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">
|
<el-table-column label="创建时间" prop="createdAt" min-width="160">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ formatDateTime(scope.row.createdAt) }}
|
{{ formatDateTime(scope.row.createdAt) }}
|
||||||
@@ -123,18 +122,9 @@
|
|||||||
|
|
||||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="760px" @close="resetForm">
|
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="760px" @close="resetForm">
|
||||||
<el-form ref="dataForm" :model="form" :rules="formRules" label-width="110px">
|
<el-form ref="dataForm" :model="form" :rules="formRules" label-width="110px">
|
||||||
<el-row :gutter="16">
|
<el-form-item label="商品ID" prop="id">
|
||||||
<el-col :span="12">
|
<el-input v-model="form.id" :disabled="isEdit" placeholder="外部商品主键,新增时必填" />
|
||||||
<el-form-item label="商品ID" prop="id">
|
</el-form-item>
|
||||||
<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-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="所属用户ID" prop="userId">
|
<el-form-item label="所属用户ID" prop="userId">
|
||||||
@@ -226,7 +216,6 @@ import { getBusinessHeaders } from '@/utils/business-headers'
|
|||||||
function emptyForm() {
|
function emptyForm() {
|
||||||
return {
|
return {
|
||||||
id: '',
|
id: '',
|
||||||
oldId: '',
|
|
||||||
userId: '',
|
userId: '',
|
||||||
title: '',
|
title: '',
|
||||||
image: '',
|
image: '',
|
||||||
@@ -284,7 +273,6 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
current: 1,
|
current: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
oldId: '',
|
|
||||||
userId: '',
|
userId: '',
|
||||||
title: '',
|
title: '',
|
||||||
sellerId: '',
|
sellerId: '',
|
||||||
@@ -357,7 +345,6 @@ export default {
|
|||||||
const params = {
|
const params = {
|
||||||
current: this.queryParams.current,
|
current: this.queryParams.current,
|
||||||
size: this.queryParams.size,
|
size: this.queryParams.size,
|
||||||
oldId: parseOptionalLong(this.queryParams.oldId),
|
|
||||||
userId: parseOptionalLong(this.queryParams.userId),
|
userId: parseOptionalLong(this.queryParams.userId),
|
||||||
title: this.queryParams.title || undefined,
|
title: this.queryParams.title || undefined,
|
||||||
sellerId: parseOptionalLong(this.queryParams.sellerId),
|
sellerId: parseOptionalLong(this.queryParams.sellerId),
|
||||||
@@ -389,7 +376,6 @@ export default {
|
|||||||
this.queryParams = {
|
this.queryParams = {
|
||||||
current: 1,
|
current: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
oldId: '',
|
|
||||||
userId: '',
|
userId: '',
|
||||||
title: '',
|
title: '',
|
||||||
sellerId: '',
|
sellerId: '',
|
||||||
@@ -412,7 +398,6 @@ export default {
|
|||||||
const pickLong = (k) => (row[k] !== undefined && row[k] !== null ? String(row[k]) : '')
|
const pickLong = (k) => (row[k] !== undefined && row[k] !== null ? String(row[k]) : '')
|
||||||
return {
|
return {
|
||||||
id: pickLong('id'),
|
id: pickLong('id'),
|
||||||
oldId: pickLong('oldId'),
|
|
||||||
userId: pickLong('userId'),
|
userId: pickLong('userId'),
|
||||||
title: row.title || '',
|
title: row.title || '',
|
||||||
image: row.image || '',
|
image: row.image || '',
|
||||||
@@ -487,7 +472,6 @@ export default {
|
|||||||
buildPayload() {
|
buildPayload() {
|
||||||
const payload = {
|
const payload = {
|
||||||
id: parseOptionalLong(this.form.id),
|
id: parseOptionalLong(this.form.id),
|
||||||
oldId: parseOptionalLong(this.form.oldId),
|
|
||||||
userId: parseOptionalLong(this.form.userId),
|
userId: parseOptionalLong(this.form.userId),
|
||||||
title: this.form.title || undefined,
|
title: this.form.title || undefined,
|
||||||
image: this.form.image || undefined,
|
image: this.form.image || undefined,
|
||||||
@@ -514,6 +498,26 @@ export default {
|
|||||||
const n = Number(val)
|
const n = Number(val)
|
||||||
return Number.isNaN(n) ? String(val) : n.toFixed(2)
|
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) {
|
formatYesNo(value) {
|
||||||
if (value === 1) return '是'
|
if (value === 1) return '是'
|
||||||
if (value === 0) return '否'
|
if (value === 0) return '否'
|
||||||
@@ -546,6 +550,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.table-container {
|
.table-container {
|
||||||
|
.day-amount-cell {
|
||||||
|
white-space: pre-line;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
.el-pagination {
|
.el-pagination {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|||||||
@@ -695,9 +695,17 @@ export default {
|
|||||||
this.syncForm.buyTimeRange = normalized
|
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() {
|
openSyncDialog() {
|
||||||
this.syncForm = {
|
this.syncForm = {
|
||||||
buyTimeRange: null,
|
buyTimeRange: this.getTodayBuyTimeRange(),
|
||||||
isResell: undefined
|
isResell: undefined
|
||||||
}
|
}
|
||||||
this.syncDialogVisible = true
|
this.syncDialogVisible = true
|
||||||
|
|||||||
Reference in New Issue
Block a user