提交
This commit is contained in:
@@ -45,7 +45,8 @@ const mainRoutes = {
|
|||||||
{ path: '/buyorder-mergeorder', component: _import('modules/order/buyorder-mergeorder'), name: 'buyorder-mergeorder', meta: { title: '合并发货', isTab: true } },
|
{ path: '/buyorder-mergeorder', component: _import('modules/order/buyorder-mergeorder'), name: 'buyorder-mergeorder', meta: { title: '合并发货', isTab: true } },
|
||||||
{ path: '/buyorder-print', component: _import('modules/order/buyorder-print'), name: 'buyorder-print', meta: { title: '打印面单', isTab: true } },
|
{ path: '/buyorder-print', component: _import('modules/order/buyorder-print'), name: 'buyorder-print', meta: { title: '打印面单', isTab: true } },
|
||||||
{ path: '/activity-list', component: _import('modules/activity/activityList'), name: 'activity-list', meta: { title: '活动列表', isTab: true } },
|
{ path: '/activity-list', component: _import('modules/activity/activityList'), name: 'activity-list', meta: { title: '活动列表', isTab: true } },
|
||||||
{ path: '/user-point-memery', component: _import('modules/user/user-point-memery'), name: 'user-point-memery', meta: { title: '充/扣记录', isTab: true } },
|
{ path: '/user-point-memery', component: _import('modules/user/user-point-memery'), name: 'user-point-memery', meta: { title: '天医币充/扣记录', isTab: true } },
|
||||||
|
{ path: '/user-point-jf', component: _import('modules/user/user-point-jf'), name: 'user-point-jf', meta: { title: '积分充/扣记录', isTab: true } },
|
||||||
{ path: '/user-add-course', component: _import('modules/user/user-add-course'), name: 'user-add-course', meta: { title: '开通课程', isTab: true } },
|
{ path: '/user-add-course', component: _import('modules/user/user-add-course'), name: 'user-add-course', meta: { title: '开通课程', isTab: true } },
|
||||||
{ path: '/order-epay', component: _import('modules/order/order-errorpay'), name: 'order-epay', meta: { title: '充值异常列表', isTab: true } },
|
{ path: '/order-epay', component: _import('modules/order/order-errorpay'), name: 'order-epay', meta: { title: '充值异常列表', isTab: true } },
|
||||||
{ path: '/xieyi_list', component: _import('modules/xieyi/xieyi'), name: 'xieyi_list', meta: { title: '协议管理', isTab: true } },
|
{ path: '/xieyi_list', component: _import('modules/xieyi/xieyi'), name: 'xieyi_list', meta: { title: '协议管理', isTab: true } },
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog title="发货配置" :close-on-click-modal="false" :visible.sync="visible" width='500px'
|
<el-dialog title="发货配置" :close-on-click-modal="false" :visible.sync="visible" width='500px'
|
||||||
:before-close="beforeCloseDialog">
|
:before-close="beforeCloseDialog" append-to-body>
|
||||||
<!-- <el-steps :active="stepsActive" simple style="margin-bottom: 20px;;">
|
<!-- <el-steps :active="stepsActive" simple style="margin-bottom: 20px;;">
|
||||||
<el-step title="获取电子面单" icon="el-icon-tickets"></el-step>
|
<el-step title="获取电子面单" icon="el-icon-tickets"></el-step>
|
||||||
<el-step title="打印电子面单" icon="el-icon-printer"></el-step>
|
<el-step title="打印电子面单" icon="el-icon-printer"></el-step>
|
||||||
|
|||||||
@@ -15,8 +15,54 @@
|
|||||||
<!-- <div style="background-color: #f0f0f0;padding:0 10px;box-sizing: border-box;color: #000;">
|
<!-- <div style="background-color: #f0f0f0;padding:0 10px;box-sizing: border-box;color: #000;">
|
||||||
<p>绑定用户</p>
|
<p>绑定用户</p>
|
||||||
</div> -->
|
</div> -->
|
||||||
<el-form-item label="用户:" prop="user" class="form_item">
|
<template v-if="pageType == 'label'">
|
||||||
<div style="display: flex;align-items: center;">
|
<el-form-item label="手机号/邮箱:" prop="userKey" class="form_item">
|
||||||
|
<div style="display: flex;align-items: center;">
|
||||||
|
<el-autocomplete
|
||||||
|
v-if="!isEdit"
|
||||||
|
style="width: 400px;"
|
||||||
|
v-model="addPointsForm.userKey"
|
||||||
|
:fetch-suggestions="loadAll"
|
||||||
|
placeholder="请输入手机号/邮箱"
|
||||||
|
@select="handleSelect"
|
||||||
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<div class="custom-item">
|
||||||
|
<span>{{ item.tel ? item.tel : item.email }}</span>
|
||||||
|
<span
|
||||||
|
style="color: gray; margin-left: 10px;"
|
||||||
|
v-if="item.name"
|
||||||
|
>({{ item.name }})</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete>
|
||||||
|
<span v-if="isEdit">{{ addPointsForm.userKey }}</span>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="用户姓名:"
|
||||||
|
style="width: 400px;"
|
||||||
|
v-if="addPointsForm.userId"
|
||||||
|
prop="user"
|
||||||
|
class="form_item"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<!-- <span
|
||||||
|
style="width: 110px;display: inline-block;text-align: right;"
|
||||||
|
>用户姓名:</span
|
||||||
|
> -->
|
||||||
|
{{
|
||||||
|
addPointsForm.userName
|
||||||
|
? addPointsForm.userName
|
||||||
|
: "-"
|
||||||
|
}}
|
||||||
|
</div></el-form-item
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
<template v-if="pageType == 'user'">
|
||||||
|
<el-form-item label="用户:" prop="user" class="form_item" >
|
||||||
|
<div style="display: flex;align-items: center;" >
|
||||||
{{ dataInfo.tel ? dataInfo.tel : dataInfo.email }}
|
{{ dataInfo.tel ? dataInfo.tel : dataInfo.email }}
|
||||||
<span v-if="dataInfo.name">( {{ dataInfo.name }})</span>
|
<span v-if="dataInfo.name">( {{ dataInfo.name }})</span>
|
||||||
|
|
||||||
@@ -41,6 +87,8 @@
|
|||||||
</el-option
|
</el-option
|
||||||
></el-select></div
|
></el-select></div
|
||||||
></el-form-item>
|
></el-form-item>
|
||||||
|
</template>
|
||||||
|
|
||||||
<el-form-item label="充值湖分" prop="score">
|
<el-form-item label="充值湖分" prop="score">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
:min="0"
|
:min="0"
|
||||||
@@ -51,7 +99,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="充值明细">
|
<el-form-item label="充值明细">
|
||||||
<el-input
|
<el-input style="width: 400px;"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
rows="5"
|
rows="5"
|
||||||
v-model="addPointsForm.detail"
|
v-model="addPointsForm.detail"
|
||||||
@@ -153,22 +201,7 @@ export default {
|
|||||||
addForm: {},
|
addForm: {},
|
||||||
audioFileList: [],
|
audioFileList: [],
|
||||||
isFresh: false,
|
isFresh: false,
|
||||||
dataRule: {
|
dataRule: { }
|
||||||
type: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请选择湖分分类"
|
|
||||||
// trigger: "change",
|
|
||||||
}
|
|
||||||
],
|
|
||||||
score: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请输入湖分"
|
|
||||||
// trigger: "change",
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -301,7 +334,35 @@ export default {
|
|||||||
this.addPointsForm = {};
|
this.addPointsForm = {};
|
||||||
this.fileList = [];
|
this.fileList = [];
|
||||||
this.isEdit = type == "edit" ? true : false;
|
this.isEdit = type == "edit" ? true : false;
|
||||||
|
if(this.pageType == 'label'){
|
||||||
|
this.dataRule= {
|
||||||
|
|
||||||
|
score: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入湖分"
|
||||||
|
// trigger: "change",
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.dataRule= {
|
||||||
|
type: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择湖分分类"
|
||||||
|
// trigger: "change",
|
||||||
|
}
|
||||||
|
],
|
||||||
|
score: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入湖分"
|
||||||
|
// trigger: "change",
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
if (data) {
|
if (data) {
|
||||||
this.addPointsForm = {
|
this.addPointsForm = {
|
||||||
// courseId: data.id,
|
// courseId: data.id,
|
||||||
1501
src/views/modules/points/cateList.vue
Normal file
1501
src/views/modules/points/cateList.vue
Normal file
File diff suppressed because it is too large
Load Diff
686
src/views/modules/points/userPoints.vue
Normal file
686
src/views/modules/points/userPoints.vue
Normal file
@@ -0,0 +1,686 @@
|
|||||||
|
<template>
|
||||||
|
<div class="mod-config">
|
||||||
|
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
:model="dataForm"
|
||||||
|
@keyup.enter.native="getDataList()"
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-form-item label="">
|
||||||
|
<el-form-item
|
||||||
|
label="湖分分类"
|
||||||
|
|
||||||
|
prop="user"
|
||||||
|
class="form_item"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<el-select size="small"
|
||||||
|
clearable
|
||||||
|
:show-all-levels="false"
|
||||||
|
v-model="selectLabelId"
|
||||||
|
:options="cateOptions"
|
||||||
|
placeholder="湖分分类"
|
||||||
|
@change="handleChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cateOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option
|
||||||
|
></el-select></div
|
||||||
|
></el-form-item>
|
||||||
|
<!-- <el-form-item label="证书名称">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.title"
|
||||||
|
placeholder="请输入证书名称"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item> -->
|
||||||
|
<!-- <el-form-item label="">
|
||||||
|
<el-input v-model="dataForm.userInfo" placeholder="用户手机/邮箱/姓名" clearable>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item> -->
|
||||||
|
|
||||||
|
<!-- <el-select v-model="dataForm.expire" placeholder="证书分类"
|
||||||
|
@change="
|
||||||
|
pageIndex = 1;
|
||||||
|
getDataList();">
|
||||||
|
<el-option
|
||||||
|
v-for="item in statusOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select> -->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button size="small"
|
||||||
|
@click="
|
||||||
|
pageIndex = 1;
|
||||||
|
getDataList();
|
||||||
|
"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
<!-- <el-button
|
||||||
|
@click="
|
||||||
|
dataForm = {};
|
||||||
|
selectLabelId=[]
|
||||||
|
|
||||||
|
"
|
||||||
|
>重置</el-button
|
||||||
|
> -->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="showAddD" type="primary" size="small">充值</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item style="float:right">
|
||||||
|
<div v-if="user.id" class="flexbox userInfo" style="margin-bottom: 0;">
|
||||||
|
<div>
|
||||||
|
用户信息:{{ user.name }}{{ user.tel ? user.tel : user.email }}
|
||||||
|
</div>
|
||||||
|
<!-- <div>
|
||||||
|
<span v-if="user.vip == 0">(普通用户)</span>
|
||||||
|
<span v-else-if="user.vip == 2">(吴门医述VIP)</span>
|
||||||
|
<span v-else-if="user.vip == 1">(超级VIP)</span>
|
||||||
|
<span v-else-if="user.vip == 3">(众妙之门VIP)</span>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<!-- <div style="color: rgb(22, 170, 104);font-weight: bold;text-align: right;">总湖分:{{ user.jf }}</div> -->
|
||||||
|
<el-table
|
||||||
|
:data="dataList"
|
||||||
|
border
|
||||||
|
v-loading="dataListLoading"
|
||||||
|
style="width: 100%;"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
label="序号"
|
||||||
|
width="100"
|
||||||
|
align="center"
|
||||||
|
prop="certificateNo"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ (pageIndex - 1) * pageSize + scope.$index + 1 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
prop="title"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
width="140"
|
||||||
|
label="湖分类型"
|
||||||
|
><template slot-scope="scope">
|
||||||
|
<span>{{ getPointsType(scope.row.type) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="score" width="140"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="湖分"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="detail"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="描述"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<!-- <el-table-column
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="课程图"
|
||||||
|
width="140"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<img
|
||||||
|
v-if="scope.row.image != ''"
|
||||||
|
:src="scope.row.image"
|
||||||
|
width="25"
|
||||||
|
height="35"
|
||||||
|
class="tableImg"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
prop="createTime"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
width="180"
|
||||||
|
label="创建日期"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
fixed="right"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
width="100"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
|
||||||
|
<el-button type="danger" @click="dataFormDelete(scope.row)" plain size="mini"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination
|
||||||
|
@size-change="sizeChangeHandle"
|
||||||
|
@current-change="currentChangeHandle"
|
||||||
|
:current-page="pageIndex"
|
||||||
|
:page-sizes="[50, 100, 200]"
|
||||||
|
:page-size="pageSize"
|
||||||
|
:total="total"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
|
</el-pagination>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="充值湖分"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="youVisible"
|
||||||
|
append-to-body
|
||||||
|
width="60%"
|
||||||
|
@close="dialogClose"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
style="width:100%"
|
||||||
|
:model="youForm"
|
||||||
|
label-width="100px"
|
||||||
|
ref="youForm"
|
||||||
|
:rules="youFormRule"
|
||||||
|
>
|
||||||
|
<el-form-item label="用户">
|
||||||
|
{{ user.tel }} <span v-if="user.name != ''">{{ user.name }}</span>
|
||||||
|
<span v-if="user.vip == 0">普通用户</span>
|
||||||
|
<span v-else-if="user.vip == 2">(吴门医述VIP)</span>
|
||||||
|
<span v-else-if="user.vip == 1">(超级VIP)</span>
|
||||||
|
<span v-else-if="user.vip == 3">(众妙之门VIP)</span>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="充值原因:" prop="come" style="width: 400px">
|
||||||
|
<el-input
|
||||||
|
v-model="youForm.come"
|
||||||
|
type="textarea"
|
||||||
|
:rows="2"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogClose">取消</el-button>
|
||||||
|
<el-button @click="submit" type="primary">确认开通</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
<addCertificate
|
||||||
|
@refresh="
|
||||||
|
pageIndex = 1;
|
||||||
|
getDataList();
|
||||||
|
"
|
||||||
|
ref="addCertificate"
|
||||||
|
:data="addCertificateForm"
|
||||||
|
pageType="user"
|
||||||
|
:dataInfo="user"
|
||||||
|
></addCertificate>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import debounce from "lodash/debounce"; //导入lodash中的debounce
|
||||||
|
import addCertificate from "@/views/modules/points/addPoints.vue";
|
||||||
|
// import AddOrUpdate from './user-add-or-update'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
cateOptions: [],
|
||||||
|
selectLabelId: "",
|
||||||
|
dataForm: {
|
||||||
|
key: "",
|
||||||
|
expire: "",
|
||||||
|
userInfo: ""
|
||||||
|
},
|
||||||
|
statusOptions: [
|
||||||
|
{
|
||||||
|
value: "0",
|
||||||
|
label: "有效"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "-1",
|
||||||
|
label: "已过期"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
userId: this.$route.query.id,
|
||||||
|
user: {},
|
||||||
|
pointFormRules: {
|
||||||
|
pointAmount: [
|
||||||
|
{ required: true, message: "请输入金额", trigger: "blur" }
|
||||||
|
],
|
||||||
|
pointType: {
|
||||||
|
required: true,
|
||||||
|
message: "请选择操作类型",
|
||||||
|
trigger: "blur"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
youFormRule: {
|
||||||
|
catalogueId: [
|
||||||
|
{ required: true, message: "请选择开通的分部", trigger: "blur" }
|
||||||
|
],
|
||||||
|
days: [{ required: true, message: "请选择开通时长", trigger: "blur" }]
|
||||||
|
},
|
||||||
|
options: [],
|
||||||
|
timeOptions: [
|
||||||
|
// 开通时长
|
||||||
|
{
|
||||||
|
value: "30",
|
||||||
|
label: "30天"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "60",
|
||||||
|
label: "60天"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "90",
|
||||||
|
label: "90天"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "120",
|
||||||
|
label: "120天"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "150",
|
||||||
|
label: "150天"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "180",
|
||||||
|
label: "180天"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "365",
|
||||||
|
label: "365天"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "730",
|
||||||
|
label: "730天"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
dataList: [],
|
||||||
|
pageIndex: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
totalPage: 0,
|
||||||
|
total: 0,
|
||||||
|
totalLaoding: false,
|
||||||
|
dataListLoading: false,
|
||||||
|
dataListSelections: [],
|
||||||
|
|
||||||
|
youVisible: false,
|
||||||
|
linshiids: [],
|
||||||
|
|
||||||
|
youForm: {
|
||||||
|
courseId: null,
|
||||||
|
cate: [],
|
||||||
|
catalogueId: "",
|
||||||
|
days: "",
|
||||||
|
come: "" //管理员开通(原因)
|
||||||
|
},
|
||||||
|
linshilist: [
|
||||||
|
{
|
||||||
|
title: "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "2"
|
||||||
|
},
|
||||||
|
{ title: "3" }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
addCertificate
|
||||||
|
// AddOrUpdate
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.userId = this.$route.query.id;
|
||||||
|
console.log(this.$route.query);
|
||||||
|
console.log(this.userId, "onsole.log(this.$route.query)");
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
this.userId = this.$route.query.id;
|
||||||
|
this.init();
|
||||||
|
// this.getDataList()
|
||||||
|
// this.getcourpeList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getPointsType(type) {
|
||||||
|
var str = "";
|
||||||
|
//在线教学 01 学术期刊 03 太湖讲堂 05 创作技术 07 注册邀请 11 课程邀请 13
|
||||||
|
switch (type) {
|
||||||
|
case "01":
|
||||||
|
return "在线教学";
|
||||||
|
|
||||||
|
case "03":
|
||||||
|
return "学术期刊";
|
||||||
|
|
||||||
|
case "05":
|
||||||
|
return "太湖讲堂";
|
||||||
|
|
||||||
|
case "07":
|
||||||
|
return "创作技术";
|
||||||
|
|
||||||
|
case "11":
|
||||||
|
return "注册邀请";
|
||||||
|
|
||||||
|
case "13":
|
||||||
|
return "课程邀请";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dataFormDelete: debounce(async function(row, deleteType) {
|
||||||
|
console.log("row at line 515:", row);
|
||||||
|
this.$confirm(
|
||||||
|
`确定要删除${deleteType != "all" ? "该" : "所有"}湖分嘛?`,
|
||||||
|
"提示",
|
||||||
|
{
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(async () => {
|
||||||
|
// var lableIds = row[0].bookLabelId;
|
||||||
|
var productIds = row.id;
|
||||||
|
|
||||||
|
await this.$http
|
||||||
|
.request({
|
||||||
|
url: this.$http.adornUrl(`/master/userContribution/delUserContribution`),
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
id: productIds
|
||||||
|
// marketId: this.addForm.id
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
//默认 无 说明:请求头
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(async ({ data }) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
} else {
|
||||||
|
this.$message.error(data.msg);
|
||||||
|
}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
// this.$refs.commonShop.selectShopArr = [];
|
||||||
|
this.getDataList()
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
}, 200),
|
||||||
|
getCateList() {
|
||||||
|
// this.$http({
|
||||||
|
// url: this.$http.adornUrl(
|
||||||
|
// "/master/userCertificate/userCertificateLabelList"
|
||||||
|
// ),
|
||||||
|
// method: "post",
|
||||||
|
// data: this.$http.adornData({})
|
||||||
|
// }).then(({ data }) => {
|
||||||
|
// if (data && data.code === 0) {
|
||||||
|
this.cateOptions = [
|
||||||
|
{
|
||||||
|
value: "01",
|
||||||
|
label: "在线教学"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "03",
|
||||||
|
label: "学术期刊"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "05",
|
||||||
|
label: "太湖讲堂"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "07",
|
||||||
|
label: "创作技术"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "11",
|
||||||
|
label: "注册邀请"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "13",
|
||||||
|
label: "课程邀请"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
// } else {
|
||||||
|
// this.cateOptions = [];
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (data.code !== 0) return this.$message.error(data.msg);
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
delay(val) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addCertificate.init("edit", { val });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
delaySubmit(data) {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("/master/userCourseBuy/delayUserCourseBuy"),
|
||||||
|
method: "post",
|
||||||
|
data: this.$http.adornData(data)
|
||||||
|
})
|
||||||
|
.then(({ data }) => {
|
||||||
|
if (data && data.code == 0) {
|
||||||
|
this.$message.success("操作成功!");
|
||||||
|
this.getDataList();
|
||||||
|
} else {
|
||||||
|
this.$message.error("操作失败!");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
this.$message.error(err.msg);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
submit() {
|
||||||
|
console.log(this.youForm, "youForm");
|
||||||
|
this.youForm.catalogueId = this.linshiids.join(",");
|
||||||
|
this.$refs["youForm"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
let data = {
|
||||||
|
userId: this.userId,
|
||||||
|
...this.youForm
|
||||||
|
};
|
||||||
|
delete data.cate;
|
||||||
|
console.log("data", data);
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(
|
||||||
|
"/master/userCourseBuy/insertUserCourseBuy"
|
||||||
|
),
|
||||||
|
method: "post",
|
||||||
|
data: this.$http.adornData(data)
|
||||||
|
})
|
||||||
|
.then(({ data }) => {
|
||||||
|
if (data.code !== 0) return this.$message.error(data.msg);
|
||||||
|
this.$message.success("开课成功!");
|
||||||
|
this.getDataList();
|
||||||
|
this.dialogClose();
|
||||||
|
})
|
||||||
|
.catch(e => {
|
||||||
|
console.log("表单提交报错");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
dialogClose() {
|
||||||
|
this.youVisible = false;
|
||||||
|
this.linshiids = [];
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.youForm.cate = [];
|
||||||
|
this.options = [];
|
||||||
|
|
||||||
|
this.$refs["youForm"].resetFields();
|
||||||
|
console.log(this.youForm, "youForm");
|
||||||
|
});
|
||||||
|
console.log(this.youForm, "youForm");
|
||||||
|
},
|
||||||
|
selectChange(val) {
|
||||||
|
console.log("options", this.options);
|
||||||
|
this.getCate(val);
|
||||||
|
},
|
||||||
|
remoteMethod(query) {
|
||||||
|
console.log(query, "query", this.youForm.key);
|
||||||
|
// return false
|
||||||
|
if (this.youForm.key !== "") {
|
||||||
|
let data = {
|
||||||
|
// page: this.pageIndex,
|
||||||
|
// limit: this.pageSize,
|
||||||
|
title: query //关键字
|
||||||
|
// medicalId: "",
|
||||||
|
// sociologyId: "",
|
||||||
|
// type: 0
|
||||||
|
};
|
||||||
|
this.totalLaoding = true;
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("/master/userManage/courseAndChildrenList"),
|
||||||
|
method: "post",
|
||||||
|
data: this.$http.adornData(data)
|
||||||
|
}).then(({ data }) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.options = data.list;
|
||||||
|
} else {
|
||||||
|
this.options = [];
|
||||||
|
}
|
||||||
|
this.totalLaoding = false;
|
||||||
|
if (data.code !== 0) return this.$message.error(data.msg);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.options = [];
|
||||||
|
this.totalLaoding = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showAddD() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addCertificate.init("add", {});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
init() {
|
||||||
|
this.getCateList();
|
||||||
|
// if (!this.userId) {
|
||||||
|
// setTimeout(() => {
|
||||||
|
// this.init();
|
||||||
|
// }, 1000);
|
||||||
|
// }
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(`/book/user/info/${this.userId}`),
|
||||||
|
method: "get",
|
||||||
|
params: this.$http.adornParams()
|
||||||
|
}).then(({ data }) => {
|
||||||
|
if (data && data.code !== 0) return this.$message.error(data.msg);
|
||||||
|
|
||||||
|
this.user = data.user;
|
||||||
|
this.getDataList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 获取数据列表
|
||||||
|
getDataList() {
|
||||||
|
this.dataListLoading = true;
|
||||||
|
this.$http({
|
||||||
|
// url: this.$http.adornUrl('/book/user/list'),
|
||||||
|
url: this.$http.adornUrl("/master/userContribution/listByPage"),
|
||||||
|
method: "post",
|
||||||
|
data: this.$http.adornData({
|
||||||
|
current: this.pageIndex,
|
||||||
|
limit: this.pageSize,
|
||||||
|
userId: this.userId, //用户id
|
||||||
|
userName: "",
|
||||||
|
// "userId": "",
|
||||||
|
tel: "",
|
||||||
|
email: "",
|
||||||
|
type: this.selectLabelId //课程名
|
||||||
|
})
|
||||||
|
}).then(({ data }) => {
|
||||||
|
if (data && data.code !== 0) return this.$message.error(data.msg);
|
||||||
|
console.log(data, "data");
|
||||||
|
this.dataList = data.result.records;
|
||||||
|
this.totalPage = data.result.pages;
|
||||||
|
this.total = data.result.total;
|
||||||
|
this.dataListLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 每页数
|
||||||
|
sizeChangeHandle(val) {
|
||||||
|
this.pageSize = val;
|
||||||
|
this.pageIndex = 1;
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
// 当前页
|
||||||
|
currentChangeHandle(val) {
|
||||||
|
this.pageIndex = val;
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
// // 多选
|
||||||
|
// selectionChangeHandle(val) {
|
||||||
|
// this.dataListSelections = val
|
||||||
|
// },
|
||||||
|
// 新增 / 修改
|
||||||
|
closeDia() {
|
||||||
|
this.adc = false;
|
||||||
|
this.$refs.pointForm.resetFields();
|
||||||
|
// this.pointForm.pointType == 0
|
||||||
|
},
|
||||||
|
getCate(id) {
|
||||||
|
this.linshiids = [];
|
||||||
|
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("/master/userManage/catalogueListByCourse"),
|
||||||
|
method: "post",
|
||||||
|
data: this.$http.adornData({
|
||||||
|
courseId: id
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.then(({ data }) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
console.log("data", "data++++++++++++++++++++");
|
||||||
|
this.youForm.cate = data.list;
|
||||||
|
// this.youForm.cate
|
||||||
|
} else {
|
||||||
|
this.youForm.cate = [];
|
||||||
|
this.linshiids = [];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(e => {
|
||||||
|
console.log("数据报错");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
/deep/ .width100 .el-input__inner {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.flexbox {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.userInfo {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.userInfo * {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
456
src/views/modules/user/addJf.vue
Normal file
456
src/views/modules/user/addJf.vue
Normal file
@@ -0,0 +1,456 @@
|
|||||||
|
<template>
|
||||||
|
<div class="mod-config">
|
||||||
|
<el-dialog
|
||||||
|
:title="`${isEdit ? '编辑' : '充值/扣除'}积分`"
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
width="600px"
|
||||||
|
>
|
||||||
|
<div v-if="dialogVisible">
|
||||||
|
<el-form
|
||||||
|
:model="addPointsForm"
|
||||||
|
ref="addPointsForm"
|
||||||
|
label-width="110px"
|
||||||
|
:rules="dataRule"
|
||||||
|
>
|
||||||
|
<!-- <div style="background-color: #f0f0f0;padding:0 10px;box-sizing: border-box;color: #000;">
|
||||||
|
<p>绑定用户</p>
|
||||||
|
</div> -->
|
||||||
|
<template v-if="pageType == 'label'">
|
||||||
|
<el-form-item
|
||||||
|
label="手机号/邮箱:"
|
||||||
|
prop="userKey"
|
||||||
|
class="form_item"
|
||||||
|
>
|
||||||
|
<div style="display: flex;align-items: center;">
|
||||||
|
<el-autocomplete
|
||||||
|
v-if="!isEdit"
|
||||||
|
style="width: 400px;"
|
||||||
|
v-model="addPointsForm.userKey"
|
||||||
|
:fetch-suggestions="loadAll"
|
||||||
|
placeholder="请输入手机号/邮箱"
|
||||||
|
@select="handleSelect"
|
||||||
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<div class="custom-item">
|
||||||
|
<span>{{ item.tel ? item.tel : item.email }}</span>
|
||||||
|
<span
|
||||||
|
style="color: gray; margin-left: 10px;"
|
||||||
|
v-if="item.name"
|
||||||
|
>({{ item.name }})</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete>
|
||||||
|
<span v-if="isEdit">{{ addPointsForm.userKey }}</span>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="用户姓名:"
|
||||||
|
style="width: 400px;"
|
||||||
|
v-if="addPointsForm.userId"
|
||||||
|
prop="user"
|
||||||
|
class="form_item"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<!-- <span
|
||||||
|
style="width: 110px;display: inline-block;text-align: right;"
|
||||||
|
>用户姓名:</span
|
||||||
|
> -->
|
||||||
|
{{ addPointsForm.userName ? addPointsForm.userName : "-" }}
|
||||||
|
</div></el-form-item
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
<template v-if="pageType == 'user'">
|
||||||
|
<el-form-item label="用户:" prop="user" class="form_item">
|
||||||
|
<div style="display: flex;align-items: center;">
|
||||||
|
{{ dataInfo.tel ? dataInfo.tel : dataInfo.email }}
|
||||||
|
<span v-if="dataInfo.name">( {{ dataInfo.name }})</span>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="积分分类" prop="type" class="form_item">
|
||||||
|
<div>
|
||||||
|
<el-select
|
||||||
|
:show-all-levels="false"
|
||||||
|
v-model="addPointsForm.type"
|
||||||
|
:options="cateOptions"
|
||||||
|
placeholder="请选择积分分类"
|
||||||
|
@change="handleChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cateOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option
|
||||||
|
></el-select></div
|
||||||
|
></el-form-item>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-form-item label="充值积分" prop="score">
|
||||||
|
<el-input-number
|
||||||
|
:min="0"
|
||||||
|
v-model="addPointsForm.score"
|
||||||
|
placeholder="请输入积分"
|
||||||
|
>
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="充值明细">
|
||||||
|
<el-input
|
||||||
|
style="width: 400px;"
|
||||||
|
type="textarea"
|
||||||
|
rows="5"
|
||||||
|
v-model="addPointsForm.detail"
|
||||||
|
placeholder="操作说明"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<!-- <el-select v-model="dataForm.expire" placeholder="证书分类"
|
||||||
|
@change="
|
||||||
|
pageIndex = 1;
|
||||||
|
getDataList();">
|
||||||
|
<el-option
|
||||||
|
v-for="item in statusOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select> -->
|
||||||
|
<!-- </el-form-item> -->
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="handleSubmit('addPointsForm')">
|
||||||
|
确 定</el-button
|
||||||
|
>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { quillEditor } from "vue-quill-editor";
|
||||||
|
import global from "../../common/common.vue"; //引入共用组间
|
||||||
|
import debounce from "lodash/debounce"; //导入lodash中的debounce
|
||||||
|
import AddOrUpdate from "@/views/components/commonBookTags/bookTagsForm.vue";
|
||||||
|
import commonShop from "@/views/components/commonBookTags/shopproduct.vue";
|
||||||
|
import commonShopTable from "@/views/components/commonBookTags/shopproductTable.vue";
|
||||||
|
import commonTree from "@/views/components/commonBookTags/tags.vue";
|
||||||
|
|
||||||
|
import "quill/dist/quill.core.css";
|
||||||
|
import "quill/dist/quill.snow.css";
|
||||||
|
import "quill/dist/quill.bubble.css";
|
||||||
|
const toolbarOptions = [
|
||||||
|
["bold", "italic", "underline", "strike"], // 加粗,斜体,下划线,删除线
|
||||||
|
["blockquote", "code-block"], //引用,代码块
|
||||||
|
[{ header: 1 }, { header: 2 }], // 几级标题
|
||||||
|
[{ list: "ordered" }, { list: "bullet" }], // 有序列表,无序列表
|
||||||
|
[{ script: "sub" }, { script: "super" }], // 下角标,上角标
|
||||||
|
[{ indent: "-1" }, { indent: "+1" }], // 缩进
|
||||||
|
[{ direction: "rtl" }], // 文字输入方向
|
||||||
|
[{ size: ["small", false, "large", "huge"] }], // 字体大小
|
||||||
|
[{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
|
||||||
|
[{ color: [] }, { background: [] }], // 颜色选择
|
||||||
|
[
|
||||||
|
{
|
||||||
|
font: [
|
||||||
|
"SimSun",
|
||||||
|
"SimHei",
|
||||||
|
"Microsoft-YaHei",
|
||||||
|
"KaiTi",
|
||||||
|
"FangSong",
|
||||||
|
"Arial"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
], // 字体
|
||||||
|
[{ align: [] }], // 居中
|
||||||
|
["clean"], // 清除样式,
|
||||||
|
["link", "image"] // 上传图片、上传视频
|
||||||
|
];
|
||||||
|
// import dialogComponent from './seckillprodrelation'
|
||||||
|
export default {
|
||||||
|
props: ["data", "pageType", "dataInfo"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
selectLabelId: "",
|
||||||
|
isUploading: false, // 上传过程中是否显示加载动画
|
||||||
|
isUploading: false, // 上传过程中是否显示加载动画
|
||||||
|
isEdit: false, // 上传过程中是否显示加载动画
|
||||||
|
dialogImageUrl: "",
|
||||||
|
dialogVisibleImg: false,
|
||||||
|
disabled: false,
|
||||||
|
restaurants: [],
|
||||||
|
fileList: [],
|
||||||
|
options: [],
|
||||||
|
cateOptions: [],
|
||||||
|
state: "",
|
||||||
|
timeout: null,
|
||||||
|
addPointsForm: {},
|
||||||
|
baseUrl: global.baseUrl,
|
||||||
|
isEdit: false,
|
||||||
|
checkAll: false,
|
||||||
|
isIndeterminate: true,
|
||||||
|
dialogVisible: false,
|
||||||
|
urlList: {},
|
||||||
|
activeName: "first",
|
||||||
|
addForm: {},
|
||||||
|
audioFileList: [],
|
||||||
|
isFresh: false,
|
||||||
|
dataRule: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
AddOrUpdate,
|
||||||
|
commonShop,
|
||||||
|
commonTree,
|
||||||
|
commonShopTable,
|
||||||
|
quillEditor
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
filterText(val) {
|
||||||
|
this.$refs.tree.filter(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
this.isEdit = false;
|
||||||
|
// this.getDataList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
remoteMethod(query) {
|
||||||
|
console.log(query, "query", this.addPointsForm.key);
|
||||||
|
// return false
|
||||||
|
if (this.addPointsForm.key !== "") {
|
||||||
|
let data = {
|
||||||
|
title: query //关键字
|
||||||
|
};
|
||||||
|
this.totalLaoding = true;
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("/master/userManage/courseAndChildrenList"),
|
||||||
|
method: "post",
|
||||||
|
data: this.$http.adornData(data)
|
||||||
|
}).then(({ data }) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.options = data.list;
|
||||||
|
} else {
|
||||||
|
this.options = [];
|
||||||
|
}
|
||||||
|
this.totalLaoding = false;
|
||||||
|
if (data.code !== 0) return this.$message.error(data.msg);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.options = [];
|
||||||
|
this.totalLaoding = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleChange() {},
|
||||||
|
getCateList() {
|
||||||
|
// this.$http({
|
||||||
|
// url: this.$http.adornUrl(
|
||||||
|
// "/master/userCertificate/userCertificateLabelList"
|
||||||
|
// ),
|
||||||
|
// method: "post",
|
||||||
|
// data: this.$http.adornData({})
|
||||||
|
// }).then(({ data }) => {
|
||||||
|
// if (data && data.code === 0) {
|
||||||
|
// this.cateOptions = data.labelList;
|
||||||
|
// } else {
|
||||||
|
// this.cateOptions = [];
|
||||||
|
// }
|
||||||
|
// this.totalLaoding = false;
|
||||||
|
// if (data.code !== 0) return this.$message.error(data.msg);
|
||||||
|
// });
|
||||||
|
this.cateOptions = [
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: "充值积分"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: "扣除积分"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
},
|
||||||
|
loadAll(queryString, cb) {
|
||||||
|
if (queryString == "") {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
this.$http({
|
||||||
|
// url: this.$http.adornUrl('/book/user/list'),
|
||||||
|
url: this.$http.adornUrl("/book/user/getUserList"),
|
||||||
|
method: "post",
|
||||||
|
data: this.$http.adornData({
|
||||||
|
page: 1,
|
||||||
|
limit: 9999,
|
||||||
|
key: queryString
|
||||||
|
})
|
||||||
|
}).then(({ data }) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
var arr = data.user.records;
|
||||||
|
console.log("arr at line 467:", arr);
|
||||||
|
cb(arr);
|
||||||
|
} else {
|
||||||
|
cb([]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
createStateFilter(queryString) {
|
||||||
|
return state => {
|
||||||
|
return (
|
||||||
|
state.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
|
||||||
|
);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
handleSelect(item) {
|
||||||
|
console.log(item);
|
||||||
|
this.addPointsForm.userKey = item.tel ? item.tel : item.email;
|
||||||
|
this.addPointsForm.userName = item.name;
|
||||||
|
this.addPointsForm.userId = item.id;
|
||||||
|
},
|
||||||
|
init(type, data) {
|
||||||
|
this.getCateList();
|
||||||
|
console.log("data at line 372:", data);
|
||||||
|
this.addPointsForm = {};
|
||||||
|
this.fileList = [];
|
||||||
|
this.isEdit = type == "edit" ? true : false;
|
||||||
|
if (this.pageType == "label") {
|
||||||
|
this.dataRule = {
|
||||||
|
score: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入积分"
|
||||||
|
// trigger: "change",
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
this.dataRule = {
|
||||||
|
type: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择积分分类"
|
||||||
|
// trigger: "change",
|
||||||
|
}
|
||||||
|
],
|
||||||
|
score: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入积分"
|
||||||
|
// trigger: "change",
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (data) {
|
||||||
|
this.addPointsForm = {
|
||||||
|
// courseId: data.id,
|
||||||
|
// courseName: data.title,
|
||||||
|
// courseImg: data.image,
|
||||||
|
// images: data.image
|
||||||
|
// userId: data.userId
|
||||||
|
};
|
||||||
|
this.remoteMethod(this.addPointsForm.courseName);
|
||||||
|
if (this.addPointsForm.images) {
|
||||||
|
this.fileList = this.addPointsForm.images
|
||||||
|
.split(",")
|
||||||
|
.map((image, i) => ({
|
||||||
|
uid: i, // 假设 id 是唯一标识符
|
||||||
|
name: i, // 文件名
|
||||||
|
status: "done", // 状态
|
||||||
|
url: image // 文件 URL
|
||||||
|
}));
|
||||||
|
console.log("this.fileList at line 308:", this.fileList);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.addPointsForm = {};
|
||||||
|
}
|
||||||
|
if (this.pageType == "label") {
|
||||||
|
if (data.userId) {
|
||||||
|
this.addPointsForm.userKey = data.tel ? data.tel : data.email;
|
||||||
|
this.addPointsForm.userName = data.name;
|
||||||
|
this.addPointsForm.userId = data.id;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.addPointsForm.userKey = this.dataInfo.tel
|
||||||
|
? this.dataInfo.tel
|
||||||
|
: this.dataInfo.email;
|
||||||
|
this.addPointsForm.userName = this.dataInfo.name;
|
||||||
|
this.addPointsForm.userId = this.dataInfo.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.dialogVisible = true;
|
||||||
|
},
|
||||||
|
handleSubmit: debounce(async function() {
|
||||||
|
this.$refs["addPointsForm"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(
|
||||||
|
"/master/jfTransactionDetails/saveJfTransactionDetails"
|
||||||
|
),
|
||||||
|
method: "post",
|
||||||
|
data: this.$http.adornData({
|
||||||
|
userId: this.dataInfo.id,
|
||||||
|
changeAmount: this.addPointsForm.score,
|
||||||
|
remark: this.addPointsForm.detail
|
||||||
|
? this.addPointsForm.detail
|
||||||
|
: "",
|
||||||
|
actType: this.addPointsForm.type
|
||||||
|
})
|
||||||
|
}).then(({ data }) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.$message({
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success"
|
||||||
|
});
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$emit("refresh");
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message.error(data.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, 200),
|
||||||
|
|
||||||
|
onSuccessImg(response, file, fileList) {
|
||||||
|
// 上传成功后,直接将返回的 URL 放到 file 对象中
|
||||||
|
file.uploading = false;
|
||||||
|
file.url = response.url; // 假设返回的数据包含文件的 url 地址
|
||||||
|
this.fileList = fileList; // 更新 fileList
|
||||||
|
},
|
||||||
|
|
||||||
|
beforeUpload(file) {
|
||||||
|
// 在文件上传之前,设置文件的上传状态
|
||||||
|
file.uploading = true;
|
||||||
|
},
|
||||||
|
onProgress(event, file, fileList) {
|
||||||
|
// 进度更新时,文件状态可以继续保持上传中
|
||||||
|
file.uploading = true;
|
||||||
|
},
|
||||||
|
handleRemove(file) {
|
||||||
|
this.fileList = this.fileList.filter(f => f.uid !== file.uid); // 删除文件
|
||||||
|
},
|
||||||
|
handleDownload(file) {
|
||||||
|
const link = document.createElement("a");
|
||||||
|
link.href = file.url;
|
||||||
|
link.download = file.name;
|
||||||
|
link.click();
|
||||||
|
},
|
||||||
|
selectChange(val) {
|
||||||
|
console.log("options", this.options);
|
||||||
|
// this.getCate(val)
|
||||||
|
},
|
||||||
|
handlePictureCardPreview(file) {
|
||||||
|
// 图片预览逻辑
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped></style>
|
||||||
720
src/views/modules/user/user-point-jf.vue
Normal file
720
src/views/modules/user/user-point-jf.vue
Normal file
@@ -0,0 +1,720 @@
|
|||||||
|
<template>
|
||||||
|
<div class="mod-config">
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
:model="dataForm"
|
||||||
|
@keyup.enter.native="getDataList()"
|
||||||
|
>
|
||||||
|
<el-form-item label="">
|
||||||
|
<el-form-item label="积分类型" prop="user" class="form_item">
|
||||||
|
<div>
|
||||||
|
<el-select
|
||||||
|
size="small"
|
||||||
|
clearable
|
||||||
|
:show-all-levels="false"
|
||||||
|
v-model="actType"
|
||||||
|
:options="cateOptions"
|
||||||
|
placeholder="积分类型"
|
||||||
|
@change="handleChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cateOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option
|
||||||
|
></el-select></div
|
||||||
|
></el-form-item>
|
||||||
|
<!-- <el-form-item label="证书名称">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.title"
|
||||||
|
placeholder="请输入证书名称"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item> -->
|
||||||
|
<!-- <el-form-item label="">
|
||||||
|
<el-input v-model="dataForm.userInfo" placeholder="用户手机/邮箱/姓名" clearable>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item> -->
|
||||||
|
|
||||||
|
<!-- <el-select v-model="dataForm.expire" placeholder="证书分类"
|
||||||
|
@change="
|
||||||
|
pageIndex = 1;
|
||||||
|
getDataList();">
|
||||||
|
<el-option
|
||||||
|
v-for="item in statusOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select> -->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
@click="
|
||||||
|
pageIndex = 1;
|
||||||
|
getDataList();
|
||||||
|
"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
<!-- <el-button
|
||||||
|
@click="
|
||||||
|
dataForm = {};
|
||||||
|
actType=[]
|
||||||
|
|
||||||
|
"
|
||||||
|
>重置</el-button
|
||||||
|
> -->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="showAddD" type="primary" size="small"
|
||||||
|
>充值</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item style="float:right">
|
||||||
|
<div v-if="user.id" class="flexbox userInfo" style="margin-bottom: 0;">
|
||||||
|
<div>
|
||||||
|
用户信息:{{ user.name }}{{ user.tel ? user.tel : user.email }}
|
||||||
|
</div>
|
||||||
|
<!-- <div>
|
||||||
|
<span v-if="user.vip == 0">(普通用户)</span>
|
||||||
|
<span v-else-if="user.vip == 2">(吴门医述VIP)</span>
|
||||||
|
<span v-else-if="user.vip == 1">(超级VIP)</span>
|
||||||
|
<span v-else-if="user.vip == 3">(众妙之门VIP)</span>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<!-- <div style="color: rgb(22, 170, 104);font-weight: bold;text-align: right;">总湖分:{{ user.jf }}</div> -->
|
||||||
|
<el-table
|
||||||
|
:data="dataList"
|
||||||
|
border
|
||||||
|
v-loading="dataListLoading"
|
||||||
|
style="width: 100%;"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
label="序号"
|
||||||
|
width="100"
|
||||||
|
align="center"
|
||||||
|
prop="certificateNo"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ (pageIndex - 1) * pageSize + scope.$index + 1 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
prop="title"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
width="140"
|
||||||
|
label="积分类型"
|
||||||
|
><template slot-scope="scope">
|
||||||
|
<span>{{ getPointsType(scope.row.actType) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="changeAmount"
|
||||||
|
width="140"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="积分"
|
||||||
|
><template slot-scope="scope">
|
||||||
|
<span :style="`color:${scope.row.changeAmount < 0 ? 'red' : ''}`">{{
|
||||||
|
scope.row.changeAmount
|
||||||
|
}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="remark"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="描述"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<!-- <el-table-column
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="课程图"
|
||||||
|
width="140"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<img
|
||||||
|
v-if="scope.row.image != ''"
|
||||||
|
:src="scope.row.image"
|
||||||
|
width="25"
|
||||||
|
height="35"
|
||||||
|
class="tableImg"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
prop="createTime"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
width="180"
|
||||||
|
label="创建日期"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
fixed="right"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
width="100"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<!-- <el-button
|
||||||
|
type="danger"
|
||||||
|
@click="dataFormDelete(scope.row)"
|
||||||
|
plain
|
||||||
|
size="mini"
|
||||||
|
>删除</el-button
|
||||||
|
> -->
|
||||||
|
<el-button
|
||||||
|
@click="handleClickDetail(scope.row)"
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
v-if="scope.row.orderSn"
|
||||||
|
>订单详情</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination
|
||||||
|
@size-change="sizeChangeHandle"
|
||||||
|
@current-change="currentChangeHandle"
|
||||||
|
:current-page="pageIndex"
|
||||||
|
:page-sizes="[50, 100, 200]"
|
||||||
|
:page-size="pageSize"
|
||||||
|
:total="total"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
|
</el-pagination>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="充值湖分"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="youVisible"
|
||||||
|
append-to-body
|
||||||
|
width="60%"
|
||||||
|
@close="dialogClose"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
style="width:100%"
|
||||||
|
:model="youForm"
|
||||||
|
label-width="100px"
|
||||||
|
ref="youForm"
|
||||||
|
:rules="youFormRule"
|
||||||
|
>
|
||||||
|
<el-form-item label="用户">
|
||||||
|
{{ user.tel }} <span v-if="user.name != ''">{{ user.name }}</span>
|
||||||
|
<span v-if="user.vip == 0">普通用户</span>
|
||||||
|
<span v-else-if="user.vip == 2">(吴门医述VIP)</span>
|
||||||
|
<span v-else-if="user.vip == 1">(超级VIP)</span>
|
||||||
|
<span v-else-if="user.vip == 3">(众妙之门VIP)</span>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="充值原因:" prop="come" style="width: 400px">
|
||||||
|
<el-input
|
||||||
|
v-model="youForm.come"
|
||||||
|
type="textarea"
|
||||||
|
:rows="2"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogClose">取消</el-button>
|
||||||
|
<el-button @click="submit" type="primary">确认开通</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
<addCertificate
|
||||||
|
@refresh="
|
||||||
|
pageIndex = 1;
|
||||||
|
getDataList();
|
||||||
|
"
|
||||||
|
ref="addCertificate"
|
||||||
|
:data="addCertificateForm"
|
||||||
|
pageType="user"
|
||||||
|
:dataInfo="user"
|
||||||
|
></addCertificate>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="充/扣积分明细"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="memoryDetail"
|
||||||
|
append-to-body
|
||||||
|
width="80%"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
充/扣主题:<span>{{ mdetail.remark }}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
操作时间:<span>{{ mdetail.createTime }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
积分:
|
||||||
|
<span :style="`color:${mdetail.changeAmount < 0 ? 'red' : ''}`">{{
|
||||||
|
mdetail.changeAmount
|
||||||
|
}}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
订单详情:<buyorderdetail
|
||||||
|
v-if="memoryDetail"
|
||||||
|
ref="buyorderdetail"
|
||||||
|
:orderSn="mdetail.orderSn"
|
||||||
|
pageType="user"
|
||||||
|
></buyorderdetail>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="closeDia">关 闭</el-button>
|
||||||
|
<!-- <el-button type="primary" @click="huaSheng">确 定</el-button> -->
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import debounce from "lodash/debounce"; //导入lodash中的debounce
|
||||||
|
import addCertificate from "./addJf.vue";
|
||||||
|
import buyorderdetail from "@/views/modules/order/buyorderdetail";
|
||||||
|
// import AddOrUpdate from './user-add-or-update'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
mdetail: {},
|
||||||
|
cateOptions: [],
|
||||||
|
actType: "",
|
||||||
|
dataForm: {
|
||||||
|
key: "",
|
||||||
|
expire: "",
|
||||||
|
userInfo: ""
|
||||||
|
},
|
||||||
|
statusOptions: [
|
||||||
|
{
|
||||||
|
value: "0",
|
||||||
|
label: "有效"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "-1",
|
||||||
|
label: "已过期"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
userId: this.$route.query.id,
|
||||||
|
user: {},
|
||||||
|
pointFormRules: {
|
||||||
|
pointAmount: [
|
||||||
|
{ required: true, message: "请输入金额", trigger: "blur" }
|
||||||
|
],
|
||||||
|
pointType: {
|
||||||
|
required: true,
|
||||||
|
message: "请选择操作类型",
|
||||||
|
trigger: "blur"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
youFormRule: {
|
||||||
|
catalogueId: [
|
||||||
|
{ required: true, message: "请选择开通的分部", trigger: "blur" }
|
||||||
|
],
|
||||||
|
days: [{ required: true, message: "请选择开通时长", trigger: "blur" }]
|
||||||
|
},
|
||||||
|
options: [],
|
||||||
|
memoryDetail: false,
|
||||||
|
timeOptions: [
|
||||||
|
// 开通时长
|
||||||
|
{
|
||||||
|
value: "30",
|
||||||
|
label: "30天"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "60",
|
||||||
|
label: "60天"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "90",
|
||||||
|
label: "90天"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "120",
|
||||||
|
label: "120天"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "150",
|
||||||
|
label: "150天"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "180",
|
||||||
|
label: "180天"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "365",
|
||||||
|
label: "365天"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "730",
|
||||||
|
label: "730天"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
dataList: [],
|
||||||
|
pageIndex: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
totalPage: 0,
|
||||||
|
total: 0,
|
||||||
|
totalLaoding: false,
|
||||||
|
dataListLoading: false,
|
||||||
|
dataListSelections: [],
|
||||||
|
|
||||||
|
youVisible: false,
|
||||||
|
linshiids: [],
|
||||||
|
|
||||||
|
youForm: {
|
||||||
|
courseId: null,
|
||||||
|
cate: [],
|
||||||
|
catalogueId: "",
|
||||||
|
days: "",
|
||||||
|
come: "" //管理员开通(原因)
|
||||||
|
},
|
||||||
|
linshilist: [
|
||||||
|
{
|
||||||
|
title: "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "2"
|
||||||
|
},
|
||||||
|
{ title: "3" }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
addCertificate,
|
||||||
|
buyorderdetail
|
||||||
|
|
||||||
|
// AddOrUpdate
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.userId = this.$route.query.id;
|
||||||
|
console.log(this.$route.query);
|
||||||
|
console.log(this.userId, "onsole.log(this.$route.query)");
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
this.userId = this.$route.query.id;
|
||||||
|
this.init();
|
||||||
|
// this.getDataList()
|
||||||
|
// this.getcourpeList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async handleClickDetail(row) {
|
||||||
|
console.log("row at line 375:", row);
|
||||||
|
this.memoryDetail = true;
|
||||||
|
this.mdetail = row;
|
||||||
|
// master/jfTransactionDetails/getJfTransactionDetailsById
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.buyorderdetail.init();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getPointsType(type) {
|
||||||
|
var str = "";
|
||||||
|
//在线教学 01 学术期刊 03 太湖讲堂 05 创作技术 07 注册邀请 11 课程邀请 13
|
||||||
|
switch (type) {
|
||||||
|
case 0:
|
||||||
|
return "充值积分";
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
return "扣除积分";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dataFormDelete: debounce(async function(row, deleteType) {
|
||||||
|
console.log("row at line 515:", row);
|
||||||
|
this.$confirm(
|
||||||
|
`确定要删除${deleteType != "all" ? "该" : "所有"}湖分嘛?`,
|
||||||
|
"提示",
|
||||||
|
{
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(async () => {
|
||||||
|
// var lableIds = row[0].bookLabelId;
|
||||||
|
var productIds = row.id;
|
||||||
|
|
||||||
|
await this.$http
|
||||||
|
.request({
|
||||||
|
url: this.$http.adornUrl(
|
||||||
|
`/master/userContribution/delUserContribution`
|
||||||
|
),
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
id: productIds
|
||||||
|
// marketId: this.addForm.id
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
//默认 无 说明:请求头
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(async ({ data }) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
} else {
|
||||||
|
this.$message.error(data.msg);
|
||||||
|
}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
// this.$refs.commonShop.selectShopArr = [];
|
||||||
|
this.getDataList();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
}, 200),
|
||||||
|
getCateList() {
|
||||||
|
// this.$http({
|
||||||
|
// url: this.$http.adornUrl(
|
||||||
|
// "/master/userCertificate/userCertificateLabelList"
|
||||||
|
// ),
|
||||||
|
// method: "post",
|
||||||
|
// data: this.$http.adornData({})
|
||||||
|
// }).then(({ data }) => {
|
||||||
|
// if (data && data.code === 0) {
|
||||||
|
this.cateOptions = [
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: "充值积分"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: "扣除积分"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
// } else {
|
||||||
|
// this.cateOptions = [];
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (data.code !== 0) return this.$message.error(data.msg);
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
delay(val) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addCertificate.init("edit", { val });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
delaySubmit(data) {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("/master/userCourseBuy/delayUserCourseBuy"),
|
||||||
|
method: "post",
|
||||||
|
data: this.$http.adornData(data)
|
||||||
|
})
|
||||||
|
.then(({ data }) => {
|
||||||
|
if (data && data.code == 0) {
|
||||||
|
this.$message.success("操作成功!");
|
||||||
|
this.getDataList();
|
||||||
|
} else {
|
||||||
|
this.$message.error("操作失败!");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
this.$message.error(err.msg);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
submit() {
|
||||||
|
console.log(this.youForm, "youForm");
|
||||||
|
this.youForm.catalogueId = this.linshiids.join(",");
|
||||||
|
this.$refs["youForm"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
let data = {
|
||||||
|
userId: this.userId,
|
||||||
|
...this.youForm
|
||||||
|
};
|
||||||
|
delete data.cate;
|
||||||
|
console.log("data", data);
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(
|
||||||
|
"/master/userCourseBuy/insertUserCourseBuy"
|
||||||
|
),
|
||||||
|
method: "post",
|
||||||
|
data: this.$http.adornData(data)
|
||||||
|
})
|
||||||
|
.then(({ data }) => {
|
||||||
|
if (data.code !== 0) return this.$message.error(data.msg);
|
||||||
|
this.$message.success("开课成功!");
|
||||||
|
this.getDataList();
|
||||||
|
this.dialogClose();
|
||||||
|
})
|
||||||
|
.catch(e => {
|
||||||
|
console.log("表单提交报错");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
dialogClose() {
|
||||||
|
this.youVisible = false;
|
||||||
|
this.linshiids = [];
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.youForm.cate = [];
|
||||||
|
this.options = [];
|
||||||
|
|
||||||
|
this.$refs["youForm"].resetFields();
|
||||||
|
console.log(this.youForm, "youForm");
|
||||||
|
});
|
||||||
|
console.log(this.youForm, "youForm");
|
||||||
|
},
|
||||||
|
selectChange(val) {
|
||||||
|
console.log("options", this.options);
|
||||||
|
this.getCate(val);
|
||||||
|
},
|
||||||
|
remoteMethod(query) {
|
||||||
|
console.log(query, "query", this.youForm.key);
|
||||||
|
// return false
|
||||||
|
if (this.youForm.key !== "") {
|
||||||
|
let data = {
|
||||||
|
// page: this.pageIndex,
|
||||||
|
// limit: this.pageSize,
|
||||||
|
title: query //关键字
|
||||||
|
// medicalId: "",
|
||||||
|
// sociologyId: "",
|
||||||
|
// type: 0
|
||||||
|
};
|
||||||
|
this.totalLaoding = true;
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("/master/userManage/courseAndChildrenList"),
|
||||||
|
method: "post",
|
||||||
|
data: this.$http.adornData(data)
|
||||||
|
}).then(({ data }) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.options = data.list;
|
||||||
|
} else {
|
||||||
|
this.options = [];
|
||||||
|
}
|
||||||
|
this.totalLaoding = false;
|
||||||
|
if (data.code !== 0) return this.$message.error(data.msg);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.options = [];
|
||||||
|
this.totalLaoding = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showAddD() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addCertificate.init("add", {});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
init() {
|
||||||
|
this.getCateList();
|
||||||
|
// if (!this.userId) {
|
||||||
|
// setTimeout(() => {
|
||||||
|
// this.init();
|
||||||
|
// }, 1000);
|
||||||
|
// }
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(`/book/user/info/${this.userId}`),
|
||||||
|
method: "get",
|
||||||
|
params: this.$http.adornParams()
|
||||||
|
}).then(({ data }) => {
|
||||||
|
if (data && data.code !== 0) return this.$message.error(data.msg);
|
||||||
|
|
||||||
|
this.user = data.user;
|
||||||
|
this.getDataList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 获取数据列表
|
||||||
|
getDataList() {
|
||||||
|
this.dataListLoading = true;
|
||||||
|
this.$http({
|
||||||
|
// url: this.$http.adornUrl('/book/user/list'),
|
||||||
|
url: this.$http.adornUrl("/master/jfTransactionDetails/listByPage"),
|
||||||
|
method: "post",
|
||||||
|
data: this.$http.adornData({
|
||||||
|
current: this.pageIndex,
|
||||||
|
limit: this.pageSize,
|
||||||
|
userId: this.userId, //用户id
|
||||||
|
userName: "",
|
||||||
|
// "userId": "",
|
||||||
|
tel: "",
|
||||||
|
email: "",
|
||||||
|
actType: this.actType //课程名
|
||||||
|
})
|
||||||
|
}).then(({ data }) => {
|
||||||
|
if (data && data.code !== 0) return this.$message.error(data.msg);
|
||||||
|
console.log(data, "data");
|
||||||
|
this.dataList = data.result.records;
|
||||||
|
this.totalPage = data.result.pages;
|
||||||
|
this.total = data.result.total;
|
||||||
|
this.dataListLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 每页数
|
||||||
|
sizeChangeHandle(val) {
|
||||||
|
this.pageSize = val;
|
||||||
|
this.pageIndex = 1;
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
// 当前页
|
||||||
|
currentChangeHandle(val) {
|
||||||
|
this.pageIndex = val;
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
// // 多选
|
||||||
|
// selectionChangeHandle(val) {
|
||||||
|
// this.dataListSelections = val
|
||||||
|
// },
|
||||||
|
// 新增 / 修改
|
||||||
|
closeDia() {
|
||||||
|
this.adc = false;
|
||||||
|
this.$refs.pointForm.resetFields();
|
||||||
|
// this.pointForm.pointType == 0
|
||||||
|
},
|
||||||
|
getCate(id) {
|
||||||
|
this.linshiids = [];
|
||||||
|
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("/master/userManage/catalogueListByCourse"),
|
||||||
|
method: "post",
|
||||||
|
data: this.$http.adornData({
|
||||||
|
courseId: id
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.then(({ data }) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
console.log("data", "data++++++++++++++++++++");
|
||||||
|
this.youForm.cate = data.list;
|
||||||
|
// this.youForm.cate
|
||||||
|
} else {
|
||||||
|
this.youForm.cate = [];
|
||||||
|
this.linshiids = [];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(e => {
|
||||||
|
console.log("数据报错");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
/deep/ .width100 .el-input__inner {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.flexbox {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.userInfo {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.userInfo * {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -9,23 +9,50 @@
|
|||||||
<el-button @click="getDataList()">查询</el-button>
|
<el-button @click="getDataList()">查询</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form> -->
|
</el-form> -->
|
||||||
<div style="margin:15px 0;font-weight:bold">当前用户:{{userName}} / {{query.tel}}</div>
|
<div style="margin:15px 0;font-weight:bold">
|
||||||
<el-table :data="dataList" border v-loading="dataListLoading" style="width: 100%;">
|
当前用户:{{ userName }} / {{ query.tel }}
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
:data="dataList"
|
||||||
|
border
|
||||||
|
v-loading="dataListLoading"
|
||||||
|
style="width: 100%;"
|
||||||
|
>
|
||||||
<!-- <el-table-column type="selection" header-align="center" align="center" width="50">
|
<!-- <el-table-column type="selection" header-align="center" align="center" width="50">
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column prop="createTime" sortable header-align="center" align="center" label="操作时间">
|
<el-table-column
|
||||||
|
prop="createTime"
|
||||||
|
sortable
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="操作时间"
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column prop="userName" header-align="center" align="center" label="用户">
|
<!-- <el-table-column prop="userName" header-align="center" align="center" label="用户">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column prop="orderType" header-align="center" align="center" label="充值 支付 赠送优惠券.....">
|
<el-table-column
|
||||||
|
prop="orderType"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="充值 支付 赠送优惠券....."
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="changeAmount" header-align="center" align="center" label="变动金额">
|
<el-table-column
|
||||||
|
prop="changeAmount"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="变动金额"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.changeAmount > 0" style="color: red;">{{scope.row.changeAmount}}</span>
|
<span v-if="scope.row.changeAmount > 0" style="color: red;">{{
|
||||||
<span v-if="scope.row.changeAmount < 0" style="color: #54a966;">{{scope.row.changeAmount}}</span>
|
scope.row.changeAmount
|
||||||
|
}}</span>
|
||||||
|
<span v-if="scope.row.changeAmount < 0" style="color: #54a966;">{{
|
||||||
|
scope.row.changeAmount
|
||||||
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column
|
<!-- <el-table-column
|
||||||
@@ -34,51 +61,85 @@
|
|||||||
align="center"
|
align="center"
|
||||||
label="关联id">
|
label="关联id">
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column prop="note" header-align="center" align="center" label="说明">
|
<el-table-column
|
||||||
|
prop="note"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="说明"
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="remark" header-align="center" align="center" label="备注">
|
<el-table-column
|
||||||
|
prop="remark"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="备注"
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="userBalance" header-align="center" align="center" label="余额">
|
<el-table-column
|
||||||
|
prop="userBalance"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="余额"
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
<el-table-column
|
||||||
|
fixed="right"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
width="150"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row)">明细</el-button>
|
<el-button
|
||||||
|
v-if="scope.row.remark.includes('订单编号为')"
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
@click="addOrUpdateHandle(scope.row)"
|
||||||
|
>订单详情</el-button
|
||||||
|
>
|
||||||
<!-- <el-button type="text" size="small" @click="deleteHandle(scope.row.transactionId)">删除</el-button> -->
|
<!-- <el-button type="text" size="small" @click="deleteHandle(scope.row.transactionId)">删除</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex"
|
<el-pagination
|
||||||
:page-sizes="[10, 20, 50, 100]" :page-size="pageSize" :total="totalPage"
|
@size-change="sizeChangeHandle"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
@current-change="currentChangeHandle"
|
||||||
|
:current-page="pageIndex"
|
||||||
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
|
:page-size="pageSize"
|
||||||
|
:total="totalPage"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<el-dialog title="充/扣天医币明细" :close-on-click-modal="false" :visible.sync="memoryDetail" append-to-body width="30%">
|
<el-dialog
|
||||||
<el-form :model="mdetail" label-width="100px" ref="pointForm">
|
title="充/扣积分明细"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="memoryDetail"
|
||||||
|
append-to-body
|
||||||
|
width="80%"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
充/扣主题:<span>{{ mdetail.remark }}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
操作时间:<span>{{ mdetail.createTime }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-form-item label="充/扣主题:">
|
<div>
|
||||||
<!-- <el-input v-model="pointForm.remark"></el-input> -->
|
积分:
|
||||||
<span>{{mdetail.remark}}</span>
|
<span :style="`color:${mdetail.changeAmount < 0 ? 'red' : ''}`">{{
|
||||||
</el-form-item>
|
mdetail.changeAmount
|
||||||
<el-form-item label="操作时间:">
|
}}</span>
|
||||||
<!-- <el-input v-model="pointForm.remark"></el-input> -->
|
</div>
|
||||||
<span>{{mdetail.createTime}}</span>
|
<div>
|
||||||
</el-form-item>
|
订单详情:<buyorderdetail
|
||||||
<el-form-item label="充值类型:">
|
v-if="memoryDetail"
|
||||||
<el-tag type="danger" v-if="mdetail.changeAmount > 0">充值天医币</el-tag>
|
ref="buyorderdetail"
|
||||||
<el-tag type="success" v-else>扣除天医币</el-tag>
|
:orderSn="mdetail.orderSn"
|
||||||
</el-form-item>
|
pageType="user"
|
||||||
<el-form-item label="金额:">
|
></buyorderdetail>
|
||||||
<!-- <el-input-number v-model="mdetail.pointAmount" :placeholder="mdetail.peanutCoin+'可用'">
|
</div>
|
||||||
</el-input-number> -->
|
|
||||||
<span>{{mdetail.changeAmount}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="充扣明细:">
|
|
||||||
<span>{{mdetail.note}}</span>
|
|
||||||
<!-- <el-input type="textarea" rows="5" v-model="mdetail.note" placeholder="操作说明">
|
|
||||||
</el-input> -->
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="closeDia">关 闭</el-button>
|
<el-button @click="closeDia">关 闭</el-button>
|
||||||
<!-- <el-button type="primary" @click="huaSheng">确 定</el-button> -->
|
<!-- <el-button type="primary" @click="huaSheng">确 定</el-button> -->
|
||||||
@@ -88,147 +149,161 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import buyorderdetail from "@/views/modules/order/buyorderdetail";
|
||||||
memoryUsage
|
import { memoryUsage } from "process";
|
||||||
} from 'process';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dataForm: {
|
dataForm: {
|
||||||
key: ''
|
key: ""
|
||||||
|
},
|
||||||
|
memoryDetail: false,
|
||||||
|
headers: [
|
||||||
|
{
|
||||||
|
prop: "remark",
|
||||||
|
label: "充/扣主题"
|
||||||
},
|
},
|
||||||
memoryDetail: false,
|
{
|
||||||
headers: [{
|
prop: "createTime",
|
||||||
prop: 'remark',
|
label: "操作时间"
|
||||||
label: '充/扣主题',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'createTime',
|
|
||||||
label: '操作时间',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'changeAmount',
|
|
||||||
label: '充值类型',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'changeAmount',
|
|
||||||
label: '充值类型',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
query: {
|
|
||||||
id: 0,
|
|
||||||
tel: ''
|
|
||||||
},
|
},
|
||||||
mdetail: {}, //
|
{
|
||||||
dataListLoading: false,
|
prop: "changeAmount",
|
||||||
dataList: [],
|
label: "充值类型"
|
||||||
pageIndex: 1,
|
},
|
||||||
pageSize: 20,
|
{
|
||||||
totalPage: 0,
|
prop: "changeAmount",
|
||||||
userName:'',
|
label: "充值类型"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
query: {
|
||||||
|
id: 0,
|
||||||
|
tel: ""
|
||||||
|
},
|
||||||
|
mdetail: {}, //
|
||||||
|
dataListLoading: false,
|
||||||
|
dataList: [],
|
||||||
|
pageIndex: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
totalPage: 0,
|
||||||
|
userName: ""
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// this.getDataList()
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
this.query.id = this.$route.query.id;
|
||||||
|
this.query.tel = this.$route.query.tel;
|
||||||
|
this.userName = this.$route.query.userName;
|
||||||
|
|
||||||
|
// console.log(this.$route.query.orderId)
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
buyorderdetail
|
||||||
|
|
||||||
|
// AddOrUpdate
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
closeDia() {
|
||||||
|
this.memoryDetail = false;
|
||||||
|
this.mdetail = {};
|
||||||
|
},
|
||||||
|
huaSheng() {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(
|
||||||
|
`/book/user/pointChange?¬e=${this.mdetail.note}&id=${this.mdetail.id}`
|
||||||
|
),
|
||||||
|
method: "get",
|
||||||
|
params: this.$http.adornParams()
|
||||||
|
}).then(({ data }) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.$message.success("操作成功");
|
||||||
|
this.getDataList();
|
||||||
|
this.closeDia();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 获取数据列表
|
||||||
|
getDataList() {
|
||||||
|
this.dataListLoading = true;
|
||||||
|
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("/book/transactiondetails/getTransactionList"),
|
||||||
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
|
data: {
|
||||||
|
page: this.pageIndex,
|
||||||
|
|
||||||
|
limit: this.pageSize,
|
||||||
|
|
||||||
|
userId: this.query.id
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
//默认 无 说明:请求头
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
this.dataList = res.data.page.records;
|
||||||
|
this.totalPage = res.data.page.total;
|
||||||
|
this.dataListLoading = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// this.$http({
|
||||||
|
// url: this.$http.adornUrl('/book/transactiondetails/getTransactionList'),
|
||||||
|
// method: 'post',
|
||||||
|
// params: this.$http.adornParams({
|
||||||
|
// 'page': 1,
|
||||||
|
// 'limit': 200,
|
||||||
|
// 'userId': this.query.id
|
||||||
|
// })
|
||||||
|
// }).then(({
|
||||||
|
// data
|
||||||
|
// }) => {
|
||||||
|
// if (data && data.code === 0) {
|
||||||
|
// this.dataList = data.page.list
|
||||||
|
// this.totalPage = data.page.totalCount
|
||||||
|
// this.dataListLoading = false
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
},
|
||||||
|
// 新增 / 修改
|
||||||
|
addOrUpdateHandle(row) {
|
||||||
|
const regex = /订单编号为\s*-\s*(\d+)/; // 正则表达式提取数字部分
|
||||||
|
const match = row.remark.match(regex);
|
||||||
|
|
||||||
|
if (match) {
|
||||||
|
const orderSn = match[1]; // match[1] 是捕获的数字部分
|
||||||
|
this.mdetail = row;
|
||||||
|
this.mdetail.orderSn = orderSn;
|
||||||
|
this.memoryDetail = true;
|
||||||
|
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.buyorderdetail.init();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
// 每页数
|
||||||
// this.getDataList()
|
sizeChangeHandle(val) {
|
||||||
|
this.pageSize = val;
|
||||||
|
this.pageIndex = 1;
|
||||||
|
this.getDataList();
|
||||||
},
|
},
|
||||||
activated() {
|
// 当前页
|
||||||
this.query.id = this.$route.query.id;
|
currentChangeHandle(val) {
|
||||||
this.query.tel = this.$route.query.tel;
|
this.pageIndex = val;
|
||||||
this.userName = this.$route.query.userName
|
this.getDataList();
|
||||||
|
|
||||||
// console.log(this.$route.query.orderId)
|
|
||||||
this.getDataList()
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
closeDia() {
|
|
||||||
this.memoryDetail = false
|
|
||||||
this.mdetail = {}
|
|
||||||
},
|
|
||||||
huaSheng() {
|
|
||||||
this.$http({
|
|
||||||
url: this.$http.adornUrl(`/book/user/pointChange?¬e=${this.mdetail.note}&id=${this.mdetail.id}`),
|
|
||||||
method: 'get',
|
|
||||||
params: this.$http.adornParams()
|
|
||||||
}).then(({
|
|
||||||
data
|
|
||||||
}) => {
|
|
||||||
if (data && data.code === 0) {
|
|
||||||
this.$message.success('操作成功')
|
|
||||||
this.getDataList()
|
|
||||||
this.closeDia()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 获取数据列表
|
|
||||||
getDataList() {
|
|
||||||
this.dataListLoading = true
|
|
||||||
|
|
||||||
this.$http({
|
|
||||||
url: this.$http.adornUrl('/book/transactiondetails/getTransactionList'),
|
|
||||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
|
||||||
data: {
|
|
||||||
'page': this.pageIndex,
|
|
||||||
|
|
||||||
'limit': this.pageSize,
|
|
||||||
|
|
||||||
'userId': this.query.id
|
|
||||||
},
|
|
||||||
header: { //默认 无 说明:请求头
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
},
|
|
||||||
}).then(res => {
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
this.dataList = res.data.page.records
|
|
||||||
this.totalPage = res.data.page.total
|
|
||||||
this.dataListLoading = false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// this.$http({
|
|
||||||
// url: this.$http.adornUrl('/book/transactiondetails/getTransactionList'),
|
|
||||||
// method: 'post',
|
|
||||||
// params: this.$http.adornParams({
|
|
||||||
// 'page': 1,
|
|
||||||
// 'limit': 200,
|
|
||||||
// 'userId': this.query.id
|
|
||||||
// })
|
|
||||||
// }).then(({
|
|
||||||
// data
|
|
||||||
// }) => {
|
|
||||||
// if (data && data.code === 0) {
|
|
||||||
// this.dataList = data.page.list
|
|
||||||
// this.totalPage = data.page.totalCount
|
|
||||||
// this.dataListLoading = false
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
},
|
|
||||||
// 新增 / 修改
|
|
||||||
addOrUpdateHandle(row) {
|
|
||||||
this.memoryDetail = true
|
|
||||||
this.mdetail = row
|
|
||||||
},
|
|
||||||
// 每页数
|
|
||||||
sizeChangeHandle(val) {
|
|
||||||
this.pageSize = val
|
|
||||||
this.pageIndex = 1
|
|
||||||
this.getDataList()
|
|
||||||
},
|
|
||||||
// 当前页
|
|
||||||
currentChangeHandle(val) {
|
|
||||||
this.pageIndex = val
|
|
||||||
this.getDataList()
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
/deep/ .el-form-item {
|
/deep/ .el-form-item {
|
||||||
margin-bottom: 1px solid #eee;
|
margin-bottom: 1px solid #eee;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -214,6 +214,42 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="peanutCoin"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
min-width="80"
|
||||||
|
label="积分"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div><router-link
|
||||||
|
:to="{
|
||||||
|
path: 'user-point-jf',
|
||||||
|
query: {
|
||||||
|
tel: scope.row.tel,
|
||||||
|
id: scope.row.id,
|
||||||
|
userName: scope.row.nickname
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
style="text-decoration: underline;font-weight: bold;color: #3983ff;"
|
||||||
|
>
|
||||||
|
{{ scope.row.jf }}
|
||||||
|
</span>
|
||||||
|
</router-link></div>
|
||||||
|
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
style="color: #3983ff;padding: 0;position: absolute;top: 4px;right: 0px;"
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
@click="handleJF(scope.row)"
|
||||||
|
>
|
||||||
|
【充/扣】
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="peanutCoin"
|
prop="peanutCoin"
|
||||||
header-align="center"
|
header-align="center"
|
||||||
@@ -243,6 +279,7 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="peanutCoin"
|
prop="peanutCoin"
|
||||||
header-align="center"
|
header-align="center"
|
||||||
@@ -518,6 +555,12 @@
|
|||||||
pageType="user"
|
pageType="user"
|
||||||
:dataInfo="currentuserInfo"
|
:dataInfo="currentuserInfo"
|
||||||
></addCertificate>
|
></addCertificate>
|
||||||
|
<addJF
|
||||||
|
@refresh="getDataList()"
|
||||||
|
ref="addJF"
|
||||||
|
pageType="user"
|
||||||
|
:dataInfo="currentuserInfo"
|
||||||
|
></addJF>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -525,7 +568,8 @@
|
|||||||
import userCouponList from "../coupon/userCouponList";
|
import userCouponList from "../coupon/userCouponList";
|
||||||
import OpenVip from "./user-open-vip";
|
import OpenVip from "./user-open-vip";
|
||||||
import AddOrUpdate from "./user-add-or-update";
|
import AddOrUpdate from "./user-add-or-update";
|
||||||
import addCertificate from "./addPoints.vue";
|
import addCertificate from "@/views/modules/points/addPoints.vue";
|
||||||
|
import addJF from "./addJf.vue";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -581,6 +625,7 @@ export default {
|
|||||||
AddOrUpdate,
|
AddOrUpdate,
|
||||||
userCouponList,
|
userCouponList,
|
||||||
addCertificate,
|
addCertificate,
|
||||||
|
addJF,
|
||||||
OpenVip
|
OpenVip
|
||||||
},
|
},
|
||||||
activated() {
|
activated() {
|
||||||
@@ -833,6 +878,12 @@ export default {
|
|||||||
this.$refs.addCertificate.init("add", {});
|
this.$refs.addCertificate.init("add", {});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleJF(val) {
|
||||||
|
this.currentuserInfo = val;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addJF.init("add", {});
|
||||||
|
});
|
||||||
|
},
|
||||||
huaSheng(point) {
|
huaSheng(point) {
|
||||||
// console.log(this.pointForm.pointAmount, point)
|
// console.log(this.pointForm.pointAmount, point)
|
||||||
if (this.pointForm.pointAmount > point && this.pointForm.pointType == 1) {
|
if (this.pointForm.pointAmount > point && this.pointForm.pointType == 1) {
|
||||||
|
|||||||
@@ -239,7 +239,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import debounce from "lodash/debounce"; //导入lodash中的debounce
|
import debounce from "lodash/debounce"; //导入lodash中的debounce
|
||||||
import addCertificate from "./addPoints.vue";
|
import addCertificate from "@/views/modules/points/addPoints.vue";
|
||||||
// import AddOrUpdate from './user-add-or-update'
|
// import AddOrUpdate from './user-add-or-update'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
Reference in New Issue
Block a user