This commit is contained in:
2025-04-16 14:31:15 +08:00
parent 3cdbc305b2
commit 032a32915e
3 changed files with 140 additions and 73 deletions

View File

@@ -247,10 +247,41 @@
<!-- <div style="clear:both"></div> --> <!-- <div style="clear:both"></div> -->
<!-- 订单商品 --> <!-- 订单商品 -->
<div class="liName">商品信息</div> <div class="liName">商品信息</div>
<el-table
:data="orderDetails.trainingClassData"
style="width: 100%"
v-if="orderDetails.orderType == 'trainingClass'"
>
<el-table-column label="商品名" min-width="280">
<template slot-scope="scope">
<div class="flexbox">
<!-- <img
style="padding: 2px; border:1px solid #f1f1f1; margin-right: 5px;"
:src="scope.row.productImage"
width="30px"
height="30px"
/> -->
<div class="proname">
{{ scope.row.productName }}
<i
v-if="scope.row.books && scope.row.books.length > 0"
@click.stop="seeBooks(scope.row.books)"
class="el-icon-view"
style="color:#409eff; cursor: pointer;"
></i>
</div>
</div>
</template>
</el-table-column>
<el-table-column prop="productPrice" label="价格" width="180">
</el-table-column>
<el-table-column prop="quantity" label="数量" width="80">
</el-table-column>
</el-table>
<el-table <el-table
:data="orderDetails.relearnData" :data="orderDetails.relearnData"
style="width: 100%" style="width: 100%"
v-if="orderDetails.orderType == 'relearn'" v-else-if="orderDetails.orderType == 'relearn'"
> >
<el-table-column label="商品名" min-width="280"> <el-table-column label="商品名" min-width="280">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -281,7 +312,7 @@
<el-table <el-table
:data="orderDetails.vipData" :data="orderDetails.vipData"
style="width: 100%" style="width: 100%"
v-if="orderDetails.orderType == 'vip'" v-else-if="orderDetails.orderType == 'vip'"
> >
<el-table-column label="商品名" min-width="280"> <el-table-column label="商品名" min-width="280">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -935,6 +966,15 @@ export default {
// console.log(data.result,'data.result') // console.log(data.result,'data.result')
this.orderDetails = data.result; this.orderDetails = data.result;
if (this.orderDetails.orderType == "trainingClass") {
this.orderDetails.trainingClassData = [
{
productName: this.orderDetails.remark,
productPrice: this.orderDetails.orderPrice,
quantity: 1
}
];
}
if (this.orderDetails.orderType == "relearn") { if (this.orderDetails.orderType == "relearn") {
this.orderDetails.relearnData = [ this.orderDetails.relearnData = [
{ {

View File

@@ -90,7 +90,6 @@
<el-form-item label="充值积分" prop="score"> <el-form-item label="充值积分" prop="score">
<el-input-number <el-input-number
:min="0"
v-model="addPointsForm.score" v-model="addPointsForm.score"
placeholder="请输入积分" placeholder="请输入积分"
> >
@@ -386,6 +385,10 @@ export default {
this.dialogVisible = true; this.dialogVisible = true;
}, },
handleSubmit: debounce(async function() { handleSubmit: debounce(async function() {
if (this.addPointsForm.score <= 0) {
this.$message.error("积分不能小于0");
return false;
}
this.$refs["addPointsForm"].validate(valid => { this.$refs["addPointsForm"].validate(valid => {
if (valid) { if (valid) {
this.$http({ this.$http({

View File

@@ -6,11 +6,17 @@
@keyup.enter.native="getDataList()" @keyup.enter.native="getDataList()"
> >
<el-form-item> <el-form-item>
<el-input v-model="dataForm.key" placeholder="参数名" clearable size="small"> <el-input
v-model="dataForm.key"
placeholder="参数名"
clearable
size="small"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select size="small" <el-select
size="small"
v-model="dataForm.vipType" v-model="dataForm.vipType"
placeholder="请选择类型" placeholder="请选择类型"
clearable clearable
@@ -25,14 +31,16 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button size="small" <el-button
size="small"
@click=" @click="
pageIndex = 1; pageIndex = 1;
getDataList(); getDataList();
" "
>查询</el-button >查询</el-button
> >
<el-button size="small" <el-button
size="small"
v-if="isAuth('book:user:save')" v-if="isAuth('book:user:save')"
type="primary" type="primary"
@click="addOrUpdateHandle()" @click="addOrUpdateHandle()"
@@ -73,7 +81,7 @@
<el-image <el-image
v-if="scope.row.avatar && scope.row.avatar != ''" v-if="scope.row.avatar && scope.row.avatar != ''"
style="width: 30px; height: 30px;cursor: pointer;" style="width: 30px; height: 30px;cursor: pointer;"
:src="scope.row.avatar " :src="scope.row.avatar"
:preview-src-list="[scope.row.avatar]" :preview-src-list="[scope.row.avatar]"
> >
</el-image> </el-image>
@@ -203,7 +211,6 @@
</router-link> </router-link>
</div> </div>
<el-button <el-button
style="color: #ff9b1a;padding: 0;position: absolute;top: 4px;right: 0px;font-weight: 500;" style="color: #ff9b1a;padding: 0;position: absolute;top: 4px;right: 0px;font-weight: 500;"
type="text" type="text"
@@ -222,7 +229,8 @@
label="积分" label="积分"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div><router-link <div>
<router-link
:to="{ :to="{
path: 'user-point-jf', path: 'user-point-jf',
query: { query: {
@@ -237,8 +245,8 @@
> >
{{ scope.row.jf }} {{ scope.row.jf }}
</span> </span>
</router-link></div> </router-link>
</div>
<el-button <el-button
style="color: #3983ff;padding: 0;position: absolute;top: 4px;right: 0px;" style="color: #3983ff;padding: 0;position: absolute;top: 4px;right: 0px;"
@@ -258,7 +266,8 @@
label="湖分" label="湖分"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div><router-link <div>
<router-link
:to="{ path: '/userPoints', query: { id: scope.row.id } }" :to="{ path: '/userPoints', query: { id: scope.row.id } }"
> >
<span <span
@@ -266,8 +275,8 @@
> >
{{ scope.row.contributionScore }} {{ scope.row.contributionScore }}
</span> </span>
</router-link></div> </router-link>
</div>
<el-button <el-button
style="color: #16aa68;padding: 0;position: absolute;top: 4px;right: 0px;" style="color: #16aa68;padding: 0;position: absolute;top: 4px;right: 0px;"
@@ -295,7 +304,11 @@
query: { id: scope.row.id } query: { id: scope.row.id }
}" }"
> >
<el-button type="text" size="small" style="color: #467cfd;border: 1px solid #467cfdcc;padding: 4px;"> <el-button
type="text"
size="small"
style="color: #467cfd;border: 1px solid #467cfdcc;padding: 4px;"
>
课程列表 课程列表
</el-button> </el-button>
</router-link> </router-link>
@@ -317,7 +330,11 @@
query: { id: scope.row.id } query: { id: scope.row.id }
}" }"
> >
<el-button type="text" size="small" style="color: #365089; border: 1px solid #365089cc;padding: 4px;"> <el-button
type="text"
size="small"
style="color: #365089; border: 1px solid #365089cc;padding: 4px;"
>
证书列表 证书列表
</el-button> </el-button>
</router-link> </router-link>
@@ -578,7 +595,8 @@ export default {
}, },
pointFormRules: { pointFormRules: {
pointAmount: [ pointAmount: [
{ required: true, message: "请输入金额", trigger: "blur" } { required: true, message: "请输入金额", trigger: "blur" },
], ],
pointType: { pointType: {
required: true, required: true,
@@ -886,9 +904,14 @@ export default {
}, },
huaSheng(point) { huaSheng(point) {
// console.log(this.pointForm.pointAmount, point) // console.log(this.pointForm.pointAmount, point)
if (this.pointForm.pointAmount<=0) {
this.$message.error("金额不能小于0");
return false
}
if (this.pointForm.pointAmount > point && this.pointForm.pointType == 1) { if (this.pointForm.pointAmount > point && this.pointForm.pointType == 1) {
return this.$message.error("扣除金额不能大于总金额"); return this.$message.error("扣除金额不能大于总金额");
} }
this.$refs["pointForm"].validate(valid => { this.$refs["pointForm"].validate(valid => {
this.$http({ this.$http({
url: this.$http.adornUrl( url: this.$http.adornUrl(
@@ -975,7 +998,8 @@ export default {
padding: 4px 0 !important; padding: 4px 0 !important;
box-sizing: border-box; box-sizing: border-box;
} }
/deep/ .mod-config .el-table .cell, .el-table th div { /deep/ .mod-config .el-table .cell,
.el-table th div {
padding: 0 !important; padding: 0 !important;
box-sizing: border-box; box-sizing: border-box;
} }