Compare commits

..

126 Commits

Author SHA1 Message Date
liaozetao
ce7ed33f03 时间样式 2024-02-27 21:39:15 +08:00
liaozetao
d20ba9e3a3 轮次持续时间展示问题 2024-02-27 21:39:15 +08:00
liaozetao
8b744fbc0a 修复白名单展示 2024-02-27 21:39:14 +08:00
liaozetao
78a0896e99 修复白名单ID 2024-02-27 21:39:14 +08:00
Dragon
c3e24aae51 修复查询异常问题 2024-02-27 21:39:13 +08:00
liaozetao
3aa9d98aa2 修复设置白名单 2024-02-27 21:39:13 +08:00
liaozetao
5d13b68c5a 修复查询参数 2024-02-27 21:39:13 +08:00
liaozetao
b900c5fe83 修复导出问题 2024-02-27 21:39:12 +08:00
liaozetao
cfeceed259 修复展示问题 2024-02-27 21:39:12 +08:00
liaozetao
a9fedeccf2 处理获奖展示 2024-02-27 21:39:12 +08:00
liaozetao
624afcc90a 修复设置白名单后重新渲染 2024-02-27 21:39:11 +08:00
liaozetao
1a3f6137cb 修复白名单数量 2024-02-27 21:39:11 +08:00
liaozetao
05721d3916 添加白名单数量判断 2024-02-27 21:39:10 +08:00
liaozetao
3a52b34239 修改按钮颜色 2024-02-27 21:39:10 +08:00
liaozetao
782989b3c8 修复设置完后刷新问题 2024-02-27 21:39:09 +08:00
liaozetao
e5a2bd8433 修复设置白名单 2024-02-27 21:39:09 +08:00
liaozetao
04d23c58de 返回轮次ID 2024-02-27 21:39:08 +08:00
liaozetao
72649778a5 修复查询问题 2024-02-27 21:39:08 +08:00
Dragon
e850d11175 调用初始化接口 2024-02-27 21:39:07 +08:00
Dragon
f78e1c10b7 修复bug,新增ts,去除黄色警告 2024-02-27 21:39:06 +08:00
Dragon
4ed3d88e1e 完善许愿管理剩余接口 2024-02-27 21:39:06 +08:00
liaozetao
ccc03895a7 新增许愿轮次记录 2024-02-27 21:39:05 +08:00
Dragon
b38614c45e 新增许愿之星 2024-02-27 21:39:04 +08:00
liaozetao
74b32be861 去除id默認值0 2024-02-23 17:27:34 +08:00
liaozetao
e5f78df6e5 修改時間各式 2024-02-23 17:22:34 +08:00
liaozetao
3c5ea1a5e0 展示置顶时间 2024-02-23 16:47:28 +08:00
liaozetao
8019555459 修复roomUid问题 2024-02-23 16:17:19 +08:00
liaozetao
a5996c3db8 去除tab不能删除逻辑 2024-02-23 15:42:25 +08:00
liaozetao
681d7f7a5c 修复数据回显问题 2024-02-23 15:37:52 +08:00
liaozetao
52f4d6277c 添加时间组件 2024-02-23 15:03:11 +08:00
liaozetao
bc4c36bdc8 修改校验逻辑 2024-02-23 14:29:51 +08:00
liaozetao
5fa717465e 修改判斷邏輯 2024-02-21 17:59:02 +08:00
liaozetao
889bb2363e 修改toast提示 2024-02-21 17:59:01 +08:00
liaozetao
1111d4782e 标题判断逻辑 2024-02-21 17:59:01 +08:00
liaozetao
96ad03efb9 修复展示问题 2024-02-21 17:59:01 +08:00
liaozetao
49cdeb7407 修改版本判断逻辑 2024-02-21 17:59:01 +08:00
liaozetao
80dca35881 新增app原生固定编码 2024-02-20 14:29:16 +08:00
liaozetao
c7d6455c16 修复台湾货币保存 2024-02-20 10:18:43 +08:00
liaozetao
b2cd8d5b75 新增台湾地区银行 2024-02-19 16:45:42 +08:00
liaozetao
f6740bf1ca 设置时间必填项 2024-02-18 16:11:55 +08:00
liaozetao
ec30e516a0 修改开屏设置时间问题 2024-02-18 15:50:08 +08:00
liaozetao
a962dbc669 线性福袋 2024-02-05 20:46:57 +08:00
liaozetao
dab97ce8ae 新增mycard字段 2024-01-31 12:42:07 +08:00
liaozetao
3fbb4e287e 修改窗口长度滚动 2024-01-24 18:39:32 +08:00
liaozetao
1096194250 修改loading尺寸 2024-01-24 18:39:32 +08:00
liaozetao
6ad1b136a8 修改高度 2024-01-24 18:39:32 +08:00
liaozetao
f5a30e7a04 修改大小 2024-01-24 18:39:32 +08:00
liaozetao
62e8a2239f 补充 2024-01-24 18:39:32 +08:00
liaozetao
0c17ceffce 新增loading图 2024-01-24 18:39:32 +08:00
liaozetao
1cb752be00 修改时间长度 2024-01-24 18:39:32 +08:00
liaozetao
62211d9cf4 去除添加功能 2024-01-24 18:39:06 +08:00
liaozetao
bf9de20556 修复表单提交问题 2024-01-24 18:38:05 +08:00
liaozetao
7185f8f77a 修復鏈接回線問題 2024-01-24 18:32:58 +08:00
liaozetao
7d5fcd1494 修改鏈接展示邏輯 2024-01-24 18:32:58 +08:00
liaozetao
d462f6bbde 修改上傳按鈕邏輯 2024-01-24 18:32:57 +08:00
liaozetao
b470859daa 修改刪除按鈕邏輯 2024-01-24 18:32:57 +08:00
liaozetao
e3c82bcf92 打印日誌 2024-01-24 18:32:57 +08:00
liaozetao
ef022da215 清空鏈接處理 2024-01-24 18:32:57 +08:00
liaozetao
82dc883119 修復編輯回線 2024-01-24 18:32:57 +08:00
liaozetao
bf1ae344e3 修復查詢問題 2024-01-24 18:32:57 +08:00
liaozetao
eb10bdb44d 修改上傳組件按鈕 2024-01-24 18:32:57 +08:00
liaozetao
b52de9a90d 刪除多餘代碼 2024-01-24 18:32:57 +08:00
liaozetao
2a4929b476 修改上傳組件 2024-01-24 18:32:57 +08:00
liaozetao
9433dd254f 修復view name問題 2024-01-24 18:32:57 +08:00
liaozetao
c206b17acb 修复报错 2024-01-24 18:32:57 +08:00
liaozetao
8d21755335 新增官网配置页面 2024-01-24 18:32:57 +08:00
liaozetao
d8593c736d 修改名称 2024-01-22 15:57:10 +08:00
liaozetao
9258f46bdb 处理电话账单 2024-01-22 14:08:52 +08:00
liaozetao
12c3ad1e6e 修复编辑问题 2024-01-22 11:25:53 +08:00
liaozetao
451f778732 修复上传组件问题 2024-01-20 19:00:04 +08:00
liaozetao
68d7433a05 修复表单提交问题 2024-01-20 17:47:30 +08:00
liaozetao
dcc8e081ee 修复开屏广告配置问题 2024-01-20 15:37:02 +08:00
liaozetao
fc705cbc01 新增公会名称字段 2024-01-15 15:24:00 +08:00
liaozetao
7072376da6 新增平台号搜索 2024-01-15 14:23:52 +08:00
liaozetao
368550d4b8 修改时间格式化 2024-01-12 15:13:52 +08:00
liaozetao
60f349060d 新增修改事件 2024-01-12 12:03:13 +08:00
liaozetao
a5b21a28e0 修复事件失效问题 2024-01-11 19:04:31 +08:00
liaozetao
0b3aa136f9 补充5 2024-01-11 19:00:19 +08:00
liaozetao
c46de130c6 修复奖品设置 2024-01-11 18:55:56 +08:00
liaozetao
c184753083 补充4 2024-01-11 18:48:23 +08:00
liaozetao
6a55b37490 补充3 2024-01-11 18:21:14 +08:00
liaozetao
4b4185f71d 修改事件加载问题 2024-01-11 18:11:03 +08:00
liaozetao
7371a1654a 将事件迁移 2024-01-11 17:53:53 +08:00
liaozetao
e3bb745a92 补充 2024-01-11 17:33:31 +08:00
liaozetao
eb2920b62b 修复报错 2024-01-11 17:28:33 +08:00
liaozetao
270ef2e0e1 修复字段报错 2024-01-11 17:14:45 +08:00
Dragon
b7cc65001f 访问白名单新增操作人字段 2024-01-10 15:34:44 +08:00
liaozetao
dbf84bf7c8 修复时间问题 2024-01-10 15:00:58 +08:00
khalil
9d98c1afd8 寻爱之旅-后台-去掉废弃接口 2024-01-09 18:02:36 +08:00
liaozetao
f6845854a1 修复vgg问题 2024-01-09 15:56:44 +08:00
liaozetao
dbb193c7e9 补充2 2024-01-09 15:51:32 +08:00
liaozetao
71e44300a4 补充 2024-01-09 15:48:42 +08:00
liaozetao
39f1ad026c 修改上传代码 2024-01-09 15:48:27 +08:00
liaozetao
fdc01127e2 修补选择组件 2024-01-09 12:11:42 +08:00
liaozetao
faf0250aae 补充 2024-01-08 17:30:11 +08:00
liaozetao
1526875c7f 修复工具类问题 2024-01-08 17:08:31 +08:00
liaozetao
56df854368 优化私聊查询 2024-01-04 19:02:10 +08:00
liaozetao
7f15427638 超过高度滚动 2024-01-02 18:32:18 +08:00
liaozetao
0586ef3e55 修改mp4 2024-01-02 18:29:34 +08:00
liaozetao
d65e4eb701 修改视图展示 2024-01-02 18:23:17 +08:00
liaozetao
c050d4a338 添加遮罩层 2024-01-02 18:11:11 +08:00
liaozetao
11f0ca3dbd 添加遮罩层 2024-01-02 16:03:17 +08:00
liaozetao
f40a401b2b 超出换行 2023-12-28 18:49:43 +08:00
liaozetao
25ed55eac6 补充2 2023-12-28 18:42:21 +08:00
liaozetao
789d71d7c2 补充 2023-12-28 18:31:57 +08:00
liaozetao
51fa966457 修复超管展示问题 2023-12-28 18:19:45 +08:00
liaozetao
b2334b4e5f 新用户送礼流水 2023-12-28 11:47:17 +08:00
liaozetao
bf909cfa0f 渠道展示颜色 2023-12-27 17:40:38 +08:00
liaozetao
1f7dc304fd 修复置顶问题 2023-12-27 17:31:53 +08:00
liaozetao
b5d8eeebfe 新增合作方字段 2023-12-26 18:55:31 +08:00
liaozetao
2940c9dc0a 去除提示 2023-12-21 20:13:53 +08:00
Dragon
e2c34e5863 修复房间流水筛选bug 2023-12-20 14:50:49 +08:00
liaozetao
ac415d1bcb 修复查询逻辑 2023-12-18 16:52:32 +08:00
liaozetao
61f9575255 窗口未关闭问题 2023-12-18 16:44:04 +08:00
liaozetao
ef4e04286b 增加人气礼物类型 2023-12-15 10:21:16 +08:00
liaozetao
32ad54e4e3 补充 2023-12-13 17:45:10 +08:00
liaozetao
6ff8e23e59 修改礼物类型组件 2023-12-13 17:23:31 +08:00
liaozetao
c60c28efa2 调整样式 2023-12-11 12:37:00 +08:00
liaozetao
86e62d8d40 添加忽视版本和渠道字段 2023-12-11 10:47:26 +08:00
liaozetao
b25b59615e 修改默认选中 2023-12-11 10:28:00 +08:00
liaozetao
ff6bd4a91f 修改礼物默认类型 2023-12-11 10:14:18 +08:00
liaozetao
d20a59e843 补充 2023-12-08 15:37:19 +08:00
liaozetao
94dbb140fb 修改礼物类型默认值 2023-12-08 15:16:13 +08:00
liaozetao
864687bdab 修改礼物管理默认值 2023-12-08 15:13:04 +08:00
liaozetao
e11bf2a439 修改铭牌配置为动态获取 2023-12-06 15:31:26 +08:00
liaozetao
053be766c9 修复按钮问题 2023-12-05 11:51:10 +08:00
44 changed files with 4130 additions and 1764 deletions

View File

@@ -1,3 +1,4 @@
import request from "@/utils/request";
import '@/utils/ajaxfileupload';
export const uploadFile = id => {
@@ -20,4 +21,52 @@ export const uploadFile = id => {
}
});
});
};
export const uploadQiNiuFile = (file) => {
console.log(file);
let formData = new FormData();
formData.append('file', file);
return new Promise((resolve, reject) => {
request.post('/admin/qiniu/upload/file', formData).then(res => {
resolve(res);
}).catch(e => {
reject(e);
});
});
};
export const uploadTencentFile = id => {
return new Promise((resolve, reject) => {
$.ajaxFileUpload({
fileElementId: id,
url: '/admin/upload/tencent/file',
type: 'post',
dataType: 'json',
secureuri: false,
async: true,
submitType: 'ajax',
success: function (res) {
resolve(res);
},
error: function (res, status, e) {
console.error(res);
console.error(status);
reject(e);
}
});
});
};
export const uploadGift = (file) => {
let formData = new FormData();
console.log(file);
formData.append('file', file);
return new Promise((resolve, reject) => {
request.post('/admin/gift/upload', formData).then(res => {
resolve(res);
}).catch(e => {
reject(e);
});
});
};

View File

@@ -0,0 +1,18 @@
import request from '@/utils/request';
export const getOfficialConfigList = query => {
return request({
url: '/admin/official/config/list',
method: 'get',
params: query
});
};
export const saveOfficialConfig = data => {
return request({
url: '/admin/official/config/save',
headers:{"Content-Type": 'application/x-www-form-urlencoded'},
method: 'post',
data: data
});
}

View File

@@ -0,0 +1,9 @@
import request from '@/utils/request';
export const browseFor30Days = query => {
return request({
url: '/admin/official/browse/record/browseFor30Days',
method: 'get',
params: query
});
};

View File

@@ -5,4 +5,12 @@ export function getSysConfList() {
url: '/admin/sysConf/getList',
method: 'get'
});
}
export const getConfigValueByKey = query => {
return request({
url: '/admin/sysConf/key',
method: 'get',
params: query,
});
}

View File

@@ -0,0 +1,76 @@
import request from '@/utils/request';
import qs from 'qs';
import { genQueryParam } from '@/utils/maintainer';
// ==================================许愿礼物配置====================================
// 表单
export const promiseStarConfigList = query => {
return request({
url: '/admin/promiseStarConfig/list',
method: 'get',
params: query
});
};
// 新增弹窗列表数据
export const giftGetAll = query => {
return request({
url: '/admin/gift/getAll',
method: 'get',
params: query
});
};
// 新增
export const promiseStarConfigSave = query => {
return request({
url: '/admin/promiseStarConfig/save',
headers:{"Content-Type": 'application/x-www-form-urlencoded'},
method: 'post',
data: query
});
};
// 下线
export const promiseStarConfigUpdateEnable = query => {
return request({
url: '/admin/promiseStarConfig/updateEnable',
headers:{"Content-Type": 'application/x-www-form-urlencoded'},
method: 'post',
data: query
});
};
export const promiseStarRoundPage = query => {
return request({
url: '/admin/promiseStarRound/page',
method: 'get',
params: query
});
};
export const promiseStarUserRecordGetPromiseUsers = query => {
return request({
url: '/admin/promiseStarUserRecord/getPromiseUsers',
method: 'get',
params: query
});
};
export const promiseStarUserRecordSetUserWhite = query => {
return request({
url: '/admin/promiseStarUserRecord/setUserWhite',
headers:{"Content-Type": 'application/x-www-form-urlencoded'},
method: 'post',
data: query
});
};
export const promiseStarUserRecordPage = query => {
return request({
url: '/admin/promiseStarUserRecord/page',
method: 'get',
params: query
});
};
export const promiseStarUserRecordExport = query => {
window.location.href = `/admin/promiseStarUserRecord/export?${genQueryParam(query)}`;
return;
};

View File

