添加套餐管理和套餐审核管理
This commit is contained in:
2
dist/index.html
vendored
2
dist/index.html
vendored
@ -1 +1 @@
|
||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta http-equiv=Content-Security-Policy content=upgrade-insecure-requests><title>秀湖网球中心</title><link rel="shortcut icon" href=static/imgs/favicon.ico><link rel=stylesheet type=text/css href=static/css/common.css><link rel=stylesheet type=text/css href=static/css/app.css><script src=./static/UE/ueditor.config.js type=text/javascript charset=utf-8></script><script src=./static/UE/ueditor.all.js type=text/javascript charset=utf-8></script><script src=./static/UE/lang/zh-cn/zh-cn.js type=text/javascript charset=utf-8></script><script src=./static/UE/ueditor.parse.min.js type=text/javascript charset=utf-8></script><link href=/shop/static/css/app.291458b990fd629f40393e294d84fcfe.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/shop/static/js/manifest.3103172e847482f429bc.js></script><script type=text/javascript src=/shop/static/js/vendor.27b25b4279ee559ca3a8.js></script><script type=text/javascript src=/shop/static/js/app.46ce7302cbb9175f1a74.js></script></body></html>
|
||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta http-equiv=Content-Security-Policy content=upgrade-insecure-requests><title>秀湖网球中心</title><link rel="shortcut icon" href=static/imgs/favicon.ico><link rel=stylesheet type=text/css href=static/css/common.css><link rel=stylesheet type=text/css href=static/css/app.css><script src=./static/UE/ueditor.config.js type=text/javascript charset=utf-8></script><script src=./static/UE/ueditor.all.js type=text/javascript charset=utf-8></script><script src=./static/UE/lang/zh-cn/zh-cn.js type=text/javascript charset=utf-8></script><script src=./static/UE/ueditor.parse.min.js type=text/javascript charset=utf-8></script><link href=/shop/static/css/app.291458b990fd629f40393e294d84fcfe.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/shop/static/js/manifest.3103172e847482f429bc.js></script><script type=text/javascript src=/shop/static/js/vendor.27b25b4279ee559ca3a8.js></script><script type=text/javascript src=/shop/static/js/app.1ecb9c434566cf4e366b.js></script></body></html>
|
||||
2
dist/static/js/app.1ecb9c434566cf4e366b.js
vendored
Normal file
2
dist/static/js/app.1ecb9c434566cf4e366b.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/static/js/app.1ecb9c434566cf4e366b.js.map
vendored
Normal file
1
dist/static/js/app.1ecb9c434566cf4e366b.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/static/js/app.46ce7302cbb9175f1a74.js
vendored
2
dist/static/js/app.46ce7302cbb9175f1a74.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
{"version":3,"sources":["webpack:///webpack/bootstrap f312cabbe10cd096ad8d"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,SAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.3103172e847482f429bc.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/shop/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap f312cabbe10cd096ad8d"],"sourceRoot":""}
|
||||
{"version":3,"sources":["webpack:///webpack/bootstrap f22eedfd265f3f2702e8"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,SAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.3103172e847482f429bc.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/shop/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap f22eedfd265f3f2702e8"],"sourceRoot":""}
|
||||
35
src/api/combo.js
Normal file
35
src/api/combo.js
Normal file
@ -0,0 +1,35 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
let ComboApi = {
|
||||
/*套餐列表*/
|
||||
comboList(data, errorback) {
|
||||
return request._post('/shop/ground.group/groupList', data, errorback);
|
||||
},
|
||||
|
||||
// 添加套餐
|
||||
addGround(data, errorback) {
|
||||
return request._post('/shop/ground.group/add', data, errorback);
|
||||
},
|
||||
|
||||
// 编辑套餐
|
||||
editGround(data, errorback) {
|
||||
return request._post('/shop/ground.group/edit', data, errorback);
|
||||
},
|
||||
|
||||
// 套餐详情
|
||||
groundInfo(data, errorback) {
|
||||
return request._post('/shop/ground.group/groupDetail', data, errorback);
|
||||
},
|
||||
|
||||
// 审核列表
|
||||
reviewList(data, errorback) {
|
||||
return request._post('/shop/ground.group/dataList', data, errorback);
|
||||
},
|
||||
|
||||
// 审核操作
|
||||
reviewEdit(data, errorback) {
|
||||
return request._post('/shop/ground.group/updateStatus', data, errorback);
|
||||
}
|
||||
}
|
||||
|
||||
export default ComboApi;
|
||||
203
src/views/combo/combo/add.vue
Normal file
203
src/views/combo/combo/add.vue
Normal file
@ -0,0 +1,203 @@
|
||||
<template>
|
||||
<el-dialog title="添加套餐" :visible.sync="dialogVisible" @close="dialogFormVisible" :close-on-click-modal="false"
|
||||
:close-on-press-escape="false">
|
||||
<el-form size="small" :model="form" :rules="formRules" ref="form">
|
||||
<el-form-item label="套餐名称" prop="name" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.name" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="英文名称" prop="eg_name" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.eg_name" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="套餐图片" prop="image" :label-width="formLabelWidth">
|
||||
<el-row>
|
||||
<el-button type="primary" @click="openUpload">选择图片</el-button>
|
||||
<div v-if="form.image != ''" class="img">
|
||||
<img :src="file_path" width="100" height="100" />
|
||||
</div>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="套餐价格" prop="price" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.price" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="指导价" prop="month_price" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.month_price" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="权益说明" prop="content" :label-width="formLabelWidth">
|
||||
<div class="edit_container">
|
||||
<Uediter :text="form.content" :config="ueditor.config" ref="ue"
|
||||
@contentChange="contentChangeFunc"></Uediter>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible">取 消</el-button>
|
||||
<el-button type="primary" @click="addUser" :loading="loading">确 定</el-button>
|
||||
</div>
|
||||
<!--上传图片组件-->
|
||||
<Upload v-if="isupload" :isupload="isupload" :type="type" @returnImgs="returnImgsFunc">上传图片</Upload>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Upload from '@/components/file/Upload';
|
||||
import Uediter from '@/components/UE.vue';
|
||||
import ComboApi from '@/api/combo.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Upload,
|
||||
Uediter,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
/*富文本框配置*/
|
||||
ueditor: {
|
||||
text: '',
|
||||
config: {
|
||||
initialFrameWidth: 400,
|
||||
initialFrameHeight: 500,
|
||||
toolbars: [
|
||||
[
|
||||
'fullscreen', 'source', '|', 'undo', 'redo', '|',
|
||||
'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
|
||||
'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
|
||||
'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
|
||||
'directionalityltr', 'directionalityrtl', 'indent', '|',
|
||||
'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
|
||||
'link', 'unlink', 'anchor', '|',
|
||||
'emotion', 'map', 'insertframe', 'insertcode', 'pagebreak', 'template', 'background', '|',
|
||||
'horizontal', 'date', 'time', 'spechars', 'wordimage', '|',
|
||||
'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
|
||||
'print', 'preview', 'searchreplace', 'drafts', 'help'
|
||||
]
|
||||
]
|
||||
},
|
||||
},
|
||||
form: {
|
||||
name: '',
|
||||
eg_name: '',
|
||||
image: '',
|
||||
price: '',
|
||||
month_price: '',
|
||||
content: '',
|
||||
},
|
||||
formRules: {
|
||||
name: [{
|
||||
required: true,
|
||||
message: '请输入套餐名称',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
|
||||
eg_name: [{
|
||||
required: true,
|
||||
message: '请输入套餐英文名称',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
|
||||
image: [{
|
||||
required: true,
|
||||
message: '请上传套餐图片',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
|
||||
price: [{
|
||||
required: true,
|
||||
message: '请输入套餐价格',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
|
||||
month_price: [{
|
||||
required: true,
|
||||
message: '请输入指导价',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
|
||||
content: [{
|
||||
required: true,
|
||||
message: '请输入权益说明',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
},
|
||||
/*左边长度*/
|
||||
formLabelWidth: '120px',
|
||||
/*是否显示*/
|
||||
dialogVisible: false,
|
||||
loading: false,
|
||||
/*是否上传图片*/
|
||||
isupload: false,
|
||||
};
|
||||
},
|
||||
props: ['open_add', 'addform'],
|
||||
created() {
|
||||
this.dialogVisible = this.open_add;
|
||||
},
|
||||
methods: {
|
||||
/*添加场馆*/
|
||||
addUser() {
|
||||
let self = this;
|
||||
let params = self.form;
|
||||
|
||||
self.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
self.loading = true;
|
||||
ComboApi.addGround(params).then(data => {
|
||||
self.loading = false;
|
||||
self.$message({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
});
|
||||
self.dialogFormVisible(true);
|
||||
}).catch(error => {
|
||||
self.loading = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/*获取富文本内容*/
|
||||
contentChangeFunc(e){
|
||||
this.form.content = e;
|
||||
},
|
||||
|
||||
/*关闭弹窗*/
|
||||
dialogFormVisible(e) {
|
||||
if (e) {
|
||||
this.$emit('closeDialog', {
|
||||
type: 'success',
|
||||
openDialog: false
|
||||
})
|
||||
} else {
|
||||
this.$emit('closeDialog', {
|
||||
type: 'error',
|
||||
openDialog: false
|
||||
})
|
||||
}
|
||||
},
|
||||
/*上传*/
|
||||
openUpload(e) {
|
||||
this.type = e;
|
||||
this.isupload = true;
|
||||
},
|
||||
/*获取图片*/
|
||||
returnImgsFunc(e) {
|
||||
if (e != null && e.length > 0) {
|
||||
this.file_path = e[0].file_path;
|
||||
this.form.image = e[0].file_id;
|
||||
}
|
||||
this.isupload = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.img {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
217
src/views/combo/combo/edit.vue
Normal file
217
src/views/combo/combo/edit.vue
Normal file
@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<el-dialog title="修改场馆" :visible.sync="dialogVisible" @close="dialogFormVisible" :close-on-click-modal="false"
|
||||
:close-on-press-escape="false">
|
||||
<el-form size="small" :model="form" :rules="formRules" ref="form">
|
||||
<el-form-item label="套餐名称" prop="name" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.name" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="英文名称" prop="eg_name" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.eg_name" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="套餐图片" prop="image" :label-width="formLabelWidth">
|
||||
<el-row>
|
||||
<el-button type="primary" @click="openUpload">选择图片</el-button>
|
||||
<div v-if="form.image != ''" class="img">
|
||||
<img :src="file_path" width="100" height="100" />
|
||||
</div>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="套餐价格" prop="price" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.price" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="指导价" prop="month_price" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.month_price" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="权益说明" prop="content" :label-width="formLabelWidth">
|
||||
<div class="edit_container">
|
||||
<Uediter :text="form.content" :config="ueditor.config" ref="ue"
|
||||
@contentChange="contentChangeFunc"></Uediter>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible">取 消</el-button>
|
||||
<el-button type="primary" @click="addUser" :loading="loading">确 定</el-button>
|
||||
</div>
|
||||
<!--上传图片组件-->
|
||||
<Upload v-if="isupload" :isupload="isupload" :type="type" @returnImgs="returnImgsFunc">上传图片</Upload>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Upload from '@/components/file/Upload';
|
||||
import Uediter from '@/components/UE.vue';
|
||||
import VenueApi from '@/api/venue.js';
|
||||
import ComboApi from '@/api/combo.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Upload,
|
||||
Uediter,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
/*富文本框配置*/
|
||||
ueditor: {
|
||||
text: '',
|
||||
config: {
|
||||
initialFrameWidth: 400,
|
||||
initialFrameHeight: 500,
|
||||
toolbars: [
|
||||
[
|
||||
'fullscreen', 'source', '|', 'undo', 'redo', '|',
|
||||
'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
|
||||
'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
|
||||
'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
|
||||
'directionalityltr', 'directionalityrtl', 'indent', '|',
|
||||
'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
|
||||
'link', 'unlink', 'anchor', '|',
|
||||
'emotion', 'map', 'insertframe', 'insertcode', 'pagebreak', 'template', 'background', '|',
|
||||
'horizontal', 'date', 'time', 'spechars', 'wordimage', '|',
|
||||
'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
|
||||
'print', 'preview', 'searchreplace', 'drafts', 'help'
|
||||
]
|
||||
]
|
||||
},
|
||||
},
|
||||
form: {
|
||||
id: 0,
|
||||
name: '',
|
||||
eg_name: '',
|
||||
image: '',
|
||||
price: '',
|
||||
month_price: '',
|
||||
content: '',
|
||||
},
|
||||
file_path: '',
|
||||
formRules: {
|
||||
name: [{
|
||||
required: true,
|
||||
message: '请输入套餐名称',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
|
||||
eg_name: [{
|
||||
required: true,
|
||||
message: '请输入套餐英文名称',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
|
||||
image: [{
|
||||
required: true,
|
||||
message: '请上传套餐图片',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
|
||||
price: [{
|
||||
required: true,
|
||||
message: '请输入套餐价格',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
|
||||
month_price: [{
|
||||
required: true,
|
||||
message: '请输入指导价',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
|
||||
content: [{
|
||||
required: true,
|
||||
message: '请输入权益说明',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
},
|
||||
/*左边长度*/
|
||||
formLabelWidth: '120px',
|
||||
/*是否显示*/
|
||||
dialogVisible: false,
|
||||
loading: false,
|
||||
/*是否上传图片*/
|
||||
isupload: false,
|
||||
};
|
||||
},
|
||||
props: ['open_edit', 'editform'],
|
||||
created() {
|
||||
this.dialogVisible = this.open_edit;
|
||||
console.log(this.editform);
|
||||
this.form.id = this.editform.id;
|
||||
this.form.name = this.editform.name;
|
||||
this.form.eg_name = this.editform.eg_name;
|
||||
this.form.image = this.editform.image;
|
||||
this.form.price = this.editform.price;
|
||||
this.form.content = this.editform.content;
|
||||
this.form.month_price = this.editform.month_price;
|
||||
this.file_path = this.editform.img;
|
||||
},
|
||||
methods: {
|
||||
/*添加场馆*/
|
||||
addUser() {
|
||||
let self = this;
|
||||
let params = self.form;
|
||||
|
||||
self.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
self.loading = true;
|
||||
ComboApi.editGround(params).then(data => {
|
||||
self.loading = false;
|
||||
self.$message({
|
||||
message: '修改成功',
|
||||
type: 'success'
|
||||
});
|
||||
self.dialogFormVisible(true);
|
||||
}).catch(error => {
|
||||
self.loading = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/*获取富文本内容*/
|
||||
contentChangeFunc(e){
|
||||
this.form.content = e;
|
||||
},
|
||||
|
||||
/*关闭弹窗*/
|
||||
dialogFormVisible(e) {
|
||||
if (e) {
|
||||
this.$emit('closeDialog', {
|
||||
type: 'success',
|
||||
openDialog: false
|
||||
})
|
||||
} else {
|
||||
this.$emit('closeDialog', {
|
||||
type: 'error',
|
||||
openDialog: false
|
||||
})
|
||||
}
|
||||
},
|
||||
/*上传*/
|
||||
openUpload(e) {
|
||||
this.type = e;
|
||||
this.isupload = true;
|
||||
},
|
||||
/*获取图片*/
|
||||
returnImgsFunc(e) {
|
||||
console.log("🚀 ~ e:", e)
|
||||
if (e != null && e.length > 0) {
|
||||
this.file_path = e[0].file_path;
|
||||
this.form.image = e[0].file_id;
|
||||
}
|
||||
this.isupload = false;
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.img {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
204
src/views/combo/combo/index.vue
Normal file
204
src/views/combo/combo/index.vue
Normal file
@ -0,0 +1,204 @@
|
||||
<template>
|
||||
<div class="venue">
|
||||
<!--添加套餐-->
|
||||
<div class="common-level-rail"><el-button size="small" type="primary" icon="el-icon-plus" @click="addClick" v-auth="'/combo/combo/add'">添加套餐</el-button></div>
|
||||
|
||||
<!--内容-->
|
||||
<div class="product-content">
|
||||
<div class="table-wrap">
|
||||
<el-table size="small" :data="tableData" border style="width: 100%" v-loading="loading">
|
||||
<el-table-column prop="id" label="ID" width="80"></el-table-column>
|
||||
<el-table-column prop="name" label="套餐名称"></el-table-column>
|
||||
<el-table-column prop="price" label="套餐价格"></el-table-column>
|
||||
<el-table-column prop="month_price" label="指导价"></el-table-column>
|
||||
<el-table-column fixed="right" label="操作" width="170">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="editClick(scope.row)" type="text" size="small"
|
||||
v-auth="'/combo/combo/edit'">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--添加-->
|
||||
<Add v-if="open_add" :open_add="open_add" @closeDialog="closeDialogFunc($event, 'add')"></Add>
|
||||
<!--修改-->
|
||||
<Edit v-if="open_edit" :open_edit="open_edit" :editform="venueModel" @closeDialog="closeDialogFunc($event, 'edit')"></Edit>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ComboApi from '@/api/combo.js';
|
||||
import VenueApi from '@/api/venue.js';
|
||||
import Add from './add.vue';
|
||||
import Edit from './edit.vue';
|
||||
// import Data from './Edit.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
/*编辑组件*/
|
||||
Edit,
|
||||
Add,
|
||||
// Data
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
/*是否加载完成*/
|
||||
loading: true,
|
||||
/*列表数据*/
|
||||
tableData: [],
|
||||
/*一页多少条*/
|
||||
pageSize: 20,
|
||||
/*一共多少条数据*/
|
||||
totalDataNumber: 0,
|
||||
/*当前是第几页*/
|
||||
curPage: 1,
|
||||
/*横向表单数据模型*/
|
||||
formInline: {
|
||||
search: ''
|
||||
},
|
||||
/*是否打开添加弹窗*/
|
||||
open_add: false,
|
||||
/*是否打开编辑弹窗*/
|
||||
open_edit: false,
|
||||
/*当前编辑的对象*/
|
||||
venueModel: {},
|
||||
/*等级*/
|
||||
gradeList: [],
|
||||
open_tag: false,
|
||||
/*所有标签*/
|
||||
allTag: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
/*获取列表*/
|
||||
this.getTableList();
|
||||
},
|
||||
methods: {
|
||||
/*选择第几页*/
|
||||
handleCurrentChange(val) {
|
||||
let self = this;
|
||||
self.curPage = val;
|
||||
self.loading = true;
|
||||
self.getTableList();
|
||||
},
|
||||
|
||||
/*每页多少条*/
|
||||
handleSizeChange(val) {
|
||||
this.curPage = 1;
|
||||
this.pageSize = val;
|
||||
this.getTableList();
|
||||
},
|
||||
|
||||
/*获取列表*/
|
||||
getTableList() {
|
||||
let self = this;
|
||||
let Params = self.formInline;
|
||||
Params.page = self.curPage;
|
||||
Params.size = self.pageSize;
|
||||
ComboApi.comboList(Params, true)
|
||||
.then(res => {
|
||||
console.log("🚀 ~ res:", res)
|
||||
self.loading = false;
|
||||
self.tableData = res.data;
|
||||
})
|
||||
.catch(error => {
|
||||
self.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
/*搜索查询*/
|
||||
onSubmit() {
|
||||
let self = this;
|
||||
self.loading = true;
|
||||
self.curPage = 1;
|
||||
self.getTableList();
|
||||
},
|
||||
|
||||
/*打开添加*/
|
||||
addClick(item) {
|
||||
this.open_add = true;
|
||||
},
|
||||
|
||||
/*打开编辑*/
|
||||
editClick(item) {
|
||||
this.venueModel = item;
|
||||
this.open_edit = true;
|
||||
},
|
||||
|
||||
/*打开预定*/
|
||||
reserveClick(item) {
|
||||
let self = this;
|
||||
let params = item.id;
|
||||
self.$router.push({
|
||||
path: '/venue/venue/reserve',
|
||||
query: {
|
||||
cg_id: params
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/*关闭弹窗*/
|
||||
closeDialogFunc(e, f) {
|
||||
if (f == 'add') {
|
||||
this.open_add = e.openDialog;
|
||||
if (e.type == 'success') {
|
||||
this.getTableList();
|
||||
}
|
||||
}
|
||||
if (f == 'edit') {
|
||||
this.open_edit = e.openDialog;
|
||||
if (e.type == 'success') {
|
||||
this.getTableList();
|
||||
}
|
||||
}
|
||||
if (f == 'tag') {
|
||||
this.open_tag = e.openDialog;
|
||||
if (e.type == 'success') {
|
||||
this.getTableList();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/*删除用户*/
|
||||
deleteClick(row) {
|
||||
let self = this;
|
||||
self
|
||||
.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
self.loading = true;
|
||||
VenueApi.delGround(
|
||||
{
|
||||
id: row.id
|
||||
},
|
||||
true
|
||||
)
|
||||
.then(data => {
|
||||
self.loading = false;
|
||||
if (data.code == 1) {
|
||||
self.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
});
|
||||
self.getTableList();
|
||||
} else {
|
||||
self.loading = false;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
self.loading = false;
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
self.loading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style></style>
|
||||
235
src/views/combo/review/edit.vue
Normal file
235
src/views/combo/review/edit.vue
Normal file
@ -0,0 +1,235 @@
|
||||
<template>
|
||||
<el-dialog title="审核" :visible.sync="dialogVisible" @close="dialogFormVisible" :close-on-click-modal="false"
|
||||
:close-on-press-escape="false">
|
||||
<el-form size="small" :model="form" ref="form">
|
||||
<el-form-item label="名称" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.name" autocomplete="off" disabled></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="手机号" prop="mobile" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.mobile" autocomplete="off" disabled></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="身份证" prop="card" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.card" autocomplete="off" disabled></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="出生日期" prop="both" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.both" autocomplete="off" disabled></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="套餐" prop="group_name" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.group_name" autocomplete="off" disabled></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="审核" prop="status" :label-width="formLabelWidth">
|
||||
<el-select v-model="form.status" placeholder="请选择">
|
||||
<el-option label="通过" :value="1"></el-option>
|
||||
<el-option label="不通过" :value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible">取 消</el-button>
|
||||
<el-button type="primary" @click="review" :loading="loading">确 定</el-button>
|
||||
</div>
|
||||
<!--上传图片组件-->
|
||||
<Upload v-if="isupload" :isupload="isupload" :type="type" @returnImgs="returnImgsFunc">上传图片</Upload>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Upload from '@/components/file/Upload';
|
||||
import Uediter from '@/components/UE.vue';
|
||||
import VenueApi from '@/api/venue.js';
|
||||
import ComboApi from '@/api/combo.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Upload,
|
||||
Uediter,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
/*富文本框配置*/
|
||||
ueditor: {
|
||||
text: '',
|
||||
config: {
|
||||
initialFrameWidth: 400,
|
||||
initialFrameHeight: 500,
|
||||
toolbars: [
|
||||
[
|
||||
'fullscreen', 'source', '|', 'undo', 'redo', '|',
|
||||
'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
|
||||
'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
|
||||
'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
|
||||
'directionalityltr', 'directionalityrtl', 'indent', '|',
|
||||
'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
|
||||
'link', 'unlink', 'anchor', '|',
|
||||
'emotion', 'map', 'insertframe', 'insertcode', 'pagebreak', 'template', 'background', '|',
|
||||
'horizontal', 'date', 'time', 'spechars', 'wordimage', '|',
|
||||
'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
|
||||
'print', 'preview', 'searchreplace', 'drafts', 'help'
|
||||
]
|
||||
]
|
||||
},
|
||||
},
|
||||
form: {
|
||||
id: 0,
|
||||
mobile: '',
|
||||
name: '',
|
||||
card: '',
|
||||
both: '',
|
||||
status: ''
|
||||
},
|
||||
file_path: '',
|
||||
formRules: {
|
||||
name: [{
|
||||
required: true,
|
||||
message: '请输入套餐名称',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
|
||||
eg_name: [{
|
||||
required: true,
|
||||
message: '请输入套餐英文名称',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
|
||||
image: [{
|
||||
required: true,
|
||||
message: '请上传套餐图片',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
|
||||
price: [{
|
||||
required: true,
|
||||
message: '请输入套餐价格',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
|
||||
month_price: [{
|
||||
required: true,
|
||||
message: '请输入指导价',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
|
||||
content: [{
|
||||
required: true,
|
||||
message: '请输入权益说明',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
},
|
||||
/*左边长度*/
|
||||
formLabelWidth: '120px',
|
||||
/*是否显示*/
|
||||
dialogVisible: false,
|
||||
loading: false,
|
||||
/*是否上传图片*/
|
||||
isupload: false,
|
||||
};
|
||||
},
|
||||
props: ['open_edit', 'editform'],
|
||||
created() {
|
||||
this.dialogVisible = this.open_edit;
|
||||
console.log(this.editform);
|
||||
this.form.id = this.editform.id;
|
||||
this.form.name = this.editform.name;
|
||||
this.form.mobile = this.editform.mobile;
|
||||
this.form.card = this.editform.card;
|
||||
this.form.both = this.editform.both;
|
||||
this.form.group_name = this.editform.group_name;
|
||||
this.form.status = this.editform.status == 0 ? '' : this.editform.status;
|
||||
},
|
||||
methods: {
|
||||
/*添加场馆*/
|
||||
addUser() {
|
||||
let self = this;
|
||||
let params = self.form;
|
||||
|
||||
self.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
self.loading = true;
|
||||
ComboApi.editGround(params).then(data => {
|
||||
self.loading = false;
|
||||
self.$message({
|
||||
message: '修改成功',
|
||||
type: 'success'
|
||||
});
|
||||
self.dialogFormVisible(true);
|
||||
}).catch(error => {
|
||||
self.loading = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/*获取富文本内容*/
|
||||
contentChangeFunc(e){
|
||||
this.form.content = e;
|
||||
},
|
||||
|
||||
/*关闭弹窗*/
|
||||
dialogFormVisible(e) {
|
||||
if (e) {
|
||||
this.$emit('closeDialog', {
|
||||
type: 'success',
|
||||
openDialog: false
|
||||
})
|
||||
} else {
|
||||
this.$emit('closeDialog', {
|
||||
type: 'error',
|
||||
openDialog: false
|
||||
})
|
||||
}
|
||||
},
|
||||
/*上传*/
|
||||
openUpload(e) {
|
||||
this.type = e;
|
||||
this.isupload = true;
|
||||
},
|
||||
/*获取图片*/
|
||||
returnImgsFunc(e) {
|
||||
console.log("🚀 ~ e:", e)
|
||||
if (e != null && e.length > 0) {
|
||||
this.file_path = e[0].file_path;
|
||||
this.form.image = e[0].file_id;
|
||||
}
|
||||
this.isupload = false;
|
||||
},
|
||||
|
||||
review() {
|
||||
let self = this;
|
||||
let params = {
|
||||
id: self.form.id,
|
||||
status: self.form.status
|
||||
};
|
||||
|
||||
self.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
self.loading = true;
|
||||
ComboApi.reviewEdit(params).then(data => {
|
||||
self.loading = false;
|
||||
self.$message({
|
||||
message: '操作成功',
|
||||
type: 'success'
|
||||
});
|
||||
self.dialogFormVisible(true);
|
||||
}).catch(error => {
|
||||
self.loading = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.img {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
229
src/views/combo/review/index.vue
Normal file
229
src/views/combo/review/index.vue
Normal file
@ -0,0 +1,229 @@
|
||||
<template>
|
||||
<div class="venue">
|
||||
<!--搜索表单-->
|
||||
<div class="common-seach-wrap">
|
||||
<el-form size="small" :inline="true" :model="formInline" class="demo-form-inline">
|
||||
<el-form-item label="名称">
|
||||
<el-input v-model="formInline.search"
|
||||
placeholder="请输入名称"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="手机号">
|
||||
<el-input v-model="formInline.search"
|
||||
placeholder="请输入手机号"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item><el-button type="primary" icon="el-icon-search"
|
||||
@click="onSubmit">查询</el-button></el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<!--内容-->
|
||||
<div class="product-content">
|
||||
<div class="table-wrap">
|
||||
<el-table size="small" :data="tableData" border style="width: 100%" v-loading="loading">
|
||||
<el-table-column prop="name" label="名称"></el-table-column>
|
||||
<el-table-column prop="mobile" label="手机号"></el-table-column>
|
||||
<el-table-column prop="card" label="身份证号"></el-table-column>
|
||||
<el-table-column prop="both" label="出身日期"></el-table-column>
|
||||
<el-table-column prop="group_name" label="套餐"></el-table-column>
|
||||
<el-table-column prop="status" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status == 1" type="success">通过</el-tag>
|
||||
<el-tag v-else-if="scope.row.status == 2" type="danger">未通过</el-tag>
|
||||
<el-tag v-else type="warning">待审核</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" width="170">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="editClick(scope.row)" type="text" size="small"
|
||||
v-auth="'/combo/review/edit'">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<!--分页-->
|
||||
<div class="pagination">
|
||||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" background
|
||||
:current-page="curPage" :page-size="pageSize" layout="total, prev, pager, next, jumper"
|
||||
:total="totalDataNumber"></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--修改-->
|
||||
<Edit v-if="open_edit" :open_edit="open_edit" :editform="venueModel" @closeDialog="closeDialogFunc($event, 'edit')"></Edit>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ComboApi from '@/api/combo.js';
|
||||
import Edit from './edit.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
/*编辑组件*/
|
||||
Edit,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
/*是否加载完成*/
|
||||
loading: true,
|
||||
/*列表数据*/
|
||||
tableData: [],
|
||||
/*一页多少条*/
|
||||
pageSize: 20,
|
||||
/*一共多少条数据*/
|
||||
totalDataNumber: 0,
|
||||
/*当前是第几页*/
|
||||
curPage: 1,
|
||||
/*横向表单数据模型*/
|
||||
formInline: {
|
||||
name: '',
|
||||
mobile: ''
|
||||
},
|
||||
/*是否打开添加弹窗*/
|
||||
open_add: false,
|
||||
/*是否打开编辑弹窗*/
|
||||
open_edit: false,
|
||||
/*当前编辑的对象*/
|
||||
venueModel: {},
|
||||
/*等级*/
|
||||
gradeList: [],
|
||||
open_tag: false,
|
||||
/*所有标签*/
|
||||
allTag: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
/*获取列表*/
|
||||
this.getTableList();
|
||||
},
|
||||
methods: {
|
||||
/*选择第几页*/
|
||||
handleCurrentChange(val) {
|
||||
let self = this;
|
||||
self.curPage = val;
|
||||
self.loading = true;
|
||||
self.getTableList();
|
||||
},
|
||||
|
||||
/*每页多少条*/
|
||||
handleSizeChange(val) {
|
||||
this.curPage = 1;
|
||||
this.pageSize = val;
|
||||
this.getTableList();
|
||||
},
|
||||
|
||||
/*获取列表*/
|
||||
getTableList() {
|
||||
let self = this;
|
||||
let Params = self.formInline;
|
||||
Params.page = self.curPage;
|
||||
Params.size = self.pageSize;
|
||||
ComboApi.reviewList(Params, true)
|
||||
.then(res => {
|
||||
console.log("🚀 ~ res:", res)
|
||||
self.loading = false;
|
||||
self.tableData = res.data.data;
|
||||
self.totalDataNumber = res.data.total;
|
||||
})
|
||||
.catch(error => {
|
||||
self.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
/*搜索查询*/
|
||||
onSubmit() {
|
||||
let self = this;
|
||||
self.loading = true;
|
||||
self.curPage = 1;
|
||||
self.getTableList();
|
||||
},
|
||||
|
||||
/*打开添加*/
|
||||
addClick(item) {
|
||||
this.open_add = true;
|
||||
},
|
||||
|
||||
/*打开编辑*/
|
||||
editClick(item) {
|
||||
this.venueModel = item;
|
||||
this.open_edit = true;
|
||||
},
|
||||
|
||||
/*打开预定*/
|
||||
reserveClick(item) {
|
||||
let self = this;
|
||||
let params = item.id;
|
||||
self.$router.push({
|
||||
path: '/venue/venue/reserve',
|
||||
query: {
|
||||
cg_id: params
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/*关闭弹窗*/
|
||||
closeDialogFunc(e, f) {
|
||||
if (f == 'add') {
|
||||
this.open_add = e.openDialog;
|
||||
if (e.type == 'success') {
|
||||
this.getTableList();
|
||||
}
|
||||
}
|
||||
if (f == 'edit') {
|
||||
this.open_edit = e.openDialog;
|
||||
if (e.type == 'success') {
|
||||
this.getTableList();
|
||||
}
|
||||
}
|
||||
if (f == 'tag') {
|
||||
this.open_tag = e.openDialog;
|
||||
if (e.type == 'success') {
|
||||
this.getTableList();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/*删除用户*/
|
||||
deleteClick(row) {
|
||||
let self = this;
|
||||
self
|
||||
.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
self.loading = true;
|
||||
VenueApi.delGround(
|
||||
{
|
||||
id: row.id
|
||||
},
|
||||
true
|
||||
)
|
||||
.then(data => {
|
||||
self.loading = false;
|
||||
if (data.code == 1) {
|
||||
self.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
});
|
||||
self.getTableList();
|
||||
} else {
|
||||
self.loading = false;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
self.loading = false;
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
self.loading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style></style>
|
||||
@ -75,7 +75,7 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :xs="24" :sm="12" :md="6" class="text-center mb-4" style="margin-top: 20px;">
|
||||
<el-statistic title="退款金额" :value="refund_amount" />
|
||||
<el-statistic title="扣款金额" :value="deduction_price" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="width:100%;display:flex;justify-content:center;margin-top:24px;">
|
||||
@ -243,7 +243,7 @@ export default {
|
||||
tennis_amount: 0,
|
||||
bk_amount: 0,
|
||||
balance_amount: 0,
|
||||
refund_amount: 0
|
||||
deduction_price: 0
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -305,7 +305,7 @@ export default {
|
||||
self.tennis_amount = res.data.tennis_amount;
|
||||
self.bk_amount = res.data.bk_amount;
|
||||
self.balance_amount = res.data.balance_amount;
|
||||
self.refund_amount = res.data.refund_amount || 0;
|
||||
self.deduction_price = res.data.deduction_price || 0;
|
||||
// 更新条形图
|
||||
self.$nextTick(() => {
|
||||
self.renderBarChart();
|
||||
@ -474,7 +474,7 @@ export default {
|
||||
grid: { left: 60, right: 30, top: 60, bottom: 30 },
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['统计金额', '篮球馆金额', '网球馆金额', '充值卡金额', '退款金额']
|
||||
data: ['统计金额', '篮球馆金额', '网球馆金额', '充值卡金额', '扣款金额']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
@ -489,7 +489,7 @@ export default {
|
||||
this.bk_amount || 0,
|
||||
this.tennis_amount || 0,
|
||||
this.balance_amount || 0,
|
||||
this.refund_amount || 0
|
||||
this.deduction_price || 0
|
||||
],
|
||||
itemStyle: {
|
||||
color: '#409EFF'
|
||||
|
||||
Reference in New Issue
Block a user