@@ -99,14 +99,13 @@
</div>
<div class="modal fade loading" style="background: #00000040;" tabindex="-1" role="dialog"
aria-labelledby="loadingModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
<div class="loadingGif" style="position: fixed;"><img :src="loading"></div>
<div class="loadingGif" style="position: fixed; left:50%; top:50%;"><img src="https://img.zcool.cn/community/0111345d94b0b8a801211d53cbd04d.gif" style="width: 10%;"></div>
</div>
</template>
<script>
import store from '@/store';
import { getStore } from '@/utils/store';
import loading from '@/assets/images/loading.gif';
export default {
name: 'MaintainerView',

View File

@@ -1,7 +1,9 @@
import { createApp } from 'vue'
// @ts-ignore
import App from './App.vue'
import router from './router'
import store from './store'
import 'jquery'
import 'jquery.md5'
import 'bootstrap/dist/css/bootstrap.min.css'
@@ -45,10 +47,13 @@ import '@/assets/plugins/jQuery-Validation-Engine/js/languages/jquery.validation
import '@/assets/plugins/bootstrap-treeview/css/bootstrap-treeview.min.css'
import '@/assets/plugins/bootstrap-treeview/js/bootstrap-treeview.min.js'
// @ts-ignore
import components from '@/utils/components.js'
// import ElementPlus from 'element-plus'
// import 'element-plus/dist/index.css'
import '@/css/public.css'
createApp(App).use(store).use(router).use(components).mount('#app')
const app = createApp(App)
app.config.warnHandler = () => null;
app.use(store).use(router).use(components).mount('#app')

View File

@@ -1,42 +1,50 @@
export default {
idstr: null,
// 是否有且只选择了一项
isSelectOne: function (idstr) {
if ($(idstr).bootstrapTable('getSelections').length == 1) {
isSelectOne: function (id) {
if ($(id).bootstrapTable('getSelections').length == 1) {
return true;
}
return false;
},
//是否选择了至少一项
hasSelectAny: function (idstr) {
if ($(idstr).bootstrapTable('getSelections').length > 0) {
hasSelectAny: function (id) {
if ($(id).bootstrapTable('getSelections').length > 0) {
return true;
}
return false;
},
// 获取选择的一项
getOneSelectItem: function (idstr) {
return $(idstr).bootstrapTable('getSelections')[0];
getOneSelectItem: function (id) {
return $(id).bootstrapTable('getSelections')[0];
},
// 已经选择的记录
getAllSelectItems: function (idstr) {
return $(idstr).bootstrapTable('getSelections');
getAllSelectItems: function (id) {
return $(id).bootstrapTable('getSelections');
},
getRowByUniqueId: function (idstr, id) {
return $(idstr).bootstrapTable('getRowByUniqueId', id);
getRowByUniqueId: function (id, recordId) {
return $(id).bootstrapTable('getRowByUniqueId', recordId);
},
// 已选择的项数量
selectLength: function (idstr) {
return $(idstr).bootstrapTable('getSelections').length;
selectLength: function (id) {
return $(id).bootstrapTable('getSelections').length;
},
// 刷新
doRefresh: function (idstr) {
$(idstr).bootstrapTable('refresh');
doRefresh: function (id) {
$(id).bootstrapTable('refresh');
},
unCheckAll: function (idstr) {
$(idstr).bootstrapTable('uncheckAll');
unCheckAll: function (id) {
$(id).bootstrapTable('uncheckAll');
},
doRefreshAndToPage1: function (idstr) {
$(idstr).bootstrapTable('selectPage', 1);
doRefreshAndToPage1: function (id) {
$(id).bootstrapTable('selectPage', 1);
},
getData: function(id) {
return $(id).bootstrapTable('getData');
},
destroy: function(id) {
$(id).bootstrapTable('destroy');
},
load: function(id, data) {
$(id).bootstrapTable('load', data);
}
}

View File

@@ -47,4 +47,13 @@ export function apiResult(json) {
$("#tipMsg").text("请求失败,错误信息:" + json.message);
$("#tipModal").modal('show');
return false;
}
export function genQueryParam(json) {
if (!json) return ''
return cleanArray(Object.keys(json).map(key => {
if (json[key] === undefined) return ''
return encodeURIComponent(key) + '=' +
encodeURIComponent(json[key])
})).join('&');
}

View File

@@ -1,6 +1,38 @@
//获取url中的参数
function getUrlParam(name) {
export function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
var r = window.location.search.substr(1).match(reg); //匹配目标参数
if (r != null) return unescape(r[2]); return null; //返回参数值
}
export function dateFormat (date, fmt) {
date = new Date(date);
var o = {
'M+': date.getMonth() + 1,
'd+': date.getDate(),
'h+': date.getHours(),
'm+': date.getMinutes(),
's+': date.getSeconds()
};
// 补全0
let padLeftZero = (str) => {
return ('00' + str).substr(str.length);
}
// 年份
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
}
// 月日时分秒
for (var k in o) {
if (new RegExp('(' + k + ')').test(fmt)) {
var str = o[k] + '';
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : padLeftZero(str));
}
}
date = o = padLeftZero = null;
return fmt;
}

View File

@@ -57,7 +57,8 @@
}}
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="400">
<el-table-column prop="adminName" align="center" label="操作" />
<el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button
@click="delWhite(scope.row)"

View File

@@ -288,7 +288,7 @@ export default {
$("#tipMsg").text("保存成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#updateItemModal").modal('hide');
$("#updateCapModal").modal('hide');
} else {
$("#tipMsg").text("保存失败." + json.message);
$("#tipModal").modal('show');
@@ -334,6 +334,7 @@ export default {
$("#tipMsg").text("保存成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#addCapModal").modal('hide');
} else {
$("#tipMsg").text("保存失败." + json.message);
$("#tipModal").modal('show');

View File

@@ -341,7 +341,7 @@ export default {
$("#tipMsg").text("保存成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#updateItemModal").modal('hide');
$("#updateJoinHandModal").modal('hide');
} else {
$("#tipMsg").text("保存失败." + json.message);
$("#tipModal").modal('show');
@@ -387,6 +387,7 @@ export default {
$("#tipMsg").text("保存成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#addJoinHandModal").modal('hide');
} else {
$("#tipMsg").text("保存失败." + json.message);
$("#tipModal").modal('show');

View File

@@ -307,7 +307,24 @@ export default {
$('#channelTable').bootstrapTable('destroy');
$('#channelTable').bootstrapTable({
columns: [
{ field: 'desc', title: '渠道名称', align: 'center', width: '5%' },
{ field: 'payChannel', title: '合作方', align: 'center', width: '5%' },
{
field: 'desc',
title: '渠道名称',
align: 'center',
width: '5%',
formatter: function (val, row, index) {
let color = 'black';
if (val == 'MyCard點數卡' || val == 'MyCard會員點數' || val == 'MyCard Paypal' || val == '信用卡' || val == '悠遊付' || val == 'ezPay 簡單付' || val == '台灣Pay' || val == 'icash Pay' || val == 'Pi 拍錢包' || val == '全支付' || val == 'LINE Pay') {
color = 'green';
} else if (val == '電子支付' || val == '銀行轉賬') {
color = 'blue';
} else if (val == '市內電話帳單' || val == '行動電話帳單' || val == '電信數據ADSL帳單') {
color = 'orange';
}
return '<span style="color:' + color + ';">' + val + '</span>';
}
},
{
field: 'logo',
title: '图标',

View File

@@ -284,7 +284,17 @@ let currParams = {};
export default {
name: "ClanAdminView",
setup() {
return {};
function showText(obj) {
let text = unescape($(obj).prop('title'));
let $div = $("#tipMsg");
$div.attr('style', 'word-wrap: break-word;');
$div.text(text);
$("#tipModal").modal('show');
}
window.showText = showText;
return {
showText
};
},
created() {
this.$nextTick(function () {
@@ -446,7 +456,7 @@ export default {
<td hidden="hidden" class="superUid" style="text-align: center;">${res.uid}</td>
<td style="text-align: center;">${res.erbanNo}</td>
<td style="text-align: center;">${res.nick}</td>
<td style="text-align: center;">${res.manageRoomErbanNoList}</td>
<td style="text-align: center;"><div style="text-align: center; width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" title="${escape(res.manageRoomErbanNoList)}" onclick="showText(this);">${res.manageRoomErbanNoList}</div></td>
<td style="text-align: center;">
<button type="button" class="btn btn-sm btn-success opt-super-update" >编辑</button>
<button type="button" class="btn btn-sm btn-danger opt-delete" >删除</button>

View File

@@ -85,7 +85,7 @@
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import { cleanArray } from '@/utils/maintainer';
import { cleanArray, apiResult } from '@/utils/maintainer';
export default {
name: "UserChatMsgRecordView",
@@ -107,23 +107,6 @@ export default {
{ field: 'fromNick', title: '搜索人昵称', align: 'center', width: '5%' },
{ field: 'toErBanNo', title: '聊天对象ID', align: 'center', width: '5%' },
{ field: 'toNick', title: '聊天对象昵称', align: 'center', width: '5%' },
{ field: 'firstTouchTime', title: '首次接触时间', align: 'center', width: '5%' },
{
field: 'isInitiative',
title: '首次接触情况',
align: 'center',
width: '5%',
formatter: function (val, row, index) {
var value = '';
if (val == 0) {
value = '被动回复';
} else if (val == 1) {
value = '主动发起';
}
return value;
}
},
{ field: 'chatMsgNum', title: '聊天条目数', align: 'center', width: '5%' },
{
field: 'handle',
title: '查看详情',
@@ -204,11 +187,32 @@ export default {
const toErBanNo = currentData.toErBanNo;
const toNick = currentData.toNick;
$("#detailModal").modal('show');
$('#modalLabel').html(fromNick + '(' + fromErBanNo + ')与' + toNick + '(' + toErBanNo + ')的聊天记录');
var fromUid = currentData.fromUid;
var toUid = currentData.toUid;
$('#fromUid').val(fromUid);
$('#toUid').val(toUid);
$('#modalLabel').html(fromNick + '(' + fromErBanNo + ')与' + toNick + '(' + toErBanNo + ')的聊天记录 首次接触时间: 首次接触情况: 聊天条目数0');
$.ajax({
type: "get",
url: "/admin/userChatMsgRecord/getDetail",
dataType: "json",
data: {
fromUid: fromUid,
toUid: toUid,
startTime: $('#startTime').val(),
endTime: $('#endTime').val(),
},
success: function (json) {
apiResult(json);
let data = json.data;
if (data) {
let firstTouchTime = data.firstTouchTime;
let isInitiative = data.isInitiative;
let chatMsgNum = data.chatMsgNum;
$('#modalLabel').html(fromNick + '(' + fromErBanNo + ')与' + toNick + '(' + toErBanNo + ')的聊天记录 首次接触时间:' + firstTouchTime + ' 首次接触情况:' + (isInitiative ? '被动回复' : '主动发起') + ' 聊天条目数:' + chatMsgNum);
}
}
});
$('#detailTable').bootstrapTable('destroy');
$('#detailTable').bootstrapTable({
columns: [

View File

@@ -179,6 +179,7 @@
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import { getConfigValueByKey } from '@/api/system/sysconf';
export default {
name: "NameplateInfoView",
@@ -603,20 +604,34 @@ function setStatusSelectOption() {
}
function setStyleTypeSelectOption() {
var rows = {
"1": '3344~8887送出',
"2": '3344~8887收到',
"3": '8887+送出',
"4": '8887+收到',
"5": 'CP铭牌审核送出',
"6": '粉丝团铭牌送出',
"7": '贵族等级铭牌送出'
};
console.log(rows);
for (var key in rows) {
$('#type').append('<option value="' + key + '">' + rows[key] + '</option>');
$('#type1').append('<option value="' + key + '">' + rows[key] + '</option>');
}
getConfigValueByKey({
'configId': 'heartbeat_nameplate',
}).then(res => {
let sysConf = res.data;
if (sysConf && sysConf.configValue) {
let data = JSON.parse(sysConf.configValue);
let floor = 52000;
let upper = 131400;
if (data.length == 2) {
floor = data[0];
upper = data[1];
}
var rows = {
'1': floor + '~' + (upper - 1) + '送出',
'2': floor + '~' + (upper - 1) + '收到',
'3': upper + '+送出',
'4': upper + '+收到',
'5': 'CP铭牌审核送出',
'6': '粉丝团铭牌送出',
'7': '贵族等级铭牌送出'
};
console.log(rows);
for (var key in rows) {
$('#type').append('<option value="' + key + '">' + rows[key] + '</option>');
$('#type1').append('<option value="' + key + '">' + rows[key] + '</option>');
}
}
});
}
function setTypeSelectOption() {

View File

@@ -267,8 +267,8 @@ export default {
}
const totalPrizeCount = normalPrizeCount * seniorPrizeCount + seniorPrizeCount;
const totalPrizeValue = normalPrizeTotalValue * seniorPrizeCount + seniorPrizeTotalValue;
const totalPrizeCount = (normalPrizeCount + seniorPrizeCount) * seniorPrizeCount;
const totalPrizeValue = (normalPrizeTotalValue + seniorPrizeCount) * seniorPrizeCount;
const luckyBagGiftId = $('#qLuckyBagId').val();
const luckyBagGoldPrice = luckyBagMap[luckyBagGiftId].goldPrice;
@@ -391,7 +391,7 @@ export default {
groupTableDom.append("<tbody>")
if (prizeItems != null && Array.isArray(prizeItems)) {
prizeItems.forEach((item, idx) => {
let accountingRate = item.num / (1 + statisticsDatas.normalPrizeCount) * 100;
let accountingRate = (poolType == POOL_TYPE.senior? 1: item.num) / (1 + statisticsDatas.normalPrizeCount) * 100;
const tds = [];
if (isEdit) {
tds.push(`<td><i class="glyphicon glyphicon-remove js-remove-item" data-idx="${idx}" data-pool-type="${poolType}"></i>${item.giftName}</td>`);

View File

@@ -0,0 +1,488 @@
<template>
<section class="content">
<div class="box box-danger">
<div class="box-body">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1 id="itemTitle"></h1>
</section>
<!-- .content -->
<section class="content">
<div id="configTable"></div>
</section><!-- .content -->
</div>
<div class="box-body" style="height:150%;">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1 id="browseTitle">官网访问数据-最近30天</h1>
</section>
<!-- .content -->
<div id="browseTable"></div>
</div>
</div>
</section>
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel" style="height: 100%; overflow: hidden; overflow: scroll;">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="modalLabel">H5官网配置</h4>
</div>
<div class="modal-body">
<form class="form-horizontal">
<input type="hidden" name="id" v-model="officialConfig.id" />
<div class="form-group">
<label class="col-sm-3 control-label">iOS下载配置</label>
<div class="col-sm-8">
</div>
</div>
<div class="form-group">
<label for="iosVersion" class="col-sm-3 control-label">iOS版本号:</label>
<div class="col-sm-8">
<input type="text" class="form-control validate[required]" name="categoryCode" id="categoryCode"
v-model="officialConfig.iosVersion" />
</div>
</div>
<div class="form-group">
<label for="iosSkipType" class="col-sm-3 control-label">iOS跳转类型:</label>
<div class="col-sm-8">
<select name="iosSkipType" id="iosSkipType" class="form-control" data-btn-class="btn-warning" v-model="officialConfig.iosSkipType">
<option value="0">AppStore</option>
<option value="1">其它H5链接</option>
</select>
</div>
</div>
<div class="form-group">
<label for="iosSkipUrl" class="col-sm-3 control-label">iOS跳转链接:</label>
<div class="col-sm-8">
<input type="text" class="form-control validate[required]" name="iosSkipUrl" id="iosSkipUrl"
v-model="officialConfig.iosSkipUrl" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Android下载配置</label>
<div class="col-sm-8">
</div>
</div>
<div class="form-group">
<label for="androidVersion" class="col-sm-3 control-label">Android版本号:</label>
<div class="col-sm-8">
<input type="text" class="form-control validate[required]" name="androidVersion" id="androidVersion"
v-model="officialConfig.androidVersion" />
</div>
</div>
<div class="form-group">
<label for="androidSkipType" class="col-sm-3 control-label">Android跳转类型:</label>
<div class="col-sm-8">
<select name="androidSkipType" id="androidSkipType" class="form-control" data-btn-class="btn-warning" v-model="officialConfig.androidSkipType">
<option value="0">GooglePlay</option>
<option value="1">直接下载Apk</option>
</select>
</div>
</div>
<div class="form-group" v-if="officialConfig.androidSkipType == 0">
<label for="androidSkipUrl" class="col-sm-3 control-label">Android跳转链接:</label>
<div class="col-sm-8">
<input type="text" class="form-control validate[required]" name="androidSkipUrl" id="androidSkipUrl"
v-model="officialConfig.androidSkipUrl" />
</div>
</div>
<div class="form-group">
<label for="androidNormalUrl" class="col-sm-3 control-label">Android常规包:</label>
<div class="col-sm-8">
<input type="file" id="normalFile" name="uploadFile" @change="changeFile($event)" v-if="officialConfig.androidNormalUrl == ''"/>
<span class="btn col-sm-4" id="normalUploadInfo" style="color:red;">{{ officialConfig.androidNormalUrl }}</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<button class="btn btn-default col-sm-4" type="button" id="normalUploadBtn" @click="uploadNormal" v-if="officialConfig.androidNormalUrl == ''">上传</button>
<button class="btn btn-danger col-sm-4" type="button" id="normalDelBtn" @click="delNormal" v-if="officialConfig.androidNormalUrl != ''">删除</button>
</div>
</div>
<div class="form-group">
<label for="androidReserveUrl" class="col-sm-3 control-label">Android备用包:</label>
<div class="col-sm-8">
<input type="file" id="reserveFile" name="uploadFile" v-if="officialConfig.androidReserveUrl == ''"/>
<span class="btn col-sm-4" id="reserveUploadInfo" style="color:red;">{{ officialConfig.androidReserveUrl }}</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<button class="btn btn-default col-sm-4" type="button" id="reserveUploadBtn" @click="uploadReserve" v-if="officialConfig.androidReserveUrl == ''">上传</button>
<button class="btn btn-danger col-sm-4" type="button" id="reserveDelBtn" @click="delReserve" v-if="officialConfig.androidReserveUrl != ''">删除</button>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系方式配置</label>
<div class="col-sm-8">
</div>
</div>
<div class="form-group">
<label for="contact0" class="col-sm-3 control-label">Wechat:</label>
<div class="col-sm-8">
<input type="text" class="form-control validate[required]" name="contact0" id="contact0"
v-model="officialConfig.contact0" />
</div>
</div>
<div class="form-group">
<label for="contact1" class="col-sm-3 control-label">Line:</label>
<div class="col-sm-8">
<input type="text" class="form-control validate[required]" name="contact1" id="contact1"
v-model="officialConfig.contact1" />
</div>
</div>
<div class="form-group">
<label for="contact2" class="col-sm-3 control-label">Email:</label>
<div class="col-sm-8">
<input type="text" class="form-control validate[required]" name="contact2" id="contact2"
v-model="officialConfig.contact2" />
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" id="save">保存</button>
</div>
</div>
</div>
</div>
</template>
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import { getOfficialConfigList, saveOfficialConfig } from '@/api/official/officialConfig';
import { browseFor30Days } from '@/api/official/officialRecord';
import { uploadQiNiuFile, uploadTencentFile } from '@/api/common/upload';
import { showLoading, hideLoading, apiResult, formatTime } from '@/utils/maintainer';
export default {
name: 'OfficialConfigView',
data() {
return {
files: {},
configColumns: [
{ field: 'iosVersion', title: 'iOS版本号', align: 'center', width: '15%' },
{
field: 'iosSkipType',
title: 'iOS跳转类型',
align: 'center',
width: '15%',
formatter: function (val, row, index) {
let value = '';
if (val == 0) {
value = 'AppStore';
} else {
value = '其它H5链接';
}
return value;
}
},
{ field: 'iosSkipUrl', title: 'iOS跳转链接', align: 'center', width: '15%' },
{ field: 'androidVersion', title: 'Android版本号', align: 'center', width: '15%' },
{
field: 'androidSkipType',
title: 'Android跳转类型',
align: 'center',
width: '15%',
formatter: function (val, row, index) {
let value = '';
if (val == 0) {
value = 'GooglePlay';
} else if (val == 1) {
value = '直接下载Apk';
}
return value;
}
},
{
field: 'android',
title: 'Android跳转链接',
align: 'center',
width: '15%',
formatter: function (val, row, index) {
let value = 'GooglePlay';
if (row.androidSkipUrl) {
value += row.androidSkipUrl;
} else {
value += '无';
}
value += '<br/>';
value += '常规包:';
if (row.androidNormalUrl) {
value += row.androidNormalUrl;
} else {
value += '无';
}
value += '<br/>';
value += '备用包:';
if (row.androidReserveUrl) {
value += row.androidReserveUrl;
} else {
value += '无';
}
value += '<br/>';
return value;
}
},
{
field: 'contact',
title: '联系方式',
align: 'center',
width: '15%',
formatter: function (val, row, index) {
let value = '';
value += 'Wechat';
if (row.contact0) {
value += row.contact0;
} else {
value += '无';
}
value += '<br/>';
value += 'Line';
if (row.contact1) {
value += row.contact1;
} else {
value += '无';
}
value += '<br/>';
value += 'Email';
if (row.contact2) {
value += row.contact2;
} else {
value += '无';
}
return value;
}
},
{
field: 'id',
title: '操作',
align: 'center',
width: '15%',
formatter: function (val, row, index) {
$('#itemTitle').html('<label class="col-sm-6 control-label">上次更新时间:' + formatTime(row.updateTime) + '</label>');
let value = '<button class="btn btn-sm btn-success opt-edit" data-id="' + val + '" data-index="' + index + '">编辑</button>';
return value;
}
}
],
browseColumns: [
{ field: 'dateTime', title: '日期', align: 'center', width: '15%' },
{ field: 'clientUv', title: '无线官网UV', align: 'center', width: '15%' },
{ field: 'clientPv', title: '无线官网PV', align: 'center', width: '15%' },
{ field: 'iosDownloadPv', title: '无线 iOS下载点击次数', align: 'center', width: '15%' },
{ field: 'androidDownloadPv', title: '无线 安卓下载点击次数', align: 'center', width: '15%' },
{ field: 'pcUv', title: 'PC官网UV', align: 'center', width: '15%' },
{ field: 'pcPv', title: 'PC官网PV', align: 'center', width: '15%' },
{ field: 'pcIosDownloadPv', title: 'PC iOS下载点击次数', align: 'center', width: '15%' },
{ field: 'pcAndroidDownloadPv', title: 'PC 安卓下载点击次数', align: 'center', width: '15%' },
],
officialConfig: {
id: 0,
iosVersion: '',
iosSkipType: 0,
iosSkipUrl: '',
androidVersion: '',
androidSkipType: 0,
androidSkipUrl: '',
androidNormalUrl: '',
androidReserveUrl: '',
contact0: '',
contact1: '',
contact2: '',
},
};
},
created() {
this.init();
this.getBrowse();
},
methods: {
changeFile(event) {
console.log(event);
let target = event.target;
let id = target.id;
this.files[id] = target.files[0];
},
uploadNormal() {
let $this = this;
showLoading();
uploadQiNiuFile($this.files['normalFile']).then(res => {
let path = res.data;
console.log(path);
if (path) {
$this.officialConfig.androidNormalUrl = path;
}
hideLoading();
}).catch(e => {
console.error(e);
hideLoading();
});
},
uploadReserve() {
let $this = this;
let file = $('#reserveFile').val();
if (file && file.length > 0) {
showLoading();
uploadTencentFile('reserveFile').then(res => {
let path = res.data;
if (path) {
$this.officialConfig.androidReserveUrl = path;
}
}).finally(() => {
hideLoading();
});
}
},
init() {
this.$nextTick(function () {
let $this = this;
$this.initTable();
$('#addBtn').click(function () {
$this.add();
});
$('#configTable').on('click', '.opt-edit', function () {
$this.edit(this);
});
$('#save').click(function () {
$this.save();
});
});
},
initTable() {
let $this = this;
TableHelper.destroy('#configTable');
$('#configTable').bootstrapTable({
columns: $this.configColumns,
cache: false,
striped: true,
showRefresh: false,
pageSize: 10,
pagination: true,
pageList: [1, 10, 20, 30, 50],
search: false,
sidePagination: 'server',
queryParamsType: 'undefined',
queryParams: function queryParams(params) {
var param = {
pageNum: params.pageNumber,
pageSize: params.pageSize,
};
return param;
},
ajax:function(request){
getOfficialConfigList(request.data).then(res => {
let data = res.data;
request.success({
'rows': data,
'total': data.length,
});
});
},
toolbar: '#toolbar',
});
TableHelper.destroy('#browseTable');
$('#browseTable').bootstrapTable({
columns: $this.browseColumns,
cache: false,
striped: true,
showRefresh: false,
search: false,
pageSize: 10,
pagination: true,
pageList: [1, 10, 20, 30, 50],
sidePagination: "client",
queryParamsType: "undefined",
});
},
getBrowse() {
browseFor30Days().then(res => {
let data = res.data;
TableHelper.load('#browseTable', data);
});
},
delNormal() {
this.officialConfig.androidNormalUrl = '';
},
delReserve() {
this.officialConfig.androidReserveUrl = '';
},
add() {
this.officialConfig.id = 0;
this.officialConfig.iosVersion = '';
this.officialConfig.iosSkipType = 0;
this.officialConfig.iosSkipUrl = '';
this.officialConfig.androidVersion = '';
this.officialConfig.androidSkipType = 0;
this.officialConfig.androidSkipUrl = '';
this.officialConfig.androidNormalUrl = '';
this.officialConfig.androidReserveUrl = '';
this.officialConfig.contact0 = '';
this.officialConfig.contact1 = '';
this.officialConfig.contact2 = '';
this.show();
},
edit(obj) {
const index = $(obj).data('index');
const record = TableHelper.getData('#configTable')[index];
this.officialConfig.id = record.id;
this.officialConfig.iosVersion = record.iosVersion;
this.officialConfig.iosSkipType = record.iosSkipType;
this.officialConfig.iosSkipUrl = record.iosSkipUrl;
this.officialConfig.androidVersion = record.androidVersion;
this.officialConfig.androidSkipType = record.androidSkipType;
this.officialConfig.androidSkipUrl = record.androidSkipUrl;
this.officialConfig.androidNormalUrl = record.androidNormalUrl;
this.officialConfig.androidReserveUrl = record.androidReserveUrl;
this.officialConfig.contact0 = record.contact0;
this.officialConfig.contact1 = record.contact1;
this.officialConfig.contact2 = record.contact2;
this.show();
},
show() {
$('#normalFile').attr('src', '');
$('#reserveFile').attr('src', '');
$('#editModal').modal('show');
},
save() {
let data = {
id: new Number(this.officialConfig.id),
iosVersion: this.officialConfig.iosVersion,
iosSkipType: new Number(this.officialConfig.iosSkipType),
iosSkipUrl: this.officialConfig.iosSkipUrl,
androidVersion: this.officialConfig.androidVersion,
androidSkipType: new Number(this.officialConfig.androidSkipType),
androidSkipUrl: this.officialConfig.androidSkipUrl,
androidNormalUrl: this.officialConfig.androidNormalUrl,
androidReserveUrl: this.officialConfig.androidReserveUrl,
contact0: this.officialConfig.contact0,
contact1: this.officialConfig.contact1,
contact2: this.officialConfig.contact2,
};
if (data.id == 0) {
data.id = null;
}
if (!(data.androidNormalUrl != '') && !(data.androidReserveUrl != '')) {
$("#tipMsg").text("android未配置apk包");
$("#tipModal").modal('show');
return;
}
saveOfficialConfig(data).then(res => {
console.log(res);
apiResult(res);
TableHelper.doRefresh('#configTable');
TableHelper.doRefresh('#browseTable');
$('#editModal').modal('hide');
});
},
},
}
</script>
<style scoped></style>

View File

@@ -243,22 +243,15 @@ export default {
};
},
created() {
this.$nextTick(function () {
this.initData();
});
this.initData();
},
methods: {
initData() {
$(function () {
this.$nextTick(function () {
// 定义线上礼物数据、装扮类型、具体装扮数据数组盒用于ajax请求获取到的数据存储
var onlineGift = [], dress = [], car = [], background = [];
var giftID = null;
var param = {
id: '',
prizeType: '',
@@ -271,8 +264,6 @@ export default {
actualValue: ''
}
var main = {
init: function () {
this.eventRegister();
@@ -280,432 +271,6 @@ export default {
},
eventRegister: function () {
// 搜索按钮点击事件
$('#searchBtn').click(function () {
TableHelper.doRefresh('#table');
});
// $('#table').on('click',function() {
// TableHelper.doRefresh('#table');
// });
// 编辑按钮点击事件
$('#table').on('click', '.opt-edit', function () {
clearModal();
$('#awardModal').modal('show');
var id = parseInt($(this).data('id'))
isEdit = true;
if (id == 'undefined' || !id) {
return;
}
$('#addModalLabel').hide();
var data = $('#table').bootstrapTable('getRowByUniqueId', id);
var $prizeId;
switch (data.prizeType) {
case 1:
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').hide();//装扮类型
$('#awardModal').find('.realDressType').hide();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
$('.awardAvatar').find('#imgUrl').attr('src', data.prizeImgUrl);
break;
case 2:
$('#awardModal').find('.awardChoose').show();//选择礼物
$('#awardModal').find('.dressType').hide();//装扮类型
$('#awardModal').find('.realDressType').hide();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
$('#awardChoose').combobox();
var $prizeName = $('#awardChoose').find('option[value=' + data.referenceId + ']').text();
$('.awardChoose').find('input[type=text]').val($prizeName);
break;
case 3:
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').show();//装扮类型
$('#awardModal').find('.headwearGift').show();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
$('.carGift').show();
$('.headwearGift').hide();
$('.backgroundGift').hide();
$('#dressType option[value=' + data.prizeType + ']').attr('selected', true).siblings().attr('selected', false);
$('.carContent').find('option[value=' + data.referenceId + ']').attr('selected', true).siblings().attr('selected', false);
$prizeId = $('.carContent').find('option[value=' + data.referenceId + ']').text();
$('.carGift').find('input[type=text]').val($prizeId);
break;
case 4:
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').show();//装扮类型
$('#awardModal').find('.headwearGift').show();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
$('.carGift').hide();
$('.headwearGift').show();
$('.backgroundGift').hide();
$('#dressType').val(data.prizeType);
$('.headwearContent').find('option[value=' + data.referenceId + ']').attr('selected', true).siblings().attr('selected', false);
$prizeId = $('.headwearContent').find('option[value=' + data.referenceId + ']').text();
$('.headwearGift').find('input[type=text]').val($prizeId);
break;
case 5:
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').show();//装扮类型
$('#awardModal').find('.headwearGift').show();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
$('.carGift').hide();
$('.headwearGift').hide();
$('.backgroundGift').show();
$('#dressType option[value=' + data.prizeType + ']').attr('selected', true).siblings().attr('selected', false);
$('.backgroundContent').find('option[value=' + data.referenceId + ']').attr('selected', true).siblings().attr('selected', false);
$prizeId = $('.backgroundContent').find('option[value=' + data.referenceId + ']').text();
$('.backgroundGift').find('input[type=text]').val($prizeId);
break;
case 6:
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').hide();//装扮类型
$('#awardModal').find('.realDressType').hide();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
$('.awardAvatar').find('#imgUrl').attr('src', data.priceImgUrl);
break;
case 7:
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').show();//装扮类型
$('#awardModal').find('.realDressType').show();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').show();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
// $('.validity');
break;
}
$('.giftName').find('#giftName').val(data.prizeName);
$('.platformPrice').find('#platformPrice').val(data.platformValue);
$('.realPrice').find('#realPrice').val(data.actualValue);
console.log(data.prizeLevel);
$('.awardLevel').find('select').val(data.prizeLevel);
$('#imgUrl').attr('src', data.prizeImgUrl);
$('#creator').val(data.creator);
$('#addForm').data('wpId', data.id);
$('#addForm').data('wpType', data.prizeType);
$('#addForm').data('referenceID', data.referenceId);
});
// 添加事件
$('#add').on('click', function () {
isEdit = false;
clearModal();
$('#awardChoose').combobox();
// $('.carContent').combobox();
// $('.headwearContent').combobox();
// $('.backgroundContent').combobox();
$('#addType').find('option[value=budGold]').attr('selected', true).siblings().attr('selected', false);
$('#addModalLabel').show();
$('#awardModal').modal('show');
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').hide();//装扮类型
$('#awardModal').find('.realDressType').hide();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
$('#awardModal').find('.awardLevel select option[value=1]').attr('selected', true).siblings().attr('selected', false);
});
// select框监听事件
$('#addModalLabel').on('change', 'select', function () {
// var budGold = budGold();
// console.log(budGold);
clearModal();
switch ($(this).val()) {
case 'budGold':
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').hide();//装扮类型
$('#awardModal').find('.realDressType').hide();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
break;
case 'onlineGift':
$('#awardModal').find('.awardChoose').show();//选择礼物
$('#awardModal').find('.dressType').hide();//装扮类型
$('#awardModal').find('.realDressType').hide();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
break;
case 'dress':
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').show();//装扮类型
$('#awardModal').find('.headwearGift').show();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
$('.carGift').hide();
$('.backgroundGift').hide();
break;
case 'entityGift':
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').hide();//装扮类型
$('#awardModal').find('.realDressType').hide();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
break;
case 'virtualCurrency':
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').hide();//装扮类型
$('#awardModal').find('.realDressType').hide();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
break;
case 'beautiful':
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').show();//装扮类型
$('#awardModal').find('.realDressType').show();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').show();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
break;
}
});
$('#dressType').on('change', function () {
switch ($(this).val()) {
case '3':
$('.carGift').show();
$('.headwearGift').hide();
$('.backgroundGift').hide();
$('#carContent').val('');
break;
case '4':
$('.carGift').hide();
$('.headwearGift').show();
$('.backgroundGift').hide();
$('#headwearContent').val('');
break;
case '5':
$('.carGift').hide();
$('.headwearGift').hide();
$('.backgroundGift').show();
$('#backgroundContent').val('');
break;
}
});
$('.realDressType').find('.carContent').on('change', function () {
giftID = $('.carContent').val();
console.log(giftID);
});
$('.realDressType').find('.headwearContent').on('change', function () {
giftID = $('.headwearContent').val();
console.log(giftID);
});
$('.realDressType').find('.backgroundContent').on('change', function () {
giftID = $('.backgroundContent').val();
console.log(giftID);
});
// 上传图片
$('#uploadBtn').on('click', function () {
if ($('#uploadFile').val() == '') {
$('#tipMsg').text('上传图片为空');
$('#tipModal').modal('show');
return;
}
var options = {
type: 'post',
url: '/admin/upload/img',
dataType: 'json',
success: function (res) {
if (res.path) {
$('#alertWinPic').val(res.path);
$('#imgUrl').attr('src', res.path);
console.log(res.path);
} else {
$('#tipMsg').text(res.msg);
$('#tipModal').modal('show');
}
}
}
$('#addForm').ajaxSubmit(options);
});
// 保存
$('#save').on('click', function () {
if ($('#addForm').validationEngine('validate')) {
var $referenceId;
var $prizeType = null;
if ($('#addModalLabel').css('display') == 'block') {
switch ($('#addType').val()) {
case 'budGold':
$prizeType = '1';
$referenceId = 0;
break;
case 'onlineGift':
$prizeType = '2';
$referenceId = parseInt($('#awardChoose').siblings('.combobox-container').find('input:hidden').val())
break;
case 'dress':
$prizeType = $('#dressType').val();
// $referenceId = parseInt($('#realDressType').siblings('.combobox-container').find('input:hidden').val())
if ($prizeType == '3') {
$referenceId = parseInt($('.carGift').find('select').val())
} else if ($prizeType == '4') {
$referenceId = parseInt($('.headwearGift').find('select').val());
} else if ($prizeType == '5') {
$referenceId = parseInt($('.backgroundGift').find('select').val());
}
// $referenceId = $('#realDressType').val();
break;
case 'entityGift':
$prizeType = '6';
$referenceId = 0;
break;
case 'virtualCurrency':
$prizeType = '15';
$referenceId = 0;
break;
}
param.prizeType = $prizeType;
param.referenceId = $referenceId;
// giftID = $('#realDressType').find('option').attr('selected',true).val();
// console.log(giftID,$('#realDressType').val());
} else {
param.prizeType = $('#addForm').data('wpType');
param.referenceId = $('#addForm').data('referenceID');
param.id = $('#addForm').data('wpId');
}
param.prizeImgUrl = $('#imgUrl').attr('src');
param.prizeLevel = $('#awardLevel').val();
param.creator = $('#creator').val();
param.prizeName = $('#giftName').val();
param.platformValue = $('#platformPrice').val();
param.actualValue = $('#realPrice').val();
if (param.prizeLevel == '' || param.prizeLevel == 'undefined' || param.creator == '' || param.creator == 'undefined') {
$('#tipMsg').text('等级选择栏不能为空')
$('#tipModal').modal('show');
}
$.ajax({
type: 'post',
url: '/admin/prize/save',
data: {
id: param.id,
prizeType: param.prizeType,
prizeName: param.prizeName,
prizeImgUrl: param.prizeImgUrl,
referenceId: param.referenceId,
prizeLevel: param.prizeLevel,
creator: param.creator,
platFormValue: param.platformValue,
actualValue: param.actualValue
},
dataType: 'json',
success: function (res) {
if (res.code == 200) {
$('#awardModal').modal('hide');
$('#tipMsg').text('保存成功');
$('#tipModal').modal('show');
TableHelper.doRefresh('#table')
} else {
$('#tipMsg').text('保存失败,错误码:' + res.message);
$('#tipModal').modal('show');
}
}
})
}
});
},
@@ -776,9 +341,7 @@ export default {
}
};
main.init();
var isEdit = false;
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
@@ -795,35 +358,35 @@ export default {
switch (val) {
case 1:
return '<p>金币</p>';
case 2:
return '<p>在线礼物</p>';
case 3:
return '<p>座驾</p>';
case 4:
return '<p>头饰</p>';
case 5:
return '<p>背景</p>';
case 6:
return '<p>实物</p>';
case 7:
return '<p>靓号</p>';
case 15:
return '<p>虚拟货币</p>';
}
}
},
@@ -887,9 +450,6 @@ export default {
}
});
function clearModal() {
$('#addForm').find('input[type=text],select,input[type=hidden]').each(function () {
$(this).val('');
@@ -900,8 +460,433 @@ export default {
}
// 搜索按钮点击事件
})
$('#searchBtn').click(function () {
TableHelper.doRefresh('#table');
});
// $('#table').on('click',function() {
// TableHelper.doRefresh('#table');
// });
// 编辑按钮点击事件
$('#table').on('click', '.opt-edit', function () {
clearModal();
$('#awardModal').modal('show');
var id = parseInt($(this).data('id'))
isEdit = true;
if (id == 'undefined' || !id) {
return;
}
$('#addModalLabel').hide();
var data = $('#table').bootstrapTable('getRowByUniqueId', id);
var $prizeId;
switch (data.prizeType) {
case 1:
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').hide();//装扮类型
$('#awardModal').find('.realDressType').hide();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
$('.awardAvatar').find('#imgUrl').attr('src', data.prizeImgUrl);
break;
case 2:
$('#awardModal').find('.awardChoose').show();//选择礼物
$('#awardModal').find('.dressType').hide();//装扮类型
$('#awardModal').find('.realDressType').hide();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
$('#awardChoose').combobox();
var $prizeName = $('#awardChoose').find('option[value=' + data.referenceId + ']').text();
$('.awardChoose').find('input[type=text]').val($prizeName);
break;
case 3:
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').show();//装扮类型
$('#awardModal').find('.headwearGift').show();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
$('.carGift').show();
$('.headwearGift').hide();
$('.backgroundGift').hide();
$('#dressType option[value=' + data.prizeType + ']').attr('selected', true).siblings().attr('selected', false);
$('.carContent').find('option[value=' + data.referenceId + ']').attr('selected', true).siblings().attr('selected', false);
$prizeId = $('.carContent').find('option[value=' + data.referenceId + ']').text();
$('.carGift').find('input[type=text]').val($prizeId);
break;
case 4:
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').show();//装扮类型
$('#awardModal').find('.headwearGift').show();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
$('.carGift').hide();
$('.headwearGift').show();
$('.backgroundGift').hide();
$('#dressType').val(data.prizeType);
$('.headwearContent').find('option[value=' + data.referenceId + ']').attr('selected', true).siblings().attr('selected', false);
$prizeId = $('.headwearContent').find('option[value=' + data.referenceId + ']').text();
$('.headwearGift').find('input[type=text]').val($prizeId);
break;
case 5:
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').show();//装扮类型
$('#awardModal').find('.headwearGift').show();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
$('.carGift').hide();
$('.headwearGift').hide();
$('.backgroundGift').show();
$('#dressType option[value=' + data.prizeType + ']').attr('selected', true).siblings().attr('selected', false);
$('.backgroundContent').find('option[value=' + data.referenceId + ']').attr('selected', true).siblings().attr('selected', false);
$prizeId = $('.backgroundContent').find('option[value=' + data.referenceId + ']').text();
$('.backgroundGift').find('input[type=text]').val($prizeId);
break;
case 6:
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').hide();//装扮类型
$('#awardModal').find('.realDressType').hide();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
$('.awardAvatar').find('#imgUrl').attr('src', data.priceImgUrl);
break;
case 7:
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').show();//装扮类型
$('#awardModal').find('.realDressType').show();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').show();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
// $('.validity');
break;
}
$('.giftName').find('#giftName').val(data.prizeName);
$('.platformPrice').find('#platformPrice').val(data.platformValue);
$('.realPrice').find('#realPrice').val(data.actualValue);
console.log(data.prizeLevel);
$('.awardLevel').find('select').val(data.prizeLevel);
$('#imgUrl').attr('src', data.prizeImgUrl);
$('#creator').val(data.creator);
$('#addForm').data('wpId', data.id);
$('#addForm').data('wpType', data.prizeType);
$('#addForm').data('referenceID', data.referenceId);
});
// 添加事件
$('#add').on('click', function () {
isEdit = false;
clearModal();
$('#awardChoose').combobox();
// $('.carContent').combobox();
// $('.headwearContent').combobox();
// $('.backgroundContent').combobox();
$('#addType').find('option[value=budGold]').attr('selected', true).siblings().attr('selected', false);
$('#addModalLabel').show();
$('#awardModal').modal('show');
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').hide();//装扮类型
$('#awardModal').find('.realDressType').hide();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
$('#awardModal').find('.awardLevel select option[value=1]').attr('selected', true).siblings().attr('selected', false);
});
// select框监听事件
$('#addModalLabel').on('change', 'select', function () {
// var budGold = budGold();
// console.log(budGold);
clearModal();
switch ($(this).val()) {
case 'budGold':
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').hide();//装扮类型
$('#awardModal').find('.realDressType').hide();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
break;
case 'onlineGift':
$('#awardModal').find('.awardChoose').show();//选择礼物
$('#awardModal').find('.dressType').hide();//装扮类型
$('#awardModal').find('.realDressType').hide();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
break;
case 'dress':
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').show();//装扮类型
$('#awardModal').find('.headwearGift').show();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
$('.carGift').hide();
$('.backgroundGift').hide();
break;
case 'entityGift':
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').hide();//装扮类型
$('#awardModal').find('.realDressType').hide();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
break;
case 'virtualCurrency':
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').hide();//装扮类型
$('#awardModal').find('.realDressType').hide();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').hide();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
break;
case 'beautiful':
$('#awardModal').find('.awardChoose').hide();//选择礼物
$('#awardModal').find('.dressType').show();//装扮类型
$('#awardModal').find('.realDressType').show();//具体装扮
$('#awardModal').find('.giftName').show();//礼物名称
$('#awardModal').find('.awardAvatar').show();//礼物图片
$('#awardModal').find('.validity').show();//靓号有效期
$('#awardModal').find('.platformPrice').show();//平台价值
$('#awardModal').find('.realPrice').show();//实际价值
$('#awardModal').find('.awardLevel').show();//礼物等级
break;
}
});
$('#dressType').on('change', function () {
switch ($(this).val()) {
case '3':
$('.carGift').show();
$('.headwearGift').hide();
$('.backgroundGift').hide();
$('#carContent').val('');
break;
case '4':
$('.carGift').hide();
$('.headwearGift').show();
$('.backgroundGift').hide();
$('#headwearContent').val('');
break;
case '5':
$('.carGift').hide();
$('.headwearGift').hide();
$('.backgroundGift').show();
$('#backgroundContent').val('');
break;
}
});
$('.realDressType').find('.carContent').on('change', function () {
giftID = $('.carContent').val();
console.log(giftID);
});
$('.realDressType').find('.headwearContent').on('change', function () {
giftID = $('.headwearContent').val();
console.log(giftID);
});
$('.realDressType').find('.backgroundContent').on('change', function () {
giftID = $('.backgroundContent').val();
console.log(giftID);
});
// 上传图片
$('#uploadBtn').on('click', function () {
if ($('#uploadFile').val() == '') {
$('#tipMsg').text('上传图片为空');
$('#tipModal').modal('show');
return;
}
var options = {
type: 'post',
url: '/admin/upload/img',
dataType: 'json',
success: function (res) {
if (res.path) {
$('#alertWinPic').val(res.path);
$('#imgUrl').attr('src', res.path);
console.log(res.path);
} else {
$('#tipMsg').text(res.msg);
$('#tipModal').modal('show');
}
}
}
$('#addForm').ajaxSubmit(options);
});
// 保存
$('#save').on('click', function () {
if ($('#addForm').validationEngine('validate')) {
var $referenceId;
var $prizeType = null;
if ($('#addModalLabel').css('display') == 'block') {
switch ($('#addType').val()) {
case 'budGold':
$prizeType = '1';
$referenceId = 0;
break;
case 'onlineGift':
$prizeType = '2';
$referenceId = parseInt($('#awardChoose').siblings('.combobox-container').find('input:hidden').val())
break;
case 'dress':
$prizeType = $('#dressType').val();
// $referenceId = parseInt($('#realDressType').siblings('.combobox-container').find('input:hidden').val())
if ($prizeType == '3') {
$referenceId = parseInt($('.carGift').find('select').val())
} else if ($prizeType == '4') {
$referenceId = parseInt($('.headwearGift').find('select').val());
} else if ($prizeType == '5') {
$referenceId = parseInt($('.backgroundGift').find('select').val());
}
// $referenceId = $('#realDressType').val();
break;
case 'entityGift':
$prizeType = '6';
$referenceId = 0;
break;
case 'virtualCurrency':
$prizeType = '15';
$referenceId = 0;
break;
}
param.prizeType = $prizeType;
param.referenceId = $referenceId;
// giftID = $('#realDressType').find('option').attr('selected',true).val();
// console.log(giftID,$('#realDressType').val());
} else {
param.prizeType = $('#addForm').data('wpType');
param.referenceId = $('#addForm').data('referenceID');
param.id = $('#addForm').data('wpId');
}
param.prizeImgUrl = $('#imgUrl').attr('src');
param.prizeLevel = $('#awardLevel').val();
param.creator = $('#creator').val();
param.prizeName = $('#giftName').val();
param.platformValue = $('#platformPrice').val();
param.actualValue = $('#realPrice').val();
if (param.prizeLevel == '' || param.prizeLevel == 'undefined' || param.creator == '' || param.creator == 'undefined') {
$('#tipMsg').text('等级选择栏不能为空')
$('#tipModal').modal('show');
}
$.ajax({
type: 'post',
url: '/admin/prize/save',
data: {
id: param.id,
prizeType: param.prizeType,
prizeName: param.prizeName,
prizeImgUrl: param.prizeImgUrl,
referenceId: param.referenceId,
prizeLevel: param.prizeLevel,
creator: param.creator,
platFormValue: param.platformValue,
actualValue: param.actualValue
},
dataType: 'json',
success: function (res) {
if (res.code == 200) {
$('#awardModal').modal('hide');
$('#tipMsg').text('保存成功');
$('#tipModal').modal('show');
TableHelper.doRefresh('#table')
} else {
$('#tipMsg').text('保存失败,错误码:' + res.message);
$('#tipModal').modal('show');
}
}
})
}
});
});
}
},

File diff suppressed because it is too large Load Diff

View File

@@ -65,14 +65,7 @@ export default {
},
eventRegister: function () {
// 筛选按钮点击事件
$('#searchBtn').on('click', function () {
TableHelper.doRefresh('#table');
});
$("#exportBtn").on('click', function () {
$("#searchForm").submit();
})
},
getDataFromBack: function () {
@@ -170,6 +163,14 @@ export default {
console.log('load fail');
}
});
// 筛选按钮点击事件
$('#searchBtn').on('click', function () {
TableHelper.doRefresh('#table');
});
$("#exportBtn").on('click', function () {
$("#searchForm").submit();
})
})
}
},

View File

@@ -51,9 +51,9 @@
<label for="qChannel">app渠道</label>
<input type="text" class="form-control" name="appChannel" id="qAppChannel">
</div>
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
<button id="btnExport" class="btn btn-sm btn-primary">导出</button>
</form>
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
<button id="btnExport" class="btn btn-sm btn-primary">导出</button>
</div>
<!-- .content -->
<div class="content" id="table"></div>

View File

@@ -0,0 +1,411 @@
<!-- eslint-disable vue/valid-v-slot -->
<template>
<div class="outer">
<!-- 按钮 -->
<div class="buttonBox">
<el-button @click="addClick()" class="primary" type="primary" size="default"
style="margin-right: 10px">新增</el-button>
</div>
<!-- 表格 -->
<el-table :data="tableData" border style="width: 100%; margin-top: 25px">
<el-table-column align="center" prop="id" label="资源位ID" />
<el-table-column align="center" prop="name" label="入口名称" />
<el-table-column align="center" prop="icon" label="入口icon">
<template v-slot="scope">
<el-image style="width: 100px; height: 100px" :src="scope.row.icon" :zoom-rate="1.1"
:preview-src-list="[scope.row.icon]" fit="cover" preview-teleported="true"
hide-on-click-modal="true" />
</template>
</el-table-column>
<el-table-column align="center" prop="skipType" label="跳转">
<template v-slot="scope">
<span>{{ scope.row.skipType == 1 ? "native" : (scope.row.skipType == 2 ? "房间" : scope.row.skipType == 3
? "H5" : "") }}</span>
<br />
<span>{{ scope.row.skipContent }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="生效时间">
<template v-slot="scope">
<span>{{ scope.row.startTime == null && scope.row.endTime ? "不限" : (scope.row.startTime + "~" +
(scope.row.endTime == null ? "不限" : scope.row.endTime)) }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="生效开关">
<template v-slot="scope">
<el-switch v-model="scope.row.enabled" @click="switchClick(scope.row.id)" />
</template>
</el-table-column>
<el-table-column align="center" prop="seqNo" label="排序" />
<el-table-column align="center" prop="USER_LEVEL" label="可见等级" :formatter="ruleJsonFormatter" />
<el-table-column align="center" prop="PLATFORM" label="生效平台" :formatter="ruleJsonFormatter" />
<el-table-column align="center" prop="IOS" label="iOS版本号" :formatter="ruleJsonFormatter" />
<el-table-column align="center" prop="ANDROID" label="安卓版本号" :formatter="ruleJsonFormatter" />
<el-table-column align="center" prop="NOT_CHANNELS" label="不展示渠道" :formatter="ruleJsonFormatter" />
<el-table-column align="center" label="操作" width="200">
<template v-slot="scope">
<el-button @click="editClick(scope.row)" class="primary" type="primary" size="default">编辑</el-button>
<el-button @click="delClick(scope.row)" class="danger" type="danger" size="default"
v-if="scope.row.skipType != 1">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination style="margin-top: 10px" class="paginationClass" v-model:current-page="currentPage"
v-model:page-size="pageSize" :page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500]" :small="small"
:disabled="disabled" :background="background" layout="sizes, prev, pager, next" :total="totals"
@size-change="handleSizeChange" @current-change="handleCurrentChange" />
<!-- 编辑弹窗 -->
<el-dialog v-model="editDialog" title="房间内角标入口配置" width="50%" center>
<div style="margin-bottom: 25px">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">入口名称</span>
<el-input v-model="resource.name" style="width: 75%" class="input" placeholder="请输入入口名称"
:disabled="resource.skipType == 1"></el-input>
</div>
<div style="margin-bottom: 25px">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">icon</span>
<input type="hidden" class="form-control" name="icon" v-model="resource.icon" />
<img :src="resource.icon" style="width:120px;" />
<input type="file" style="width: 26%; display: inline-block;" id="iconFile" name="uploadFile" />
</div>
<div style="margin-bottom: 25px">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label"></span>
<button class="btn btn-success col-sm-4" type="button" id="iconUploadBtn" @click="uploadIcon()">上传</button>
<span class="btn col-sm-4" id="iconUploadInfo" style="color:red;"></span>
</div>
<div style="margin-bottom: 25px;margin-top: 70px;">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">跳转位置</span>
<el-select v-model="resource.skipType" style="width: 75%" placeholder="请选择" :disabled="resource.id != null && resource.skipType == 1">
<el-option v-for="item in options" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
</div>
<div style="margin-bottom: 25px" v-if="resource.skipType == 1">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">资源编码</span>
<el-input v-model="resource.code" style="width: 75%" class="input" :placeholder="请输入资源编码"></el-input>
</div>
<div style="margin-bottom: 25px" v-if="resource.skipType == 3">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">展示方式</span>
<el-select v-model="resource.showType" style="width: 75%" placeholder="请选择">
<el-option v-for="item in showTypeOptions" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
</div>
<div style="margin-bottom: 25px" v-if="resource.skipType == 2 || resource.skipType == 3">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">{{ resource.skipType
== 3 ? "跳转链接" :
(resource.skipType == 2 ? "跳转房间" : "") }}</span>
<el-input v-model="resource.skipContent" style="width: 75%" class="input"
:placeholder="[resource.skipType == 3 ? '请输入跳转链接' : (resource.skipType == 2 ? '请输入房间ID' : '')]"></el-input>
</div>
<div style="margin-bottom: 25px;margin-top: 70px;">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">生效时间</span>
<el-date-picker v-model="resource.startTime" type="datetime" placeholder="选择日期时间">
</el-date-picker>
</div>
<div style="margin-bottom: 25px">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">失效时间</span>
<el-date-picker v-model="resource.endTime" type="datetime" placeholder="选择日期时间">
</el-date-picker>
</div>
<div style="margin-bottom: 25px">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">排序</span>
<el-input v-model="resource.seqNo" style="width: 75%" class="input" placeholder="请输入排序"></el-input>
</div>
<div style="margin-bottom: 25px" v-for="(rule, index) in rules" :key="rule" :index="index">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label" v-if="(rule.ruleCode == 'NOT_CHANNELS' || rule.ruleCode == 'PLATFORM' || rule.ruleCode == 'USER_LEVEL') || (!resource.ruleValue['PLATFORM'] || resource.ruleValue['PLATFORM'] == '' || resource.ruleValue['PLATFORM'] == 'null') || ((rule.ruleCode == 'IOS_LOW_VERSION' && resource.ruleValue['PLATFORM'] == 'ios') || (rule.ruleCode == 'IOS_HIGH_VERSION' && resource.ruleValue['PLATFORM'] == 'ios') || (rule.ruleCode == 'ANDROID_LOW_VERSION' && resource.ruleValue['PLATFORM'] == 'android') || (rule.ruleCode == 'ANDROID_HIGH_VERSION' && resource.ruleValue['PLATFORM'] == 'android'))">{{ rule.ruleName
}}</span>
<el-input v-model="resource.ruleValue[rule.ruleCode]" style="width: 75%" class="input"
:placeholder="rule.description" v-if="rule.ruleKind != 'IN' && ((rule.ruleCode == 'NOT_CHANNELS' || rule.ruleCode == 'PLATFORM' || rule.ruleCode == 'USER_LEVEL') || (!resource.ruleValue['PLATFORM'] || resource.ruleValue['PLATFORM'] == '' || resource.ruleValue['PLATFORM'] == 'null' || (rule.ruleCode == 'IOS_LOW_VERSION' && resource.ruleValue['PLATFORM'] == 'ios') || (rule.ruleCode == 'IOS_HIGH_VERSION' && resource.ruleValue['PLATFORM'] == 'ios') || (rule.ruleCode == 'ANDROID_LOW_VERSION' && resource.ruleValue['PLATFORM'] == 'android') || (rule.ruleCode == 'ANDROID_HIGH_VERSION' && resource.ruleValue['PLATFORM'] == 'android')))"></el-input>
<el-select v-model="resource.ruleValue[rule.ruleCode]" style="width: 75%" placeholder="请选择"
v-if="rule.ruleKind == 'IN'">
<el-option label="全部" :value="''"></el-option>
<el-option v-for="value in rule.ruleValue.split(',')" :key="value" :label="value"
:value="value"></el-option>
</el-select>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="editDialog = false">取消</el-button>
<el-button type="primary" @click="editDialogClick()"> 确认 </el-button>
</span>
</template>
</el-dialog>
<!-- 公共二次确认删除弹窗 -->
<el-dialog v-model="delDialog" title="提示" width="30%" center>
<span> {{ delDialogText }}</span>
<template #footer>
<span class="dialog-footer">
<el-button @click="delDialog = false">取消</el-button>
<el-button type="primary" @click="delClick()"> 确认 </el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import { getResourcePage, delResource, saveResource, effective } from "@/api/resource/resource";
import { getResourceRuleList } from '@/api/resource/resourceRule';
import { uploadFile } from '@/api/common/upload';
import { hideLoading, showLoading } from "@/utils/maintainer";
import { ElMessage } from "element-plus";
export default {
name: "GamePlayView",
data() {
return {
totals: 100, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
delDialog: false,
delDialogText: "确认要删除资源位吗?",
editDialog: false,
options: [
{
value: 0,
label: "无"
},
{
value: 1,
label: "NATIVE自定义"
},
{
value: 3,
label: "H5"
},
],
showTypeOptions: [
{
value: 1,
label: "全屏"
},
{
value: 2,
label: "半屏"
},
],
tableData: [], //表单数据存放
rules: [],
resource: {
id: null,
code: '',
name: '',
icon: '',
skipType: 0,
showType: 1,
skipContent: '',
url: '',
startTime: null,
endTime: null,
seqNo: 0,
ruleValue: {}
},
imageUrl: '',
};
},
setup() {
return {};
},
created() {
this.getRule();
this.getData();
},
methods: {
uploadIcon() {
let $this = this;
let file = $('#iconFile').val();
if (file && file.length > 0) {
showLoading();
uploadFile('iconFile').then(res => {
if (res.path) {
$this.resource.icon = res.path;
$('#iconUploadInfo').html('上传成功');
}
}).finally(() => {
hideLoading();
});
}
},
uploadUrl() {
let $this = this;
let file = $('#urlFile').val();
if (file && file.length > 0) {
showLoading();
uploadFile('urlFile').then(res => {
if (res.path) {
$this.resource.url = res.path;
$('#urlUploadInfo').html('上传成功');
}
}).finally(() => {
hideLoading();
});
}
},
getRule() {
getResourceRuleList({
ruleType: 3
}).then(res => {
this.rules = res.data;
});
},
ruleJsonFormatter(row, col, cell, index) {
let value = '';
let key = col.property;
let ruleValue = row.ruleValue;
if (!ruleValue) {
return value;
}
let ruleObj = JSON.parse(ruleValue);
value = ruleObj[key];
if (!value) {
if (key == 'NOT_CHANNELS') {
value = '-';
} else {
value = '全部';
}
}
if (key == 'IOS') {
value = ruleObj['IOS_LOW_VERSION'] + '~' + ruleObj['IOS_HIGH_VERSION'];
} else if (key == 'ANDROID') {
value = ruleObj['ANDROID_LOW_VERSION'] + '~' + ruleObj['ANDROID_HIGH_VERSION'];
}
return value;
},
getData() {
getResourcePage({
type: 3,
page: this.currentPage,
pageSize: this.pageSize,
}).then(res => {
let data = res.data;
this.totals = data.total;
this.tableData = data.records.map(v => {
v['enabled'] = (v.isEnabled == 1);
let startTime = v.startTime;
let endTime = v.endTime;
if (startTime) {
v['startTime'] = new Date(startTime).format("yyyy-MM-dd hh:mm:ss");
}
if (endTime) {
v['endTime'] = new Date(endTime).format("yyyy-MM-dd hh:mm:ss");
}
return v;
});
console.log(this.tableData);
});
},
switchClick(id) {
effective({
id: id
}).then(res => {
this.getData();
});
},
addClick() {
this.resource.id = null;
this.resource.code = '';
this.resource.name = '';
this.resource.icon = '';
this.resource.skipType = 0;
this.resource.showType = 1;
this.resource.skipContent = '';
this.resource.url = '';
this.resource.startTime = null;
this.resource.endTime = null;
this.resource.seqNo = 0;
this.resource.ruleValue = {};
for (let i = 0, len = this.rules.length; i < len; i++) {
let rule = this.rules[i];
this.resource.ruleValue[rule.ruleCode] = '';
}
this.editDialog = true;
},
editClick(row) {
this.resource.id = row.id;
this.resource.code = row.code;
this.resource.name = row.name;
this.resource.icon = row.icon;
this.resource.skipType = row.skipType;
this.resource.showType = row.showType;
this.resource.skipContent = row.skipContent;
this.resource.url = row.url;
this.resource.startTime = row.startTime;
this.resource.endTime = row.endTime;
this.resource.seqNo = row.seqNo;
let ruleValue = row.ruleValue;
for (let i = 0, len = this.rules.length; i < len; i++) {
let ruleCode = this.rules[i].ruleCode;
let rule = null;
if (ruleValue) {
let ruleObj = JSON.parse(ruleValue);
rule = ruleObj[ruleCode];
}
this.resource.ruleValue[ruleCode] = rule;
}
this.editDialog = true;
},
editDialogClick() {
let startTime = this.resource.startTime;
if (startTime) {
this.resource.startTime = new Date(startTime).format("yyyy-MM-dd hh:mm:ss");
}
let endTime = this.resource.endTime;
if (endTime) {
this.resource.endTime = new Date(endTime).format("yyyy-MM-dd hh:mm:ss");
}
let id = this.resource.id;
let skipType = this.resource.skipType;
if (!id && skipType == 1) {
ElMessage({
showClose: true,
message: 'APP NATIVE不允许新增',
type: "error",
});
return;
}
saveResource({
id: this.resource.id,
code: this.resource.code,
name: this.resource.name,
icon: this.resource.icon,
type: 3,
skipType: skipType,
showType: this.resource.showType,
skipContent: this.resource.skipContent,
url: this.resource.url,
startTime: this.resource.startTime,
endTime: this.resource.endTime,
seqNo: this.resource.seqNo,
ruleValue: JSON.stringify(this.resource.ruleValue)
}).then(res => {
this.getData();
this.editDialog = false;
});
},
delClick(row) {
delResource({
id: row.id,
}).then((res) => {
this.getData();
this.delDialog = false;
});
},
// 分页导航
handleSizeChange(val) {
this.getData();
},
handleCurrentChange(val) {
this.getData();
},
},
};
</script>
<style lang="less" scoped>
.outer {
padding-top: 20px;
background: #ecf0f5;
border-top: 3px solid #d2d6de;
}</style>

View File

@@ -19,12 +19,18 @@
</el-table-column>
<el-table-column align="center" prop="skipType" label="跳转">
<template v-slot="scope">
<span>{{ scope.row.skipType == 1 ? "native" : (scope.row.skipType == 2 ? "H5" : scope.row.skipType == 3
? "房间" : "") }}</span>
<span>{{ scope.row.skipType == 1 ? "native" : (scope.row.skipType == 2 ? "房间内" : scope.row.skipType == 3
? "H5" : "") }}</span>
<br />
<span>{{ scope.row.skipContent }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="生效时间">
<template v-slot="scope">
<span>{{ scope.row.startTime == null && scope.row.endTime ? "不限" : (scope.row.startTime + "~" +
(scope.row.endTime == null ? "不限" : scope.row.endTime)) }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="USER_LEVEL" label="可见等级" :formatter="ruleJsonFormatter" />
<el-table-column align="center" prop="PLATFORM" label="生效平台" :formatter="ruleJsonFormatter" />
<el-table-column align="center" prop="IOS" label="iOS版本号" :formatter="ruleJsonFormatter" />
@@ -74,12 +80,12 @@
</div>
<div style="margin-bottom: 25px;">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">生效时间</span>
<el-date-picker v-model="resource.startTime" type="datetime" placeholder="选择日期时间">
<el-date-picker v-model="resource.startTime" type="datetime" placeholder="选择日期时间" required>
</el-date-picker>
</div>
<div style="margin-bottom: 25px">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">失效时间</span>
<el-date-picker v-model="resource.endTime" type="datetime" placeholder="选择日期时间">
<el-date-picker v-model="resource.endTime" type="datetime" placeholder="选择日期时间" required>
</el-date-picker>
</div>
<div style="margin-bottom: 25px">
@@ -285,10 +291,23 @@ export default {
let startTime = this.resource.startTime;
if (startTime) {
this.resource.startTime = new Date(startTime).format("yyyy-MM-dd hh:mm:ss");
} else {
$("#tipMsg").text('生效时间不能为空');
$("#tipModal").modal('show');
return;
}
let endTime = this.resource.endTime;
if (endTime) {
this.resource.endTime = new Date(endTime).format("yyyy-MM-dd hh:mm:ss");
} else {
$("#tipMsg").text('失效时间不能为空');
$("#tipModal").modal('show');
return;
}
let isEnabled = 0;
let now = new Date();
if (now >= new Date(startTime) && now <= new Date(endTime)) {
isEnabled = 1;
}
saveResource({
id: this.resource.id,
@@ -301,7 +320,7 @@ export default {
startTime: this.resource.startTime,
endTime: this.resource.endTime,
seqNo: this.resource.seqNo,
isEnabled: 1,
isEnabled: isEnabled,
ruleValue: JSON.stringify(this.resource.ruleValue)
}).then(res => {
this.getData();

View File

@@ -62,7 +62,7 @@
<div class="modal-body">
<form id="roomType" class="form-horizontal">
房间类型:
<select id="permitType" name="permitType" data-btn-class="btn-warning">
<select id="permitType" name="permitType" class="form-control" data-btn-class="btn-warning">
<option value="1">牌照房</option>
<option value="2">普通房</option>
<option value="3">新秀房</option>
@@ -268,7 +268,6 @@ export default {
},
methods: {
initData() {
ComboboxHelper.build(null, '#permitType');
$(function () {
//选择select时触发
$("#sendDays").change(function () {
@@ -502,7 +501,7 @@ export default {
}
var data = $('#table').bootstrapTable('getRowByUniqueId', erbanNo);
$("#roomTypeUid").val(data.room.uid);
ComboboxHelper.setDef("#permitType", data.room.isPermitRoom);
$('#permitType').val(data.room.isPermitRoom);
$("#roomTypeModal").modal('show');
});
@@ -587,7 +586,7 @@ export default {
dataType: 'json',
data: {
uid: $('#roomTypeUid').val(),
permitType: ComboboxHelper.getSelected("#permitType")
permitType: $('#permitType').val(),
},
success: function (res) {
if (res.code == 200) {

View File

@@ -1,311 +1,352 @@
<template>
<section class="content-header">
<h1 id="itemTitle"></h1>
</section>
<!-- .content -->
<section class="content">
<div id="table"></div>
<div id="toolbar">
<div class="col-sm-12">
<div class="big-tips">
数据量过大不再默认加载所有的数据请先选择时间后再点查询按钮
</div>
<form id="searchForm" action="/admin/roomSerial/export.action" method="POST">
房主平台号(多个查询以英文逗号分隔): <input type="text" name="erbanNos" id="erbanNos" class="input-sm">
选择时间: <input type="text" name="startTime" id="startTime" class="input-sm">
<input type="text" id="endTime" name="endTime" class="input-sm">
房间类型:
<select name="isPermit" id="isPermit" data-btn-class="btn-warning">
<option value="0">全部</option>
<option value="1">牌照房</option>
<option value="3">新秀房</option>
<!--<option value="4">个播房</option>-->
<option value="4">个播房</option>
</select>
</form>
</div>
<div class="col-sm-8">
<button id="room-serial-refresh" class="btn btn-default">
<i class="glyphicon glyphicon-wrench"></i>查询
</button>
<button id="room-serial-export" class="btn btn-default">
<i class="glyphicon glyphicon-plus"></i>导出
</button>
</div>
</div>
</section><!-- .content -->
<div class="modal fade" id="tipModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">提示信息</h4>
</div>
<div class="modal-body" id="tipMsg"></div>
</div>
<section class="content-header">
<h1 id="itemTitle"></h1>
</section>
<!-- .content -->
<section class="content">
<div id="table"></div>
<div id="toolbar">
<div class="col-sm-12">
<div class="big-tips">
数据量过大不再默认加载所有的数据请先选择时间后再点查询按钮
</div>
<form id="searchForm" action="/admin/roomSerial/export.action" method="POST">
房主平台号(多个查询以英文逗号分隔):
<input type="text" name="erbanNos" id="erbanNos" class="input-sm" style="margin-right: 40px;display: inline-block;"/> 选择时间:
<input type="text" name="startTime" id="startTime" class="input-sm" />
<input type="text" id="endTime" name="endTime" class="input-sm" />
<br />
<div style="width: 60%">
房间类型:
<select name="isPermit" id="isPermit" class="input-sm" style="width: 30%;display: inline-block;">
<option value="0">全部</option>
<option value="1">牌照房</option>
<option value="3">新秀房</option>
<!--<option value="4">个播房</option>-->
<option value="4">个播房</option>
</select>
</div>
</form>
</div>
<div class="col-sm-8">
<button id="room-serial-refresh" class="btn btn-default">
<i class="glyphicon glyphicon-wrench"></i>查询
</button>
<button id="room-serial-export" class="btn btn-default">
<i class="glyphicon glyphicon-plus"></i>导出
</button>
</div>
</div>
</section>
<!-- .content -->
<div class="modal fade" id="roomGiftSerialDetailModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="roomGiftSerialDetailModalTitle">房间明细</h4>
</div>
<div class="modal-body">
<div class="summary col-sm-12">
<div class="col-sm-6">
<span>房间ID</span>
<span id="roomId"></span>
</div>
<div class="col-sm-6">
<span>房间昵称</span>
<span id="roomTitle"></span>
</div>
<div class="col-sm-6">
<span>收礼总钻石</span>
<span id="totalDiamonds"></span>
</div>
<div class="col-sm-6">
<span>房间抽成钻石数</span>
<span id="cutDiamonds"></span>
</div>
</div>
<div id="roomGiftSerialDetailTable"></div>
</div>
<div class="modal-footer">
<h4 id="roundDetailModalFooter"></h4>
<button type="button" class="btn btn-default" data-dismiss="modal">确定</button>
</div>
</div>
<div
class="modal fade"
id="tipModal"
tabindex="-1"
role="dialog"
aria-labelledby="modalLabel"
>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">提示信息</h4>
</div>
<div class="modal-body" id="tipMsg"></div>
</div>
</div>
</div>
<div
class="modal fade"
id="roomGiftSerialDetailModal"
tabindex="-1"
role="dialog"
aria-labelledby="modalLabel"
>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="roomGiftSerialDetailModalTitle">房间明细</h4>
</div>
<div class="modal-body">
<div class="summary col-sm-12">
<div class="col-sm-6">
<span>房间ID</span>
<span id="roomId"></span>
</div>
<div class="col-sm-6">
<span>房间昵称</span>
<span id="roomTitle"></span>
</div>
<div class="col-sm-6">
<span>收礼总钻石</span>
<span id="totalDiamonds"></span>
</div>
<div class="col-sm-6">
<span>房间抽成钻石数</span>
<span id="cutDiamonds"></span>
</div>
</div>
<div id="roomGiftSerialDetailTable"></div>
</div>
<div class="modal-footer">
<h4 id="roundDetailModalFooter"></h4>
<button type="button" class="btn btn-default" data-dismiss="modal">确定</button>
</div>
</div>
</div>
</div>
</template>
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import ComboboxHelper from '@/assets/plugins/bootstrap-combobox/js/bootstrap-combobox-helper';
import { serverError } from '@/utils/maintainer';
import TableHelper from "@/utils/bootstrap-table-helper";
import ComboboxHelper from "@/assets/plugins/bootstrap-combobox/js/bootstrap-combobox-helper";
import { serverError } from "@/utils/maintainer";
export default {
name: "RoomSerialView",
setup() {
return {};
},
created() {
this.$nextTick(function () {
this.initData();
name: "RoomSerialView",
setup() {
return {};
},
created() {
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData() {
// ComboboxHelper.build(null, '#isPermit');
$(function () {
$("#table").bootstrapTable("destroy");
$("#table").bootstrapTable({
columns: [
{ field: "userNick", title: "用户名称", align: "center", width: "20%" },
{ field: "userErbanNo", title: "房主平台号", align: "center", width: "15%" },
{ field: "totalGold", title: "总流水", align: "center", width: "10%" },
{
field: "normalTotalGold",
title: "普通礼物流水",
align: "center",
width: "10%",
},
{
field: "backpackTotalGold",
title: "背包礼物流水",
align: "center",
width: "10%",
},
{ field: "totalRadish", title: "萝卜流水", align: "center", width: "10%" },
{ field: "roomTitle", title: "房间标题", align: "center", width: "10%" },
{ field: "clanName", title: "公会名称", align: "center", width: "10%" },
{ field: "executionTime", title: "统计时间", align: "center", width: "15%" },
{ field: "executionTime", title: "统计时间", align: "center", width: "15%" },
{
field: "id",
title: "操作",
align: "center",
width: "10%",
formatter: function (val, row, index) {
const roomUid = row.roomUid;
console.log("roomUid", roomUid);
return (
'<button id="btnDetail" name="btnDetail" class="btn btn-sm btn-info opt-detail" roomUid=' +
roomUid +
">" +
'<i class="glyphicon glyphicon-file"></i> 查看明细</button>' +
'<button id="btnExport" name="btnExport" class="btn btn-sm btn-success opt-export" roomUid=' +
roomUid +
'><i class="glyphicon glyphicon-export"></i>导出明细</button>'
);
},
},
],
undefinedText: 0,
cache: false,
striped: true,
showRefresh: false,
pageSize: 10,
pagination: true,
pageList: [1, 10, 20, 30, 50],
search: false,
sidePagination: "server", //表示服务端请求
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "undefined",
queryParams: function queryParams(params) {
//设置查询参数
var param = {
pageNumber: params.pageNumber,
pageSize: params.pageSize,
searchText: params.searchText,
erbanNos: $("#erbanNos").val(),
startTime: $("#startTime").val(),
endTime: $("#endTime").val(),
isPermit: ComboboxHelper.getSelected("#isPermit"),
};
return param;
},
toolbar: "#toolbar",
url: "",
onLoadSuccess: function () {
//加载成功时执行
console.log("load success");
enableRefreshBtn();
},
onLoadError: function () {
//加载失败时执行
console.log("load fail");
},
});
},
methods: {
initData() {
ComboboxHelper.build(null, '#isPermit');
$(function () {
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns: [
{ field: 'userNick', title: '用户名称', align: 'center', width: '20%' },
{ field: 'userErbanNo', title: '房主平台号', align: 'center', width: '15%' },
{ field: 'totalGold', title: '总流水', align: 'center', width: '10%' },
{ field: 'normalTotalGold', title: '普通礼物流水', align: 'center', width: '10%' },
{ field: 'backpackTotalGold', title: '背包礼物流水', align: 'center', width: '10%' },
{ field: 'totalRadish', title: '萝卜流水', align: 'center', width: '10%' },
{ field: 'roomTitle', title: '房间标题', align: 'center', width: '10%' },
{ field: 'executionTime', title: '统计时间', align: 'center', width: '15%' },
{ field: 'executionTime', title: '统计时间', align: 'center', width: '15%' },
{
field: 'id',
title: '操作',
align: 'center',
width: '10%',
formatter: function (val, row, index) {
const roomUid = row.roomUid;
console.log("roomUid", roomUid)
return '<button id="btnDetail" name="btnDetail" class="btn btn-sm btn-info opt-detail" roomUid=' + roomUid + '>' +
'<i class="glyphicon glyphicon-file"></i> 查看明细</button>' +
'<button id="btnExport" name="btnExport" class="btn btn-sm btn-success opt-export" roomUid=' + roomUid +
'><i class="glyphicon glyphicon-export"></i>导出明细</button>';
}
}
],
undefinedText: 0,
cache: false,
striped: true,
showRefresh: false,
pageSize: 10,
pagination: true,
pageList: [1, 10, 20, 30, 50],
search: false,
sidePagination: "server", //表示服务端请求
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
var param = {
pageNumber: params.pageNumber,
pageSize: params.pageSize,
searchText: params.searchText,
erbanNos: $("#erbanNos").val(),
startTime: $("#startTime").val(),
endTime: $("#endTime").val(),
isPermit: ComboboxHelper.getSelected("#isPermit")
};
return param;
},
toolbar: '#toolbar',
url: '',
onLoadSuccess: function () { //加载成功时执行
console.log("load success");
enableRefreshBtn();
},
onLoadError: function () { //加载失败时执行
console.log("load fail");
}
});
$('#startTime').datetimepicker({
todayBtn: true,
format: 'yyyy-mm-dd hh:ii:00',
language: 'zh-CN',
autoclose: true
})
$("#startTime").datetimepicker({
todayBtn: true,
format: "yyyy-mm-dd hh:ii:00",
language: "zh-CN",
autoclose: true,
});
$("#endTime").datetimepicker({
todayBtn: true,
format: 'yyyy-mm-dd hh:ii:00',
language: 'zh-CN',
autoclose: true
});
$("#endTime").datetimepicker({
todayBtn: true,
format: "yyyy-mm-dd hh:ii:00",
language: "zh-CN",
autoclose: true,
});
$("#room-serial-refresh").click(function () {
disableRefreshBtn();
$("#table").bootstrapTable('refresh', { url: '/admin/roomSerial/listByPage' });
})
$("#room-serial-refresh").click(function () {
disableRefreshBtn();
$("#table").bootstrapTable("refresh", { url: "/admin/roomSerial/listByPage" });
});
$("#room-serial-export").click(function () {
$("#searchForm").submit();
})
$("#room-serial-export").click(function () {
$("#searchForm").submit();
});
$("#erbanNos").change(function () {
ComboboxHelper.setDef("#isPermit", '0');
if ($(this).val() == '') {
$("#isPermit").btComboBox('enable');
} else {
$("#isPermit").btComboBox('disable');
}
})
$("#erbanNos").change(function () {
ComboboxHelper.setDef("#isPermit", "0");
if ($(this).val() == "") {
$("#isPermit").btComboBox("enable");
} else {
$("#isPermit").btComboBox("disable");
}
});
function disableRefreshBtn() {
$('#room-serial-refresh').attr("disabled", "true");
}
function enableRefreshBtn() {
$('#room-serial-refresh').removeAttr("disabled");
}
// 导出房间流水明细
$('#table').on('click', '.opt-export', function () {
const roomUid = $(this).attr("roomUid");
const start = $('#startTime').val();
const end = $('#endTime').val();
console.log("--------roomUid", roomUid, start, end);
window.location.href = `/admin/roomSerial/exportRoomRevenueDetail?roomUid=${roomUid}&start=${start}&end=${end}`
});
$('#table').on('click', '.opt-detail', function () {
const roomUid = $(this).attr("roomUid");
const start = $('#startTime').val();
const end = $('#endTime').val();
$('#roomGiftSerialDetailTable').bootstrapTable('destroy');
$('#roomGiftSerialDetailTable').bootstrapTable({
columns: [
{ field: 'num', title: '序号', align: 'center', width: '5%' },
{ field: 'erbanNo', title: '平台号', align: 'center', width: '5%' },
{ field: 'nick', title: '昵称', align: 'center', width: '5%' },
{ field: 'amount', title: '收礼总钻石', align: 'center', width: '5%' },
{ field: 'cutDiamonds', title: '房间抽成钻石', align: 'center', width: '5%' },
{ field: 'bigAmount', title: '大光礼物价值', align: 'center', width: '5%', },
{ field: 'bigNum', title: '大光礼物数量', align: 'center', width: '5%', }
],
undefinedText: 0,
cache: false,
striped: true,
showRefresh: false,
pageSize: 20,
pagination: true,
pageList: [20, 50, 100, 200],
search: false,
sidePagination: "server", //表示服务端请求
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
var param = {
page: params.pageNumber,
pageSize: params.pageSize,
start: start,
end: end,
roomUid: roomUid,
};
return param;
},
ajax: function (request) { //使用ajax请求
$.ajax({
type: "GET",
url: '/admin/roomSerial/listRoomRevenueDetail.action',
contentType: 'application/json;charset=utf-8',
dataType: 'json',
data: request.data,
success: function (res) {
console.log('res-------', res)
apiResult(res);
request.success({
rows: res.data.rows,
total: res.data.total,
});
$("#roomId").html(res.data.roomId);
$("#roomTitle").html(res.data.roomTitle);
$("#totalDiamonds").html(res.data.totalDiamonds);
$("#cutDiamonds").html(res.data.cutDiamonds);
$("#roomGiftSerialDetailModal").modal('show');
},
error: function (req) {
serverError(req);
}
})
},
onLoadSuccess: function (res) { //加载成功时执行
console.log("load success");
},
onLoadError: function () { //加载失败时执行
console.log("load fail");
}
});
});
function apiResult(json) {
if (json.code == 200 && json.message == 'success') {
return true;
}
$("#tipMsg").text("请求失败,错误信息:" + json.message);
$("#tipModal").modal('show');
return false;
}
});
function disableRefreshBtn() {
$("#room-serial-refresh").attr("disabled", "true");
}
},
function enableRefreshBtn() {
$("#room-serial-refresh").removeAttr("disabled");
}
// 导出房间流水明细
$("#table").on("click", ".opt-export", function () {
const roomUid = $(this).attr("roomUid");
const start = $("#startTime").val();
const end = $("#endTime").val();
console.log("--------roomUid", roomUid, start, end);
window.location.href = `/admin/roomSerial/exportRoomRevenueDetail?roomUid=${roomUid}&start=${start}&end=${end}`;
});
$("#table").on("click", ".opt-detail", function () {
const roomUid = $(this).attr("roomUid");
const start = $("#startTime").val();
const end = $("#endTime").val();
$("#roomGiftSerialDetailTable").bootstrapTable("destroy");
$("#roomGiftSerialDetailTable").bootstrapTable({
columns: [
{ field: "num", title: "序号", align: "center", width: "5%" },
{ field: "erbanNo", title: "平台号", align: "center", width: "5%" },
{ field: "nick", title: "昵称", align: "center", width: "5%" },
{ field: "amount", title: "收礼总钻石", align: "center", width: "5%" },
{
field: "cutDiamonds",
title: "房间抽成钻石",
align: "center",
width: "5%",
},
{ field: "bigAmount", title: "大光礼物价值", align: "center", width: "5%" },
{ field: "bigNum", title: "大光礼物数量", align: "center", width: "5%" },
],
undefinedText: 0,
cache: false,
striped: true,
showRefresh: false,
pageSize: 20,
pagination: true,
pageList: [20, 50, 100, 200],
search: false,
sidePagination: "server", //表示服务端请求
queryParamsType: "undefined",
queryParams: function queryParams(params) {
//设置查询参数
var param = {
page: params.pageNumber,
pageSize: params.pageSize,
start: start,
end: end,
roomUid: roomUid,
};
return param;
},
ajax: function (request) {
//使用ajax请求
$.ajax({
type: "GET",
url: "/admin/roomSerial/listRoomRevenueDetail.action",
contentType: "application/json;charset=utf-8",
dataType: "json",
data: request.data,
success: function (res) {
console.log("res-------", res);
apiResult(res);
request.success({
rows: res.data.rows,
total: res.data.total,
});
$("#roomId").html(res.data.roomId);
$("#roomTitle").html(res.data.roomTitle);
$("#totalDiamonds").html(res.data.totalDiamonds);
$("#cutDiamonds").html(res.data.cutDiamonds);
$("#roomGiftSerialDetailModal").modal("show");
},
error: function (req) {
serverError(req);
},
});
},
onLoadSuccess: function (res) {
//加载成功时执行
console.log("load success");
},
onLoadError: function () {
//加载失败时执行
console.log("load fail");
},
});
});
function apiResult(json) {
if (json.code == 200 && json.message == "success") {
return true;
}
$("#tipMsg").text("请求失败,错误信息:" + json.message);
$("#tipModal").modal("show");
return false;
}
});
},
},
};
</script>
<style scoped>
.big-tips {
color: red;
font-size: larger;
font-weight: bold;
color: red;
font-size: larger;
font-weight: bold;
}
</style>
</style>

View File

@@ -7,13 +7,6 @@
<h1 id="itemTitle"></h1>
</section>
<div id="toolbar">
<!--<div class="col-sm-12">
<label for="roomTab" class="col-sm-2 control-label">房间Tab:</label>
<div class="col-sm-2">
<select name="roomTab" id="roomTab" class="col-sm-2 form-control" data-btn-class="btn-warning" onchange="selectOnTabChange(this)">
</select>
</div>
</div>-->
<div class="col-sm-12">
<label for="erbanNo" class="col-sm-2 control-label">房主平台号:</label>
<div class="col-sm-2">
@@ -49,10 +42,11 @@
<div class="modal-body">
<form class="form-horizontal" id="addForm">
<input type="hidden" name="id" id="id" />
<input type="hidden" name="roomUid" id="roomUid" />
<div class="form-group">
<label for="modal_isTop" class="col-sm-3 control-label">是否置顶<font color="red">*</font></label>
<div class="col-sm-9">
<select name="isTop" id="modal_isTop" class="form-control validate[required]">
<select name="isTop" id="modal_isTop" class="form-control">
<option value=""></option>
<option value="1"></option>
<option value="0"></option>
@@ -62,7 +56,7 @@
<div class="form-group">
<label for="modal_seq" class="col-sm-3 control-label">置顶排序<font color="red">*</font>:</label>
<div class="col-sm-9">
<input type="text" class="form-control validate[custom[integer]]" name="seq" id="modal_seq"
<input type="text" class="form-control" name="seq" id="modal_seq"
placeholder="数字小的排前面,必填">
</div>
</div>
@@ -81,6 +75,15 @@
<input type="text" class="input-sm form-control datetime" name="topEnd" id="modal_topEnd">
</div>
</div>
<div class="form-group">
<label for="modal_isShow" class="col-sm-3 control-label">是否在App首页展示<font color="red">*</font></label>
<div class="col-sm-9">
<select name="isShow" id="modal_isShow" class="form-control validate[required]">
<option value="1"></option>
<option value="0"></option>
</select>
</div>
</div>
</form>
</div>
<div class="modal-footer">
@@ -129,6 +132,23 @@ export default {
{ field: 'roomUid', title: '房主Uid', align: 'center', width: '5%' },
{ field: 'roomTitle', title: '房间标题', align: 'center', width: '8%' },
{ field: 'roomTag', title: '房间标签', align: 'center', width: '5%' },
{
field: 'isPermitRoom',
title: '房间类型',
align: 'center',
width: '5%',
formatter: function (val, row, index) {
let value = '';
if (val == 1) {
value = '牌照房';
} else if (val == 4) {
value = '个播房';
} else {
value = '非牌照房';
}
return value;
}
},
{
field: 'iconContent',
title: '图标内容',
@@ -139,14 +159,33 @@ export default {
}
},
{
field: 'isTop', title: '是否置顶', align: 'center', valign: 'middle', width: '5%',
field: 'isTop',
title: '是否置顶',
align: 'center',
valign: 'middle',
width: '5%',
formatter: function (val, row, index) {
if (val) {
if (val == 1) {
return '是';
} else {
} else if (val == 0) {
return '否';
}
return '否';
}
},
{
field: 'isShow',
title: '是否在App首页展示',
align: 'center',
valign: 'middle',
width: '5%',
formatter: function (val, row, index) {
if (val == 1) {
return '是';
} else if (val == 0) {
return '否';
}
return '是';
}
},
{ field: 'seq', title: '置顶排序', align: 'center', width: '5%' },
@@ -158,10 +197,8 @@ export default {
align: 'center',
width: '10%',
formatter: function (val, row, index) {
return '<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id="' + val + '" >' +
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>' +
'&nbsp;&nbsp;<button class="btn btn-sm btn-danger opt-remove" data-id="' + val +
'"><i class="glyphicon glyphicon-remove"></i>删除</button>';
return '<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id="' + val + '" data-index="' + index + '">' +
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>';
}
}
],
@@ -226,23 +263,26 @@ export default {
// 编辑或者新增
$("#btnConfirm").click(function () {
var id = $("#id").val();
var roomUid = $('#roomUid').val();
var seq = $("#modal_seq").val();
var isTop = $("#modal_isTop").val();
var iconContent = $("#modal_iconContent").val();
var topStart = $("#modal_topStart").val();
var topEnd = $("#modal_topEnd").val();
var isShow = $('#modal_isShow').val();
if ($("#addForm").validationEngine('validate')) {
$.ajax({
type: "post",
url: "/admin/roomTabHome/save.action",
data: {
id: id,
roomUid: roomUid,
seq: seq,
isTop: isTop,
iconContent: iconContent,
topStart: topStart,
topEnd: topEnd,
isShow: isShow,
},
dataType: "json",
success: function (json) {
@@ -266,6 +306,16 @@ export default {
// 获取信息
$("#table").on("click", '.opt-edit', function () {
var id = $(this).attr("data-id");
const index = $(this).data('index');
const record = TableHelper.getData('#table')[index];
$("#id").val(null);
$("#modal_iconContent").val('');
$("#modal_seq").val(0);
$("#modal_isTop").val(0);
$("#modal_topStart").val('');
$("#modal_topEnd").val('');
$("#modal_isShow").val(0);
$('#roomUid').val(record.roomUid);
if (id && id != 'null') {
$.ajax({
type: "get",
@@ -281,6 +331,7 @@ export default {
$("#modal_isTop").val(json.isTop ? 1 : 0);
$("#modal_topStart").val(formatTime(json.topStart));
$("#modal_topEnd").val(formatTime(json.topEnd));
$("#modal_isShow").val(json.isShow ? 1 : 0);
} else {
$("#tipMsg").text("获取菜单信息出错");
$("#tipModal").modal('show');

View File

@@ -57,7 +57,6 @@
<label for="modal_isTop" class="col-sm-3 control-label">是否置顶<font color="red">*</font></label>
<div class="col-sm-9">
<select name="isTop" id="modal_isTop" class="form-control validate[required]">
<option value=""></option>
<option value="1"></option>
<option value="0"></option>
</select>
@@ -71,14 +70,18 @@
</div>
</div>
<div class="form-group">
<label for="modal_isHome" class="col-sm-3 control-label">首页展示设<font color="red">*</font>
</label>
<label for="modal_topStart" class="col-sm-3 control-label">顶开始时间<font color="red">*</font>
:</label>
<div class="col-sm-9">
<select name="isHome" id="modal_isHome" class="form-control validate[required]">
<option value=""></option>
<option value="1"></option>
<option value="0"></option>
</select>
<input type="text" class="input-sm form-control datetime" name="topStart"
id="modal_topStart">
</div>
</div>
<div class="form-group">
<label for="modal_topEnd" class="col-sm-3 control-label">置顶结束时间<font color="red">*</font>
:</label>
<div class="col-sm-9">
<input type="text" class="input-sm form-control datetime" name="topEnd" id="modal_topEnd">
</div>
</div>
</form>
@@ -92,7 +95,6 @@
</div>
</div>
<!-- 增加房间弹框 -->
<div class="modal fade" id="addRoomTabMapModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
@@ -112,16 +114,6 @@
placeholder="多个平台号使用换行符分隔"></textarea>
</div>
</div>
<!--<div class="form-group">
<label for="modal_isHome2" class="col-sm-3 control-label">首页展示设置<font color="red">*</font></label>
<div class="col-sm-9">
<select name="isHome2" id="modal_isHome2" class="form-control validate[required]">
<option value=""></option>
<option value="1"></option>
<option value="0"></option>
</select>
</div>
</div>-->
</form>
</div>
<div class="modal-footer">
@@ -136,6 +128,7 @@
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import { formatTime } from '@/utils/maintainer';
export default {
name: "RoomTabMapView",
@@ -160,6 +153,10 @@ export default {
$(function () {
$('.datetime').datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
autoclose: true
});
// 拉取所有tab
getRoomTabs();
@@ -169,6 +166,23 @@ export default {
{ field: 'erbanNo', title: '房主平台号', align: 'center', width: '5%' },
{ field: 'roomUid', title: '房主Uid', align: 'center', width: '5%' },
{ field: 'roomTitle', title: '房间标题', align: 'center', width: '8%' },
{
field: 'isPermitRoom',
title: '房间类型',
align: 'center',
width: '8%',
formatter: function (val, row, index) {
let value = '';
if (val == 1) {
value = '牌照房';
} else if (val == 4) {
value = '个播房';
} else {
value = '非牌照房';
}
return value;
}
},
{ field: 'roomTag', title: '房间标签', align: 'center', width: '5%' },
{
field: 'isTop', title: '是否置顶', align: 'center', valign: 'middle', width: '5%',
@@ -181,18 +195,9 @@ export default {
}
},
{ field: 'topStart', title: '置顶开始时间', align: 'center', valign: 'middle', width: '10%', formatter: formatTime },
{ field: 'topEnd', title: '置顶结束时间', align: 'center', valign: 'middle', width: '10%', formatter: formatTime },
{ field: 'seq', title: '置顶排序', align: 'center', width: '5%' },
/*{
field: 'isHome', title: '首页展示', align: 'center', valign: 'middle', width: '5%',
formatter: function (val, row, index) {
if (val) {
return '是';
} else {
return '否';
}
}
},*/
{
field: 'id',
title: '操作',
@@ -319,7 +324,8 @@ export default {
var seq = $("#modal_seq").val();
var isHome = $("#modal_isHome").val();
var isTop = $("#modal_isTop").val();
var topStart = $('#modal_topStart').val();
var topEnd = $('#modal_topEnd').val();
if ($("#addForm").validationEngine('validate')) {
$.ajax({
type: "post",
@@ -329,6 +335,8 @@ export default {
seq: seq,
isHome: isHome,
isTop: isTop,
topStart: topStart,
topEnd: topEnd,
},
dataType: "json",
success: function (json) {
@@ -364,6 +372,8 @@ export default {
$("#modal_seq").val(json.seq);
$("#modal_isTop").val(json.isTop ? 1 : 0);
$("#modal_isHome").val(json.isHome ? 1 : 0);
$('#modal_topStart').val(formatTime(json.topStart));
$('#modal_topEnd').val(formatTime(json.topEnd));
// 打开编辑弹窗
$("#roomTabMapModal").modal('show');
$("#modalLabel").text("编辑");

View File

@@ -135,15 +135,10 @@ export default {
width: '10%',
formatter: function (val, row, index) {
var pageNum = $("#currentPageNum").val();
if (index < 2 && pageNum == 1) {
return "";
} else {
return '<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id=' + val + '>' +
return '<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id=' + val + '>' +
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>' +
'&nbsp;&nbsp;<button class="btn btn-sm btn-danger opt-remove" data-id=' + val +
'><i class="glyphicon glyphicon-remove"></i>删除</button>';
}
}
}
],

View File

@@ -20,7 +20,6 @@
厅号<input type="text" class="input-sm" name="erbanNo" id="qErbanNo">
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
<button id="btnExport" class="btn btn-sm btn-primary">导出</button>
<div class="tips">因数据量庞大时间范围尽量不要太长搜索公会数量尽量不要太多查询时间较长时请耐心等待</div>
</div>
</div>
@@ -119,6 +118,7 @@ export default {
},
{ field: 'newUserInRoom', title: '新用户进房人数', align: 'center', width: '5%' },
{ field: 'newUserSendGift', title: '新用户送礼人数', align: 'center', width: '5%' },
{ field: 'newUserSendGiftAmount', title: '新用户送礼流水', align: 'center', width: '5%' },
],
undefinedText: "-",
cache: false,
@@ -144,9 +144,9 @@ export default {
data: request.data,
success: function (res) {
apiResult(res);
console.log("res.data", res.data);
console.log("res.data.length()", res.data.length);
if (res.data == null || res.data.length > 0) {
console.log("res.data", res.data);
console.log("res.data.length()", res.data.length);
$("#btnSearch").attr("disabled", false);
if (getCacheDataTimer) {
clearInterval(getCacheDataTimer);

View File

@@ -84,6 +84,7 @@ export default {
{field: 'wxMiniAppAmount', title: '小程序支付', align: 'center', width: '5%'},*/
{ field: 'googleAmount', title: 'google支付', align: 'center', width: '5%' },
{ field: 'payermaxAmount', title: 'payermax支付', align: 'center', width: '5%' },
{ field: 'myCardAmount', title: 'MyCard支付', align: 'center', width: '5%' },
{ field: 'iosPayAmount', title: 'ios支付', align: 'center', width: '5%' },
{ field: 'companyAccount', title: '充值打公账', align: 'center', width: '5%' },
{

View File

@@ -95,6 +95,7 @@ export default {
{field: 'wxMiniAppAmount', title: '小程序支付', align: 'center', width: '5%'},*/
{ field: 'googleAmount', title: 'google支付', align: 'center', width: '5%' },
{ field: 'payermaxAmount', title: 'payermax支付', align: 'center', width: '5%' },
{ field: 'myCardAmount', title: 'myCard支付', align: 'center', width: '5%' },
{ field: 'iosPayAmount', title: 'ios支付', align: 'center', width: '5%' },
{ field: 'companyAccount', title: '充值打公账', align: 'center', width: '5%' },
{ field: 'totalAmount', title: '总计充值金额数', align: 'center', width: '5%' },

View File

@@ -180,26 +180,6 @@
import TableHelper from '@/utils/bootstrap-table-helper';
import { showLoading, hideLoading } from '@/utils/maintainer';
var picker1 = $('#startTime').datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
autoclose: true,
endDate: new Date()
});
var picker2 = $('#endTime').datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
autoclose: true
});
picker1.on('changeDate', function () {
var date = $('#startTime').datetimepicker('getDate');
picker2.datetimepicker('setStartDate', date);
});
picker2.on('changeDate', function () {
var date = $('#endTime').datetimepicker('getDate');
picker1.datetimepicker('setEndDate', date);
});
export default {
name: "GenAccountView",
setup() {
@@ -212,8 +192,27 @@ export default {
},
methods: {
initData() {
$(function () {
var picker1 = $('#startTime').datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
autoclose: true,
endDate: new Date()
});
var picker2 = $('#endTime').datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
autoclose: true
});
picker1.on('changeDate', function () {
var date = $('#startTime').datetimepicker('getDate');
picker2.datetimepicker('setStartDate', date);
});
picker2.on('changeDate', function () {
var date = $('#endTime').datetimepicker('getDate');
picker1.datetimepicker('setEndDate', date);
});
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns: [

View File

@@ -56,10 +56,13 @@
<option value="2">普通面板礼物</option>
<option value="3">福袋礼物</option>
<option value="5">福袋奖池礼物</option>
<option value="1">轻聊或者竞拍房</option>
<option value="4">卡片</option>
<option value="7">贵族礼物</option>
<option value="8">周星榜礼物</option>
<option value="9">合成礼物</option>
<option value="10">涂鸦礼物</option>
<option value="11">个播人气礼物</option>
<option value="15">线性福袋礼物</option>
</select>
</div>
@@ -125,7 +128,8 @@
</div>
</div>
</div>
<div class="modal fade" id="giftModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal fade" id="giftModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel"
style="height: 100%; overflow: hidden; overflow: scroll;">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
@@ -164,8 +168,8 @@
<div class="form-group">
<label for="giftType" class="col-sm-2 control-label">礼物类型</label>
<div class="col-sm-10">
<select name="giftType" id="giftType" data-btn-class="btn-warning">
<option value="2">普通面板礼物</option>
<select name="giftType" id="giftType" class="form-control" data-btn-class="btn-warning">
<option value="2" selected>普通面板礼物</option>
<option value="3">福袋礼物</option>
<option value="5">福袋奖池礼物</option>
<option value="1">轻聊或者竞拍房</option>
@@ -174,6 +178,7 @@
<option value="8">周星榜礼物</option>
<option value="9">合成礼物</option>
<option value="10">涂鸦礼物</option>
<option value="11">个播人气礼物</option>
<option value="15">线性福袋礼物</option>
</select>
</div>
@@ -283,7 +288,7 @@
<label class="col-sm-2 control-label">礼物图片:</label>
<div class="col-sm-10">
<img src="" id="picImage" style="width:250px;height:90px;" alt="">
<input type="file" id="picUploadFile" name="file">
<input type="file" id="picUploadFile" name="file" @change="changeFile($event)">
<button class="btn btn-success" type="button" id="picUploadBtn">上传</button>
<input type="hidden" id="picUrl" name="picUrl" class="form-control validate[required]" />
<span id="picImgInfo" style="color:red;"></span>
@@ -293,7 +298,7 @@
<label class="col-sm-2 control-label">vgg图片:</label>
<div class="col-sm-10">
<img src="" id="vggImage" style="width:250px;height:90px;" alt="">
<input type="file" id="vggUploadFile" name="file">
<input type="file" id="vggUploadFile" name="file" @change="changeFile($event)">
<button class="btn btn-success" type="button" id="vggUploadBtn">上传</button>
<input type="hidden" id="vggUrl" name="vggUrl" class="form-control validate[required]" />
<span id="vggImgInfo" style="color:red;"></span>
@@ -302,7 +307,7 @@
<div class="form-group">
<label class="col-sm-2 control-label">svga文件:</label>
<div class="col-sm-10">
<input type="file" id="svgaUploadFile" name="file">
<input type="file" id="svgaUploadFile" name="file" @change="changeFile($event)">
<button class="btn btn-success" type="button" id="svgaUploadBtn">上传</button>
<span>这里只适用于福袋svga动效上传</span>
<input type="hidden" id="luckyGiftSvgaUrl" name="luckyGiftSvgaUrl"
@@ -324,8 +329,8 @@
<div class="form-group">
<label class="col-sm-2 control-label">其他视图文件:</label>
<div class="col-sm-10">
<img src="" id="viewFile" style="width:250px;height:90px;" alt="">
<input type="file" id="viewUploadFile" name="file">
<video src="" id="viewFile" style="width:50%;height:50%;" alt="" autoplay="true"></video>
<input type="file" id="viewUploadFile" name="file" @change="changeFile($event)">
<button class="btn btn-success" type="button" id="viewFileUploadBtn">上传</button>
<span>如果上面已经上传svga素材此处不要再上传</span>
<input type="hidden" id="viewUrl" name="viewUrl" class="form-control validate[required]" />
@@ -546,13 +551,16 @@
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import ComboboxHelper from '@/assets/plugins/bootstrap-combobox/js/bootstrap-combobox-helper';
import { formatTime, showLoading, hideLoading } from '@/utils/maintainer';
import { formatTime, showLoading, hideLoading, apiResult } from '@/utils/maintainer';
import { uploadGift } from '@/api/common/upload';
//ComboboxHelper.build(null, '#giftType');
//ComboboxHelper.build(null, '#condition_type');
//ComboboxHelper.build(null, '#nobleId');
export default {
name: "GiftManageView",
data() {
return {
files: {},
};
},
setup() {
function selectConsumeChange(obj) {
var val = $('#consumeType').val();
@@ -562,7 +570,7 @@ export default {
$('.noble').removeClass("hidden");
}
if (val == 3) {
ComboboxHelper.setDef("#giftType", 2);
$('#giftType').val(2);
$("#giftType").attr('readonly', true);
$('#roomFreeGift').removeClass("hidden");
} else {
@@ -592,9 +600,15 @@ export default {
});
},
methods: {
changeFile(event) {
console.log(event);
let target = event.target;
let id = target.id;
this.files[id] = target.files[0];
},
initData() {
let $this = this;
$(function () {
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns: [
@@ -817,6 +831,7 @@ export default {
$("#gift-add").click(function () {
// 打开编辑弹窗
$("#giftModal").modal('show');
$this.files = {};
$("#giftForm")[0].reset();
$('#picUrl').val('');
@@ -849,10 +864,10 @@ export default {
// $("#goldPrice").attr('readonly', false);
$("#nobleId").btComboBox('disable');
ComboboxHelper.setDef("#nobleId", '0');
ComboboxHelper.setDef("#giftType", '2');
$('#giftType').val(2);
$("input:radio[name='giftStatus']")[1].checked = true;
$("input:radio[name='hasEffect']")[0].checked = true;
$("input:radio[name='hasVggPic']")[0].checked = true;
$("input:radio[name='hasEffect']")[1].checked = true;
$("input:radio[name='hasVggPic']")[1].checked = true;
$("input:radio[name='hasSvga']")[0].checked = true;
$("input:radio[name='isLatest']")[1].checked = true;
$("input:radio[name='isTimeLimit']")[1].checked = true;
@@ -862,7 +877,9 @@ export default {
$("#isSkipRoom").val('');
$("#isSendMsg").val('');
$("#consumeType").removeAttr("disabled");
$('#roomExcludeId').val('');
window.selectConsumeChange($("#consumeType"));
$('#roomExcludeId').val('');
});
$("#gift-version-save").click(function () {
@@ -884,7 +901,7 @@ export default {
}
});
}
})
$("#nobleId").on('change', function () {
@@ -976,111 +993,79 @@ export default {
});
$('#picUploadBtn').on('click', function () {
$.ajaxFileUpload({
fileElementId: 'picUploadFile', //需要上传的文件域的ID即<input type="file">的ID。
url: '/admin/gift/upload', //后台方法的路径
type: 'post', //当要提交自定义参数时这个参数要设置成post
dataType: 'json', //服务器返回的数据类型。可以为xml,script,json,html。如果不填写jQuery会自动判断。
secureuri: false, //是否启用安全提交默认为false。
async: true, //是否是异步
success: function (json) { //提交成功后自动执行的处理函数参数data就是服务器返回的数据。
if (json.path) {
$('#picUrl').val(json.path);
$('#picImage').attr("src", json.path);
if (json.path != '') {
$("#picImgInfo").html('已上传成功');
} else {
$("#picImgInfo").html('未上传成功');
}
console.log(json.path);
} else {
$("#tipMsg").text(json.msg);
$("#tipModal").modal('show');
}
},
error: function (data, status, e) { //提交失败自动执行的处理函数。
console.error(e);
showLoading();
uploadGift($this.files['picUploadFile']).then(res => {
let path = res.path;
console.log(path);
$('#picUrl').val(path);
$('#picImage').attr("src", path);
if (path != '') {
$("#picImgInfo").html('已上传成功');
} else {
$("#picImgInfo").html('未上传成功');
}
hideLoading();
}).catch(e => {
console.error(e);
hideLoading();
});
})
});
$('#vggUploadBtn').on('click', function () {
$.ajaxFileUpload({
url: '/admin/gift/upload',//后台请求地址
type: 'post',//请求方式 当要提交自定义参数时这个参数要设置成post
secureuri: false,//是否启用安全提交默认为false。
fileElementId: 'vggUploadFile',// 需要上传的文件域的ID即<input type="file">的ID。
dataType: 'json',//服务器返回的数据类型。可以为xml,script,json,html。如果不填写jQuery会自动判断。如果json返回的带pre,这里修改为json即可解决。
success: function (json, status) {//提交成功后自动执行的处理函数参数data就是服务器返回的数据。
console.log(json);
if (json.path) {
$('#vggUrl').val(json.path);
$('#vggImage').attr("src", json.path);
if (json.path != '') {
$("#vggImgInfo").html('已上传成功');
} else {
$("#vggImgInfo").html('未上传成功');
}
console.log(json.path);
} else {
$("#tipMsg").text(json.msg);
$("#tipModal").modal('show');
}
showLoading();
uploadGift($this.files['vggUploadFile']).then(res => {
let path = res.path;
console.log(path);
$('#vggUrl').val(path);
$('#vggImage').attr("src", path);
if (path != '') {
$("#vggImgInfo").html('已上传成功');
} else {
$("#vggImgInfo").html('未上传成功');
}
});
})
hideLoading();
}).catch(e => {
console.error(e);
hideLoading();
});
});
$('#svgaUploadBtn').on('click', function () {
$.ajaxFileUpload({
url: '/admin/gift/upload',//后台请求地址
type: 'post',//请求方式 当要提交自定义参数时这个参数要设置成post
secureuri: false,//是否启用安全提交默认为false。
fileElementId: 'svgaUploadFile',// 需要上传的文件域的ID即<input type="file">的ID。
dataType: 'json',//服务器返回的数据类型。可以为xml,script,json,html。如果不填写jQuery会自动判断。如果json返回的带pre,这里修改为json即可解决。
success: function (json, status) {//提交成功后自动执行的处理函数参数data就是服务器返回的数据。
console.log(json);
if (json.path) {
$('#luckyGiftSvgaUrl').val(json.path);
if (json.path != '') {
$("#svgaImgInfo").html('已上传成功');
} else {
$("#svgaImgInfo").html('未上传成功');
}
console.log(json.path);
} else {
$("#tipMsg").text(json.msg);
$("#tipModal").modal('show');
}
showLoading();
uploadGift($this.files['svgaUploadFile']).then(res => {
let path = res.path;
console.log(path);
$('#luckyGiftSvgaUrl').val(path);
if (path != '') {
$("#svgaImgInfo").html('已上传成功');
} else {
$("#svgaImgInfo").html('未上传成功');
}
});
})
hideLoading();
}).catch(e => {
console.error(e);
hideLoading();
});
});
$('#viewFileUploadBtn').on('click', function () {
$.ajaxFileUpload({
url: '/admin/gift/upload',//后台请求地址
type: 'post',//请求方式 当要提交自定义参数时这个参数要设置成post
secureuri: false,//是否启用安全提交默认为false。
fileElementId: 'viewUploadFile',// 需要上传的文件域的ID即<input type="file">的ID。
dataType: 'json',//服务器返回的数据类型。可以为xml,script,json,html。如果不填写jQuery会自动判断。如果json返回的带pre,这里修改为json即可解决。
success: function (json, status) {//提交成功后自动执行的处理函数参数data就是服务器返回的数据。
console.log(json);
if (json.path) {
$('#viewUrl').val(json.path);
$('#viewFile').attr("src", json.path);
if (json.path != '') {
$("#viewFileInfo").html('已上传成功');
} else {
$("#viewFileInfo").html('未上传成功');
}
console.log(json.path);
} else {
$("#tipMsg").text(json.msg);
$("#tipModal").modal('show');
}
showLoading();
uploadGift($this.files['viewUploadFile']).then(res => {
let path = res.path;
console.log(path);
$('#viewUrl').val(path);
$('#viewFile').attr("src", path);
if (path != '') {
$("#viewFileInfo").html('已上传成功');
} else {
$("#viewFileInfo").html('未上传成功');
}
hideLoading();
}).catch(e => {
console.error(e);
hideLoading();
});
})
});
$("#cancel").click(function () {
TableHelper.unCheckAll("#table");
@@ -1101,8 +1086,50 @@ export default {
});
$("#table").on("click", '.opt-edit', function () {
$('#picUrl').val('');
$('#picImage').attr("src", '');
$("#picImgInfo").html('');
$("#picUploadFile").val('');
$('#vggUrl').val('');
$("#vggUploadFile").val('');
$('#vggImage').attr("src", '');
$("#vggImgInfo").html('');
$("#svgaUploadFile").val('');
$('#luckyGiftSvgaUrl').val('');
$('#svgaImgInfo').html('');
$('#giftExplainUrl').val('');
$("#seqNo").val('');
$("#giftId").val('');
$('#viewUploadFile').val('');
$('#viewUrl').attr('');
$('#viewFile').attr("src", '');
$("#viewFileInfo").html('');
$("#startValidTime").val('');
$("#endValidTime").val('');
$("#nobleId").btComboBox('disable');
ComboboxHelper.setDef("#nobleId", '0');
$('#giftType').val(2);
$("input:radio[name='giftStatus']")[1].checked = true;
$("input:radio[name='hasEffect']")[1].checked = true;
$("input:radio[name='hasVggPic']")[1].checked = true;
$("input:radio[name='hasSvga']")[0].checked = true;
$("input:radio[name='isLatest']")[1].checked = true;
$("input:radio[name='isTimeLimit']")[1].checked = true;
$("input:radio[name='roomExclude']")[0].checked = true;
$('#giftType').val('');
$("#notifyStaySecond").val('');
$("#isSkipRoom").val('');
$("#isSendMsg").val('');
$("#consumeType").removeAttr("disabled");
$('#roomExcludeId').val('');
console.log("btnEdit");
var id = $(this).attr("data-id");
$this.files = {};
$.ajax({
type: "get",
url: "/admin/gift/get.action",
@@ -1131,7 +1158,6 @@ export default {
$("#consumeType").val(consumeType);
$("#consumeType").attr("disabled", true);
ComboboxHelper.setDef("#giftType", json.entity.giftType);
$('#giftType').val(json.entity.giftType);
if (consumeType == 1) {
ComboboxHelper.setDef("#nobleId", '0');
@@ -1212,6 +1238,7 @@ export default {
}
// 设置其他视图文件效果图片
$('#viewUploadFile').val('');
$('#otherViewType').val(json.entity.otherViewType);
$('#viewUrl').val(json.entity.viewUrl);
$('#viewFile').attr("src", json.entity.viewUrl);
@@ -1551,13 +1578,13 @@ function roomGiftTableInit() {
switch (val) {
case 1:
return '牌照房';
case 2:
return '非牌照房';
case 3:
return '新秀房';
}
}
},

View File

@@ -7,20 +7,29 @@
</section>
<section class="content">
<div id="table"></div>
<div id="toolbar">消息类型:<select name="msgType" id="type" class="input-m">
<option value="0">文本</option>
<option value="1">图片</option>
<option value="100">图文</option>
</select>
<div id="toolbar">
<label for="erbanNum" class="col-sm-2 control-label">消息类型:</label>
<div class="col-sm-3">
<span>
<select name="msgType" id="type" class="form-control input-m">
<option value="0">文本</option>
<option value="1">图片</option>
<option value="100">图文</option>
</select>
</span>
</div>
<label for="erbanNum" class="col-sm-2 control-label">平台号:</label>
<div class="col-sm-3">
<span><input type="text" class="form-control validate[required]" name="erbanNo"
id="erbanNum"></span>
<span>
<input type="text" class="form-control validate[required]" name="erbanNo" id="erbanNum">
</span>
</div>
<div class="col-sm-12">
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
<button id="add" class="btn btn-sm btn-default">
<i class="glyphicon glyphicon-plus"></i>增加
</button>
</div>
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
<button id="add" class="btn btn-default">
<i class="glyphicon glyphicon-plus"></i>增加
</button>
</div>
</section>
</div>
@@ -40,7 +49,7 @@
<div class="form-group">
<label for="receiver" class="col-sm-3 control-label">接收者</label>
<div class="col-sm-8">
<select name="receivers" id="receiver" class="col-sm-3">
<select name="receivers" id="receiver" class="col-sm-3 form-control">
<option value=1>所有用户</option>
<option value=0>指定用户</option>
</select>
@@ -50,7 +59,7 @@
<div class="form-group" id="appIdDiv">
<label for="appId" class="col-sm-3 control-label">渠道</label>
<div class="col-sm-8">
<select name="appId" id="appId" class="col-sm-3">
<select name="appId" id="appId" class="col-sm-3 form-control">
<option value="">全部</option>
<option value="official">安卓官方包</option>
<option value="google">安卓谷歌包</option>
@@ -63,7 +72,7 @@
<div class="form-group">
<label for="msgType" class="col-sm-3 control-label">消息类型</label>
<div class="col-sm-8">
<select name="msgTypeList" id="msgType" class="col-sm-3">
<select name="msgTypeList" id="msgType" class="col-sm-3 form-control">
<option value="0">文本</option>
<option value="1">图片</option>
<option value="100">图文</option>
@@ -74,13 +83,14 @@
<div class="form-group" id="skipUrlDiv">
<label for="skip" class="col-sm-3 control-label">跳转来源</label>
<div class="col-sm-8">
<select name="skip" id="skip" class="col-sm-3">
<select name="skip" id="skip" class="col-sm-3 form-control">
<option value=""></option>
<option value="2">跳H5页面</option>
<option value="1" id="skipRoomType">跳转房间</option>
</select>
</div>
<div class="col-sm-6">
<label for="skipUrlContent" class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input type="text" class="form-control" name="skipUri" id="skipUrlContent">
</div>
</div>
@@ -125,13 +135,24 @@
class="form-control validate[required]" />
</div>
</div>
<div class="form-group">
<label for="pushTime" class="col-sm-3 control-label">推送时间(非必填)</label>
<div class="col-sm-9">
<div class="col-sm-8">
<input type="text" class="input-sm form-control datetime" name="pushTime" id="pushTime">
</div>
</div>
<div class="form-group">
<label for="ignoreVersion" class="col-sm-3 control-label">不接收用户版本(非必填)</label>
<div class="col-sm-8">
<input type="text" class="input-sm form-control" name="ignoreVersion" id="ignoreVersion">
</div>
</div>
<div class="form-group">
<label for="ignoreChannel" class="col-sm-3 control-label">不接收用户渠道(非必填)</label>
<div class="col-sm-8">
<input type="text" class="input-sm form-control" name="ignoreChannel" id="ignoreChannel">
</div>
</div>
</form>
</div>
<div class="modal-footer">
@@ -367,7 +388,9 @@ export default {
skipType: $('#skip').val(),
skipContent: $('#skipUrlContent').val(),
appId: $("#appId").val(),
pushTime: $("#pushTime").val()
pushTime: $("#pushTime").val(),
ignoreVersion: $('#ignoreVersion').val(),
ignoreChannel: $('#ignoreChannel').val(),
},
dataType: 'json',
success: function (data) {

View File

@@ -8,6 +8,7 @@
<section class="content">
<div id="table"></div>
<div id="toolbar">
平台号<input type="text" name="erBanNoStr" id="erBanNoStr" class="input-sm" />
身份证号<input type="text" name="idCardNum" id="idCardNum" class="input-sm" />
状态
<select id="bindStatus" name="bindStatus" class="input-sm">
@@ -106,6 +107,7 @@ export default {
var param = {
pageSize: params.pageSize,
pageNumber: params.pageNumber,
erBanNoStr: $('#erBanNoStr').val(),
bindStatus: $('#bindStatus').val(),
idCardNum: $('#idCardNum').val()
};

View File

@@ -0,0 +1,187 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<span>轮次ID </span>
<el-input v-model="inquire.turnId" placeholder="" class="input"></el-input>
</div>
<div class="inquire">
<span>礼物ID </span>
<el-input v-model="inquire.giftId" placeholder="" class="input"></el-input>
</div>
<div class="inquire">
<span>用户ID</span>
<el-input v-model="inquire.userId" placeholder="" class="input"></el-input>
</div>
<div class="inquire">
<div class="block">
<span class="demonstration">轮次时间</span>
<el-date-picker
v-model="inquire.time"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</div>
</div>
<!-- 查询按钮 -->
<el-button type="primary" @click="getData()">查询</el-button>
<el-button type="primary" @click="derive()">导出</el-button>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="createTime" align="center" label="参与时间" />
<el-table-column prop="erbanNo" align="center" label="用户id" />
<el-table-column prop="nick" align="center" label="用户昵称" />
<el-table-column align="center" label="轮次信息">
<template v-slot="scope">
<div>轮次id: {{ scope.row.roundId }}</div>
<div>轮次礼物: {{ scope.row.giftName }}</div>
<div>礼物价值: {{ scope.row.giftPrice }}</div>
<div>需要魔法棒: {{ scope.row.targetNum }}</div>
<div>{{ scope.row.roundStatus == 0 ? "轮次进行中" : "轮次已结束" }}</div>
</template>
</el-table-column>
<el-table-column prop="stickNum" align="center" label="参与魔法棒数量" />
<el-table-column align="center" label="该用户本轮是否中奖">
<template v-slot="scope">
{{ scope.row.winnerUid ? (scope.row.isWin ? "" : "") : "-" }}
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</template>
<script>
import {
promiseStarUserRecordPage,
promiseStarUserRecordExport,
// @ts-ignore
} from "@/api/wishingStar/wishingStar";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "userParticipationRecord",
data() {
return {
loading: false,
//查询所需条件对象
inquire: {
turnId: "",
giftId: "",
userId: "",
time: "",
},
// 表格
tableData: [],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
created() {
this.getData();
},
methods: {
// 查询接口
getData() {
this.loading = true;
let time = this.inquire.time;
let startTime = "";
let endTime = "";
if (time && time.length > 0) {
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
}
console.log(this.inquire);
promiseStarUserRecordPage({
roundId: this.inquire.turnId,
giftId: this.inquire.giftId,
erbanNo: this.inquire.userId,
startTime: startTime,
endTime: endTime,
page: this.currentPage,
pageSize: this.pageSize,
}).then((res) => {
this.tableData = res.data.records;
this.total = res.data.total;
this.loading = false;
});
},
// 导出按钮
derive() {
let time = this.inquire.time;
let startTime = "";
let endTime = "";
if (time && time.length > 0) {
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
}
promiseStarUserRecordExport({
roundId: this.inquire.turnId,
giftId: this.inquire.giftId,
erbanNo: this.inquire.userId,
startTime: startTime,
endTime: endTime,
page: this.currentPage,
pageSize: this.pageSize,
}).then(() => {});
},
// 分页导航
handleSizeChange() {
this.getData();
},
handleCurrentChange() {
this.getData();
},
},
};
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
.inquire {
display: inline-block;
margin-right: 20px;
span {
margin-right: 10px;
}
.input {
width: 180px;
margin-right: 10px;
}
}
.dialogTableVisibleBut {
display: block;
margin: 30px 0 0 830px;
}
.paginationClass {
margin: 15px 0 5px 0px;
}
}
</style>

View File

@@ -0,0 +1,265 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<span>轮次ID </span>
<el-input v-model="inquire.turnId" placeholder="" class="input"></el-input>
</div>
<div class="inquire">
<span>礼物ID </span>
<el-input v-model="inquire.giftId" placeholder="" class="input"></el-input>
</div>
<div class="inquire">
<span>用户ID</span>
<el-input v-model="inquire.userId" placeholder="" class="input"></el-input>
</div>
<div class="inquire">
<div class="block">
<span class="demonstration">轮次时间</span>
<el-date-picker
v-model="inquire.time"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</div>
</div>
<!-- 查询按钮 -->
<el-button type="primary" @click="getDatas()">查询</el-button>
<!-- 外层表格 -->
<el-table :data="tableData" border style="margin-top: 25px; width: 100%">
<el-table-column align="center" fixed prop="id" label="轮次id"> </el-table-column>
<el-table-column align="center" fixed prop="startTime" label="轮次开始时间">
</el-table-column>
<el-table-column align="center" fixed prop="endTime" label="轮次结束时间">
</el-table-column>
<el-table-column align="center" fixed label="轮次持续时间">
<template v-slot="scope">
{{ scope.row.roundTime > 60 ? (Math.floor(scope.row.roundTime / 60 / 1000) + 'min') : ((scope.row.roundTime / 1000) + 'sec') }}
</template>
</el-table-column>
<el-table-column align="center" fixed prop="giftInfo" label="礼物信息">
<template v-slot="scope">
<div>id:{{ scope.row.giftId }}</div>
<div>名称:{{ scope.row.giftName }}</div>
<div>价值:{{ scope.row.giftPrice }}</div>
<!-- 礼物图片 -->
<el-image
style="width: 100px; height: 100px"
:src="scope.row.giftUrl"
:zoom-rate="1.1"
:preview-src-list="[scope.row.giftUrl]"
fit="cover"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column align="center" fixed label="状态">
<template v-slot="scope">
{{ scope.row.roundStatus == 1 ? '已结束' : '进行中' }}
</template>
</el-table-column>
<el-table-column align="center" fixed label="参与用户数">
<template v-slot="scope">
<el-button @click="button(scope.row)" type="text" size="small"
>人数: {{ scope.row.userCount ?? 0 }}</el-button
>
<div v-if="scope.row.roundStatus == 0">{{ scope.row.whiteErBanNo ? ('白名单:' + scope.row.whiteErBanNo) : '' }}</div>
</template>
</el-table-column>
<el-table-column align="center" fixed label="进度">
<template v-slot="scope">
<div>{{ scope.row.processNum }}/{{ scope.row.targetNum }}</div>
</template>
</el-table-column>
<el-table-column align="center" fixed label="奖励获得者">
<template v-slot="scope">
<div>用户id:{{ scope.row.winnerErBanNo }}</div>
<div>用户昵称:{{ scope.row.winnerNick }}</div>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
<!-- 内表单弹窗 -->
<el-dialog v-model="dialogTableVisible" :title="dialogTableVisibleTitle">
<el-table style="width: 100%" :data="dialogTableData" border>
<el-table-column align="center" fixed property="erbanNo" label="用户id" />
<el-table-column align="center" fixed property="nick" label="用户昵称" />
<el-table-column align="center" fixed property="stickNum" label="参与魔法棒数量" />
<el-table-column align="center" fixed label="操作">
<template v-slot="scope">
<el-button @click="white(scope.row)" :type="whiteCount == 0 ? 'primary' : (scope.row.isWhite ? 'warning' : 'info')" size="small"
>设为白名单</el-button
>
</template>
</el-table-column>
</el-table>
<el-button
class="dialogTableVisibleBut"
type="primary"
@click="dialogTableVisible = false"
>
关闭
</el-button>
</el-dialog>
</div>
</template>
<script>
// @ts-ignore
import { ElMessage } from "element-plus";
// @ts-ignore
import { promiseStarRoundPage, promiseStarUserRecordGetPromiseUsers, promiseStarUserRecordSetUserWhite } from "@/api/wishingStar/wishingStar";
// @ts-ignore
import { dateFormat } from '@/utils/system-helper';
export default {
name: "wishingRound",
data() {
return {
//查询所需条件对象
inquire: {
turnId: "",
giftId: "",
userId: "",
time: "",
},
// 外层表格
tableData: [],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
whiteCount: 0,
// 内表格
dialogTableVisible: false, //控制内表单
dialogTableVisibleTitle: "轮次idxxx的参与情况", //控制内表单
dialogTableData: [], //内表单数据
};
},
created() {
this.getDatas();
},
methods: {
// 初始化数据
getDatas() {
// @ts-ignore
this.loading = true;
let time = this.inquire.time;
let startTime = '';
let endTime = '';
if (time && time.length > 0) {
startTime = dateFormat(this.inquire.time[0], 'yyyy-MM-dd hh:mm:ss');
endTime = dateFormat(this.inquire.time[1], 'yyyy-MM-dd hh:mm:ss');
}
console.log(startTime);
console.log(endTime);
promiseStarRoundPage({
roundId: this.inquire.turnId,
giftId: this.inquire.giftId,
erbanNo: this.inquire.userId,
startTime: startTime,
endTime: endTime,
page: this.currentPage,
pageSize: this.pageSize,
// @ts-ignore
}).then((res) => {
let data = res.data;
this.tableData = data.records;
this.total = data.total;
// @ts-ignore
this.loading = false;
});
},
// 外层表格按钮
// @ts-ignore
button(res) {
console.log(res);
this.whiteCount = res.whiteCount;
this.dialogTableVisibleTitle = "轮次id" + res.id + "的参与情况";
promiseStarUserRecordGetPromiseUsers({
roundId: res.id,
// @ts-ignore
}).then((res) => {
this.dialogTableData = res.data;
});
this.dialogTableVisible = true;
},
// 设置白名单按钮
// @ts-ignore
white(row) {
console.log(row);
if (this.whiteCount > 0 && !row.isWhite) {
return;
}
promiseStarUserRecordSetUserWhite({
roundId: row.roundId,
uid: row.uid,
// @ts-ignore
}).then((res) => {
console.log(res);
promiseStarUserRecordGetPromiseUsers({
roundId: row.roundId,
// @ts-ignore
}).then((res) => {
this.dialogTableData = res.data;
// @ts-ignore
this.whiteCount = res.data.filter(v => v.isWhite == 1).length;
});
});
},
// 分页导航
// @ts-ignore
handleSizeChange(val) {
this.getDatas();
},
// @ts-ignore
handleCurrentChange(val) {
this.getDatas();
},
},
};
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
.inquire {
display: inline-block;
margin-right: 20px;
span {
margin-right: 10px;
}
.input {
width: 180px;
margin-right: 10px;
}
}
.dialogTableVisibleBut {
display: block;
margin: 30px 0 0 830px;
}
.paginationClass {
margin: 15px 0 5px 0px;
}
}
</style>

View File

@@ -0,0 +1,515 @@
<template>
<div class="outer">
<!-- 按钮 -->
<div class="buttonBox">
<el-button class="primary" type="primary" size="default" @click="add()"
>新增</el-button
>
</div>
<!-- 列表 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="giftId" align="center" label="礼物id" />
<el-table-column prop="giftName" align="center" label="礼物名称" />
<el-table-column align="center" prop="icon" label="礼物图片">
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.giftUrl"
:zoom-rate="1.1"
:preview-src-list="[scope.row.giftUrl]"
fit="cover"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column prop="createTime" align="center" label="添加时间" />
<el-table-column prop="giftPrice" align="center" label="礼物价值" />
<el-table-column prop="stickNum" align="center" label="需要魔法棒数量" />
<el-table-column prop="promiseCount" align="center" label="累计许愿出次数" />
<el-table-column prop="stockNum" align="center" label="库存" />
<!-- <el-table-column prop="isEnabled" align="center" label="是否可见" /> -->
<el-table-column align="center" label="是否可见">
<template v-slot="scope">
<div>{{ scope.row.isEnabled == 0 ? "否" : "是" }}</div>
</template>
</el-table-column>
<el-table-column prop="seqNo" align="center" label="排序" />
<el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button @click="edi(scope.row)" class="primary" type="primary" size="default"
>编辑</el-button
>
<el-button
@click="controls(scope.row)"
:class="scope.row.isEnabled == 1 ? 'danger' : 'primary'"
:type="scope.row.isEnabled == 1 ? 'danger' : 'primary'"
size="default"
><div>{{ scope.row.isEnabled == 1 ? "下线" : "上线" }}</div></el-button
>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px; display: none"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
<!-- 新增弹窗 -->
<el-dialog v-model="addDialog" title="新增" width="28%" center>
<div style="margin-bottom: 25px; margin-top: 10px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>许愿礼物</span
>
<el-select
filterable
v-model="resource.index"
@change="giftOptionsChange"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="(item, i) in giftOptions"
:key="i"
:label="item.giftName"
:value="i"
></el-option>
</el-select>
</div>
<div style="margin-bottom: 25px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>礼物价值</span
>
<el-input
v-model="resource.goldPrice"
style="width: 75%"
class="input"
placeholder="先选择许愿礼物"
disabled
></el-input>
</div>
<div style="margin-bottom: 25px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>魔法棒数量</span
>
<el-input v-model="resource.stickNum" style="width: 75%" class="input"></el-input>
</div>
<div style="margin-bottom: 25px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>库存</span
>
<el-input v-model="resource.stockNum" style="width: 75%" class="input"></el-input>
</div>
<div style="margin-bottom: 25px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>排序</span
>
<el-input v-model="resource.seqNo" style="width: 75%" class="input"></el-input>
</div>
<div style="margin-bottom: 25px; margin-top: 0px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>是否可见</span
>
<el-select v-model="resource.isEnabled" style="width: 75%" placeholder="请选择">
<el-option
v-for="item in showOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="addDialog = false">取消</el-button>
<el-button type="primary" @click="addDialogClick()"> 确认 </el-button>
</span>
</template>
</el-dialog>
<!-- 编辑弹窗 -->
<el-dialog v-model="editDialog" title="编辑" width="28%" center>
<div style="margin-bottom: 25px; margin-top: 10px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>许愿礼物</span
>
<el-select
disabled
v-model="editresource.giftName"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="item in editGiftOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<div style="margin-bottom: 25px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>礼物价值</span
>
<el-input
v-model="editresource.goldPrice"
style="width: 75%"
class="input"
placeholder="先选择许愿礼物"
disabled
></el-input>
</div>
<div style="margin-bottom: 25px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>魔法棒数量</span
>
<el-input
v-model="editresource.stickNum"
style="width: 75%"
class="input"
></el-input>
</div>
<div style="margin-bottom: 25px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>库存</span
>
<el-input
v-model="editresource.stockNum"
style="width: 75%"
class="input"
></el-input>
</div>
<div style="margin-bottom: 25px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>排序</span
>
<el-input
v-model="editresource.seqNo"
style="width: 75%"
class="input"
></el-input>
</div>
<div style="margin-bottom: 25px; margin-top: 0px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>是否可见</span
>
<el-select
v-model="editresource.isEnabled"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="item in editShowOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="editDialog = false">取消</el-button>
<el-button type="primary" @click="editDialogClick()"> 确认 </el-button>
</span>
</template>
</el-dialog>
<!-- 二次确认删除弹窗 -->
<el-dialog v-model="delDialog" title="提示" width="30%" center>
<span> {{ delDialogText }}</span>
<template #footer>
<span class="dialog-footer">
<el-button @click="delDialog = false">取消</el-button>
<el-button type="primary" @click="delClick()"> 确认 </el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import {
promiseStarConfigList,
giftGetAll,
promiseStarConfigSave,
promiseStarConfigUpdateEnable,
// @ts-ignore
} from "@/api/wishingStar/wishingStar";
// @ts-ignore
// @ts-ignore
// @ts-ignore
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "wishingStarSet",
data() {
return {
loading: false,
tableData: [],
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
addDialog: false, //控制新增弹窗
resource: {
//新增弹窗所需对象
index: null,
giftId: null,
goldPrice: "",
stickNum: null,
stockNum: null,
seqNo: null,
isEnabled: null,
},
giftOptions: [
//新增弹窗礼物筛选
],
showOptions: [
//新增弹窗是否可见筛选
{
value: 0,
label: "否",
},
{
value: 1,
label: "是",
},
],
editDialog: false, //控制编辑弹窗
editresource: {
//编辑弹窗所需对象
id: null,
giftId: null,
goldPrice: null,
stickNum: null,
stockNum: null,
seqNo: null,
isEnabled: null,
giftName: null,
},
editGiftOptions: [
//编辑弹窗礼物筛选
{
value: 0,
label: "选择许愿礼物",
},
],
editShowOptions: [
//编辑弹窗是否可见筛选
{
value: 0,
label: "否",
},
{
value: 1,
label: "是",
},
],
delDialog: false, //控制删除弹窗
delDialogText: "确认吗?", //删除弹窗提示
// 删除要用的数据对象
promiseStarConfigUpdateEnableObj: {
isEnabled: null,
id: null,
},
};
},
created() {
this.getData();
giftGetAll({
giftType: 2,
// @ts-ignore
}).then((res) => {
this.giftOptions = res.data;
});
},
methods: {
// 初始化数据
getData() {
this.loading = true;
// @ts-ignore
promiseStarConfigList().then((res) => {
this.tableData = res.data;
this.loading = false;
});
},
// 新增
add() {
this.addDialog = true;
},
// 监听新增礼物价值
// @ts-ignore
giftOptionsChange(e) {
// @ts-ignore
this.resource.giftId = this.giftOptions[e].giftId;
// @ts-ignore
this.resource.giftName = this.giftOptions[e].giftName;
// @ts-ignore
this.resource.goldPrice = this.giftOptions[e].goldPrice;
},
// 表单编辑
// @ts-ignore
edi(res) {
console.log("编辑按钮当前一行的数据", res);
console.log("编辑按钮当前一行的数据", this.resource.index);
this.editresource.id = res.id;
this.editresource.giftId = res.giftId;
this.editresource.stickNum = res.stickNum;
this.editresource.stockNum = res.stockNum;
this.editresource.seqNo = res.seqNo;
this.editresource.isEnabled = res.isEnabled;
this.editresource.goldPrice = res.giftPrice;
// @ts-ignore
this.editresource.giftName = res.giftName;
this.editDialog = true;
},
// 表单上线下线按钮
// @ts-ignore
controls(res) {
console.log(res);
// @ts-ignore
this.promiseStarConfigUpdateEnableObj.isEnabled = res.isEnabled == 1 ? 0 : 1;
this.promiseStarConfigUpdateEnableObj.id = res.id;
this.delDialog = true;
},
// 新增弹窗确认按钮
addDialogClick() {
promiseStarConfigSave({
giftId: this.resource.giftId,
stickNum: this.resource.stickNum,
stockNum: this.resource.stockNum,
seqNo: this.resource.seqNo,
isEnabled: this.resource.isEnabled,
// @ts-ignore
// @ts-ignore
// @ts-ignore
// @ts-ignore
}).then((res) => {
this.getData();
});
this.addDialog = false;
},
// 编辑弹窗确认按钮
editDialogClick() {
console.log(this.editresource);
// @ts-ignore
// @ts-ignore
// @ts-ignore
// @ts-ignore
promiseStarConfigSave(this.editresource).then((res) => {
this.getData();
});
this.editDialog = false;
},
// 删除弹窗确认按钮
delClick() {
console.log(this.promiseStarConfigUpdateEnableObj);
promiseStarConfigUpdateEnable({
isEnabled: this.promiseStarConfigUpdateEnableObj.isEnabled,
id: this.promiseStarConfigUpdateEnableObj.id,
// @ts-ignore
// @ts-ignore
// @ts-ignore
// @ts-ignore
}).then((res) => {
this.getData();
});
this.delDialog = false;
},
// 分页导航
// @ts-ignore
// @ts-ignore
// @ts-ignore
// @ts-ignore
handleSizeChange(val) {},
// @ts-ignore
// @ts-ignore
// @ts-ignore
// @ts-ignore
handleCurrentChange(val) {},
},
};
</script>
<style lang="less" scoped>
.outer {
padding-top: 20px;
background: #ecf0f5;
border-top: 3px solid #d2d6de;
.search {
width: 100%;
height: 41px;
.searchLeft,
.searchRight {
width: 20%;
float: left;
span {
margin-right: 10px;
}
.input {
width: 75%;
}
}
}
.buttonBox {
margin-top: 10px;
}
.authorityBox {
.authoritySpan {
margin-right: 20px;
}
.authorityInpput {
width: 50%;
}
}
.dialogTableVisibleBut {
margin: -25px 0 20px 0px;
}
}
</style>

View File

@@ -31,6 +31,7 @@
<option value="2">中国大陆银联</option>
<option value="4">马来西亚银行</option>
<option value="8">新加坡银行</option>
<option value="16">台湾地区银行</option>
</select>
</div>
</div>
@@ -651,7 +652,7 @@ export default {
$("#chinaUnionPay-grant").hide();
}
$("#chinaUnionPay-modal").modal('show');
} else if (accountType == 0b100 || accountType == 0b1000) {
} else if (accountType == 0b100 || accountType == 0b1000 || accountType == 0b10000) {
$("#abroad-id").val(id);
$("#abroad-createTime").val(createTime);
$("#abroad-erbanNo").val(erbanNo);

View File

@@ -62,6 +62,7 @@
<option value="MYR">MYR</option>
<option value="SGD">SGD</option>
<option value="USD">USD</option>
<option value="TWD">TWD</option>
</select>
</div>
</div>
@@ -74,6 +75,7 @@
<option value="MYR">MYR</option>
<option value="SGD">SGD</option>
<option value="USD">USD</option>
<option value="TWD">TWD</option>
</select>
</div>
</div>
@@ -86,6 +88,20 @@
<option value="MYR">MYR</option>
<option value="SGD">SGD</option>
<option value="USD">USD</option>
<option value="TWD">TWD</option>
</select>
</div>
</div>
<div class="form-group">
<input type="hidden" name="taiWanBankId" id="taiWanBankId" />
<label for="taiWanBank" class="col-sm-3 control-label">台湾地区银行</label>
<div class="col-sm-9">
<select name="taiWanBank" id="taiWanBank" class="form-control validate[required]">
<option value="CNY">CNY</option>
<option value="MYR">MYR</option>
<option value="SGD">SGD</option>
<option value="USD">USD</option>
<option value="TWD">TWD</option>
</select>
</div>
</div>
@@ -98,9 +114,10 @@
<option value="MYR">MYR</option>
<option value="SGD">SGD</option>
<option value="USD">USD</option>
<option value="TWD">TWD</option>
</select>
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
@@ -140,6 +157,12 @@
<input type="text" class="form-control" id="sgd" />
</div>
</div>
<div class="form-group">
<label for="twd" class="col-sm-3 control-label">TWD</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="twd" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">其它账户</label>
<div class="col-sm-9"> 1 </div>
@@ -298,6 +321,9 @@ export default {
} else if (accountType == 0b1000) {
$('#bankOfSingaporeId').val(id);
$("#bankOfSingapore").val(currencyType);
} else if (accountType == 0b10000) {
$('#taiWanBankId').val(id);
$("#taiWanBank").val(currencyType);
}
}
}
@@ -330,6 +356,8 @@ export default {
$('#myr').val(rate);
} else if (currency == 'SGD') {
$('#sgd').val(rate);
} else if (currency == 'TWD') {
$('#twd').val(rate);
}
}
}
@@ -349,7 +377,8 @@ export default {
{ id: $('#orderAccountId').val(), accountName: '其它账户', currencyType: $('#orderAccount').val(), accountType: 0b1 },
{ id: $('#chinaUnionPayId').val(), accountName: '中国大陆银联', currencyType: $('#chinaUnionPay').val(), accountType: 0b10 },
{ id: $('#mayBankId').val(), accountName: '马来西亚银行', currencyType: $('#mayBank').val(), accountType: 0b100 },
{ id: $('#bankOfSingaporeId').val(), accountName: '新加坡银行', currencyType: $('#bankOfSingapore').val(), accountType: 0b1000 }
{ id: $('#bankOfSingaporeId').val(), accountName: '新加坡银行', currencyType: $('#bankOfSingapore').val(), accountType: 0b1000 },
{ id: $('#taiWanBankId').val(), accountName: '台湾地区银行', currencyType: $('#taiWanBank').val(), accountType: 0b10000 }
];
const data = {
id: $('#id').val(),
@@ -387,6 +416,7 @@ export default {
cny: $('#cny').val(),
myr: $('#myr').val(),
sgd: $('#sgd').val(),
twd: $('#twd').val(),
other: 1
}
$.ajax({

View File

@@ -279,6 +279,7 @@
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import { formatTime } from '@/utils/maintainer';
export default {
name: "WithdrawUserView",
@@ -306,14 +307,25 @@ export default {
var isMayBank = row.isMayBank == 1 ? '<a class="withdraw" accountType="4" data-index="' + index + '">查看></a>' : '未绑定';
var isBankOfSingapore = row.isBankOfSingapore == 1 ? '<a class="withdraw" accountType="8" data-index="' + index + '">查看></a>' : '未绑定';
var isOrderAccount = row.isOrderAccount == 1 ? '<a class="withdraw" accountType="1" data-index="' + index + '">查看></a>' : '未绑定';
var isTaiWanBank = row.isTaiWanBank == 1 ? '<a class="withdraw" accountType="16" data-index="' + index + '">查看></a>' : '未绑定';
var value = '';
value += '中国大陆银联&nbsp;' + isChinaUnionPay + '<br>';
value += '马来西亚银行&nbsp;' + isMayBank + '<br>';
value += '新加坡银行&nbsp;' + isBankOfSingapore + '<br>';
value += '台湾地区银行&nbsp;' + isTaiWanBank + '<br>';
value += '其它账户&nbsp;' + isOrderAccount;
return value;
}
},
{
field: 'updateTime',
title: '修改时间',
align: 'center',
width: '5%',
formatter: function (val, row, index) {
return formatTime(val);
}
},
],
cache: false,
striped: true,
@@ -392,7 +404,7 @@ export default {
$('#chinaUnionPay-frontPhoto').attr("src", frontPhoto);
$('#chinaUnionPay-backPhoto').attr("src", backPhoto);
$("#chinaUnionPay-modal").modal('show');
} else if (accountType == 0b100 || accountType == 0b1000) {
} else if (accountType == 0b100 || accountType == 0b1000 || accountType == 0b10000) {
$("#abroad-id").val(id);
$("#abroad-surname").val(surname);
$("#abroad-name").val(name);

28
tsconfig.json Normal file
View File

@@ -0,0 +1,28 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"strict": false,
"esModuleInterop": true,
"allowJs": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"esModuleInterop": true,
"jsx": "preserve",
"noEmit": true,
"noImplicitAny": false,
"strictNullChecks": true,
"inlineSourceMap": true,
"inlineSources": true,
"checkJs": true,
"outDir": "./dist",
"rootDir": "./src",
"outFiles": "./dist/bundle.js"
},
"include": [
"./src/**/*"
],
"exclude": [
"node_modules"
]
}