Compare commits
125 Commits
guildOpera
...
edition-10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97dc2dd706 | ||
|
|
8c06877c67 | ||
|
|
be82b67bab | ||
|
|
da9368018a | ||
|
|
c39b992e31 | ||
|
|
1aa6a67531 | ||
|
|
a2fa4a8fbd | ||
|
|
4ab5768849 | ||
|
|
fa2d3975d2 | ||
|
|
0fdcf097c8 | ||
|
|
3d18a53f34 | ||
|
|
627de18eaf | ||
|
|
8868f4204c | ||
|
|
38bffe26dc | ||
|
|
8a548f9a69 | ||
|
|
28b21d5c85 | ||
|
|
dcdf89aa48 | ||
|
|
b9dcae392a | ||
|
|
ae4b9d0493 | ||
|
|
8789fdfc29 | ||
|
|
0700880ade | ||
|
|
7c042161bd | ||
|
|
431749ef28 | ||
|
|
7bb0faad23 | ||
|
|
59a2461f73 | ||
|
|
223311f321 | ||
|
|
02474473bf | ||
|
|
559fea9300 | ||
|
|
ed618598c2 | ||
|
|
7610a2768f | ||
|
|
eb7e9387c6 | ||
|
|
212498b6be | ||
|
|
369bf84a1f | ||
|
|
a79445b9e5 | ||
|
|
fda1a6aacb | ||
|
|
e58363371c | ||
|
|
943518ce24 | ||
|
|
df0093c4f8 | ||
|
|
19d8ac3753 | ||
|
|
9486359ddf | ||
|
|
ef7c060545 | ||
|
|
350c1b0e07 | ||
|
|
f9a1f6a89c | ||
|
|
c7597a1b14 | ||
|
|
9b7d0132ef | ||
|
|
0dcf3594bd | ||
|
|
e50a89fb0a | ||
|
|
49bd77ae3f | ||
|
|
d9a6c2881b | ||
|
|
46af95e834 | ||
|
|
07543cca7d | ||
|
|
a75058d202 | ||
|
|
9129e29bf3 | ||
|
|
37df3b5db1 | ||
|
|
6e841bc675 | ||
|
|
286969cdd1 | ||
|
|
d3b48eea86 | ||
|
|
9e6495d807 | ||
|
|
836fb732c8 | ||
|
|
9a151fbe05 | ||
|
|
07e9a1e8b2 | ||
|
|
d3c14383f8 | ||
|
|
5bba43c189 | ||
|
|
74939056ce | ||
|
|
004bf0e03a | ||
|
|
b467577792 | ||
|
|
99a1c89643 | ||
|
|
b043d8c06e | ||
|
|
fb007e763c | ||
|
|
2fddf66a5d | ||
|
|
75bcd232a4 | ||
|
|
ae0a3507a6 | ||
|
|
31d6efd60e | ||
|
|
70993f1b4d | ||
|
|
e4fb991a98 | ||
|
|
b84438c19d | ||
|
|
ed9178a1d0 | ||
|
|
78b3a70d5f | ||
|
|
baad132403 | ||
|
|
c865eae77b | ||
|
|
5d296f8086 | ||
|
|
3f905c2b1e | ||
|
|
7add80a5ae | ||
|
|
0d6019e9f1 | ||
|
|
11ceac5d4f | ||
|
|
289aa70af3 | ||
|
|
c8b283b0d8 | ||
|
|
9bec1ba472 | ||
|
|
2c64fc1443 | ||
|
|
097dea0693 | ||
|
|
6abde0b9ec | ||
|
|
c99ee00ca8 | ||
|
|
c3f70e3c9b | ||
|
|
1e4002a4fa | ||
|
|
090447e1ce | ||
|
|
c847b94994 | ||
|
|
f91dc1cf62 | ||
|
|
4d5fb57ddf | ||
|
|
b174c9818e | ||
|
|
c6f979c094 | ||
|
|
475ee45a44 | ||
|
|
c4209d6c24 | ||
|
|
e77165a1d7 | ||
|
|
8a2c1381e9 | ||
|
|
e062c2afa3 | ||
|
|
591495edcc | ||
|
|
25e828f7e4 | ||
|
|
1ab319d372 | ||
|
|
9b6ee433d7 | ||
|
|
9c4aa4efb9 | ||
|
|
f228aad967 | ||
|
|
e47b57f760 | ||
|
|
4e3bbd9209 | ||
|
|
9f9e7ca81c | ||
|
|
493ad80d1c | ||
|
|
a71144b735 | ||
|
|
ebf22c8012 | ||
|
|
69dc2de281 | ||
|
|
520e4e4c58 | ||
|
|
faa779555c | ||
|
|
a62f2a5eca | ||
|
|
65cf443cb4 | ||
|
|
9f2b89d0be | ||
|
|
b362a25028 | ||
|
|
3c909bdb97 |
26
package-lock.json
generated
26
package-lock.json
generated
@@ -22,10 +22,12 @@
|
|||||||
"knockout": "^3.5.1",
|
"knockout": "^3.5.1",
|
||||||
"less": "^4.2.0",
|
"less": "^4.2.0",
|
||||||
"less-loader": "^11.1.3",
|
"less-loader": "^11.1.3",
|
||||||
|
"moment-timezone": "^0.5.45",
|
||||||
"node-sass": "^9.0.0",
|
"node-sass": "^9.0.0",
|
||||||
"popper.js": "^1.16.1",
|
"popper.js": "^1.16.1",
|
||||||
"sass": "^1.67.0",
|
"sass": "^1.67.0",
|
||||||
"sass-loader": "^13.3.2",
|
"sass-loader": "^13.3.2",
|
||||||
|
"svgaplayerweb": "^2.3.2",
|
||||||
"unplugin-element-plus": "^0.8.0",
|
"unplugin-element-plus": "^0.8.0",
|
||||||
"vue-clipboard2": "^0.3.3",
|
"vue-clipboard2": "^0.3.3",
|
||||||
"vue-router": "^4.0.3",
|
"vue-router": "^4.0.3",
|
||||||
@@ -8974,6 +8976,25 @@
|
|||||||
"integrity": "sha512-23g5BFj4zdQL/b6tor7Ji+QY4pEfNH784BMslY9Qb0UnJWRAt+lQGLYmRaM0KDBwIG23ffEBELhZDP2rhi9f/Q==",
|
"integrity": "sha512-23g5BFj4zdQL/b6tor7Ji+QY4pEfNH784BMslY9Qb0UnJWRAt+lQGLYmRaM0KDBwIG23ffEBELhZDP2rhi9f/Q==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/moment": {
|
||||||
|
"version": "2.30.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/moment/-/moment-2.30.1.tgz",
|
||||||
|
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
|
||||||
|
"engines": {
|
||||||
|
"node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/moment-timezone": {
|
||||||
|
"version": "0.5.45",
|
||||||
|
"resolved": "https://registry.npmmirror.com/moment-timezone/-/moment-timezone-0.5.45.tgz",
|
||||||
|
"integrity": "sha512-HIWmqA86KcmCAhnMAN0wuDOARV/525R2+lOLotuGFzn4HO+FH+/645z2wx0Dt3iDv6/p61SIvKnDstISainhLQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"moment": "^2.29.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/mrmime": {
|
"node_modules/mrmime": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmmirror.com/mrmime/-/mrmime-1.0.1.tgz",
|
"resolved": "https://registry.npmmirror.com/mrmime/-/mrmime-1.0.1.tgz",
|
||||||
@@ -11970,6 +11991,11 @@
|
|||||||
"integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==",
|
"integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/svgaplayerweb": {
|
||||||
|
"version": "2.3.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/svgaplayerweb/-/svgaplayerweb-2.3.2.tgz",
|
||||||
|
"integrity": "sha512-QuTvNIgy3W6Mi4h74SczEHUtAwb8m3ax7Ai7xRLUuN6hjJh49RGtWOWq1IuF2I7ECcl0HAYn8FcTn99UDz9UiQ=="
|
||||||
|
},
|
||||||
"node_modules/svgo": {
|
"node_modules/svgo": {
|
||||||
"version": "2.8.0",
|
"version": "2.8.0",
|
||||||
"resolved": "https://registry.npmmirror.com/svgo/-/svgo-2.8.0.tgz",
|
"resolved": "https://registry.npmmirror.com/svgo/-/svgo-2.8.0.tgz",
|
||||||
|
|||||||
@@ -22,10 +22,12 @@
|
|||||||
"knockout": "^3.5.1",
|
"knockout": "^3.5.1",
|
||||||
"less": "^4.2.0",
|
"less": "^4.2.0",
|
||||||
"less-loader": "^11.1.3",
|
"less-loader": "^11.1.3",
|
||||||
|
"moment-timezone": "^0.5.45",
|
||||||
"node-sass": "^9.0.0",
|
"node-sass": "^9.0.0",
|
||||||
"popper.js": "^1.16.1",
|
"popper.js": "^1.16.1",
|
||||||
"sass": "^1.67.0",
|
"sass": "^1.67.0",
|
||||||
"sass-loader": "^13.3.2",
|
"sass-loader": "^13.3.2",
|
||||||
|
"svgaplayerweb": "^2.3.2",
|
||||||
"unplugin-element-plus": "^0.8.0",
|
"unplugin-element-plus": "^0.8.0",
|
||||||
"vue-clipboard2": "^0.3.3",
|
"vue-clipboard2": "^0.3.3",
|
||||||
"vue-router": "^4.0.3",
|
"vue-router": "^4.0.3",
|
||||||
|
|||||||
42
src/api/SsGuild/SsGuild.js
Normal file
42
src/api/SsGuild/SsGuild.js
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { genQueryParam } from '@/utils/maintainer';
|
||||||
|
import qs from 'qs';
|
||||||
|
|
||||||
|
// 周期选项下拉框
|
||||||
|
export const cycleDateList = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/ssGuild/cycleDateList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// SS公会列表
|
||||||
|
export const list = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/ssGuild/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 发送金币&批量发送
|
||||||
|
export const sendGold = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/ssGuild/sendGold',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 导出
|
||||||
|
// export const ssGuildExport = query => {
|
||||||
|
// return request({
|
||||||
|
// url: `/admin/ssGuild/export`,
|
||||||
|
// method: 'post',
|
||||||
|
// params: query,
|
||||||
|
// responseType: 'blob'
|
||||||
|
// });
|
||||||
|
// };
|
||||||
|
// 导出-公会信息
|
||||||
|
export const ssGuildExport = query => {
|
||||||
|
window.location.href = `/admin/ssGuild/export?${genQueryParam(query)}`;
|
||||||
|
return;
|
||||||
|
};
|
||||||
38
src/api/lingSmallGames/lingSmallGames.js
Normal file
38
src/api/lingSmallGames/lingSmallGames.js
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { genQueryParam } from '@/utils/maintainer';
|
||||||
|
import qs from 'qs';
|
||||||
|
|
||||||
|
// 获取游戏列表
|
||||||
|
export const sysConfKey = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/sysConf/key',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 获取列表
|
||||||
|
export const statisPage = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/miniGame/leadercc/statis/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 获取详情列表
|
||||||
|
export const detailPage = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/miniGame/leadercc/statis/detailPage',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 导出
|
||||||
|
export const exportForMiniGame = query => {
|
||||||
|
window.location.href = `/admin/miniGame/leadercc/statis/exportForMiniGame?${genQueryParam(query)}`;
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
// 导出弹窗
|
||||||
|
export const statisExport = query => {
|
||||||
|
window.location.href = `/admin/miniGame/leadercc/statis/export?${genQueryParam(query)}`;
|
||||||
|
return;
|
||||||
|
};
|
||||||
70
src/api/luckGift/luckGift.js
Normal file
70
src/api/luckGift/luckGift.js
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { genQueryParam } from '@/utils/maintainer';
|
||||||
|
import qs from 'qs';
|
||||||
|
|
||||||
|
// 奖池拉框
|
||||||
|
export const listType = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/lucky24/pool/listType',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 池子列表
|
||||||
|
export const list = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/lucky24/pool/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 基础配置
|
||||||
|
export const getConfig = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/lucky24/config/getConfig',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 基础配置-修改
|
||||||
|
export const updateSet = query => {
|
||||||
|
return request({
|
||||||
|
headers: { "Content-Type": 'application/json;charset=UTF-8' },
|
||||||
|
url: '/admin/lucky24/config/update',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 个人数据
|
||||||
|
export const personal = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/lucky24/record/personal',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 汇总
|
||||||
|
export const platform = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/lucky24/record/platform',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 保存池子
|
||||||
|
export const save = query => {
|
||||||
|
return request({
|
||||||
|
headers: { "Content-Type": 'application/json;charset=UTF-8' },
|
||||||
|
url: '/admin/lucky24/pool/save',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 赠送用户
|
||||||
|
export const updateUserMulti = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/lucky24/config/updateUserMulti',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -1,6 +1,15 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import { genQueryParam } from '@/utils/maintainer';
|
import { genQueryParam } from '@/utils/maintainer';
|
||||||
|
|
||||||
|
// 分区接口
|
||||||
|
export const listPartitionInfo = query => {
|
||||||
|
return request({
|
||||||
|
url: '/partition/listPartitionInfo',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// 邀请移除记录
|
// 邀请移除记录
|
||||||
export const pageOperateRecord = query => {
|
export const pageOperateRecord = query => {
|
||||||
return request({
|
return request({
|
||||||
@@ -251,4 +260,22 @@ export const removeMember = query => {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// -审核列表
|
||||||
|
export const guildApplyList = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/guildApply/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// -审核操作
|
||||||
|
export const guildApplyAudit = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/guildApply/audit',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
};
|
};
|
||||||
@@ -1,6 +1,15 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import { genQueryParam } from '@/utils/maintainer';
|
import { genQueryParam } from '@/utils/maintainer';
|
||||||
|
|
||||||
|
// 分区接口
|
||||||
|
export const listPartitionInfo = query => {
|
||||||
|
return request({
|
||||||
|
url: '/partition/listPartitionInfo',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// 邀请移除记录
|
// 邀请移除记录
|
||||||
export const pageOperateRecord = query => {
|
export const pageOperateRecord = query => {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { genQueryParam } from '@/utils/maintainer';
|
||||||
|
import qs from 'qs';
|
||||||
|
|
||||||
|
// 地区接口
|
||||||
|
export const listPartitionInfo = query => {
|
||||||
|
return request({
|
||||||
|
url: '/partition/listPartitionInfo',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 个人主页资源管理列表
|
||||||
|
export const pesonalBackgroundListByPage = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/pesonalBackground/listByPage',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 个人主页资源管理赠送
|
||||||
|
export const pesonalBackgroundListSend = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/pesonalBackground/send',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 个人主页资源管理保存
|
||||||
|
export const pesonalBackgroundSaveOrUpdate = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/pesonalBackground/saveOrUpdate',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 个人主页记录管理&个人赠送记录
|
||||||
|
export const pesonalBackgroundListRecordByPage = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/pesonalBackground/listRecordByPage',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 个人赠送记录撤回
|
||||||
|
export const pesonalBackgroundListRecordRecoveryPersonalBackground = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/pesonalBackground/recoveryPersonalBackground',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
34
src/api/refund/refund.js
Normal file
34
src/api/refund/refund.js
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import qs from 'qs';
|
||||||
|
import { genQueryParam } from '@/utils/maintainer';
|
||||||
|
// 活动配置 相关接口(一级菜单:活动配置)
|
||||||
|
|
||||||
|
// 分区接口
|
||||||
|
export const listPartitionInfo = query => {
|
||||||
|
return request({
|
||||||
|
url: '/partition/listPartitionInfo',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 国家
|
||||||
|
export const regionInfoList = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/regionInfo/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 列表
|
||||||
|
export const refundList = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/chargeRecord/refundList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 导出
|
||||||
|
export const refundExport = query => {
|
||||||
|
window.location.href = `/admin/chargeRecord/refundExport?${genQueryParam(query)}`;
|
||||||
|
return;
|
||||||
|
};
|
||||||
@@ -4,8 +4,17 @@ import qs from 'qs';
|
|||||||
import { genQueryParam } from '@/utils/maintainer';
|
import { genQueryParam } from '@/utils/maintainer';
|
||||||
// 活动配置 相关接口(一级菜单:活动配置)
|
// 活动配置 相关接口(一级菜单:活动配置)
|
||||||
|
|
||||||
|
// 分区接口
|
||||||
|
export const listPartitionInfo = query => {
|
||||||
|
return request({
|
||||||
|
url: '/partition/listPartitionInfo',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// 获取 周期列表
|
// 获取 周期列表
|
||||||
export const getDateCycleList = query => {
|
export const getDateCycleList = query => {
|
||||||
return request({
|
return request({
|
||||||
url: '/anchorSalaryBill/dateCycle/list',
|
url: '/anchorSalaryBill/dateCycle/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
@@ -88,9 +97,16 @@ export const agencyWithdrawExamineExport = query => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 官方提现记录 结算
|
// 官方提现记录 结算
|
||||||
|
// export const agencyWithdrawSet = query => {
|
||||||
|
// return request({
|
||||||
|
// url: '/agencyWithdrawExamine/settle',
|
||||||
|
// method: 'post',
|
||||||
|
// params: query
|
||||||
|
// });
|
||||||
|
// };
|
||||||
export const agencyWithdrawSet = query => {
|
export const agencyWithdrawSet = query => {
|
||||||
return request({
|
return request({
|
||||||
url: '/agencyWithdrawExamine/settle',
|
url: '/agencyWithdrawExamine/batchSettle',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
@@ -103,6 +119,14 @@ export const agencyWithdrawBatchSet = query => {
|
|||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
// 官方提现记录 批量驳回
|
||||||
|
export const batchReject = query => {
|
||||||
|
return request({
|
||||||
|
url: '/agencyWithdrawExamine/batchReject',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// 公会开业数据统计
|
// 公会开业数据统计
|
||||||
export const agencyOpenList = query => {
|
export const agencyOpenList = query => {
|
||||||
@@ -135,4 +159,27 @@ export const excellentAnchorDetail = query => {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
// 官方提现-国家
|
||||||
|
export const adminCountry = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/country/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// =====================================钻石充值流水=======================================
|
||||||
|
// 查询
|
||||||
|
export const diamondStatistics = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/guild/diamondStatistics',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 导出
|
||||||
|
export const diamondStatisticsExport = query => {
|
||||||
|
window.location.href = `/admin/guild/diamondStatistics/export?${genQueryParam(query)}`;
|
||||||
|
return;
|
||||||
};
|
};
|
||||||
43
src/api/relPrivilegeManage/relPrivilegeManage.js
Normal file
43
src/api/relPrivilegeManage/relPrivilegeManage.js
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import qs from 'qs';
|
||||||
|
// 靓号申请管理 列表
|
||||||
|
export const getPrettyNumberExamineList = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/prettyNumber/examine/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 靓号申请管理 通过
|
||||||
|
export const prettyNumberExaminePass = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/prettyNumber/examine/pass',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 靓号申请管理 删除
|
||||||
|
export const prettyNumberExamineDelete = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/prettyNumber/examine/delete',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 靓号申请管理 拒绝
|
||||||
|
export const prettyNumberExamineReject = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/prettyNumber/examine/reject',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 靓号导入
|
||||||
|
export const erbanUpload = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/prettyNumber/upload',
|
||||||
|
method: 'post',
|
||||||
|
headers: { 'Content-Type': 'multipart/form-data' },
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
};
|
||||||
87
src/api/roomBackground/roomBackground.js
Normal file
87
src/api/roomBackground/roomBackground.js
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { genQueryParam } from '@/utils/maintainer';
|
||||||
|
import qs from 'qs';
|
||||||
|
|
||||||
|
// 地区接口
|
||||||
|
export const listPartitionInfo = query => {
|
||||||
|
return request({
|
||||||
|
url: '/partition/listPartitionInfo',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// ==============================================首页ui配置==============================================
|
||||||
|
// 配置
|
||||||
|
export const appUiSetting = query => {
|
||||||
|
return request({
|
||||||
|
url: '/appUiSetting',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 保存
|
||||||
|
export const appUiSettingSave = query => {
|
||||||
|
return request({
|
||||||
|
url: '/appUiSetting/save',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// ==============================================自定义背景==============================================
|
||||||
|
// 列表
|
||||||
|
export const page = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/roomBackground/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 新增
|
||||||
|
export const roomBackgroundAdd = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/roomBackground/add',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 编辑
|
||||||
|
export const roomBackgroundUpdate = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/roomBackground/update',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// ==============================================自定义背景==============================================
|
||||||
|
// 列表
|
||||||
|
export const customPage = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/roomBackground/custom/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 通过
|
||||||
|
export const customPass = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/roomBackground/custom/pass',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 拒绝
|
||||||
|
export const customReject = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/roomBackground/custom/reject',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 删除
|
||||||
|
export const customDel = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/roomBackground/custom/del',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
13
src/main.js
13
src/main.js
@@ -60,6 +60,17 @@ const app = createApp(App)
|
|||||||
app.config.globalProperties.$copy = function (text) {
|
app.config.globalProperties.$copy = function (text) {
|
||||||
copy(text, this);
|
copy(text, this);
|
||||||
};
|
};
|
||||||
|
// 全局错误处理
|
||||||
|
window.onerror = function (message, source, lineno, colno, error) {
|
||||||
|
console.log(error)
|
||||||
|
// 判断是否是 'insertBefore' 错误
|
||||||
|
if (error instanceof TypeError && message.includes('insertBefore')) {
|
||||||
|
console.error('捕获到 TypeError 错误:', error);
|
||||||
|
window.location.reload();
|
||||||
|
// 你可以在这里处理错误,比如记录日志或执行其他操作
|
||||||
|
return true; // 阻止浏览器默认的错误处理
|
||||||
|
}
|
||||||
|
return false; // 默认处理其他类型的错误
|
||||||
|
};
|
||||||
app.config.warnHandler = () => null;
|
app.config.warnHandler = () => null;
|
||||||
app.use(store).use(router).use(components).use(VueClipboard).mount('#app')
|
app.use(store).use(router).use(components).use(VueClipboard).mount('#app')
|
||||||
|
|||||||
20
src/utils/partitionDesc.js
Normal file
20
src/utils/partitionDesc.js
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
const partitionInfoMap = {
|
||||||
|
1: '英语区',
|
||||||
|
2: '阿拉伯语区',
|
||||||
|
4: '华语区',
|
||||||
|
8: '土耳其区',
|
||||||
|
}
|
||||||
|
|
||||||
|
export const partitionDesc = (val) => {
|
||||||
|
return Object.keys(partitionInfoMap).filter(k=>{
|
||||||
|
return(Number(val) & Number(k)) != 0
|
||||||
|
}).map(k=>partitionInfoMap[k]).join(",");
|
||||||
|
}
|
||||||
|
|
||||||
|
export const partitionIdArr = (val) => {
|
||||||
|
var arr =[];
|
||||||
|
Object.keys(partitionInfoMap).filter(k=>{
|
||||||
|
return(Number(val) & Number(k)) != 0
|
||||||
|
}).map(k=>arr.push(Number(k)));
|
||||||
|
return arr
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@ import global from "@/constants/global";
|
|||||||
const service = axios.create();
|
const service = axios.create();
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
service.interceptors.request.use(config => {
|
service.interceptors.request.use(config => {
|
||||||
console.log('config', config);
|
// console.log('config', config);
|
||||||
return config;
|
return config;
|
||||||
}, error => {
|
}, error => {
|
||||||
Promise.reject(error);
|
Promise.reject(error);
|
||||||
@@ -13,7 +13,7 @@ service.interceptors.request.use(config => {
|
|||||||
|
|
||||||
service.interceptors.response.use(res => {
|
service.interceptors.response.use(res => {
|
||||||
userLogout(res.headers[global.NEED_LOGOUT.toLowerCase()]);
|
userLogout(res.headers[global.NEED_LOGOUT.toLowerCase()]);
|
||||||
console.log('res.data', res);
|
// console.log('res.data', res);
|
||||||
// if (res.data.code == 200) {
|
// if (res.data.code == 200) {
|
||||||
// ElMessage({
|
// ElMessage({
|
||||||
// message: "成功",
|
// message: "成功",
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ export default {
|
|||||||
{ desc: "英语区", id: 1 },
|
{ desc: "英语区", id: 1 },
|
||||||
{ desc: "阿拉伯区", id: 2 },
|
{ desc: "阿拉伯区", id: 2 },
|
||||||
{ desc: "华语区", id: 4 },
|
{ desc: "华语区", id: 4 },
|
||||||
|
{ desc: "土耳其区", id: 8 },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
// 表格
|
// 表格
|
||||||
@@ -206,6 +207,9 @@ export default {
|
|||||||
} else if (val == 4) {
|
} else if (val == 4) {
|
||||||
this.eidDialogTitle = `编辑礼物面板信息-华语区`;
|
this.eidDialogTitle = `编辑礼物面板信息-华语区`;
|
||||||
this.eidText = `华语区`;
|
this.eidText = `华语区`;
|
||||||
|
}else if (val == 8) {
|
||||||
|
this.eidDialogTitle = `编辑礼物面板信息-土耳其区`;
|
||||||
|
this.eidText = `土耳其区`;
|
||||||
}
|
}
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
|
|||||||
457
src/views/accountApplyManage/accountApplyManage.vue
Normal file
457
src/views/accountApplyManage/accountApplyManage.vue
Normal file
@@ -0,0 +1,457 @@
|
|||||||
|
<template>
|
||||||
|
<div class="account-apply-manage">
|
||||||
|
<div class="container">
|
||||||
|
<div class="region-box">
|
||||||
|
<el-radio-group v-model="region">
|
||||||
|
<el-radio v-for="(item, index) in userAreaRegion"
|
||||||
|
:key="index"
|
||||||
|
:label="item.value">{{ item.name }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
<div class="handle-box">
|
||||||
|
<el-form ref="searchForm"
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="90px"
|
||||||
|
:disabled="tableLoading">
|
||||||
|
<div class="search-line">
|
||||||
|
<el-form-item label="MoliStar ID"
|
||||||
|
prop="erbanNo">
|
||||||
|
<el-input v-model.trim="searchForm.erbanNo"
|
||||||
|
placeholder="Please enter"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="UID"
|
||||||
|
prop="uid">
|
||||||
|
<el-input v-model.trim="searchForm.uid"
|
||||||
|
placeholder="Please enter"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="SID"
|
||||||
|
prop="sid">
|
||||||
|
<el-input v-model.trim="searchForm.sid"
|
||||||
|
placeholder="Please enter"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Region"
|
||||||
|
prop="partitionId">
|
||||||
|
<el-select v-model="searchForm.partitionId">
|
||||||
|
<el-option label="全部"
|
||||||
|
value=""></el-option>
|
||||||
|
<el-option v-for="item in partitionInfoList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label-width="40px">
|
||||||
|
<el-button type="primary"
|
||||||
|
@click="handSearch">Search</el-button>
|
||||||
|
<el-button plain
|
||||||
|
@click="resetSearchForm">Reset Search</el-button>
|
||||||
|
<el-upload class="file-uploader"
|
||||||
|
action="#"
|
||||||
|
list-type="picture-card"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-change="handleExcel"
|
||||||
|
accept=".xls, .xlsx"
|
||||||
|
:auto-upload="false">
|
||||||
|
<el-button type="primary">Import</el-button>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
<!-- <el-upload
|
||||||
|
class="file-uploader"
|
||||||
|
action="#"
|
||||||
|
list-type="picture-card"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-change="handleExcel"
|
||||||
|
accept=".xls, .xlsx"
|
||||||
|
:auto-upload="false"
|
||||||
|
>
|
||||||
|
<el-button type="primary" class="el-icon-upload">Import</el-button>
|
||||||
|
</el-upload> -->
|
||||||
|
</div>
|
||||||
|
<div class="table">
|
||||||
|
<el-table :data="tableData"
|
||||||
|
border
|
||||||
|
v-loading="tableLoading"
|
||||||
|
@header-click="headerCopy"
|
||||||
|
style="width: 100%">
|
||||||
|
<el-table-column align="center"
|
||||||
|
prop="id"
|
||||||
|
label="No.">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center"
|
||||||
|
prop="erbanNo"
|
||||||
|
label="MoliStar ID">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center"
|
||||||
|
prop="uid"
|
||||||
|
label="UID">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center"
|
||||||
|
prop="level"
|
||||||
|
label="SID Level">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center"
|
||||||
|
prop="nick"
|
||||||
|
label="Nickname">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center"
|
||||||
|
prop="partitionInfo"
|
||||||
|
label="Region">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center"
|
||||||
|
prop="createTime"
|
||||||
|
label="Apply time">
|
||||||
|
<template v-slot="scope">{{
|
||||||
|
convertTimestamp(scope.row.createTime)
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center"
|
||||||
|
prop="prettyNo"
|
||||||
|
label="SID">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center"
|
||||||
|
prop="status"
|
||||||
|
label="State">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-tag :type="applyStateTag(scope.row.status)">{{
|
||||||
|
applyStateText(scope.row.status)
|
||||||
|
}}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center"
|
||||||
|
prop="updateTime"
|
||||||
|
label="Review time">
|
||||||
|
<template v-slot="scope">{{
|
||||||
|
convertTimestamp(scope.row.updateTime)
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center"
|
||||||
|
prop="operater"
|
||||||
|
label="Operator">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center"
|
||||||
|
label="Operate">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button type="text"
|
||||||
|
v-if="scope.row.status == 0"
|
||||||
|
@click="handlePass(scope.$index, scope.row)">
|
||||||
|
Pass
|
||||||
|
</el-button>
|
||||||
|
<el-button type="text"
|
||||||
|
v-if="scope.row.status == 0"
|
||||||
|
@click="handleReject(scope.$index, scope.row)">
|
||||||
|
Reject
|
||||||
|
</el-button>
|
||||||
|
<el-button type="text"
|
||||||
|
v-if="scope.row.status == 1"
|
||||||
|
class="red"
|
||||||
|
@click="handleDelete(scope.$index, scope.row)">
|
||||||
|
Delete
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<table-pagination :pageParams="pageParams"
|
||||||
|
:pageTotal="pageTotal"
|
||||||
|
:ifShowSizes="true"
|
||||||
|
@handleSizeChange="handleSizeChange"
|
||||||
|
@handlePageChange="handlePageChange"></table-pagination>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getPrettyNumberExamineList,
|
||||||
|
prettyNumberExaminePass,
|
||||||
|
prettyNumberExamineDelete,
|
||||||
|
prettyNumberExamineReject,
|
||||||
|
erbanUpload,
|
||||||
|
} from "@/api/relPrivilegeManage/relPrivilegeManage.js";
|
||||||
|
import { getPartitionInfoList } from '@/api/partition/partitionInfo';
|
||||||
|
import TablePagination from "@/components/common/TablePagination";
|
||||||
|
import { formatDate } from "@/utils/relDate";
|
||||||
|
import { ElMessageBox, ElMessage } from "element-plus"; // 正确引入 ElM
|
||||||
|
// 混入
|
||||||
|
// import Mixin from '../../mixin/mixRegion.js';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "accountApplyManage",
|
||||||
|
// mixins: [Mixin],
|
||||||
|
components: { TablePagination },
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
partitionInfoList: [],
|
||||||
|
tableLoading: false, // 表格是否加载中
|
||||||
|
tableData: [], // 接口返回的表格数据
|
||||||
|
// 搜索表单相关
|
||||||
|
searchForm: {
|
||||||
|
erbanNo: null,
|
||||||
|
uid: null,
|
||||||
|
sid: null,
|
||||||
|
partitionId: null,
|
||||||
|
},
|
||||||
|
pageTotal: 0, // 接口返回的表格总条数
|
||||||
|
pageParams: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this.initPartition();
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getData () {
|
||||||
|
this.tableLoading = true;
|
||||||
|
|
||||||
|
let { pageParams, searchForm } = this;
|
||||||
|
searchForm = JSON.parse(JSON.stringify(searchForm));
|
||||||
|
pageParams = JSON.parse(JSON.stringify(pageParams));
|
||||||
|
Object.keys(searchForm).forEach((item) => {
|
||||||
|
if (
|
||||||
|
!searchForm[item] ||
|
||||||
|
(searchForm[item] !== undefined && searchForm[item] === "")
|
||||||
|
) {
|
||||||
|
delete searchForm[item];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Object.assign(pageParams, searchForm);
|
||||||
|
|
||||||
|
getPrettyNumberExamineList(pageParams).then((res) => {
|
||||||
|
this.tableLoading = false;
|
||||||
|
if (res.code == 200) {
|
||||||
|
let data = res.data;
|
||||||
|
console.log(data);
|
||||||
|
this.tableData = data.rows;
|
||||||
|
this.pageTotal = data.total;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//导入表格
|
||||||
|
handleExcel (file) {
|
||||||
|
let formData = new FormData(); //声明一个FormDate对象
|
||||||
|
formData.append("file", file.raw); //把文件信息放入对象中
|
||||||
|
console.log(file.raw);
|
||||||
|
erbanUpload(formData)
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.getData();
|
||||||
|
this.$message.success("Operation successful");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
// that.$message({
|
||||||
|
// type: 'error',
|
||||||
|
// message: 'Operation failed'
|
||||||
|
// });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 通过
|
||||||
|
handlePass (index, row) {
|
||||||
|
ElMessageBox.confirm("Are you sure you want to pass?", "Prompt", {
|
||||||
|
type: "warning",
|
||||||
|
confirmButtonText: "Sure",
|
||||||
|
cancelButtonText: "Cancel",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
prettyNumberExaminePass({ id: row.id }).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.getData();
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "Operation successful",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
},
|
||||||
|
// 拒绝
|
||||||
|
handleReject (index, row) {
|
||||||
|
ElMessageBox.confirm("Are you sure you want to refuse?", "Prompt", {
|
||||||
|
type: "warning",
|
||||||
|
confirmButtonText: "Sure",
|
||||||
|
cancelButtonText: "Cancel",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
prettyNumberExamineReject({ id: row.id }).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.getData();
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "Operation successful",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
},
|
||||||
|
// 删除操作
|
||||||
|
handleDelete (index, row) {
|
||||||
|
// 二次确认删除
|
||||||
|
ElMessageBox.confirm("Are you sure you want to delete?", "Prompt", {
|
||||||
|
type: "warning",
|
||||||
|
confirmButtonText: "Sure",
|
||||||
|
cancelButtonText: "Cancel",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
prettyNumberExamineDelete({ id: row.id }).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.getData();
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "Operation successful",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
},
|
||||||
|
// 点击搜索
|
||||||
|
handSearch () {
|
||||||
|
this.$refs["searchForm"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.pageParams.pageNo = 1;
|
||||||
|
this.getData();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 重置搜索表单
|
||||||
|
resetSearchForm () {
|
||||||
|
this.$refs["searchForm"].resetFields();
|
||||||
|
this.pageParams.pageNo = 1;
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
// 分页导航
|
||||||
|
handleSizeChange (val) {
|
||||||
|
this.pageParams.pageNo = val;
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
handlePageChange (val) {
|
||||||
|
this.pageParams.pageNo = val;
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
headerCopy (column, e) {
|
||||||
|
this.$copy(column.label);
|
||||||
|
},
|
||||||
|
initPartition () {
|
||||||
|
getPartitionInfoList().then(res => {
|
||||||
|
let data = res.data;
|
||||||
|
this.partitionInfoList = data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
applyStateTag () {
|
||||||
|
return function (val) {
|
||||||
|
let text = "";
|
||||||
|
switch (val) {
|
||||||
|
case 0:
|
||||||
|
text = "warning";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
text = "success";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
text = "info";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
text = "danger";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return text;
|
||||||
|
};
|
||||||
|
},
|
||||||
|
applyStateText () {
|
||||||
|
return function (val) {
|
||||||
|
let text = "";
|
||||||
|
switch (val) {
|
||||||
|
case 0:
|
||||||
|
text = "In Review";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
text = "Passed";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
text = "Rejected";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
text = "Deleted";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return text;
|
||||||
|
};
|
||||||
|
},
|
||||||
|
convertTimestamp () {
|
||||||
|
return function (time) {
|
||||||
|
let date = new Date(time);
|
||||||
|
return formatDate(date);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.red {
|
||||||
|
color: rgb(241, 19, 19);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ::v-deep {
|
||||||
|
// .el-upload--picture-card {
|
||||||
|
// background-color: transparent;
|
||||||
|
// border: 0;
|
||||||
|
// border-radius: 0;
|
||||||
|
// box-sizing: border-box;
|
||||||
|
// width: 0;
|
||||||
|
// height: 45px;
|
||||||
|
// line-height: 0;
|
||||||
|
// vertical-align: top;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
.file-uploader {
|
||||||
|
display: block;
|
||||||
|
margin-left: 51px;
|
||||||
|
input {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.el-upload {
|
||||||
|
background-color: transparent;
|
||||||
|
border: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 0;
|
||||||
|
height: 45px;
|
||||||
|
line-height: 0;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -70,6 +70,7 @@
|
|||||||
<input type="checkbox" name="partitionFlag" value="1"/>英语区<br>
|
<input type="checkbox" name="partitionFlag" value="1"/>英语区<br>
|
||||||
<input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br>
|
<input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br>
|
||||||
<input type="checkbox" name="partitionFlag" value="4"/>华语区<br>
|
<input type="checkbox" name="partitionFlag" value="4"/>华语区<br>
|
||||||
|
<input type="checkbox" name="partitionFlag" value="8"/>土耳其区<br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -101,6 +102,12 @@
|
|||||||
<input type="text" class="form-control validate[required]" name="name" id="en_name">
|
<input type="text" class="form-control validate[required]" name="name" id="en_name">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="tr_name" class="col-sm-3 control-label">土耳其驾名称</label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="text" class="form-control validate[required]" name="name" id="tr_name">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">使用萝卜购买</label>
|
<label class="col-sm-3 control-label">使用萝卜购买</label>
|
||||||
@@ -438,6 +445,7 @@ export default {
|
|||||||
{field: 'name.zh', title: '座驾名称', align: 'center', width: '20%'},
|
{field: 'name.zh', title: '座驾名称', align: 'center', width: '20%'},
|
||||||
{field: 'name.ar', title: '阿语座驾名称', align: 'center', width: '20%'},
|
{field: 'name.ar', title: '阿语座驾名称', align: 'center', width: '20%'},
|
||||||
{field: 'name.en', title: '英语座驾名称', align: 'center', width: '20%'},
|
{field: 'name.en', title: '英语座驾名称', align: 'center', width: '20%'},
|
||||||
|
{field: 'name.tr', title: '土耳其名称', align: 'center', width: '20%'},
|
||||||
{
|
{
|
||||||
field: 'partitionFlag',
|
field: 'partitionFlag',
|
||||||
title: '地区',
|
title: '地区',
|
||||||
@@ -454,6 +462,9 @@ export default {
|
|||||||
if ((val & 4) != 0) {
|
if ((val & 4) != 0) {
|
||||||
value += '华语区<br>';
|
value += '华语区<br>';
|
||||||
}
|
}
|
||||||
|
if ((val & 8) != 0) {
|
||||||
|
value += '土耳其区<br>';
|
||||||
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -664,9 +675,11 @@ export default {
|
|||||||
$('#name').val('');
|
$('#name').val('');
|
||||||
$('#ar_name').val('');
|
$('#ar_name').val('');
|
||||||
$('#en_name').val('');
|
$('#en_name').val('');
|
||||||
|
$('#tr_name').val('');
|
||||||
$("#name").attr('readonly', false);
|
$("#name").attr('readonly', false);
|
||||||
$("#ar_name").attr('readonly', false);
|
$("#ar_name").attr('readonly', false);
|
||||||
$("#en_name").attr('readonly', false);
|
$("#en_name").attr('readonly', false);
|
||||||
|
$("#tr_name").attr('readonly', false);
|
||||||
// $("#price").attr('readonly', false);
|
// $("#price").attr('readonly', false);
|
||||||
// $("#renewPrice").attr('readonly', false);
|
// $("#renewPrice").attr('readonly', false);
|
||||||
$("#seq").val('');
|
$("#seq").val('');
|
||||||
@@ -865,10 +878,12 @@ export default {
|
|||||||
$("#name").val(jsonName.zh);
|
$("#name").val(jsonName.zh);
|
||||||
$("#ar_name").val(jsonName.ar);
|
$("#ar_name").val(jsonName.ar);
|
||||||
$("#en_name").val(jsonName.en);
|
$("#en_name").val(jsonName.en);
|
||||||
|
$("#tr_name").val(jsonName.tr);
|
||||||
} else {
|
} else {
|
||||||
$("#name").val(name);
|
$("#name").val(name);
|
||||||
$("#ar_name").val(name);
|
$("#ar_name").val(name);
|
||||||
$("#en_name").val(name);
|
$("#en_name").val(name);
|
||||||
|
$("#tr_name").val(name);
|
||||||
}
|
}
|
||||||
$("#price").val(json.entity.price);
|
$("#price").val(json.entity.price);
|
||||||
$("#renewPrice").val(json.entity.renewPrice);
|
$("#renewPrice").val(json.entity.renewPrice);
|
||||||
@@ -997,6 +1012,11 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
$("input:checkbox[name='partitionFlag']")[2].checked = false;
|
$("input:checkbox[name='partitionFlag']")[2].checked = false;
|
||||||
}
|
}
|
||||||
|
if ((partitionFlag & 8) != 0) {
|
||||||
|
$("input:checkbox[name='partitionFlag']")[3].checked = true;
|
||||||
|
} else {
|
||||||
|
$("input:checkbox[name='partitionFlag']")[3].checked = false;
|
||||||
|
}
|
||||||
|
|
||||||
// 打开编辑弹窗
|
// 打开编辑弹窗
|
||||||
$("#cardGoodsModal").modal('show');
|
$("#cardGoodsModal").modal('show');
|
||||||
@@ -1046,11 +1066,11 @@ export default {
|
|||||||
$("#tipModal").modal('show');
|
$("#tipModal").modal('show');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!effect) {
|
// if (!effect) {
|
||||||
$("#tipMsg").text("请上传动画图片");
|
// $("#tipMsg").text("请上传动画图片");
|
||||||
$("#tipModal").modal('show');
|
// $("#tipModal").modal('show');
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
if (!days || days <= 0) {
|
if (!days || days <= 0) {
|
||||||
$("#tipMsg").text("请输入合理的购买天数");
|
$("#tipMsg").text("请输入合理的购买天数");
|
||||||
$("#tipModal").modal('show');
|
$("#tipModal").modal('show');
|
||||||
@@ -1077,8 +1097,10 @@ export default {
|
|||||||
var ar_name = $("#ar_name").val();
|
var ar_name = $("#ar_name").val();
|
||||||
// 英语名称
|
// 英语名称
|
||||||
var en_name = $("#en_name").val();
|
var en_name = $("#en_name").val();
|
||||||
|
// 土耳其名称
|
||||||
|
var tr_name = $("#tr_name").val();
|
||||||
// 国际化字段
|
// 国际化字段
|
||||||
var jsonName = {"zh":name,"ar":ar_name,"en":en_name}
|
var jsonName = {"zh":name,"ar":ar_name,"en":en_name,"tr":tr_name}
|
||||||
const nameValue = JSON.stringify(jsonName);
|
const nameValue = JSON.stringify(jsonName);
|
||||||
// 修改属性值
|
// 修改属性值
|
||||||
formData.name = nameValue; // 将giftName修改为"newGiftName"
|
formData.name = nameValue; // 将giftName修改为"newGiftName"
|
||||||
|
|||||||
@@ -11,19 +11,21 @@
|
|||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<label for="searchType"
|
<label for="searchType"
|
||||||
class="col-sm-4 control-label">地区:</label>
|
class="col-sm-2 control-label">地区:</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-8">
|
||||||
<select name="searchType"
|
<select name="searchType"
|
||||||
id="searchType"
|
id="searchType"
|
||||||
data-btn-class="btn-warning"
|
data-btn-class="btn-warning"
|
||||||
class="form-control">
|
class="form-control">
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<button id="btnSearch" class="btn btn-default">
|
||||||
|
<i class="glyphicon glyphicon-search"></i>查询
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button id="btnSearch"
|
|
||||||
class="btn btn-default">
|
|
||||||
<i class="glyphicon glyphicon-search"></i>查询
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-body"
|
<div class="box-body"
|
||||||
@@ -60,9 +62,6 @@
|
|||||||
<input type="hidden"
|
<input type="hidden"
|
||||||
name="code"
|
name="code"
|
||||||
id="code" />
|
id="code" />
|
||||||
<input type="hidden"
|
|
||||||
name="currency"
|
|
||||||
id="currency" />
|
|
||||||
<input type="hidden"
|
<input type="hidden"
|
||||||
name="type"
|
name="type"
|
||||||
id="type" />
|
id="type" />
|
||||||
@@ -76,9 +75,19 @@
|
|||||||
id="name">
|
id="name">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="currency"
|
||||||
|
class="col-sm-3 control-label">货币:</label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="text"
|
||||||
|
readonly
|
||||||
|
class="form-control"
|
||||||
|
id="currency">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="rate"
|
<label for="rate"
|
||||||
class="col-sm-3 control-label">USD汇率:</label>
|
class="col-sm-3 control-label">兑USD汇率:</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
@@ -324,9 +333,10 @@ export default {
|
|||||||
$('#regionTable').bootstrapTable({
|
$('#regionTable').bootstrapTable({
|
||||||
columns: [
|
columns: [
|
||||||
{ field: 'name', title: '地区', align: 'center', width: '5%' },
|
{ field: 'name', title: '地区', align: 'center', width: '5%' },
|
||||||
|
{ field: 'currency', title: '货币', align: 'center', width: '5%'},
|
||||||
{
|
{
|
||||||
field: 'rate',
|
field: 'rate',
|
||||||
title: 'USD汇率',
|
title: '兑USD汇率',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '5%',
|
width: '5%',
|
||||||
formatter: function (val, row, index) {
|
formatter: function (val, row, index) {
|
||||||
@@ -430,7 +440,7 @@ export default {
|
|||||||
return '<img src="' + val + '" style="width:90px;height:90px;" alt="">'
|
return '<img src="' + val + '" style="width:90px;height:90px;" alt="">'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'regionName', title: '地区', align: 'center', width: '5%' },
|
{ field: 'currency', title: '货币', align: 'center', width: '5%' },
|
||||||
{
|
{
|
||||||
field: 'isEnabled',
|
field: 'isEnabled',
|
||||||
title: '是否展示在充值H5',
|
title: '是否展示在充值H5',
|
||||||
@@ -823,7 +833,7 @@ export default {
|
|||||||
var $select = $('#searchType');
|
var $select = $('#searchType');
|
||||||
for (let i = 0; i < array.length; i++) {
|
for (let i = 0; i < array.length; i++) {
|
||||||
var $option = $('<option value="' + array[i].type + '" />');
|
var $option = $('<option value="' + array[i].type + '" />');
|
||||||
$option.html(array[i].name);
|
$option.html(array[i].desc + '(' + array[i].name + ')');
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
$option.attr('selected', true);
|
$option.attr('selected', true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,7 @@
|
|||||||
<input type="checkbox" name="partitionFlag" value="1"/>英语区<br>
|
<input type="checkbox" name="partitionFlag" value="1"/>英语区<br>
|
||||||
<input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br>
|
<input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br>
|
||||||
<input type="checkbox" name="partitionFlag" value="4"/>华语区<br>
|
<input type="checkbox" name="partitionFlag" value="4"/>华语区<br>
|
||||||
|
<input type="checkbox" name="partitionFlag" value="8"/>土耳其区<br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -94,27 +95,37 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label">安卓图片:</label>
|
<label for="tr_modal_name" class="col-sm-4 control-label">土耳其装扮名称:</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<img src="" id="addAndroidIconPicUrl" style="height:44px;" alt="">
|
<input type="text" class="form-control validate[required]" name="name" id="tr_modal_name" placeholder="请输入气泡名称">
|
||||||
<input type="file" id="add_android_UploadIconPic" name="uploadFile"
|
|
||||||
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
|
|
||||||
<button class="btn btn-success" type="button" name="uploadBtn"
|
|
||||||
id="addAndroidIconPicUrl_androidUrl">上传</button>
|
|
||||||
<input type="hidden" id="androidUrl" name="androidUrl" class="form-control" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<form class="form-horizontal" id="addForm1">
|
||||||
<label class="col-sm-4 control-label">IOS图片:</label>
|
<div class="form-group">
|
||||||
<div class="col-sm-6">
|
<label class="col-sm-4 control-label">安卓图片:</label>
|
||||||
<img src="" id="addIosIconPicUrl" style="height:44px;" alt="">
|
<div class="col-sm-6">
|
||||||
<input type="file" id="add_ios_UploadIconPic" name="uploadFile"
|
<img src="" id="addAndroidIconPicUrl" style="height:44px;" alt="">
|
||||||
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
|
<input type="file" id="add_android_UploadIconPic" name="uploadFile"
|
||||||
<button class="btn btn-success" type="button" name="uploadBtn"
|
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
|
||||||
id="addIosIconPicUrl_iosUrl">上传</button>
|
<button class="btn btn-success" type="button" name="uploadBtn"
|
||||||
<input type="hidden" id="iosUrl" name="iosUrl" class="form-control" />
|
id="addAndroidIconPicUrl_androidUrl">上传</button>
|
||||||
|
<input type="hidden" id="androidUrl" name="androidUrl" class="form-control" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
|
<form class="form-horizontal" id="addForm2">
|
||||||
|
<div class="form-group" >
|
||||||
|
<label class="col-sm-4 control-label">IOS图片:</label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<img src="" id="addIosIconPicUrl" style="height:44px;" alt="">
|
||||||
|
<input type="file" id="add_ios_UploadIconPic" name="uploadFile"
|
||||||
|
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
|
||||||
|
<button class="btn btn-success" type="button" name="uploadBtn"
|
||||||
|
id="addIosIconPicUrl_iosUrl">上传</button>
|
||||||
|
<input type="hidden" id="iosUrl" name="iosUrl" class="form-control" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="status" class="col-sm-4 control-label">装扮状态:</label>
|
<label for="status" class="col-sm-4 control-label">装扮状态:</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
@@ -216,12 +227,16 @@ export default {
|
|||||||
if ((val & 4) != 0) {
|
if ((val & 4) != 0) {
|
||||||
value += '华语区<br>';
|
value += '华语区<br>';
|
||||||
}
|
}
|
||||||
|
if ((val & 8) != 0) {
|
||||||
|
value += '土耳其区<br>';
|
||||||
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: 'name.zh', title: '装扮名称', align: 'middle', width: '5%'},
|
{field: 'name.zh', title: '装扮名称', align: 'middle', width: '5%'},
|
||||||
{field: 'name.ar', title: '阿语装扮名称', align: 'middle', width: '5%'},
|
{field: 'name.ar', title: '阿语装扮名称', align: 'middle', width: '5%'},
|
||||||
{field: 'name.en', title: '英语装扮名称', align: 'middle', width: '5%'},
|
{field: 'name.en', title: '英语装扮名称', align: 'middle', width: '5%'},
|
||||||
|
{field: 'name.tr', title: '土耳其扮名称', align: 'middle', width: '5%'},
|
||||||
{
|
{
|
||||||
field: 'iosUrl',
|
field: 'iosUrl',
|
||||||
title: '装扮图片',
|
title: '装扮图片',
|
||||||
@@ -374,12 +389,16 @@ export default {
|
|||||||
$("#ar_modal_name").val(row.name.ar);
|
$("#ar_modal_name").val(row.name.ar);
|
||||||
// 英语名称
|
// 英语名称
|
||||||
$("#en_modal_name").val(row.name.en);
|
$("#en_modal_name").val(row.name.en);
|
||||||
|
// 土耳其名称
|
||||||
|
$("#tr_modal_name").val(row.name.tr);
|
||||||
} else {
|
} else {
|
||||||
$("#modal_name").val(name);
|
$("#modal_name").val(name);
|
||||||
// 阿语名称
|
// 阿语名称
|
||||||
$("#ar_modal_name").val(name);
|
$("#ar_modal_name").val(name);
|
||||||
// 英语名称
|
// 英语名称
|
||||||
$("#en_modal_name").val(name);
|
$("#en_modal_name").val(name);
|
||||||
|
// 土耳其名称
|
||||||
|
$("#tr_modal_name").val(name);
|
||||||
}
|
}
|
||||||
$('#addAndroidIconPicUrl').attr("src", row.androidUrl);
|
$('#addAndroidIconPicUrl').attr("src", row.androidUrl);
|
||||||
$("#addForm #androidUrl").val(row.androidUrl);
|
$("#addForm #androidUrl").val(row.androidUrl);
|
||||||
@@ -407,28 +426,39 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$("[name='uploadBtn']").on('click', function () {
|
$("#addAndroidIconPicUrl_androidUrl").on('click', function () {
|
||||||
let id = $(this).attr('id');
|
|
||||||
let b = id.split("_");
|
|
||||||
let imageId = b[0];
|
|
||||||
let inputId = b[1];
|
|
||||||
console.log(imageId)
|
|
||||||
console.log(inputId)
|
|
||||||
var options = {
|
var options = {
|
||||||
type: 'post',
|
type: 'post',
|
||||||
url: '/admin/upload/img',
|
url: '/admin/upload/img',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function (json) {
|
success: function (json) {
|
||||||
if (json.path) {
|
if (json.path) {
|
||||||
$("#" + inputId).val(json.path);
|
$("#addAndroidIconPicUrl").val(json.path);
|
||||||
$("#" + imageId).attr("src", json.path);
|
$("#addAndroidIconPicUrl").attr("src", json.path);
|
||||||
} else {
|
} else {
|
||||||
$("#tipMsg").text(json.msg);
|
$("#tipMsg").text(json.msg);
|
||||||
$("#tipModal").modal('show');
|
$("#tipModal").modal('show');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
$("#addForm").ajaxSubmit(options);
|
$("#addForm1").ajaxSubmit(options);
|
||||||
|
});
|
||||||
|
$("#addIosIconPicUrl_iosUrl").on('click', function () {
|
||||||
|
var options = {
|
||||||
|
type: 'post',
|
||||||
|
url: '/admin/upload/img',
|
||||||
|
dataType: 'json',
|
||||||
|
success: function (json) {
|
||||||
|
if (json.path) {
|
||||||
|
$("#addIosIconPicUrl").val(json.path);
|
||||||
|
$("#addIosIconPicUrl").attr("src", json.path);
|
||||||
|
} else {
|
||||||
|
$("#tipMsg").text(json.msg);
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$("#addForm2").ajaxSubmit(options);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -454,8 +484,10 @@ export default {
|
|||||||
var ar_name = $("#ar_modal_name").val();
|
var ar_name = $("#ar_modal_name").val();
|
||||||
// 英语名称
|
// 英语名称
|
||||||
var en_name = $("#en_modal_name").val();
|
var en_name = $("#en_modal_name").val();
|
||||||
|
// 土耳其名称
|
||||||
|
var tr_name = $("#tr_modal_name").val();
|
||||||
// 国际化字段
|
// 国际化字段
|
||||||
var jsonName = {"zh":name,"ar":ar_name,"en":en_name}
|
var jsonName = {"zh":name,"ar":ar_name,"en":en_name,"tr":tr_name}
|
||||||
const nameValue = JSON.stringify(jsonName);
|
const nameValue = JSON.stringify(jsonName);
|
||||||
// 修改属性值
|
// 修改属性值
|
||||||
formData.name = nameValue; // 将giftName修改为"newGiftName"
|
formData.name = nameValue; // 将giftName修改为"newGiftName"
|
||||||
@@ -467,6 +499,8 @@ export default {
|
|||||||
partitionFlag |= partitionFlagArray[i].value;
|
partitionFlag |= partitionFlagArray[i].value;
|
||||||
}
|
}
|
||||||
formData.partitionFlag = partitionFlag;
|
formData.partitionFlag = partitionFlag;
|
||||||
|
formData.androidUrl = $('#addAndroidIconPicUrl').attr('src');
|
||||||
|
formData.iosUrl = $('#addIosIconPicUrl').attr('src');
|
||||||
// 将修改后的对象转换回序列化字符串
|
// 将修改后的对象转换回序列化字符串
|
||||||
let newSerializeStr = $.param(formData);
|
let newSerializeStr = $.param(formData);
|
||||||
//做下数据校验
|
//做下数据校验
|
||||||
@@ -528,6 +562,7 @@ export default {
|
|||||||
$('#modal_name').val('');
|
$('#modal_name').val('');
|
||||||
$('#ar_modal_name').val('');
|
$('#ar_modal_name').val('');
|
||||||
$('#en_modal_name').val('');
|
$('#en_modal_name').val('');
|
||||||
|
$('#tr_modal_name').val('');
|
||||||
$('input[name="partitionFlag"]').each(function() {
|
$('input[name="partitionFlag"]').each(function() {
|
||||||
$(this).checked = false;
|
$(this).checked = false;
|
||||||
});
|
});
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1531
src/views/firstpage/towPageBannerView.vue
Normal file
1531
src/views/firstpage/towPageBannerView.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -48,7 +48,7 @@
|
|||||||
:src="scope.row.logo"
|
:src="scope.row.logo"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="scope.row.logo"
|
:preview-src-list="scope.row.logo"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
:src="scope.row.background"
|
:src="scope.row.background"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="scope.row.background"
|
:preview-src-list="scope.row.background"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
:src="scope.row.pic"
|
:src="scope.row.pic"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="scope.row.pic"
|
:preview-src-list="scope.row.pic"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
|
|||||||
376
src/views/games/lingSmallGames.vue
Normal file
376
src/views/games/lingSmallGames.vue
Normal file
@@ -0,0 +1,376 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<!-- 查询 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>游戏</span>
|
||||||
|
<el-select v-model="inquire.gameArrVal" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.gamesArr"
|
||||||
|
:key="item.gameId"
|
||||||
|
:label="item.gameName"
|
||||||
|
:value="item.gameId"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<!-- 时间选择器 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span class="demonstration">日期</span>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="inquire.time"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</div>
|
||||||
|
<!-- 查询按钮 -->
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
tableData = [];
|
||||||
|
currentPage = 1;
|
||||||
|
isFinished = false;
|
||||||
|
getData();
|
||||||
|
"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
<el-button class="primary" type="primary" @click="confirmExport2Excel()"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
|
||||||
|
<!-- 表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
ref="multipleTable"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="dateTime" align="center" label="日期" />
|
||||||
|
<el-table-column prop="userCount" align="center" label="人数" />
|
||||||
|
<el-table-column prop="consumeNum" align="center" label="货币消耗" />
|
||||||
|
<el-table-column prop="settleNum" align="center" label="结算总量" />
|
||||||
|
<el-table-column prop="platformNum" align="center" label="平台收入" />
|
||||||
|
<el-table-column align="center" label="操作" width="300">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
detailPageFunArr = scope.row;
|
||||||
|
tableDataDetails = [];
|
||||||
|
currentPage2 = 1;
|
||||||
|
isFinished2 = false;
|
||||||
|
detailPageFun();
|
||||||
|
"
|
||||||
|
size="default"
|
||||||
|
>查看详情</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="[1, 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 v-if="!isFinished" class="pagination">
|
||||||
|
<el-button
|
||||||
|
class="pagination_in"
|
||||||
|
@click="loadMore"
|
||||||
|
type="primary"
|
||||||
|
:loading="isLoading"
|
||||||
|
>加载更多</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div v-else class="pagination">
|
||||||
|
<span class="pagination_in">没有更多数据了</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 内嵌单个工会详情 -->
|
||||||
|
<el-dialog :title="detailsTitle" v-model="detailsDialog">
|
||||||
|
<el-table
|
||||||
|
v-loading="loading2"
|
||||||
|
:data="tableDataDetails"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="erbanNo" align="center" label="用户平台ID" />
|
||||||
|
<el-table-column prop="nick" align="center" label="昵称" />
|
||||||
|
<el-table-column prop="consumeNum" align="center" label="货币消耗" />
|
||||||
|
<el-table-column prop="settleNum" align="center" label="结算总量" />
|
||||||
|
<el-table-column prop="platformNum" align="center" label="平台收入" />
|
||||||
|
</el-table>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<!-- <el-pagination
|
||||||
|
style="margin-top: 10px"
|
||||||
|
class="paginationClass"
|
||||||
|
v-model:current-page="currentPage2"
|
||||||
|
v-model:page-size="pageSize2"
|
||||||
|
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||||
|
layout="sizes, prev, pager, next"
|
||||||
|
:total="total2"
|
||||||
|
@size-change="handleSizeChange2"
|
||||||
|
@current-change="handleCurrentChange2"
|
||||||
|
/> -->
|
||||||
|
<!-- 加载更多按钮 -->
|
||||||
|
<div v-if="!isFinished2" class="pagination">
|
||||||
|
<el-button
|
||||||
|
class="pagination_in"
|
||||||
|
@click="loadMore2"
|
||||||
|
type="primary"
|
||||||
|
:loading="isLoading2"
|
||||||
|
>加载更多</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div v-else class="pagination">
|
||||||
|
<span class="pagination_in">没有更多数据了</span>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button @click="detailsDialog = false">关闭</el-button>
|
||||||
|
<el-button type="primary" @click="confirmExport2Excel2()"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</div></template
|
||||||
|
>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
statisPage,
|
||||||
|
sysConfKey,
|
||||||
|
detailPage,
|
||||||
|
exportForMiniGame,
|
||||||
|
statisExport,
|
||||||
|
} from "@/api/lingSmallGames/lingSmallGames";
|
||||||
|
// @ts-ignore
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
// @ts-ignore
|
||||||
|
import { ElMessage, ElTable } from "element-plus";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { ElMessageBox } from "element-plus"; // 正确引入 ElM
|
||||||
|
export default {
|
||||||
|
name: "lingSmallGames",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
loading2: false,
|
||||||
|
//查询所需条件对象
|
||||||
|
inquire: {
|
||||||
|
time: "",
|
||||||
|
gameArrVal: "",
|
||||||
|
gamesArr: [],
|
||||||
|
},
|
||||||
|
// 表格
|
||||||
|
tableData: [],
|
||||||
|
// 分页
|
||||||
|
total: 0, //总页数
|
||||||
|
currentPage: 1, //页码
|
||||||
|
pageSize: 10, //条数
|
||||||
|
isLoading: false, // 加载状态
|
||||||
|
isFinished: false, // 是否加载完成
|
||||||
|
// 弹窗
|
||||||
|
detailsDialog: false,
|
||||||
|
detailsTitle: "",
|
||||||
|
tableDataDetails: [],
|
||||||
|
dateTimePub: null,
|
||||||
|
detailPageFunArr: {},
|
||||||
|
// 分页
|
||||||
|
total2: 0, //总页数
|
||||||
|
currentPage2: 1, //页码
|
||||||
|
pageSize2: 10, //条数
|
||||||
|
isLoading2: false, // 加载状态
|
||||||
|
isFinished2: false, // 是否加载完成
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
sysConfKey({ configId: "leadercc_game" }).then((res) => {
|
||||||
|
this.inquire.gamesArr = JSON.parse(res.data.configValue);
|
||||||
|
this.getData();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 查询接口
|
||||||
|
getData() {
|
||||||
|
this.isLoading = true;
|
||||||
|
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");
|
||||||
|
}
|
||||||
|
statisPage({
|
||||||
|
gameId: this.inquire.gameArrVal,
|
||||||
|
startTime: startTime,
|
||||||
|
endTime: endTime,
|
||||||
|
pageNum: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
// 判断返回的记录是否为空数组
|
||||||
|
const records = res.data.records;
|
||||||
|
if (records.length > 0) {
|
||||||
|
// 如果有数据,追加到表格数据中
|
||||||
|
this.tableData = [...this.tableData, ...records];
|
||||||
|
this.currentPage++; // 更新当前页码
|
||||||
|
} else {
|
||||||
|
// 如果数据长度为 0,停止加载
|
||||||
|
this.isFinished = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
this.isLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 加载下一页数据
|
||||||
|
loadMore() {
|
||||||
|
if (!this.isFinished) {
|
||||||
|
this.currentPage = this.currentPage++;
|
||||||
|
this.getData(this.currentPage);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 加载下一页数据
|
||||||
|
loadMore2() {
|
||||||
|
if (!this.isFinished2) {
|
||||||
|
this.currentPage2 = this.currentPage2++;
|
||||||
|
this.detailPageFun(this.currentPage2);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 导出
|
||||||
|
confirmExport2Excel() {
|
||||||
|
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");
|
||||||
|
}
|
||||||
|
exportForMiniGame({
|
||||||
|
gameId: this.inquire.gameArrVal,
|
||||||
|
startTime: startTime,
|
||||||
|
endTime: endTime,
|
||||||
|
}).then();
|
||||||
|
},
|
||||||
|
// 导出弹窗
|
||||||
|
confirmExport2Excel2() {
|
||||||
|
statisExport({
|
||||||
|
dateTime: this.dateTimePub,
|
||||||
|
gameId: this.inquire.gameArrVal,
|
||||||
|
}).then();
|
||||||
|
},
|
||||||
|
// 详情接口
|
||||||
|
detailPageFun() {
|
||||||
|
this.isLoading2 = true;
|
||||||
|
this.detailsDialog = true;
|
||||||
|
this.loading2 = true;
|
||||||
|
this.detailsTitle = this.dateTimePub = this.detailPageFunArr.dateTime;
|
||||||
|
detailPage({
|
||||||
|
gameId: this.detailPageFunArr.gameId,
|
||||||
|
dateTime: this.detailPageFunArr.dateTime,
|
||||||
|
pageNum: this.currentPage2,
|
||||||
|
pageSize: this.pageSize2,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
// 判断返回的记录是否为空数组
|
||||||
|
const records2 = res.data.records;
|
||||||
|
if (records2.length > 0) {
|
||||||
|
// 如果有数据,追加到表格数据中
|
||||||
|
this.tableDataDetails = [...this.tableDataDetails, ...records2];
|
||||||
|
this.currentPage2++; // 更新当前页码
|
||||||
|
} else {
|
||||||
|
// 如果数据长度为 0,停止加载
|
||||||
|
this.isFinished2 = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.loading2 = false;
|
||||||
|
this.isLoading2 = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 分页导航
|
||||||
|
handleSizeChange() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
handleCurrentChange() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
handleSizeChange2() {
|
||||||
|
this.detailPageFun();
|
||||||
|
},
|
||||||
|
handleCurrentChange2() {
|
||||||
|
this.detailPageFun();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.selectBox {
|
||||||
|
display: flex;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.selectBoxImg {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
.pagination {
|
||||||
|
margin: 10px auto 10px;
|
||||||
|
position: relative;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
.pagination_in {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -20,6 +20,17 @@
|
|||||||
:disabled="tableLoading"
|
:disabled="tableLoading"
|
||||||
>
|
>
|
||||||
<div class="search-line">
|
<div class="search-line">
|
||||||
|
<el-form-item label="分区" prop="partitionId">
|
||||||
|
<el-select v-model="searchForm.partitionId" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in partitionArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="公会ID" prop="agencyId">
|
<el-form-item label="公会ID" prop="agencyId">
|
||||||
<el-input
|
<el-input
|
||||||
v-model.trim="searchForm.agencyId"
|
v-model.trim="searchForm.agencyId"
|
||||||
@@ -66,6 +77,7 @@
|
|||||||
{{ regionType(scope.row.region) }}
|
{{ regionType(scope.row.region) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
|
<el-table-column align="center" prop="partitionDesc" label="分区"> </el-table-column>
|
||||||
<el-table-column align="center" prop="agencyId" label="公会ID">
|
<el-table-column align="center" prop="agencyId" label="公会ID">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="agencyName" label="公会名称">
|
<el-table-column align="center" prop="agencyName" label="公会名称">
|
||||||
@@ -81,7 +93,11 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="energyValue" label="总钻石流水">
|
<el-table-column align="center" prop="energyValue" label="总钻石流水">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
{{ scope.row.energyValue ? scope.row.energyValue.toLocaleString() : "null"}}
|
{{
|
||||||
|
scope.row.energyValue
|
||||||
|
? scope.row.energyValue.toLocaleString()
|
||||||
|
: "null"
|
||||||
|
}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -109,7 +125,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang=js>
|
<script lang=js>
|
||||||
import { getDateCycleList, getAgencyDiamondFlow, agencyDiamondFlowExport } from '@/api/relAgency/relAgency.js';
|
import { getDateCycleList, getAgencyDiamondFlow, agencyDiamondFlowExport,listPartitionInfo } from '@/api/relAgency/relAgency.js';
|
||||||
import TablePagination from '@/components/common/TablePagination';
|
import TablePagination from '@/components/common/TablePagination';
|
||||||
import { formatDate, formatDateYMD } from '@/utils/relDate';
|
import { formatDate, formatDateYMD } from '@/utils/relDate';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
@@ -125,6 +141,7 @@ export default {
|
|||||||
components: { TablePagination },
|
components: { TablePagination },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
partitionArr: [],
|
||||||
dateCycleList: [],
|
dateCycleList: [],
|
||||||
btnLoading: false, // 导出弹出框(dialog)的确认按钮
|
btnLoading: false, // 导出弹出框(dialog)的确认按钮
|
||||||
tableLoading: false, // 表格是否加载中
|
tableLoading: false, // 表格是否加载中
|
||||||
@@ -140,7 +157,8 @@ export default {
|
|||||||
agencyOwnerId: null,
|
agencyOwnerId: null,
|
||||||
agencyId: null,
|
agencyId: null,
|
||||||
dateCycle: null,
|
dateCycle: null,
|
||||||
region: null
|
region: null,
|
||||||
|
partitionId: "",
|
||||||
},
|
},
|
||||||
searchRule: {
|
searchRule: {
|
||||||
startTime: [
|
startTime: [
|
||||||
@@ -173,6 +191,10 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
listPartitionInfo().then((res) => {
|
||||||
|
this.partitionArr = res.data;
|
||||||
|
this.searchForm.partitionId=this.partitionArr[0].id;
|
||||||
|
});
|
||||||
this.getDateCycleList();
|
this.getDateCycleList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -272,11 +294,12 @@ export default {
|
|||||||
},
|
},
|
||||||
// 分页导航
|
// 分页导航
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
|
console.log(val);
|
||||||
this.pageParams.pageSize = val;
|
this.pageParams.pageSize = val;
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
handlePageChange(val) {
|
handlePageChange(val) {
|
||||||
this.pageParams.pageSize = val;
|
this.pageParams.pageNo = val;
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
headerCopy(column, e) {
|
headerCopy(column, e) {
|
||||||
|
|||||||
@@ -10,6 +10,17 @@
|
|||||||
:disabled="tableLoading"
|
:disabled="tableLoading"
|
||||||
>
|
>
|
||||||
<div class="search-line">
|
<div class="search-line">
|
||||||
|
<el-form-item label="分区" prop="partitionId">
|
||||||
|
<el-select v-model="searchForm.partitionId" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in partitionArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="充值代理ID" prop="chargeAgentErbanNo">
|
<el-form-item label="充值代理ID" prop="chargeAgentErbanNo">
|
||||||
<el-input
|
<el-input
|
||||||
v-model.trim="searchForm.chargeAgentErbanNo"
|
v-model.trim="searchForm.chargeAgentErbanNo"
|
||||||
@@ -58,6 +69,8 @@
|
|||||||
@header-click="headerCopy"
|
@header-click="headerCopy"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
|
<el-table-column align="center" prop="partitionDesc" label="分区">
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
prop="receiveErbano"
|
prop="receiveErbano"
|
||||||
@@ -110,9 +123,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { chargeAgentList, chargeAgentSum } from "@/api/relAgency/relAgency.js";
|
import {
|
||||||
|
chargeAgentList,
|
||||||
|
chargeAgentSum,
|
||||||
|
listPartitionInfo,
|
||||||
|
} from "@/api/relAgency/relAgency.js";
|
||||||
import TablePagination from "@/components/common/TablePagination";
|
import TablePagination from "@/components/common/TablePagination";
|
||||||
import { formatDate, formatDateYMD } from "@/utils/relDate";
|
import { formatDate, formatDateYMD } from "@/utils/relDate";
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
@@ -137,7 +155,9 @@ export default {
|
|||||||
chargeAgentErbanNo: null,
|
chargeAgentErbanNo: null,
|
||||||
startTime: null,
|
startTime: null,
|
||||||
endTime: null,
|
endTime: null,
|
||||||
|
partitionId: "",
|
||||||
},
|
},
|
||||||
|
partitionArr: [],
|
||||||
searchRule: {
|
searchRule: {
|
||||||
startTime: [
|
startTime: [
|
||||||
{
|
{
|
||||||
@@ -170,14 +190,23 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// this.getData();
|
// this.getData();
|
||||||
|
listPartitionInfo().then((res) => {
|
||||||
|
this.partitionArr = res.data;
|
||||||
|
this.searchForm.partitionId=this.partitionArr[0].id;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getData() {
|
getData() {
|
||||||
this.tableLoading = true;
|
this.tableLoading = true;
|
||||||
|
|
||||||
let { pageParams, searchForm } = this;
|
let { pageParams, searchForm } = this;
|
||||||
searchForm.startTime = formatDate(searchForm.startTime )
|
console.log(searchForm);
|
||||||
searchForm.endTime = formatDate(searchForm.endTime )
|
searchForm.startTime = searchForm.startTime
|
||||||
|
? dateFormat(searchForm.startTime, "yyyy-MM-dd hh:mm:ss")
|
||||||
|
: null;
|
||||||
|
searchForm.endTime = searchForm.endTime
|
||||||
|
? dateFormat(searchForm.endTime, "yyyy-MM-dd hh:mm:ss")
|
||||||
|
: null;
|
||||||
searchForm = JSON.parse(JSON.stringify(searchForm));
|
searchForm = JSON.parse(JSON.stringify(searchForm));
|
||||||
pageParams = JSON.parse(JSON.stringify(pageParams));
|
pageParams = JSON.parse(JSON.stringify(pageParams));
|
||||||
Object.keys(searchForm).forEach((item) => {
|
Object.keys(searchForm).forEach((item) => {
|
||||||
@@ -197,7 +226,7 @@ export default {
|
|||||||
let data = res.data;
|
let data = res.data;
|
||||||
this.tableData = data.records;
|
this.tableData = data.records;
|
||||||
this.pageTotal = data.total;
|
this.pageTotal = data.total;
|
||||||
}else {
|
} else {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
showClose: true,
|
showClose: true,
|
||||||
message: res.message,
|
message: res.message,
|
||||||
@@ -208,7 +237,7 @@ export default {
|
|||||||
chargeAgentSum(pageParams).then((res) => {
|
chargeAgentSum(pageParams).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.total = res.data;
|
this.total = res.data;
|
||||||
}else {
|
} else {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
showClose: true,
|
showClose: true,
|
||||||
message: res.message,
|
message: res.message,
|
||||||
|
|||||||
@@ -10,6 +10,17 @@
|
|||||||
:disabled="tableLoading"
|
:disabled="tableLoading"
|
||||||
>
|
>
|
||||||
<div class="search-line">
|
<div class="search-line">
|
||||||
|
<el-form-item label="分区" prop="partitionId">
|
||||||
|
<el-select v-model="searchForm.partitionId" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in partitionArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="主播ID" prop="erbanNo">
|
<el-form-item label="主播ID" prop="erbanNo">
|
||||||
<el-input
|
<el-input
|
||||||
v-model.trim="searchForm.erbanNo"
|
v-model.trim="searchForm.erbanNo"
|
||||||
@@ -59,6 +70,7 @@
|
|||||||
{{ dateCycleType(scope.row.dateCycle) }}
|
{{ dateCycleType(scope.row.dateCycle) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
|
<el-table-column align="center" prop="partitionDesc" label="分区" />
|
||||||
<el-table-column align="center" prop="erbano" label="主播ID">
|
<el-table-column align="center" prop="erbano" label="主播ID">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="nick" label="主播昵称">
|
<el-table-column align="center" prop="nick" label="主播昵称">
|
||||||
@@ -313,6 +325,7 @@ import {
|
|||||||
getDateCycleList,
|
getDateCycleList,
|
||||||
getAnchorSalaryBill,
|
getAnchorSalaryBill,
|
||||||
anchorSalaryBillDetail,
|
anchorSalaryBillDetail,
|
||||||
|
listPartitionInfo,
|
||||||
} from "@/api/relAgency/relAgency.js";
|
} from "@/api/relAgency/relAgency.js";
|
||||||
import TablePagination from "@/components/common/TablePagination";
|
import TablePagination from "@/components/common/TablePagination";
|
||||||
import { formatDate, formatDateYMD } from "@/utils/relDate";
|
import { formatDate, formatDateYMD } from "@/utils/relDate";
|
||||||
@@ -340,7 +353,9 @@ export default {
|
|||||||
agencyId: null,
|
agencyId: null,
|
||||||
dateCycle: null,
|
dateCycle: null,
|
||||||
erbanNo: null,
|
erbanNo: null,
|
||||||
|
partitionId: null,
|
||||||
},
|
},
|
||||||
|
partitionArr: [],
|
||||||
searchRule: {
|
searchRule: {
|
||||||
startTime: [
|
startTime: [
|
||||||
{
|
{
|
||||||
@@ -384,6 +399,10 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getDateCycleList();
|
this.getDateCycleList();
|
||||||
|
listPartitionInfo().then((res) => {
|
||||||
|
this.partitionArr = res.data;
|
||||||
|
this.searchForm.partitionId = this.partitionArr[0].id;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getDateCycleList() {
|
getDateCycleList() {
|
||||||
@@ -429,19 +448,19 @@ export default {
|
|||||||
this.dialogTitle = "钻石兑换薪资";
|
this.dialogTitle = "钻石兑换薪资";
|
||||||
this.dialogType = 1;
|
this.dialogType = 1;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 3:
|
||||||
this.dialogTitle = "薪资转增代理";
|
this.dialogTitle = "薪资转增代理";
|
||||||
this.dialogType = 2;
|
this.dialogType = 2;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 4:
|
||||||
this.dialogTitle = "薪资转增公会长";
|
this.dialogTitle = "薪资转增公会长";
|
||||||
this.dialogType = 3;
|
this.dialogType = 3;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 5:
|
||||||
this.dialogTitle = "官方提现";
|
this.dialogTitle = "官方提现";
|
||||||
this.dialogType = 4;
|
this.dialogType = 4;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 2:
|
||||||
this.dialogTitle = "薪资兑换金币";
|
this.dialogTitle = "薪资兑换金币";
|
||||||
this.dialogType = 6;
|
this.dialogType = 6;
|
||||||
break;
|
break;
|
||||||
@@ -508,7 +527,7 @@ export default {
|
|||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
handlePageChange(val) {
|
handlePageChange(val) {
|
||||||
this.pageParams.pageSize = val;
|
this.pageParams.pageNo = val;
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
// 弹窗分页导航
|
// 弹窗分页导航
|
||||||
|
|||||||
263
src/views/guildOperationManagement/diamondFlow.vue
Normal file
263
src/views/guildOperationManagement/diamondFlow.vue
Normal file
@@ -0,0 +1,263 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<!-- 查询 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<div class="block">
|
||||||
|
<span class="demonstration">分区</span>
|
||||||
|
<el-select
|
||||||
|
v-model="inquire.partitionId"
|
||||||
|
style="width: 75%"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.partitionArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>公会ID</span>
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.guildId"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>公会长ID</span>
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.guildBoosId"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<!-- 时间选择器 -->
|
||||||
|
<!-- <div class="inquire">
|
||||||
|
<div class="block">
|
||||||
|
<span class="demonstration">日期</span>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="inquire.time"
|
||||||
|
type="datetimerange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</div>
|
||||||
|
</div> -->
|
||||||
|
<div class="inquire">
|
||||||
|
<div class="block">
|
||||||
|
<span class="demonstration">开始时间</span>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="inquire.time[0]"
|
||||||
|
type="date"
|
||||||
|
placeholder="开始时间"
|
||||||
|
format="YYYY-MM-DD 00:00:00"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<div class="block">
|
||||||
|
<span class="demonstration">结束时间</span>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="inquire.time[1]"
|
||||||
|
type="date"
|
||||||
|
placeholder="结束时间"
|
||||||
|
format="YYYY-MM-DD 23:59:59"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 查询按钮 -->
|
||||||
|
<el-button class="primary but" type="primary" @click="getData()"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
inquire.guildId = '';
|
||||||
|
inquire.guildBoosId = '';
|
||||||
|
inquire.time = [];
|
||||||
|
getData();
|
||||||
|
"
|
||||||
|
>重置查询</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="diamondStatisticsExportFun()"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
|
||||||
|
<!-- 表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="100" align="center" label="序号" />
|
||||||
|
<el-table-column prop="partitionDesc" align="center" label="分区" />
|
||||||
|
<el-table-column prop="guildId" align="center" label="公会ID" />
|
||||||
|
<el-table-column prop="guildName" align="center" label="公会昵称" />
|
||||||
|
<el-table-column prop="ownerErbanNo" align="center" label="公会长ID" />
|
||||||
|
<el-table-column prop="memberNum" align="center" label="主播人数" />
|
||||||
|
<el-table-column prop="diamondNum" align="center" label="钻石流水" />
|
||||||
|
</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 {
|
||||||
|
diamondStatistics,
|
||||||
|
diamondStatisticsExport,
|
||||||
|
listPartitionInfo,
|
||||||
|
} from "@/api/relAgency/relAgency";
|
||||||
|
// @ts-ignore
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
// @ts-ignore
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
export default {
|
||||||
|
name: "diamondFlow",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
//查询所需条件对象
|
||||||
|
inquire: {
|
||||||
|
guildId: "",
|
||||||
|
guildBoosId: "",
|
||||||
|
time: [],
|
||||||
|
partitionId: "",
|
||||||
|
partitionArr: [],
|
||||||
|
},
|
||||||
|
// 表格
|
||||||
|
tableData: [],
|
||||||
|
// 新增弹窗
|
||||||
|
addDialog: false,
|
||||||
|
// 分页
|
||||||
|
total: 0, //总页数
|
||||||
|
currentPage: 1, //页码
|
||||||
|
pageSize: 5, //条数
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// this.getData();
|
||||||
|
listPartitionInfo().then((res) => {
|
||||||
|
this.inquire.partitionArr = res.data;
|
||||||
|
this.inquire.partitionId = this.inquire.partitionArr[0].id;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 查询接口
|
||||||
|
getData() {
|
||||||
|
this.loading = true;
|
||||||
|
let time = this.inquire.time;
|
||||||
|
let startTime = null;
|
||||||
|
let endTime = null;
|
||||||
|
if (time.length > 0) {
|
||||||
|
startTime = this.inquire.time[0]
|
||||||
|
? dateFormat(this.inquire.time[0], "yyyy-MM-dd")
|
||||||
|
: null;
|
||||||
|
endTime = this.inquire.time[1]
|
||||||
|
? dateFormat(this.inquire.time[1], "yyyy-MM-dd")
|
||||||
|
: null;
|
||||||
|
}
|
||||||
|
diamondStatistics({
|
||||||
|
guildId: this.inquire.guildId,
|
||||||
|
ownerErbanNo: this.inquire.guildBoosId,
|
||||||
|
partitionId: this.inquire.partitionId,
|
||||||
|
startTime: startTime,
|
||||||
|
endTime: endTime,
|
||||||
|
pageNo: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.total = res.data.total;
|
||||||
|
this.tableData = res.data.records;
|
||||||
|
this.loading = false;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 导出
|
||||||
|
diamondStatisticsExportFun() {
|
||||||
|
let time = this.inquire.time;
|
||||||
|
let startTime = "";
|
||||||
|
let endTime = "";
|
||||||
|
if (time && time.length > 0) {
|
||||||
|
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd");
|
||||||
|
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd");
|
||||||
|
}
|
||||||
|
diamondStatisticsExport({
|
||||||
|
guildId: this.inquire.guildId,
|
||||||
|
ownerErbanNo: this.inquire.guildBoosId,
|
||||||
|
startTime: startTime,
|
||||||
|
endTime: endTime,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 分页导航
|
||||||
|
handleSizeChange() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
handleCurrentChange() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.box {
|
||||||
|
padding-top: 20px;
|
||||||
|
background: #ecf0f5;
|
||||||
|
.inquire {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 20px;
|
||||||
|
margin-bottom: 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.selectBox {
|
||||||
|
display: flex;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.selectBoxImg {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -9,6 +9,23 @@
|
|||||||
class="input"
|
class="input"
|
||||||
></el-input>
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<div class="block">
|
||||||
|
<span class="demonstration">分区</span>
|
||||||
|
<el-select
|
||||||
|
v-model="inquire.partitionId"
|
||||||
|
style="width: 75%"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.partitionArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- <div class="inquire">
|
<!-- <div class="inquire">
|
||||||
<span>推荐人</span>
|
<span>推荐人</span>
|
||||||
<el-input
|
<el-input
|
||||||
@@ -49,6 +66,7 @@
|
|||||||
border
|
border
|
||||||
style="width: 100%; margin-top: 25px"
|
style="width: 100%; margin-top: 25px"
|
||||||
>
|
>
|
||||||
|
<el-table-column prop="id" align="center" label="公会ID" />
|
||||||
<!-- <el-table-column prop="referrer" align="center" label="推荐人" /> -->
|
<!-- <el-table-column prop="referrer" align="center" label="推荐人" /> -->
|
||||||
<el-table-column prop="ownerErbanNo" align="center" label="会长ID" />
|
<el-table-column prop="ownerErbanNo" align="center" label="会长ID" />
|
||||||
<el-table-column prop="ownerNick" align="center" label="会长昵称" />
|
<el-table-column prop="ownerNick" align="center" label="会长昵称" />
|
||||||
@@ -58,6 +76,19 @@
|
|||||||
label="会长分区"
|
label="会长分区"
|
||||||
/>
|
/>
|
||||||
<el-table-column prop="name" align="center" label="公会昵称" />
|
<el-table-column prop="name" align="center" label="公会昵称" />
|
||||||
|
<el-table-column align="center" prop="giftInfo" label="公会头像">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.avatar"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="[scope.row.avatar]"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="giftInfo" label="公会背景图">
|
<el-table-column align="center" prop="giftInfo" label="公会背景图">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-image
|
<el-image
|
||||||
@@ -65,7 +96,7 @@
|
|||||||
:src="scope.row.backgroundUrl"
|
:src="scope.row.backgroundUrl"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.backgroundUrl]"
|
:preview-src-list="[scope.row.backgroundUrl]"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
@@ -83,6 +114,39 @@
|
|||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="adminName" align="center" label="操作人" />
|
||||||
|
<el-table-column
|
||||||
|
prop="guildContact"
|
||||||
|
align="center"
|
||||||
|
label="公会联系方式"
|
||||||
|
/>
|
||||||
|
<el-table-column align="center" prop="idCard" label="公会长身份证件">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.idCard"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="[scope.row.idCard]"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="inviteErbanNo" align="center" label="邀请人ID" />
|
||||||
|
<el-table-column prop="inviteCheck" align="center" label="邀请人证明">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.inviteCheck"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="[scope.row.inviteCheck]"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<!-- <el-table-column align="center" label="收款账户" width="300">
|
<!-- <el-table-column align="center" label="收款账户" width="300">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -204,6 +268,20 @@
|
|||||||
/>
|
/>
|
||||||
<!-- 编辑弹窗 -->
|
<!-- 编辑弹窗 -->
|
||||||
<el-dialog v-model="editDialog" title="编辑" width="28%" center>
|
<el-dialog v-model="editDialog" title="编辑" width="28%" center>
|
||||||
|
<!-- 公会ID -->
|
||||||
|
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||||
|
<span
|
||||||
|
style="display: inline-block; margin-right: 20px"
|
||||||
|
class="col-sm-2 control-label"
|
||||||
|
>公会ID</span
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="ediObj.id"
|
||||||
|
style="width: 75%"
|
||||||
|
class="input"
|
||||||
|
disabled
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
<!-- 会长ID -->
|
<!-- 会长ID -->
|
||||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||||
<span
|
<span
|
||||||
@@ -245,6 +323,22 @@
|
|||||||
class="input"
|
class="input"
|
||||||
></el-input>
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 公会头像 -->
|
||||||
|
<div class="selectBox selectBoxImg">
|
||||||
|
<span class="left" style="margin-right: 20px">公会头像</span>
|
||||||
|
<!-- action="/admin/tencent/cos/upload/file" -->
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess2"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="ediObj.imageUrl2" :src="ediObj.imageUrl2" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
<!-- 公会背景图 -->
|
<!-- 公会背景图 -->
|
||||||
<div class="selectBox selectBoxImg">
|
<div class="selectBox selectBoxImg">
|
||||||
<span class="left" style="margin-right: 20px">公会背景图</span>
|
<span class="left" style="margin-right: 20px">公会背景图</span>
|
||||||
@@ -258,7 +352,9 @@
|
|||||||
:on-error="handleAvatarError"
|
:on-error="handleAvatarError"
|
||||||
>
|
>
|
||||||
<img v-if="ediObj.imageUrl1" :src="ediObj.imageUrl1" class="avatar" />
|
<img v-if="ediObj.imageUrl1" :src="ediObj.imageUrl1" class="avatar" />
|
||||||
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
<el-icon v-else class="avatar-uploader-icon">
|
||||||
|
<Plus />
|
||||||
|
</el-icon>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
<!-- 成员数量上限 -->
|
<!-- 成员数量上限 -->
|
||||||
@@ -382,6 +478,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="nick" align="center" label="用户昵称" />
|
<el-table-column prop="nick" align="center" label="用户昵称" />
|
||||||
<el-table-column prop="createTime" align="center" label="加入时间" />
|
<el-table-column prop="createTime" align="center" label="加入时间" />
|
||||||
|
<el-table-column prop="adminName" align="center" label="操作人" />
|
||||||
<el-table-column align="center" label="操作" width="300">
|
<el-table-column align="center" label="操作" width="300">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -446,6 +543,7 @@ import {
|
|||||||
addMember,
|
addMember,
|
||||||
setManager,
|
setManager,
|
||||||
removeMember,
|
removeMember,
|
||||||
|
listPartitionInfo,
|
||||||
} from "@/api/noblemanNew/noblemanNew";
|
} from "@/api/noblemanNew/noblemanNew";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { dateFormat } from "@/utils/system-helper";
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
@@ -463,6 +561,8 @@ export default {
|
|||||||
userId: "",
|
userId: "",
|
||||||
referrer: "",
|
referrer: "",
|
||||||
time: "",
|
time: "",
|
||||||
|
partitionId: "",
|
||||||
|
partitionArr: [],
|
||||||
},
|
},
|
||||||
//新增所需对象
|
//新增所需对象
|
||||||
resource: {
|
resource: {
|
||||||
@@ -487,6 +587,7 @@ export default {
|
|||||||
guildNumber: "",
|
guildNumber: "",
|
||||||
id: "",
|
id: "",
|
||||||
imageUrl1: "",
|
imageUrl1: "",
|
||||||
|
imageUrl2: "",
|
||||||
},
|
},
|
||||||
// 收款账户弹窗
|
// 收款账户弹窗
|
||||||
payAccountDialog: false,
|
payAccountDialog: false,
|
||||||
@@ -511,7 +612,11 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getData();
|
listPartitionInfo().then((res) => {
|
||||||
|
this.inquire.partitionArr = res.data;
|
||||||
|
this.inquire.partitionId = this.inquire.partitionArr[0].id;
|
||||||
|
this.getData();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 查询接口
|
// 查询接口
|
||||||
@@ -528,6 +633,7 @@ export default {
|
|||||||
erbanNo: this.inquire.userId,
|
erbanNo: this.inquire.userId,
|
||||||
referrer: this.inquire.referrer,
|
referrer: this.inquire.referrer,
|
||||||
familyName: this.inquire.nick,
|
familyName: this.inquire.nick,
|
||||||
|
partitionId: this.inquire.partitionId,
|
||||||
// startDate: startTime,
|
// startDate: startTime,
|
||||||
// endDate: endTime,
|
// endDate: endTime,
|
||||||
pageNum: this.currentPage,
|
pageNum: this.currentPage,
|
||||||
@@ -688,7 +794,20 @@ export default {
|
|||||||
erbanNo: this.resource.id,
|
erbanNo: this.resource.id,
|
||||||
referrer: this.resource.referrer,
|
referrer: this.resource.referrer,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.getData();
|
if (res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "添加成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 编辑按钮
|
// 编辑按钮
|
||||||
@@ -700,6 +819,7 @@ export default {
|
|||||||
this.ediObj.guildNumber = obj.memberNumLimit;
|
this.ediObj.guildNumber = obj.memberNumLimit;
|
||||||
this.ediObj.id = obj.id;
|
this.ediObj.id = obj.id;
|
||||||
this.ediObj.imageUrl1 = obj.backgroundUrl;
|
this.ediObj.imageUrl1 = obj.backgroundUrl;
|
||||||
|
this.ediObj.imageUrl2 = obj.avatar;
|
||||||
this.editDialog = true;
|
this.editDialog = true;
|
||||||
},
|
},
|
||||||
// 二次确认弹窗
|
// 二次确认弹窗
|
||||||
@@ -709,6 +829,7 @@ export default {
|
|||||||
id: this.ediObj.id,
|
id: this.ediObj.id,
|
||||||
memberNumLimit: this.ediObj.guildNumber,
|
memberNumLimit: this.ediObj.guildNumber,
|
||||||
backgroundUrl: this.ediObj.imageUrl1,
|
backgroundUrl: this.ediObj.imageUrl1,
|
||||||
|
avatar: this.ediObj.imageUrl2,
|
||||||
name: this.ediObj.guildNick,
|
name: this.ediObj.guildNick,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
@@ -732,7 +853,7 @@ export default {
|
|||||||
// 解散按钮
|
// 解散按钮
|
||||||
delClick() {
|
delClick() {
|
||||||
console.log(this.delDialogData.id);
|
console.log(this.delDialogData.id);
|
||||||
var guildId = this.delDialogData.id ;
|
var guildId = this.delDialogData.id;
|
||||||
dismiss({ guildId }).then((res) => {
|
dismiss({ guildId }).then((res) => {
|
||||||
console.log();
|
console.log();
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
@@ -768,7 +889,6 @@ export default {
|
|||||||
},
|
},
|
||||||
handleAvatarSuccess(res, file) {
|
handleAvatarSuccess(res, file) {
|
||||||
console.log(file);
|
console.log(file);
|
||||||
// this.ediObj.imageUrl1 = URL.createObjectURL();
|
|
||||||
this.ediObj.imageUrl1 = file.response.data;
|
this.ediObj.imageUrl1 = file.response.data;
|
||||||
ElMessage({
|
ElMessage({
|
||||||
showClose: true,
|
showClose: true,
|
||||||
@@ -776,6 +896,15 @@ export default {
|
|||||||
type: "success",
|
type: "success",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleAvatarSuccess2(res, file) {
|
||||||
|
console.log(file);
|
||||||
|
this.ediObj.imageUrl2 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
// 分页导航
|
// 分页导航
|
||||||
handleSizeChange() {
|
handleSizeChange() {
|
||||||
this.getData();
|
this.getData();
|
||||||
|
|||||||
@@ -20,16 +20,47 @@
|
|||||||
:disabled="tableLoading"
|
:disabled="tableLoading"
|
||||||
>
|
>
|
||||||
<div class="search-line">
|
<div class="search-line">
|
||||||
<el-form-item label="公会长ID" prop="agencyOwnerErbanNo">
|
<el-form-item label="分区" prop="partitionId">
|
||||||
|
<el-select v-model="searchForm.partitionId" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in partitionArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="MoliStar ID" prop="agencyOwnerErbanNo">
|
||||||
<el-input
|
<el-input
|
||||||
v-model.trim="searchForm.agencyOwnerErbanNo"
|
v-model.trim="searchForm.agencyOwnerErbanNo"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="提现状态" prop="status">
|
||||||
<el-select v-model="searchForm.status">
|
<el-select v-model="searchForm.status">
|
||||||
<el-option label="已结算" value="1"></el-option>
|
<el-option label="审核中" value="0"></el-option>
|
||||||
<el-option label="未结算" value="0"></el-option>
|
<el-option label="审核通过" value="1"></el-option>
|
||||||
|
<el-option label="未通过" value="2"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="提现账户" prop="accountType">
|
||||||
|
<el-select v-model="searchForm.accountType">
|
||||||
|
<el-option label="Vodafone" value="VODAFONE"></el-option>
|
||||||
|
<el-option label="Payonner" value="PAYONNER"></el-option>
|
||||||
|
<el-option label="USD" value="USDT"></el-option>
|
||||||
|
<el-option label="Bank" value="BANK"></el-option>
|
||||||
|
<el-option label="Other" value="OTHER"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="国家" prop="country">
|
||||||
|
<el-select v-model="searchForm.country">
|
||||||
|
<el-option
|
||||||
|
v-for="(item, index) in adminCountryArr"
|
||||||
|
:key="index"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="时间" class="large">
|
<el-form-item label="时间" class="large">
|
||||||
@@ -52,17 +83,32 @@
|
|||||||
|
|
||||||
<el-form-item label-width="40px">
|
<el-form-item label-width="40px">
|
||||||
<el-button type="primary" @click="handSearch">搜索</el-button>
|
<el-button type="primary" @click="handSearch">搜索</el-button>
|
||||||
<el-button plain @click="resetSearchForm">重置搜索</el-button>
|
<el-button type="primary" plain @click="resetSearchForm"
|
||||||
|
>重置搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
class="exportBtn"
|
||||||
|
@click="confirmExport2Excel"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
<el-button @click="handleChangeAll()" type="info" plain
|
||||||
|
>批量发放</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
centerDialogVisible = true;
|
||||||
|
centerDialogVisibleType = 1;
|
||||||
|
"
|
||||||
|
type="info"
|
||||||
|
plain
|
||||||
|
>批量驳回</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-button type="primary" class="exportBtn" @click="confirmExport2Excel"
|
|
||||||
>导出</el-button
|
|
||||||
>
|
|
||||||
<el-button @click="handleChangeAll()" type="info" plain
|
|
||||||
>批量操作</el-button
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 表格 -->
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
@@ -70,74 +116,94 @@
|
|||||||
v-loading="tableLoading"
|
v-loading="tableLoading"
|
||||||
@header-click="headerCopy"
|
@header-click="headerCopy"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
style="width: 100%"
|
style="width: 100%; overflow-x: auto"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55"> </el-table-column>
|
<el-table-column type="selection"> </el-table-column>
|
||||||
<!-- <el-table-column align="center" prop="region" label="区服">
|
<el-table-column align="center" prop="erbanNo" label="MoliStar ID" />
|
||||||
<template v-slot="scope">
|
<el-table-column align="center" prop="partitionDesc" label="分区" />
|
||||||
{{ regionType(scope.row.region) }}
|
<el-table-column align="center" prop="nick" label="昵称" />
|
||||||
</template>
|
<el-table-column align="center" prop="accountCountry" label="国家" />
|
||||||
</el-table-column>-->
|
|
||||||
<el-table-column align="center" prop="agencyId" label="公会ID">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" prop="erbanNo" label="公会长ID">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" prop="nick" label="公会长昵称">
|
|
||||||
</el-table-column>
|
|
||||||
<!-- <el-table-column align="center" prop="region" label="区域">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" prop="abbr" label="国家">
|
|
||||||
</el-table-column> -->
|
|
||||||
<el-table-column align="center" prop="guildUsdNum" label="提现薪资">
|
|
||||||
<template v-slot="scope">
|
|
||||||
{{ scope.row.guildUsdNum }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
prop="createTime"
|
prop="blocked"
|
||||||
label="创建时间"
|
label="用户当前账户状态"
|
||||||
width="160"
|
|
||||||
>
|
>
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
{{ convertTimestamp(scope.row.createTime) }}
|
{{ scope.row.blocked ? "封禁" : "正常" }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="status" label="状态">
|
<el-table-column align="center" prop="status" label="申请状态">
|
||||||
<template v-slot="scope">
|
|
||||||
{{ scope.row.status == 0 ? "未结算" : "已结算" }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" prop="hallSalary" label="操作">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<el-button
|
|
||||||
v-if="scope.row.status == 0"
|
|
||||||
@click="handleChange(scope.row)"
|
|
||||||
type="text"
|
|
||||||
size="mini"
|
|
||||||
>
|
|
||||||
结算
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
align="center"
|
|
||||||
prop="updateTime"
|
|
||||||
label="操作时间"
|
|
||||||
width="160"
|
|
||||||
>
|
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
{{
|
{{
|
||||||
scope.row.updateTime
|
scope.row.status == 0
|
||||||
? convertTimestamp(scope.row.updateTime)
|
? "审核中"
|
||||||
: ""
|
: scope.row.status == 1
|
||||||
|
? "通过"
|
||||||
|
: "未通过"
|
||||||
}}
|
}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="operator" label="操作人">
|
<el-table-column align="center" prop="createTime" label="申请时间" />
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="accountType"
|
||||||
|
label="提现类型 "
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="guildUsdNum"
|
||||||
|
label="提现薪资US"
|
||||||
|
/>
|
||||||
|
<el-table-column align="center" prop="currency" label="发放币种" />
|
||||||
|
<el-table-column align="center" prop="currencyNum" label="发放金额" />
|
||||||
|
<el-table-column align="center" prop="withdrawRate" label="手续费" />
|
||||||
|
<el-table-column align="center" prop="withdrawNum" label="核销薪资" />
|
||||||
|
<el-table-column align="center" prop="remark" label="驳回理由">
|
||||||
|
<template v-slot="scope">
|
||||||
|
{{ scope.row.remark ? scope.row.remark : "/" }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="hallSalary"
|
||||||
|
label="操作"
|
||||||
|
width="150"
|
||||||
|
>
|
||||||
|
<template v-slot="scope">
|
||||||
|
<div v-if="scope.row.status == 0">
|
||||||
|
<el-button
|
||||||
|
@click="handleChange(scope.row)"
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
>
|
||||||
|
发放
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
centerDialogVisible = true;
|
||||||
|
centerDialogVisibleType = 2;
|
||||||
|
centerDialogVisibleID = scope.row.id;
|
||||||
|
"
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
>
|
||||||
|
驳回
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-button
|
||||||
|
@click="accountInfosFun(scope.row)"
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
>
|
||||||
|
查看详情
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 分页 -->
|
||||||
<table-pagination
|
<table-pagination
|
||||||
:pageParams="pageParams"
|
:pageParams="pageParams"
|
||||||
:pageTotal="pageTotal"
|
:pageTotal="pageTotal"
|
||||||
@@ -145,6 +211,46 @@
|
|||||||
@handleSizeChange="handleSizeChange"
|
@handleSizeChange="handleSizeChange"
|
||||||
@handlePageChange="handlePageChange"
|
@handlePageChange="handlePageChange"
|
||||||
></table-pagination>
|
></table-pagination>
|
||||||
|
<!-- 驳回弹窗 -->
|
||||||
|
<el-dialog v-model="centerDialogVisible" title="提示" width="30%" center>
|
||||||
|
<span> 请选择驳回理由:</span>
|
||||||
|
<div class="boxs">
|
||||||
|
<el-radio class="radios" v-model="radio" label="用户消息提供不足"
|
||||||
|
>用户消息提供不足</el-radio
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="centerDialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="dialogClick()"> 确认 </el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 提现详情弹窗 -->
|
||||||
|
<el-dialog v-model="centerDialogVisible2" title="提现详情">
|
||||||
|
<div class="boxs2">
|
||||||
|
<div>申请提现时间:{{ accountDetails.createTime }}</div>
|
||||||
|
<div>申请ID:{{ accountDetails.erbanNo }}</div>
|
||||||
|
<div>country:{{ accountDetails.country }}</div>
|
||||||
|
<div>payeeAccount:{{ accountDetails.bank_account }}</div>
|
||||||
|
<div>Bank Name:{{ accountDetails.bank_name }}</div>
|
||||||
|
<div>SWIFT Code:{{ accountDetails.swift_code }}</div>
|
||||||
|
<div>payeeName::{{ accountDetails.full_name }}</div>
|
||||||
|
<div>address:{{ accountDetails.address }}</div>
|
||||||
|
<div>提现薪资US:{{ accountDetails.guildUsdNum }}</div>
|
||||||
|
<div>
|
||||||
|
发放金额:{{ accountDetails.currency }}
|
||||||
|
{{ accountDetails.currencyNum }}
|
||||||
|
</div>
|
||||||
|
<div>提现手续费:{{ accountDetails.withdrawRate }}</div>
|
||||||
|
<div>核销薪资:{{ accountDetails.withdrawNum }}</div>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="centerDialogVisible2 = false">确认</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -155,11 +261,15 @@ import {
|
|||||||
agencyWithdrawExamineExport,
|
agencyWithdrawExamineExport,
|
||||||
agencyWithdrawSet,
|
agencyWithdrawSet,
|
||||||
agencyWithdrawBatchSet,
|
agencyWithdrawBatchSet,
|
||||||
|
batchReject,
|
||||||
|
adminCountry,
|
||||||
|
listPartitionInfo,
|
||||||
} from "@/api/relAgency/relAgency.js";
|
} from "@/api/relAgency/relAgency.js";
|
||||||
import TablePagination from "@/components/common/TablePagination";
|
import TablePagination from "@/components/common/TablePagination";
|
||||||
import { formatDate, formatDateYMD } from "@/utils/relDate";
|
import { formatDate, formatDateYMD } from "@/utils/relDate";
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { ElMessageBox } from 'element-plus'; // 正确引入 ElM
|
import { ElMessageBox } from "element-plus"; // 正确引入 ElM
|
||||||
// 混入
|
// 混入
|
||||||
// import Mixin from '../../mixin/mixRegion.js';
|
// import Mixin from '../../mixin/mixRegion.js';
|
||||||
|
|
||||||
@@ -173,19 +283,29 @@ export default {
|
|||||||
btnLoading: false, // 导出弹出框(dialog)的确认按钮
|
btnLoading: false, // 导出弹出框(dialog)的确认按钮
|
||||||
tableLoading: false, // 表格是否加载中
|
tableLoading: false, // 表格是否加载中
|
||||||
|
|
||||||
tableData: [], // 接口返回的表格数据
|
tableData: [], // 接口 返回的表格数据
|
||||||
pageTotal: 0, // 接口返回的表格总条数
|
pageTotal: 0, // 接口返回的表格总条数
|
||||||
pageParams: {
|
pageParams: {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
},
|
},
|
||||||
|
centerDialogVisible: false, //驳回弹窗
|
||||||
|
centerDialogVisibleType: null, //驳回弹窗
|
||||||
|
centerDialogVisibleID: null, //驳回弹窗
|
||||||
|
centerDialogVisible2: false, //操作弹窗
|
||||||
|
radio: "用户消息提供不足", //驳回原因
|
||||||
// 搜索表单相关
|
// 搜索表单相关
|
||||||
searchForm: {
|
searchForm: {
|
||||||
agencyOwnerErbanNo: null,
|
agencyOwnerErbanNo: null,
|
||||||
status: null,
|
status: null,
|
||||||
startTime: null,
|
startTime: null,
|
||||||
endTime: null,
|
endTime: null,
|
||||||
|
adminCountry: null,
|
||||||
|
country: null,
|
||||||
|
partitionId: null,
|
||||||
},
|
},
|
||||||
|
partitionArr: [],
|
||||||
|
adminCountryArr: [],
|
||||||
searchRule: {
|
searchRule: {
|
||||||
startTime: [
|
startTime: [
|
||||||
{
|
{
|
||||||
@@ -215,16 +335,45 @@ export default {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
idStr: [], //批量删除ID
|
idStr: [], //批量删除ID
|
||||||
|
// 查看薪资弹窗数据存储
|
||||||
|
accountDetails: {
|
||||||
|
createTime: null,
|
||||||
|
erbanNo: null,
|
||||||
|
country: null,
|
||||||
|
bank_account: null,
|
||||||
|
bank_name: null,
|
||||||
|
swift_code: null,
|
||||||
|
full_name: null,
|
||||||
|
address: null,
|
||||||
|
guildUsdNum: null,
|
||||||
|
currency: null,
|
||||||
|
currencyNum: null,
|
||||||
|
withdrawRate: null,
|
||||||
|
withdrawNum: null,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// this.getData();
|
adminCountry().then((res) => {
|
||||||
|
this.adminCountryArr = res.data;
|
||||||
|
});
|
||||||
|
listPartitionInfo().then((res) => {
|
||||||
|
this.partitionArr = res.data;
|
||||||
|
this.searchForm.partitionId = this.partitionArr[0].id;
|
||||||
|
this.getData();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getData() {
|
getData() {
|
||||||
this.tableLoading = true;
|
this.tableLoading = true;
|
||||||
|
|
||||||
let { pageParams, searchForm } = this;
|
let { pageParams, searchForm } = this;
|
||||||
|
searchForm.startTime = searchForm.startTime
|
||||||
|
? dateFormat(searchForm.startTime, "yyyy-MM-dd hh:mm:ss")
|
||||||
|
: "";
|
||||||
|
searchForm.endTime = searchForm.endTime
|
||||||
|
? dateFormat(searchForm.endTime, "yyyy-MM-dd hh:mm:ss")
|
||||||
|
: "";
|
||||||
searchForm = JSON.parse(JSON.stringify(searchForm));
|
searchForm = JSON.parse(JSON.stringify(searchForm));
|
||||||
pageParams = JSON.parse(JSON.stringify(pageParams));
|
pageParams = JSON.parse(JSON.stringify(pageParams));
|
||||||
Object.keys(searchForm).forEach((item) => {
|
Object.keys(searchForm).forEach((item) => {
|
||||||
@@ -236,7 +385,8 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
Object.assign(pageParams, searchForm);
|
Object.assign(pageParams, searchForm);
|
||||||
|
console.log(pageParams);
|
||||||
|
console.log(searchForm);
|
||||||
agencyWithdrawList(pageParams).then((res) => {
|
agencyWithdrawList(pageParams).then((res) => {
|
||||||
this.tableLoading = false;
|
this.tableLoading = false;
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
@@ -281,6 +431,61 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 查看详情处理函数
|
||||||
|
accountInfosFun(res) {
|
||||||
|
var obj = JSON.parse(res.accountInfos);
|
||||||
|
console.log(obj);
|
||||||
|
this.accountDetails.createTime = res.createTime ? res.createTime : "-";
|
||||||
|
this.accountDetails.erbanNo = res.erbanNo ? res.erbanNo : "-";
|
||||||
|
this.accountDetails.country = obj.country ? obj.country : "-";
|
||||||
|
this.accountDetails.bank_account = obj.bank_account
|
||||||
|
? obj.bank_account
|
||||||
|
: "-";
|
||||||
|
this.accountDetails.bank_name = obj.bank_name ? obj.bank_name : "-";
|
||||||
|
this.accountDetails.swift_code = obj.swift_code ? obj.swift_code : "-";
|
||||||
|
this.accountDetails.full_name = obj.full_name ? obj.full_name : "-";
|
||||||
|
this.accountDetails.address = obj.address ? obj.address : "-";
|
||||||
|
this.accountDetails.guildUsdNum = res.guildUsdNum ? res.guildUsdNum : "-";
|
||||||
|
this.accountDetails.currency = res.currency ? res.currency : "-";
|
||||||
|
this.accountDetails.currencyNum = res.currencyNum ? res.currencyNum : "-";
|
||||||
|
this.accountDetails.withdrawRate = res.withdrawRate
|
||||||
|
? res.withdrawRate
|
||||||
|
: "-";
|
||||||
|
this.accountDetails.withdrawNum = res.withdrawNum ? res.withdrawNum : "-";
|
||||||
|
this.centerDialogVisible2 = true;
|
||||||
|
},
|
||||||
|
// 批量驳回
|
||||||
|
dialogClick() {
|
||||||
|
batchReject({
|
||||||
|
ids:
|
||||||
|
this.centerDialogVisibleType == 1
|
||||||
|
? this.idStr
|
||||||
|
: this.centerDialogVisibleID,
|
||||||
|
remark: this.radio,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
type: "success",
|
||||||
|
message: "操作成功!",
|
||||||
|
});
|
||||||
|
this.getData();
|
||||||
|
this.centerDialogVisible = false;
|
||||||
|
this.idStr = null;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
type: "error",
|
||||||
|
message: res.message,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
ElMessage({
|
||||||
|
type: "warning ",
|
||||||
|
message: "已取消",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
handleChange(row) {
|
handleChange(row) {
|
||||||
ElMessageBox.confirm("确定要结算吗", "提示", {
|
ElMessageBox.confirm("确定要结算吗", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
@@ -288,7 +493,7 @@ export default {
|
|||||||
type: "warning",
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
agencyWithdrawSet({ id: row.id }).then((res) => {
|
agencyWithdrawSet({ ids: row.id }).then((res) => {
|
||||||
if (res.success === true) {
|
if (res.success === true) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: "success",
|
type: "success",
|
||||||
@@ -402,13 +607,34 @@ export default {
|
|||||||
|
|
||||||
<style scope>
|
<style scope>
|
||||||
.exportBtn {
|
.exportBtn {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
.text {
|
||||||
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.search-line {
|
.search-line {
|
||||||
width: 38%;
|
width: 38%;
|
||||||
}
|
}
|
||||||
|
.boxs {
|
||||||
|
margin-top: 10px;
|
||||||
|
width: 100%;
|
||||||
|
word-wrap: break-word; /* 允许在单词内换行 */
|
||||||
|
overflow-wrap: break-word; /* 同上,现代浏览器推荐使用 */
|
||||||
|
white-space: normal; /* 允许换行 */
|
||||||
|
}
|
||||||
|
.radios {
|
||||||
|
display: block !important;
|
||||||
|
width: 100% !important;
|
||||||
|
word-wrap: break-word !important; /* 允许在单词内换行 */
|
||||||
|
overflow-wrap: break-word !important; /* 同上,现代浏览器推荐使用 */
|
||||||
|
white-space: normal !important; /* 允许换行 */
|
||||||
|
height: auto !important;
|
||||||
|
}
|
||||||
|
.boxs2 div {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -73,6 +73,7 @@
|
|||||||
<input type="checkbox" name="partitionFlag" value="1"/>英语区<br>
|
<input type="checkbox" name="partitionFlag" value="1"/>英语区<br>
|
||||||
<input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br>
|
<input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br>
|
||||||
<input type="checkbox" name="partitionFlag" value="4"/>华语区<br>
|
<input type="checkbox" name="partitionFlag" value="4"/>华语区<br>
|
||||||
|
<input type="checkbox" name="partitionFlag" value="8"/>土耳其区<br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -93,6 +94,12 @@
|
|||||||
<input type="text" class="form-control" name="headwearName" id="headwearEnName">
|
<input type="text" class="form-control" name="headwearName" id="headwearEnName">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="headwearTrName" class="col-sm-3 control-label">土耳其头饰名称:</label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="text" class="form-control" name="headwearName" id="headwearTrName">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">使用萝卜购买</label>
|
<label class="col-sm-3 control-label">使用萝卜购买</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
@@ -385,6 +392,7 @@ export default {
|
|||||||
{field: 'name.zh', title: '头饰名称', align: 'center', width: '5%'},
|
{field: 'name.zh', title: '头饰名称', align: 'center', width: '5%'},
|
||||||
{field: 'name.ar', title: '阿语头饰名称', align: 'center', width: '5%'},
|
{field: 'name.ar', title: '阿语头饰名称', align: 'center', width: '5%'},
|
||||||
{field: 'name.en', title: '英语头饰名称', align: 'center', width: '5%'},
|
{field: 'name.en', title: '英语头饰名称', align: 'center', width: '5%'},
|
||||||
|
{field: 'name.tr', title: '土耳其头饰名称', align: 'center', width: '5%'},
|
||||||
{
|
{
|
||||||
field: 'partitionFlag',
|
field: 'partitionFlag',
|
||||||
title: '地区',
|
title: '地区',
|
||||||
@@ -401,6 +409,9 @@ export default {
|
|||||||
if ((val & 4) != 0) {
|
if ((val & 4) != 0) {
|
||||||
value += '华语区<br>';
|
value += '华语区<br>';
|
||||||
}
|
}
|
||||||
|
if ((val & 8) != 0) {
|
||||||
|
value += '土耳其<br>';
|
||||||
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -643,6 +654,7 @@ export default {
|
|||||||
$("#headwearName").val("");
|
$("#headwearName").val("");
|
||||||
$("#headwearArName").val("");
|
$("#headwearArName").val("");
|
||||||
$("#headwearEnName").val("");
|
$("#headwearEnName").val("");
|
||||||
|
$("#headwearTrName").val("");
|
||||||
$("#price").val("");
|
$("#price").val("");
|
||||||
$("#renewPrice").val("");
|
$("#renewPrice").val("");
|
||||||
$("#originalPrice").val("");
|
$("#originalPrice").val("");
|
||||||
@@ -688,8 +700,9 @@ export default {
|
|||||||
var headwearName = $("#headwearName").val();
|
var headwearName = $("#headwearName").val();
|
||||||
var headwearArName = $("#headwearArName").val();
|
var headwearArName = $("#headwearArName").val();
|
||||||
var headwearEnName = $("#headwearEnName").val();
|
var headwearEnName = $("#headwearEnName").val();
|
||||||
|
var headwearTrName = $("#headwearTrName").val();
|
||||||
// 国际化字段
|
// 国际化字段
|
||||||
var jsonName = {"zh":headwearName,"ar":headwearArName,"en":headwearEnName}
|
var jsonName = {"zh":headwearName,"ar":headwearArName,"en":headwearEnName,"tr":headwearTrName}
|
||||||
const nameValue = JSON.stringify(jsonName);
|
const nameValue = JSON.stringify(jsonName);
|
||||||
var price = $("#price").val();
|
var price = $("#price").val();
|
||||||
var renewPrice = $("#renewPrice").val();
|
var renewPrice = $("#renewPrice").val();
|
||||||
@@ -825,10 +838,12 @@ export default {
|
|||||||
$("#headwearName").val(jsonName.zh);
|
$("#headwearName").val(jsonName.zh);
|
||||||
$("#headwearArName").val(jsonName.ar);
|
$("#headwearArName").val(jsonName.ar);
|
||||||
$("#headwearEnName").val(jsonName.en);
|
$("#headwearEnName").val(jsonName.en);
|
||||||
|
$("#headwearTrName").val(jsonName.tr);
|
||||||
} else {
|
} else {
|
||||||
$("#headwearName").val(name);
|
$("#headwearName").val(name);
|
||||||
$("#headwearArName").val(name);
|
$("#headwearArName").val(name);
|
||||||
$("#headwearEnName").val(name);
|
$("#headwearEnName").val(name);
|
||||||
|
$("#headwearTrName").val(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#price").val(json.price);
|
$("#price").val(json.price);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -72,7 +72,7 @@ export default {
|
|||||||
name: "LoginView",
|
name: "LoginView",
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
smsSwitch: true,
|
smsSwitch: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
setup () {
|
setup () {
|
||||||
|
|||||||
232
src/views/luckGift/arrange.vue
Normal file
232
src/views/luckGift/arrange.vue
Normal file
@@ -0,0 +1,232 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<div class="condition">
|
||||||
|
<!-- 分区 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>奖池</span>
|
||||||
|
<el-select
|
||||||
|
v-model="inquire.value"
|
||||||
|
placeholder="请选择"
|
||||||
|
@change="handleChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.options"
|
||||||
|
:key="item.type"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.type"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 总分组 -->
|
||||||
|
<div class="allArr">
|
||||||
|
目前数组 <span>{{ allArr.length }} </span> 组:
|
||||||
|
<span class="span" v-for="(item, index) in allArr" :key="index">
|
||||||
|
{{ item.expect }},
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 数组设置 -->
|
||||||
|
<div class="arrSet">数组设置:</div>
|
||||||
|
|
||||||
|
<!-- 数组内容 -->
|
||||||
|
<div class="boxs">
|
||||||
|
<div class="arrContent" v-for="(item, index) in arr" :key="index">
|
||||||
|
<div class="arrBox">
|
||||||
|
<div class="left">
|
||||||
|
<div class="left_in1">
|
||||||
|
期望: <b class="b1">{{ item.expect }}</b> ,
|
||||||
|
</div>
|
||||||
|
<div class="left_in2">
|
||||||
|
得到率: <b class="b2">{{ (item.winRate * 100).toFixed(2) }}%</b> ,
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="right" v-for="(arrInItem, i) in item.itemList" :key="i">
|
||||||
|
<span>{{ arrInItem.multi }}</span>
|
||||||
|
<el-input
|
||||||
|
@input="handleInput(index, i, $event)"
|
||||||
|
v-model="arrInItem.num"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 按钮 -->
|
||||||
|
<div class="but">
|
||||||
|
<el-button class="primary" type="primary" @click="saveFun()"
|
||||||
|
>保存
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { listType, list, save } from "@/api/luckGift/luckGift";
|
||||||
|
// @ts-ignore
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
// @ts-ignore
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import moment from "moment-timezone";
|
||||||
|
export default {
|
||||||
|
name: "luckGiftArrange",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
//查询所需条件对象
|
||||||
|
inquire: {
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
},
|
||||||
|
allArr: [], //总数组
|
||||||
|
arr: [], //处理下面总数组
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
listType().then((res) => {
|
||||||
|
this.inquire.options = res.data;
|
||||||
|
this.inquire.value = res.data[0].type;
|
||||||
|
this.getData();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 查询接口
|
||||||
|
getData() {
|
||||||
|
list({ type: this.inquire.value }).then((res) => {
|
||||||
|
this.allArr = res.data;
|
||||||
|
this.arr = res.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleInput(index, i, val) {
|
||||||
|
// 期望值 expectedvalue = 倍数 * 5 * num / 2500
|
||||||
|
// 中奖率 winRate =不为θ的倍数的num / 500
|
||||||
|
this.arr[index].expect = this.calculationFun(index, i, val).expect;
|
||||||
|
this.arr[index].winRate = this.calculationFun(index, i, val).winRate;
|
||||||
|
},
|
||||||
|
// 计算函数
|
||||||
|
calculationFun(index, i, val) {
|
||||||
|
var expectNum = 0;
|
||||||
|
var winRate = 0;
|
||||||
|
this.arr[index].itemList.forEach((res) => {
|
||||||
|
expectNum += res.multi * res.num;
|
||||||
|
winRate += Number(res.num);
|
||||||
|
});
|
||||||
|
console.log(winRate);
|
||||||
|
return {
|
||||||
|
expect: (expectNum / 500).toFixed(2),
|
||||||
|
winRate: (winRate / 500).toFixed(4),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
// 保存
|
||||||
|
saveFun() {
|
||||||
|
//
|
||||||
|
save(
|
||||||
|
JSON.stringify({ poolList: this.arr, type: this.inquire.value })
|
||||||
|
).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "保存成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 监听类型
|
||||||
|
handleChange(value) {
|
||||||
|
this.inquire.value = value;
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.box {
|
||||||
|
padding-top: 20px;
|
||||||
|
background: #ecf0f5;
|
||||||
|
font-size: 18px;
|
||||||
|
.condition {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
.inquire {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 20px;
|
||||||
|
span {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.input {
|
||||||
|
width: 180px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.but {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.allArr {
|
||||||
|
margin: 20px 0 10px 0;
|
||||||
|
span {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
.span {
|
||||||
|
margin: 0 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.arrSet {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
.boxs {
|
||||||
|
display: flex;
|
||||||
|
// justify-content: space-between;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
.arrContent {
|
||||||
|
// margin-bottom: 20px;
|
||||||
|
width: 190px;
|
||||||
|
height: 395px;
|
||||||
|
line-height: 30px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
.arrBox {
|
||||||
|
.left {
|
||||||
|
// float: left;
|
||||||
|
div {
|
||||||
|
min-width: 100px;
|
||||||
|
display: block;
|
||||||
|
// margin-bottom: -25px;
|
||||||
|
.b1 {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
.b2 {
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.left_in2 {
|
||||||
|
margin-bottom: 10px
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.right {
|
||||||
|
float: left;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
span {
|
||||||
|
display: inline-block;
|
||||||
|
width: 45px;
|
||||||
|
}
|
||||||
|
.input {
|
||||||
|
display: inline-block;
|
||||||
|
width: 100px;
|
||||||
|
margin-right: 10px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
281
src/views/luckGift/luckGiftData.vue
Normal file
281
src/views/luckGift/luckGiftData.vue
Normal file
@@ -0,0 +1,281 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<!-- ID -->
|
||||||
|
<div class="condition">
|
||||||
|
<!-- 分区 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>分区</span>
|
||||||
|
<el-select
|
||||||
|
v-model="inquire.value"
|
||||||
|
placeholder="请选择"
|
||||||
|
@change="handleChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.options"
|
||||||
|
:key="item.type"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.type"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>MoliStar ID</span>
|
||||||
|
<el-input v-model="inquire.userId" placeholder="" class="input">
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<!-- 送出时间 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>送出时间</span>
|
||||||
|
<el-date-picker v-model="inquire.time" type="date" placeholder="请选择">
|
||||||
|
</el-date-picker>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-button type="text">总进入:{{ totalInput }}</el-button>
|
||||||
|
<el-button type="text">总退出:{{ totalOutput }}</el-button>
|
||||||
|
<el-button type="text"
|
||||||
|
>总比例:{{ totalProductionRatio }}</el-button
|
||||||
|
>
|
||||||
|
<!-- 按钮 -->
|
||||||
|
<div class="but">
|
||||||
|
<el-button class="primary" type="primary" @click="getData()"
|
||||||
|
>查询
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
inquire.userId = '';
|
||||||
|
inquire.time = '';
|
||||||
|
"
|
||||||
|
>重置筛选
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
style="margin-left=20px;"
|
||||||
|
:disabled="butClick"
|
||||||
|
@click="
|
||||||
|
editDialog = true;
|
||||||
|
type = 12;
|
||||||
|
editDialogTitle = '赠送1000倍奖励';
|
||||||
|
value = inquire.x;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
赠送</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="date" align="center" label="日期" />
|
||||||
|
<el-table-column prop="uid" align="center" label="uid" />
|
||||||
|
<el-table-column prop="erbanNo" align="center" label="平台id" />
|
||||||
|
<el-table-column prop="totalInput" align="center" label="进入" />
|
||||||
|
<el-table-column prop="totalOutput" align="center" label="退出" />
|
||||||
|
<el-table-column prop="production" align="center" label="剩余" />
|
||||||
|
<el-table-column
|
||||||
|
prop="productionRatio"
|
||||||
|
align="center"
|
||||||
|
label="退出/进入"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="avgInput" align="center" label="每次进入" />
|
||||||
|
<el-table-column prop="num" align="center" label="总次数" />
|
||||||
|
<el-table-column prop="winNum" align="center" label="得到次数" />
|
||||||
|
<el-table-column prop="winRate" align="center" label="得到率" />
|
||||||
|
</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="editDialog" :title="editDialogTitle" width="36%" center>
|
||||||
|
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||||
|
<span
|
||||||
|
style="display: inline-block; margin-right: 20px"
|
||||||
|
class="col-sm-2 control-label"
|
||||||
|
>{{ editDialogTitle }}</span
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="value"
|
||||||
|
style="width: 75%"
|
||||||
|
class="input"
|
||||||
|
placeholder="请输入用户ID"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
editDialog = false;
|
||||||
|
butClick = false;
|
||||||
|
"
|
||||||
|
>取消</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
:disabled="butClick"
|
||||||
|
@click="editDialogClick()"
|
||||||
|
>
|
||||||
|
保存
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { personal, updateUserMulti } from "@/api/luckGift/luckGift";
|
||||||
|
// @ts-ignore
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
// @ts-ignore
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import moment from "moment-timezone";
|
||||||
|
export default {
|
||||||
|
name: "luckGiftData",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
totalInput: 0,
|
||||||
|
totalOutput: 0,
|
||||||
|
totalProductionRatio: 0,
|
||||||
|
//查询所需条件对象
|
||||||
|
inquire: {
|
||||||
|
userId: "",
|
||||||
|
time: "",
|
||||||
|
value: 2,
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: "阿拉伯区",
|
||||||
|
type: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "英语区",
|
||||||
|
type: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "华语区",
|
||||||
|
type: 4,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 8,
|
||||||
|
name: "土耳其区",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// 表格
|
||||||
|
tableData: [],
|
||||||
|
// 分页
|
||||||
|
total: 10, //总页数
|
||||||
|
currentPage: 1, //页码
|
||||||
|
pageSize: 10, //条数
|
||||||
|
editDialog: false,
|
||||||
|
editDialogTitle: "",
|
||||||
|
value: "",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// this.getData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 查询接口
|
||||||
|
getData() {
|
||||||
|
console.log(dateFormat(this.inquire.time, "yyyy-MM-dd"));
|
||||||
|
if (!this.inquire.time && this.inquire.userId == '') {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "时间和ID至少填一项",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.loading = true;
|
||||||
|
personal({
|
||||||
|
erbanNo: this.inquire.userId,
|
||||||
|
pageNo: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
date: this.inquire.time
|
||||||
|
? dateFormat(this.inquire.time, "yyyy-MM-dd")
|
||||||
|
: null,
|
||||||
|
partitionId: this.inquire.value,
|
||||||
|
}).then((res) => {
|
||||||
|
this.total = res.data.dataPage.total;
|
||||||
|
this.tableData = res.data.dataPage.rows;
|
||||||
|
this.totalInput = res.data.totalInput;
|
||||||
|
this.totalOutput = res.data.totalOutput;
|
||||||
|
this.totalProductionRatio = res.data.totalProductionRatio;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 确认保存
|
||||||
|
editDialogClick() {
|
||||||
|
this.butClick = true;
|
||||||
|
updateUserMulti({ erbanNo: this.value }).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "赠送成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
this.butClick = false;
|
||||||
|
}, 3000);
|
||||||
|
this.editDialog = false;
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
this.butClick = false;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 分页导航
|
||||||
|
handleSizeChange() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
handleCurrentChange() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.box {
|
||||||
|
padding-top: 20px;
|
||||||
|
background: #ecf0f5;
|
||||||
|
.condition {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
.inquire {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 20px;
|
||||||
|
span {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.input {
|
||||||
|
width: 180px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.but {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
151
src/views/luckGift/luckGiftDataAll.vue
Normal file
151
src/views/luckGift/luckGiftDataAll.vue
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<div class="condition">
|
||||||
|
<!-- 分区 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>分区</span>
|
||||||
|
<el-select v-model="inquire.value" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<!-- 时间 -->
|
||||||
|
<!-- <div class="inquire">
|
||||||
|
<span>时间</span>
|
||||||
|
<el-date-picker v-model="inquire.time" type="date" placeholder="请选择">
|
||||||
|
</el-date-picker>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
<!-- 按钮 -->
|
||||||
|
<div class="but">
|
||||||
|
<el-button class="primary" type="primary" @click="getData()"
|
||||||
|
>查询
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<el-button type="text">数组出金币总额:{{ totalInput }}</el-button>
|
||||||
|
<el-button type="text">数组出返币总额:{{ totalOutput }}</el-button>
|
||||||
|
<el-button type="text">投产比:{{ totalProductionRatio }}</el-button>
|
||||||
|
<!-- 表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="date" align="center" label="日期" />
|
||||||
|
<el-table-column prop="totalInput" align="center" label="进入" />
|
||||||
|
<el-table-column prop="totalOutput" align="center" label="退出" />
|
||||||
|
<el-table-column
|
||||||
|
prop="productionRatio"
|
||||||
|
align="center"
|
||||||
|
label="退出/进入比例"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="num" align="center" label="参与次数" />
|
||||||
|
<el-table-column prop="count" align="center" label="参与人数" />
|
||||||
|
<el-table-column prop="winCount" align="center" label="得到人数" />
|
||||||
|
<el-table-column prop="winNum" align="center" label="得到次数" />
|
||||||
|
<el-table-column prop="winRate" align="center" label="得到率" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { platform } from "@/api/luckGift/luckGift";
|
||||||
|
// @ts-ignore
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
// @ts-ignore
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import moment from "moment-timezone";
|
||||||
|
export default {
|
||||||
|
name: "luckGiftDataAll",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
totalInput: "0",
|
||||||
|
totalOutput: "0",
|
||||||
|
totalProductionRatio: "0",
|
||||||
|
//查询所需条件对象
|
||||||
|
inquire: {
|
||||||
|
value: 2,
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
label: "阿拉伯区",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: "英语区",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 4,
|
||||||
|
label: "华语区",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 8,
|
||||||
|
label: "土耳其区",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
time: "",
|
||||||
|
},
|
||||||
|
// 表格
|
||||||
|
tableData: [],
|
||||||
|
// 分页
|
||||||
|
total: 10, //总页数
|
||||||
|
currentPage: 1, //页码
|
||||||
|
pageSize: 10, //条数
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// this.getData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 查询接口
|
||||||
|
getData() {
|
||||||
|
this.loading = true;
|
||||||
|
platform({
|
||||||
|
partitionId: this.inquire.value,
|
||||||
|
}).then((res) => {
|
||||||
|
this.totalInput = res.data.totalInput;
|
||||||
|
this.totalOutput = res.data.totalOutput;
|
||||||
|
this.totalProductionRatio = res.data.totalProductionRatio;
|
||||||
|
this.tableData = res.data.dataList;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 分页导航
|
||||||
|
handleSizeChange() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
handleCurrentChange() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.box {
|
||||||
|
padding-top: 20px;
|
||||||
|
background: #ecf0f5;
|
||||||
|
.condition {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
.inquire {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 20px;
|
||||||
|
span {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.input {
|
||||||
|
width: 180px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.but {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
504
src/views/luckGift/luckGiftSet.vue
Normal file
504
src/views/luckGift/luckGiftSet.vue
Normal file
@@ -0,0 +1,504 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<div class="condition">
|
||||||
|
<!-- 分区 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>分区</span>
|
||||||
|
<el-select
|
||||||
|
v-model="inquire.value"
|
||||||
|
placeholder="请选择"
|
||||||
|
@change="handleChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.options"
|
||||||
|
:key="item.type"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.type"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="inquire">
|
||||||
|
<span>对比值N</span>
|
||||||
|
<!-- @input="handleInput" -->
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.comparisonValue"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
disabled
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
editDialog = true;
|
||||||
|
butClick = false;
|
||||||
|
type = 1;
|
||||||
|
editDialogTitle = '对比值N';
|
||||||
|
value = inquire.comparisonValue;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
编辑</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="inquire">
|
||||||
|
<span>对比值M</span>
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.supplement.supplementRatio"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
disabled
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
editDialog = true;
|
||||||
|
butClick = false;
|
||||||
|
type = 5;
|
||||||
|
editDialogTitle = '对比值M';
|
||||||
|
value = inquire.supplement.supplementRatio;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
编辑</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="inquire">
|
||||||
|
<span>金币对比值A</span>
|
||||||
|
<!-- @input="handleInput" -->
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.supplement.conditionInput"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
disabled
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
editDialog = true;
|
||||||
|
butClick = false;
|
||||||
|
type = 6;
|
||||||
|
editDialogTitle = '金币对比值A';
|
||||||
|
value = inquire.supplement.conditionInput;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
编辑</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="inquire">
|
||||||
|
<span>奖励金币倍数</span>
|
||||||
|
<!-- @input="handleInput" -->
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.supplement.supplementMulti"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
disabled
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
editDialog = true;
|
||||||
|
butClick = false;
|
||||||
|
type = 7;
|
||||||
|
editDialogTitle = '奖励金币倍数';
|
||||||
|
value = inquire.supplement.supplementMulti;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
编辑</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="inquire">
|
||||||
|
<span>幸运24金币库存</span>
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.goldInventory"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
disabled
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
editDialog = true;
|
||||||
|
butClick = false;
|
||||||
|
type = 2;
|
||||||
|
editDialogTitle = '幸运24金币库存';
|
||||||
|
value = inquire.goldInventory;
|
||||||
|
"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <div class="inquire">
|
||||||
|
<span>幸运礼物ID</span>
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.x"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
disabled
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
editDialog = true;
|
||||||
|
butClick = false;
|
||||||
|
type = 8;
|
||||||
|
editDialogTitle = '幸运礼物ID';
|
||||||
|
value = inquire.x;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
编辑</el-button
|
||||||
|
>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
<div class="inquire">
|
||||||
|
<span>平台抽成</span>
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.platformCommission"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
disabled
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
editDialog = true;
|
||||||
|
butClick = false;
|
||||||
|
type = 3;
|
||||||
|
editDialogTitle = '平台抽成';
|
||||||
|
value = inquire.platformCommission;
|
||||||
|
"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="inquire">
|
||||||
|
<span>用户收益比例</span>
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.userRevenueRatio"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
disabled
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
editDialog = true;
|
||||||
|
butClick = false;
|
||||||
|
type = 4;
|
||||||
|
editDialogTitle = '用户收益比例';
|
||||||
|
value = inquire.userRevenueRatio;
|
||||||
|
"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="inquire">
|
||||||
|
<span>通知制定金额</span>
|
||||||
|
<!-- @input="handleInput" -->
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.warnMulti"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
disabled
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
editDialog = true;
|
||||||
|
butClick = false;
|
||||||
|
type = 9;
|
||||||
|
editDialogTitle = '通知制定金额';
|
||||||
|
value = inquire.warnMulti;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
编辑</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <div class="inquire">
|
||||||
|
<span>库存告急通知</span>
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.x"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
disabled
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
editDialog = true;
|
||||||
|
butClick = false;
|
||||||
|
type = 10;
|
||||||
|
editDialogTitle = '库存告急通知';
|
||||||
|
value = inquire.x;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
编辑</el-button
|
||||||
|
>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
<div class="inquire">
|
||||||
|
<span>用户上线列表</span>
|
||||||
|
<!-- @input="handleInput" -->
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.followErbanNoList"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
disabled
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
editDialog = true;
|
||||||
|
butClick = false;
|
||||||
|
type = 11;
|
||||||
|
editDialogTitle = '用户上线列表';
|
||||||
|
value = inquire.followErbanNoList;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
编辑</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>赠送1000倍奖励</span>
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
:disabled="butClick"
|
||||||
|
@click="
|
||||||
|
editDialog = true;
|
||||||
|
type = 12;
|
||||||
|
editDialogTitle = '赠送1000倍奖励';
|
||||||
|
value = inquire.x;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
赠送</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 编辑弹窗 -->
|
||||||
|
<el-dialog v-model="editDialog" :title="editDialogTitle" width="36%" center>
|
||||||
|
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||||
|
<span
|
||||||
|
style="display: inline-block; margin-right: 20px"
|
||||||
|
class="col-sm-2 control-label"
|
||||||
|
>{{ editDialogTitle }}</span
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="value"
|
||||||
|
style="width: 75%"
|
||||||
|
class="input"
|
||||||
|
placeholder="请输入"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
editDialog = false;
|
||||||
|
butClick = false;
|
||||||
|
"
|
||||||
|
>取消</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
:disabled="butClick"
|
||||||
|
@click="editDialogClick()"
|
||||||
|
>
|
||||||
|
保存
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { getConfig, updateSet, updateUserMulti } from "@/api/luckGift/luckGift";
|
||||||
|
// @ts-ignore
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
// @ts-ignore
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import moment from "moment-timezone";
|
||||||
|
export default {
|
||||||
|
name: "luckGiftSet",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
butClick: false,
|
||||||
|
butClickTime: null,
|
||||||
|
//查询所需条件对象
|
||||||
|
inquire: {
|
||||||
|
value: 2,
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: "阿拉伯区",
|
||||||
|
type: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "英语区",
|
||||||
|
type: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "华语区",
|
||||||
|
type: 4,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "土耳其区",
|
||||||
|
type: 8,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
comparisonValue: "",
|
||||||
|
goldInventory: "",
|
||||||
|
giftId: "",
|
||||||
|
platformCommission: "",
|
||||||
|
userRevenueRatio: "",
|
||||||
|
supplement: {
|
||||||
|
conditionInput: "",
|
||||||
|
conditionNum: "",
|
||||||
|
supplementMulti: "",
|
||||||
|
supplementNum: "",
|
||||||
|
supplementRatio: "",
|
||||||
|
},
|
||||||
|
warnMulti: "",
|
||||||
|
followErbanNoList: "",
|
||||||
|
},
|
||||||
|
editDialog: false,
|
||||||
|
editDialogTitle: "",
|
||||||
|
value: "",
|
||||||
|
type: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 查询接口
|
||||||
|
getData() {
|
||||||
|
getConfig({ partitionId: this.inquire.value }).then((res) => {
|
||||||
|
this.inquire.comparisonValue = res.data.productionRatio;
|
||||||
|
this.inquire.goldInventory = res.data.stock;
|
||||||
|
this.inquire.platformCommission = res.data.platformRatio;
|
||||||
|
this.inquire.userRevenueRatio = res.data.receiverRatio;
|
||||||
|
this.inquire.supplement = res.data.supplement;
|
||||||
|
this.inquire.warnMulti = res.data.warnMulti;
|
||||||
|
this.inquire.followErbanNoList = res.data.followErbanNoList.join();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 确认保存
|
||||||
|
editDialogClick() {
|
||||||
|
var obj = {};
|
||||||
|
obj.partitionId = this.inquire.value;
|
||||||
|
if (this.type == 12) {
|
||||||
|
this.butClick = true;
|
||||||
|
updateUserMulti({ erbanNo: this.value }).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message:'赠送成功',
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
this.butClick = false;
|
||||||
|
}, 3000);
|
||||||
|
this.editDialog = false;
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
this.butClick = false;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if (this.type == 1) {
|
||||||
|
obj.productionRatio = this.value;
|
||||||
|
} else if (this.type == 2) {
|
||||||
|
obj.stock = this.value;
|
||||||
|
} else if (this.type == 3) {
|
||||||
|
obj.platformRatio = this.value;
|
||||||
|
} else if (this.type == 4) {
|
||||||
|
obj.receiverRatio = this.value;
|
||||||
|
}else if (this.type == 5) {
|
||||||
|
obj.supplement = this.inquire.supplement;
|
||||||
|
obj.supplement.supplementRatio = this.value;
|
||||||
|
} else if (this.type == 6) {
|
||||||
|
obj.supplement = this.inquire.supplement;
|
||||||
|
obj.supplement.conditionInput = this.value;
|
||||||
|
} else if (this.type == 7) {
|
||||||
|
obj.supplement = this.inquire.supplement;
|
||||||
|
obj.supplement.supplementMulti = this.value;
|
||||||
|
} else if (this.type == 9) {
|
||||||
|
obj.warnMulti = this.value;
|
||||||
|
} else if (this.type == 11) {
|
||||||
|
obj.followErbanNoList = this.value.split(",");
|
||||||
|
}
|
||||||
|
updateSet(obj).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "保存成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.editDialog = false;
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 监听类型
|
||||||
|
handleChange(value) {
|
||||||
|
this.inquire.value = value;
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.box {
|
||||||
|
padding-top: 20px;
|
||||||
|
background: #ecf0f5;
|
||||||
|
.condition {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
.inquire {
|
||||||
|
margin-right: 20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
span {
|
||||||
|
display: inline-block;
|
||||||
|
width: 110px;
|
||||||
|
margin-right: 10px;
|
||||||
|
// text-align: right;
|
||||||
|
}
|
||||||
|
.input {
|
||||||
|
width: 180px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.but {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -306,7 +306,8 @@ export default {
|
|||||||
this.inquire.value1 = e;
|
this.inquire.value1 = e;
|
||||||
luckyGiftRangeConfigList({ giftId: this.inquire.value1 }).then((res) => {
|
luckyGiftRangeConfigList({ giftId: this.inquire.value1 }).then((res) => {
|
||||||
this.inquire.giftsNum = res.data;
|
this.inquire.giftsNum = res.data;
|
||||||
// this.inquire.value2 = res.data[0].id;
|
// this.inquire.value2 = "";
|
||||||
|
this.inquire.value2 = res.data[0].id;
|
||||||
// this.loading = true;
|
// this.loading = true;
|
||||||
// luckyGiftRewardList({
|
// luckyGiftRewardList({
|
||||||
// giftId: e,
|
// giftId: e,
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
:src="imgFun(JsonFunc(scope.row.rewardJson))[0]"
|
:src="imgFun(JsonFunc(scope.row.rewardJson))[0]"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="imgFun(JsonFunc(scope.row.rewardJson))"
|
:preview-src-list="imgFun(JsonFunc(scope.row.rewardJson))"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
:src="scope.row.luckyBagPic"
|
:src="scope.row.luckyBagPic"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.luckyBagPic]"
|
:preview-src-list="[scope.row.luckyBagPic]"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
:src="scope.row.destGiftPic"
|
:src="scope.row.destGiftPic"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.destGiftPic]"
|
:preview-src-list="[scope.row.destGiftPic]"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
:src="scope.row.rewardGiftPic"
|
:src="scope.row.rewardGiftPic"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.rewardGiftPic]"
|
:preview-src-list="[scope.row.rewardGiftPic]"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -48,6 +48,9 @@
|
|||||||
<el-table-column prop="name" align="center" label="勋章名称-阿语区">
|
<el-table-column prop="name" align="center" label="勋章名称-阿语区">
|
||||||
<template v-slot="scope">{{ JSON.parse(scope.row.name).ar }}</template>
|
<template v-slot="scope">{{ JSON.parse(scope.row.name).ar }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="name" align="center" label="勋章名称-土耳其区">
|
||||||
|
<template v-slot="scope">{{ JSON.parse(scope.row.name).tr }}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
prop="picUrl"
|
prop="picUrl"
|
||||||
@@ -60,7 +63,7 @@
|
|||||||
:src="scope.row.picUrl"
|
:src="scope.row.picUrl"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="scope.row.picUrl"
|
:preview-src-list="scope.row.picUrl"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
@@ -182,6 +185,19 @@
|
|||||||
class="input"
|
class="input"
|
||||||
></el-input>
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 勋章名称-土耳其 -->
|
||||||
|
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||||
|
<span
|
||||||
|
style="display: inline-block; margin-right: 20px"
|
||||||
|
class="col-sm-2 control-label"
|
||||||
|
>勋章名称-土耳其</span
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="controlsObj.nickTr"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 勋章图片 -->
|
<!-- 勋章图片 -->
|
||||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||||
@@ -198,10 +214,7 @@
|
|||||||
:before-upload="beforeAvatarUpload"
|
:before-upload="beforeAvatarUpload"
|
||||||
:on-error="handleAvatarError"
|
:on-error="handleAvatarError"
|
||||||
>
|
>
|
||||||
<img
|
<img :src="controlsObj.imageUrl1" class="avatar" />
|
||||||
:src="controlsObj.imageUrl1"
|
|
||||||
class="avatar"
|
|
||||||
/>
|
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -349,6 +362,7 @@ export default {
|
|||||||
nickZh: "",
|
nickZh: "",
|
||||||
nickEn: "",
|
nickEn: "",
|
||||||
nickAr: "",
|
nickAr: "",
|
||||||
|
nickTr: "",
|
||||||
imageUrl1: "",
|
imageUrl1: "",
|
||||||
value2: "",
|
value2: "",
|
||||||
options2: [
|
options2: [
|
||||||
@@ -419,6 +433,7 @@ export default {
|
|||||||
this.controlsObj.nickZh = "";
|
this.controlsObj.nickZh = "";
|
||||||
this.controlsObj.nickEn = "";
|
this.controlsObj.nickEn = "";
|
||||||
this.controlsObj.nickAr = "";
|
this.controlsObj.nickAr = "";
|
||||||
|
this.controlsObj.nickTr = "";
|
||||||
this.controlsObj.imageUrl1 = "";
|
this.controlsObj.imageUrl1 = "";
|
||||||
this.controlsObj.value2 = "";
|
this.controlsObj.value2 = "";
|
||||||
this.controlsDialog = true;
|
this.controlsDialog = true;
|
||||||
@@ -431,6 +446,7 @@ export default {
|
|||||||
this.controlsObj.nickZh = JSON.parse(val.name).zh;
|
this.controlsObj.nickZh = JSON.parse(val.name).zh;
|
||||||
this.controlsObj.nickEn = JSON.parse(val.name).en;
|
this.controlsObj.nickEn = JSON.parse(val.name).en;
|
||||||
this.controlsObj.nickAr = JSON.parse(val.name).ar;
|
this.controlsObj.nickAr = JSON.parse(val.name).ar;
|
||||||
|
this.controlsObj.nickTr = JSON.parse(val.name).tr;
|
||||||
this.controlsObj.imageUrl1 = val.picUrl;
|
this.controlsObj.imageUrl1 = val.picUrl;
|
||||||
this.controlsObj.value2 = val.enable;
|
this.controlsObj.value2 = val.enable;
|
||||||
this.controlsObj.id = val.id;
|
this.controlsObj.id = val.id;
|
||||||
@@ -452,6 +468,7 @@ export default {
|
|||||||
zh: this.controlsObj.nickZh,
|
zh: this.controlsObj.nickZh,
|
||||||
en: this.controlsObj.nickEn,
|
en: this.controlsObj.nickEn,
|
||||||
ar: this.controlsObj.nickAr,
|
ar: this.controlsObj.nickAr,
|
||||||
|
tr: this.controlsObj.nickTr,
|
||||||
});
|
});
|
||||||
obj.picUrl = this.controlsObj.imageUrl1;
|
obj.picUrl = this.controlsObj.imageUrl1;
|
||||||
obj.enable = this.controlsObj.value2;
|
obj.enable = this.controlsObj.value2;
|
||||||
@@ -480,6 +497,7 @@ export default {
|
|||||||
zh: this.controlsObj.nickZh,
|
zh: this.controlsObj.nickZh,
|
||||||
en: this.controlsObj.nickEn,
|
en: this.controlsObj.nickEn,
|
||||||
ar: this.controlsObj.nickAr,
|
ar: this.controlsObj.nickAr,
|
||||||
|
tr: this.controlsObj.nickTr,
|
||||||
});
|
});
|
||||||
obj1.picUrl = this.controlsObj.imageUrl1;
|
obj1.picUrl = this.controlsObj.imageUrl1;
|
||||||
obj1.enable = this.controlsObj.value2;
|
obj1.enable = this.controlsObj.value2;
|
||||||
@@ -535,32 +553,51 @@ export default {
|
|||||||
//1 2 4
|
//1 2 4
|
||||||
var val = 0;
|
var val = 0;
|
||||||
if (type == 2) {
|
if (type == 2) {
|
||||||
if (num == 0 || num == 7) {
|
if (num == 0 || num == 15) {
|
||||||
val = [4, 1, 2];
|
val = [1, 2, 4, 8];
|
||||||
|
}
|
||||||
|
if (num == 0 || num == 15) {
|
||||||
|
val = [1, 2, 4, 8];
|
||||||
} else if (num == 1) {
|
} else if (num == 1) {
|
||||||
val = [1];
|
val = [1];
|
||||||
} else if (num == 3) {
|
} else if (num == 3) {
|
||||||
val = [1, 2];
|
val = [1, 2];
|
||||||
|
} else if (num == 7) {
|
||||||
|
val = [1, 2, 4];
|
||||||
} else if (num == 2) {
|
} else if (num == 2) {
|
||||||
val = [2];
|
val = [2];
|
||||||
} else if (num == 6) {
|
} else if (num == 6) {
|
||||||
val = [2, 4];
|
val = [2, 4];
|
||||||
|
} else if (num == 14) {
|
||||||
|
val = [2, 4, 8];
|
||||||
} else if (num == 4) {
|
} else if (num == 4) {
|
||||||
val = [4];
|
val = [4];
|
||||||
|
} else if (num == 12) {
|
||||||
|
val = [4, 8];
|
||||||
|
} else if (num == 8) {
|
||||||
|
val = [8];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (num == 0 || num == 7) {
|
if (num == 0 || num == 15) {
|
||||||
val = "华语区、英语区、阿语区";
|
val = "英语区、阿语区、华语区、土耳其区";
|
||||||
} else if (num == 1) {
|
} else if (num == 1) {
|
||||||
val = "英语区";
|
val = "英语区";
|
||||||
} else if (num == 3) {
|
} else if (num == 3) {
|
||||||
val = "英语区、阿语区";
|
val = "英语区、阿语区";
|
||||||
|
} else if (num == 7) {
|
||||||
|
val = "英语区、阿语区、华语区";
|
||||||
} else if (num == 2) {
|
} else if (num == 2) {
|
||||||
val = "阿语区";
|
val = "阿语区";
|
||||||
} else if (num == 6) {
|
} else if (num == 6) {
|
||||||
val = "阿语区、华语区";
|
val = "阿语区、华语区";
|
||||||
|
} else if (num == 14) {
|
||||||
|
val = "阿语区、华语区、土耳其区";
|
||||||
} else if (num == 4) {
|
} else if (num == 4) {
|
||||||
val = "华语区";
|
val = "华语区";
|
||||||
|
} else if (num == 12) {
|
||||||
|
val = "华语区、土耳其区";
|
||||||
|
} else if (num == 8) {
|
||||||
|
val = "土耳其区";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
:src="scope.row.picUrl"
|
:src="scope.row.picUrl"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="scope.row.picUrl"
|
:preview-src-list="scope.row.picUrl"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -74,6 +74,7 @@
|
|||||||
<input type="checkbox" name="partitionFlag" value="1"/>英语区<br>
|
<input type="checkbox" name="partitionFlag" value="1"/>英语区<br>
|
||||||
<input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br>
|
<input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br>
|
||||||
<input type="checkbox" name="partitionFlag" value="4"/>华语区<br>
|
<input type="checkbox" name="partitionFlag" value="4"/>华语区<br>
|
||||||
|
<input type="checkbox" name="partitionFlag" value="8"/>土耳其区<br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -103,6 +104,12 @@
|
|||||||
<input type="text" class="form-control validate[required]" name="name1" id="en_name1" placeholder="请输入,5个字符内">
|
<input type="text" class="form-control validate[required]" name="name1" id="en_name1" placeholder="请输入,5个字符内">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="tr_name1" class="col-sm-4 control-label">土耳其铭牌名称:</label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<input type="text" class="form-control validate[required]" name="name1" id="tr_name1" placeholder="请输入,5个字符内">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label">用户自定义文案:</label>
|
<label class="col-sm-4 control-label">用户自定义文案:</label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
@@ -129,6 +136,12 @@
|
|||||||
<input type="text" class="form-control" name="enFixedWord" id="enFixedWord">
|
<input type="text" class="form-control" name="enFixedWord" id="enFixedWord">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="trFixedWord" class="col-sm-4 control-label">土耳其固定文案:</label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<input type="text" class="form-control" name="trFixedWord" id="trFixedWord">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="days" class="col-sm-4 control-label">有效期(天):</label>
|
<label for="days" class="col-sm-4 control-label">有效期(天):</label>
|
||||||
@@ -247,6 +260,7 @@ export default {
|
|||||||
{field: 'name.zh', title: '铭牌名称', align: 'middle', width: '5%'},
|
{field: 'name.zh', title: '铭牌名称', align: 'middle', width: '5%'},
|
||||||
{field: 'name.ar', title: '阿语铭牌名称', align: 'middle', width: '5%'},
|
{field: 'name.ar', title: '阿语铭牌名称', align: 'middle', width: '5%'},
|
||||||
{field: 'name.en', title: '英语铭牌名称', align: 'middle', width: '5%'},
|
{field: 'name.en', title: '英语铭牌名称', align: 'middle', width: '5%'},
|
||||||
|
{field: 'name.tr', title: '土耳其名称', align: 'middle', width: '5%'},
|
||||||
{
|
{
|
||||||
field: 'partitionFlag',
|
field: 'partitionFlag',
|
||||||
title: '地区',
|
title: '地区',
|
||||||
@@ -263,6 +277,9 @@ export default {
|
|||||||
if ((val & 4) != 0) {
|
if ((val & 4) != 0) {
|
||||||
value += '华语区<br>';
|
value += '华语区<br>';
|
||||||
}
|
}
|
||||||
|
if ((val & 8) != 0) {
|
||||||
|
value += '土耳其区<br>';
|
||||||
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -320,6 +337,19 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'fixedWord.tr',
|
||||||
|
title: '土耳其固定文案',
|
||||||
|
align: 'middle',
|
||||||
|
width: '5%',
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
if (isEmpty(val)) {
|
||||||
|
return '/';
|
||||||
|
} else {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{ field: 'days', title: '有效期(天)', align: 'middle', width: '5%' },
|
{ field: 'days', title: '有效期(天)', align: 'middle', width: '5%' },
|
||||||
{ field: 'statusStr', title: '状态', align: 'middle', width: '5%' },
|
{ field: 'statusStr', title: '状态', align: 'middle', width: '5%' },
|
||||||
{ field: 'typeStr', title: '铭牌款式', align: 'middle', width: '5%' },
|
{ field: 'typeStr', title: '铭牌款式', align: 'middle', width: '5%' },
|
||||||
@@ -454,10 +484,12 @@ export default {
|
|||||||
$("#name1").val(jsonName.zh);
|
$("#name1").val(jsonName.zh);
|
||||||
$("#ar_name1").val(jsonName.ar);
|
$("#ar_name1").val(jsonName.ar);
|
||||||
$("#en_name1").val(jsonName.en);
|
$("#en_name1").val(jsonName.en);
|
||||||
|
$("#tr_name1").val(jsonName.tr);
|
||||||
} else {
|
} else {
|
||||||
$("#name1").val(name);
|
$("#name1").val(name);
|
||||||
$("#ar_name1").val(name);
|
$("#ar_name1").val(name);
|
||||||
$("#en_name1").val(name);
|
$("#en_name1").val(name);
|
||||||
|
$("#tr_name1").val(name);
|
||||||
}
|
}
|
||||||
let fixedWord = json.fixedWord;
|
let fixedWord = json.fixedWord;
|
||||||
if (fixedWord && fixedWord.startsWith('{') && fixedWord.endsWith('}')) {
|
if (fixedWord && fixedWord.startsWith('{') && fixedWord.endsWith('}')) {
|
||||||
@@ -465,10 +497,12 @@ export default {
|
|||||||
$('#zhFixedWord').val(jsonValue.zh);
|
$('#zhFixedWord').val(jsonValue.zh);
|
||||||
$('#arFixedWord').val(jsonValue.ar);
|
$('#arFixedWord').val(jsonValue.ar);
|
||||||
$('#enFixedWord').val(jsonValue.en);
|
$('#enFixedWord').val(jsonValue.en);
|
||||||
|
$('#trFixedWord').val(jsonValue.tr);
|
||||||
} else {
|
} else {
|
||||||
$('#zhFixedWord').val(fixedWord);
|
$('#zhFixedWord').val(fixedWord);
|
||||||
$('#arFixedWord').val(fixedWord);
|
$('#arFixedWord').val(fixedWord);
|
||||||
$('#enFixedWord').val(fixedWord);
|
$('#enFixedWord').val(fixedWord);
|
||||||
|
$('#trFixedWord').val(fixedWord);
|
||||||
}
|
}
|
||||||
$('#nameplateType1').attr("disabled", "true");
|
$('#nameplateType1').attr("disabled", "true");
|
||||||
if (!json.isCustomWord) {
|
if (!json.isCustomWord) {
|
||||||
@@ -477,6 +511,7 @@ export default {
|
|||||||
$('#zhFixedWord').val('');
|
$('#zhFixedWord').val('');
|
||||||
$('#arFixedWord').val('');
|
$('#arFixedWord').val('');
|
||||||
$('#enFixedWord').val('');
|
$('#enFixedWord').val('');
|
||||||
|
$('#trFixedWord').val('');
|
||||||
} else {
|
} else {
|
||||||
$('input[name="isCustomWord"]').get(1).checked = true;
|
$('input[name="isCustomWord"]').get(1).checked = true;
|
||||||
$('#fixedWord-div').removeClass("hidden");
|
$('#fixedWord-div').removeClass("hidden");
|
||||||
@@ -553,17 +588,19 @@ export default {
|
|||||||
var zhFixedWord = $('#zhFixedWord').val();
|
var zhFixedWord = $('#zhFixedWord').val();
|
||||||
var arFixedWord = $('#arFixedWord').val();
|
var arFixedWord = $('#arFixedWord').val();
|
||||||
var enFixedWord = $('#enFixedWord').val();
|
var enFixedWord = $('#enFixedWord').val();
|
||||||
|
var trFixedWord = $('#trFixedWord').val();
|
||||||
let fixedWordValue = '';
|
let fixedWordValue = '';
|
||||||
if (!(zhFixedWord == '' && arFixedWord == '' && enFixedWord == '')) {
|
if (!(zhFixedWord == '' && arFixedWord == '' && enFixedWord == '' && trFixedWord=="")) {
|
||||||
let jsonFixedWord = {'zh': zhFixedWord, 'ar': arFixedWord, 'en': enFixedWord};
|
let jsonFixedWord = {'zh': zhFixedWord, 'ar': arFixedWord, 'en': enFixedWord,'tr':trFixedWord};
|
||||||
fixedWordValue = JSON.stringify(jsonFixedWord);
|
fixedWordValue = JSON.stringify(jsonFixedWord);
|
||||||
}
|
}
|
||||||
var isCustomWord = $('input[name="isCustomWord"]:checked').val();
|
var isCustomWord = $('input[name="isCustomWord"]:checked').val();
|
||||||
var name = $('#name1').val();
|
var name = $('#name1').val();
|
||||||
var ar_name = $('#ar_name1').val();
|
var ar_name = $('#ar_name1').val();
|
||||||
var en_name = $('#en_name1').val();
|
var en_name = $('#en_name1').val();
|
||||||
|
var tr_name = $('#tr_name1').val();
|
||||||
|
|
||||||
var jsonName = {"zh":name,"ar":ar_name,"en":en_name}
|
var jsonName = {"zh":name,"ar":ar_name,"en":en_name,"tr":tr_name}
|
||||||
const nameValue = JSON.stringify(jsonName);
|
const nameValue = JSON.stringify(jsonName);
|
||||||
var nameplateType = $('#nameplateType1').val();
|
var nameplateType = $('#nameplateType1').val();
|
||||||
var id = $('#id').val();
|
var id = $('#id').val();
|
||||||
@@ -771,12 +808,14 @@ function cleanNamePlateModal() {
|
|||||||
$('#zhFixedWord').val('');
|
$('#zhFixedWord').val('');
|
||||||
$('#arFixedWord').val('');
|
$('#arFixedWord').val('');
|
||||||
$('#enFixedWord').val('');
|
$('#enFixedWord').val('');
|
||||||
|
$('#trFixedWord').val('');
|
||||||
$('input[name="isCustomWord"]').each(function () {
|
$('input[name="isCustomWord"]').each(function () {
|
||||||
$(this).removeAttr("checked");
|
$(this).removeAttr("checked");
|
||||||
});
|
});
|
||||||
$('#name1').val('');
|
$('#name1').val('');
|
||||||
$('#ar_name1').val('');
|
$('#ar_name1').val('');
|
||||||
$('#en_name1').val('');
|
$('#en_name1').val('');
|
||||||
|
$('#tr_name1').val('');
|
||||||
$('#nameplateType1').val('');
|
$('#nameplateType1').val('');
|
||||||
$('#name1').removeAttr("readonly");
|
$('#name1').removeAttr("readonly");
|
||||||
$('#nameplateType1').removeAttr("disabled");
|
$('#nameplateType1').removeAttr("disabled");
|
||||||
|
|||||||
@@ -58,6 +58,19 @@
|
|||||||
label="会长分区"
|
label="会长分区"
|
||||||
/>
|
/>
|
||||||
<el-table-column prop="name" align="center" label="公会昵称" />
|
<el-table-column prop="name" align="center" label="公会昵称" />
|
||||||
|
<el-table-column align="center" prop="giftInfo" label="公会头像">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.avatar"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="[scope.row.avatar]"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="giftInfo" label="公会背景图">
|
<el-table-column align="center" prop="giftInfo" label="公会背景图">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-image
|
<el-image
|
||||||
@@ -65,7 +78,7 @@
|
|||||||
:src="scope.row.backgroundUrl"
|
:src="scope.row.backgroundUrl"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.backgroundUrl]"
|
:preview-src-list="[scope.row.backgroundUrl]"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
@@ -120,6 +133,38 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column prop="goldIncome" align="center" label="金币总收入" />
|
<!-- <el-table-column prop="goldIncome" align="center" label="金币总收入" />
|
||||||
<el-table-column prop="diamondRemain" align="center" label="钻石总收入" /> -->
|
<el-table-column prop="diamondRemain" align="center" label="钻石总收入" /> -->
|
||||||
|
<el-table-column
|
||||||
|
prop="guildContact"
|
||||||
|
align="center"
|
||||||
|
label="公会联系方式"
|
||||||
|
/>
|
||||||
|
<el-table-column align="center" prop="idCard" label="公会长身份证件">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.idCard"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="[scope.row.idCard]"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="inviteErbanNo" align="center" label="邀请人ID" />
|
||||||
|
<el-table-column prop="inviteCheck" align="center" label="邀请人证明">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.inviteCheck"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="[scope.row.inviteCheck]"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column align="center" label="操作" width="300">
|
<el-table-column align="center" label="操作" width="300">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
@@ -245,6 +290,22 @@
|
|||||||
class="input"
|
class="input"
|
||||||
></el-input>
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 公会头像 -->
|
||||||
|
<div class="selectBox selectBoxImg">
|
||||||
|
<span class="left" style="margin-right: 20px">公会头像</span>
|
||||||
|
<!-- action="/admin/tencent/cos/upload/file" -->
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess2"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="ediObj.imageUrl2" :src="ediObj.imageUrl2" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
<!-- 公会背景图 -->
|
<!-- 公会背景图 -->
|
||||||
<div class="selectBox selectBoxImg">
|
<div class="selectBox selectBoxImg">
|
||||||
<span class="left" style="margin-right: 20px">公会背景图</span>
|
<span class="left" style="margin-right: 20px">公会背景图</span>
|
||||||
@@ -487,6 +548,7 @@ export default {
|
|||||||
guildNumber: "",
|
guildNumber: "",
|
||||||
id: "",
|
id: "",
|
||||||
imageUrl1: "",
|
imageUrl1: "",
|
||||||
|
imageUrl2: "",
|
||||||
},
|
},
|
||||||
// 收款账户弹窗
|
// 收款账户弹窗
|
||||||
payAccountDialog: false,
|
payAccountDialog: false,
|
||||||
@@ -700,6 +762,7 @@ export default {
|
|||||||
this.ediObj.guildNumber = obj.memberNumLimit;
|
this.ediObj.guildNumber = obj.memberNumLimit;
|
||||||
this.ediObj.id = obj.id;
|
this.ediObj.id = obj.id;
|
||||||
this.ediObj.imageUrl1 = obj.backgroundUrl;
|
this.ediObj.imageUrl1 = obj.backgroundUrl;
|
||||||
|
this.ediObj.imageUrl2 = obj.avatar;
|
||||||
this.editDialog = true;
|
this.editDialog = true;
|
||||||
},
|
},
|
||||||
// 二次确认弹窗
|
// 二次确认弹窗
|
||||||
@@ -709,6 +772,7 @@ export default {
|
|||||||
id: this.ediObj.id,
|
id: this.ediObj.id,
|
||||||
memberNumLimit: this.ediObj.guildNumber,
|
memberNumLimit: this.ediObj.guildNumber,
|
||||||
backgroundUrl: this.ediObj.imageUrl1,
|
backgroundUrl: this.ediObj.imageUrl1,
|
||||||
|
avatar: this.ediObj.imageUrl2,
|
||||||
name: this.ediObj.guildNick,
|
name: this.ediObj.guildNick,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
@@ -766,6 +830,16 @@ export default {
|
|||||||
type: "error",
|
type: "error",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleAvatarSuccess2(res, file) {
|
||||||
|
console.log(file);
|
||||||
|
// this.ediObj.imageUrl1 = URL.createObjectURL();
|
||||||
|
this.ediObj.imageUrl2 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
handleAvatarSuccess(res, file) {
|
handleAvatarSuccess(res, file) {
|
||||||
console.log(file);
|
console.log(file);
|
||||||
// this.ediObj.imageUrl1 = URL.createObjectURL();
|
// this.ediObj.imageUrl1 = URL.createObjectURL();
|
||||||
|
|||||||
@@ -50,6 +50,19 @@
|
|||||||
<el-table-column prop="ownerErbanNo" align="center" label="会长ID" />
|
<el-table-column prop="ownerErbanNo" align="center" label="会长ID" />
|
||||||
<el-table-column prop="ownerNick" align="center" label="会长昵称" />
|
<el-table-column prop="ownerNick" align="center" label="会长昵称" />
|
||||||
<el-table-column prop="name" align="center" label="公会昵称" />
|
<el-table-column prop="name" align="center" label="公会昵称" />
|
||||||
|
<el-table-column align="center" prop="giftInfo" label="公会头像">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.avatar"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="[scope.row.avatar]"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="giftInfo" label="公会背景图">
|
<el-table-column align="center" prop="giftInfo" label="公会背景图">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-image
|
<el-image
|
||||||
@@ -57,7 +70,7 @@
|
|||||||
:src="scope.row.backgroundUrl"
|
:src="scope.row.backgroundUrl"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.backgroundUrl]"
|
:preview-src-list="[scope.row.backgroundUrl]"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
|
|||||||
367
src/views/nobleman/newGuildApplication.vue
Normal file
367
src/views/nobleman/newGuildApplication.vue
Normal file
@@ -0,0 +1,367 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<!-- 查询 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>分区</span>
|
||||||
|
<el-select v-model="inquire.partitionId" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.partitionArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>平台ID</span>
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.userId"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>状态</span>
|
||||||
|
<el-select v-model="inquire.status" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.statusArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<!-- 时间选择器 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<div class="block">
|
||||||
|
<span class="demonstration">日期</span>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="inquire.time"
|
||||||
|
type="datetimerange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 查询按钮 -->
|
||||||
|
<el-button class="primary" type="primary" @click="getData()"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
<el-button class="primary" type="primary" @click="addDialog = true"
|
||||||
|
>重置搜索</el-button
|
||||||
|
>
|
||||||
|
|
||||||
|
<!-- 表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="id" align="center" label="序号" />
|
||||||
|
<el-table-column prop="guildId" align="center" label="公会ID" />
|
||||||
|
<el-table-column prop="erbanNo" align="center" label="公会长ID" />
|
||||||
|
<el-table-column prop="nick" align="center" label="公会长昵称" />
|
||||||
|
<el-table-column align="center" prop="giftInfo" label="公会长头像">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.avatar"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="[scope.row.avatar]"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="guildName" align="center" label="公会昵称" />
|
||||||
|
<el-table-column align="center" prop="giftInfo" label="公会头像">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.guildAvatar"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="[scope.row.guildAvatar]"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="guildContact"
|
||||||
|
align="center"
|
||||||
|
label="公会联系方式"
|
||||||
|
/>
|
||||||
|
<el-table-column align="center" prop="idCard" label="公会长身份证件">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.idCard"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="[scope.row.idCard]"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="inviteErbanNo" align="center" label="邀请人ID" />
|
||||||
|
<el-table-column prop="inviteCheck" align="center" label="邀请人证明">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.inviteCheck"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="[scope.row.inviteCheck]"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="applyTime" align="center" label="申请时间" />
|
||||||
|
<el-table-column prop="auditStatus" align="center" label="状态">
|
||||||
|
<template v-slot="scope">
|
||||||
|
{{
|
||||||
|
scope.row.auditStatus == 0
|
||||||
|
? "未审核"
|
||||||
|
: scope.row.auditStatus == 1
|
||||||
|
? "已通过"
|
||||||
|
: "拒绝"
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="adminName" align="center" label="操作人" />
|
||||||
|
<el-table-column align="center" label="操作">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button
|
||||||
|
v-show="scope.row.auditStatus == 0"
|
||||||
|
@click="agree(scope.row.id)"
|
||||||
|
type="text"
|
||||||
|
size="default"
|
||||||
|
>同意</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
v-show="scope.row.auditStatus == 0"
|
||||||
|
@click="refuse(scope.row.id)"
|
||||||
|
type="text"
|
||||||
|
size="default"
|
||||||
|
>拒绝</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, 999999999]"
|
||||||
|
layout="sizes, prev, pager, next"
|
||||||
|
:total="total"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
/>
|
||||||
|
<!-- 二次确认删除弹窗 -->
|
||||||
|
<el-dialog v-model="delDialog" title="提示" width="30%" center>
|
||||||
|
<span> 确定要解散该公会吗?</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 {
|
||||||
|
listPartitionInfo,
|
||||||
|
guildApplyList,
|
||||||
|
guildApplyAudit,
|
||||||
|
} from "@/api/nobleman/nobleman";
|
||||||
|
// @ts-ignore
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
// @ts-ignore
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
export default {
|
||||||
|
name: "newGuildApplication",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
//查询所需条件对象
|
||||||
|
inquire: {
|
||||||
|
partitionId: "",
|
||||||
|
partitionArr: [],
|
||||||
|
userId: "",
|
||||||
|
status: -1,
|
||||||
|
statusArr: [
|
||||||
|
{ desc: "未审核", id: 0 },
|
||||||
|
{ desc: "全部", id: -1 },
|
||||||
|
{ desc: "通过", id: 1 },
|
||||||
|
{ desc: "已拒绝", id: 2 },
|
||||||
|
],
|
||||||
|
time: "",
|
||||||
|
},
|
||||||
|
// 表格
|
||||||
|
tableData: [],
|
||||||
|
// 新增弹窗
|
||||||
|
addDialog: false,
|
||||||
|
// 分页
|
||||||
|
total: 10, //总页数
|
||||||
|
currentPage: 1, //页码
|
||||||
|
pageSize: 10, //条数
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
listPartitionInfo().then((res) => {
|
||||||
|
console.log(res.data);
|
||||||
|
this.inquire.partitionArr = res.data;
|
||||||
|
this.inquire.partitionId = this.inquire.partitionArr[0].id;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
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");
|
||||||
|
}
|
||||||
|
guildApplyList({
|
||||||
|
partitionId: this.inquire.partitionId,
|
||||||
|
erbanNo: this.inquire.userId,
|
||||||
|
auditStatus: this.inquire.status,
|
||||||
|
startDate: startTime,
|
||||||
|
endDate: endTime,
|
||||||
|
pageNo: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.total = res.data.total;
|
||||||
|
this.tableData = res.data.rows;
|
||||||
|
this.loading = false;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
agree(id) {
|
||||||
|
guildApplyAudit({
|
||||||
|
auditStatus: 1,
|
||||||
|
id,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
refuse(id) {
|
||||||
|
guildApplyAudit({
|
||||||
|
auditStatus: 2,
|
||||||
|
id,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
beforeAvatarUpload() {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传中~",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarError() {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传失败!",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess2(res, file) {
|
||||||
|
this.ediObj.imageUrl2 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess(res, file) {
|
||||||
|
this.ediObj.imageUrl1 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 分页导航
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.selectBox {
|
||||||
|
display: flex;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.selectBoxImg {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,155 +1,163 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="content-header">
|
<div class="content-header">
|
||||||
<h1 id="itemTitle"></h1>
|
<h1 id="itemTitle"></h1>
|
||||||
</div>
|
|
||||||
<div class="content">
|
|
||||||
<div id="table"></div>
|
|
||||||
<div id="toolbar">
|
|
||||||
<label for="prettyNo" class="control-label">目标平台号:</label>
|
|
||||||
<input type="text" name="goodNum" id="targetPrettyNo">
|
|
||||||
<label for="prettyNo" class="control-label">原平台号:</label>
|
|
||||||
<input type="text" id="currentPrettyNo">
|
|
||||||
<label for="operator" class="control-label">操作类型:</label>
|
|
||||||
<select name="status" id="operator" class="input-m">
|
|
||||||
<option value="">全部</option>
|
|
||||||
<option value="1">绑定</option>
|
|
||||||
<option value="2">解绑</option>
|
|
||||||
</select>
|
|
||||||
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
<div class="content">
|
||||||
|
<div id="table"></div>
|
||||||
|
<div id="toolbar">
|
||||||
|
<label for="prettyNo"
|
||||||
|
class="control-label">目标平台号:</label>
|
||||||
|
<input type="text"
|
||||||
|
name="goodNum"
|
||||||
|
id="targetPrettyNo">
|
||||||
|
<label for="prettyNo"
|
||||||
|
class="control-label">原平台号:</label>
|
||||||
|
<input type="text"
|
||||||
|
id="currentPrettyNo">
|
||||||
|
<label for="operator"
|
||||||
|
class="control-label">操作类型:</label>
|
||||||
|
<select name="status"
|
||||||
|
id="operator"
|
||||||
|
class="input-m">
|
||||||
|
<option value="">全部</option>
|
||||||
|
<option value="1">绑定</option>
|
||||||
|
<option value="2">解绑</option>
|
||||||
|
</select>
|
||||||
|
<button id="btnSearch"
|
||||||
|
class="btn btn-sm btn-primary">查询</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PrettyNoRecordAdminView",
|
name: "PrettyNoRecordAdminView",
|
||||||
setup() {
|
setup () {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.initData();
|
this.initData();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData() {
|
initData () {
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#table').bootstrapTable('destroy');
|
$('#table').bootstrapTable('destroy');
|
||||||
$('#table').bootstrapTable({
|
$('#table').bootstrapTable({
|
||||||
columns: [
|
columns: [
|
||||||
{ field: 'id', title: 'ID', align: 'center', valign: 'middle', width: '5%' },
|
{ field: 'currentErbanNo', title: '原平台号', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'currentErbanNo', title: '原平台号', align: 'center', valign: 'middle', width: '10%' },
|
{
|
||||||
{
|
field: 'operator',
|
||||||
field: 'operator',
|
title: '操作',
|
||||||
title: '操作',
|
align: 'center',
|
||||||
align: 'center',
|
width: '10%',
|
||||||
width: '10%',
|
valign: 'middle',
|
||||||
valign: 'middle',
|
formatter: function (val, row, index) {
|
||||||
formatter: function (val, row, index) {
|
switch (val) {
|
||||||
switch (val) {
|
case 1:
|
||||||
case 1:
|
return '绑定';
|
||||||
return '绑定';
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
return '解绑';
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ field: 'targetErbanNo', title: '目标平台号', align: 'center', valign: 'middle', width: '10%' },
|
|
||||||
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle', width: '10%' },
|
|
||||||
{ field: 'prettyRecordDesc', title: '备注', align: 'center', valign: 'middle', width: '10%' },
|
|
||||||
{
|
|
||||||
field: 'startTime',
|
|
||||||
title: '开始时间(绑定时显示)',
|
|
||||||
align: 'center',
|
|
||||||
width: '10%',
|
|
||||||
valign: 'middle',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
if (val) {
|
|
||||||
var date = new Date(val);
|
|
||||||
return date.format("yyyy-MM-dd hh:mm:ss");
|
|
||||||
} else {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'endTime',
|
|
||||||
title: '结束时间(绑定时显示)',
|
|
||||||
align: 'center',
|
|
||||||
width: '10%',
|
|
||||||
valign: 'middle',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
if (val) {
|
|
||||||
var date = new Date(val);
|
|
||||||
return date.format("yyyy-MM-dd hh:mm:ss");
|
|
||||||
} else {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'createTime',
|
|
||||||
title: '创建时间',
|
|
||||||
align: 'center',
|
|
||||||
width: '10%',
|
|
||||||
valign: 'middle',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
if (val) {
|
|
||||||
var date = new Date(val);
|
|
||||||
return date.format("yyyy-MM-dd hh:mm:ss");
|
|
||||||
} else {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ field: 'createdBy', title: '操作者', align: 'center', width: '10%', valign: 'middle' }
|
|
||||||
|
|
||||||
],
|
case 2:
|
||||||
cache: false,
|
return '解绑';
|
||||||
striped: true,
|
|
||||||
showRefresh: false,
|
|
||||||
pageSize: 10,
|
|
||||||
pagination: true,
|
|
||||||
pageList: [10, 20, 30, 50],
|
|
||||||
sidePagination: "server", //表示服务端请求
|
|
||||||
queryParamsType: "undefined",
|
|
||||||
queryParams: function queryParams(params) { //设置查询参数
|
|
||||||
var param = {
|
|
||||||
pageSize: params.pageSize,
|
|
||||||
pageNumber: params.pageNumber,
|
|
||||||
targetPrettyNo: $('#targetPrettyNo').val(),
|
|
||||||
currentPrettyNo: $('#currentPrettyNo').val(),
|
|
||||||
operator: $('#operator').val()
|
|
||||||
};
|
|
||||||
return param;
|
|
||||||
},
|
|
||||||
uniqueId: 'id',
|
|
||||||
toolbar: '#toolbar',
|
|
||||||
url: '/admin/pretty/record/getList',
|
|
||||||
onLoadSuccess: function () { //加载成功时执行
|
|
||||||
console.log("load success");
|
|
||||||
},
|
|
||||||
onLoadError: function () { //加载失败时执行
|
|
||||||
console.log("load fail");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
$('#btnSearch').on('click', function () {
|
}
|
||||||
TableHelper.doRefresh('#table');
|
}
|
||||||
})
|
},
|
||||||
})
|
{ field: 'targetErbanNo', title: '目标平台号', align: 'center', valign: 'middle', width: '10%' },
|
||||||
}
|
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle', width: '10%' },
|
||||||
},
|
{ field: 'prettyRecordDesc', title: '备注', align: 'center', valign: 'middle', width: '10%' },
|
||||||
|
{
|
||||||
|
field: 'startTime',
|
||||||
|
title: '开始时间(绑定时显示)',
|
||||||
|
align: 'center',
|
||||||
|
width: '10%',
|
||||||
|
valign: 'middle',
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
if (val) {
|
||||||
|
var date = new Date(val);
|
||||||
|
return date.format("yyyy-MM-dd hh:mm:ss");
|
||||||
|
} else {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'endTime',
|
||||||
|
title: '结束时间(绑定时显示)',
|
||||||
|
align: 'center',
|
||||||
|
width: '10%',
|
||||||
|
valign: 'middle',
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
if (val) {
|
||||||
|
var date = new Date(val);
|
||||||
|
return date.format("yyyy-MM-dd hh:mm:ss");
|
||||||
|
} else {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'createTime',
|
||||||
|
title: '创建时间',
|
||||||
|
align: 'center',
|
||||||
|
width: '10%',
|
||||||
|
valign: 'middle',
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
if (val) {
|
||||||
|
var date = new Date(val);
|
||||||
|
return date.format("yyyy-MM-dd hh:mm:ss");
|
||||||
|
} else {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ field: 'createdBy', title: '操作者', align: 'center', width: '10%', valign: 'middle' }
|
||||||
|
|
||||||
|
],
|
||||||
|
cache: false,
|
||||||
|
striped: true,
|
||||||
|
showRefresh: false,
|
||||||
|
pageSize: 10,
|
||||||
|
pagination: true,
|
||||||
|
pageList: [10, 20, 30, 50],
|
||||||
|
sidePagination: "server", //表示服务端请求
|
||||||
|
queryParamsType: "undefined",
|
||||||
|
queryParams: function queryParams (params) { //设置查询参数
|
||||||
|
var param = {
|
||||||
|
pageSize: params.pageSize,
|
||||||
|
pageNumber: params.pageNumber,
|
||||||
|
targetPrettyNo: $('#targetPrettyNo').val(),
|
||||||
|
currentPrettyNo: $('#currentPrettyNo').val(),
|
||||||
|
operator: $('#operator').val()
|
||||||
|
};
|
||||||
|
return param;
|
||||||
|
},
|
||||||
|
uniqueId: 'id',
|
||||||
|
toolbar: '#toolbar',
|
||||||
|
url: '/admin/prettyNumber/record/getList',
|
||||||
|
onLoadSuccess: function () { //加载成功时执行
|
||||||
|
console.log("load success");
|
||||||
|
},
|
||||||
|
onLoadError: function () { //加载失败时执行
|
||||||
|
console.log("load fail");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$('#btnSearch').on('click', function () {
|
||||||
|
TableHelper.doRefresh('#table');
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
166
src/views/privilege/personalHomepageGiftRecordManagement.vue
Normal file
166
src/views/privilege/personalHomepageGiftRecordManagement.vue
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<!-- 查询 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>平台ID</span>
|
||||||
|
<el-input v-model="inquire.id" placeholder="" class="input"></el-input>
|
||||||
|
</div>
|
||||||
|
<!-- 查询按钮 -->
|
||||||
|
<el-button class="primary" type="primary" @click="getData()"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
<!-- 表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="backgroundId" align="center" label="个人主页id" />
|
||||||
|
<el-table-column
|
||||||
|
prop="backgroundName"
|
||||||
|
align="center"
|
||||||
|
label="个人主页名称"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="uid" align="center" label="用户uID" />
|
||||||
|
<el-table-column prop="nick" align="center" label="用户昵称" />
|
||||||
|
<el-table-column prop="days" align="center" label="赠送天数" />
|
||||||
|
<el-table-column prop="remake" align="center" label="备注" />
|
||||||
|
<el-table-column prop="createTime" align="center" label="操作时间" />
|
||||||
|
<el-table-column prop="optUser" align="center" label="操作人" />
|
||||||
|
<el-table-column align="center" label="操作" width="300">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.status=1"
|
||||||
|
@click="personalBackground(scope.row)"
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
size="default"
|
||||||
|
>撤回</el-button
|
||||||
|
>
|
||||||
|
<div v-else>已撤回</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"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
pesonalBackgroundListRecordByPage,
|
||||||
|
pesonalBackgroundListRecordRecoveryPersonalBackground,
|
||||||
|
} from "@/api/personalHomepageResourceManagement/personalHomepageResourceManagement";
|
||||||
|
// @ts-ignore
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
// @ts-ignore
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
export default {
|
||||||
|
name: "personalHomepageRecordManagementSend",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
//查询所需条件对象
|
||||||
|
inquire: {
|
||||||
|
id: "",
|
||||||
|
},
|
||||||
|
// 表格
|
||||||
|
tableData: [],
|
||||||
|
// 分页
|
||||||
|
total: 10, //总页数
|
||||||
|
currentPage: 1, //页码
|
||||||
|
pageSize: 10, //条数
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 查询接口
|
||||||
|
getData() {
|
||||||
|
this.loading = true;
|
||||||
|
pesonalBackgroundListRecordByPage({
|
||||||
|
erbanNo: this.inquire.id,
|
||||||
|
page: this.currentPage,
|
||||||
|
comeFrom: 2,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.loading = false;
|
||||||
|
this.total = res.data.total;
|
||||||
|
this.tableData = res.data.rows;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
personalBackground(val) {
|
||||||
|
pesonalBackgroundListRecordRecoveryPersonalBackground({
|
||||||
|
recordId: val.recordId,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 分页导航
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.operation {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
width: 55%;
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
130
src/views/privilege/personalHomepageRecordManagement.vue
Normal file
130
src/views/privilege/personalHomepageRecordManagement.vue
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<!-- 查询 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>平台ID</span>
|
||||||
|
<el-input v-model="inquire.id" placeholder="" class="input"></el-input>
|
||||||
|
</div>
|
||||||
|
<!-- 查询按钮 -->
|
||||||
|
<el-button class="primary" type="primary" @click="getData()"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
<!-- 表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="backgroundId" align="center" label="个人主页id" />
|
||||||
|
<el-table-column prop="backgroundName" align="center" label="个人主页名称" />
|
||||||
|
<el-table-column prop="uid" align="center" label="用户uID" />
|
||||||
|
<el-table-column prop="nick" align="center" label="用户昵称" />
|
||||||
|
<el-table-column prop="status" align="center" label="个人主页状态" />
|
||||||
|
<el-table-column prop="createTime" align="center" label="购买天数" />
|
||||||
|
<el-table-column prop="days" align="center" label="有效时间" />
|
||||||
|
<el-table-column prop="expireTime" align="center" label="过期时间" />
|
||||||
|
</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 { pesonalBackgroundListRecordByPage } from "@/api/personalHomepageResourceManagement/personalHomepageResourceManagement";
|
||||||
|
// @ts-ignore
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
// @ts-ignore
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
export default {
|
||||||
|
name: "personalHomepageRecordManagement",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
//查询所需条件对象
|
||||||
|
inquire: {
|
||||||
|
id: "",
|
||||||
|
},
|
||||||
|
// 表格
|
||||||
|
tableData: [],
|
||||||
|
// 分页
|
||||||
|
total: 10, //总页数
|
||||||
|
currentPage: 1, //页码
|
||||||
|
pageSize: 10, //条数
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 查询接口
|
||||||
|
getData() {
|
||||||
|
this.loading = true;
|
||||||
|
pesonalBackgroundListRecordByPage({
|
||||||
|
erbanNo: this.inquire.id,
|
||||||
|
page: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.loading = false;
|
||||||
|
this.total = res.data.total;
|
||||||
|
this.tableData = res.data.rows;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 分页导航
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.operation {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
width: 55%;
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
802
src/views/privilege/personalHomepageResourceManagement.vue
Normal file
802
src/views/privilege/personalHomepageResourceManagement.vue
Normal file
@@ -0,0 +1,802 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<!-- 查询 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>地区</span>
|
||||||
|
<el-select v-model="inquire.partitionId" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.partitionArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>名称</span>
|
||||||
|
<el-input v-model="inquire.name" placeholder="" class="input"></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>状态</span>
|
||||||
|
<el-select v-model="inquire.status" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<!-- 查询按钮 -->
|
||||||
|
<el-button class="primary" type="primary" @click="getData()"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
<!-- 新增按钮 -->
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
operationValue.partitionVal = [];
|
||||||
|
operationValue.nameZh = '';
|
||||||
|
operationValue.nameEn = '';
|
||||||
|
operationValue.nameAr = '';
|
||||||
|
operationValue.nameTr = '';
|
||||||
|
operationValue.price = '';
|
||||||
|
operationValue.day = '';
|
||||||
|
operationValue.imageUrl = '';
|
||||||
|
operationValue.status = '';
|
||||||
|
operationType = 1;
|
||||||
|
filePreview: null; // 文件预览 URL
|
||||||
|
isImage = false;
|
||||||
|
isVideo = false;
|
||||||
|
isSVGA = false;
|
||||||
|
operationDialogTitle = '新增';
|
||||||
|
operationDialog = true;
|
||||||
|
"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
<!-- 表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="id" align="center" label="id" />
|
||||||
|
<el-table-column prop="partitionFlag" align="center" label="地区">
|
||||||
|
<template v-slot="scope">
|
||||||
|
{{ partitionDesc(scope.row.partitionFlag) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="" align="center" label="中文名称">
|
||||||
|
<template v-slot="scope">
|
||||||
|
{{ jsonFun(scope.row.name).zh }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="" align="center" label="阿语名称">
|
||||||
|
<template v-slot="scope">
|
||||||
|
{{ jsonFun(scope.row.name).ar }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="" align="center" label="英语名称"
|
||||||
|
><template v-slot="scope">
|
||||||
|
{{ jsonFun(scope.row.name).en }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="" align="center" label="土耳其名称"
|
||||||
|
><template v-slot="scope">
|
||||||
|
{{ jsonFun(scope.row.name).tr }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="" align="center" label="图片">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
:src="scope.row.pic"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="[scope.row.pic]"
|
||||||
|
fit="contain"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="" align="center" label="装扮动效图片类型">
|
||||||
|
<template v-slot="scope">
|
||||||
|
{{
|
||||||
|
scope.row.effectType == 0
|
||||||
|
? "无"
|
||||||
|
: scope.row.effectType == 1
|
||||||
|
? "MP4"
|
||||||
|
: "SVGA"
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
prop=""
|
||||||
|
width="300"
|
||||||
|
max-height="100"
|
||||||
|
align="center"
|
||||||
|
label="装扮动效图片"
|
||||||
|
>
|
||||||
|
<template v-slot="scope">
|
||||||
|
<div v-if="scope.row.effectType == 0">无</div>
|
||||||
|
<!-- 视频预览 -->
|
||||||
|
<video
|
||||||
|
v-if="scope.row.effectType == 1"
|
||||||
|
:src="scope.row.effect"
|
||||||
|
controls
|
||||||
|
style="width: 300px; max-height: 300px; display: block"
|
||||||
|
></video>
|
||||||
|
<!-- SVGA 预览 -->
|
||||||
|
<div
|
||||||
|
v-if="scope.row.effectType == 2"
|
||||||
|
:id="`svga-player${scope.row.id}`"
|
||||||
|
style="width: 300px; max-height: 300px; display: block"
|
||||||
|
>
|
||||||
|
{{
|
||||||
|
scope.row.effect && scope.row.id
|
||||||
|
? initSVGAList(scope.row.effect, scope.row.id)
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
<!-- <img style="width: 100px; height: 100px; display: block" src="/Uploads/article/original_img/1487053722.jpg" alt="">
|
||||||
|
<el-image src=""></el-image> -->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column prop="" align="center" label="状态">
|
||||||
|
<template v-slot="scope">
|
||||||
|
{{ scope.row.status == 1 ? "有效" : "无效" }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="" align="center" label="贵族限定">
|
||||||
|
<template v-slot="scope">
|
||||||
|
{{ scope.row.type == 1 ? "普通" : "贵族" }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="updateTime" align="center" label="操作时间" />
|
||||||
|
<el-table-column align="center" label="操作" width="300">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
operationValue.partitionVal = partitionIdArr(
|
||||||
|
scope.row.partitionFlag
|
||||||
|
);
|
||||||
|
operationValue.nameZh = jsonFun(scope.row.name).zh;
|
||||||
|
operationValue.nameEn = jsonFun(scope.row.name).en;
|
||||||
|
operationValue.nameAr = jsonFun(scope.row.name).ar;
|
||||||
|
operationValue.nameTr = jsonFun(scope.row.name).tr;
|
||||||
|
operationValue.imageUrl = scope.row.pic;
|
||||||
|
operationValue.status = scope.row.status;
|
||||||
|
operationType = 2;
|
||||||
|
operationValueId = scope.row.id;
|
||||||
|
operationDialogTitle = '编辑';
|
||||||
|
filePreview: scope.row.effect; // 文件预览 URL
|
||||||
|
scope.row.effectType == 1
|
||||||
|
? (isVideo = true)
|
||||||
|
: scope.row.effectType == 2
|
||||||
|
? (isSVGA = true)
|
||||||
|
: (isImage = true);
|
||||||
|
operationValue.effectType = scope.row.effectType;
|
||||||
|
initSVGA(scope.row.effect);
|
||||||
|
operationDialog = true;
|
||||||
|
"
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
size="default"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
sendDialog = true;
|
||||||
|
sendObj.erbanNos = send.days = send.remark = null;
|
||||||
|
sendObj.personalBackgroundId = scope.row.id;
|
||||||
|
"
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
size="default"
|
||||||
|
>赠送</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!-- 新增&编辑弹窗 -->
|
||||||
|
<el-dialog
|
||||||
|
v-model="operationDialog"
|
||||||
|
:title="operationDialogTitle"
|
||||||
|
width="28%"
|
||||||
|
center
|
||||||
|
>
|
||||||
|
<!-- <div class="operation">
|
||||||
|
<span style="margin-right: 20px">地区</span>
|
||||||
|
<el-select v-model="operationValue.partitionId" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in operationValue.partitionArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div> -->
|
||||||
|
<div class="operation">
|
||||||
|
<span style="margin-right: 20px">地区</span>
|
||||||
|
<el-checkbox-group
|
||||||
|
v-model="operationValue.partitionVal"
|
||||||
|
v-for="(val, i) in inquire.partitionArr"
|
||||||
|
:key="i"
|
||||||
|
>
|
||||||
|
<el-checkbox style="margin-right: 10px" :label="val.id">{{
|
||||||
|
val.desc
|
||||||
|
}}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div>
|
||||||
|
<div class="operation">
|
||||||
|
<span style="margin-right: 20px">华语名称</span>
|
||||||
|
<el-input
|
||||||
|
v-model="operationValue.nameZh"
|
||||||
|
style="width: 200px"
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="operation">
|
||||||
|
<span style="margin-right: 20px">英语名称</span>
|
||||||
|
<el-input
|
||||||
|
v-model="operationValue.nameEn"
|
||||||
|
style="width: 200px"
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="operation">
|
||||||
|
<span style="margin-right: 20px">阿拉伯名称</span>
|
||||||
|
<el-input
|
||||||
|
v-model="operationValue.nameAr"
|
||||||
|
style="width: 200px"
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="operation">
|
||||||
|
<span style="margin-right: 20px">土耳其名称</span>
|
||||||
|
<el-input
|
||||||
|
v-model="operationValue.nameTr"
|
||||||
|
style="width: 200px"
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="operation">
|
||||||
|
<span style="margin-right: 20px">价格</span>
|
||||||
|
<el-input
|
||||||
|
v-model="operationValue.price"
|
||||||
|
style="width: 200px"
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="operation">
|
||||||
|
<span style="margin-right: 20px">有效天数</span>
|
||||||
|
<el-input
|
||||||
|
v-model="operationValue.day"
|
||||||
|
style="width: 200px"
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div> -->
|
||||||
|
<div class="operation">
|
||||||
|
<span class="left" style="margin-right: 20px">图片</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="operationValue.imageUrl"
|
||||||
|
:src="operationValue.imageUrl"
|
||||||
|
class="avatar"
|
||||||
|
/>
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
|
<div class="operation">
|
||||||
|
<span style="margin-right: 20px">装扮动效图片类型</span>
|
||||||
|
<el-select v-model="operationValue.effectType" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in operationValue.effectTypeArr"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div class="operation">
|
||||||
|
<span class="left" style="margin-right: 20px">装扮动效图片</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
accept="image/*,.mp4,.svga"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess1"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<!-- 文件预览 -->
|
||||||
|
<div style="margin-top: 20px">
|
||||||
|
<!-- 图片预览 -->
|
||||||
|
<img
|
||||||
|
v-if="isImage"
|
||||||
|
:src="filePreview"
|
||||||
|
alt="Uploaded Image"
|
||||||
|
style="max-width: 300px"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 视频预览 -->
|
||||||
|
<video
|
||||||
|
v-else-if="isVideo"
|
||||||
|
:src="filePreview"
|
||||||
|
controls
|
||||||
|
style="max-width: 300px"
|
||||||
|
></video>
|
||||||
|
|
||||||
|
<!-- SVGA 预览 -->
|
||||||
|
<div
|
||||||
|
v-else-if="isSVGA"
|
||||||
|
:id="`svga-player`"
|
||||||
|
style="width: 200px; height: 200px"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
|
<div class="operation">
|
||||||
|
<span style="margin-right: 20px">状态</span>
|
||||||
|
<el-select v-model="operationValue.status" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in operationValue.options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
operationDialog = false;
|
||||||
|
isImage = false;
|
||||||
|
isVideo = false;
|
||||||
|
isSVGA = false;
|
||||||
|
"
|
||||||
|
>取消</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="operation(type == 1 ? null : operationValueId)"
|
||||||
|
>
|
||||||
|
确认
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<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="sendDialog" title="赠送" width="28%" center>
|
||||||
|
<div class="operation">
|
||||||
|
<span style="margin-right: 20px">用户平台ID</span>
|
||||||
|
<el-input
|
||||||
|
v-model="sendObj.erbanNos"
|
||||||
|
style="width: 200px"
|
||||||
|
class="input"
|
||||||
|
placeholder="多个请用英文“,”隔开"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="operation">
|
||||||
|
<span style="margin-right: 20px">天数</span>
|
||||||
|
<el-input
|
||||||
|
v-model="sendObj.days"
|
||||||
|
style="width: 200px"
|
||||||
|
class="input"
|
||||||
|
placeholder=""
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="operation">
|
||||||
|
<span style="margin-right: 20px">备注</span>
|
||||||
|
<el-input
|
||||||
|
v-model="sendObj.remark"
|
||||||
|
style="width: 200px"
|
||||||
|
class="input"
|
||||||
|
placeholder=""
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="sendDialog = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="send()"> 确认 </el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listPartitionInfo,
|
||||||
|
pesonalBackgroundListByPage,
|
||||||
|
pesonalBackgroundSaveOrUpdate,
|
||||||
|
pesonalBackgroundListSend,
|
||||||
|
} from "@/api/personalHomepageResourceManagement/personalHomepageResourceManagement";
|
||||||
|
// @ts-ignore
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
import { partitionDesc, partitionIdArr } from "@/utils/partitionDesc.js";
|
||||||
|
import { ref, reactive, onMounted, onUnmounted, nextTick } from "vue";
|
||||||
|
// @ts-ignore
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import SVGA from "svgaplayerweb";
|
||||||
|
export default {
|
||||||
|
name: "personalHomepageResourceManagement",
|
||||||
|
setup() {
|
||||||
|
// 响应式数据
|
||||||
|
const file = ref(null);
|
||||||
|
const filePreview = ref(null);
|
||||||
|
const isImage = ref(false);
|
||||||
|
const isVideo = ref(false);
|
||||||
|
const isSVGA = ref(false);
|
||||||
|
const loading = ref(false);
|
||||||
|
|
||||||
|
const inquire = reactive({
|
||||||
|
partitionId: "",
|
||||||
|
partitionArr: [],
|
||||||
|
name: "",
|
||||||
|
status: "",
|
||||||
|
options: [
|
||||||
|
{ label: "有效", value: 1 },
|
||||||
|
{ label: "无效", value: 2 },
|
||||||
|
{ label: "全部", value: 3 },
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
const operationDialog = ref(false);
|
||||||
|
const operationType = ref(null);
|
||||||
|
const operationDialogTitle = ref("新增%编辑");
|
||||||
|
const operationValueId = ref(null);
|
||||||
|
|
||||||
|
const operationValue = reactive({
|
||||||
|
partitionVal: [],
|
||||||
|
nameZh: "",
|
||||||
|
nameEn: "",
|
||||||
|
nameAr: "",
|
||||||
|
nameTr: "",
|
||||||
|
price: "",
|
||||||
|
day: "",
|
||||||
|
imageUrl: "",
|
||||||
|
status: "",
|
||||||
|
options: [
|
||||||
|
{ label: "有效", value: 1 },
|
||||||
|
{ label: "无效", value: 2 },
|
||||||
|
],
|
||||||
|
effectType: "",
|
||||||
|
effectTypeArr: [
|
||||||
|
{ label: "无", value: 0 },
|
||||||
|
{ label: "MP4", value: 1 },
|
||||||
|
{ label: "SVGA", value: 2 },
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
const sendDialog = ref(false);
|
||||||
|
const sendObj = reactive({
|
||||||
|
erbanNos: null,
|
||||||
|
days: null,
|
||||||
|
personalBackgroundId: null,
|
||||||
|
remark: null,
|
||||||
|
});
|
||||||
|
|
||||||
|
const tableData = ref([]);
|
||||||
|
const total = ref(0); // 总页数
|
||||||
|
const currentPage = ref(1); // 页码
|
||||||
|
const pageSize = ref(10); // 条数
|
||||||
|
|
||||||
|
// 生命周期钩子
|
||||||
|
onMounted(() => {
|
||||||
|
console.log("组件已挂载");
|
||||||
|
listPartitionInfo().then((res) => {
|
||||||
|
inquire.partitionArr = operationValue.partitionArr = res.data;
|
||||||
|
inquire.partitionId = inquire.partitionArr[0].id;
|
||||||
|
getData();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
console.log("组件已卸载");
|
||||||
|
});
|
||||||
|
|
||||||
|
// 查询接口
|
||||||
|
const getData = () => {
|
||||||
|
loading.value = true;
|
||||||
|
pesonalBackgroundListByPage({
|
||||||
|
partitionId: inquire.partitionId,
|
||||||
|
name: inquire.name,
|
||||||
|
status: inquire.status,
|
||||||
|
page: currentPage.value,
|
||||||
|
pageSize: pageSize.value,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
loading.value = false;
|
||||||
|
total.value = res.data.total;
|
||||||
|
tableData.value = res.data.list;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const operation = (id) => {
|
||||||
|
const obj = {
|
||||||
|
partitionFlag: operationValue.partitionVal.reduce(
|
||||||
|
(accumulator, currentValue) => accumulator + currentValue,
|
||||||
|
0
|
||||||
|
),
|
||||||
|
name: JSON.stringify({
|
||||||
|
ar: operationValue.nameAr,
|
||||||
|
zh: operationValue.nameZh,
|
||||||
|
en: operationValue.nameEn,
|
||||||
|
tr: operationValue.nameTr,
|
||||||
|
}),
|
||||||
|
pic: operationValue.imageUrl,
|
||||||
|
effectType: operationValue.effectType,
|
||||||
|
effect: filePreview.value,
|
||||||
|
status: operationValue.status,
|
||||||
|
type: 1, // 资料卡类型 1:普通 2:贵族
|
||||||
|
id,
|
||||||
|
};
|
||||||
|
console.log(obj);
|
||||||
|
pesonalBackgroundSaveOrUpdate(obj).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
operationDialog.value = false;
|
||||||
|
getData();
|
||||||
|
isImage.value = false;
|
||||||
|
isVideo.value = false;
|
||||||
|
isSVGA.value = false;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const send = () => {
|
||||||
|
pesonalBackgroundListSend(sendObj).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
sendDialog.value = false;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "赠送成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const beforeAvatarUpload = () => {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传中可能较慢,请等待上传成功后在进行下一步~",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleAvatarError = () => {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传失败!",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleAvatarSuccess = (res, file) => {
|
||||||
|
console.log(file);
|
||||||
|
operationValue.imageUrl = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleAvatarSuccess1 = (res, files) => {
|
||||||
|
console.log(files.raw);
|
||||||
|
const selectedFile = files.raw;
|
||||||
|
if (!selectedFile) return;
|
||||||
|
// 清除旧的预览数据
|
||||||
|
// resetFile();
|
||||||
|
const fileType = selectedFile.type;
|
||||||
|
const fileName = selectedFile.name;
|
||||||
|
// 创建预览 URL
|
||||||
|
filePreview.value = res.data;
|
||||||
|
file.value = selectedFile;
|
||||||
|
// 根据文件类型判断
|
||||||
|
if (fileType.startsWith("image/")) {
|
||||||
|
isImage.value = true;
|
||||||
|
} else if (fileType === "video/mp4") {
|
||||||
|
isVideo.value = true;
|
||||||
|
} else if (fileName.endsWith(".svga")) {
|
||||||
|
isSVGA.value = true;
|
||||||
|
initSVGA(res.data);
|
||||||
|
}
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// const resetFile = () => {
|
||||||
|
// nextTick(() => {
|
||||||
|
// file.value = null;
|
||||||
|
// filePreview.value = null;
|
||||||
|
// isImage.value = false;
|
||||||
|
// isVideo.value = false;
|
||||||
|
// isSVGA.value = false;
|
||||||
|
// // 清除 SVGA 容器内容
|
||||||
|
// const svgaPlayer = document.getElementById("svga-player");
|
||||||
|
// if (svgaPlayer) {
|
||||||
|
// svgaPlayer.innerHTML = "";
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// };
|
||||||
|
|
||||||
|
const initSVGA = (url) => {
|
||||||
|
nextTick(() => {
|
||||||
|
setTimeout(function () {
|
||||||
|
const container = document.getElementById("svga-player");
|
||||||
|
if (container) {
|
||||||
|
const player = new SVGA.Player(container);
|
||||||
|
const parser = new SVGA.Parser();
|
||||||
|
parser.load(
|
||||||
|
url,
|
||||||
|
(videoItem) => {
|
||||||
|
player.setVideoItem(videoItem);
|
||||||
|
player.startAnimation();
|
||||||
|
},
|
||||||
|
(error) => {
|
||||||
|
console.log("SVGA失败", error);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}, 10);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const initializedIds = new Set();
|
||||||
|
const initSVGAList = (url, id) => {
|
||||||
|
if (initializedIds.has(id)) return; // 避免重复初始化
|
||||||
|
console.log('SVGASVGASVGASVGASVGASVGA',url,id);
|
||||||
|
nextTick(() => {
|
||||||
|
const container = document.getElementById("svga-player" + id);
|
||||||
|
if (!container) {
|
||||||
|
console.error(`SVGA container for ID ${id} not found`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const player = new SVGA.Player(container);
|
||||||
|
const parser = new SVGA.Parser();
|
||||||
|
parser.load(url, (videoItem) => {
|
||||||
|
player.setVideoItem(videoItem);
|
||||||
|
player.startAnimation();
|
||||||
|
});
|
||||||
|
initializedIds.add(id); // 标记已初始化
|
||||||
|
} catch (error) {
|
||||||
|
console.error("SVGA initialization failed:", error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const jsonFun = (val) => JSON.parse(val);
|
||||||
|
|
||||||
|
// 分页导航
|
||||||
|
const handleSizeChange = () => {
|
||||||
|
getData();
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleCurrentChange = () => {
|
||||||
|
getData();
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
partitionDesc,
|
||||||
|
partitionIdArr,
|
||||||
|
file,
|
||||||
|
filePreview,
|
||||||
|
isImage,
|
||||||
|
isVideo,
|
||||||
|
isSVGA,
|
||||||
|
loading,
|
||||||
|
inquire,
|
||||||
|
operationDialog,
|
||||||
|
operationType,
|
||||||
|
operationDialogTitle,
|
||||||
|
operationValueId,
|
||||||
|
operationValue,
|
||||||
|
sendDialog,
|
||||||
|
sendObj,
|
||||||
|
tableData,
|
||||||
|
total,
|
||||||
|
currentPage,
|
||||||
|
pageSize,
|
||||||
|
getData,
|
||||||
|
operation,
|
||||||
|
send,
|
||||||
|
beforeAvatarUpload,
|
||||||
|
handleAvatarError,
|
||||||
|
handleAvatarSuccess,
|
||||||
|
handleAvatarSuccess1,
|
||||||
|
// resetFile,
|
||||||
|
initSVGA,
|
||||||
|
initSVGAList,
|
||||||
|
jsonFun,
|
||||||
|
handleSizeChange,
|
||||||
|
handleCurrentChange,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.operation {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
width: 55%;
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.avatar {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,84 +1,128 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1 id="itemTitle"></h1>
|
<h1 id="itemTitle"></h1>
|
||||||
</section>
|
</section>
|
||||||
<!-- .content -->
|
<!-- .content -->
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div id="table"></div>
|
<div id="table"></div>
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<form action="" id="searchForm" method="POST">
|
<form action=""
|
||||||
<select name="search-type" id="search-type">
|
id="searchForm"
|
||||||
<option value="0">请选择</option>
|
method="POST">
|
||||||
<option value="1">幸运许愿池偏差类型</option>
|
<select name="search-type"
|
||||||
<option value="4">梦幻许愿池池偏差类型</option>
|
id="search-type">
|
||||||
</select>
|
<option value="1">幸运许愿池偏差类型</option>
|
||||||
</form>
|
<option value="4">梦幻许愿池池偏差类型</option>
|
||||||
<button class="btn btn-primary" id="searchBtn">搜索</button>
|
</select>
|
||||||
<button id="add" class="btn btn-default">
|
<select id="partitionId"></select>
|
||||||
<i class="glyphicon glyphicon-plus"></i>新增
|
</form>
|
||||||
</button>
|
<button class="btn btn-primary"
|
||||||
</div>
|
id="searchBtn">搜索</button>
|
||||||
</section>
|
<button id="add"
|
||||||
</div>
|
class="btn btn-default">
|
||||||
</div>
|
<i class="glyphicon glyphicon-plus"></i>新增
|
||||||
</section>
|
</button>
|
||||||
<div class="modal fade" id="deviateRangeModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
</div>
|
||||||
<div class="modal-dialog" role="document">
|
</section>
|
||||||
<div class="modal-content">
|
</div>
|
||||||
<div class="modal-header">
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
|
|
||||||
aria-hidden="true">×</span></button>
|
|
||||||
<h4 class="modal-title" id="modalLabel">偏差范围</h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<form class="form-horizontal" id="deviateRangeForm">
|
|
||||||
<input id="deviateRangeId" type="hidden" name="id" />
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">下限:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input type="number" id="deviateLowerLimit" name="lowerLimit" class=" validate[required]"
|
|
||||||
placeholder="单行输入">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">上限:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input type="number" id="deviateUpperLimit" name="upperLimit" class=" validate[required]"
|
|
||||||
placeholder="单行输入">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group type">
|
|
||||||
<label for="type" class="col-sm-3 control-label">选择类型:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<select name="type" id="type" data-btn-class="btn btn-warning">
|
|
||||||
<option value="1">幸运许愿池偏差类型</option>
|
|
||||||
<option value="4">梦幻许愿池池偏差类型</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">创建者:</label>
|
|
||||||
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input type="text" id="creator" name="creator" class="validate[required]" placeholder="必填项">
|
|
||||||
</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>
|
</div>
|
||||||
|
</section>
|
||||||
|
<div class="modal fade"
|
||||||
|
id="deviateRangeModal"
|
||||||
|
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">×</span></button>
|
||||||
|
<h4 class="modal-title"
|
||||||
|
id="modalLabel">偏差范围</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form class="form-horizontal"
|
||||||
|
id="deviateRangeForm">
|
||||||
|
<input id="deviateRangeId"
|
||||||
|
type="hidden"
|
||||||
|
name="id" />
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">下限:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="number"
|
||||||
|
id="deviateLowerLimit"
|
||||||
|
name="lowerLimit"
|
||||||
|
class=" validate[required]"
|
||||||
|
placeholder="单行输入">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">上限:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="number"
|
||||||
|
id="deviateUpperLimit"
|
||||||
|
name="upperLimit"
|
||||||
|
class=" validate[required]"
|
||||||
|
placeholder="单行输入">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group type">
|
||||||
|
<label for="type"
|
||||||
|
class="col-sm-3 control-label">选择类型:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="type"
|
||||||
|
id="type"
|
||||||
|
data-btn-class="btn btn-warning">
|
||||||
|
<option value="1">幸运许愿池偏差类型</option>
|
||||||
|
<option value="4">梦幻许愿池池偏差类型</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group deviatePartitionId">
|
||||||
|
<label for="type"
|
||||||
|
class="col-sm-3 control-label">选择分区:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="partitionId"
|
||||||
|
id="deviatePartitionId"
|
||||||
|
data-btn-class="btn btn-warning">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">创建者:</label>
|
||||||
|
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text"
|
||||||
|
id="creator"
|
||||||
|
name="creator"
|
||||||
|
class="validate[required]"
|
||||||
|
placeholder="必填项">
|
||||||
|
</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>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -86,160 +130,190 @@ import TableHelper from '@/utils/bootstrap-table-helper';
|
|||||||
import ComboboxHelper from '@/assets/plugins/bootstrap-combobox/js/bootstrap-combobox-helper';
|
import ComboboxHelper from '@/assets/plugins/bootstrap-combobox/js/bootstrap-combobox-helper';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "DeviateRangeManageAdminView",
|
name: "DeviateRangeManageAdminView",
|
||||||
setup() {
|
setup () {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.initData();
|
this.initData();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData() {
|
initData () {
|
||||||
$(function () {
|
$.ajax({
|
||||||
$('#table').bootstrapTable('destroy');
|
type: 'get',
|
||||||
$('#table').bootstrapTable({
|
url: '/partition/listPartitionInfo',
|
||||||
columns: [
|
dataType: 'json',
|
||||||
{ field: 'id', title: 'id', align: 'center', width: '15%' },
|
success: function (json) {
|
||||||
{ field: 'lowerLimit', title: '下限', align: 'center', width: '15%' },
|
if (json.code == 200) {
|
||||||
{ field: 'upperLimit', title: '上限', width: '20%' },
|
var deviatePartitionId = $("#deviatePartitionId");
|
||||||
{ field: 'creator', title: '创建人', align: 'center', width: '5%' },
|
deviatePartitionId.empty();
|
||||||
{
|
|
||||||
field: 'tmp', title: '操作', align: 'center', width: '20%', formatter: function (val, row, index) {
|
|
||||||
var key = row.id;
|
|
||||||
return "<button class='btn btn-sm btn-success opt-edit' data-id=" + key + ">编辑</button> " +
|
|
||||||
"<button class='btn btn-sm btn-danger opt-del' data-id=" + key + ">删除</button>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
cache: false,
|
|
||||||
striped: true,
|
|
||||||
showRefresh: true,
|
|
||||||
pageSize: 10,
|
|
||||||
pagination: true,
|
|
||||||
pageList: [10, 20, 30, 50],
|
|
||||||
sidePagination: "server", //表示服务端请求
|
|
||||||
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
|
||||||
//设置为limit可以获取limit, offset, search, sort, order
|
|
||||||
queryParamsType: "undefined",
|
|
||||||
queryParams: function queryParams(params) { //设置查询参数
|
|
||||||
var param = {
|
|
||||||
pageNumber: params.pageNumber,
|
|
||||||
pageSize: params.pageSize,
|
|
||||||
type: parseInt($("#search-type").val())
|
|
||||||
};
|
|
||||||
return param;
|
|
||||||
},
|
|
||||||
toolbar: '#toolbar',
|
|
||||||
url: '/admin/deviateRange/list',
|
|
||||||
onLoadSuccess: function () { //加载成功时执行
|
|
||||||
console.log("load success");
|
|
||||||
},
|
|
||||||
onLoadError: function () { //加载失败时执行
|
|
||||||
console.log("load fail");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
var partitionId = $("#partitionId");
|
||||||
|
partitionId.empty();
|
||||||
|
|
||||||
// 构建下拉组合框
|
// 遍历数据并添加 option
|
||||||
ComboboxHelper.build(null, '#status');
|
$.each(json.data, function (index, item) {
|
||||||
ComboboxHelper.build(null, '#type');
|
// 创建新的 option 元素
|
||||||
$("#deviateRangeForm").validationEngine();
|
var option = $('<option></option>')
|
||||||
|
.attr('value', item.id) // 设置 value 属性
|
||||||
|
.text(item.desc); // 设置文本内容
|
||||||
|
|
||||||
$("#add").click(function () {
|
// 追加到 select 元素
|
||||||
// 打开编辑弹窗
|
partitionId.append(option.clone());
|
||||||
$('#deviateRangeId').val('');
|
|
||||||
$("#deviateRangeModal").modal('show');
|
|
||||||
$("#deviateRangeForm")[0].reset();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#table").on("click", '.opt-del', function () {
|
|
||||||
if (confirm("你确认删除该记录吗?" +
|
|
||||||
"\r\n删除偏差范围,会一起删除偏差奖池对应的配置,请谨慎操作!")) {
|
|
||||||
var id = $(this).attr("data-id");
|
|
||||||
$.ajax({
|
|
||||||
type: 'post',
|
|
||||||
url: "/admin/deviateRange/del",
|
|
||||||
data: { 'deviateRangeId': id },
|
|
||||||
dataType: "json",
|
|
||||||
success: function (res) {
|
|
||||||
if (res.code == 200) {
|
|
||||||
$("#tipMsg").text("删除成功");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
TableHelper.doRefresh("#table");
|
|
||||||
} else {
|
|
||||||
$("#tipMsg").text("删除失败,错误信息:" + res.message);
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#table").on("click", '.opt-edit', function () {
|
|
||||||
var id = $(this).attr("data-id");
|
|
||||||
$.ajax({
|
|
||||||
type: "post",
|
|
||||||
url: "/admin/deviateRange/one",
|
|
||||||
data: { 'deviateRangeId': id },
|
|
||||||
dataType: "json",
|
|
||||||
success: function (data) {
|
|
||||||
if (data) {
|
|
||||||
$("#deviateRangeId").val(data.id);
|
|
||||||
$("#deviateLowerLimit").val(data.lowerLimit);
|
|
||||||
$("#deviateUpperLimit").val(data.upperLimit);
|
|
||||||
$("#creator").val(data.creator);
|
|
||||||
ComboboxHelper.setDef("#type", data.type);
|
|
||||||
// 打开编辑弹窗
|
|
||||||
$("#deviateRangeModal").modal('show');
|
|
||||||
} else {
|
|
||||||
$("#tipMsg").text("获取偏差范围出错");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#save").click(function () {
|
|
||||||
if ($("#deviateRangeForm").validationEngine('validate')) {
|
|
||||||
var lowerLimit = parseInt($('#deviateLowerLimit').val());
|
|
||||||
var upperLimit = parseInt($('#deviateUpperLimit').val());
|
|
||||||
if (lowerLimit > upperLimit) {
|
|
||||||
$("#tipMsg").text("偏差下限不能大于上限");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$("#save").prop('disabled', true);
|
|
||||||
$.ajax({
|
|
||||||
type: "post",
|
|
||||||
url: "/admin/deviateRange/save",
|
|
||||||
data: $('#deviateRangeForm').serialize(),
|
|
||||||
dataType: "json",
|
|
||||||
success: function (res) {
|
|
||||||
$("#save").prop('disabled', false);
|
|
||||||
if (res.code == 200) {
|
|
||||||
$("#deviateRangeModal").modal('hide');
|
|
||||||
$("#tipMsg").text("保存成功");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
TableHelper.doRefresh("#table");
|
|
||||||
} else {
|
|
||||||
$("#tipMsg").text("保存失败,错误信息:" + res.message);
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// 筛选按钮点击事件
|
|
||||||
$('#searchBtn').on('click', function () {
|
|
||||||
TableHelper.doRefresh('#table');
|
|
||||||
});
|
|
||||||
|
|
||||||
|
deviatePartitionId.append(option.clone());
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
$('#table').bootstrapTable('destroy');
|
||||||
|
$('#table').bootstrapTable({
|
||||||
|
columns: [
|
||||||
|
{ field: 'id', title: 'id', align: 'center', width: '15%' },
|
||||||
|
{ field: 'lowerLimit', title: '下限', align: 'center', width: '15%' },
|
||||||
|
{ field: 'upperLimit', title: '上限', width: '20%' },
|
||||||
|
{ field: 'creator', title: '创建人', align: 'center', width: '5%' },
|
||||||
|
{
|
||||||
|
field: 'tmp', title: '操作', align: 'center', width: '20%', formatter: function (val, row, index) {
|
||||||
|
var key = row.id;
|
||||||
|
return "<button class='btn btn-sm btn-success opt-edit' data-id=" + key + ">编辑</button> " +
|
||||||
|
"<button class='btn btn-sm btn-danger opt-del' data-id=" + key + ">删除</button>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
cache: false,
|
||||||
|
striped: true,
|
||||||
|
showRefresh: true,
|
||||||
|
pageSize: 10,
|
||||||
|
pagination: true,
|
||||||
|
pageList: [10, 20, 30, 50],
|
||||||
|
sidePagination: "server", //表示服务端请求
|
||||||
|
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
||||||
|
//设置为limit可以获取limit, offset, search, sort, order
|
||||||
|
queryParamsType: "undefined",
|
||||||
|
queryParams: function queryParams (params) { //设置查询参数
|
||||||
|
var param = {
|
||||||
|
pageNumber: params.pageNumber,
|
||||||
|
pageSize: params.pageSize,
|
||||||
|
type: parseInt($("#search-type").val()),
|
||||||
|
partitionId: parseInt($("#partitionId").val())
|
||||||
|
};
|
||||||
|
return param;
|
||||||
|
},
|
||||||
|
toolbar: '#toolbar',
|
||||||
|
url: '/admin/deviateRange/list',
|
||||||
|
onLoadSuccess: function () { //加载成功时执行
|
||||||
|
console.log("load success");
|
||||||
|
},
|
||||||
|
onLoadError: function () { //加载失败时执行
|
||||||
|
console.log("load fail");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// 构建下拉组合框
|
||||||
|
ComboboxHelper.build(null, '#status');
|
||||||
|
ComboboxHelper.build(null, '#type');
|
||||||
|
$("#deviateRangeForm").validationEngine();
|
||||||
|
|
||||||
|
$("#add").click(function () {
|
||||||
|
// 打开编辑弹窗
|
||||||
|
$('#deviateRangeId').val('');
|
||||||
|
$("#deviateRangeModal").modal('show');
|
||||||
|
$("#deviateRangeForm")[0].reset();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#table").on("click", '.opt-del', function () {
|
||||||
|
if (confirm("你确认删除该记录吗?" +
|
||||||
|
"\r\n删除偏差范围,会一起删除偏差奖池对应的配置,请谨慎操作!")) {
|
||||||
|
var id = $(this).attr("data-id");
|
||||||
|
$.ajax({
|
||||||
|
type: 'post',
|
||||||
|
url: "/admin/deviateRange/del",
|
||||||
|
data: { 'deviateRangeId': id },
|
||||||
|
dataType: "json",
|
||||||
|
success: function (res) {
|
||||||
|
if (res.code == 200) {
|
||||||
|
$("#tipMsg").text("删除成功");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
TableHelper.doRefresh("#table");
|
||||||
|
} else {
|
||||||
|
$("#tipMsg").text("删除失败,错误信息:" + res.message);
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#table").on("click", '.opt-edit', function () {
|
||||||
|
var id = $(this).attr("data-id");
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "/admin/deviateRange/one",
|
||||||
|
data: { 'deviateRangeId': id },
|
||||||
|
dataType: "json",
|
||||||
|
success: function (data) {
|
||||||
|
if (data) {
|
||||||
|
$("#deviateRangeId").val(data.id);
|
||||||
|
$("#deviateLowerLimit").val(data.lowerLimit);
|
||||||
|
$("#deviateUpperLimit").val(data.upperLimit);
|
||||||
|
$("#deviatePartitionId").val(data.partitionId);
|
||||||
|
$("#creator").val(data.creator);
|
||||||
|
ComboboxHelper.setDef("#type", data.type);
|
||||||
|
// 打开编辑弹窗
|
||||||
|
$("#deviateRangeModal").modal('show');
|
||||||
|
} else {
|
||||||
|
$("#tipMsg").text("获取偏差范围出错");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#save").click(function () {
|
||||||
|
if ($("#deviateRangeForm").validationEngine('validate')) {
|
||||||
|
var lowerLimit = parseInt($('#deviateLowerLimit').val());
|
||||||
|
var upperLimit = parseInt($('#deviateUpperLimit').val());
|
||||||
|
if (lowerLimit > upperLimit) {
|
||||||
|
$("#tipMsg").text("偏差下限不能大于上限");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$("#save").prop('disabled', true);
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "/admin/deviateRange/save",
|
||||||
|
data: $('#deviateRangeForm').serialize(),
|
||||||
|
dataType: "json",
|
||||||
|
success: function (res) {
|
||||||
|
$("#save").prop('disabled', false);
|
||||||
|
if (res.code == 200) {
|
||||||
|
$("#deviateRangeModal").modal('hide');
|
||||||
|
$("#tipMsg").text("保存成功");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
TableHelper.doRefresh("#table");
|
||||||
|
} else {
|
||||||
|
$("#tipMsg").text("保存失败,错误信息:" + res.message);
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 筛选按钮点击事件
|
||||||
|
$('#searchBtn').on('click', function () {
|
||||||
|
TableHelper.doRefresh('#table');
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,332 +1,400 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1 id="itemTitle"></h1>
|
<h1 id="itemTitle"></h1>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
|
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<form action="" id="searchForm" method="POST">
|
<form action=""
|
||||||
<div class="col-sm-12">
|
id="searchForm"
|
||||||
<div class="col-sm-4">
|
method="POST">
|
||||||
<label for="timeBegin" class="qry_col control-label">日期:</label>
|
<div class="col-sm-12">
|
||||||
<input type="text" name="timeBegin" id="timeBegin" class="input-sm" placeholder="起始时间">
|
<label for="partitionId"
|
||||||
- <input type="text" name="timeEnd" id="timeEnd" class="input-sm" placeholder="结束时间">
|
class="qry_col control-label">分区:</label>
|
||||||
</div>
|
<div class="col-sm-2">
|
||||||
<label for="erbanNo" class="qry_col control-label">平台号:</label>
|
<select id="partitionId"
|
||||||
<div class="col-sm-2">
|
class="input-sm"></select>
|
||||||
<input type="text" name="erbanNo" id="erbanNo" class="input-sm" placeholder="">
|
</div>
|
||||||
</div>
|
<div class="col-sm-4">
|
||||||
</div>
|
<label for="timeBegin"
|
||||||
<div class="col-sm-12">
|
class="qry_col control-label">日期:</label>
|
||||||
<label for="boxType" class="qry_col control-label">许愿池类型:</label>
|
<input type="text"
|
||||||
<div class="col-sm-2">
|
name="timeBegin"
|
||||||
<select name="boxType" id="boxType" class="col-sm-2 form-control"
|
id="timeBegin"
|
||||||
data-btn-class="btn-warning">
|
class="input-sm"
|
||||||
<option value="" selected="selected">全部</option>
|
placeholder="起始时间">
|
||||||
<option value="1">幸运许愿池</option>
|
- <input type="text"
|
||||||
<option value="2">梦幻许愿池</option>
|
name="timeEnd"
|
||||||
</select>
|
id="timeEnd"
|
||||||
</div>
|
class="input-sm"
|
||||||
<label for="poolType" class="qry_col control-label">奖池类型:</label>
|
placeholder="结束时间">
|
||||||
<div class="col-sm-2">
|
</div>
|
||||||
<select name="poolType" id="poolType" class="col-sm-2 form-control"
|
<label for="erbanNo"
|
||||||
data-btn-class="btn-warning">
|
class="qry_col control-label">平台号:</label>
|
||||||
<option value="" selected="selected">全部</option>
|
<div class="col-sm-2">
|
||||||
<option value="1">幸运新人奖池</option>
|
<input type="text"
|
||||||
<option value="2">幸运普通奖池</option>
|
name="erbanNo"
|
||||||
<option value="3">幸运白名单奖池</option>
|
id="erbanNo"
|
||||||
<option value="4">幸运偏差奖池</option>
|
class="input-sm"
|
||||||
<option value="12">幸运次数奖池</option>
|
placeholder="">
|
||||||
<option value="7">梦幻普通奖池</option>
|
</div>
|
||||||
<option value="9">梦幻偏差奖池</option>
|
</div>
|
||||||
<option value="10">梦幻新人奖池</option>
|
<div class="col-sm-12">
|
||||||
<option value="11">梦幻白名单奖池</option>
|
<label for="boxType"
|
||||||
</select>
|
class="qry_col control-label">许愿池类型:</label>
|
||||||
</div>
|
<div class="col-sm-2">
|
||||||
<label for="dataType" class="qry_col control-label">数据类型:</label>
|
<select name="boxType"
|
||||||
<div class="col-sm-2">
|
id="boxType"
|
||||||
<select name="dataType" id="dataType" class="col-sm-2 form-control"
|
class="col-sm-2 form-control"
|
||||||
data-btn-class="btn-warning">
|
data-btn-class="btn-warning">
|
||||||
<option value="1" selected="selected">普通用户数据</option>
|
<option value=""
|
||||||
<option value="2">被排除用户的数据</option>
|
selected="selected">全部</option>
|
||||||
</select>
|
<option value="1">幸运许愿池</option>
|
||||||
</div>
|
<option value="2">梦幻许愿池</option>
|
||||||
</div>
|
</select>
|
||||||
</form>
|
</div>
|
||||||
<button class="btn btn-primary" id="searchBtn">筛选</button>
|
<label for="poolType"
|
||||||
<div class="tips">因数据量庞大,默认不会显示每天的结果,默认只展示平台总收益情况,请先选择时间范围再搜索</div>
|
class="qry_col control-label">奖池类型:</label>
|
||||||
<div class="dataCount">
|
<div class="col-sm-2">
|
||||||
<p>
|
<select name="poolType"
|
||||||
<span>抽奖记录总数:</span>
|
id="poolType"
|
||||||
<span id="countNum"></span>
|
class="col-sm-2 form-control"
|
||||||
</p>
|
data-btn-class="btn-warning">
|
||||||
<p>
|
<option value=""
|
||||||
<span>用户投入钻石总数:</span>
|
selected="selected">全部</option>
|
||||||
<span id="userPay"></span>
|
<option value="1">幸运新人奖池</option>
|
||||||
</p>
|
<option value="2">幸运普通奖池</option>
|
||||||
<p>
|
<option value="3">幸运白名单奖池</option>
|
||||||
<span>总平台总价值:</span>
|
<option value="4">幸运偏差奖池</option>
|
||||||
<span id="platformNum"></span>
|
<option value="12">幸运次数奖池</option>
|
||||||
</p>
|
<option value="7">梦幻普通奖池</option>
|
||||||
<p>
|
<option value="9">梦幻偏差奖池</option>
|
||||||
<span>总实际总价值:</span>
|
<option value="10">梦幻新人奖池</option>
|
||||||
<span id="actualNum"></span>
|
<option value="11">梦幻白名单奖池</option>
|
||||||
</p>
|
</select>
|
||||||
<p>
|
</div>
|
||||||
<span>用户获得礼物中钻石数:</span>
|
<label for="dataType"
|
||||||
<span id="giftNum"></span>
|
class="qry_col control-label">数据类型:</label>
|
||||||
</p>
|
<div class="col-sm-2">
|
||||||
<p>
|
<select name="dataType"
|
||||||
<span>用户获得非礼物总钻石数:</span>
|
id="dataType"
|
||||||
<span id="notGiftNum"></span>
|
class="col-sm-2 form-control"
|
||||||
</p>
|
data-btn-class="btn-warning">
|
||||||
<p>
|
<option value="1"
|
||||||
<span>用户获得实物总数:</span>
|
selected="selected">普通用户数据</option>
|
||||||
<span id="realGiftNum"></span>
|
<option value="2">被排除用户的数据</option>
|
||||||
</p>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
|
<button class="btn btn-primary"
|
||||||
<div id="table"></div>
|
id="searchBtn">筛选</button>
|
||||||
</section>
|
<div class="tips">因数据量庞大,默认不会显示每天的结果,默认只展示平台总收益情况,请先选择时间范围再搜索</div>
|
||||||
|
<div class="dataCount">
|
||||||
|
<p>
|
||||||
|
<span>抽奖记录总数:</span>
|
||||||
|
<span id="countNum"></span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span>用户投入钻石总数:</span>
|
||||||
|
<span id="userPay"></span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span>总平台总价值:</span>
|
||||||
|
<span id="platformNum"></span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span>总实际总价值:</span>
|
||||||
|
<span id="actualNum"></span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span>用户获得礼物中钻石数:</span>
|
||||||
|
<span id="giftNum"></span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span>用户获得非礼物总钻石数:</span>
|
||||||
|
<span id="notGiftNum"></span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span>用户获得实物总数:</span>
|
||||||
|
<span id="realGiftNum"></span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
|
||||||
|
<div id="table"></div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PrizeDataAdminNewView",
|
name: "PrizeDataAdminNewView",
|
||||||
setup() {
|
setup () {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.initData();
|
this.initData();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initData () {
|
||||||
|
$(function () {
|
||||||
|
$.ajax({
|
||||||
|
type: 'get',
|
||||||
|
url: '/partition/listPartitionInfo',
|
||||||
|
dataType: 'json',
|
||||||
|
success: function (json) {
|
||||||
|
if (json.code == 200) {
|
||||||
|
//var deviatePartitionId = $("#deviatePartitionId");
|
||||||
|
//deviatePartitionId.empty();
|
||||||
|
|
||||||
|
var partitionId = $("#partitionId");
|
||||||
|
partitionId.empty();
|
||||||
|
|
||||||
|
var defaultOption = $('<option></option>').attr('value', '').text("全部");
|
||||||
|
partitionId.append(defaultOption);
|
||||||
|
|
||||||
|
// 遍历数据并添加 option
|
||||||
|
$.each(json.data, function (index, item) {
|
||||||
|
// 创建新的 option 元素
|
||||||
|
var option = $('<option></option>')
|
||||||
|
.attr('value', item.id) // 设置 value 属性
|
||||||
|
.text(item.desc); // 设置文本内容
|
||||||
|
|
||||||
|
// 追加到 select 元素
|
||||||
|
partitionId.append(option.clone());
|
||||||
|
|
||||||
|
//deviatePartitionId.append(option.clone());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initData() {
|
|
||||||
$(function () {
|
|
||||||
var picker1 = $('#timeBegin').datetimepicker({
|
|
||||||
format: 'yyyy-mm-dd',
|
|
||||||
todayBtn: true,
|
|
||||||
autoclose: true,
|
|
||||||
minView: 'month',
|
|
||||||
endDate: new Date()
|
|
||||||
});
|
|
||||||
|
|
||||||
var picker2 = $('#timeEnd').datetimepicker({
|
var picker1 = $('#timeBegin').datetimepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
todayBtn: true,
|
todayBtn: true,
|
||||||
autoclose: true,
|
autoclose: true,
|
||||||
minView: 'month',
|
minView: 'month',
|
||||||
endDate: new Date()
|
endDate: new Date()
|
||||||
});
|
});
|
||||||
|
|
||||||
var $timeBegin = '', $timeEnd = '';
|
var picker2 = $('#timeEnd').datetimepicker({
|
||||||
var main = {
|
format: 'yyyy-mm-dd',
|
||||||
init: function () {
|
todayBtn: true,
|
||||||
this.eventRegister();
|
autoclose: true,
|
||||||
this.valueChange();
|
minView: 'month',
|
||||||
},
|
endDate: new Date()
|
||||||
|
});
|
||||||
|
|
||||||
eventRegister: function () {
|
var $timeBegin = '', $timeEnd = '';
|
||||||
picker1.on('changeDate', function () {
|
var main = {
|
||||||
var date = $('#timeBegin').datetimepicker('getDate');
|
init: function () {
|
||||||
picker2.datetimepicker('setStartDate', date);
|
this.eventRegister();
|
||||||
});
|
this.valueChange();
|
||||||
picker2.on('changeDate', function () {
|
},
|
||||||
var date = $('#timeEnd').datetimepicker('getDate');
|
|
||||||
picker1.datetimepicker('setEndDate', date);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#searchBtn').on('click', function () {
|
eventRegister: function () {
|
||||||
var $dataCount = $('.dataCount');
|
picker1.on('changeDate', function () {
|
||||||
// var $startDate = $('#timeBegin').val().replace(/\//g,'-');
|
var date = $('#timeBegin').datetimepicker('getDate');
|
||||||
var $startDate;
|
picker2.datetimepicker('setStartDate', date);
|
||||||
if ($('#timeBegin').val() == "" || $('#timeBegin').val() == 'undefined') {
|
});
|
||||||
$startDate = '';
|
picker2.on('changeDate', function () {
|
||||||
} else {
|
var date = $('#timeEnd').datetimepicker('getDate');
|
||||||
/*var arr = $('#timeBegin').val().split('/');
|
picker1.datetimepicker('setEndDate', date);
|
||||||
var length = arr.length;
|
});
|
||||||
var $startDate = arr[length-1] +'-' + arr[0] + '-' + arr[length - 2];*/
|
|
||||||
$startDate = $('#timeBegin').val();
|
|
||||||
}
|
|
||||||
var $endDate;
|
|
||||||
if ($('#timeEnd').val() == '' || $('#timeEnd').val() == 'undefined') {
|
|
||||||
$endDate = $startDate;
|
|
||||||
} else {
|
|
||||||
/*var arr2 = $('#timeEnd').val().split('/');
|
|
||||||
var length2 = arr2.length;
|
|
||||||
var $endDate = arr2[length2-1] + '-' + arr2[0] + '-' + arr2[length2-2];*/
|
|
||||||
$endDate = $('#timeEnd').val();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($startDate == '') {
|
$('#searchBtn').on('click', function () {
|
||||||
$timeBegin = '';
|
var $dataCount = $('.dataCount');
|
||||||
$timeEnd = '';
|
// var $startDate = $('#timeBegin').val().replace(/\//g,'-');
|
||||||
} else {
|
var $startDate;
|
||||||
$timeBegin = $startDate + ' 00:00:00';
|
if ($('#timeBegin').val() == "" || $('#timeBegin').val() == 'undefined') {
|
||||||
$timeEnd = $endDate + ' 23:59:59';
|
$startDate = '';
|
||||||
}
|
} else {
|
||||||
|
/*var arr = $('#timeBegin').val().split('/');
|
||||||
|
var length = arr.length;
|
||||||
|
var $startDate = arr[length-1] +'-' + arr[0] + '-' + arr[length - 2];*/
|
||||||
|
$startDate = $('#timeBegin').val();
|
||||||
|
}
|
||||||
|
var $endDate;
|
||||||
|
if ($('#timeEnd').val() == '' || $('#timeEnd').val() == 'undefined') {
|
||||||
|
$endDate = $startDate;
|
||||||
|
} else {
|
||||||
|
/*var arr2 = $('#timeEnd').val().split('/');
|
||||||
|
var length2 = arr2.length;
|
||||||
|
var $endDate = arr2[length2-1] + '-' + arr2[0] + '-' + arr2[length2-2];*/
|
||||||
|
$endDate = $('#timeEnd').val();
|
||||||
|
}
|
||||||
|
|
||||||
$.post('/admin/drawlottery/record/totalNew', {
|
if ($startDate == '') {
|
||||||
erbanNo: $('#erbanNo').val(),
|
$timeBegin = '';
|
||||||
startDate: $timeBegin,
|
$timeEnd = '';
|
||||||
endDate: $timeEnd,
|
} else {
|
||||||
boxType: $('#boxType').val(),
|
$timeBegin = $startDate + ' 00:00:00';
|
||||||
poolType: $('#poolType').val(),
|
$timeEnd = $endDate + ' 23:59:59';
|
||||||
dataType: $('#dataType').val()
|
}
|
||||||
}, function (res) {
|
|
||||||
console.log(res);
|
|
||||||
|
|
||||||
if (res.code == 200) {
|
$.post('/admin/drawlottery/record/totalNew', {
|
||||||
var data = res.data;
|
erbanNo: $('#erbanNo').val(),
|
||||||
$dataCount.find('#countNum').html(data.countNum);
|
startDate: $timeBegin,
|
||||||
$dataCount.find('#userPay').html(data.userTotalPay);
|
endDate: $timeEnd,
|
||||||
$dataCount.find('#platformNum').html(data.totalPlatformValue);
|
boxType: $('#boxType').val(),
|
||||||
$dataCount.find('#actualNum').html(data.totalActualValue);
|
poolType: $('#poolType').val(),
|
||||||
$dataCount.find('#giftNum').html(data.totalGiftActualValue);
|
dataType: $('#dataType').val(),
|
||||||
$dataCount.find('#notGiftNum').html(data.totalNotGiftActualValue);
|
partitionId: $("#partitionId").val(),
|
||||||
$dataCount.find('#realGiftNum').html(data.totalRealGiftActualValue);
|
}, function (res) {
|
||||||
// TableHelper.doRefresh('#table');
|
console.log(res);
|
||||||
tableRefresh();
|
|
||||||
} else {
|
|
||||||
console.log('数据错误,导致加载失败,' + res.code);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#table').on('click', '#details', function () {
|
if (res.code == 200) {
|
||||||
console.log($(this).data('id'));
|
var data = res.data;
|
||||||
});
|
$dataCount.find('#countNum').html(data.countNum);
|
||||||
|
$dataCount.find('#userPay').html(data.userTotalPay);
|
||||||
|
$dataCount.find('#platformNum').html(data.totalPlatformValue);
|
||||||
},
|
$dataCount.find('#actualNum').html(data.totalActualValue);
|
||||||
|
$dataCount.find('#giftNum').html(data.totalGiftActualValue);
|
||||||
valueChange: function () {
|
$dataCount.find('#notGiftNum').html(data.totalNotGiftActualValue);
|
||||||
var $dataCount = $('.dataCount');
|
$dataCount.find('#realGiftNum').html(data.totalRealGiftActualValue);
|
||||||
$.post('/admin/drawlottery/record/totalNew', {
|
// TableHelper.doRefresh('#table');
|
||||||
erbanNo: $('#erbanNo').val(),
|
tableRefresh();
|
||||||
startDate: $timeBegin,
|
} else {
|
||||||
endDate: $timeEnd,
|
console.log('数据错误,导致加载失败,' + res.code);
|
||||||
boxType: $('#boxType').val(),
|
|
||||||
poolType: $('#poolType').val(),
|
|
||||||
dataType: $('#dataType').val()
|
|
||||||
}, function (res) {
|
|
||||||
console.log(res);
|
|
||||||
|
|
||||||
if (res.code == 200) {
|
|
||||||
var data = res.data;
|
|
||||||
$dataCount.find('#countNum').html(data.countNum);
|
|
||||||
$dataCount.find('#userPay').html(data.userTotalPay);
|
|
||||||
$dataCount.find('#platformNum').html(data.totalPlatformValue);
|
|
||||||
$dataCount.find('#actualNum').html(data.totalActualValue);
|
|
||||||
$dataCount.find('#giftNum').html(data.totalGiftActualValue);
|
|
||||||
$dataCount.find('#notGiftNum').html(data.totalNotGiftActualValue);
|
|
||||||
$dataCount.find('#realGiftNum').html(data.totalRealGiftActualValue);
|
|
||||||
TableHelper.doRefresh('#table');
|
|
||||||
} else {
|
|
||||||
console.log('数据错误,导致加载失败,' + res.code);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
};
|
|
||||||
main.init();
|
|
||||||
|
|
||||||
function tableRefresh() {
|
|
||||||
$('#table').bootstrapTable('destroy');
|
|
||||||
$('#table').bootstrapTable({
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
field: 'createTime', title: '日期', align: 'center', valign: 'middle', width: '20%', formatter: function (val, rows, index) {
|
|
||||||
if (val) {
|
|
||||||
var date = new Date(val);
|
|
||||||
return date.format('yyyy-MM-dd')
|
|
||||||
} else {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ field: 'countNum', title: '抽奖记录数', align: 'center', valign: 'middle', width: '10%' },
|
|
||||||
{ field: 'userTotalPay', title: '用户投入钻石数', align: 'center', valign: 'middle', width: '10%' },
|
|
||||||
{ field: 'totalPlatformValue', title: '总平台价值', align: 'center', valign: 'middle', width: '10%' },
|
|
||||||
{ field: 'totalActualValue', title: '总实际价值', align: 'center', valign: 'middle', width: '10%' },
|
|
||||||
{ field: 'totalGiftActualValue', title: '用户获得礼物钻石数', align: 'center', valign: 'middle', width: '10%' },
|
|
||||||
{ field: 'totalNotGiftActualValue', title: '用户获得非礼物钻石数', align: 'center', valign: 'middle', width: '10%' },
|
|
||||||
{ field: 'totalRealGiftActualValue', title: '用户获得实物', align: 'center', valign: 'middle', width: '10%' },
|
|
||||||
// {field: '', title: '操作', align: 'center', valign: 'middle', width: '10%',formatter: function(val,row,index) {
|
|
||||||
// var key = row.createTime;
|
|
||||||
// return '<button class="btn btn-primary btn-sm" id="details" data-id="' + key + '">查看详情</button>';
|
|
||||||
// }}
|
|
||||||
],
|
|
||||||
cache: false,
|
|
||||||
striped: true,
|
|
||||||
showRefresh: false,
|
|
||||||
pageSize: 10,
|
|
||||||
pagination: true,
|
|
||||||
pageList: [10, 20, 30, 50],
|
|
||||||
sidePagination: 'server',
|
|
||||||
queryParamsType: 'undefined',
|
|
||||||
queryParams: function queryParams(params) {
|
|
||||||
var param = {
|
|
||||||
pageSize: params.pageSize,
|
|
||||||
pageNumber: params.pageNumber,
|
|
||||||
startDate: $timeBegin,
|
|
||||||
endDate: $timeEnd,
|
|
||||||
boxType: $('#boxType').val(),
|
|
||||||
poolType: $('#poolType').val(),
|
|
||||||
erbanNo: $('#erbanNo').val(),
|
|
||||||
dataType: $('#dataType').val(),
|
|
||||||
};
|
|
||||||
return param;
|
|
||||||
},
|
|
||||||
uniqueId: 'id',
|
|
||||||
toolbar: '#toolbar',
|
|
||||||
url: '/admin/drawlottery/record/listNew',
|
|
||||||
onLoadSuccess: function () {
|
|
||||||
console.log('load success');
|
|
||||||
},
|
|
||||||
onLOadError: function () {
|
|
||||||
console.log('load fail');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#table').on('click', '#details', function () {
|
||||||
|
console.log($(this).data('id'));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
valueChange: function () {
|
||||||
|
var $dataCount = $('.dataCount');
|
||||||
|
$.post('/admin/drawlottery/record/totalNew', {
|
||||||
|
erbanNo: $('#erbanNo').val(),
|
||||||
|
startDate: $timeBegin,
|
||||||
|
endDate: $timeEnd,
|
||||||
|
boxType: $('#boxType').val(),
|
||||||
|
poolType: $('#poolType').val(),
|
||||||
|
dataType: $('#dataType').val()
|
||||||
|
}, function (res) {
|
||||||
|
console.log(res);
|
||||||
|
|
||||||
|
if (res.code == 200) {
|
||||||
|
var data = res.data;
|
||||||
|
$dataCount.find('#countNum').html(data.countNum);
|
||||||
|
$dataCount.find('#userPay').html(data.userTotalPay);
|
||||||
|
$dataCount.find('#platformNum').html(data.totalPlatformValue);
|
||||||
|
$dataCount.find('#actualNum').html(data.totalActualValue);
|
||||||
|
$dataCount.find('#giftNum').html(data.totalGiftActualValue);
|
||||||
|
$dataCount.find('#notGiftNum').html(data.totalNotGiftActualValue);
|
||||||
|
$dataCount.find('#realGiftNum').html(data.totalRealGiftActualValue);
|
||||||
|
TableHelper.doRefresh('#table');
|
||||||
|
} else {
|
||||||
|
console.log('数据错误,导致加载失败,' + res.code);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
};
|
||||||
|
main.init();
|
||||||
|
|
||||||
|
function tableRefresh () {
|
||||||
|
$('#table').bootstrapTable('destroy');
|
||||||
|
$('#table').bootstrapTable({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
field: 'createTime', title: '日期', align: 'center', valign: 'middle', width: '20%', formatter: function (val, rows, index) {
|
||||||
|
if (val) {
|
||||||
|
var date = new Date(val);
|
||||||
|
return date.format('yyyy-MM-dd')
|
||||||
|
} else {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ field: 'countNum', title: '抽奖记录数', align: 'center', valign: 'middle', width: '10%' },
|
||||||
|
{ field: 'userTotalPay', title: '用户投入钻石数', align: 'center', valign: 'middle', width: '10%' },
|
||||||
|
{ field: 'totalPlatformValue', title: '总平台价值', align: 'center', valign: 'middle', width: '10%' },
|
||||||
|
{ field: 'totalActualValue', title: '总实际价值', align: 'center', valign: 'middle', width: '10%' },
|
||||||
|
{ field: 'totalGiftActualValue', title: '用户获得礼物钻石数', align: 'center', valign: 'middle', width: '10%' },
|
||||||
|
{ field: 'totalNotGiftActualValue', title: '用户获得非礼物钻石数', align: 'center', valign: 'middle', width: '10%' },
|
||||||
|
{ field: 'totalRealGiftActualValue', title: '用户获得实物', align: 'center', valign: 'middle', width: '10%' },
|
||||||
|
// {field: '', title: '操作', align: 'center', valign: 'middle', width: '10%',formatter: function(val,row,index) {
|
||||||
|
// var key = row.createTime;
|
||||||
|
// return '<button class="btn btn-primary btn-sm" id="details" data-id="' + key + '">查看详情</button>';
|
||||||
|
// }}
|
||||||
|
],
|
||||||
|
cache: false,
|
||||||
|
striped: true,
|
||||||
|
showRefresh: false,
|
||||||
|
pageSize: 10,
|
||||||
|
pagination: true,
|
||||||
|
pageList: [10, 20, 30, 50],
|
||||||
|
sidePagination: 'server',
|
||||||
|
queryParamsType: 'undefined',
|
||||||
|
queryParams: function queryParams (params) {
|
||||||
|
var param = {
|
||||||
|
pageSize: params.pageSize,
|
||||||
|
pageNumber: params.pageNumber,
|
||||||
|
startDate: $timeBegin,
|
||||||
|
endDate: $timeEnd,
|
||||||
|
boxType: $('#boxType').val(),
|
||||||
|
poolType: $('#poolType').val(),
|
||||||
|
erbanNo: $('#erbanNo').val(),
|
||||||
|
dataType: $('#dataType').val(),
|
||||||
|
partitionId: $('#partitionId').val(),
|
||||||
|
};
|
||||||
|
return param;
|
||||||
|
},
|
||||||
|
uniqueId: 'id',
|
||||||
|
toolbar: '#toolbar',
|
||||||
|
url: '/admin/drawlottery/record/listNew',
|
||||||
|
onLoadSuccess: function () {
|
||||||
|
console.log('load success');
|
||||||
|
},
|
||||||
|
onLOadError: function () {
|
||||||
|
console.log('load fail');
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.dataCount {
|
.dataCount {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataCount>p {
|
.dataCount > p {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
background: #ccc;
|
background: #ccc;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tips {
|
.tips {
|
||||||
color: red;
|
color: red;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qry_col {
|
.qry_col {
|
||||||
float: left;
|
float: left;
|
||||||
}</style>
|
}
|
||||||
|
</style>
|
||||||
@@ -12,9 +12,14 @@
|
|||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
|
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<form action="" id="searchForm" method="POST">
|
<form action=""
|
||||||
|
id="searchForm"
|
||||||
转盘分类:<select name="jackpotType" id="jackpotType" data-btn-class="btn btn-warning">
|
method="POST">
|
||||||
|
分区:<select id="partitionId"
|
||||||
|
class="input-sm"></select>
|
||||||
|
转盘分类:<select name="jackpotType"
|
||||||
|
class="input-sm"
|
||||||
|
id="jackpotType">
|
||||||
<option value="1">幸运新人奖池</option>
|
<option value="1">幸运新人奖池</option>
|
||||||
<option value="2">幸运普通奖池</option>
|
<option value="2">幸运普通奖池</option>
|
||||||
<option value="3">幸运白名单奖池</option>
|
<option value="3">幸运白名单奖池</option>
|
||||||
@@ -29,17 +34,23 @@
|
|||||||
</select>
|
</select>
|
||||||
<label class="deviateRange">
|
<label class="deviateRange">
|
||||||
偏差范围:
|
偏差范围:
|
||||||
<select name="deviateRange" id="deviateRange" data-btn-class="btn btn-warning">
|
<select name="deviateRange"
|
||||||
|
id="deviateRange"
|
||||||
|
data-btn-class="btn btn-warning">
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
<label class="diamondDeviateRange">
|
<label class="diamondDeviateRange">
|
||||||
偏差范围:
|
偏差范围:
|
||||||
<select name="diamondDeviateRange" id="diamondDeviateRange" data-btn-class="btn btn-warning">
|
<select name="diamondDeviateRange"
|
||||||
|
id="diamondDeviateRange"
|
||||||
|
data-btn-class="btn btn-warning">
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
</form>
|
</form>
|
||||||
<button class="btn btn-primary" id="searchBtn">搜索</button>
|
<button class="btn btn-primary"
|
||||||
<button class="btn btn-primary" id="add">添加奖品</button>
|
id="searchBtn">搜索</button>
|
||||||
|
<button class="btn btn-primary"
|
||||||
|
id="add">添加奖品</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-12 jackpot">
|
<div class="col-sm-12 jackpot">
|
||||||
@@ -51,10 +62,14 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="col-sm-12">
|
<p class="col-sm-12">
|
||||||
<span class="col-sm-3" id="jackpotName"></span>
|
<span class="col-sm-3"
|
||||||
<span class="col-sm-3" id="jackpotNum"></span>
|
id="jackpotName"></span>
|
||||||
<span class="col-sm-3" id="prizeNum"></span>
|
<span class="col-sm-3"
|
||||||
<span class="col-sm-3" id="expectNum"></span>
|
id="jackpotNum"></span>
|
||||||
|
<span class="col-sm-3"
|
||||||
|
id="prizeNum"></span>
|
||||||
|
<span class="col-sm-3"
|
||||||
|
id="expectNum"></span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -65,31 +80,47 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- 添加弹窗 -->
|
<!-- 添加弹窗 -->
|
||||||
<div class="modal fade" id="addModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
<div class="modal fade"
|
||||||
|
id="addModal"
|
||||||
|
tabindex="-1"
|
||||||
|
role="dialog"
|
||||||
|
aria-labelledby="modalLabel">
|
||||||
|
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog"
|
||||||
|
role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button"
|
||||||
|
class="close"
|
||||||
|
data-dismiss="modal"
|
||||||
|
aria-label="Close">
|
||||||
<span aria-hidden="true">x</span>
|
<span aria-hidden="true">x</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<h4 class="modal-title" id="addModalLabel">添加奖品</h4>
|
<h4 class="modal-title"
|
||||||
|
id="addModalLabel">添加奖品</h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form action="" class="form-horizontal" id="addForm">
|
<form action=""
|
||||||
|
class="form-horizontal"
|
||||||
|
id="addForm">
|
||||||
|
|
||||||
<!-- 选择奖品 -->
|
<!-- 选择奖品 -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="" class="col-sm-3 control-label">选择奖品:</label>
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">选择奖品:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select name="awardType" id="awardType" data-btn-class="btn btn-warning">
|
<select name="awardType"
|
||||||
|
id="awardType"
|
||||||
|
data-btn-class="btn btn-warning">
|
||||||
<!-- <option value=""></option> -->
|
<!-- <option value=""></option> -->
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select name="awardChoose" id="awardChoose" data-btn-class="btn btn-warning">
|
<select name="awardChoose"
|
||||||
|
id="awardChoose"
|
||||||
|
data-btn-class="btn btn-warning">
|
||||||
<!-- <option value=""></option> -->
|
<!-- <option value=""></option> -->
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@@ -97,19 +128,29 @@
|
|||||||
|
|
||||||
<!-- 奖品个数 -->
|
<!-- 奖品个数 -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="" class="col-sm-3 control-label">奖品个数:</label>
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">奖品个数:</label>
|
||||||
|
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" id="jackpotNumber" name="jackpotNumber" class=" validate[required]" placeholder="单行输入">
|
<input type="text"
|
||||||
|
id="jackpotNumber"
|
||||||
|
name="jackpotNumber"
|
||||||
|
class=" validate[required]"
|
||||||
|
placeholder="单行输入">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 中奖率 -->
|
<!-- 中奖率 -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="" class="col-sm-3 control-label">实际中奖率:</label>
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">实际中奖率:</label>
|
||||||
|
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" id="winningRate" name="winningRate" class=" validate[required]" placeholder="单行输入">%
|
<input type="text"
|
||||||
|
id="winningRate"
|
||||||
|
name="winningRate"
|
||||||
|
class=" validate[required]"
|
||||||
|
placeholder="单行输入">%
|
||||||
<br />
|
<br />
|
||||||
<div class="tips">
|
<div class="tips">
|
||||||
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100,当前概率不得超过100
|
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100,当前概率不得超过100
|
||||||
@@ -119,10 +160,15 @@
|
|||||||
|
|
||||||
<!-- 展示中奖率 -->
|
<!-- 展示中奖率 -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="" class="col-sm-3 control-label">展示中奖率:</label>
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">展示中奖率:</label>
|
||||||
|
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" id="showRate" name="showRate" class=" validate[required]" placeholder="单行输入">%
|
<input type="text"
|
||||||
|
id="showRate"
|
||||||
|
name="showRate"
|
||||||
|
class=" validate[required]"
|
||||||
|
placeholder="单行输入">%
|
||||||
<br />
|
<br />
|
||||||
<div class="tips">
|
<div class="tips">
|
||||||
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100,当前概率不得超过100
|
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100,当前概率不得超过100
|
||||||
@@ -131,21 +177,41 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="" class="col-sm-3 control-label">是否默认奖品:</label>
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">是否默认奖品:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select name="itemType" id="itemType" data-btn-class="btn btn-warning">
|
<select name="itemType"
|
||||||
|
id="itemType"
|
||||||
|
data-btn-class="btn btn-warning">
|
||||||
<option value="1"> 默认奖品 </option>
|
<option value="1"> 默认奖品 </option>
|
||||||
<option value="2"> 普通奖品 </option>
|
<option value="2"> 普通奖品 </option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 创建者 -->
|
<!-- 分区 -->
|
||||||
<div class="form-group">
|
<div class="form-group awardPartitionId">
|
||||||
<label for="" class="col-sm-3 control-label">创建者:</label>
|
<label for="awardPartitionId"
|
||||||
|
class="col-sm-3 control-label">分区:</label>
|
||||||
|
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" id="creator" name="creator" class="validate[required]" placeholder="必填项">
|
<select name="awardPartitionId"
|
||||||
|
id="awardPartitionId">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 创建者 -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">创建者:</label>
|
||||||
|
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text"
|
||||||
|
id="creator"
|
||||||
|
name="creator"
|
||||||
|
class="validate[required]"
|
||||||
|
placeholder="必填项">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -153,8 +219,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="btn btn-default" type="button" id="addReset">重置</button>
|
<button class="btn btn-default"
|
||||||
<button class="btn btn-primary" type="button" id="addSave">保存</button>
|
type="button"
|
||||||
|
id="addReset">重置</button>
|
||||||
|
<button class="btn btn-primary"
|
||||||
|
type="button"
|
||||||
|
id="addSave">保存</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -162,35 +232,56 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 编辑弹窗 -->
|
<!-- 编辑弹窗 -->
|
||||||
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
<div class="modal fade"
|
||||||
<div class="modal-dialog" role="document">
|
id="editModal"
|
||||||
|
tabindex="-1"
|
||||||
|
role="dialog"
|
||||||
|
aria-labelledby="modalLabel">
|
||||||
|
<div class="modal-dialog"
|
||||||
|
role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button"
|
||||||
|
class="close"
|
||||||
|
data-dismiss="modal"
|
||||||
|
aria-label="Close">
|
||||||
<span aria-hidden="true">x</span>
|
<span aria-hidden="true">x</span>
|
||||||
</button>
|
</button>
|
||||||
<h4 class="modal-title" id="editModalLabel">编辑奖品</h4>
|
<h4 class="modal-title"
|
||||||
|
id="editModalLabel">编辑奖品</h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form action="" class="form-horizontal" id="editForm">
|
<form action=""
|
||||||
<input type="hidden" id="editId">
|
class="form-horizontal"
|
||||||
|
id="editForm">
|
||||||
|
<input type="hidden"
|
||||||
|
id="editId">
|
||||||
<!-- 奖品个数 -->
|
<!-- 奖品个数 -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="" class="col-sm-3 control-label">奖品个数:</label>
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">奖品个数:</label>
|
||||||
|
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" id="jackpotNumber2" name="jackpotNumber2" class=" validate[required]"
|
<input type="text"
|
||||||
placeholder="单行输入">
|
id="jackpotNumber2"
|
||||||
|
name="jackpotNumber2"
|
||||||
|
class=" validate[required]"
|
||||||
|
placeholder="单行输入">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 中奖率 -->
|
<!-- 中奖率 -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="" class="col-sm-3 control-label">实际中奖率:</label>
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">实际中奖率:</label>
|
||||||
|
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" id="winningRate2" name="winningRate2" class=" validate[required]" placeholder="单行输入">%
|
<input type="text"
|
||||||
|
id="winningRate2"
|
||||||
|
name="winningRate2"
|
||||||
|
class=" validate[required]"
|
||||||
|
placeholder="单行输入">%
|
||||||
<br />
|
<br />
|
||||||
<div class="tips">
|
<div class="tips">
|
||||||
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100,当前概率不得超过100
|
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100,当前概率不得超过100
|
||||||
@@ -200,10 +291,15 @@
|
|||||||
|
|
||||||
<!-- 展示给用户看的中奖率 -->
|
<!-- 展示给用户看的中奖率 -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="" class="col-sm-3 control-label">展示中奖率:</label>
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">展示中奖率:</label>
|
||||||
|
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" id="showRate2" name="showRate2" class=" validate[required]" placeholder="单行输入">%
|
<input type="text"
|
||||||
|
id="showRate2"
|
||||||
|
name="showRate2"
|
||||||
|
class=" validate[required]"
|
||||||
|
placeholder="单行输入">%
|
||||||
<br />
|
<br />
|
||||||
<div class="tips">
|
<div class="tips">
|
||||||
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100,当前概率不得超过100
|
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100,当前概率不得超过100
|
||||||
@@ -211,29 +307,52 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="" class="col-sm-3 control-label">是否默认奖品:</label>
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">是否默认奖品:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select name="itemType" id="itemType2" data-btn-class="btn btn-warning">
|
<select name="itemType"
|
||||||
|
id="itemType2"
|
||||||
|
data-btn-class="btn btn-warning">
|
||||||
<option value="1"> 默认奖品 </option>
|
<option value="1"> 默认奖品 </option>
|
||||||
<option value="2"> 普通奖品 </option>
|
<option value="2"> 普通奖品 </option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 创建者 -->
|
<!-- 分区 -->
|
||||||
<div class="form-group">
|
<div class="form-group awardPartitionId">
|
||||||
<label for="" class="col-sm-3 control-label">创建者:</label>
|
<label for="awardPartitionId2"
|
||||||
|
class="col-sm-3 control-label">分区:</label>
|
||||||
|
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" id="creator2" name="creator2" class="validate[required]">
|
<select name="awardPartitionId2"
|
||||||
|
id="awardPartitionId2">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 创建者 -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">创建者:</label>
|
||||||
|
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text"
|
||||||
|
id="creator2"
|
||||||
|
name="creator2"
|
||||||
|
class="validate[required]">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="btn btn-default" type="button" id="editReset">重置</button>
|
<button class="btn btn-default"
|
||||||
<button class="btn btn-primary" type="button" id="editSave">保存</button>
|
type="button"
|
||||||
|
id="editReset">重置</button>
|
||||||
|
<button class="btn btn-primary"
|
||||||
|
type="button"
|
||||||
|
id="editSave">保存</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -243,6 +362,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||||
|
|
||||||
|
var partitionInfo = {}
|
||||||
var idObj = {};
|
var idObj = {};
|
||||||
var typeObj = {};
|
var typeObj = {};
|
||||||
var pId = '', saveId = '';
|
var pId = '', saveId = '';
|
||||||
@@ -251,32 +371,85 @@ var ACCURACY = 1000; // 小数点精度
|
|||||||
var RATIO_PART = 100000; // 概率换算单位
|
var RATIO_PART = 100000; // 概率换算单位
|
||||||
export default {
|
export default {
|
||||||
name: "PrizeManageAdminView",
|
name: "PrizeManageAdminView",
|
||||||
setup() {
|
setup () {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.initData();
|
this.initData();
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted () {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData() {
|
initData () {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
var main = {
|
var main = {
|
||||||
init: function () {
|
init: function () {
|
||||||
|
this.initPartitionIdSelect();
|
||||||
|
|
||||||
$('.deviateRange').hide();
|
$('.deviateRange').hide();
|
||||||
$('.chargeDeviateRange').hide();
|
$('.chargeDeviateRange').hide();
|
||||||
$('.diamondDeviateRange').hide();
|
$('.diamondDeviateRange').hide();
|
||||||
|
|
||||||
this.eventRegister();
|
this.eventRegister();
|
||||||
this.getDataFormBack();
|
this.getDataFormBack();
|
||||||
|
|
||||||
this.initDeviateRangeSelect();
|
this.initDeviateRangeSelect();
|
||||||
this.initDiamondDeviateRangeSelect();
|
this.initDiamondDeviateRangeSelect();
|
||||||
//$('#selectReplacePrize').hide();
|
//$('#selectReplacePrize').hide();
|
||||||
//this.initReplacePrizeSelect();
|
//this.initReplacePrizeSelect();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
initPartitionIdSelect: function () {
|
||||||
|
$.ajax({
|
||||||
|
type: 'get',
|
||||||
|
url: '/partition/listPartitionInfo',
|
||||||
|
dataType: 'json',
|
||||||
|
success: function (json) {
|
||||||
|
if (json.code == 200) {
|
||||||
|
var awardPartitionId = $("#awardPartitionId");
|
||||||
|
awardPartitionId.empty();
|
||||||
|
|
||||||
|
var awardPartitionId2 = $("#awardPartitionId2");
|
||||||
|
awardPartitionId2.empty();
|
||||||
|
|
||||||
|
var partitionId = $("#partitionId");
|
||||||
|
partitionId.empty();
|
||||||
|
|
||||||
|
var defaultOption = $('<option></option>').attr('value', '').text("全部");
|
||||||
|
partitionId.append(defaultOption);
|
||||||
|
|
||||||
|
// 遍历数据并添加 option
|
||||||
|
$.each(json.data, function (index, item) {
|
||||||
|
// 创建新的 option 元素
|
||||||
|
var option = $('<option></option>')
|
||||||
|
.attr('value', item.id) // 设置 value 属性
|
||||||
|
.text(item.desc); // 设置文本内容
|
||||||
|
|
||||||
|
// 追加到 select 元素
|
||||||
|
partitionId.append(option.clone());
|
||||||
|
|
||||||
|
awardPartitionId.append(option.clone());
|
||||||
|
|
||||||
|
awardPartitionId2.append(option.clone());
|
||||||
|
});
|
||||||
|
|
||||||
|
partitionInfo = json.data.reduce((acc, item) => {
|
||||||
|
acc[item.id] = item.desc;
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#partitionId').change(function () {
|
||||||
|
const partitionId = $(this).val();
|
||||||
|
main.initDeviateRangeSelect(partitionId);
|
||||||
|
main.initDiamondDeviateRangeSelect(partitionId);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
eventRegister: function () {
|
eventRegister: function () {
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -306,36 +479,38 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
initDeviateRangeSelect: function () {
|
initDeviateRangeSelect: function (partitionId) {
|
||||||
let options = $('#deviateRange').children();
|
$('#deviateRange').empty();
|
||||||
if (options.length <= 0) {
|
|
||||||
$.get('/admin/deviateRange/list?type=1', {}, function (res) {
|
$.get('/admin/deviateRange/list?type=1', {}, function (res) {
|
||||||
if (res.total > 0) {
|
if (res.total > 0) {
|
||||||
var rows = res.rows;
|
var rows = res.rows;
|
||||||
for (var i = 0; i < rows.length; i++) {
|
for (var i = 0; i < rows.length; i++) {
|
||||||
var deviateRange = rows[i];
|
var deviateRange = rows[i];
|
||||||
var str = '<option value=' + deviateRange.id + '>' + deviateRange.lowerLimit + '~' + deviateRange.upperLimit + '</option>';
|
if (undefined != partitionId && '' != partitionId && deviateRange.partitionId == partitionId) {
|
||||||
|
var str = '<option partitionId = ' + deviateRange.partitionId + ' value=' + deviateRange.id + '>' + deviateRange.lowerLimit + '~' + deviateRange.upperLimit + '</option>';
|
||||||
$('#deviateRange').append(str);
|
$('#deviateRange').append(str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
initDiamondDeviateRangeSelect: function () {
|
initDiamondDeviateRangeSelect: function (partitionId) {
|
||||||
let options = $('#diamondDeviateRange').children();
|
$('#diamondDeviateRange').empty();
|
||||||
if (options.length <= 0) {
|
|
||||||
$.get('/admin/deviateRange/list?type=4', {}, function (res) {
|
$.get('/admin/deviateRange/list?type=4', {}, function (res) {
|
||||||
if (res.total > 0) {
|
if (res.total > 0) {
|
||||||
var rows = res.rows;
|
var rows = res.rows;
|
||||||
for (var i = 0; i < rows.length; i++) {
|
for (var i = 0; i < rows.length; i++) {
|
||||||
var deviateRange = rows[i];
|
var deviateRange = rows[i];
|
||||||
var str = '<option value=' + deviateRange.id + '>' + deviateRange.lowerLimit + '~' + deviateRange.upperLimit + '</option>';
|
if (undefined != partitionId && '' != partitionId && deviateRange.partitionId == partitionId) {
|
||||||
|
var str = '<option partitionId = ' + deviateRange.partitionId + ' value=' + deviateRange.id + '>' + deviateRange.lowerLimit + '~' + deviateRange.upperLimit + '</option>';
|
||||||
$('#diamondDeviateRange').append(str);
|
$('#diamondDeviateRange').append(str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
initReplacePrizeSelect: function () {
|
initReplacePrizeSelect: function () {
|
||||||
@@ -358,7 +533,7 @@ export default {
|
|||||||
$('#table').bootstrapTable('destroy');
|
$('#table').bootstrapTable('destroy');
|
||||||
$('#table').bootstrapTable({
|
$('#table').bootstrapTable({
|
||||||
columns: [
|
columns: [
|
||||||
{ field: 'id', title: '奖品编号', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'id', title: '奖品编号', align: 'center', valign: 'middle', width: '3%' },
|
||||||
{
|
{
|
||||||
field: 'prizeName', title: '奖品名称', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
field: 'prizeName', title: '奖品名称', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
||||||
var key = row.prizeId;
|
var key = row.prizeId;
|
||||||
@@ -448,6 +623,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'usePrizeNum', title: '被抽中数量', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'usePrizeNum', title: '被抽中数量', align: 'center', valign: 'middle', width: '10%' },
|
||||||
|
{
|
||||||
|
field: 'partitionId', title: '分区', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
||||||
|
return partitionInfo[val] || val;
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: '', title: '操作', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
field: '', title: '操作', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
||||||
var key = row.id;
|
var key = row.id;
|
||||||
@@ -463,13 +643,14 @@ export default {
|
|||||||
pageList: [10, 20, 30, 50],
|
pageList: [10, 20, 30, 50],
|
||||||
sidePagination: 'server',
|
sidePagination: 'server',
|
||||||
queryParamsType: 'undefined',
|
queryParamsType: 'undefined',
|
||||||
queryParams: function queryParams(params) {
|
queryParams: function queryParams (params) {
|
||||||
|
|
||||||
var param = {
|
var param = {
|
||||||
pageSize: params.pageSize,
|
pageSize: params.pageSize,
|
||||||
pageNumber: params.pageNumber,
|
pageNumber: params.pageNumber,
|
||||||
poolType: parseInt($('#jackpotType').val()),
|
poolType: parseInt($('#jackpotType').val()),
|
||||||
deviateRangeId: getDeviateRangeId()
|
deviateRangeId: getDeviateRangeId(),
|
||||||
|
partitionId: $('#partitionId').val(),
|
||||||
};
|
};
|
||||||
|
|
||||||
return param;
|
return param;
|
||||||
@@ -479,7 +660,6 @@ export default {
|
|||||||
url: '/admin/prizePoolItem/list',
|
url: '/admin/prizePoolItem/list',
|
||||||
onLoadSuccess: function (res) {
|
onLoadSuccess: function (res) {
|
||||||
console.log('load success');
|
console.log('load success');
|
||||||
console.log(res.rows);
|
|
||||||
var arr = [];
|
var arr = [];
|
||||||
var Num = 0;
|
var Num = 0;
|
||||||
var expectNum = 0;
|
var expectNum = 0;
|
||||||
@@ -587,7 +767,6 @@ export default {
|
|||||||
$('#addModal').find('#awardType').on('change', function () {
|
$('#addModal').find('#awardType').on('change', function () {
|
||||||
$('#awardChoose').find('option').remove();
|
$('#awardChoose').find('option').remove();
|
||||||
var key = $(this).val();
|
var key = $(this).val();
|
||||||
console.log(key);
|
|
||||||
// var str = '<option></option>';
|
// var str = '<option></option>';
|
||||||
// $('#awardChoose').append(str);
|
// $('#awardChoose').append(str);
|
||||||
var str;
|
var str;
|
||||||
@@ -605,12 +784,12 @@ export default {
|
|||||||
var id = $(this).data('id');
|
var id = $(this).data('id');
|
||||||
var data = $('#table').bootstrapTable('getRowByUniqueId', id);
|
var data = $('#table').bootstrapTable('getRowByUniqueId', id);
|
||||||
|
|
||||||
console.log(data);
|
|
||||||
$('#editModal').find('#jackpotNumber2').val(data.prizeNum);
|
$('#editModal').find('#jackpotNumber2').val(data.prizeNum);
|
||||||
$('#editModal').find('#winningRate2').val(data.occupationRatio / ACCURACY);
|
$('#editModal').find('#winningRate2').val(data.occupationRatio / ACCURACY);
|
||||||
$('#editModal').find('#showRate2').val(data.showRatio / ACCURACY);
|
$('#editModal').find('#showRate2').val(data.showRatio / ACCURACY);
|
||||||
$('#editModal').find('#creator2').val(data.creator);
|
$('#editModal').find('#creator2').val(data.creator);
|
||||||
$('#editModal').find('#itemType2').val(data.itemType);
|
$('#editModal').find('#itemType2').val(data.itemType);
|
||||||
|
$('#editModal').find('#awardPartitionId2').val(data.partitionId);
|
||||||
pId = data.prizeId;
|
pId = data.prizeId;
|
||||||
saveId = id;
|
saveId = id;
|
||||||
});
|
});
|
||||||
@@ -660,7 +839,8 @@ export default {
|
|||||||
occupationRatio: $('#winningRate').val() * ACCURACY,
|
occupationRatio: $('#winningRate').val() * ACCURACY,
|
||||||
showRatio: $('#showRate').val() * ACCURACY,
|
showRatio: $('#showRate').val() * ACCURACY,
|
||||||
creator: $('#creator').val(),
|
creator: $('#creator').val(),
|
||||||
itemType: $('#itemType').val()
|
itemType: $('#itemType').val(),
|
||||||
|
partitionId: $('#awardPartitionId').val(),
|
||||||
}, function (res) {
|
}, function (res) {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
$('#addModal').modal('hide');
|
$('#addModal').modal('hide');
|
||||||
@@ -715,7 +895,8 @@ export default {
|
|||||||
occupationRatio: $('#winningRate2').val() * ACCURACY,
|
occupationRatio: $('#winningRate2').val() * ACCURACY,
|
||||||
showRatio: $('#showRate2').val() * ACCURACY,
|
showRatio: $('#showRate2').val() * ACCURACY,
|
||||||
creator: $('#creator2').val(),
|
creator: $('#creator2').val(),
|
||||||
itemType: $('#itemType2').val()
|
itemType: $('#itemType2').val(),
|
||||||
|
partitionId: $('#awardPartitionId2').val(),
|
||||||
}, function (res) {
|
}, function (res) {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
@@ -774,7 +955,7 @@ export default {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function clearModal() {
|
function clearModal () {
|
||||||
$('#addForm').find('input[type=text],select,input[type=hidden]').each(function () {
|
$('#addForm').find('input[type=text],select,input[type=hidden]').each(function () {
|
||||||
$(this).val('');
|
$(this).val('');
|
||||||
});
|
});
|
||||||
@@ -783,7 +964,7 @@ function clearModal() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDeviateRangeId() {
|
function getDeviateRangeId () {
|
||||||
if ($('#deviateRange').val()) {
|
if ($('#deviateRange').val()) {
|
||||||
var jackpotType = $('#jackpotType').val();
|
var jackpotType = $('#jackpotType').val();
|
||||||
if (jackpotType == '4') {
|
if (jackpotType == '4') {
|
||||||
@@ -814,7 +995,7 @@ function getDeviateRangeId() {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#toolbar>div:first-child {
|
#toolbar > div:first-child {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,179 +1,197 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1 id="itemTitle"></h1>
|
<h1 id="itemTitle"></h1>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div id="table"></div>
|
<div id="table"></div>
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<form action="/admin/box/record/export" id="searchForm" method="POST">
|
<form action="/admin/box/record/export"
|
||||||
平台号:<input type="text" id="msNo" name="msNo" class="input-sm" placeholder="请输入平台号">
|
id="searchForm"
|
||||||
|
method="POST">
|
||||||
|
平台号:<input type="text"
|
||||||
|
id="msNo"
|
||||||
|
name="msNo"
|
||||||
|
class="input-sm"
|
||||||
|
placeholder="请输入平台号">
|
||||||
|
|
||||||
奖品名称:<input type="text" id="prizeName" name="prizeName" class="input-sm"
|
奖品名称:<input type="text"
|
||||||
placeholder="请输入奖品名称">
|
id="prizeName"
|
||||||
|
name="prizeName"
|
||||||
|
class="input-sm"
|
||||||
|
placeholder="请输入奖品名称">
|
||||||
|
|
||||||
日期:<input type="text" name="startDate" id="timeBegin" class="input-sm datetime"
|
日期:<input type="text"
|
||||||
placeholder="起始时间">
|
name="startDate"
|
||||||
- <input type="text" name="endDate" id="timeEnd" class="input-sm datetime"
|
id="timeBegin"
|
||||||
placeholder="结束时间">
|
class="input-sm datetime"
|
||||||
|
placeholder="起始时间">
|
||||||
|
- <input type="text"
|
||||||
|
name="endDate"
|
||||||
|
id="timeEnd"
|
||||||
|
class="input-sm datetime"
|
||||||
|
placeholder="结束时间">
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<button id="searchBtn" class="btn btn-primary">筛选</button>
|
<button id="searchBtn"
|
||||||
<button id="exportBtn" class="btn btn-primary">导出</button>
|
class="btn btn-primary">筛选</button>
|
||||||
</div>
|
<button id="exportBtn"
|
||||||
</div>
|
class="btn btn-primary">导出</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PrizeRecordAdminView",
|
name: "PrizeRecordAdminView",
|
||||||
setup() {
|
setup () {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.initData();
|
this.initData();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initData () {
|
||||||
|
$(function () {
|
||||||
|
|
||||||
|
$('.datetime').datetimepicker({
|
||||||
|
format: 'yyyy-mm-dd hh:ii:00',
|
||||||
|
autoclose: true
|
||||||
});
|
});
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initData() {
|
|
||||||
$(function () {
|
|
||||||
|
|
||||||
$('.datetime').datetimepicker({
|
var main = {
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
init: function () {
|
||||||
autoclose: true
|
this.eventRegister();
|
||||||
});
|
this.getDataFromBack();
|
||||||
|
},
|
||||||
|
|
||||||
var main = {
|
eventRegister: function () {
|
||||||
init: function () {
|
|
||||||
this.eventRegister();
|
|
||||||
this.getDataFromBack();
|
|
||||||
},
|
|
||||||
|
|
||||||
eventRegister: function () {
|
},
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
getDataFromBack: function () {
|
getDataFromBack: function () {
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
main.init();
|
main.init();
|
||||||
|
|
||||||
$('#table').bootstrapTable('destroy');
|
$('#table').bootstrapTable('destroy');
|
||||||
$('#table').bootstrapTable({
|
$('#table').bootstrapTable({
|
||||||
columns: [
|
columns: [
|
||||||
{ field: 'id', title: 'id', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'id', title: 'id', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'erbanNo', title: '平台号', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'erbanNo', title: '平台号', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'nick', title: '用户昵称', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'nick', title: '用户昵称', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'prizeName', title: '奖品名称', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'partition', title: '分区', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{
|
{ field: 'prizeName', title: '奖品名称', align: 'center', valign: 'middle', width: '10%' },
|
||||||
field: 'createTime', title: '抽奖时间', align: 'center', valign: 'middle', width: '20%', formatter: function (val, row, index) {
|
{
|
||||||
if (val) {
|
field: 'createTime', title: '抽奖时间', align: 'center', valign: 'middle', width: '20%', formatter: function (val, row, index) {
|
||||||
var date = new Date(val);
|
if (val) {
|
||||||
return date.format('yyyy-MM-dd hh:mm:ss');
|
var date = new Date(val);
|
||||||
} else {
|
return date.format('yyyy-MM-dd hh:mm:ss');
|
||||||
return '-';
|
} else {
|
||||||
}
|
return '-';
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
{ field: 'platformValue', title: '平台价值', align: 'center', valign: 'middle', width: '10%' },
|
},
|
||||||
{ field: 'actualValue', title: '实际价值', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'platformValue', title: '平台价值', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{
|
{ field: 'actualValue', title: '实际价值', align: 'center', valign: 'middle', width: '10%' },
|
||||||
field: 'prizePoolType', title: '转盘类型', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
{
|
||||||
switch (row.prizePoolType) {
|
field: 'prizePoolType', title: '转盘类型', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
||||||
case 1:
|
switch (row.prizePoolType) {
|
||||||
return '幸运新人奖池';
|
case 1:
|
||||||
|
return '幸运新人奖池';
|
||||||
case 2:
|
|
||||||
return '幸运普通奖池';
|
|
||||||
|
|
||||||
case 3:
|
|
||||||
return '幸运白名单奖池';
|
|
||||||
|
|
||||||
case 4:
|
|
||||||
return '幸运偏差奖池';
|
|
||||||
|
|
||||||
case 12:
|
|
||||||
return '幸运次数奖池';
|
|
||||||
|
|
||||||
case 7:
|
|
||||||
return '梦幻普通奖池';
|
|
||||||
|
|
||||||
case 9:
|
|
||||||
return '梦幻偏差奖池';
|
|
||||||
|
|
||||||
case 10:
|
|
||||||
return '梦幻新人奖池';
|
|
||||||
|
|
||||||
case 11:
|
|
||||||
return '梦幻白名单奖池';
|
|
||||||
|
|
||||||
case 13:
|
|
||||||
return '普通管理奖池';
|
|
||||||
|
|
||||||
case 14:
|
|
||||||
return '梦幻管理奖池';
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
cache: false,
|
|
||||||
striped: true,
|
|
||||||
showRefresh: false,
|
|
||||||
pageSize: 10,
|
|
||||||
pagination: true,
|
|
||||||
pageList: [10, 20, 30, 50],
|
|
||||||
sidePagination: 'server',
|
|
||||||
queryParamsType: 'undefined',
|
|
||||||
queryParams: function queryParams(params) {
|
|
||||||
var param = {
|
|
||||||
pageSize: params.pageSize,
|
|
||||||
pageNumber: params.pageNumber,
|
|
||||||
startDate: $('#timeBegin').val(),
|
|
||||||
endDate: $('#timeEnd').val(),
|
|
||||||
msNo: $('#msNo').val(),
|
|
||||||
prizeName: $("#prizeName").val()
|
|
||||||
};
|
|
||||||
return param;
|
|
||||||
},
|
|
||||||
uniqueId: 'id',
|
|
||||||
toolbar: '#toolbar',
|
|
||||||
url: '/admin/box/record/list',
|
|
||||||
onLOadSuccess: function () {
|
|
||||||
console.log('load success');
|
|
||||||
},
|
|
||||||
onLoadError: function () {
|
|
||||||
console.log('load fail');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// 筛选按钮点击事件
|
|
||||||
$('#searchBtn').on('click', function () {
|
|
||||||
TableHelper.doRefresh('#table');
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#exportBtn").on('click', function () {
|
case 2:
|
||||||
$("#searchForm").submit();
|
return '幸运普通奖池';
|
||||||
})
|
|
||||||
})
|
case 3:
|
||||||
}
|
return '幸运白名单奖池';
|
||||||
},
|
|
||||||
|
case 4:
|
||||||
|
return '幸运偏差奖池';
|
||||||
|
|
||||||
|
case 12:
|
||||||
|
return '幸运次数奖池';
|
||||||
|
|
||||||
|
case 7:
|
||||||
|
return '梦幻普通奖池';
|
||||||
|
|
||||||
|
case 9:
|
||||||
|
return '梦幻偏差奖池';
|
||||||
|
|
||||||
|
case 10:
|
||||||
|
return '梦幻新人奖池';
|
||||||
|
|
||||||
|
case 11:
|
||||||
|
return '梦幻白名单奖池';
|
||||||
|
|
||||||
|
case 13:
|
||||||
|
return '普通管理奖池';
|
||||||
|
|
||||||
|
case 14:
|
||||||
|
return '梦幻管理奖池';
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
cache: false,
|
||||||
|
striped: true,
|
||||||
|
showRefresh: false,
|
||||||
|
pageSize: 10,
|
||||||
|
pagination: true,
|
||||||
|
pageList: [10, 20, 30, 50],
|
||||||
|
sidePagination: 'server',
|
||||||
|
queryParamsType: 'undefined',
|
||||||
|
queryParams: function queryParams (params) {
|
||||||
|
var param = {
|
||||||
|
pageSize: params.pageSize,
|
||||||
|
pageNumber: params.pageNumber,
|
||||||
|
startDate: $('#timeBegin').val(),
|
||||||
|
endDate: $('#timeEnd').val(),
|
||||||
|
msNo: $('#msNo').val(),
|
||||||
|
prizeName: $("#prizeName").val()
|
||||||
|
};
|
||||||
|
return param;
|
||||||
|
},
|
||||||
|
uniqueId: 'id',
|
||||||
|
toolbar: '#toolbar',
|
||||||
|
url: '/admin/box/record/list',
|
||||||
|
onLOadSuccess: function () {
|
||||||
|
console.log('load success');
|
||||||
|
},
|
||||||
|
onLoadError: function () {
|
||||||
|
console.log('load fail');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 筛选按钮点击事件
|
||||||
|
$('#searchBtn').on('click', function () {
|
||||||
|
TableHelper.doRefresh('#table');
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#exportBtn").on('click', function () {
|
||||||
|
$("#searchForm").submit();
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,296 +1,315 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1 id="itemTitle"></h1>
|
<h1 id="itemTitle"></h1>
|
||||||
</section>
|
</section>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div id="table"></div>
|
<div id="table"></div>
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<label class="source">
|
<label class="source">
|
||||||
选择时间: <input type="text" name="startTime" id="startTime" class="input-sm">
|
选择时间: <input type="text"
|
||||||
至 <input type="text" id="endTime" name="endTime" class="input-sm">
|
name="startTime"
|
||||||
</label>
|
id="startTime"
|
||||||
<label class="source">
|
class="input-sm">
|
||||||
宝箱类型: <select name="boxType" id="boxType" class="input-sm">
|
至 <input type="text"
|
||||||
<option value="0">全部</option>
|
id="endTime"
|
||||||
<option value="1">幸运许愿池</option>
|
name="endTime"
|
||||||
<option value="2">梦幻许愿池</option>
|
class="input-sm">
|
||||||
</select>
|
</label>
|
||||||
</label>
|
<label class="source">
|
||||||
<label class="source">
|
宝箱类型: <select name="boxType"
|
||||||
查询凭据:<select name="source" id="source" class="input-sm">
|
id="boxType"
|
||||||
<option value="1">平台号</option>
|
class="input-sm">
|
||||||
<option value="2">偏差范围</option>
|
<option value="0">全部</option>
|
||||||
</select>
|
<option value="1">幸运许愿池</option>
|
||||||
</label>
|
<option value="2">梦幻许愿池</option>
|
||||||
<label class="msNo">
|
</select>
|
||||||
平台号:<input type="text" placeholder="请输入草莓号" id="msNo" class="input-sm">
|
</label>
|
||||||
</label>
|
<label class="source">
|
||||||
<label class="deviation">
|
查询凭据:<select name="source"
|
||||||
偏差值: <input type="text" id="minDis" class="input-m"> - <input type="text" id="maxDis"
|
id="source"
|
||||||
class="input-m">
|
class="input-sm">
|
||||||
</label>
|
<option value="1">平台号</option>
|
||||||
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
|
<option value="2">偏差范围</option>
|
||||||
</div>
|
</select>
|
||||||
</section>
|
</label>
|
||||||
</div>
|
<label class="msNo">
|
||||||
</div>
|
平台号:<input type="text"
|
||||||
</section>
|
placeholder="请输入草莓号"
|
||||||
|
id="msNo"
|
||||||
|
class="input-sm">
|
||||||
|
</label>
|
||||||
|
<label class="deviation">
|
||||||
|
偏差值: <input type="text"
|
||||||
|
id="minDis"
|
||||||
|
class="input-m"> - <input type="text"
|
||||||
|
id="maxDis"
|
||||||
|
class="input-m">
|
||||||
|
</label>
|
||||||
|
<button id="btnSearch"
|
||||||
|
class="btn btn-sm btn-primary">查询</button>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PrizeStatisAdminNewView",
|
name: "PrizeStatisAdminNewView",
|
||||||
setup() {
|
setup () {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.initData();
|
this.initData();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData() {
|
initData () {
|
||||||
$(function () {
|
$(function () {
|
||||||
//searchHistory();
|
//searchHistory();
|
||||||
var whiteList = {};
|
var whiteList = {};
|
||||||
requestWhiteList(searchHistory());
|
requestWhiteList(searchHistory());
|
||||||
function searchHistory() {
|
function searchHistory () {
|
||||||
$('#table').bootstrapTable('destroy');
|
$('#table').bootstrapTable('destroy');
|
||||||
$('#table').bootstrapTable({
|
$('#table').bootstrapTable({
|
||||||
columns: [
|
columns: [
|
||||||
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'erbanNo', title: '平台号', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'erbanNo', title: '平台号', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'nick', title: '昵称', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'nick', title: '昵称', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'totalPurchaseMoney', title: '历史抽奖充值总额', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'partition', title: '分区', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'totalDrawMoney', title: '历史抽奖总额', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'totalPurchaseMoney', title: '历史抽奖充值总额', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'totalPlatformValue', title: '历史获奖平台价值', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'totalDrawMoney', title: '历史抽奖总额', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'totalActualValue', title: '历史获奖实际价值', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'totalPlatformValue', title: '历史获奖平台价值', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{
|
{ field: 'totalActualValue', title: '历史获奖实际价值', align: 'center', valign: 'middle', width: '10%' },
|
||||||
field: 'deviation', title: '偏差值', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
{
|
||||||
if (val > 0) {
|
field: 'deviation', title: '偏差值', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
||||||
return '<span style="color:red">+' + val + '</span>';
|
if (val > 0) {
|
||||||
} else {
|
return '<span style="color:red">+' + val + '</span>';
|
||||||
return '<span style="color:green">' + val + '</span>';
|
} else {
|
||||||
}
|
return '<span style="color:green">' + val + '</span>';
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'useNum', title: '历史白名单次数', align: 'center', valign: 'middle', width: '5%', formatter: function (val, row, index) {
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid]) {
|
|
||||||
return whiteList[uid].useNum;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'whiteStatus', title: '白名单状态', align: 'center', valign: 'middle', width: '5%', formatter: function (val, row, index) {
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid] && whiteList[uid].availableNum > 0) {
|
|
||||||
return '<span style="color:red">待抽奖</span>';
|
|
||||||
} else {
|
|
||||||
return '<span style="color:green">未设置</span>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'diamondUseNum',
|
|
||||||
title: '梦幻白名单次数',
|
|
||||||
align: 'center',
|
|
||||||
valign: 'middle',
|
|
||||||
width: '5%',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid]) {
|
|
||||||
return whiteList[uid].useDiamondNum;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'diamondWhiteStatus',
|
|
||||||
title: '梦幻白名单状态',
|
|
||||||
align: 'center',
|
|
||||||
valign: 'middle',
|
|
||||||
width: '5%',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid] && whiteList[uid].availableDiamondNum > 0) {
|
|
||||||
return '<span style="color:red">待抽奖</span>';
|
|
||||||
} else {
|
|
||||||
return '<span style="color:green">未设置</span>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'tmp',
|
|
||||||
title: '操作',
|
|
||||||
align: 'center',
|
|
||||||
width: '10%',
|
|
||||||
valign: 'middle',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
var btnStr = "";
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid] && whiteList[uid].availableNum > 0) {
|
|
||||||
btnStr += "<button class='btn btn-sm btn-warning opt-del normal-box-del' data-id=" + uid + ">移除普通白名单</button>";
|
|
||||||
} else {
|
|
||||||
btnStr += "<button class='btn btn-sm btn-success opt-set normal-box-set' data-id=" + uid + ">设置普通白名单</button>";
|
|
||||||
}
|
|
||||||
if (whiteList[uid] && whiteList[uid].availableDiamondNum > 0) {
|
|
||||||
btnStr += "<button class='btn btn-sm btn-warning opt-del diamond-box-del' data-id=" + uid + ">移除梦幻白名单</button>";
|
|
||||||
} else {
|
|
||||||
btnStr += "<button class='btn btn-sm btn-success opt-set diamond-box-set' data-id=" + uid + ">设置梦幻白名单</button>";
|
|
||||||
}
|
|
||||||
return btnStr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
cache: false,
|
|
||||||
striped: true,
|
|
||||||
showRefresh: false,
|
|
||||||
pageSize: 10,
|
|
||||||
pagination: true,
|
|
||||||
pageList: [10, 20, 30, 50],
|
|
||||||
sidePagination: "server", //表示服务端请求
|
|
||||||
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
|
||||||
//设置为limit可以获取limit, offset, search, sort, order
|
|
||||||
queryParamsType: "undefined",
|
|
||||||
queryParams: function queryParams(params) { //设置查询参数
|
|
||||||
var param = {
|
|
||||||
pageSize: params.pageSize,
|
|
||||||
pageNumber: params.pageNumber,
|
|
||||||
msNo: $('#msNo').val(),
|
|
||||||
boxType: $("#boxType").val(),
|
|
||||||
minDis: $('#minDis').val(),
|
|
||||||
maxDis: $('#maxDis').val(),
|
|
||||||
source: $('#source').val(),
|
|
||||||
startTime: $("#startTime").val(),
|
|
||||||
endTime: $("#endTime").val()
|
|
||||||
};
|
|
||||||
console.log(param);
|
|
||||||
return param;
|
|
||||||
},
|
|
||||||
uniqueId: 'uid',
|
|
||||||
toolbar: '#toolbar',
|
|
||||||
url: '/admin/box/record/statis/list',
|
|
||||||
onLoadSuccess: function () { //加载成功时执行
|
|
||||||
console.log("load success");
|
|
||||||
},
|
|
||||||
onLoadError: function () { //加载失败时执行
|
|
||||||
console.log("load fail");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
$('#source').on('change', function () {
|
{
|
||||||
var source = parseInt($(this).val());
|
field: 'useNum', title: '历史白名单次数', align: 'center', valign: 'middle', width: '5%', formatter: function (val, row, index) {
|
||||||
if (source == 1) {
|
var uid = row.uid;
|
||||||
$('.msNo').show();
|
if (whiteList[uid]) {
|
||||||
$('.deviation').hide();
|
return whiteList[uid].useNum;
|
||||||
} else {
|
} else {
|
||||||
$('.msNo').hide();
|
return 0;
|
||||||
$('.deviation').show();
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#table').on('click', '.normal-box-set', function () {
|
|
||||||
var uid = $(this).data('id');
|
|
||||||
editWhiteList(uid, 1, 1);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#table').on('click', '.diamond-box-set', function () {
|
|
||||||
var uid = $(this).data('id');
|
|
||||||
editWhiteList(uid, 1, 2);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#table').on('click', '.normal-box-del', function () {
|
|
||||||
var uid = $(this).data('id');
|
|
||||||
editWhiteList(uid, 0, 1);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#table').on('click', '.diamond-box-del', function () {
|
|
||||||
var uid = $(this).data('id');
|
|
||||||
editWhiteList(uid, 0, 2);
|
|
||||||
});
|
|
||||||
$('#btnSearch').on('click', function () {
|
|
||||||
var source = $('#source').val();
|
|
||||||
var msNo = $('#msNo').val();
|
|
||||||
var minDis = $('#minDis').val();
|
|
||||||
var maxDis = $('#maxDis').val();
|
|
||||||
if (source == 1 && msNo == '') {
|
|
||||||
$("#tipMsg").text("请输入平台号");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
return;
|
|
||||||
} else if (source == 2 && (minDis == '' || maxDis == '')) {
|
|
||||||
$("#tipMsg").text("请输入偏差值");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
requestWhiteList(searchHistory());
|
|
||||||
});
|
|
||||||
|
|
||||||
function editWhiteList(uid, availableNum, boxType) {
|
|
||||||
$.post("/admin/prizeWhiteUser/save", { uid: uid, availableNum: availableNum, boxType: boxType }, function (res) {
|
|
||||||
if (res.code == 200) {
|
|
||||||
if (availableNum > 0) {
|
|
||||||
$("#tipMsg").text("设置成功");
|
|
||||||
} else {
|
|
||||||
$("#tipMsg").text("移除成功");
|
|
||||||
}
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
|
|
||||||
requestWhiteList(function () {
|
|
||||||
TableHelper.doRefresh('#table');
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
$("#tipMsg").text("设置失败");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
function requestWhiteList(callback) {
|
{
|
||||||
$.ajax({
|
field: 'whiteStatus', title: '白名单状态', align: 'center', valign: 'middle', width: '5%', formatter: function (val, row, index) {
|
||||||
url: '/admin/prizeWhiteUser/list',
|
var uid = row.uid;
|
||||||
success: function (res) {
|
if (whiteList[uid] && whiteList[uid].availableNum > 0) {
|
||||||
console.log(res);
|
return '<span style="color:red">待抽奖</span>';
|
||||||
if (res.code == 200) {
|
} else {
|
||||||
whiteList = res.data;
|
return '<span style="color:green">未设置</span>';
|
||||||
typeof callback === 'function' && callback();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
// 初始化时间选择器
|
{
|
||||||
$('#startTime').datetimepicker({
|
field: 'diamondUseNum',
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
title: '梦幻白名单次数',
|
||||||
autoclose: true
|
align: 'center',
|
||||||
})
|
valign: 'middle',
|
||||||
$("#endTime").datetimepicker({
|
width: '5%',
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
formatter: function (val, row, index) {
|
||||||
autoclose: true
|
var uid = row.uid;
|
||||||
});
|
if (whiteList[uid]) {
|
||||||
})
|
return whiteList[uid].useDiamondNum;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'diamondWhiteStatus',
|
||||||
|
title: '梦幻白名单状态',
|
||||||
|
align: 'center',
|
||||||
|
valign: 'middle',
|
||||||
|
width: '5%',
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
var uid = row.uid;
|
||||||
|
if (whiteList[uid] && whiteList[uid].availableDiamondNum > 0) {
|
||||||
|
return '<span style="color:red">待抽奖</span>';
|
||||||
|
} else {
|
||||||
|
return '<span style="color:green">未设置</span>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'tmp',
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
width: '10%',
|
||||||
|
valign: 'middle',
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
var btnStr = "";
|
||||||
|
var uid = row.uid;
|
||||||
|
if (whiteList[uid] && whiteList[uid].availableNum > 0) {
|
||||||
|
btnStr += "<button class='btn btn-sm btn-warning opt-del normal-box-del' data-id=" + uid + ">移除普通白名单</button>";
|
||||||
|
} else {
|
||||||
|
btnStr += "<button class='btn btn-sm btn-success opt-set normal-box-set' data-id=" + uid + ">设置普通白名单</button>";
|
||||||
|
}
|
||||||
|
if (whiteList[uid] && whiteList[uid].availableDiamondNum > 0) {
|
||||||
|
btnStr += "<button class='btn btn-sm btn-warning opt-del diamond-box-del' data-id=" + uid + ">移除梦幻白名单</button>";
|
||||||
|
} else {
|
||||||
|
btnStr += "<button class='btn btn-sm btn-success opt-set diamond-box-set' data-id=" + uid + ">设置梦幻白名单</button>";
|
||||||
|
}
|
||||||
|
return btnStr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
cache: false,
|
||||||
|
striped: true,
|
||||||
|
showRefresh: false,
|
||||||
|
pageSize: 10,
|
||||||
|
pagination: true,
|
||||||
|
pageList: [10, 20, 30, 50],
|
||||||
|
sidePagination: "server", //表示服务端请求
|
||||||
|
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
||||||
|
//设置为limit可以获取limit, offset, search, sort, order
|
||||||
|
queryParamsType: "undefined",
|
||||||
|
queryParams: function queryParams (params) { //设置查询参数
|
||||||
|
var param = {
|
||||||
|
pageSize: params.pageSize,
|
||||||
|
pageNumber: params.pageNumber,
|
||||||
|
msNo: $('#msNo').val(),
|
||||||
|
boxType: $("#boxType").val(),
|
||||||
|
minDis: $('#minDis').val(),
|
||||||
|
maxDis: $('#maxDis').val(),
|
||||||
|
source: $('#source').val(),
|
||||||
|
startTime: $("#startTime").val(),
|
||||||
|
endTime: $("#endTime").val()
|
||||||
|
};
|
||||||
|
console.log(param);
|
||||||
|
return param;
|
||||||
|
},
|
||||||
|
uniqueId: 'uid',
|
||||||
|
toolbar: '#toolbar',
|
||||||
|
url: '/admin/box/record/statis/list',
|
||||||
|
onLoadSuccess: function () { //加载成功时执行
|
||||||
|
console.log("load success");
|
||||||
|
},
|
||||||
|
onLoadError: function () { //加载失败时执行
|
||||||
|
console.log("load fail");
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
$('#source').on('change', function () {
|
||||||
|
var source = parseInt($(this).val());
|
||||||
|
if (source == 1) {
|
||||||
|
$('.msNo').show();
|
||||||
|
$('.deviation').hide();
|
||||||
|
} else {
|
||||||
|
$('.msNo').hide();
|
||||||
|
$('.deviation').show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#table').on('click', '.normal-box-set', function () {
|
||||||
|
var uid = $(this).data('id');
|
||||||
|
editWhiteList(uid, 1, 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#table').on('click', '.diamond-box-set', function () {
|
||||||
|
var uid = $(this).data('id');
|
||||||
|
editWhiteList(uid, 1, 2);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#table').on('click', '.normal-box-del', function () {
|
||||||
|
var uid = $(this).data('id');
|
||||||
|
editWhiteList(uid, 0, 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#table').on('click', '.diamond-box-del', function () {
|
||||||
|
var uid = $(this).data('id');
|
||||||
|
editWhiteList(uid, 0, 2);
|
||||||
|
});
|
||||||
|
$('#btnSearch').on('click', function () {
|
||||||
|
var source = $('#source').val();
|
||||||
|
var msNo = $('#msNo').val();
|
||||||
|
var minDis = $('#minDis').val();
|
||||||
|
var maxDis = $('#maxDis').val();
|
||||||
|
if (source == 1 && msNo == '') {
|
||||||
|
$("#tipMsg").text("请输入平台号");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
return;
|
||||||
|
} else if (source == 2 && (minDis == '' || maxDis == '')) {
|
||||||
|
$("#tipMsg").text("请输入偏差值");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
requestWhiteList(searchHistory());
|
||||||
|
});
|
||||||
|
|
||||||
|
function editWhiteList (uid, availableNum, boxType) {
|
||||||
|
$.post("/admin/prizeWhiteUser/save", { uid: uid, availableNum: availableNum, boxType: boxType }, function (res) {
|
||||||
|
if (res.code == 200) {
|
||||||
|
if (availableNum > 0) {
|
||||||
|
$("#tipMsg").text("设置成功");
|
||||||
|
} else {
|
||||||
|
$("#tipMsg").text("移除成功");
|
||||||
|
}
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
|
||||||
|
requestWhiteList(function () {
|
||||||
|
TableHelper.doRefresh('#table');
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
$("#tipMsg").text("设置失败");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function requestWhiteList (callback) {
|
||||||
|
$.ajax({
|
||||||
|
url: '/admin/prizeWhiteUser/list',
|
||||||
|
success: function (res) {
|
||||||
|
console.log(res);
|
||||||
|
if (res.code == 200) {
|
||||||
|
whiteList = res.data;
|
||||||
|
typeof callback === 'function' && callback();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化时间选择器
|
||||||
|
$('#startTime').datetimepicker({
|
||||||
|
format: 'yyyy-mm-dd hh:ii:00',
|
||||||
|
autoclose: true
|
||||||
|
})
|
||||||
|
$("#endTime").datetimepicker({
|
||||||
|
format: 'yyyy-mm-dd hh:ii:00',
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.deviation {
|
.deviation {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#toolbar label {
|
#toolbar label {
|
||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
}</style>
|
}
|
||||||
|
</style>
|
||||||
@@ -1,296 +1,315 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1 id="itemTitle"></h1>
|
<h1 id="itemTitle"></h1>
|
||||||
</section>
|
</section>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div id="table"></div>
|
<div id="table"></div>
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<label class="source">
|
<label class="source">
|
||||||
选择时间: <input type="text" name="startTime" id="startTime" class="input-sm">
|
选择时间: <input type="text"
|
||||||
至 <input type="text" id="endTime" name="endTime" class="input-sm">
|
name="startTime"
|
||||||
</label>
|
id="startTime"
|
||||||
<label class="source">
|
class="input-sm">
|
||||||
宝箱类型: <select name="boxType" id="boxType" class="input-sm">
|
至 <input type="text"
|
||||||
<option value="0">全部</option>
|
id="endTime"
|
||||||
<option value="1">幸运许愿池</option>
|
name="endTime"
|
||||||
<option value="2">梦幻许愿池</option>
|
class="input-sm">
|
||||||
</select>
|
</label>
|
||||||
</label>
|
<label class="source">
|
||||||
<label class="source">
|
宝箱类型: <select name="boxType"
|
||||||
查询凭据:<select name="source" id="source" class="input-sm">
|
id="boxType"
|
||||||
<option value="1">平台号</option>
|
class="input-sm">
|
||||||
<option value="2">偏差范围</option>
|
<option value="0">全部</option>
|
||||||
</select>
|
<option value="1">幸运许愿池</option>
|
||||||
</label>
|
<option value="2">梦幻许愿池</option>
|
||||||
<label class="msNo">
|
</select>
|
||||||
平台号:<input type="text" placeholder="请输入草莓号" id="msNo" class="input-sm">
|
</label>
|
||||||
</label>
|
<label class="source">
|
||||||
<label class="deviation">
|
查询凭据:<select name="source"
|
||||||
偏差值: <input type="text" id="minDis" class="input-m"> - <input type="text" id="maxDis"
|
id="source"
|
||||||
class="input-m">
|
class="input-sm">
|
||||||
</label>
|
<option value="1">平台号</option>
|
||||||
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
|
<option value="2">偏差范围</option>
|
||||||
</div>
|
</select>
|
||||||
</section>
|
</label>
|
||||||
</div>
|
<label class="msNo">
|
||||||
</div>
|
平台号:<input type="text"
|
||||||
</section>
|
placeholder="请输入草莓号"
|
||||||
|
id="msNo"
|
||||||
|
class="input-sm">
|
||||||
|
</label>
|
||||||
|
<label class="deviation">
|
||||||
|
偏差值: <input type="text"
|
||||||
|
id="minDis"
|
||||||
|
class="input-m"> - <input type="text"
|
||||||
|
id="maxDis"
|
||||||
|
class="input-m">
|
||||||
|
</label>
|
||||||
|
<button id="btnSearch"
|
||||||
|
class="btn btn-sm btn-primary">查询</button>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PrizeStatisAdminView",
|
name: "PrizeStatisAdminView",
|
||||||
setup() {
|
setup () {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.initData();
|
this.initData();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData() {
|
initData () {
|
||||||
$(function () {
|
$(function () {
|
||||||
//searchHistory();
|
//searchHistory();
|
||||||
var whiteList = {};
|
var whiteList = {};
|
||||||
requestWhiteList(searchHistory());
|
requestWhiteList(searchHistory());
|
||||||
function searchHistory() {
|
function searchHistory () {
|
||||||
$('#table').bootstrapTable('destroy');
|
$('#table').bootstrapTable('destroy');
|
||||||
$('#table').bootstrapTable({
|
$('#table').bootstrapTable({
|
||||||
columns: [
|
columns: [
|
||||||
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'erbanNo', title: '平台号', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'erbanNo', title: '平台号', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'nick', title: '昵称', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'nick', title: '昵称', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'totalPurchaseMoney', title: '历史抽奖充值总额', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'partition', title: '分区', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'totalDrawMoney', title: '历史抽奖总额', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'totalPurchaseMoney', title: '历史抽奖充值总额', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'totalPlatformValue', title: '历史获奖平台价值', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'totalDrawMoney', title: '历史抽奖总额', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'totalActualValue', title: '历史获奖实际价值', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'totalPlatformValue', title: '历史获奖平台价值', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{
|
{ field: 'totalActualValue', title: '历史获奖实际价值', align: 'center', valign: 'middle', width: '10%' },
|
||||||
field: 'deviation', title: '偏差值', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
{
|
||||||
if (val > 0) {
|
field: 'deviation', title: '偏差值', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
||||||
return '<span style="color:red">+' + val + '</span>';
|
if (val > 0) {
|
||||||
} else {
|
return '<span style="color:red">+' + val + '</span>';
|
||||||
return '<span style="color:green">' + val + '</span>';
|
} else {
|
||||||
}
|
return '<span style="color:green">' + val + '</span>';
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'useNum', title: '历史白名单次数', align: 'center', valign: 'middle', width: '5%', formatter: function (val, row, index) {
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid]) {
|
|
||||||
return whiteList[uid].useNum;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'whiteStatus', title: '白名单状态', align: 'center', valign: 'middle', width: '5%', formatter: function (val, row, index) {
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid] && whiteList[uid].availableNum > 0) {
|
|
||||||
return '<span style="color:red">待抽奖</span>';
|
|
||||||
} else {
|
|
||||||
return '<span style="color:green">未设置</span>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'diamondUseNum',
|
|
||||||
title: '梦幻白名单次数',
|
|
||||||
align: 'center',
|
|
||||||
valign: 'middle',
|
|
||||||
width: '5%',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid]) {
|
|
||||||
return whiteList[uid].useDiamondNum;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'diamondWhiteStatus',
|
|
||||||
title: '梦幻白名单状态',
|
|
||||||
align: 'center',
|
|
||||||
valign: 'middle',
|
|
||||||
width: '5%',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid] && whiteList[uid].availableDiamondNum > 0) {
|
|
||||||
return '<span style="color:red">待抽奖</span>';
|
|
||||||
} else {
|
|
||||||
return '<span style="color:green">未设置</span>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'tmp',
|
|
||||||
title: '操作',
|
|
||||||
align: 'center',
|
|
||||||
width: '10%',
|
|
||||||
valign: 'middle',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
var btnStr = "";
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid] && whiteList[uid].availableNum > 0) {
|
|
||||||
btnStr += "<button class='btn btn-sm btn-warning opt-del normal-box-del' data-id=" + uid + ">移除普通白名单</button>";
|
|
||||||
} else {
|
|
||||||
btnStr += "<button class='btn btn-sm btn-success opt-set normal-box-set' data-id=" + uid + ">设置普通白名单</button>";
|
|
||||||
}
|
|
||||||
if (whiteList[uid] && whiteList[uid].availableDiamondNum > 0) {
|
|
||||||
btnStr += "<button class='btn btn-sm btn-warning opt-del diamond-box-del' data-id=" + uid + ">移除梦幻白名单</button>";
|
|
||||||
} else {
|
|
||||||
btnStr += "<button class='btn btn-sm btn-success opt-set diamond-box-set' data-id=" + uid + ">设置梦幻白名单</button>";
|
|
||||||
}
|
|
||||||
return btnStr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
cache: false,
|
|
||||||
striped: true,
|
|
||||||
showRefresh: false,
|
|
||||||
pageSize: 10,
|
|
||||||
pagination: true,
|
|
||||||
pageList: [10, 20, 30, 50],
|
|
||||||
sidePagination: "server", //表示服务端请求
|
|
||||||
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
|
||||||
//设置为limit可以获取limit, offset, search, sort, order
|
|
||||||
queryParamsType: "undefined",
|
|
||||||
queryParams: function queryParams(params) { //设置查询参数
|
|
||||||
var param = {
|
|
||||||
pageSize: params.pageSize,
|
|
||||||
pageNumber: params.pageNumber,
|
|
||||||
msNo: $('#msNo').val(),
|
|
||||||
boxType: $("#boxType").val(),
|
|
||||||
minDis: $('#minDis').val(),
|
|
||||||
maxDis: $('#maxDis').val(),
|
|
||||||
source: $('#source').val(),
|
|
||||||
startTime: $("#startTime").val(),
|
|
||||||
endTime: $("#endTime").val()
|
|
||||||
};
|
|
||||||
console.log(param);
|
|
||||||
return param;
|
|
||||||
},
|
|
||||||
uniqueId: 'uid',
|
|
||||||
toolbar: '#toolbar',
|
|
||||||
url: '/admin/box/record/statis/list',
|
|
||||||
onLoadSuccess: function () { //加载成功时执行
|
|
||||||
console.log("load success");
|
|
||||||
},
|
|
||||||
onLoadError: function () { //加载失败时执行
|
|
||||||
console.log("load fail");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
$('#source').on('change', function () {
|
{
|
||||||
var source = parseInt($(this).val());
|
field: 'useNum', title: '历史白名单次数', align: 'center', valign: 'middle', width: '5%', formatter: function (val, row, index) {
|
||||||
if (source == 1) {
|
var uid = row.uid;
|
||||||
$('.msNo').show();
|
if (whiteList[uid]) {
|
||||||
$('.deviation').hide();
|
return whiteList[uid].useNum;
|
||||||
} else {
|
} else {
|
||||||
$('.msNo').hide();
|
return 0;
|
||||||
$('.deviation').show();
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#table').on('click', '.normal-box-set', function () {
|
|
||||||
var uid = $(this).data('id');
|
|
||||||
editWhiteList(uid, 1, 1);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#table').on('click', '.diamond-box-set', function () {
|
|
||||||
var uid = $(this).data('id');
|
|
||||||
editWhiteList(uid, 1, 2);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#table').on('click', '.normal-box-del', function () {
|
|
||||||
var uid = $(this).data('id');
|
|
||||||
editWhiteList(uid, 0, 1);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#table').on('click', '.diamond-box-del', function () {
|
|
||||||
var uid = $(this).data('id');
|
|
||||||
editWhiteList(uid, 0, 2);
|
|
||||||
});
|
|
||||||
$('#btnSearch').on('click', function () {
|
|
||||||
var source = $('#source').val();
|
|
||||||
var msNo = $('#msNo').val();
|
|
||||||
var minDis = $('#minDis').val();
|
|
||||||
var maxDis = $('#maxDis').val();
|
|
||||||
if (source == 1 && msNo == '') {
|
|
||||||
$("#tipMsg").text("请输入平台号");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
return;
|
|
||||||
} else if (source == 2 && (minDis == '' || maxDis == '')) {
|
|
||||||
$("#tipMsg").text("请输入偏差值");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
requestWhiteList(searchHistory());
|
|
||||||
});
|
|
||||||
|
|
||||||
function editWhiteList(uid, availableNum, boxType) {
|
|
||||||
$.post("/admin/prizeWhiteUser/save", { uid: uid, availableNum: availableNum, boxType: boxType }, function (res) {
|
|
||||||
if (res.code == 200) {
|
|
||||||
if (availableNum > 0) {
|
|
||||||
$("#tipMsg").text("设置成功");
|
|
||||||
} else {
|
|
||||||
$("#tipMsg").text("移除成功");
|
|
||||||
}
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
|
|
||||||
requestWhiteList(function () {
|
|
||||||
TableHelper.doRefresh('#table');
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
$("#tipMsg").text("设置失败");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
function requestWhiteList(callback) {
|
{
|
||||||
$.ajax({
|
field: 'whiteStatus', title: '白名单状态', align: 'center', valign: 'middle', width: '5%', formatter: function (val, row, index) {
|
||||||
url: '/admin/prizeWhiteUser/list',
|
var uid = row.uid;
|
||||||
success: function (res) {
|
if (whiteList[uid] && whiteList[uid].availableNum > 0) {
|
||||||
console.log(res);
|
return '<span style="color:red">待抽奖</span>';
|
||||||
if (res.code == 200) {
|
} else {
|
||||||
whiteList = res.data;
|
return '<span style="color:green">未设置</span>';
|
||||||
typeof callback === 'function' && callback();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
// 初始化时间选择器
|
{
|
||||||
$('#startTime').datetimepicker({
|
field: 'diamondUseNum',
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
title: '梦幻白名单次数',
|
||||||
autoclose: true
|
align: 'center',
|
||||||
})
|
valign: 'middle',
|
||||||
$("#endTime").datetimepicker({
|
width: '5%',
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
formatter: function (val, row, index) {
|
||||||
autoclose: true
|
var uid = row.uid;
|
||||||
});
|
if (whiteList[uid]) {
|
||||||
})
|
return whiteList[uid].useDiamondNum;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'diamondWhiteStatus',
|
||||||
|
title: '梦幻白名单状态',
|
||||||
|
align: 'center',
|
||||||
|
valign: 'middle',
|
||||||
|
width: '5%',
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
var uid = row.uid;
|
||||||
|
if (whiteList[uid] && whiteList[uid].availableDiamondNum > 0) {
|
||||||
|
return '<span style="color:red">待抽奖</span>';
|
||||||
|
} else {
|
||||||
|
return '<span style="color:green">未设置</span>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'tmp',
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
width: '10%',
|
||||||
|
valign: 'middle',
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
var btnStr = "";
|
||||||
|
var uid = row.uid;
|
||||||
|
if (whiteList[uid] && whiteList[uid].availableNum > 0) {
|
||||||
|
btnStr += "<button class='btn btn-sm btn-warning opt-del normal-box-del' data-id=" + uid + ">移除普通白名单</button>";
|
||||||
|
} else {
|
||||||
|
btnStr += "<button class='btn btn-sm btn-success opt-set normal-box-set' data-id=" + uid + ">设置普通白名单</button>";
|
||||||
|
}
|
||||||
|
if (whiteList[uid] && whiteList[uid].availableDiamondNum > 0) {
|
||||||
|
btnStr += "<button class='btn btn-sm btn-warning opt-del diamond-box-del' data-id=" + uid + ">移除梦幻白名单</button>";
|
||||||
|
} else {
|
||||||
|
btnStr += "<button class='btn btn-sm btn-success opt-set diamond-box-set' data-id=" + uid + ">设置梦幻白名单</button>";
|
||||||
|
}
|
||||||
|
return btnStr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
cache: false,
|
||||||
|
striped: true,
|
||||||
|
showRefresh: false,
|
||||||
|
pageSize: 10,
|
||||||
|
pagination: true,
|
||||||
|
pageList: [10, 20, 30, 50],
|
||||||
|
sidePagination: "server", //表示服务端请求
|
||||||
|
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
||||||
|
//设置为limit可以获取limit, offset, search, sort, order
|
||||||
|
queryParamsType: "undefined",
|
||||||
|
queryParams: function queryParams (params) { //设置查询参数
|
||||||
|
var param = {
|
||||||
|
pageSize: params.pageSize,
|
||||||
|
pageNumber: params.pageNumber,
|
||||||
|
msNo: $('#msNo').val(),
|
||||||
|
boxType: $("#boxType").val(),
|
||||||
|
minDis: $('#minDis').val(),
|
||||||
|
maxDis: $('#maxDis').val(),
|
||||||
|
source: $('#source').val(),
|
||||||
|
startTime: $("#startTime").val(),
|
||||||
|
endTime: $("#endTime").val()
|
||||||
|
};
|
||||||
|
console.log(param);
|
||||||
|
return param;
|
||||||
|
},
|
||||||
|
uniqueId: 'uid',
|
||||||
|
toolbar: '#toolbar',
|
||||||
|
url: '/admin/box/record/statis/list',
|
||||||
|
onLoadSuccess: function () { //加载成功时执行
|
||||||
|
console.log("load success");
|
||||||
|
},
|
||||||
|
onLoadError: function () { //加载失败时执行
|
||||||
|
console.log("load fail");
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
$('#source').on('change', function () {
|
||||||
|
var source = parseInt($(this).val());
|
||||||
|
if (source == 1) {
|
||||||
|
$('.msNo').show();
|
||||||
|
$('.deviation').hide();
|
||||||
|
} else {
|
||||||
|
$('.msNo').hide();
|
||||||
|
$('.deviation').show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#table').on('click', '.normal-box-set', function () {
|
||||||
|
var uid = $(this).data('id');
|
||||||
|
editWhiteList(uid, 1, 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#table').on('click', '.diamond-box-set', function () {
|
||||||
|
var uid = $(this).data('id');
|
||||||
|
editWhiteList(uid, 1, 2);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#table').on('click', '.normal-box-del', function () {
|
||||||
|
var uid = $(this).data('id');
|
||||||
|
editWhiteList(uid, 0, 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#table').on('click', '.diamond-box-del', function () {
|
||||||
|
var uid = $(this).data('id');
|
||||||
|
editWhiteList(uid, 0, 2);
|
||||||
|
});
|
||||||
|
$('#btnSearch').on('click', function () {
|
||||||
|
var source = $('#source').val();
|
||||||
|
var msNo = $('#msNo').val();
|
||||||
|
var minDis = $('#minDis').val();
|
||||||
|
var maxDis = $('#maxDis').val();
|
||||||
|
if (source == 1 && msNo == '') {
|
||||||
|
$("#tipMsg").text("请输入平台号");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
return;
|
||||||
|
} else if (source == 2 && (minDis == '' || maxDis == '')) {
|
||||||
|
$("#tipMsg").text("请输入偏差值");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
requestWhiteList(searchHistory());
|
||||||
|
});
|
||||||
|
|
||||||
|
function editWhiteList (uid, availableNum, boxType) {
|
||||||
|
$.post("/admin/prizeWhiteUser/save", { uid: uid, availableNum: availableNum, boxType: boxType }, function (res) {
|
||||||
|
if (res.code == 200) {
|
||||||
|
if (availableNum > 0) {
|
||||||
|
$("#tipMsg").text("设置成功");
|
||||||
|
} else {
|
||||||
|
$("#tipMsg").text("移除成功");
|
||||||
|
}
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
|
||||||
|
requestWhiteList(function () {
|
||||||
|
TableHelper.doRefresh('#table');
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
$("#tipMsg").text("设置失败");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function requestWhiteList (callback) {
|
||||||
|
$.ajax({
|
||||||
|
url: '/admin/prizeWhiteUser/list',
|
||||||
|
success: function (res) {
|
||||||
|
console.log(res);
|
||||||
|
if (res.code == 200) {
|
||||||
|
whiteList = res.data;
|
||||||
|
typeof callback === 'function' && callback();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化时间选择器
|
||||||
|
$('#startTime').datetimepicker({
|
||||||
|
format: 'yyyy-mm-dd hh:ii:00',
|
||||||
|
autoclose: true
|
||||||
|
})
|
||||||
|
$("#endTime").datetimepicker({
|
||||||
|
format: 'yyyy-mm-dd hh:ii:00',
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.deviation {
|
.deviation {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#toolbar label {
|
#toolbar label {
|
||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
}</style>
|
}
|
||||||
|
</style>
|
||||||
@@ -1,189 +1,299 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1 id="itemTitle"></h1>
|
<h1 id="itemTitle"></h1>
|
||||||
</section>
|
</section>
|
||||||
<!-- .content -->
|
<!-- .content -->
|
||||||
<div id="table"></div>
|
<div id="table"></div>
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<form id="searchForm" action="/admin/recharge/user/give/export" method="get" target="_blank">
|
<form
|
||||||
<div class="col-sm-12">
|
id="searchForm"
|
||||||
<label for="fromErBanNo" class="col-sm-2 control-label">转出人id:</label>
|
action="/admin/recharge/user/give/export"
|
||||||
<div class="col-sm-2">
|
method="get"
|
||||||
<input type="text" class="form-control" name="fromErBanNo" id="fromErBanNo">
|
target="_blank"
|
||||||
</div>
|
>
|
||||||
<label for="toErBanNo" class="col-sm-2 control-label">收入人id:</label>
|
<div class="col-sm-12">
|
||||||
<div class="col-sm-2">
|
<label for="fromErBanNo" class="col-sm-2 control-label"
|
||||||
<input type="text" class="form-control" name="toErBanNo" id="toErBanNo">
|
>转出人id:</label
|
||||||
</div>
|
>
|
||||||
<label for="toRegion" class="col-sm-2 control-label">收入人地区:</label>
|
<div class="col-sm-2">
|
||||||
<div class="col-sm-2">
|
<input
|
||||||
<select name="toRegion" id="toRegion" data-btn-class="btn-warning" class="form-control">
|
type="text"
|
||||||
<option value="" selected="selected">全部</option>
|
class="form-control"
|
||||||
</select>
|
name="fromErBanNo"
|
||||||
</div>
|
id="fromErBanNo"
|
||||||
</div>
|
/>
|
||||||
<div class="col-sm-12">
|
</div>
|
||||||
<label for="startTime" class="col-sm-2 control-label">时间:</label>
|
<label for="toErBanNo" class="col-sm-2 control-label"
|
||||||
<div class="col-sm-3"><input type="text" class="form-control" name="startTime" id="startTime">
|
>收入人id:</label
|
||||||
</div>
|
>
|
||||||
<label for="endTime" class="col-sm-1 control-label">-</label>
|
<div class="col-sm-2">
|
||||||
<div class="col-sm-3"><input type="text" class="form-control" name="endTime" id="endTime"></div>
|
<input
|
||||||
</div>
|
type="text"
|
||||||
</form>
|
class="form-control"
|
||||||
<button id="btnSearch" class="btn btn-default">
|
name="toErBanNo"
|
||||||
<i class="glyphicon glyphicon-search"></i>查询
|
id="toErBanNo"
|
||||||
</button>
|
/>
|
||||||
<button id="btnExport" class="btn btn-default">
|
</div>
|
||||||
<i class="glyphicon glyphicon-Export"></i>导出
|
<label for="toRegion" class="col-sm-2 control-label"
|
||||||
</button>
|
>收入人地区:</label
|
||||||
</div>
|
>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<select
|
||||||
|
name="toRegion"
|
||||||
|
id="toRegion"
|
||||||
|
data-btn-class="btn-warning"
|
||||||
|
class="form-control"
|
||||||
|
>
|
||||||
|
<option value="" selected="selected">全部</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<label for="startTime" class="col-sm-2 control-label"
|
||||||
|
>时间:</label
|
||||||
|
>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
class="form-control"
|
||||||
|
name="startTime"
|
||||||
|
id="startTime"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<label for="endTime" class="col-sm-1 control-label">-</label>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
class="form-control"
|
||||||
|
name="endTime"
|
||||||
|
id="endTime"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div id="mapObjHtml">
|
||||||
|
<span
|
||||||
|
style="
|
||||||
|
margin-right: 10px;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #2049a9;
|
||||||
|
"
|
||||||
|
>金币转赠明细: <b class="b1"></b
|
||||||
|
></span>
|
||||||
|
<span
|
||||||
|
style="
|
||||||
|
margin-right: 10px;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #2049a9;
|
||||||
|
"
|
||||||
|
>转赠非充值代理用户总数: <b class="b2"></b
|
||||||
|
></span>
|
||||||
|
</div>
|
||||||
|
<button id="btnSearch" class="btn btn-default">
|
||||||
|
<i class="glyphicon glyphicon-search"></i>查询
|
||||||
|
</button>
|
||||||
|
<button id="btnExport" class="btn btn-default">
|
||||||
|
<i class="glyphicon glyphicon-Export"></i>导出
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from "@/utils/bootstrap-table-helper";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RechargeDiamondGiveDetailView",
|
name: "RechargeDiamondGiveDetailView",
|
||||||
setup() {
|
setup() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.initData();
|
this.initData();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData() {
|
initData() {
|
||||||
$(function () {
|
$(function () {
|
||||||
userRegion();
|
userRegion();
|
||||||
$('#table').bootstrapTable('destroy');
|
$("#table").bootstrapTable("destroy");
|
||||||
$('#table').bootstrapTable({
|
$("#table").bootstrapTable({
|
||||||
columns: [
|
columns: [
|
||||||
{ field: 'createTime', title: '时间', align: 'center', width: '5%' },
|
{
|
||||||
{ field: 'fromErBanNo', title: '转出人peko id', align: 'center', width: '5%' },
|
field: "createTime",
|
||||||
{ field: 'fromNick', title: '转出人昵称', align: 'center', width: '5%' },
|
title: "时间",
|
||||||
{ field: 'fromClanName', title: '转出人所在公会', align: 'center', width: '5%' },
|
align: "center",
|
||||||
{
|
width: "5%",
|
||||||
field: 'fromRegion',
|
},
|
||||||
title: '转出人所属代充地区',
|
{
|
||||||
align: 'center',
|
field: "fromErBanNo",
|
||||||
width: '5%',
|
title: "转出人peko id",
|
||||||
formatter: function (val, row, index) {
|
align: "center",
|
||||||
var value = '';
|
width: "5%",
|
||||||
if (val) {
|
},
|
||||||
var array = val.split(',');
|
{
|
||||||
for (let i = 0, len = array.length; i < len; i++) {
|
field: "fromNick",
|
||||||
var region = array[i];
|
title: "转出人昵称",
|
||||||
value += region;
|
align: "center",
|
||||||
if (i != len - 1) {
|
width: "5%",
|
||||||
value += '<br/>';
|
},
|
||||||
}
|
{
|
||||||
}
|
field: "fromClanName",
|
||||||
}
|
title: "转出人所在公会",
|
||||||
return value;
|
align: "center",
|
||||||
}
|
width: "5%",
|
||||||
},
|
},
|
||||||
{ field: 'toErBanNo', title: '收入人peko id', align: 'center', width: '5%' },
|
{
|
||||||
{ field: 'toNick', title: '收入人昵称', align: 'center', width: '5%' },
|
field: "fromRegion",
|
||||||
{ field: 'toRegion', title: '收入人地区', align: 'center', width: '5%' },
|
title: "转出人所属代充地区",
|
||||||
{ field: 'inviteCode', title: '收入人填写的邀请码', align: 'center', width: '5%' },
|
align: "center",
|
||||||
{ field: 'diamondNum', title: '转赠数额', align: 'center', width: '5%' },
|
width: "5%",
|
||||||
],
|
formatter: function (val, row, index) {
|
||||||
cache: false,
|
var value = "";
|
||||||
striped: true,
|
if (val) {
|
||||||
showRefresh: false,
|
var array = val.split(",");
|
||||||
pageSize: 20,
|
for (let i = 0, len = array.length; i < len; i++) {
|
||||||
pagination: true,
|
var region = array[i];
|
||||||
pageList: [20, 50, 100],
|
value += region;
|
||||||
search: false,
|
if (i != len - 1) {
|
||||||
sidePagination: "server", //表示服务端请求
|
value += "<br/>";
|
||||||
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
|
||||||
//设置为limit可以获取limit, offset, search, sort, order
|
|
||||||
queryParamsType: "undefined",
|
|
||||||
queryParams: function queryParams(params) { //设置查询参数
|
|
||||||
var param = {
|
|
||||||
page: params.pageNumber,
|
|
||||||
pageSize: params.pageSize,
|
|
||||||
fromErBanNo: $('#fromErBanNo').val(),
|
|
||||||
toErBanNo: $('#toErBanNo').val(),
|
|
||||||
toRegion: $('#toRegion').val(),
|
|
||||||
startTime: $('#startTime').val(),
|
|
||||||
endTime: $('#endTime').val(),
|
|
||||||
};
|
|
||||||
return param;
|
|
||||||
},
|
|
||||||
toolbar: '#toolbar',
|
|
||||||
url: '/admin/recharge/user/give/dayDetailPage',
|
|
||||||
onLoadSuccess: function () { //加载成功时执行
|
|
||||||
console.log("load success");
|
|
||||||
},
|
|
||||||
onLoadError: function () { //加载失败时执行
|
|
||||||
console.log("load fail");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var picker1 = $("#startTime").datetimepicker({
|
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
|
||||||
todayBtn: true,
|
|
||||||
autoclose: true,
|
|
||||||
});
|
|
||||||
var picker2 = $("#endTime").datetimepicker({
|
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
|
||||||
todayBtn: true,
|
|
||||||
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);
|
|
||||||
});
|
|
||||||
|
|
||||||
//导出功能
|
|
||||||
$("#btnExport").on('click', function () {
|
|
||||||
$("#searchForm").submit();
|
|
||||||
});
|
|
||||||
|
|
||||||
// 查询刷新
|
|
||||||
$('#btnSearch').on('click', function () {
|
|
||||||
TableHelper.doRefresh('#table');
|
|
||||||
});
|
|
||||||
|
|
||||||
//用户地区
|
|
||||||
function userRegion() {
|
|
||||||
var array;
|
|
||||||
$.ajax({
|
|
||||||
type: "get",
|
|
||||||
url: "/admin/recharge/user/give/getRegion",
|
|
||||||
dataType: "json",
|
|
||||||
async: false,
|
|
||||||
success: function (json) {
|
|
||||||
if (json.success == 'true' || json.code == 200) {
|
|
||||||
array = json.data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
var $select = $('#toRegion');
|
|
||||||
for (let i = 0; i < array.length; i++) {
|
|
||||||
var value = array[i];
|
|
||||||
var $option = $('<option value="' + value + '" />');
|
|
||||||
$option.html(value);
|
|
||||||
$select.append($option);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
return value;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: "toErBanNo",
|
||||||
|
title: "收入人peko id",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "toNick",
|
||||||
|
title: "收入人昵称",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "toRegion",
|
||||||
|
title: "收入人地区",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "inviteCode",
|
||||||
|
title: "收入人填写的邀请码",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "diamondNum",
|
||||||
|
title: "转赠数额",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
cache: false,
|
||||||
|
striped: true,
|
||||||
|
showRefresh: false,
|
||||||
|
pageSize: 20,
|
||||||
|
pagination: true,
|
||||||
|
pageList: [20, 50, 100],
|
||||||
|
search: false,
|
||||||
|
sidePagination: "server", //表示服务端请求
|
||||||
|
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
||||||
|
//设置为limit可以获取limit, offset, search, sort, order
|
||||||
|
queryParamsType: "undefined",
|
||||||
|
queryParams: function queryParams(params) {
|
||||||
|
//设置查询参数
|
||||||
|
var param = {
|
||||||
|
page: params.pageNumber,
|
||||||
|
pageSize: params.pageSize,
|
||||||
|
fromErBanNo: $("#fromErBanNo").val(),
|
||||||
|
toErBanNo: $("#toErBanNo").val(),
|
||||||
|
toRegion: $("#toRegion").val(),
|
||||||
|
startTime: $("#startTime").val(),
|
||||||
|
endTime: $("#endTime").val(),
|
||||||
|
};
|
||||||
|
return param;
|
||||||
|
},
|
||||||
|
toolbar: "#toolbar",
|
||||||
|
url: "/admin/recharge/user/give/dayDetailPage",
|
||||||
|
onLoadSuccess: function (res) {
|
||||||
|
//加载成功时执行
|
||||||
|
console.log();
|
||||||
|
$("#mapObjHtml .b1").text(res.totalMap.totalDiamondNum);
|
||||||
|
$("#mapObjHtml .b2").text(res.totalMap.totalDiamondNum4Normal);
|
||||||
|
},
|
||||||
|
onLoadError: function () {
|
||||||
|
//加载失败时执行
|
||||||
|
console.log("load fail");
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
var picker1 = $("#startTime").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:00",
|
||||||
|
todayBtn: true,
|
||||||
|
autoclose: true,
|
||||||
|
});
|
||||||
|
var picker2 = $("#endTime").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:00",
|
||||||
|
todayBtn: true,
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
|
||||||
|
//导出功能
|
||||||
|
$("#btnExport").on("click", function () {
|
||||||
|
$("#searchForm").submit();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 查询刷新
|
||||||
|
$("#btnSearch").on("click", function () {
|
||||||
|
TableHelper.doRefresh("#table");
|
||||||
|
});
|
||||||
|
|
||||||
|
//用户地区
|
||||||
|
function userRegion() {
|
||||||
|
var array;
|
||||||
|
$.ajax({
|
||||||
|
type: "get",
|
||||||
|
url: "/admin/recharge/user/give/getRegion",
|
||||||
|
dataType: "json",
|
||||||
|
async: false,
|
||||||
|
success: function (json) {
|
||||||
|
if (json.success == "true" || json.code == 200) {
|
||||||
|
array = json.data;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
var $select = $("#toRegion");
|
||||||
|
for (let i = 0; i < array.length; i++) {
|
||||||
|
var value = array[i];
|
||||||
|
var $option = $('<option value="' + value + '" />');
|
||||||
|
$option.html(value);
|
||||||
|
$select.append($option);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -5,66 +5,55 @@
|
|||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1 id="itemTitle"></h1>
|
<h1 id="itemTitle"></h1>
|
||||||
</section>
|
</section>
|
||||||
<form id="form2"
|
<form id="form2" action="" method="post" target="_blank">
|
||||||
action=""
|
<input type="hidden" name="erbanNo" id="exportErbanNo" />
|
||||||
method="post"
|
<input type="hidden" name="channel" id="exportChannel" />
|
||||||
target="_blank">
|
<input type="hidden" name="startTime" id="exportStartTime" />
|
||||||
<input type="hidden"
|
<input type="hidden" name="endTime" id="exportEndTime" />
|
||||||
name="erbanNo"
|
<input type="hidden" name="status" id="exportStatus" />
|
||||||
id="exportErbanNo">
|
<input type="hidden" name="newUser" id="exportNewUser" />
|
||||||
<input type="hidden"
|
<input type="hidden" name="appChannel" id="exportAppChannel" />
|
||||||
name="channel"
|
|
||||||
id="exportChannel">
|
|
||||||
<input type="hidden"
|
|
||||||
name="startTime"
|
|
||||||
id="exportStartTime">
|
|
||||||
<input type="hidden"
|
|
||||||
name="endTime"
|
|
||||||
id="exportEndTime">
|
|
||||||
<input type="hidden"
|
|
||||||
name="status"
|
|
||||||
id="exportStatus">
|
|
||||||
<input type="hidden"
|
|
||||||
name="newUser"
|
|
||||||
id="exportNewUser">
|
|
||||||
<input type="hidden"
|
|
||||||
name="appChannel"
|
|
||||||
id="exportAppChannel">
|
|
||||||
</form>
|
</form>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<form class="form-inline">
|
<form class="form-inline">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="qErbanNo">平台号:</label>
|
<label for="qErbanNo">平台号:</label>
|
||||||
<input type="text"
|
<input
|
||||||
class="form-control"
|
type="text"
|
||||||
name="erbanNo"
|
class="form-control"
|
||||||
id="qErbanNo">
|
name="erbanNo"
|
||||||
|
id="qErbanNo"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="qChannel">渠道:</label>
|
<label for="qChannel">渠道:</label>
|
||||||
<input type="text"
|
<input
|
||||||
class="form-control"
|
type="text"
|
||||||
name="channel"
|
class="form-control"
|
||||||
id="qChannel">
|
name="channel"
|
||||||
|
id="qChannel"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="qChannel">时间:</label>
|
<label for="qChannel">时间:</label>
|
||||||
<input type="text"
|
<input
|
||||||
class="form-control datetime"
|
type="text"
|
||||||
name="startTime"
|
class="form-control datetime"
|
||||||
id="qStartTime">
|
name="startTime"
|
||||||
|
id="qStartTime"
|
||||||
|
/>
|
||||||
<label for="qChannel">-</label>
|
<label for="qChannel">-</label>
|
||||||
<input type="text"
|
<input
|
||||||
class="form-control datetime"
|
type="text"
|
||||||
name="endTime"
|
class="form-control datetime"
|
||||||
id="qEndTime">
|
name="endTime"
|
||||||
|
id="qEndTime"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="qStatus">状态:</label>
|
<label for="qStatus">状态:</label>
|
||||||
<select class="form-control"
|
<select class="form-control" name="status" id="qStatus">
|
||||||
name="status"
|
|
||||||
id="qStatus">
|
|
||||||
<option value="">全部</option>
|
<option value="">全部</option>
|
||||||
<option value="1">发起充值</option>
|
<option value="1">发起充值</option>
|
||||||
<option value="2">充值成功</option>
|
<option value="2">充值成功</option>
|
||||||
@@ -72,9 +61,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="qNewUser">新用户:</label>
|
<label for="qNewUser">新用户:</label>
|
||||||
<select class="form-control"
|
<select class="form-control" name="newUser" id="qNewUser">
|
||||||
name="newUser"
|
|
||||||
id="qNewUser">
|
|
||||||
<option value="">全部</option>
|
<option value="">全部</option>
|
||||||
<option value="1">是</option>
|
<option value="1">是</option>
|
||||||
<option value="0">否</option>
|
<option value="0">否</option>
|
||||||
@@ -82,20 +69,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="qChannel">app渠道</label>
|
<label for="qChannel">app渠道</label>
|
||||||
<input type="text"
|
<input
|
||||||
class="form-control"
|
type="text"
|
||||||
name="appChannel"
|
class="form-control"
|
||||||
id="qAppChannel">
|
name="appChannel"
|
||||||
|
id="qAppChannel"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<button id="btnSearch"
|
<div id="mapObjHtml"></div>
|
||||||
class="btn btn-sm btn-primary">查询</button>
|
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
|
||||||
<button id="btnExport"
|
<button id="btnExport" class="btn btn-sm btn-primary">导出</button>
|
||||||
class="btn btn-sm btn-primary">导出</button>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- .content -->
|
<!-- .content -->
|
||||||
<div class="content"
|
<div class="content" id="table"></div>
|
||||||
id="table"></div>
|
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -103,152 +90,185 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from "@/utils/bootstrap-table-helper";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ChargeRecordView",
|
name: "ChargeRecordView",
|
||||||
setup () {
|
created() {
|
||||||
return {};
|
|
||||||
},
|
|
||||||
created () {
|
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.initData();
|
this.initData();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData () {
|
initData() {
|
||||||
$(function () {
|
$(".datetime").datetimepicker({
|
||||||
$('.datetime').datetimepicker({
|
format: "yyyy-mm-dd hh:ii:00",
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
autoclose: true,
|
||||||
autoclose: true
|
|
||||||
});
|
|
||||||
$('#table').bootstrapTable('destroy');
|
|
||||||
$('#table').bootstrapTable({
|
|
||||||
columns: [
|
|
||||||
{ field: 'erbanNo', title: '平台号', align: 'center', width: '5%' },
|
|
||||||
{ field: 'uid', title: 'uid', align: 'center', width: '5%' },
|
|
||||||
{ field: 'nick', title: '昵称', align: 'center', width: '5%' },
|
|
||||||
{ field: 'partitionName', title: '分区', align: 'center', width: '5%' },
|
|
||||||
{ field: 'createTime', title: '创建时间', align: 'center', valign: 'middle', width: '10%' },
|
|
||||||
{ field: 'channel', title: '渠道', align: 'center', width: '5%' },
|
|
||||||
{ field: 'localCurrencyCode', title: '当地货币代码', align: 'center', width: '5%' },
|
|
||||||
{ field: 'localAmount', title: '当地金额', align: 'center', width: '5%' },
|
|
||||||
{ field: 'chargeRecordId', title: '商户订单号', align: 'center', width: '5%' },
|
|
||||||
{ field: 'pingxxChargeId', title: '第三方订单号', align: 'center', width: '5%' },
|
|
||||||
{
|
|
||||||
field: 'status', title: '状态', align: 'center', width: '5%',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
if (val == 2) {
|
|
||||||
return '充值成功';
|
|
||||||
} else {
|
|
||||||
return '发起充值';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'newUser', title: '是否新用户', align: 'center', width: '5%',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
if (val) {
|
|
||||||
return '是';
|
|
||||||
} else {
|
|
||||||
return '否';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ field: 'appChannel', title: 'app渠道', align: 'center', width: '5%' },
|
|
||||||
],
|
|
||||||
undefinedText: "-",
|
|
||||||
cache: false,
|
|
||||||
striped: true,
|
|
||||||
showRefresh: false,
|
|
||||||
pageSize: 20,
|
|
||||||
pagination: true,
|
|
||||||
pageList: [20, 50, 100, 200, 300, 500],
|
|
||||||
search: false,
|
|
||||||
sidePagination: "server", //表示服务端请求
|
|
||||||
queryParamsType: "undefined",
|
|
||||||
queryParams: function queryParams (params) { //设置查询参数
|
|
||||||
var param = {
|
|
||||||
pageNumber: params.pageNumber,
|
|
||||||
pageSize: params.pageSize,
|
|
||||||
erbanNo: $('#qErbanNo').val(),
|
|
||||||
channel: $('#qChannel').val(),
|
|
||||||
startTime: $('#qStartTime').val(),
|
|
||||||
endTime: $('#qEndTime').val(),
|
|
||||||
status: $('#qStatus').val(),
|
|
||||||
newUser: $('#qNewUser').val(),
|
|
||||||
appChannel: $('#qAppChannel').val(),
|
|
||||||
};
|
|
||||||
return param;
|
|
||||||
},
|
|
||||||
ajax: function (request) { //使用ajax请求
|
|
||||||
$.ajax({
|
|
||||||
type: "GET",
|
|
||||||
url: '/admin/chargeRecord/list',
|
|
||||||
contentType: 'application/json;charset=utf-8',
|
|
||||||
dataType: 'json',
|
|
||||||
data: request.data,
|
|
||||||
success: function (res) {
|
|
||||||
apiResult(res);
|
|
||||||
request.success({
|
|
||||||
rows: res.data.records,
|
|
||||||
total: res.data.total
|
|
||||||
});
|
|
||||||
},
|
|
||||||
error: function (req) {
|
|
||||||
serverError(req);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
toolbar: '#toolbar',
|
|
||||||
onLoadSuccess: function () { //加载成功时执行
|
|
||||||
console.log("load success");
|
|
||||||
},
|
|
||||||
onLoadError: function () { //加载失败时执行
|
|
||||||
console.log("load fail");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// 查询刷新
|
|
||||||
$('#btnSearch').on('click', function () {
|
|
||||||
TableHelper.doRefresh('#table');
|
|
||||||
});
|
|
||||||
|
|
||||||
function serverError (req) {
|
|
||||||
$("#tipMsg").text(req.responseJSON.message);
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
}
|
|
||||||
|
|
||||||
function apiResult (json) {
|
|
||||||
if (json.code == 200 && json.message == 'success') {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
$("#tipMsg").text("请求失败,错误信息:" + json.message);
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 导出excel
|
|
||||||
$('#btnExport').on('click', function () {
|
|
||||||
var form = $("#form2");
|
|
||||||
form.attr("action", "/admin/chargeRecord/exportChargeDetail");
|
|
||||||
$('#exportErbanNo').val($('#qErbanNo').val());
|
|
||||||
$('#exportChannel').val($('#qChannel').val());
|
|
||||||
$('#exportStartTime').val($('#qStartTime').val());
|
|
||||||
$('#exportEndTime').val($('#qEndTime').val());
|
|
||||||
$('#exportStatus').val($('#qStatus').val());
|
|
||||||
$('#exportNewUser').val($('#qNewUser').val());
|
|
||||||
$('#exportAppChannel').val($('#qAppChannel').val());
|
|
||||||
|
|
||||||
form.submit();
|
|
||||||
})
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
|
// 初始化表格,但不设置 `ajax` 方法,也不绑定 `url`,只提供列配置
|
||||||
|
$("#table").bootstrapTable({
|
||||||
|
columns: [
|
||||||
|
{ field: "erbanNo", title: "平台号", align: "center", width: "5%" },
|
||||||
|
{ field: "uid", title: "uid", align: "center", width: "5%" },
|
||||||
|
{ field: "nick", title: "昵称", align: "center", width: "5%" },
|
||||||
|
{
|
||||||
|
field: "partitionName",
|
||||||
|
title: "分区",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "createTime",
|
||||||
|
title: "创建时间",
|
||||||
|
align: "center",
|
||||||
|
valign: "middle",
|
||||||
|
width: "10%",
|
||||||
|
},
|
||||||
|
{ field: "channel", title: "渠道", align: "center", width: "5%" },
|
||||||
|
{
|
||||||
|
field: "localCurrencyCode",
|
||||||
|
title: "当地货币代码",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "localAmount",
|
||||||
|
title: "当地金额",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "chargeRecordId",
|
||||||
|
title: "商户订单号",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "pingxxChargeId",
|
||||||
|
title: "第三方订单号",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "status",
|
||||||
|
title: "状态",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
return val == 2 ? "充值成功" : "发起充值";
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "newUser",
|
||||||
|
title: "是否新用户",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
return val ? "是" : "否";
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "appChannel",
|
||||||
|
title: "app渠道",
|
||||||
|
align: "center",
|
||||||
|
width: "5%",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
undefinedText: "-",
|
||||||
|
cache: false,
|
||||||
|
striped: true,
|
||||||
|
showRefresh: false,
|
||||||
|
pageSize: 20,
|
||||||
|
pagination: true,
|
||||||
|
pageList: [20, 50, 100, 200, 300, 500],
|
||||||
|
search: false,
|
||||||
|
sidePagination: "server",
|
||||||
|
queryParamsType: "undefined",
|
||||||
|
data: [], // 初始化为空数据
|
||||||
|
});
|
||||||
|
|
||||||
|
// 查询刷新
|
||||||
|
$("#btnSearch").on("click", function () {
|
||||||
|
const params = {
|
||||||
|
pageNumber: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
erbanNo: $("#qErbanNo").val(),
|
||||||
|
channel: $("#qChannel").val(),
|
||||||
|
startTime: $("#qStartTime").val(),
|
||||||
|
endTime: $("#qEndTime").val(),
|
||||||
|
status: $("#qStatus").val(),
|
||||||
|
newUser: $("#qNewUser").val(),
|
||||||
|
appChannel: $("#qAppChannel").val(),
|
||||||
|
};
|
||||||
|
|
||||||
|
// 手动加载数据
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url: "/admin/chargeRecord/list",
|
||||||
|
contentType: "application/json;charset=utf-8",
|
||||||
|
dataType: "json",
|
||||||
|
data: params,
|
||||||
|
success: function (res) {
|
||||||
|
if (apiResult(res)) {
|
||||||
|
$("#table").bootstrapTable("load", {
|
||||||
|
rows: res.data.rows,
|
||||||
|
total: res.data.total,
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#mapObjHtml span").remove();
|
||||||
|
const totalMap = res.data.totalMap;
|
||||||
|
let str = "";
|
||||||
|
const sortedKeys = Object.keys(totalMap).sort((keyA, keyB) => {
|
||||||
|
return keyA === "总充值{USD}"
|
||||||
|
? -1
|
||||||
|
: keyB === "总充值{USD}"
|
||||||
|
? 1
|
||||||
|
: 0;
|
||||||
|
});
|
||||||
|
for (const key of sortedKeys) {
|
||||||
|
str += `
|
||||||
|
<span style="margin-right:10px;display: inline-block;font-size: 18px;color: #2049a9;" type="text">${key}: ${totalMap[key]}, </span>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
$("#mapObjHtml").append(str);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (req) {
|
||||||
|
serverError(req);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function serverError(req) {
|
||||||
|
$("#tipMsg").text(req.responseJSON.message);
|
||||||
|
$("#tipModal").modal("show");
|
||||||
|
}
|
||||||
|
|
||||||
|
function apiResult(json) {
|
||||||
|
if (json.code == 200 && json.message == "success") {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
$("#tipMsg").text("请求失败,错误信息:" + json.message);
|
||||||
|
$("#tipModal").modal("show");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出excel
|
||||||
|
$("#btnExport").on("click", function () {
|
||||||
|
const form = $("#form2");
|
||||||
|
form.attr("action", "/admin/chargeRecord/exportChargeDetail");
|
||||||
|
$("#exportErbanNo").val($("#qErbanNo").val());
|
||||||
|
$("#exportChannel").val($("#qChannel").val());
|
||||||
|
$("#exportStartTime").val($("#qStartTime").val());
|
||||||
|
$("#exportEndTime").val($("#qEndTime").val());
|
||||||
|
$("#exportStatus").val($("#qStatus").val());
|
||||||
|
$("#exportNewUser").val($("#qNewUser").val());
|
||||||
|
$("#exportAppChannel").val($("#qAppChannel").val());
|
||||||
|
|
||||||
|
form.submit();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ export default {
|
|||||||
$("#tipModal").modal('show');
|
$("#tipModal").modal('show');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (actualGold != parseInt(actualAmount * 1000)) {
|
if (actualGold != parseInt(actualAmount * 7000)) {
|
||||||
$("#tipMsg").text("赠送金币与充值金额兑换比例不正确!");
|
$("#tipMsg").text("赠送金币与充值金额兑换比例不正确!");
|
||||||
$("#tipModal").modal('show');
|
$("#tipModal").modal('show');
|
||||||
return;
|
return;
|
||||||
@@ -332,15 +332,8 @@ export default {
|
|||||||
$("#tipModal").modal('show');
|
$("#tipModal").modal('show');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var minGold = parseInt(actualAmount * 800);
|
const actualGold = parseInt(num);
|
||||||
var maxGold = parseInt(actualAmount * 1200);
|
if (actualGold != parseInt(actualAmount * 7000)) {
|
||||||
var actualGold = parseInt(num);
|
|
||||||
if (actualGold < minGold || actualGold > maxGold) {
|
|
||||||
$("#tipMsg").text("赠送金币与充值金额兑换比例不正确!");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (actualGold != parseInt(actualAmount * 1000)) {
|
|
||||||
$("#tipMsg").text("赠送金币与充值金额兑换比例不正确!");
|
$("#tipMsg").text("赠送金币与充值金额兑换比例不正确!");
|
||||||
$("#tipModal").modal('show');
|
$("#tipModal").modal('show');
|
||||||
return;
|
return;
|
||||||
|
|||||||
410
src/views/refund/UserRefundQuiry.vue
Normal file
410
src/views/refund/UserRefundQuiry.vue
Normal file
@@ -0,0 +1,410 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<!-- 分区 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<div class="block">
|
||||||
|
<span class="demonstration">分区</span>
|
||||||
|
<el-select
|
||||||
|
v-model="inquire.partitionId"
|
||||||
|
style="width: 75%"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.partitionArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 平台ID -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>平台ID</span>
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.userId"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<!-- 充值订单号 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>充值订单号</span>
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.rechargeNumber"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<!-- 第三方订单号 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>第三方订单号</span>
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.partyNumber"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<!-- 国家 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<div class="block">
|
||||||
|
<span class="demonstration">国家</span>
|
||||||
|
<el-select
|
||||||
|
v-model="inquire.country"
|
||||||
|
style="width: 75%"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.countryArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.regionDesc"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 状态 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<div class="block">
|
||||||
|
<span class="demonstration">状态</span>
|
||||||
|
<el-select
|
||||||
|
v-model="inquire.status"
|
||||||
|
style="width: 75%"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.statusArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 平台 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<div class="block">
|
||||||
|
<span class="demonstration">平台</span>
|
||||||
|
<el-select
|
||||||
|
v-model="inquire.platform"
|
||||||
|
style="width: 75%"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.platformArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 支付渠道 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<div class="block">
|
||||||
|
<span class="demonstration">支付渠道</span>
|
||||||
|
<el-select
|
||||||
|
v-model="inquire.paymentChannels"
|
||||||
|
style="width: 75%"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.paymentChannelsArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</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 class="primary" type="primary" @click="getData()"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
inquire.partitionId = inquire.partitionArr[0].id;
|
||||||
|
inquire.userId = '';
|
||||||
|
inquire.rechargeNumber = '';
|
||||||
|
inquire.partyNumber = '';
|
||||||
|
inquire.country = inquire.countryArr[0].id;
|
||||||
|
inquire.status = 0;
|
||||||
|
inquire.platform = '';
|
||||||
|
inquire.paymentChannels = '';
|
||||||
|
inquire.time = '';
|
||||||
|
getData();
|
||||||
|
"
|
||||||
|
>重置搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button class="primary" type="primary" @click="exportInfoFun()"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<el-button v-for="(value, key) in sortedMapObj" :key="key" type="text"
|
||||||
|
>{{ key }}: {{ value }},
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<!-- 表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="chargeStatusDesc" align="center" label="支付状态">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="chargeRecordId" align="center" label="订单ID" />
|
||||||
|
<el-table-column
|
||||||
|
prop="pingxxChargeId"
|
||||||
|
align="center"
|
||||||
|
label="第三方订单ID"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="channel" align="center" label="充值渠道" />
|
||||||
|
<el-table-column prop="erbanNo" align="center" label="平台ID" />
|
||||||
|
<el-table-column prop="nick" align="center" label="昵称" />
|
||||||
|
<el-table-column prop="partitionDesc" align="center" label="地区" />
|
||||||
|
<el-table-column prop="phone" align="center" label="电话" />
|
||||||
|
<el-table-column prop="os" align="center" label="平台" />
|
||||||
|
<el-table-column prop="genderDesc" align="center" label="性别" />
|
||||||
|
<el-table-column prop="chargeIp" align="center" label="用户IP" />
|
||||||
|
<el-table-column prop="totalGold" align="center" label="金币数量" />
|
||||||
|
<el-table-column prop="amount" align="center" label="花费金额(USD)" />
|
||||||
|
<el-table-column
|
||||||
|
prop="localCurrencyCode"
|
||||||
|
align="center"
|
||||||
|
label="当地货币代码"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="localAmount"
|
||||||
|
align="center"
|
||||||
|
label="当地货币花费金额"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="createTime" align="center" label="购买时间" />
|
||||||
|
<el-table-column prop="successTime" align="center" label="回调时间" />
|
||||||
|
<el-table-column prop="successTime" align="center" label="退款时间" />
|
||||||
|
<el-table-column prop="amount" align="center" label="退款金额" />
|
||||||
|
<el-table-column
|
||||||
|
prop="refundDesc"
|
||||||
|
align="center"
|
||||||
|
label="状态"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column prop="regionName" align="center" label="国家" />
|
||||||
|
</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 {
|
||||||
|
listPartitionInfo,
|
||||||
|
refundList,
|
||||||
|
regionInfoList,
|
||||||
|
refundExport,
|
||||||
|
} from "@/api/refund/refund";
|
||||||
|
// @ts-ignore
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
// @ts-ignore
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
export default {
|
||||||
|
name: "userRefundQuiry",
|
||||||
|
computed: {
|
||||||
|
sortedMapObj() {
|
||||||
|
const entries = Object.entries(this.mapObj);
|
||||||
|
// 将 "总充值{USD}" 的键排到第一位
|
||||||
|
entries.sort(([keyA], [keyB]) =>
|
||||||
|
keyA === "总充值{USD}" ? -1 : keyB === "总充值{USD}" ? 1 : 0
|
||||||
|
);
|
||||||
|
return Object.fromEntries(entries);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
delDialog: false,
|
||||||
|
delDialogData: null,
|
||||||
|
mapObj: {},
|
||||||
|
//查询所需条件对象
|
||||||
|
inquire: {
|
||||||
|
partitionId: 0,
|
||||||
|
partitionArr: [],
|
||||||
|
userId: "",
|
||||||
|
rechargeNumber: "",
|
||||||
|
partyNumber: "",
|
||||||
|
country: "",
|
||||||
|
countryArr: [],
|
||||||
|
status: "",
|
||||||
|
statusArr: [
|
||||||
|
{ desc: "全部", id: 0 },
|
||||||
|
{ desc: "退款中", id: 2 },
|
||||||
|
{ desc: "退款成功", id: 1 },
|
||||||
|
{ desc: "退款失败", id: 3 },
|
||||||
|
],
|
||||||
|
platform: "",
|
||||||
|
platformArr: [
|
||||||
|
{ desc: "全部", id: "" },
|
||||||
|
{ desc: "Android", id: "android" },
|
||||||
|
{ desc: "iOS", id: "iOS" },
|
||||||
|
],
|
||||||
|
paymentChannels: "",
|
||||||
|
paymentChannelsArr: [
|
||||||
|
{ desc: "google内购", id: "google_play_billing" },
|
||||||
|
{ desc: "payermax", id: "payermax" },
|
||||||
|
{ desc: "myCard", id: "MyCard" },
|
||||||
|
{ desc: "startPay", id: "start_pay" },
|
||||||
|
{ desc: "ios内购", id: "ios_pay" },
|
||||||
|
{ desc: "对公打款", id: "company" },
|
||||||
|
],
|
||||||
|
time: "",
|
||||||
|
},
|
||||||
|
// 表格
|
||||||
|
tableData: [],
|
||||||
|
// 分页
|
||||||
|
total: 10, //总页数
|
||||||
|
currentPage: 1, //页码
|
||||||
|
pageSize: 10, //条数
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
listPartitionInfo().then((res) => {
|
||||||
|
this.inquire.partitionArr = res.data;
|
||||||
|
this.inquire.partitionId = this.inquire.partitionArr[0].id;
|
||||||
|
});
|
||||||
|
regionInfoList().then((res) => {
|
||||||
|
this.inquire.countryArr = res.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
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 00:00:00");
|
||||||
|
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd 23:59:59");
|
||||||
|
}
|
||||||
|
refundList({
|
||||||
|
partitionId: this.inquire.partitionId,
|
||||||
|
channel: this.inquire.paymentChannels,
|
||||||
|
chargeRecordId: this.inquire.rechargeNumber,
|
||||||
|
pingxxChargeId: this.inquire.partyNumber,
|
||||||
|
refundStatus: this.inquire.status,
|
||||||
|
regionId: this.inquire.country,
|
||||||
|
os: this.inquire.platform,
|
||||||
|
erbanNo: this.inquire.userId,
|
||||||
|
pageNo: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
beginDate: startTime,
|
||||||
|
endDate: endTime,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.total = res.data.total;
|
||||||
|
this.tableData = res.data.rows;
|
||||||
|
this.mapObj = res.data.totalMap;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
jsonFun(val) {
|
||||||
|
return JSON.parse(val);
|
||||||
|
},
|
||||||
|
exportInfoFun() {
|
||||||
|
let time = this.inquire.time;
|
||||||
|
let startTime = "";
|
||||||
|
let endTime = "";
|
||||||
|
if (time && time.length > 0) {
|
||||||
|
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd 00:00:00");
|
||||||
|
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd 23:59:59");
|
||||||
|
}
|
||||||
|
refundExport({
|
||||||
|
partitionId: this.inquire.partitionId,
|
||||||
|
channel: this.inquire.paymentChannels,
|
||||||
|
chargeRecordId: this.inquire.rechargeNumber,
|
||||||
|
pingxxChargeId: this.inquire.partyNumber,
|
||||||
|
refundStatus: this.inquire.status,
|
||||||
|
regionId: this.inquire.country,
|
||||||
|
os: this.inquire.platform,
|
||||||
|
erbanNo: this.inquire.userId,
|
||||||
|
pageNo: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
beginDate: startTime,
|
||||||
|
endDate: endTime,
|
||||||
|
}).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;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
span {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.input {
|
||||||
|
width: 180px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.dialogTableVisibleBut {
|
||||||
|
display: block;
|
||||||
|
margin: 30px 0 0 830px;
|
||||||
|
}
|
||||||
|
.paginationClass {
|
||||||
|
margin: 15px 0 5px 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.selectBox {
|
||||||
|
display: flex;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.selectBoxImg {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<el-table-column align="center" prop="icon" label="入口icon">
|
<el-table-column align="center" prop="icon" label="入口icon">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-image style="width: 100px; height: 100px" :src="scope.row.icon" :zoom-rate="1.1"
|
<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"
|
:preview-src-list="[scope.row.icon]" fit="scale-down" preview-teleported="true"
|
||||||
hide-on-click-modal="true" />
|
hide-on-click-modal="true" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<el-table-column align="center" prop="icon" label="入口icon">
|
<el-table-column align="center" prop="icon" label="入口icon">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-image style="width: 100px; height: 100px" :src="scope.row.icon" :zoom-rate="1.1"
|
<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"
|
:preview-src-list="[scope.row.icon]" fit="scale-down" preview-teleported="true"
|
||||||
hide-on-click-modal="true" />
|
hide-on-click-modal="true" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<el-table-column align="center" prop="url" label="开屏页" width="200">
|
<el-table-column align="center" prop="url" label="开屏页" width="200">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-image style="width: 100%; height: 100px" :src="scope.row.url" :zoom-rate="1.1"
|
<el-image style="width: 100%; height: 100px" :src="scope.row.url" :zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.url]" fit="cover" preview-teleported="true"
|
:preview-src-list="[scope.row.url]" fit="scale-down" preview-teleported="true"
|
||||||
hide-on-click-modal="true" />
|
hide-on-click-modal="true" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
:src="scope.row.photoUrl"
|
:src="scope.row.photoUrl"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.photoUrl]"
|
:preview-src-list="[scope.row.photoUrl]"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/></template>
|
/></template>
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
style="width: 30px; height: 30px; vertical-align: middle; margin-right: 6px"
|
style="width: 30px; height: 30px; vertical-align: middle; margin-right: 6px"
|
||||||
:src="scope.row.picUrl"
|
:src="scope.row.picUrl"
|
||||||
:zoom-rate="1"
|
:zoom-rate="1"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -10,15 +10,30 @@
|
|||||||
<div class="big-tips">
|
<div class="big-tips">
|
||||||
数据量过大,不再默认加载所有的数据,请先选择时间后,再点查询按钮
|
数据量过大,不再默认加载所有的数据,请先选择时间后,再点查询按钮
|
||||||
</div>
|
</div>
|
||||||
<form id="searchForm" action="/admin/roomSerial/export" method="POST">
|
<form id="searchForm"
|
||||||
|
action="/admin/roomSerial/export"
|
||||||
|
method="POST">
|
||||||
房主平台号(多个查询以英文逗号分隔):
|
房主平台号(多个查询以英文逗号分隔):
|
||||||
<input type="text" name="erbanNos" id="erbanNos" class="input-sm" style="margin-right: 40px;display: inline-block;"/> 选择时间:
|
<input type="text"
|
||||||
<input type="text" name="startTime" id="startTime" class="input-sm" /> 至
|
name="erbanNos"
|
||||||
<input type="text" id="endTime" name="endTime" class="input-sm" />
|
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 />
|
<br />
|
||||||
<div style="width: 60%">
|
<div style="width: 60%">
|
||||||
房间类型:
|
房间类型:
|
||||||
<select name="isPermit" id="isPermit" class="input-sm" style="width: 30%;display: inline-block;">
|
<select name="isPermit"
|
||||||
|
id="isPermit"
|
||||||
|
class="input-sm"
|
||||||
|
style="width: 30%;display: inline-block;">
|
||||||
<option value="0">全部</option>
|
<option value="0">全部</option>
|
||||||
<option value="1">牌照房</option>
|
<option value="1">牌照房</option>
|
||||||
<option value="3">新秀房</option>
|
<option value="3">新秀房</option>
|
||||||
@@ -29,10 +44,12 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<button id="room-serial-refresh" class="btn btn-default">
|
<button id="room-serial-refresh"
|
||||||
|
class="btn btn-default">
|
||||||
<i class="glyphicon glyphicon-wrench"></i>查询
|
<i class="glyphicon glyphicon-wrench"></i>查询
|
||||||
</button>
|
</button>
|
||||||
<button id="room-serial-export" class="btn btn-default">
|
<button id="room-serial-export"
|
||||||
|
class="btn btn-default">
|
||||||
<i class="glyphicon glyphicon-plus"></i>导出
|
<i class="glyphicon glyphicon-plus"></i>导出
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -40,37 +57,40 @@
|
|||||||
</section>
|
</section>
|
||||||
<!-- .content -->
|
<!-- .content -->
|
||||||
|
|
||||||
<div
|
<div class="modal fade"
|
||||||
class="modal fade"
|
id="tipModal"
|
||||||
id="tipModal"
|
tabindex="-1"
|
||||||
tabindex="-1"
|
role="dialog"
|
||||||
role="dialog"
|
aria-labelledby="modalLabel">
|
||||||
aria-labelledby="modalLabel"
|
<div class="modal-dialog"
|
||||||
>
|
role="document">
|
||||||
<div class="modal-dialog" role="document">
|
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">提示信息</h4>
|
<h4 class="modal-title">提示信息</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" id="tipMsg"></div>
|
<div class="modal-body"
|
||||||
|
id="tipMsg"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div class="modal fade"
|
||||||
class="modal fade"
|
id="roomGiftSerialDetailModal"
|
||||||
id="roomGiftSerialDetailModal"
|
tabindex="-1"
|
||||||
tabindex="-1"
|
role="dialog"
|
||||||
role="dialog"
|
aria-labelledby="modalLabel">
|
||||||
aria-labelledby="modalLabel"
|
<div class="modal-dialog"
|
||||||
>
|
role="document">
|
||||||
<div class="modal-dialog" role="document">
|
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button"
|
||||||
|
class="close"
|
||||||
|
data-dismiss="modal"
|
||||||
|
aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
<h4 class="modal-title" id="roomGiftSerialDetailModalTitle">房间明细</h4>
|
<h4 class="modal-title"
|
||||||
|
id="roomGiftSerialDetailModalTitle">房间明细</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="summary col-sm-12">
|
<div class="summary col-sm-12">
|
||||||
@@ -95,7 +115,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<h4 id="roundDetailModalFooter"></h4>
|
<h4 id="roundDetailModalFooter"></h4>
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">确定</button>
|
<button type="button"
|
||||||
|
class="btn btn-default"
|
||||||
|
data-dismiss="modal">确定</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -109,16 +131,16 @@ import { serverError } from "@/utils/maintainer";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RoomSerialView",
|
name: "RoomSerialView",
|
||||||
setup() {
|
setup () {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.initData();
|
this.initData();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData() {
|
initData () {
|
||||||
// ComboboxHelper.build(null, '#isPermit');
|
// ComboboxHelper.build(null, '#isPermit');
|
||||||
$(function () {
|
$(function () {
|
||||||
$("#table").bootstrapTable("destroy");
|
$("#table").bootstrapTable("destroy");
|
||||||
@@ -140,11 +162,10 @@ export default {
|
|||||||
align: "center",
|
align: "center",
|
||||||
width: "10%",
|
width: "10%",
|
||||||
},
|
},
|
||||||
{ field: "totalRadish", title: "萝卜流水", align: "center", width: "10%" },
|
// { field: "totalRadish", title: "萝卜流水", align: "center", width: "10%" },
|
||||||
{ field: "roomTitle", title: "房间标题", align: "center", width: "10%" },
|
{ field: "roomTitle", title: "房间标题", align: "center", width: "10%" },
|
||||||
{ field: "clanName", 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: "executionTime", title: "统计时间", align: "center", width: "15%" },
|
|
||||||
{
|
{
|
||||||
field: "id",
|
field: "id",
|
||||||
title: "操作",
|
title: "操作",
|
||||||
@@ -169,15 +190,11 @@ export default {
|
|||||||
cache: false,
|
cache: false,
|
||||||
striped: true,
|
striped: true,
|
||||||
showRefresh: false,
|
showRefresh: false,
|
||||||
pageSize: 10,
|
pagination: false,
|
||||||
pagination: true,
|
|
||||||
pageList: [1, 10, 20, 30, 50],
|
|
||||||
search: false,
|
search: false,
|
||||||
sidePagination: "server", //表示服务端请求
|
|
||||||
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
|
||||||
//设置为limit可以获取limit, offset, search, sort, order
|
//设置为limit可以获取limit, offset, search, sort, order
|
||||||
queryParamsType: "undefined",
|
queryParamsType: "undefined",
|
||||||
queryParams: function queryParams(params) {
|
queryParams: function queryParams (params) {
|
||||||
//设置查询参数
|
//设置查询参数
|
||||||
var param = {
|
var param = {
|
||||||
pageNumber: params.pageNumber,
|
pageNumber: params.pageNumber,
|
||||||
@@ -200,6 +217,7 @@ export default {
|
|||||||
onLoadError: function () {
|
onLoadError: function () {
|
||||||
//加载失败时执行
|
//加载失败时执行
|
||||||
console.log("load fail");
|
console.log("load fail");
|
||||||
|
enableRefreshBtn();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -219,7 +237,7 @@ export default {
|
|||||||
|
|
||||||
$("#room-serial-refresh").click(function () {
|
$("#room-serial-refresh").click(function () {
|
||||||
disableRefreshBtn();
|
disableRefreshBtn();
|
||||||
$("#table").bootstrapTable("refresh", { url: "/admin/roomSerial/listByPage" });
|
$("#table").bootstrapTable("refresh", { url: "/admin/roomSerial/list" });
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#room-serial-export").click(function () {
|
$("#room-serial-export").click(function () {
|
||||||
@@ -235,11 +253,11 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function disableRefreshBtn() {
|
function disableRefreshBtn () {
|
||||||
$("#room-serial-refresh").attr("disabled", "true");
|
$("#room-serial-refresh").attr("disabled", "true");
|
||||||
}
|
}
|
||||||
|
|
||||||
function enableRefreshBtn() {
|
function enableRefreshBtn () {
|
||||||
$("#room-serial-refresh").removeAttr("disabled");
|
$("#room-serial-refresh").removeAttr("disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -282,7 +300,7 @@ export default {
|
|||||||
search: false,
|
search: false,
|
||||||
sidePagination: "server", //表示服务端请求
|
sidePagination: "server", //表示服务端请求
|
||||||
queryParamsType: "undefined",
|
queryParamsType: "undefined",
|
||||||
queryParams: function queryParams(params) {
|
queryParams: function queryParams (params) {
|
||||||
//设置查询参数
|
//设置查询参数
|
||||||
var param = {
|
var param = {
|
||||||
page: params.pageNumber,
|
page: params.pageNumber,
|
||||||
@@ -330,7 +348,7 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function apiResult(json) {
|
function apiResult (json) {
|
||||||
if (json.code == 200 && json.message == "success") {
|
if (json.code == 200 && json.message == "success") {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,36 +8,39 @@
|
|||||||
</section>
|
</section>
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<label for="erbanNo"
|
<label for="erbanNo" class="col-sm-2 control-label"
|
||||||
class="col-sm-2 control-label">房主平台号:</label>
|
>房主平台号:</label
|
||||||
|
>
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<input type="text"
|
<input
|
||||||
class="form-control"
|
type="text"
|
||||||
name="erbanNo"
|
class="form-control"
|
||||||
id="erbanNo"
|
name="erbanNo"
|
||||||
placeholder="">
|
id="erbanNo"
|
||||||
|
placeholder=""
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<label for="roomTitle"
|
<label for="roomTitle" class="col-sm-2 control-label"
|
||||||
class="col-sm-2 control-label">房间标题:</label>
|
>房间标题:</label
|
||||||
|
>
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<input type="text"
|
<input
|
||||||
class="form-control"
|
type="text"
|
||||||
name="roomTitle"
|
class="form-control"
|
||||||
id="roomTitle"
|
name="roomTitle"
|
||||||
placeholder="">
|
id="roomTitle"
|
||||||
|
placeholder=""
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<label for="partitionId"
|
<label for="partitionId" class="col-sm-1 control-label"
|
||||||
class="col-sm-1 control-label">地区:</label>
|
>地区:</label
|
||||||
|
>
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<select name="partitionId"
|
<select name="partitionId" id="partitionId" class="form-control">
|
||||||
id="partitionId"
|
<option value="4" selected>华语区</option>
|
||||||
class="form-control">
|
|
||||||
<option value="4"
|
|
||||||
selected>华语区</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<button id="btnSearch"
|
<button id="btnSearch" class="btn btn-default">
|
||||||
class="btn btn-default">
|
|
||||||
<i class="glyphicon glyphicon-search"></i>查询
|
<i class="glyphicon glyphicon-search"></i>查询
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -46,44 +49,40 @@
|
|||||||
|
|
||||||
<!-- .content -->
|
<!-- .content -->
|
||||||
<div id="table"></div>
|
<div id="table"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- 编辑弹框 -->
|
<!-- 编辑弹框 -->
|
||||||
<div class="modal fade"
|
<div
|
||||||
id="roomTabHomeModal"
|
class="modal fade"
|
||||||
tabindex="-1"
|
id="roomTabHomeModal"
|
||||||
role="dialog"
|
tabindex="-1"
|
||||||
aria-labelledby="modalLabel">
|
role="dialog"
|
||||||
<div class="modal-dialog"
|
aria-labelledby="modalLabel"
|
||||||
role="document">
|
>
|
||||||
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button"
|
<button
|
||||||
class="close"
|
type="button"
|
||||||
data-dismiss="modal"
|
class="close"
|
||||||
aria-label="Close"><span aria-hidden="true">×</span>
|
data-dismiss="modal"
|
||||||
|
aria-label="Close"
|
||||||
|
>
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
<h4 class="modal-title"
|
<h4 class="modal-title" id="modalLabel">编辑</h4>
|
||||||
id="modalLabel">编辑</h4>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form class="form-horizontal"
|
<form class="form-horizontal" id="addForm">
|
||||||
id="addForm">
|
<input type="hidden" name="id" id="id" />
|
||||||
<input type="hidden"
|
<input type="hidden" name="roomUid" id="roomUid" />
|
||||||
name="id"
|
|
||||||
id="id" />
|
|
||||||
<input type="hidden"
|
|
||||||
name="roomUid"
|
|
||||||
id="roomUid" />
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="modal_isTop"
|
<label for="modal_isTop" class="col-sm-3 control-label"
|
||||||
class="col-sm-3 control-label">是否置顶<font color="red">*</font>:</label>
|
>是否置顶<font color="red">*</font>:</label
|
||||||
|
>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<select name="isTop"
|
<select name="isTop" id="modal_isTop" class="form-control">
|
||||||
id="modal_isTop"
|
|
||||||
class="form-control">
|
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option value="1">是</option>
|
<option value="1">是</option>
|
||||||
<option value="0">否</option>
|
<option value="0">否</option>
|
||||||
@@ -91,45 +90,69 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="modal_seq"
|
<label for="modal_type" class="col-sm-3 control-label"
|
||||||
class="col-sm-3 control-label">置顶排序<font color="red">*</font>:</label>
|
>房间类型:<font color="red">*</font>:</label
|
||||||
|
>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text"
|
<select name="type" id="modal_type" class="form-control">
|
||||||
class="form-control"
|
<option value="1">客服房间</option>
|
||||||
name="seq"
|
<option value="2">热门房间</option>
|
||||||
id="modal_seq"
|
</select>
|
||||||
placeholder="数字小的排前面,必填">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="modal_topStart"
|
<label for="modal_seq" class="col-sm-3 control-label"
|
||||||
class="col-sm-3 control-label">置顶开始时间<font color="red">*</font>
|
>置顶排序调整为位置排序<font color="red">*</font>:</label
|
||||||
:</label>
|
>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text"
|
<input
|
||||||
class="input-sm form-control datetime"
|
type="number"
|
||||||
name="topStart"
|
class="form-control"
|
||||||
id="modal_topStart">
|
name="seq"
|
||||||
|
id="modal_seq"
|
||||||
|
min="1"
|
||||||
|
max="5"
|
||||||
|
placeholder="填入的数字=在首页的第几个位置"
|
||||||
|
oninput="this.value = Math.min(Math.max(this.value, 1), 5)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="modal_topEnd"
|
<label for="modal_topStart" class="col-sm-3 control-label"
|
||||||
class="col-sm-3 control-label">置顶结束时间<font color="red">*</font>
|
>置顶开始时间<font color="red">*</font> :</label
|
||||||
:</label>
|
>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text"
|
<input
|
||||||
class="input-sm form-control datetime"
|
type="text"
|
||||||
name="topEnd"
|
class="input-sm form-control datetime"
|
||||||
id="modal_topEnd">
|
name="topStart"
|
||||||
|
id="modal_topStart"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="modal_isShow"
|
<label for="modal_topEnd" class="col-sm-3 control-label"
|
||||||
class="col-sm-3 control-label">是否在App首页展示<font color="red">*</font>:</label>
|
>置顶结束时间<font color="red">*</font> :</label
|
||||||
|
>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<select name="isShow"
|
<input
|
||||||
id="modal_isShow"
|
type="text"
|
||||||
class="form-control validate[required]">
|
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="1">是</option>
|
||||||
<option value="0">否</option>
|
<option value="0">否</option>
|
||||||
</select>
|
</select>
|
||||||
@@ -138,24 +161,23 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button"
|
<button type="button" class="btn btn-default" data-dismiss="modal">
|
||||||
class="btn btn-default"
|
关闭
|
||||||
data-dismiss="modal">关闭</button>
|
</button>
|
||||||
<button type="button"
|
<button type="button" class="btn btn-primary" id="btnConfirm">
|
||||||
class="btn btn-primary"
|
确定
|
||||||
id="btnConfirm">确定</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from "@/utils/bootstrap-table-helper";
|
||||||
import { formatTime } from '@/utils/maintainer';
|
import { formatTime } from "@/utils/maintainer";
|
||||||
import { getPartitionInfoList } from '@/api/partition/partitionInfo';
|
import { getPartitionInfoList } from "@/api/partition/partitionInfo";
|
||||||
import { buildSelectOption } from '@/utils/system-helper';
|
import { buildSelectOption } from "@/utils/system-helper";
|
||||||
|
|
||||||
// tab类型选择变化查询
|
// tab类型选择变化查询
|
||||||
/*function selectOnTabChange(obj){
|
/*function selectOnTabChange(obj){
|
||||||
@@ -164,115 +186,173 @@ import { buildSelectOption } from '@/utils/system-helper';
|
|||||||
}*/
|
}*/
|
||||||
export default {
|
export default {
|
||||||
name: "RoomTabHomeView",
|
name: "RoomTabHomeView",
|
||||||
setup () {
|
setup() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
created () {
|
created() {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.initPartition();
|
this.initPartition();
|
||||||
this.initData();
|
this.initData();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData () {
|
initData() {
|
||||||
$(function () {
|
$(function () {
|
||||||
$('.datetime').datetimepicker({
|
$(".datetime").datetimepicker({
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
format: "yyyy-mm-dd hh:ii:00",
|
||||||
autoclose: true
|
autoclose: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#table').bootstrapTable('destroy');
|
$("#table").bootstrapTable("destroy");
|
||||||
$('#table').bootstrapTable({
|
$("#table").bootstrapTable({
|
||||||
columns: [
|
columns: [
|
||||||
{ field: 'erbanNo', title: '房主平台号', align: 'center', width: '5%' },
|
|
||||||
{ field: 'roomUid', title: '房主Uid', align: 'center', width: '5%' },
|
|
||||||
{ field: 'roomTitle', title: '房间标题', align: 'center', width: '8%' },
|
|
||||||
{ field: 'roomTag', title: '房间标签', align: 'center', width: '5%' },
|
|
||||||
{
|
{
|
||||||
field: 'isPermitRoom',
|
field: "erbanNo",
|
||||||
title: '房间类型',
|
title: "房主平台号",
|
||||||
align: 'center',
|
align: "center",
|
||||||
width: '5%',
|
width: "5%",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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) {
|
formatter: function (val, row, index) {
|
||||||
let value = '';
|
let value = "";
|
||||||
if (val == 1) {
|
if (val == 1) {
|
||||||
value = '牌照房';
|
value = "牌照房";
|
||||||
} else if (val == 4) {
|
} else if (val == 4) {
|
||||||
value = '个播房';
|
value = "个播房";
|
||||||
} else {
|
} else {
|
||||||
value = '非牌照房';
|
value = "非牌照房";
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'avatar',
|
field: "avatar",
|
||||||
title: '图标内容',
|
title: "图标内容",
|
||||||
align: 'center',
|
align: "center",
|
||||||
width: '5%',
|
width: "5%",
|
||||||
formatter: function (val, row, index) {
|
formatter: function (val, row, index) {
|
||||||
return "<img src='" + val + "' width='40' height='40'>";
|
return "<img src='" + val + "' width='40' height='40'>";
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'isTop',
|
field: "isTop",
|
||||||
title: '是否置顶',
|
title: "是否置顶",
|
||||||
align: 'center',
|
align: "center",
|
||||||
valign: 'middle',
|
valign: "middle",
|
||||||
width: '5%',
|
width: "5%",
|
||||||
formatter: function (val, row, index) {
|
formatter: function (val, row, index) {
|
||||||
if (val == 1) {
|
if (val == 1) {
|
||||||
return '是';
|
return "是";
|
||||||
} else if (val == 0) {
|
} else if (val == 0) {
|
||||||
return '否';
|
return "否";
|
||||||
}
|
}
|
||||||
return '否';
|
return "否";
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'isShow',
|
field: "isShow",
|
||||||
title: '是否在App首页展示',
|
title: "是否在App首页展示",
|
||||||
align: 'center',
|
align: "center",
|
||||||
valign: 'middle',
|
valign: "middle",
|
||||||
width: '5%',
|
width: "5%",
|
||||||
formatter: function (val, row, index) {
|
formatter: function (val, row, index) {
|
||||||
if (val == 1) {
|
if (val == 1) {
|
||||||
return '是';
|
return "是";
|
||||||
} else if (val == 0) {
|
} else if (val == 0) {
|
||||||
return '否';
|
return "否";
|
||||||
}
|
}
|
||||||
return '是';
|
return "是";
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{ field: 'seq', title: '置顶排序', align: 'center', width: '5%' },
|
{ field: "seq", title: "置顶排序", align: "center", width: "5%" },
|
||||||
{ field: 'topStart', title: '置顶开始时间', align: 'center', valign: 'middle', width: '10%', formatter: formatTime },
|
|
||||||
{ field: 'topEnd', title: '置顶结束时间', align: 'center', valign: 'middle', width: '10%', formatter: formatTime },
|
|
||||||
{
|
{
|
||||||
field: 'isHourTop1', title: '小时榜top1', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
field: "topStart",
|
||||||
return val ? '是' : '否';
|
title: "置顶开始时间",
|
||||||
}
|
align: "center",
|
||||||
|
valign: "middle",
|
||||||
|
width: "10%",
|
||||||
|
formatter: formatTime,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'isHourTop1', title: '周榜top1', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
field: "topEnd",
|
||||||
return val ? '是' : '否';
|
title: "置顶结束时间",
|
||||||
}
|
align: "center",
|
||||||
|
valign: "middle",
|
||||||
|
width: "10%",
|
||||||
|
formatter: formatTime,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'micUserCount', title: '麦上人数', align: 'center', valign: 'middle', width: '10%'
|
field: "isHourTop1",
|
||||||
},
|
title: "小时榜top1",
|
||||||
{
|
align: "center",
|
||||||
field: 'onlineNum', title: '房间人数', align: 'center', valign: 'middle', width: '10%'
|
valign: "middle",
|
||||||
},
|
width: "10%",
|
||||||
{
|
|
||||||
field: 'id',
|
|
||||||
title: '操作',
|
|
||||||
align: 'center',
|
|
||||||
width: '10%',
|
|
||||||
formatter: function (val, row, index) {
|
formatter: function (val, row, index) {
|
||||||
return '<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id="' + val + '" data-index="' + index + '">' +
|
return val ? "是" : "否";
|
||||||
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>';
|
},
|
||||||
}
|
},
|
||||||
}
|
{
|
||||||
|
field: "isHourTop1",
|
||||||
|
title: "周榜top1",
|
||||||
|
align: "center",
|
||||||
|
valign: "middle",
|
||||||
|
width: "10%",
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
return val ? "是" : "否";
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "micUserCount",
|
||||||
|
title: "麦上人数",
|
||||||
|
align: "center",
|
||||||
|
valign: "middle",
|
||||||
|
width: "10%",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "onlineNum",
|
||||||
|
title: "房间人数",
|
||||||
|
align: "center",
|
||||||
|
valign: "middle",
|
||||||
|
width: "10%",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "id",
|
||||||
|
title: "操作",
|
||||||
|
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 +
|
||||||
|
'" data-index="' +
|
||||||
|
index +
|
||||||
|
'">' +
|
||||||
|
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>'
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
undefinedText: "",
|
undefinedText: "",
|
||||||
cache: false,
|
cache: false,
|
||||||
@@ -281,51 +361,55 @@ export default {
|
|||||||
search: false,
|
search: false,
|
||||||
sidePagination: "server", //表示服务端请求
|
sidePagination: "server", //表示服务端请求
|
||||||
queryParamsType: "undefined",
|
queryParamsType: "undefined",
|
||||||
queryParams: function queryParams (params) { //设置查询参数
|
queryParams: function queryParams(params) {
|
||||||
|
//设置查询参数
|
||||||
var param = {
|
var param = {
|
||||||
page: params.pageNumber,
|
page: params.pageNumber,
|
||||||
pageSize: params.pageSize,
|
pageSize: params.pageSize,
|
||||||
erbanNo: $('#erbanNo').val(),
|
erbanNo: $("#erbanNo").val(),
|
||||||
roomTitle: $('#roomTitle').val(),
|
roomTitle: $("#roomTitle").val(),
|
||||||
partitionId: $('#partitionId').val(),
|
partitionId: $("#partitionId").val(),
|
||||||
};
|
};
|
||||||
console.log(param);
|
console.log(param);
|
||||||
return param;
|
return param;
|
||||||
},
|
},
|
||||||
url: '/admin/roomTabHome/list',
|
url: "/admin/roomTabHome/list",
|
||||||
responseHandler: function (data) {
|
responseHandler: function (data) {
|
||||||
console.info(111, data)
|
console.info(111, data);
|
||||||
if (data.code === 200) {
|
if (data.code === 200) {
|
||||||
return { "rows": data.data, "total": data.data.length };
|
return { rows: data.data, total: data.data.length };
|
||||||
} else {
|
} else {
|
||||||
return { "rows": [], "total": 0 };
|
return { rows: [], total: 0 };
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toolbar: '#toolbar',
|
toolbar: "#toolbar",
|
||||||
onLoadSuccess: function () { //加载成功时执行
|
onLoadSuccess: function () {
|
||||||
|
//加载成功时执行
|
||||||
console.log("load success");
|
console.log("load success");
|
||||||
},
|
},
|
||||||
onLoadError: function () { //加载失败时执行
|
onLoadError: function () {
|
||||||
|
//加载失败时执行
|
||||||
console.log("load fail");
|
console.log("load fail");
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// 查询刷新
|
// 查询刷新
|
||||||
$('#btnSearch').on('click', function () {
|
$("#btnSearch").on("click", function () {
|
||||||
TableHelper.doRefresh('#table');
|
TableHelper.doRefresh("#table");
|
||||||
});
|
});
|
||||||
|
|
||||||
// 编辑或者新增
|
// 编辑或者新增
|
||||||
$("#btnConfirm").click(function () {
|
$("#btnConfirm").click(function () {
|
||||||
var id = $("#id").val();
|
var id = $("#id").val();
|
||||||
var roomUid = $('#roomUid').val();
|
var roomUid = $("#roomUid").val();
|
||||||
var seq = $("#modal_seq").val();
|
var seq = $("#modal_seq").val();
|
||||||
var isTop = $("#modal_isTop").val();
|
var isTop = $("#modal_isTop").val();
|
||||||
|
var type = $("#modal_type").val();
|
||||||
var iconContent = $("#modal_iconContent").val();
|
var iconContent = $("#modal_iconContent").val();
|
||||||
var topStart = $("#modal_topStart").val();
|
var topStart = $("#modal_topStart").val();
|
||||||
var topEnd = $("#modal_topEnd").val();
|
var topEnd = $("#modal_topEnd").val();
|
||||||
var isShow = $('#modal_isShow').val();
|
var isShow = $("#modal_isShow").val();
|
||||||
if ($("#addForm").validationEngine('validate')) {
|
if ($("#addForm").validationEngine("validate")) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "post",
|
type: "post",
|
||||||
url: "/admin/roomTabHome/save",
|
url: "/admin/roomTabHome/save",
|
||||||
@@ -343,34 +427,34 @@ export default {
|
|||||||
success: function (json) {
|
success: function (json) {
|
||||||
if (json.code == 200) {
|
if (json.code == 200) {
|
||||||
$("#tipMsg").text("保存成功");
|
$("#tipMsg").text("保存成功");
|
||||||
$("#tipModal").modal('show');
|
$("#tipModal").modal("show");
|
||||||
TableHelper.doRefresh("#table");
|
TableHelper.doRefresh("#table");
|
||||||
$("#roomTabHomeModal").modal('hide');
|
$("#roomTabHomeModal").modal("hide");
|
||||||
} else {
|
} else {
|
||||||
$("#tipMsg").text("保存失败." + json.msg);
|
$("#tipMsg").text("保存失败." + json.msg);
|
||||||
$("#tipModal").modal('show');
|
$("#tipModal").modal("show");
|
||||||
TableHelper.doRefresh("#table");
|
TableHelper.doRefresh("#table");
|
||||||
$("#roomTabHomeModal").modal('hide');
|
$("#roomTabHomeModal").modal("hide");
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 获取信息
|
// 获取信息
|
||||||
$("#table").on("click", '.opt-edit', function () {
|
$("#table").on("click", ".opt-edit", function () {
|
||||||
var id = $(this).attr("data-id");
|
var id = $(this).attr("data-id");
|
||||||
const index = $(this).data('index');
|
const index = $(this).data("index");
|
||||||
const record = TableHelper.getData('#table')[index];
|
const record = TableHelper.getData("#table")[index];
|
||||||
$("#id").val(null);
|
$("#id").val(null);
|
||||||
$("#modal_seq").val(0);
|
$("#modal_seq").val(0);
|
||||||
$("#modal_isTop").val(0);
|
$("#modal_isTop").val(0);
|
||||||
$("#modal_topStart").val('');
|
$("#modal_type").val(0);
|
||||||
$("#modal_topEnd").val('');
|
$("#modal_topStart").val("");
|
||||||
|
$("#modal_topEnd").val("");
|
||||||
$("#modal_isShow").val(0);
|
$("#modal_isShow").val(0);
|
||||||
$('#roomUid').val(record.roomUid);
|
$("#roomUid").val(record.roomUid);
|
||||||
if (id && id != 'null') {
|
if (id && id != "null") {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "get",
|
type: "get",
|
||||||
url: "/admin/roomTabHome/get",
|
url: "/admin/roomTabHome/get",
|
||||||
@@ -382,53 +466,53 @@ export default {
|
|||||||
$("#id").val(id);
|
$("#id").val(id);
|
||||||
$("#modal_seq").val(json.seq);
|
$("#modal_seq").val(json.seq);
|
||||||
$("#modal_isTop").val(json.isTop ? 1 : 0);
|
$("#modal_isTop").val(json.isTop ? 1 : 0);
|
||||||
|
$("#modal_type").val(json.type);
|
||||||
$("#modal_topStart").val(formatTime(json.topStart));
|
$("#modal_topStart").val(formatTime(json.topStart));
|
||||||
$("#modal_topEnd").val(formatTime(json.topEnd));
|
$("#modal_topEnd").val(formatTime(json.topEnd));
|
||||||
$("#modal_isShow").val(json.isShow ? 1 : 0);
|
$("#modal_isShow").val(json.isShow ? 1 : 0);
|
||||||
} else {
|
} else {
|
||||||
$("#tipMsg").text("获取菜单信息出错");
|
$("#tipMsg").text("获取菜单信息出错");
|
||||||
$("#tipModal").modal('show');
|
$("#tipModal").modal("show");
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 打开编辑弹窗
|
// 打开编辑弹窗
|
||||||
$("#roomTabHomeModal").modal('show');
|
$("#roomTabHomeModal").modal("show");
|
||||||
$("#modalLabel").text("编辑");
|
$("#modalLabel").text("编辑");
|
||||||
});
|
});
|
||||||
|
|
||||||
// 删除操作
|
// 删除操作
|
||||||
$("#table").on("click", '.opt-remove', function () {
|
$("#table").on("click", ".opt-remove", function () {
|
||||||
var id = $(this).attr("data-id");
|
var id = $(this).attr("data-id");
|
||||||
if (id == 'undefined') {
|
if (id == "undefined") {
|
||||||
$("#tipMsg").text("id参数有误");
|
$("#tipMsg").text("id参数有误");
|
||||||
$("#tipModal").modal('show');
|
$("#tipModal").modal("show");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (confirm("你确认删除吗? \r\n 删除后不会恢复,请谨慎操作!")) {
|
if (confirm("你确认删除吗? \r\n 删除后不会恢复,请谨慎操作!")) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'post',
|
type: "post",
|
||||||
url: "/admin/roomTabHome/delete",
|
url: "/admin/roomTabHome/delete",
|
||||||
data: { id: id },
|
data: { id: id },
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (json) {
|
success: function (json) {
|
||||||
if (json.code == 200) {
|
if (json.code == 200) {
|
||||||
$("#tipMsg").text("删除成功");
|
$("#tipMsg").text("删除成功");
|
||||||
$("#tipModal").modal('show');
|
$("#tipModal").modal("show");
|
||||||
TableHelper.doRefresh("#table");
|
TableHelper.doRefresh("#table");
|
||||||
} else {
|
} else {
|
||||||
$("#tipMsg").text("删除失败");
|
$("#tipMsg").text("删除失败");
|
||||||
$("#tipModal").modal('show');
|
$("#tipModal").modal("show");
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
initPartition () {
|
initPartition() {
|
||||||
getPartitionInfoList().then(res => {
|
getPartitionInfoList().then((res) => {
|
||||||
let data = res.data;
|
let data = res.data;
|
||||||
buildSelectOption(
|
buildSelectOption(
|
||||||
"#partitionId",
|
"#partitionId",
|
||||||
|
|||||||
@@ -103,6 +103,12 @@
|
|||||||
<input type="text" class="form-control validate[required]" name="name" id="en_modal_name">
|
<input type="text" class="form-control validate[required]" name="name" id="en_modal_name">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="tr_modal_name" class="col-sm-3 control-label">土耳其名称<font color="red">*</font>:</label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="text" class="form-control validate[required]" name="name" id="tr_modal_name">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- 上传act图片 -->
|
<!-- 上传act图片 -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">图片:</label>
|
<label class="col-sm-3 control-label">图片:</label>
|
||||||
@@ -214,6 +220,7 @@ export default {
|
|||||||
{field: 'name.zh', title: '名称', align: 'center', width: '10%'},
|
{field: 'name.zh', title: '名称', align: 'center', width: '10%'},
|
||||||
{field: 'name.ar', title: '阿语名称', align: 'center', width: '10%'},
|
{field: 'name.ar', title: '阿语名称', align: 'center', width: '10%'},
|
||||||
{field: 'name.en', title: '英语名称', align: 'center', width: '10%'},
|
{field: 'name.en', title: '英语名称', align: 'center', width: '10%'},
|
||||||
|
{field: 'name.tr', title: '土耳其名称', align: 'center', width: '10%'},
|
||||||
{field: 'pict', title: '图片', align:'center', width: '10%',valign:'center',
|
{field: 'pict', title: '图片', align:'center', width: '10%',valign:'center',
|
||||||
formatter: function (val,row,index) {
|
formatter: function (val,row,index) {
|
||||||
if(null == val || val == '') {
|
if(null == val || val == '') {
|
||||||
@@ -390,6 +397,7 @@ export default {
|
|||||||
$("#modal_name").val("");
|
$("#modal_name").val("");
|
||||||
$("#ar_modal_name").val("");
|
$("#ar_modal_name").val("");
|
||||||
$("#en_modal_name").val("");
|
$("#en_modal_name").val("");
|
||||||
|
$("#tr_modal_name").val("");
|
||||||
$("#modal_seq").val("");
|
$("#modal_seq").val("");
|
||||||
$("#modal_status").val("");
|
$("#modal_status").val("");
|
||||||
$("#modal_type").val("");
|
$("#modal_type").val("");
|
||||||
@@ -409,8 +417,10 @@ export default {
|
|||||||
var ar_name = $("#ar_modal_name").val();
|
var ar_name = $("#ar_modal_name").val();
|
||||||
// 英语名称
|
// 英语名称
|
||||||
var en_name = $("#en_modal_name").val();
|
var en_name = $("#en_modal_name").val();
|
||||||
|
// 土耳其名称
|
||||||
|
var tr_name = $("#tr_modal_name").val();
|
||||||
// 国际化字段
|
// 国际化字段
|
||||||
var jsonName = {"zh":name,"ar":ar_name,"en":en_name}
|
var jsonName = {"zh":name,"ar":ar_name,"en":en_name,"tr":tr_name}
|
||||||
const nameValue = JSON.stringify(jsonName);
|
const nameValue = JSON.stringify(jsonName);
|
||||||
var seq = $("#modal_seq").val();
|
var seq = $("#modal_seq").val();
|
||||||
var status = $("#modal_status").val();
|
var status = $("#modal_status").val();
|
||||||
@@ -483,12 +493,16 @@ export default {
|
|||||||
$("#ar_modal_name").val(jsonName.ar);
|
$("#ar_modal_name").val(jsonName.ar);
|
||||||
// 英语名称
|
// 英语名称
|
||||||
$("#en_modal_name").val(jsonName.en);
|
$("#en_modal_name").val(jsonName.en);
|
||||||
|
// 土耳其名称
|
||||||
|
$("#tr_modal_name").val(jsonName.tr);
|
||||||
} else {
|
} else {
|
||||||
$("#modal_name").val(name);
|
$("#modal_name").val(name);
|
||||||
// 阿语名称
|
// 阿语名称
|
||||||
$("#ar_modal_name").val(name);
|
$("#ar_modal_name").val(name);
|
||||||
// 英语名称
|
// 英语名称
|
||||||
$("#en_modal_name").val(name);
|
$("#en_modal_name").val(name);
|
||||||
|
// 土耳其名称
|
||||||
|
$("#tr_modal_name").val(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#modal_seq").val(json.seq);
|
$("#modal_seq").val(json.seq);
|
||||||
|
|||||||
573
src/views/roomBackground/appUiSet.vue
Normal file
573
src/views/roomBackground/appUiSet.vue
Normal file
@@ -0,0 +1,573 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<!-- 查询 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>说明:</span>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>头图尺寸:</span>
|
||||||
|
<div class="text">750*280</div>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>icon尺寸:</span>
|
||||||
|
<div class="text">80*80</div>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>首页头图:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess1"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="inquire.imageUrl1" :src="inquire.imageUrl1" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(1)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>首页底图:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess2"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="inquire.imageUrl2" :src="inquire.imageUrl2" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(2)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>首页icon选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess3"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="inquire.imageUrl3" :src="inquire.imageUrl3" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(3)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>首页icon未选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess4"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="inquire.imageUrl4" :src="inquire.imageUrl4" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(4)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>游戏icon选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess5"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="inquire.imageUrl5" :src="inquire.imageUrl5" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(5)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>游戏icon未选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess6"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="inquire.imageUrl6" :src="inquire.imageUrl6" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(6)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>动态icon选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess7"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="inquire.imageUrl7" :src="inquire.imageUrl7" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(7)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>动态icon未选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess8"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="inquire.imageUrl8" :src="inquire.imageUrl8" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(8)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>消息icon选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess9"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="inquire.imageUrl9" :src="inquire.imageUrl9" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(9)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>消息icon未选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess10"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="inquire.imageUrl10"
|
||||||
|
:src="inquire.imageUrl10"
|
||||||
|
class="avatar"
|
||||||
|
/>
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(10)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>我的icon选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess11"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="inquire.imageUrl11"
|
||||||
|
:src="inquire.imageUrl11"
|
||||||
|
class="avatar"
|
||||||
|
/>
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(11)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>我的icon未选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess12"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="inquire.imageUrl12"
|
||||||
|
:src="inquire.imageUrl12"
|
||||||
|
class="avatar"
|
||||||
|
/>
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(12)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>横条icon:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess13"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="inquire.imageUrl13"
|
||||||
|
:src="inquire.imageUrl13"
|
||||||
|
class="avatar"
|
||||||
|
/>
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(13)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>背景颜色:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.color"
|
||||||
|
placeholder="例如:#FFFFFF"
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<el-button
|
||||||
|
style="margin-bottom: 20px"
|
||||||
|
class="primary but"
|
||||||
|
type="primary"
|
||||||
|
@click="seave()"
|
||||||
|
>保存设置</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
appUiSetting,
|
||||||
|
appUiSettingSave,
|
||||||
|
} from "@/api/roomBackground/roomBackground";
|
||||||
|
// @ts-ignore
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
// @ts-ignore
|
||||||
|
import { ElMessage, ElTable } from "element-plus";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { ElMessageBox } from "element-plus"; // 正确引入 ElM
|
||||||
|
export default {
|
||||||
|
name: "appUiSet",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
inquire: {
|
||||||
|
imageUrl1: "",
|
||||||
|
imageUrl2: "",
|
||||||
|
imageUrl3: "",
|
||||||
|
imageUrl4: "",
|
||||||
|
imageUrl5: "",
|
||||||
|
imageUrl6: "",
|
||||||
|
imageUrl7: "",
|
||||||
|
imageUrl8: "",
|
||||||
|
imageUrl9: "",
|
||||||
|
imageUrl10: "",
|
||||||
|
imageUrl11: "",
|
||||||
|
imageUrl12: "",
|
||||||
|
imageUrl13: "",
|
||||||
|
color: "",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 查询接口
|
||||||
|
getData() {
|
||||||
|
appUiSetting().then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
console.log(res.data);
|
||||||
|
this.inquire.imageUrl1 = res.data.headIcon;
|
||||||
|
this.inquire.imageUrl2 = res.data.navbar;
|
||||||
|
this.inquire.imageUrl3 = res.data.homeSelectIcon;
|
||||||
|
this.inquire.imageUrl4 = res.data.homeUnSelectIcon;
|
||||||
|
this.inquire.imageUrl5 = res.data.gameSelectIcon;
|
||||||
|
this.inquire.imageUrl6 = res.data.gameUnSelectIcon;
|
||||||
|
this.inquire.imageUrl7 = res.data.dynamicSelectIcon;
|
||||||
|
this.inquire.imageUrl8 = res.data.dynamicUnSelectIcon;
|
||||||
|
this.inquire.imageUrl9 = res.data.msgSelectIcon;
|
||||||
|
this.inquire.imageUrl10 = res.data.msgUnSelectIcon;
|
||||||
|
this.inquire.imageUrl11 = res.data.mineSelectIcon;
|
||||||
|
this.inquire.imageUrl12 = res.data.mineUnSelectIcon;
|
||||||
|
this.inquire.imageUrl13 = res.data.selectBar;
|
||||||
|
this.inquire.color = res.data.backgroundColor;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
seave() {
|
||||||
|
var obj = {
|
||||||
|
headIcon: this.inquire.imageUrl1,
|
||||||
|
navbar: this.inquire.imageUrl2,
|
||||||
|
homeSelectIcon: this.inquire.imageUrl3,
|
||||||
|
homeUnSelectIcon: this.inquire.imageUrl4,
|
||||||
|
gameSelectIcon: this.inquire.imageUrl5,
|
||||||
|
gameUnSelectIcon: this.inquire.imageUrl6,
|
||||||
|
dynamicSelectIcon: this.inquire.imageUrl7,
|
||||||
|
dynamicUnSelectIcon: this.inquire.imageUrl8,
|
||||||
|
msgSelectIcon: this.inquire.imageUrl9,
|
||||||
|
msgUnSelectIcon: this.inquire.imageUrl10,
|
||||||
|
mineSelectIcon: this.inquire.imageUrl11,
|
||||||
|
mineUnSelectIcon: this.inquire.imageUrl12,
|
||||||
|
selectBar: this.inquire.imageUrl13,
|
||||||
|
backgroundColor: this.inquire.color,
|
||||||
|
};
|
||||||
|
// obj = JSON.stringify(obj);
|
||||||
|
appUiSettingSave(obj).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "保存成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
defaultFun(num){
|
||||||
|
console.log(this.inquire);
|
||||||
|
console.log(this.inquire[`imageUrl${num}`]);
|
||||||
|
this.inquire[`imageUrl${num}`] = '';
|
||||||
|
console.log(this.inquire);
|
||||||
|
},
|
||||||
|
handleAvatarSuccess1(res, file) {
|
||||||
|
this.inquire.imageUrl1 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess2(res, file) {
|
||||||
|
this.inquire.imageUrl2 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess3(res, file) {
|
||||||
|
this.inquire.imageUrl3 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess4(res, file) {
|
||||||
|
this.inquire.imageUrl4 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess5(res, file) {
|
||||||
|
this.inquire.imageUrl5 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess6(res, file) {
|
||||||
|
this.inquire.imageUrl6 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess7(res, file) {
|
||||||
|
this.inquire.imageUrl7 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess8(res, file) {
|
||||||
|
this.inquire.imageUrl8 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess9(res, file) {
|
||||||
|
this.inquire.imageUrl9 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess10(res, file) {
|
||||||
|
this.inquire.imageUrl10 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess11(res, file) {
|
||||||
|
this.inquire.imageUrl11 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess12(res, file) {
|
||||||
|
this.inquire.imageUrl12 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess13(res, file) {
|
||||||
|
this.inquire.imageUrl13 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
beforeAvatarUpload() {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传中~",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarError() {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传失败!",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.box {
|
||||||
|
padding-top: 20px;
|
||||||
|
background: #ecf0f5;
|
||||||
|
.inquire {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 20px;
|
||||||
|
span {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.text {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.inquireBox {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
span {
|
||||||
|
display: block;
|
||||||
|
margin-right: 20px;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
.but {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
.input {
|
||||||
|
width: 180px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.dialogTableVisibleBut {
|
||||||
|
display: block;
|
||||||
|
margin: 30px 0 0 830px;
|
||||||
|
}
|
||||||
|
.paginationClass {
|
||||||
|
margin: 15px 0 5px 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.selectBox {
|
||||||
|
display: flex;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.selectBoxImg {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
.pagination {
|
||||||
|
margin: 10px auto 10px;
|
||||||
|
position: relative;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
.pagination_in {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.dialogBox {
|
||||||
|
width: 100%;
|
||||||
|
// height: 50px;
|
||||||
|
// line-height: 50px;
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
.input {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
.selectBox {
|
||||||
|
display: flex;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.selectBoxImg {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
683
src/views/roomBackground/roomBackground.vue
Normal file
683
src/views/roomBackground/roomBackground.vue
Normal file
@@ -0,0 +1,683 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<!-- 查询 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>分区</span>
|
||||||
|
<el-select v-model="inquire.partitionId" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.partitionArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<!-- 名称 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span class="demonstration">id</span>
|
||||||
|
<el-input v-model="inquire.id" placeholder="" class="input"></el-input>
|
||||||
|
</div>
|
||||||
|
<!-- 状态 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>状态</span>
|
||||||
|
<el-select v-model="inquire.status" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.statusArr"
|
||||||
|
:key="item.status"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.status"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<!-- 查询按钮 -->
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
tableData = [];
|
||||||
|
currentPage = 1;
|
||||||
|
isFinished = false;
|
||||||
|
getData();
|
||||||
|
"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
<!-- 重置按钮 -->
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
inquire.partitionId = '';
|
||||||
|
inquire.id = '';
|
||||||
|
inquire.status = '';
|
||||||
|
getData();
|
||||||
|
"
|
||||||
|
>重置按钮</el-button
|
||||||
|
>
|
||||||
|
<!-- 新增按钮 -->
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
dialogVisibleTitle = '新增';
|
||||||
|
dialogVisibleTitleType = 1;
|
||||||
|
dialogObj.checkedArr = [];
|
||||||
|
dialogObj.radio = '0';
|
||||||
|
dialogObj.imageUrl1 = '';
|
||||||
|
dialogObj.imageUrl2 = '';
|
||||||
|
dialogObj.imageUrl3 = '';
|
||||||
|
dialogObj.price = '';
|
||||||
|
dialogObj.renew = '';
|
||||||
|
dialogObj.originalPrice = '';
|
||||||
|
dialogObj.day = '';
|
||||||
|
dialogObj.sort = '';
|
||||||
|
dialogObj.radio2 = '1';
|
||||||
|
dialogVisible = true;
|
||||||
|
"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
|
||||||
|
<!-- 表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
ref="multipleTable"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="id" align="center" label="id" />
|
||||||
|
<el-table-column prop="type" align="center" label="是否免费">
|
||||||
|
<template v-slot="scope">{{
|
||||||
|
scope.row.type == 0 ? "免费" : scope.row.type == 1 ? "付费" : "自定义"
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="buyGoldPrice" align="center" label="购买价格" />
|
||||||
|
<el-table-column prop="renewGoldPrice" align="center" label="续费价格" />
|
||||||
|
<el-table-column prop="originalGoldPrice" align="center" label="原价" />
|
||||||
|
<el-table-column prop="buyHour" align="center" label="有效期" />
|
||||||
|
<el-table-column prop="seq" align="center" label="排序" />
|
||||||
|
<el-table-column prop="status" align="center" label="上架状态">
|
||||||
|
<template v-slot="scope">{{
|
||||||
|
scope.row.status == 1 ? "上架" : "下架"
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="url" align="center" label="图片">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.url"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="[scope.row.url]"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
<!-- <div
|
||||||
|
v-show="scope.row.url.toLowerCase().endsWith('.svga')"
|
||||||
|
:id="'guide' + scope.row.id"
|
||||||
|
class="game-guide"
|
||||||
|
>
|
||||||
|
{{ guideFn(scope.row.id, scope.row.url) }}
|
||||||
|
</div> -->
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="createTime" align="center" label="创建时间" />
|
||||||
|
<el-table-column prop="partitionDesc" align="center" label="分区" />
|
||||||
|
<el-table-column prop="adminUser" align="center" label="操作人" />
|
||||||
|
<el-table-column align="center" label="操作">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
dialogVisibleTitle = '编辑';
|
||||||
|
dialogVisibleTitleType = 2;
|
||||||
|
dialogObj.checkedArr = checkedArrFun(scope.row.partitionFlag);
|
||||||
|
dialogObj.radio = scope.row.type.toString();
|
||||||
|
dialogObj.price = scope.row.buyGoldPrice;
|
||||||
|
dialogObj.renew = scope.row.renewGoldPrice;
|
||||||
|
dialogObj.originalPrice = scope.row.originalGoldPrice;
|
||||||
|
dialogObj.day = scope.row.buyHour;
|
||||||
|
dialogObj.sort = scope.row.seq;
|
||||||
|
dialogObj.radio2 = scope.row.status.toString();
|
||||||
|
dialogObj.imageUrl2 = scope.row.url;
|
||||||
|
dialogObj.imageUrl1 = '';
|
||||||
|
dialogObj.imageUrl3 = '';
|
||||||
|
dialogObj.id = scope.row.id;
|
||||||
|
dialogVisible = true;
|
||||||
|
"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
<!-- <el-button class="primary" type="primary" @click="del(scope.row)"
|
||||||
|
>删除</el-button
|
||||||
|
> -->
|
||||||
|
<!-- 删除弹出框 -->
|
||||||
|
<!-- <el-popover
|
||||||
|
v-model:visible="scope.row.visible1"
|
||||||
|
placement="top"
|
||||||
|
:width="160"
|
||||||
|
>
|
||||||
|
<p>确定要删除么?</p>
|
||||||
|
<div style="text-align: right; margin: 0">
|
||||||
|
<el-button size="small" @click="scope.row.visible1 = false">
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="pass(scope.row.id)"
|
||||||
|
>
|
||||||
|
确认
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<template #reference>
|
||||||
|
<el-button
|
||||||
|
class="danger"
|
||||||
|
type="danger"
|
||||||
|
@click="scope.row.visible1 = true"
|
||||||
|
>删除</el-button
|
||||||
|
> -->
|
||||||
|
<!-- </template>
|
||||||
|
</el-popover> -->
|
||||||
|
</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="[1, 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="dialogVisible"
|
||||||
|
:title="dialogVisibleTitle"
|
||||||
|
center
|
||||||
|
:width="500"
|
||||||
|
>
|
||||||
|
<div class="dialogBox">
|
||||||
|
<span>分区:</span>
|
||||||
|
<el-checkbox-group v-model="dialogObj.checkedArr">
|
||||||
|
<el-checkbox
|
||||||
|
v-for="(item, i) in inquire.partitionArr"
|
||||||
|
:key="i"
|
||||||
|
:label="item.id"
|
||||||
|
>{{ item.desc }}</el-checkbox
|
||||||
|
>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div>
|
||||||
|
<div class="dialogBox">
|
||||||
|
<span>是否免费:</span>
|
||||||
|
<div>
|
||||||
|
<el-radio v-model="dialogObj.radio" label="0">是</el-radio>
|
||||||
|
<el-radio v-model="dialogObj.radio" label="1">否</el-radio>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="dialogBox">
|
||||||
|
<span>房内图标:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="dialogObj.imageUrl1"
|
||||||
|
:src="dialogObj.imageUrl1"
|
||||||
|
class="avatar"
|
||||||
|
/>
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
</div> -->
|
||||||
|
<div class="dialogBox">
|
||||||
|
<span>购买价格:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="dialogObj.price"
|
||||||
|
placeholder="如果是免费请写0"
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="dialogBox">
|
||||||
|
<span>续费价格:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="dialogObj.renew"
|
||||||
|
placeholder="如果是免费请写0"
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="dialogBox">
|
||||||
|
<span>原价:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="dialogObj.originalPrice"
|
||||||
|
placeholder="如果是免费请写0"
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="dialogBox">
|
||||||
|
<span>有效天数:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="dialogObj.day"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="dialogBox">
|
||||||
|
<span>排序:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="dialogObj.sort"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="dialogBox">
|
||||||
|
<span>状态:</span>
|
||||||
|
<div>
|
||||||
|
<el-radio v-model="dialogObj.radio2" label="1">上架</el-radio>
|
||||||
|
<el-radio v-model="dialogObj.radio2" label="-1">下架</el-radio>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dialogBox">
|
||||||
|
<span>背景图片:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess2"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<!-- 这里是原来的图片预览 -->
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="dialogObj.imageUrl2"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
<!-- <div
|
||||||
|
v-show="dialogObj.imageUrl2.toLowerCase().endsWith('.svga')"
|
||||||
|
id="guide2"
|
||||||
|
class="game-guide"
|
||||||
|
>
|
||||||
|
{{ guideFn2(dialogObj.imageUrl2) }}
|
||||||
|
</div> -->
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="dialogBox">
|
||||||
|
<span>动效图片:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess3"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="dialogObj.imageUrl3"
|
||||||
|
:src="dialogObj.imageUrl3"
|
||||||
|
class="avatar"
|
||||||
|
/>
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
</div> -->
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="addNeid(dialogVisibleTitleType)"
|
||||||
|
>确认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listPartitionInfo,
|
||||||
|
page,
|
||||||
|
roomBackgroundAdd,
|
||||||
|
roomBackgroundUpdate,
|
||||||
|
} from "@/api/roomBackground/roomBackground";
|
||||||
|
// @ts-ignore
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
// @ts-ignore
|
||||||
|
import { ElMessage, ElTable } from "element-plus";
|
||||||
|
import { ref, onMounted, nextTick } from "vue";
|
||||||
|
import SVGA from "svgaplayerweb";
|
||||||
|
export default {
|
||||||
|
name: "roomBackground",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
//查询所需条件对象
|
||||||
|
inquire: {
|
||||||
|
partitionId: "",
|
||||||
|
partitionArr: [],
|
||||||
|
id: "",
|
||||||
|
status: "",
|
||||||
|
statusArr: [
|
||||||
|
{
|
||||||
|
status: "1",
|
||||||
|
desc: "上架",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
status: "-1",
|
||||||
|
desc: "下架",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// 表格
|
||||||
|
tableData: [],
|
||||||
|
// 分页
|
||||||
|
total: 0, //总页数
|
||||||
|
currentPage: 1, //页码
|
||||||
|
pageSize: 10, //条数
|
||||||
|
isLoading: false, // 加载状态
|
||||||
|
isFinished: false, // 是否加载完成
|
||||||
|
// 删除相关
|
||||||
|
visible: false,
|
||||||
|
// 编辑新增
|
||||||
|
dialogVisible: false,
|
||||||
|
dialogVisibleTitle: "新增",
|
||||||
|
dialogVisibleTitleType: 1, //1新增2编辑
|
||||||
|
dialogObj: {
|
||||||
|
checkedArr: [],
|
||||||
|
radio: "1",
|
||||||
|
imageUrl1: "",
|
||||||
|
imageUrl2: "",
|
||||||
|
imageUrl3: "",
|
||||||
|
price: "",
|
||||||
|
renew: "",
|
||||||
|
originalPrice: "",
|
||||||
|
day: "",
|
||||||
|
sort: "",
|
||||||
|
radio2: "1",
|
||||||
|
id: null,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
listPartitionInfo().then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
this.inquire.partitionArr = res.data;
|
||||||
|
this.inquire.partitionId = this.inquire.partitionArr[0].id;
|
||||||
|
this.getData();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
guideFn(id, url) {
|
||||||
|
// 等待 DOM 渲染完成
|
||||||
|
this.$nextTick(() => {
|
||||||
|
const guideElement = document.getElementById("guide" + id);
|
||||||
|
if (guideElement && url.toLowerCase().endsWith(".svga")) {
|
||||||
|
let player = new SVGA.Player(guideElement);
|
||||||
|
let parser = new SVGA.Parser();
|
||||||
|
parser.load(url, (videoItem) => {
|
||||||
|
// 你的svga文件路径
|
||||||
|
player.setVideoItem(videoItem);
|
||||||
|
player.startAnimation(); // 开始动画
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
guideFn2(url) {
|
||||||
|
// 等待 DOM 渲染完成
|
||||||
|
this.$nextTick(() => {
|
||||||
|
const guideElement = document.getElementById("guide2");
|
||||||
|
if (guideElement && url.toLowerCase().endsWith(".svga")) {
|
||||||
|
let player = new SVGA.Player(guideElement);
|
||||||
|
let parser = new SVGA.Parser();
|
||||||
|
parser.load(url, (videoItem) => {
|
||||||
|
// 你的 svga 文件路径
|
||||||
|
player.setVideoItem(videoItem);
|
||||||
|
player.startAnimation(); // 开始动画
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 查询接口
|
||||||
|
getData() {
|
||||||
|
this.isLoading = true;
|
||||||
|
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");
|
||||||
|
}
|
||||||
|
page({
|
||||||
|
partitionId: this.inquire.partitionId,
|
||||||
|
id: this.inquire.id,
|
||||||
|
status: this.inquire.status,
|
||||||
|
page: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.tableData = res.data.rows;
|
||||||
|
this.total = res.data.total;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 确认新增/确认编辑
|
||||||
|
addNeid(type) {
|
||||||
|
if (type == 1) {
|
||||||
|
var partitionIdNum = this.dialogObj.checkedArr.reduce(
|
||||||
|
(accumulator, currentValue) => {
|
||||||
|
return accumulator + currentValue;
|
||||||
|
},
|
||||||
|
0
|
||||||
|
);
|
||||||
|
roomBackgroundAdd({
|
||||||
|
partitionId: partitionIdNum,
|
||||||
|
type: this.dialogObj.radio,
|
||||||
|
buyGoldPrice: this.dialogObj.price,
|
||||||
|
renewGoldPrice: this.dialogObj.renew,
|
||||||
|
originalGoldPrice: this.dialogObj.originalPrice,
|
||||||
|
buyHour: this.dialogObj.day,
|
||||||
|
seq: this.dialogObj.sort,
|
||||||
|
status: this.dialogObj.radio2,
|
||||||
|
url: this.dialogObj.imageUrl2,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
var partitionIdNumEid = this.dialogObj.checkedArr.reduce(
|
||||||
|
(accumulator, currentValue) => {
|
||||||
|
return accumulator + currentValue;
|
||||||
|
},
|
||||||
|
0
|
||||||
|
);
|
||||||
|
roomBackgroundUpdate({
|
||||||
|
partitionId: partitionIdNumEid,
|
||||||
|
type: this.dialogObj.radio,
|
||||||
|
buyGoldPrice: this.dialogObj.price,
|
||||||
|
renewGoldPrice: this.dialogObj.renew,
|
||||||
|
originalGoldPrice: this.dialogObj.originalPrice,
|
||||||
|
buyHour: this.dialogObj.day,
|
||||||
|
seq: this.dialogObj.sort,
|
||||||
|
status: this.dialogObj.radio2,
|
||||||
|
url: this.dialogObj.imageUrl2,
|
||||||
|
id: this.dialogObj.id,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
checkedArrFun(num) {
|
||||||
|
const arr = this.inquire.partitionArr
|
||||||
|
.filter((p) => {
|
||||||
|
return num == 0 || p.id == (p.id & num);
|
||||||
|
})
|
||||||
|
.map((p) => p.id);
|
||||||
|
return arr;
|
||||||
|
},
|
||||||
|
handleAvatarSuccess(res, file) {
|
||||||
|
console.log(file);
|
||||||
|
// this.operation.imageUrl1 = URL.createObjectURL();
|
||||||
|
this.dialogObj.imageUrl1 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess2(res, file) {
|
||||||
|
console.log(file);
|
||||||
|
// this.operation.imageUrl1 = URL.createObjectURL();
|
||||||
|
this.dialogObj.imageUrl2 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess3(res, file) {
|
||||||
|
console.log(file);
|
||||||
|
// this.operation.imageUrl1 = URL.createObjectURL();
|
||||||
|
this.dialogObj.imageUrl3 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
beforeAvatarUpload() {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传中~",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarError() {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传失败!",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 分页导航
|
||||||
|
handleSizeChange() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
handleCurrentChange() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
};
|
||||||
|
</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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.selectBox {
|
||||||
|
display: flex;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.selectBoxImg {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
.pagination {
|
||||||
|
margin: 10px auto 10px;
|
||||||
|
position: relative;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
.pagination_in {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.dialogBox {
|
||||||
|
width: 100%;
|
||||||
|
// height: 50px;
|
||||||
|
// line-height: 50px;
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
.input {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
.selectBox {
|
||||||
|
display: flex;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.selectBoxImg {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.game-guide {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
overflow: hidden;
|
||||||
|
// left: 50%;
|
||||||
|
// top: 50%;
|
||||||
|
// transform: translate(-50%,-50%);
|
||||||
|
canvas {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
426
src/views/roomBackground/roomBackgroundCustom.vue
Normal file
426
src/views/roomBackground/roomBackgroundCustom.vue
Normal file
@@ -0,0 +1,426 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<!-- 查询 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>分区</span>
|
||||||
|
<el-select v-model="inquire.partitionId" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.partitionArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<!-- 名称 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span class="demonstration">用户ID</span>
|
||||||
|
<el-input v-model="inquire.id" placeholder="" class="input"></el-input>
|
||||||
|
</div>
|
||||||
|
<!-- 查询按钮 -->
|
||||||
|
<el-button class="primary" type="primary" @click="getData()"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
inquire.partitionId = null;
|
||||||
|
inquire.id = null;
|
||||||
|
getData();
|
||||||
|
"
|
||||||
|
>重置搜索</el-button
|
||||||
|
>
|
||||||
|
<!-- 表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
ref="multipleTable"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="id" align="center" label="数字" />
|
||||||
|
<el-table-column prop="erbanNo" align="center" label="用户ID" />
|
||||||
|
<el-table-column prop="nick" align="center" label="用户昵称" />
|
||||||
|
<el-table-column prop="partitionDesc" align="center" label="所在区" />
|
||||||
|
<el-table-column prop="createTime" align="center" label="申请时间" />
|
||||||
|
<el-table-column prop="url" align="center" label="图片">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
v-if="scope.row.url"
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.url"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="[scope.row.url]"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
<div v-else>/</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="status" align="center" label="状态">
|
||||||
|
<template v-slot="scope">{{
|
||||||
|
scope.row.status < 0
|
||||||
|
? "过期"
|
||||||
|
: scope.row.status == 0
|
||||||
|
? "审核中"
|
||||||
|
: scope.row.status == 1
|
||||||
|
? "通过"
|
||||||
|
: "不通过"
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="updateTime" align="center" label="审核时间" />
|
||||||
|
<el-table-column prop="adminUser" align="center" label="操作人">
|
||||||
|
<template v-slot="scope">{{
|
||||||
|
scope.row.adminUser ? scope.row.adminUser : "-"
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="操作" width="300">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<!-- 通过弹出框 -->
|
||||||
|
<el-popover
|
||||||
|
v-model:visible="scope.row.visible1"
|
||||||
|
placement="top"
|
||||||
|
:width="160"
|
||||||
|
>
|
||||||
|
<p>确定要通过么?</p>
|
||||||
|
<div style="text-align: right; margin: 0">
|
||||||
|
<el-button size="small" @click="scope.row.visible1 = false">
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="pass(scope.row.id)"
|
||||||
|
>
|
||||||
|
确认
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<template #reference>
|
||||||
|
<el-button
|
||||||
|
v-show="scope.row.status == 0"
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="scope.row.visible1 = true"
|
||||||
|
>通过</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-popover>
|
||||||
|
|
||||||
|
<!-- 拒绝弹出框 -->
|
||||||
|
<el-popover
|
||||||
|
v-model:visible="scope.row.visible2"
|
||||||
|
placement="top"
|
||||||
|
:width="160"
|
||||||
|
>
|
||||||
|
<p>确定要拒绝么?</p>
|
||||||
|
<div style="text-align: right; margin: 0">
|
||||||
|
<el-button size="small" @click="scope.row.visible2 = false">
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="reject(scope.row.id)"
|
||||||
|
>
|
||||||
|
确认
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<template #reference>
|
||||||
|
<el-button
|
||||||
|
v-show="scope.row.status == 0"
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="scope.row.visible2 = true"
|
||||||
|
>拒绝</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-popover>
|
||||||
|
|
||||||
|
<!-- 删除弹出框 -->
|
||||||
|
<el-popover
|
||||||
|
v-model:visible="scope.row.visible3"
|
||||||
|
placement="top"
|
||||||
|
:width="160"
|
||||||
|
>
|
||||||
|
<p>确定要删除么?</p>
|
||||||
|
<div style="text-align: right; margin: 0">
|
||||||
|
<el-button size="small" @click="scope.row.visible3 = false">
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
|
<el-button size="small" type="primary" @click="del(scope.row.id)">
|
||||||
|
确认
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<template #reference>
|
||||||
|
<el-button
|
||||||
|
class="danger"
|
||||||
|
type="danger"
|
||||||
|
@click="scope.row.visible3 = true"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-popover></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="[1, 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 {
|
||||||
|
listPartitionInfo,
|
||||||
|
customPage,
|
||||||
|
customPass,
|
||||||
|
customReject,
|
||||||
|
customDel,
|
||||||
|
} from "@/api/roomBackground/roomBackground";
|
||||||
|
// @ts-ignore
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
// @ts-ignore
|
||||||
|
import { ElMessage, ElTable } from "element-plus";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { ElMessageBox } from "element-plus"; // 正确引入 ElM
|
||||||
|
export default {
|
||||||
|
name: "roomBackgroundCustom",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
//查询所需条件对象
|
||||||
|
inquire: {
|
||||||
|
partitionId: "",
|
||||||
|
partitionArr: [],
|
||||||
|
id: "",
|
||||||
|
},
|
||||||
|
// 表格
|
||||||
|
tableData: [{ x: "x" }],
|
||||||
|
// 分页
|
||||||
|
total: 0, //总页数
|
||||||
|
currentPage: 1, //页码
|
||||||
|
pageSize: 10, //条数
|
||||||
|
// 删除相关
|
||||||
|
// visible1: false,
|
||||||
|
// visible2: false,
|
||||||
|
// visible3: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.loading = true;
|
||||||
|
listPartitionInfo().then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
this.inquire.partitionArr = res.data;
|
||||||
|
this.inquire.partitionId = this.inquire.partitionArr[0].id;
|
||||||
|
this.getData();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 查询接口
|
||||||
|
getData() {
|
||||||
|
this.loading = true;
|
||||||
|
customPage({
|
||||||
|
partitionId: this.inquire.partitionId,
|
||||||
|
erbanNo: this.inquire.id,
|
||||||
|
pageNum: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.tableData = res.data.rows;
|
||||||
|
this.total = res.data.total;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 通过
|
||||||
|
pass(id) {
|
||||||
|
customPass({ id }).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 拒绝
|
||||||
|
reject(id) {
|
||||||
|
customReject({ id }).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
del(id) {
|
||||||
|
customDel({ id }).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess(res, file) {
|
||||||
|
console.log(file);
|
||||||
|
// this.operation.imageUrl1 = URL.createObjectURL();
|
||||||
|
this.dialogObj.imageUrl1 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess2(res, file) {
|
||||||
|
console.log(file);
|
||||||
|
// this.operation.imageUrl1 = URL.createObjectURL();
|
||||||
|
this.dialogObj.imageUrl2 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess3(res, file) {
|
||||||
|
console.log(file);
|
||||||
|
// this.operation.imageUrl1 = URL.createObjectURL();
|
||||||
|
this.dialogObj.imageUrl3 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
beforeAvatarUpload() {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传中~",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarError() {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传失败!",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 分页导航
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.selectBox {
|
||||||
|
display: flex;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.selectBoxImg {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
.pagination {
|
||||||
|
margin: 10px auto 10px;
|
||||||
|
position: relative;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
.pagination_in {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.dialogBox {
|
||||||
|
width: 100%;
|
||||||
|
// height: 50px;
|
||||||
|
// line-height: 50px;
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
.input {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
.selectBox {
|
||||||
|
display: flex;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.selectBoxImg {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
375
src/views/ssGuild/SsGuild.vue
Normal file
375
src/views/ssGuild/SsGuild.vue
Normal file
@@ -0,0 +1,375 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<!-- 查询 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>主播ID</span>
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.anchorId"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>公会ID</span>
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.guildId"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>公会长ID</span>
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.guildUserId"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>周期</span>
|
||||||
|
<el-select v-model="inquire.weekTime" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.weekTimeOptions"
|
||||||
|
:key="item.cycleDateBegin"
|
||||||
|
:label="item.cycleDateShow"
|
||||||
|
:value="item.cycleDateBegin"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>发放状态</span>
|
||||||
|
<el-select v-model="inquire.status" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.statusOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<!-- 查询按钮 -->
|
||||||
|
<el-button class="primary" type="primary" @click="getData()"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
<el-button class="primary" type="primary" @click="confirmExport2Excel()"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
<el-button class="warning" type="warning " @click="sendGoldFun()"
|
||||||
|
>批量发放</el-button
|
||||||
|
>
|
||||||
|
|
||||||
|
<!-- 表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
ref="multipleTable"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" :selectable="callback" label="选择" />
|
||||||
|
<el-table-column prop="cycleDate" align="center" label="周期" />
|
||||||
|
<el-table-column prop="erbanNo" align="center" label="主播ID" />
|
||||||
|
<el-table-column prop="guildId" align="center" label="公会ID" />
|
||||||
|
<el-table-column
|
||||||
|
prop="guildDiamondNum"
|
||||||
|
align="center"
|
||||||
|
label="公会总流水"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="ssLevelName" align="center" label="公会等级" />
|
||||||
|
<el-table-column prop="diamondNum" align="center" label="主播流水" />
|
||||||
|
<el-table-column prop="memberLevelName" align="center" label="主播档位" />
|
||||||
|
<el-table-column prop="goldNum" align="center" label="主播获得奖励" />
|
||||||
|
<el-table-column align="center" prop="giftInfo" label="发放状态">
|
||||||
|
<template v-slot="scope">
|
||||||
|
{{ scope.row.sendStatusStr }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="sendUser" align="center" label="发放人" />
|
||||||
|
<el-table-column align="center" label="操作" width="300">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button
|
||||||
|
@click="sendGoldOneFun(scope.row)"
|
||||||
|
:class="scope.row.sendStatusStr == '未发放' ? 'primary' : 'info'"
|
||||||
|
:type="scope.row.sendStatusStr == '未发放' ? 'primary' : 'info'"
|
||||||
|
size="default"
|
||||||
|
:disabled="scope.row.sendStatusStr == '未发放' ? false : true"
|
||||||
|
>{{
|
||||||
|
scope.row.sendStatusStr == "未发放" ? "发放" : "已发放"
|
||||||
|
}}</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, 999999999]"
|
||||||
|
layout="sizes, prev, pager, next"
|
||||||
|
:total="total"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
cycleDateList,
|
||||||
|
list,
|
||||||
|
ssGuildExport,
|
||||||
|
sendGold,
|
||||||
|
} from "@/api/SsGuild/SsGuild";
|
||||||
|
// @ts-ignore
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
// @ts-ignore
|
||||||
|
import { ElMessage, ElTable } from "element-plus";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { ElMessageBox } from "element-plus"; // 正确引入 ElM
|
||||||
|
export default {
|
||||||
|
name: "SsGuild",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
delDialog: false,
|
||||||
|
delDialogData: null,
|
||||||
|
selectedRows: [], //存储选中行数据
|
||||||
|
//查询所需条件对象
|
||||||
|
inquire: {
|
||||||
|
anchorId: "",
|
||||||
|
guildId: "",
|
||||||
|
guildUserId: "",
|
||||||
|
weekTime: "",
|
||||||
|
weekTimeOptions: [],
|
||||||
|
status: "",
|
||||||
|
statusOptions: [
|
||||||
|
{ value: 0, label: "未发放" },
|
||||||
|
{ value: 1, label: "已发放" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// 表格
|
||||||
|
tableData: [],
|
||||||
|
// 分页
|
||||||
|
total: 10, //总页数
|
||||||
|
currentPage: 1, //页码
|
||||||
|
pageSize: 10, //条数
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
cycleDateList().then((res) => {
|
||||||
|
this.inquire.weekTimeOptions = res.data;
|
||||||
|
});
|
||||||
|
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");
|
||||||
|
}
|
||||||
|
list({
|
||||||
|
partitionId: 2,
|
||||||
|
erbanNo: this.inquire.anchorId,
|
||||||
|
guildId: this.inquire.guildId,
|
||||||
|
ownerErbanNo: this.inquire.guildUserId,
|
||||||
|
cycleDate: this.inquire.weekTime,
|
||||||
|
status: this.inquire.status,
|
||||||
|
pageNo: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.total = res.data.total;
|
||||||
|
this.tableData = res.data.rows;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
this.selectedRows = val;
|
||||||
|
console.log("Selected rows:", this.selectedRows);
|
||||||
|
},
|
||||||
|
handleGetSelection() {
|
||||||
|
// 获取选中的行数据
|
||||||
|
console.log("Current selected rows:", this.selectedRows);
|
||||||
|
},
|
||||||
|
// 确认导出
|
||||||
|
confirmExport2Excel() {
|
||||||
|
ElMessageBox.confirm("确定导出Excel吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
ssGuildExport({
|
||||||
|
erbanNo: this.inquire.anchorId,
|
||||||
|
guildId: this.inquire.guildId,
|
||||||
|
ownerErbanNo: this.inquire.guildUserId,
|
||||||
|
cycleDate: this.inquire.weekTime,
|
||||||
|
status: this.inquire.status,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
// if (res) {
|
||||||
|
// this.exportVisible = false;
|
||||||
|
// this.btnLoading = false;
|
||||||
|
// let alink = document.createElement("a");
|
||||||
|
// alink.download = `SS公会奖励发放.xls`;
|
||||||
|
// alink.style.display = "none";
|
||||||
|
// const blob = new Blob([res.data]);
|
||||||
|
// alink.href = URL.createObjectURL(blob);
|
||||||
|
// document.body.appendChild(alink);
|
||||||
|
// alink.click();
|
||||||
|
// URL.revokeObjectURL(alink.href);
|
||||||
|
// }
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error(err); // 打印错误信息
|
||||||
|
ElMessage.error("导出失败");
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
ElMessage({
|
||||||
|
type: "info",
|
||||||
|
message: "取消",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
callback(row) {
|
||||||
|
return row.sendStatusStr == "未发放" ? true : false;
|
||||||
|
},
|
||||||
|
// 确认批量发放
|
||||||
|
sendGoldFun() {
|
||||||
|
ElMessageBox.confirm("确定发放奖励吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
var str = "";
|
||||||
|
this.selectedRows.forEach((res) => {
|
||||||
|
str += `${res.id},`;
|
||||||
|
});
|
||||||
|
sendGold({ ids: str })
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "发放成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error(err); // 打印错误信息
|
||||||
|
ElMessage.error("发放失败");
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
ElMessage({
|
||||||
|
type: "info",
|
||||||
|
message: "取消",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 确认单个发放
|
||||||
|
sendGoldOneFun(val) {
|
||||||
|
ElMessageBox.confirm("确定发放奖励吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
sendGold({ ids: val.id })
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "发放成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error(err); // 打印错误信息
|
||||||
|
ElMessage.error("发放失败");
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
ElMessage({
|
||||||
|
type: "info",
|
||||||
|
message: "取消",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 分页导航
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.selectBox {
|
||||||
|
display: flex;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.selectBoxImg {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -60,6 +60,13 @@
|
|||||||
v-model="i18nMessage.ar" />
|
v-model="i18nMessage.ar" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="ar" class="col-sm-3 control-label">土耳其:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" class="form-control validate[required]" name="tr" id="tr"
|
||||||
|
v-model="i18nMessage.tr" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
@@ -84,6 +91,7 @@ export default {
|
|||||||
{ field: 'zh', title: '华语', align: 'center', width: '15%' },
|
{ field: 'zh', title: '华语', align: 'center', width: '15%' },
|
||||||
{ field: 'en', title: '英语', align: 'center', width: '15%' },
|
{ field: 'en', title: '英语', align: 'center', width: '15%' },
|
||||||
{ field: 'ar', title: '阿语', align: 'center', width: '15%' },
|
{ field: 'ar', title: '阿语', align: 'center', width: '15%' },
|
||||||
|
{ field: 'tr', title: '土耳其', align: 'center', width: '15%' },
|
||||||
{
|
{
|
||||||
field: 'key',
|
field: 'key',
|
||||||
title: '操作',
|
title: '操作',
|
||||||
@@ -151,6 +159,7 @@ export default {
|
|||||||
this.i18nMessage.zh = '';
|
this.i18nMessage.zh = '';
|
||||||
this.i18nMessage.en = '';
|
this.i18nMessage.en = '';
|
||||||
this.i18nMessage.ar = '';
|
this.i18nMessage.ar = '';
|
||||||
|
this.i18nMessage.tr = '';
|
||||||
$('#editModal').modal('show');
|
$('#editModal').modal('show');
|
||||||
},
|
},
|
||||||
edit(obj) {
|
edit(obj) {
|
||||||
@@ -160,6 +169,7 @@ export default {
|
|||||||
this.i18nMessage.zh = record.zh;
|
this.i18nMessage.zh = record.zh;
|
||||||
this.i18nMessage.en = record.en;
|
this.i18nMessage.en = record.en;
|
||||||
this.i18nMessage.ar = record.ar;
|
this.i18nMessage.ar = record.ar;
|
||||||
|
this.i18nMessage.tr = record.tr;
|
||||||
$('#editModal').modal('show');
|
$('#editModal').modal('show');
|
||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ export default {
|
|||||||
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
|
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
|
||||||
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
|
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
|
||||||
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
|
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
|
||||||
|
{ field: 'startPayUsd', title: 'startPay充值美元', align: 'center', width: '14%' },
|
||||||
{ field: 'iosUsd', title: 'ios充值美元', align: 'center', width: '14%' },
|
{ field: 'iosUsd', title: 'ios充值美元', align: 'center', width: '14%' },
|
||||||
{ field: 'companyUsd', title: '对公打款美元', align: 'center', width: '14%' },
|
{ field: 'companyUsd', title: '对公打款美元', align: 'center', width: '14%' },
|
||||||
{ field: 'totalUsd', title: '总充值美元', align: 'center', width: '14%' },
|
{ field: 'totalUsd', title: '总充值美元', align: 'center', width: '14%' },
|
||||||
|
|||||||
@@ -1,24 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1 id="itemTitle"></h1>
|
<h1 id="itemTitle"></h1>
|
||||||
</section>
|
</section>
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<form class="col-sm-12" id="searchForm" action="/admin/chargeRecord/dailyexport" method="get"
|
<form class="col-sm-12"
|
||||||
target="_blank">
|
id="searchForm"
|
||||||
|
action="/admin/chargeRecord/dailyexport"
|
||||||
|
method="get"
|
||||||
|
target="_blank">
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
<div class="col-sm-12 pull-left">
|
<div class="col-sm-12 pull-left">
|
||||||
<h4>
|
<h4>
|
||||||
今日充值数据:<span class="totalAmount" style="color: red">0</span>(总金额)/
|
今日充值数据:<span class="totalAmount"
|
||||||
<span class="totalCount" style="color: red">0</span>(总笔数)
|
style="color: red">0</span>(总金额)/
|
||||||
<span style="color: red">(单位:美元)</span>
|
<span class="totalCount"
|
||||||
</h4>
|
style="color: red">0</span>(总笔数)
|
||||||
</div>
|
<span style="color: red">(单位:美元)</span>
|
||||||
<!-- <div class="col-sm-3 pull-right">
|
</h4>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="col-sm-3 pull-right">
|
||||||
<button id="btnSearch" class="btn btn-default">
|
<button id="btnSearch" class="btn btn-default">
|
||||||
<i class="glyphicon glyphicon-search"></i>查询
|
<i class="glyphicon glyphicon-search"></i>查询
|
||||||
</button>
|
</button>
|
||||||
@@ -26,185 +31,194 @@
|
|||||||
<i class="glyphicon glyphicon-export"></i>导出
|
<i class="glyphicon glyphicon-export"></i>导出
|
||||||
</button>
|
</button>
|
||||||
</div>-->
|
</div>-->
|
||||||
</div>
|
|
||||||
<!-- .content -->
|
|
||||||
<div id="table"></div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
<!-- .content -->
|
||||||
|
<div id="table"></div>
|
||||||
|
|
||||||
<div class="modal fade" id="recordDetail" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
</div>
|
||||||
<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">×</span>
|
|
||||||
</button>
|
|
||||||
<h4 class="modal-title" id="modalLabel"></h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div id="detailtable"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="modal fade"
|
||||||
|
id="recordDetail"
|
||||||
|
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">×</span>
|
||||||
|
</button>
|
||||||
|
<h4 class="modal-title"
|
||||||
|
id="modalLabel"></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div id="detailtable"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ChargeRecordDailyStatisticsView",
|
name: "ChargeRecordDailyStatisticsView",
|
||||||
setup() {
|
setup () {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.initData();
|
this.initData();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initData () {
|
||||||
|
$(function () {
|
||||||
|
$('#table').bootstrapTable('destroy');
|
||||||
|
$('#table').bootstrapTable({
|
||||||
|
columns: [
|
||||||
|
{ field: 'timeStr', title: '日期', align: 'center', width: '5%' },
|
||||||
|
/*{field: 'wxAmount', title: '微信支付', align: 'center', width: '5%'},
|
||||||
|
{field: 'wxWapAmount', title: '微信H5支付', align: 'center', width: '5%'},
|
||||||
|
{field: 'wxPubAmount', title: '微信公众号', align: 'center', width: '5%'},
|
||||||
|
{field: 'wxMicroMallPubAmount', title: '微商城公众号', align: 'center', width: '5%'},
|
||||||
|
{field: 'wxPub2Amount', title: '平台公众号', align: 'center', width: '5%'},
|
||||||
|
{field: 'wxPub2H5Amount', title: '平台公众号H5支付', align: 'center', width: '5%'},
|
||||||
|
{field: 'alipayAmount', title: '支付宝', align: 'center', width: '5%'},
|
||||||
|
{field: 'alipayWapAmount', title: '支付宝H5', align: 'center', width: '5%'},
|
||||||
|
{field: 'iosPayAmount', title: 'IOS支付', align: 'center', width: '5%'},
|
||||||
|
{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: 'startPayAmount', title: 'startPay支付', align: 'center', width: '5%' },
|
||||||
|
{ field: 'iosPayAmount', title: 'ios支付', align: 'center', width: '5%' },
|
||||||
|
{ field: 'companyAccount', title: '充值打公账', align: 'center', width: '5%' },
|
||||||
|
{
|
||||||
|
field: 'time',
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
width: '5%',
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
return '<button id="btnDetail" name="btnDetail" class="btn btn-sm btn-success opt-detail" data-id=' + val + '>' +
|
||||||
|
'<i class="glyphicon glyphicon-edit"></i> 明细</button>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
undefinedText: 0,
|
||||||
|
cache: false,
|
||||||
|
striped: true,
|
||||||
|
showRefresh: false,
|
||||||
|
pageSize: 20,
|
||||||
|
pagination: true,
|
||||||
|
pageList: [20, 50, 100, 200, 300, 500],
|
||||||
|
search: false,
|
||||||
|
sidePagination: "client", //表示服务端请求
|
||||||
|
queryParamsType: "undefined",
|
||||||
|
queryParams: function queryParams (params) { //设置查询参数
|
||||||
|
var param = {
|
||||||
|
pageNum: params.pageNumber,
|
||||||
|
pageSize: params.pageSize
|
||||||
|
};
|
||||||
|
return param;
|
||||||
|
},
|
||||||
|
toolbar: '#toolbar',
|
||||||
|
url: '/admin/chargeRecord/dailylist',
|
||||||
|
onLoadSuccess: function () { //加载成功时执行
|
||||||
|
console.log("load success");
|
||||||
|
getTotalStatis();
|
||||||
|
},
|
||||||
|
onLoadError: function () { //加载失败时执行
|
||||||
|
console.log("load fail");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initData() {
|
|
||||||
$(function () {
|
|
||||||
$('#table').bootstrapTable('destroy');
|
|
||||||
$('#table').bootstrapTable({
|
|
||||||
columns: [
|
|
||||||
{ field: 'timeStr', title: '日期', align: 'center', width: '5%' },
|
|
||||||
/*{field: 'wxAmount', title: '微信支付', align: 'center', width: '5%'},
|
|
||||||
{field: 'wxWapAmount', title: '微信H5支付', align: 'center', width: '5%'},
|
|
||||||
{field: 'wxPubAmount', title: '微信公众号', align: 'center', width: '5%'},
|
|
||||||
{field: 'wxMicroMallPubAmount', title: '微商城公众号', align: 'center', width: '5%'},
|
|
||||||
{field: 'wxPub2Amount', title: '平台公众号', align: 'center', width: '5%'},
|
|
||||||
{field: 'wxPub2H5Amount', title: '平台公众号H5支付', align: 'center', width: '5%'},
|
|
||||||
{field: 'alipayAmount', title: '支付宝', align: 'center', width: '5%'},
|
|
||||||
{field: 'alipayWapAmount', title: '支付宝H5', align: 'center', width: '5%'},
|
|
||||||
{field: 'iosPayAmount', title: 'IOS支付', align: 'center', width: '5%'},
|
|
||||||
{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: 'time',
|
|
||||||
title: '操作',
|
|
||||||
align: 'center',
|
|
||||||
width: '5%',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
return '<button id="btnDetail" name="btnDetail" class="btn btn-sm btn-success opt-detail" data-id=' + val + '>' +
|
|
||||||
'<i class="glyphicon glyphicon-edit"></i> 明细</button>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
undefinedText: 0,
|
|
||||||
cache: false,
|
|
||||||
striped: true,
|
|
||||||
showRefresh: false,
|
|
||||||
pageSize: 20,
|
|
||||||
pagination: true,
|
|
||||||
pageList: [20, 50, 100, 200, 300, 500],
|
|
||||||
search: false,
|
|
||||||
sidePagination: "client", //表示服务端请求
|
|
||||||
queryParamsType: "undefined",
|
|
||||||
queryParams: function queryParams(params) { //设置查询参数
|
|
||||||
var param = {
|
|
||||||
pageNum: params.pageNumber,
|
|
||||||
pageSize: params.pageSize
|
|
||||||
};
|
|
||||||
return param;
|
|
||||||
},
|
|
||||||
toolbar: '#toolbar',
|
|
||||||
url: '/admin/chargeRecord/dailylist',
|
|
||||||
onLoadSuccess: function () { //加载成功时执行
|
|
||||||
console.log("load success");
|
|
||||||
getTotalStatis();
|
|
||||||
},
|
|
||||||
onLoadError: function () { //加载失败时执行
|
|
||||||
console.log("load fail");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// 导出EXCEL
|
// 导出EXCEL
|
||||||
$('#btnExport').on('click', function () {
|
$('#btnExport').on('click', function () {
|
||||||
$("#searchForm").submit();
|
$("#searchForm").submit();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 查询刷新
|
// 查询刷新
|
||||||
$('#btnSearch').on('click', function () {
|
$('#btnSearch').on('click', function () {
|
||||||
TableHelper.doRefresh('#table');
|
TableHelper.doRefresh('#table');
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#table").on("click", '.opt-detail', function () {
|
$("#table").on("click", '.opt-detail', function () {
|
||||||
|
|
||||||
$("#recordDetail").modal('show');
|
$("#recordDetail").modal('show');
|
||||||
var time = $(this).attr("data-id");
|
var time = $(this).attr("data-id");
|
||||||
|
|
||||||
var date = new Date().format("yyyy-MM-dd ");
|
var date = new Date().format("yyyy-MM-dd ");
|
||||||
$("#modalLabel").html(date + parseTime(time));
|
$("#modalLabel").html(date + parseTime(time));
|
||||||
|
|
||||||
$('#detailtable').bootstrapTable('destroy');
|
$('#detailtable').bootstrapTable('destroy');
|
||||||
$('#detailtable').bootstrapTable({
|
$('#detailtable').bootstrapTable({
|
||||||
columns: [
|
columns: [
|
||||||
{ field: 'channel', title: '渠道', align: 'center', width: '5%' },
|
{ field: 'channel', title: '渠道', align: 'center', width: '5%' },
|
||||||
{ field: 'amount', title: '充值金额', align: 'center', width: '5%' },
|
{ field: 'amount', title: '充值金额', align: 'center', width: '5%' },
|
||||||
{ field: 'count', title: '充值笔数', align: 'center', width: '5%' }
|
{ field: 'count', title: '充值笔数', align: 'center', width: '5%' }
|
||||||
|
|
||||||
],
|
],
|
||||||
undefinedText: 0,
|
undefinedText: 0,
|
||||||
height: 600,
|
height: 600,
|
||||||
cache: false,
|
cache: false,
|
||||||
striped: true,
|
striped: true,
|
||||||
showRefresh: false,
|
showRefresh: false,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
pagination: false,
|
pagination: false,
|
||||||
pageList: [20, 50, 100, 200, 300, 500],
|
pageList: [20, 50, 100, 200, 300, 500],
|
||||||
search: false,
|
search: false,
|
||||||
sidePagination: "client", //表示服务端请求
|
sidePagination: "client", //表示服务端请求
|
||||||
queryParamsType: "undefined",
|
queryParamsType: "undefined",
|
||||||
queryParams: function queryParams(params) { //设置查询参数
|
queryParams: function queryParams (params) { //设置查询参数
|
||||||
var param = {
|
var param = {
|
||||||
pageNum: params.pageNumber,
|
pageNum: params.pageNumber,
|
||||||
pageSize: params.pageSize,
|
pageSize: params.pageSize,
|
||||||
time: time
|
time: time
|
||||||
};
|
};
|
||||||
return param;
|
return param;
|
||||||
},
|
},
|
||||||
url: '/admin/chargeRecord/dailydetail',
|
url: '/admin/chargeRecord/dailydetail',
|
||||||
onLoadSuccess: function () { //加载成功时执行
|
onLoadSuccess: function () { //加载成功时执行
|
||||||
console.log("load success");
|
console.log("load success");
|
||||||
},
|
},
|
||||||
onLoadError: function () { //加载失败时执行
|
onLoadError: function () { //加载失败时执行
|
||||||
console.log("load fail");
|
console.log("load fail");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function parseTime(val) {
|
function parseTime (val) {
|
||||||
if (val < 10) {
|
if (val < 10) {
|
||||||
return '0' + val + ':00-0' + val + ':59';
|
return '0' + val + ':00-0' + val + ':59';
|
||||||
} else {
|
} else {
|
||||||
return val + ':00-' + val + ':59';
|
return val + ':00-' + val + ':59';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getTotalStatis() {
|
function getTotalStatis () {
|
||||||
$.get('/admin/chargeRecord/dailytotal', function (res) {
|
$.get('/admin/chargeRecord/dailytotal', function (res) {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
$('.totalAmount').html(res.data.amount);
|
$('.totalAmount').html(res.data.amount);
|
||||||
$('.totalCount').html(res.data.count);
|
$('.totalCount').html(res.data.count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ export default {
|
|||||||
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
|
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
|
||||||
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
|
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
|
||||||
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
|
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
|
||||||
|
{ field: 'startPayUsd', title: 'startPay充值美元', align: 'center', width: '14%' },
|
||||||
{ field: 'iosUsd', title: 'ios充值美元', align: 'center', width: '14%' },
|
{ field: 'iosUsd', title: 'ios充值美元', align: 'center', width: '14%' },
|
||||||
{ field: 'companyUsd', title: '对公打款美元', align: 'center', width: '14%' },
|
{ field: 'companyUsd', title: '对公打款美元', align: 'center', width: '14%' },
|
||||||
{ field: 'totalUsd', title: '总充值美元', align: 'center', width: '14%' },
|
{ field: 'totalUsd', title: '总充值美元', align: 'center', width: '14%' },
|
||||||
|
|||||||
@@ -1,228 +1,250 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1 id="itemTitle"></h1>
|
<h1 id="itemTitle"></h1>
|
||||||
</section>
|
</section>
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<form id="searchForm" class="col-sm-pull-12" action="/admin/chargeRecord/totalexport"
|
<form id="searchForm"
|
||||||
method="get" target="_blank">
|
class="col-sm-pull-12"
|
||||||
<div class="col-sm-11">
|
action="/admin/chargeRecord/totalexport"
|
||||||
<label for="beginDate" class="col-sm-2 control-label">开始日期:</label>
|
method="get"
|
||||||
<div class="col-sm-4"><input type="text" class="form-control" name="beginDate"
|
target="_blank">
|
||||||
id="beginDate" placeholder="必填">
|
<div class="col-sm-11">
|
||||||
</div>
|
<label for="beginDate"
|
||||||
<label for="endDate" class="col-sm-2 control-label">结束日期:</label>
|
class="col-sm-2 control-label">开始日期:</label>
|
||||||
<div class="col-sm-4"><input type="text" class="form-control" name="endDate"
|
<div class="col-sm-4"><input type="text"
|
||||||
id="endDate" placeholder="必填"></div>
|
class="form-control"
|
||||||
|
name="beginDate"
|
||||||
|
id="beginDate"
|
||||||
|
placeholder="必填">
|
||||||
|
</div>
|
||||||
|
<label for="endDate"
|
||||||
|
class="col-sm-2 control-label">结束日期:</label>
|
||||||
|
<div class="col-sm-4"><input type="text"
|
||||||
|
class="form-control"
|
||||||
|
name="endDate"
|
||||||
|
id="endDate"
|
||||||
|
placeholder="必填"></div>
|
||||||
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<div class="pull-right">
|
|
||||||
|
|
||||||
<button id="btnSearch" class="btn btn-default">
|
|
||||||
<i class="glyphicon glyphicon-search"></i>查询
|
|
||||||
</button>
|
|
||||||
<button id="btnExport" class="btn btn-default">
|
|
||||||
<i class="glyphicon glyphicon-export"></i>导出
|
|
||||||
</button>
|
|
||||||
<span style="color: red">(单位:美元)</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
<!-- .content -->
|
|
||||||
<div id="table"></div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="pull-right">
|
||||||
</section>
|
|
||||||
|
|
||||||
<div class="modal fade" id="recordDetail" 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">×</span>
|
|
||||||
</button>
|
|
||||||
<h4 class="modal-title" id="modalLabel"></h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div id="detailtable"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<button id="btnSearch"
|
||||||
|
class="btn btn-default">
|
||||||
|
<i class="glyphicon glyphicon-search"></i>查询
|
||||||
|
</button>
|
||||||
|
<button id="btnExport"
|
||||||
|
class="btn btn-default">
|
||||||
|
<i class="glyphicon glyphicon-export"></i>导出
|
||||||
|
</button>
|
||||||
|
<span style="color: red">(单位:美元)</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- .content -->
|
||||||
|
<div id="table"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="modal fade"
|
||||||
|
id="recordDetail"
|
||||||
|
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">×</span>
|
||||||
|
</button>
|
||||||
|
<h4 class="modal-title"
|
||||||
|
id="modalLabel"></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div id="detailtable"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ChargeRecordTotalStatisticsView",
|
name: "ChargeRecordTotalStatisticsView",
|
||||||
setup() {
|
setup () {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.initData();
|
this.initData();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initData () {
|
||||||
|
$(function () {
|
||||||
|
$('#table').bootstrapTable('destroy');
|
||||||
|
$('#table').bootstrapTable({
|
||||||
|
columns: [
|
||||||
|
{ field: 'timeStr', title: '日期', align: 'center', width: '5%' },
|
||||||
|
/*{field: 'wxAmount', title: '微信支付', align: 'center', width: '5%'},
|
||||||
|
{field: 'wxWapAmount', title: '微信H5支付', align: 'center', width: '5%'},
|
||||||
|
{field: 'wxPubAmount', title: '微信公众号', align: 'center', width: '5%'},
|
||||||
|
{field: 'alipayAmount', title: '支付宝', align: 'center', width: '5%'},
|
||||||
|
{field: 'alipayV2Amount', title: '支付宝V2', align: 'center', width: '5%'},
|
||||||
|
{field: 'wxMicroMallPubAmount', title: '微商城公众号', align: 'center', width: '5%'},
|
||||||
|
{field: 'wxPub2Amount', title: '平台公众号', align: 'center', width: '5%'},
|
||||||
|
{field: 'wxPub2H5Amount', title: '平台公众号H5支付', align: 'center', width: '5%'},
|
||||||
|
{field: 'alipayWapAmount', title: '支付宝H5', align: 'center', width: '5%'},
|
||||||
|
{field: 'iosPayAmount', title: 'IOS支付', align: 'center', width: '5%'},
|
||||||
|
{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: 'startPayAmount', title: 'startPay支付', 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%' },
|
||||||
|
{
|
||||||
|
field: 'timeStr',
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
width: '5%',
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
return '<button id="btnDetail" name="btnDetail" class="btn btn-sm btn-success opt-detail" data-id=' + val + '>' +
|
||||||
|
'<i class="glyphicon glyphicon-edit"></i> 明细</button>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
undefinedText: 0,
|
||||||
|
cache: false,
|
||||||
|
striped: true,
|
||||||
|
showRefresh: false,
|
||||||
|
pageSize: 20,
|
||||||
|
pagination: true,
|
||||||
|
pageList: [20, 50, 100, 200, 300, 500],
|
||||||
|
search: false,
|
||||||
|
sidePagination: "server", //表示服务端请求
|
||||||
|
queryParamsType: "undefined",
|
||||||
|
queryParams: function queryParams (params) { //设置查询参数
|
||||||
|
var param = {
|
||||||
|
pageNum: params.pageNumber,
|
||||||
|
pageSize: params.pageSize,
|
||||||
|
beginDate: $('#beginDate').val(),
|
||||||
|
endDate: $('#endDate').val()
|
||||||
|
};
|
||||||
|
return param;
|
||||||
|
},
|
||||||
|
toolbar: '#toolbar',
|
||||||
|
url: '/admin/chargeRecord/totallist',
|
||||||
|
onLoadSuccess: function () { //加载成功时执行
|
||||||
|
console.log("load success");
|
||||||
|
},
|
||||||
|
onLoadError: function () { //加载失败时执行
|
||||||
|
console.log("load fail");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initData() {
|
|
||||||
$(function () {
|
|
||||||
$('#table').bootstrapTable('destroy');
|
|
||||||
$('#table').bootstrapTable({
|
|
||||||
columns: [
|
|
||||||
{ field: 'timeStr', title: '日期', align: 'center', width: '5%' },
|
|
||||||
/*{field: 'wxAmount', title: '微信支付', align: 'center', width: '5%'},
|
|
||||||
{field: 'wxWapAmount', title: '微信H5支付', align: 'center', width: '5%'},
|
|
||||||
{field: 'wxPubAmount', title: '微信公众号', align: 'center', width: '5%'},
|
|
||||||
{field: 'alipayAmount', title: '支付宝', align: 'center', width: '5%'},
|
|
||||||
{field: 'alipayV2Amount', title: '支付宝V2', align: 'center', width: '5%'},
|
|
||||||
{field: 'wxMicroMallPubAmount', title: '微商城公众号', align: 'center', width: '5%'},
|
|
||||||
{field: 'wxPub2Amount', title: '平台公众号', align: 'center', width: '5%'},
|
|
||||||
{field: 'wxPub2H5Amount', title: '平台公众号H5支付', align: 'center', width: '5%'},
|
|
||||||
{field: 'alipayWapAmount', title: '支付宝H5', align: 'center', width: '5%'},
|
|
||||||
{field: 'iosPayAmount', title: 'IOS支付', align: 'center', width: '5%'},
|
|
||||||
{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%' },
|
|
||||||
{
|
|
||||||
field: 'timeStr',
|
|
||||||
title: '操作',
|
|
||||||
align: 'center',
|
|
||||||
width: '5%',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
return '<button id="btnDetail" name="btnDetail" class="btn btn-sm btn-success opt-detail" data-id=' + val + '>' +
|
|
||||||
'<i class="glyphicon glyphicon-edit"></i> 明细</button>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
undefinedText: 0,
|
|
||||||
cache: false,
|
|
||||||
striped: true,
|
|
||||||
showRefresh: false,
|
|
||||||
pageSize: 20,
|
|
||||||
pagination: true,
|
|
||||||
pageList: [20, 50, 100, 200, 300, 500],
|
|
||||||
search: false,
|
|
||||||
sidePagination: "server", //表示服务端请求
|
|
||||||
queryParamsType: "undefined",
|
|
||||||
queryParams: function queryParams(params) { //设置查询参数
|
|
||||||
var param = {
|
|
||||||
pageNum: params.pageNumber,
|
|
||||||
pageSize: params.pageSize,
|
|
||||||
beginDate: $('#beginDate').val(),
|
|
||||||
endDate: $('#endDate').val()
|
|
||||||
};
|
|
||||||
return param;
|
|
||||||
},
|
|
||||||
toolbar: '#toolbar',
|
|
||||||
url: '/admin/chargeRecord/totallist',
|
|
||||||
onLoadSuccess: function () { //加载成功时执行
|
|
||||||
console.log("load success");
|
|
||||||
},
|
|
||||||
onLoadError: function () { //加载失败时执行
|
|
||||||
console.log("load fail");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// 导出EXCEL
|
// 导出EXCEL
|
||||||
$('#btnExport').on('click', function () {
|
$('#btnExport').on('click', function () {
|
||||||
if (!$('#beginDate').val() || !$('#endDate').val()) {
|
if (!$('#beginDate').val() || !$('#endDate').val()) {
|
||||||
$("#tipMsg").text("请输入必填的信息");
|
$("#tipMsg").text("请输入必填的信息");
|
||||||
$("#tipModal").modal('show');
|
$("#tipModal").modal('show');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$("#searchForm").submit();
|
$("#searchForm").submit();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 查询刷新
|
// 查询刷新
|
||||||
$('#btnSearch').on('click', function () {
|
$('#btnSearch').on('click', function () {
|
||||||
if (!$('#beginDate').val() || !$('#endDate').val()) {
|
if (!$('#beginDate').val() || !$('#endDate').val()) {
|
||||||
$("#tipMsg").text("请输入必填的信息");
|
$("#tipMsg").text("请输入必填的信息");
|
||||||
$("#tipModal").modal('show');
|
$("#tipModal").modal('show');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
TableHelper.doRefresh('#table');
|
TableHelper.doRefresh('#table');
|
||||||
});
|
});
|
||||||
var chargeStart = $('#beginDate').datepicker({
|
var chargeStart = $('#beginDate').datepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
autoclose: true
|
autoclose: true
|
||||||
});
|
});
|
||||||
|
|
||||||
var chargeEnd = $('#endDate').datepicker({
|
var chargeEnd = $('#endDate').datepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
autoclose: true
|
autoclose: true
|
||||||
});
|
});
|
||||||
chargeStart.on('changeDate', function () {
|
chargeStart.on('changeDate', function () {
|
||||||
var date = $('#beginDate').datepicker('getDate');
|
var date = $('#beginDate').datepicker('getDate');
|
||||||
chargeEnd.datepicker('setStartDate', date);
|
chargeEnd.datepicker('setStartDate', date);
|
||||||
});
|
});
|
||||||
chargeEnd.on('changeDate', function () {
|
chargeEnd.on('changeDate', function () {
|
||||||
var date = $('#endDate').datepicker('getDate');
|
var date = $('#endDate').datepicker('getDate');
|
||||||
chargeStart.datepicker('setEndDate', date);
|
chargeStart.datepicker('setEndDate', date);
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#table").on("click", '.opt-detail', function () {
|
$("#table").on("click", '.opt-detail', function () {
|
||||||
|
|
||||||
$("#recordDetail").modal('show');
|
$("#recordDetail").modal('show');
|
||||||
var time = $(this).attr("data-id");
|
var time = $(this).attr("data-id");
|
||||||
|
|
||||||
$("#modalLabel").html(time);
|
$("#modalLabel").html(time);
|
||||||
|
|
||||||
$('#detailtable').bootstrapTable('destroy');
|
$('#detailtable').bootstrapTable('destroy');
|
||||||
$('#detailtable').bootstrapTable({
|
$('#detailtable').bootstrapTable({
|
||||||
columns: [
|
columns: [
|
||||||
{ field: 'channel', title: '渠道', align: 'center', width: '5%' },
|
{ field: 'channel', title: '渠道', align: 'center', width: '5%' },
|
||||||
{ field: 'amount', title: '充值金额', align: 'center', width: '5%' },
|
{ field: 'amount', title: '充值金额', align: 'center', width: '5%' },
|
||||||
{ field: 'count', title: '充值笔数', align: 'center', width: '5%' }
|
{ field: 'count', title: '充值笔数', align: 'center', width: '5%' }
|
||||||
|
|
||||||
],
|
],
|
||||||
undefinedText: 0,
|
undefinedText: 0,
|
||||||
height: 600,
|
height: 600,
|
||||||
cache: false,
|
cache: false,
|
||||||
striped: true,
|
striped: true,
|
||||||
showRefresh: false,
|
showRefresh: false,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
pagination: false,
|
pagination: false,
|
||||||
pageList: [20, 50, 100, 200, 300, 500],
|
pageList: [20, 50, 100, 200, 300, 500],
|
||||||
search: false,
|
search: false,
|
||||||
sidePagination: "client", //表示服务端请求
|
sidePagination: "client", //表示服务端请求
|
||||||
queryParamsType: "undefined",
|
queryParamsType: "undefined",
|
||||||
queryParams: function queryParams(params) { //设置查询参数
|
queryParams: function queryParams (params) { //设置查询参数
|
||||||
var param = {
|
var param = {
|
||||||
pageNum: params.pageNumber,
|
pageNum: params.pageNumber,
|
||||||
pageSize: params.pageSize,
|
pageSize: params.pageSize,
|
||||||
time: time
|
time: time
|
||||||
};
|
};
|
||||||
return param;
|
return param;
|
||||||
},
|
},
|
||||||
url: '/admin/chargeRecord/totaldetail',
|
url: '/admin/chargeRecord/totaldetail',
|
||||||
onLoadSuccess: function () { //加载成功时执行
|
onLoadSuccess: function () { //加载成功时执行
|
||||||
console.log("load success");
|
console.log("load success");
|
||||||
},
|
},
|
||||||
onLoadError: function () { //加载失败时执行
|
onLoadError: function () { //加载失败时执行
|
||||||
console.log("load fail");
|
console.log("load fail");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
161
src/views/users/ChargeRecordTrPartitionStatisticsView.vue
Normal file
161
src/views/users/ChargeRecordTrPartitionStatisticsView.vue
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
<template>
|
||||||
|
<section class="content">
|
||||||
|
<div class="box box-primary">
|
||||||
|
<div class="box-body">
|
||||||
|
<section class="content-header">
|
||||||
|
<h1 id="itemTitle"></h1>
|
||||||
|
</section>
|
||||||
|
<section class="content-body">
|
||||||
|
<div id="toolbar">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="pull-left">
|
||||||
|
<form id="searchForm"
|
||||||
|
class="col-sm-pull-12"
|
||||||
|
action="/admin/chargeRecord/exportPartitionDetail"
|
||||||
|
method="get"
|
||||||
|
target="_blank">
|
||||||
|
<div class="col-sm-11">
|
||||||
|
<input type="number"
|
||||||
|
name="partitionId"
|
||||||
|
value="8"
|
||||||
|
hidden />
|
||||||
|
<label for="beginDate"
|
||||||
|
class="col-sm-2 control-label">开始日期:</label>
|
||||||
|
<div class="col-sm-4"><input type="text"
|
||||||
|
class="form-control"
|
||||||
|
name="beginDate"
|
||||||
|
id="beginDate"
|
||||||
|
placeholder="必填"></div>
|
||||||
|
<label for="endDate"
|
||||||
|
class="col-sm-2 control-label">结束日期:</label>
|
||||||
|
<div class="col-sm-4"><input type="text"
|
||||||
|
class="form-control"
|
||||||
|
name="endDate"
|
||||||
|
id="endDate"
|
||||||
|
placeholder="必填"></div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="pull-right">
|
||||||
|
<button id="btnSearch"
|
||||||
|
class="btn btn-default">
|
||||||
|
<i class="glyphicon glyphicon-search"></i>查询
|
||||||
|
</button>
|
||||||
|
<button id="btnExport"
|
||||||
|
class="btn btn-default">
|
||||||
|
<i class="glyphicon glyphicon-export"></i>导出
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- .content -->
|
||||||
|
<div id="table"></div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ChargeRecordTrPartitionStatisticsView",
|
||||||
|
setup () {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this.$nextTick(function () {
|
||||||
|
this.initData();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initData () {
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
var chargeStart = $('#beginDate').datepicker({
|
||||||
|
format: 'yyyy-mm-dd',
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
chargeStart.datepicker("setDate", new Date(new Date() - 7 * 24 * 60 * 60 * 1000))
|
||||||
|
|
||||||
|
var chargeEnd = $('#endDate').datepicker({
|
||||||
|
format: 'yyyy-mm-dd',
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
chargeEnd.datepicker("setDate", new Date())
|
||||||
|
|
||||||
|
chargeStart.on('changeDate', function () {
|
||||||
|
var date = $('#beginDate').datepicker('getDate');
|
||||||
|
chargeEnd.datepicker('setStartDate', date);
|
||||||
|
});
|
||||||
|
chargeEnd.on('changeDate', function () {
|
||||||
|
var date = $('#endDate').datepicker('getDate');
|
||||||
|
chargeStart.datepicker('setEndDate', date);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#table').bootstrapTable('destroy');
|
||||||
|
$('#table').bootstrapTable({
|
||||||
|
columns: [
|
||||||
|
{ field: 'date', title: '日期', align: 'center', width: '14%' },
|
||||||
|
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
|
||||||
|
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
|
||||||
|
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
|
||||||
|
{ field: 'startPayUsd', title: 'startPay充值美元', align: 'center', width: '14%' },
|
||||||
|
{ field: 'iosUsd', title: 'ios充值美元', align: 'center', width: '14%' },
|
||||||
|
{ field: 'companyUsd', title: '对公打款美元', align: 'center', width: '14%' },
|
||||||
|
{ field: 'totalUsd', title: '总充值美元', align: 'center', width: '14%' },
|
||||||
|
],
|
||||||
|
cache: false,
|
||||||
|
striped: true,
|
||||||
|
showRefresh: false,
|
||||||
|
pagination: false,
|
||||||
|
search: false,
|
||||||
|
queryParamsType: "undefined",
|
||||||
|
queryParams: function queryParams (params) { //设置查询参数
|
||||||
|
var param = {
|
||||||
|
partitionId: 8,
|
||||||
|
beginDate: $('#beginDate').val(),
|
||||||
|
endDate: $('#endDate').val()
|
||||||
|
};
|
||||||
|
return param;
|
||||||
|
},
|
||||||
|
toolbar: '#toolbar',
|
||||||
|
url: '/admin/chargeRecord/partitionDetail',
|
||||||
|
onLoadSuccess: function () { //加载成功时执行
|
||||||
|
console.log("load success");
|
||||||
|
},
|
||||||
|
onLoadError: function () { //加载失败时执行
|
||||||
|
console.log("load fail");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 导出EXCEL
|
||||||
|
$('#btnExport').on('click', function () {
|
||||||
|
if (!$('#beginDate').val() || !$('#endDate').val()) {
|
||||||
|
$("#tipMsg").text("请输入必填的信息");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$("#searchForm").submit();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 查询刷新
|
||||||
|
$('#btnSearch').on('click', function () {
|
||||||
|
if (!$('#beginDate').val() || !$('#endDate').val()) {
|
||||||
|
$("#tipMsg").text("请输入必填的信息");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
TableHelper.doRefresh('#table');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
@@ -103,6 +103,7 @@ export default {
|
|||||||
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
|
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
|
||||||
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
|
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
|
||||||
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
|
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
|
||||||
|
{ field: 'startPayUsd', title: 'startPay充值美元', align: 'center', width: '14%' },
|
||||||
{ field: 'iosUsd', title: 'ios充值美元', align: 'center', width: '14%' },
|
{ field: 'iosUsd', title: 'ios充值美元', align: 'center', width: '14%' },
|
||||||
{ field: 'companyUsd', title: '对公打款美元', align: 'center', width: '14%' },
|
{ field: 'companyUsd', title: '对公打款美元', align: 'center', width: '14%' },
|
||||||
{ field: 'totalUsd', title: '总充值美元', align: 'center', width: '14%' },
|
{ field: 'totalUsd', title: '总充值美元', align: 'center', width: '14%' },
|
||||||
|
|||||||
@@ -24,12 +24,13 @@
|
|||||||
<option value="">请选择...</option>
|
<option value="">请选择...</option>
|
||||||
<option value="0">金币</option>
|
<option value="0">金币</option>
|
||||||
<option value="1">背包礼物</option>
|
<option value="1">背包礼物</option>
|
||||||
|
<option value="2">web-api金币</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label class="col-sm-2 control-label">统计时间:</label>
|
<label class="col-sm-2 control-label">统计时间:</label>
|
||||||
<div class="col-sm-2"><input type="text" class="form-control" name="beginTime" id="beginTime">
|
<div class="col-sm-2"><input type="text" class="form-control" name="beginTime" id="beginTime"></div>
|
||||||
</div><span class="col-sm-1">至</span>
|
<span class="col-sm-1">至</span>
|
||||||
<div class="col-sm-2"><input type="text" class="form-control" name="endTime" id="endTime"></div>
|
<div class="col-sm-2"><input type="text" class="form-control" name="endTime" id="endTime"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -110,24 +111,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||||
|
|
||||||
var picker1 = $("#beginTime").datetimepicker({
|
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
|
||||||
autoclose: true,
|
|
||||||
todayBtn: true,
|
|
||||||
});
|
|
||||||
var picker2 = $("#endTime").datetimepicker({
|
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
|
||||||
autoclose: true,
|
|
||||||
todayBtn: true
|
|
||||||
});
|
|
||||||
var picker3 = $('#editEndTime').datetimepicker({
|
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
|
||||||
autoclose: true
|
|
||||||
})
|
|
||||||
var picker4 = $('#editStartTime').datetimepicker({
|
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
|
||||||
autoclose: true
|
|
||||||
})
|
|
||||||
|
|
||||||
/*picker1.on('changeDate', function () {
|
/*picker1.on('changeDate', function () {
|
||||||
var date = $('#beginDate').datetimepicker('getDate');
|
var date = $('#beginDate').datetimepicker('getDate');
|
||||||
@@ -163,6 +147,8 @@ export default {
|
|||||||
formatter: function (val, row, index) {
|
formatter: function (val, row, index) {
|
||||||
if (row.type == 0) {
|
if (row.type == 0) {
|
||||||
return '金币'
|
return '金币'
|
||||||
|
}else if(row.type == 2){
|
||||||
|
return 'web-api金币';
|
||||||
} else {
|
} else {
|
||||||
return '背包礼物';
|
return '背包礼物';
|
||||||
}
|
}
|
||||||
@@ -287,7 +273,16 @@ export default {
|
|||||||
console.log("load fail");
|
console.log("load fail");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
var picker1 = $("#beginTime").datetimepicker({
|
||||||
|
format: 'yyyy-mm-dd hh:mm:ss',
|
||||||
|
autoclose: true,
|
||||||
|
todayBtn: true,
|
||||||
|
});
|
||||||
|
var picker2 = $("#endTime").datetimepicker({
|
||||||
|
format: 'yyyy-mm-dd hh:mm:ss',
|
||||||
|
autoclose: true,
|
||||||
|
todayBtn: true
|
||||||
|
});
|
||||||
// 查询刷新
|
// 查询刷新
|
||||||
$('#btnSearch').on('click', function () {
|
$('#btnSearch').on('click', function () {
|
||||||
TableHelper.doRefresh('#table');
|
TableHelper.doRefresh('#table');
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
:src="scope.row.screenUrl"
|
:src="scope.row.screenUrl"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="scope.row.screenUrl"
|
:preview-src-list="scope.row.screenUrl"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -66,6 +66,9 @@
|
|||||||
<option value="15">线性福袋礼物</option>
|
<option value="15">线性福袋礼物</option>
|
||||||
<option value="16">超级幸运礼物</option>
|
<option value="16">超级幸运礼物</option>
|
||||||
<option value="17">国家礼物</option>
|
<option value="17">国家礼物</option>
|
||||||
|
<option value="18">幸运礼物</option>
|
||||||
|
<option value="19">CP礼物</option>
|
||||||
|
<option value="20">定制礼物</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<label for="partitionId" class="col-sm-1 control-label">地区:</label>
|
<label for="partitionId" class="col-sm-1 control-label">地区:</label>
|
||||||
@@ -153,6 +156,7 @@
|
|||||||
<input type="checkbox" name="partitionFlag" value="1"/>英语区<br>
|
<input type="checkbox" name="partitionFlag" value="1"/>英语区<br>
|
||||||
<input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br>
|
<input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br>
|
||||||
<input type="checkbox" name="partitionFlag" value="4"/>华语区<br>
|
<input type="checkbox" name="partitionFlag" value="4"/>华语区<br>
|
||||||
|
<input type="checkbox" name="partitionFlag" value="8"/>土耳其区<br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -185,6 +189,12 @@
|
|||||||
<input type="text" class="form-control validate[required]" name="giftName" id="giftEnName">
|
<input type="text" class="form-control validate[required]" name="giftName" id="giftEnName">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="giftTrName" class="col-sm-2 control-label">土耳其礼物名称</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control validate[required]" name="giftName" id="giftTrName">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="goldPrice" class="col-sm-2 control-label">礼物价格</label>
|
<label for="goldPrice" class="col-sm-2 control-label">礼物价格</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
@@ -208,6 +218,9 @@
|
|||||||
<option value="15">线性福袋礼物</option>
|
<option value="15">线性福袋礼物</option>
|
||||||
<option value="16">超级幸运礼物</option>
|
<option value="16">超级幸运礼物</option>
|
||||||
<option value="17">国家礼物</option>
|
<option value="17">国家礼物</option>
|
||||||
|
<option value="18">幸运礼物</option>
|
||||||
|
<option value="19">CP礼物</option>
|
||||||
|
<option value="20">定制礼物</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -276,6 +289,22 @@
|
|||||||
<label class="radio-inline"><input type="radio" name="isLatest" value="1">是</label>
|
<label class="radio-inline"><input type="radio" name="isLatest" value="1">是</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-2 control-label">是否需要全服通知</label>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<label class="radio-inline"><input type="radio" name="notifyFull" value="0" checked>否</label>
|
||||||
|
<label class="radio-inline"><input type="radio" name="notifyFull" value="1">是</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-2 control-label">是否需要塞头像</label>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<label class="radio-inline"><input type="radio" name="showAvatarType" value="0" checked>否</label>
|
||||||
|
<label class="radio-inline"><input type="radio" name="showAvatarType" value="1">送礼者</label>
|
||||||
|
<label class="radio-inline"><input type="radio" name="showAvatarType" value="2">收礼者</label>
|
||||||
|
<label class="radio-inline"><input type="radio" name="showAvatarType" value="3">左送右收</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-2 control-label">限时礼物</label>
|
<label class="col-sm-2 control-label">限时礼物</label>
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
@@ -648,6 +677,7 @@ export default {
|
|||||||
{field: 'giftName.zh', title: '礼物名称', align: 'center', width: '15%'},
|
{field: 'giftName.zh', title: '礼物名称', align: 'center', width: '15%'},
|
||||||
{field: 'giftName.ar', title: '阿语礼物名称', align: 'center', width: '10%'},
|
{field: 'giftName.ar', title: '阿语礼物名称', align: 'center', width: '10%'},
|
||||||
{field: 'giftName.en', title: '英语礼物名称', align: 'center', width: '10%'},
|
{field: 'giftName.en', title: '英语礼物名称', align: 'center', width: '10%'},
|
||||||
|
{field: 'giftName.tr', title: '土耳其礼物名称', align: 'center', width: '10%'},
|
||||||
{
|
{
|
||||||
field: 'partitionFlag',
|
field: 'partitionFlag',
|
||||||
title: '地区',
|
title: '地区',
|
||||||
@@ -664,6 +694,9 @@ export default {
|
|||||||
if ((val & 4) != 0) {
|
if ((val & 4) != 0) {
|
||||||
value += '华语区<br>';
|
value += '华语区<br>';
|
||||||
}
|
}
|
||||||
|
if ((val & 8) != 0) {
|
||||||
|
value += '土耳其<br>';
|
||||||
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -763,6 +796,36 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'notifyFull',
|
||||||
|
title: '是否需要全服通知',
|
||||||
|
align: 'center',
|
||||||
|
width: '10%',
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
if (val == 1) {
|
||||||
|
return '是';
|
||||||
|
} else {
|
||||||
|
return '否'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'showAvatarType',
|
||||||
|
title: '是否需要塞头像',
|
||||||
|
align: 'center',
|
||||||
|
width: '10%',
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
if (val == 0) {
|
||||||
|
return '否';
|
||||||
|
}else if (val == 1) {
|
||||||
|
return '送礼者';
|
||||||
|
} else if (val == 2) {
|
||||||
|
return '收礼者';
|
||||||
|
}else {
|
||||||
|
return '左送右收'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'roomExclude',
|
field: 'roomExclude',
|
||||||
title: '房间专属',
|
title: '房间专属',
|
||||||
@@ -955,6 +1018,8 @@ export default {
|
|||||||
$("input:radio[name='hasSvga']")[0].checked = true;
|
$("input:radio[name='hasSvga']")[0].checked = true;
|
||||||
$("input:radio[name='isLatest']")[0].checked = true;
|
$("input:radio[name='isLatest']")[0].checked = true;
|
||||||
$("input:radio[name='isTimeLimit']")[0].checked = true;
|
$("input:radio[name='isTimeLimit']")[0].checked = true;
|
||||||
|
$("input:radio[name='notifyFull']")[0].checked = true;
|
||||||
|
$("input:radio[name='showAvatarType']")[0].checked = true;
|
||||||
$("input:radio[name='roomExclude']")[0].checked = true;
|
$("input:radio[name='roomExclude']")[0].checked = true;
|
||||||
$("#notifyStaySecond").val('');
|
$("#notifyStaySecond").val('');
|
||||||
$("#isSkipRoom").val('');
|
$("#isSkipRoom").val('');
|
||||||
@@ -1206,6 +1271,8 @@ export default {
|
|||||||
$("input:radio[name='hasSvga']")[0].checked = true;
|
$("input:radio[name='hasSvga']")[0].checked = true;
|
||||||
$("input:radio[name='isLatest']")[1].checked = true;
|
$("input:radio[name='isLatest']")[1].checked = true;
|
||||||
$("input:radio[name='isTimeLimit']")[1].checked = true;
|
$("input:radio[name='isTimeLimit']")[1].checked = true;
|
||||||
|
$("input:radio[name='notifyFull']")[0].checked = true;
|
||||||
|
$("input:radio[name='showAvatarType']")[0].checked = true;
|
||||||
$("input:radio[name='roomExclude']")[0].checked = true;
|
$("input:radio[name='roomExclude']")[0].checked = true;
|
||||||
$('#giftType').val('');
|
$('#giftType').val('');
|
||||||
$("#notifyStaySecond").val('');
|
$("#notifyStaySecond").val('');
|
||||||
@@ -1242,12 +1309,16 @@ export default {
|
|||||||
$("#giftArName").val(jsonName.ar);
|
$("#giftArName").val(jsonName.ar);
|
||||||
// 英语名称
|
// 英语名称
|
||||||
$("#giftEnName").val(jsonName.en);
|
$("#giftEnName").val(jsonName.en);
|
||||||
|
// 土耳其
|
||||||
|
$("#giftTrName").val(jsonName.tr);
|
||||||
} else {
|
} else {
|
||||||
$("#giftName").val(giftName);
|
$("#giftName").val(giftName);
|
||||||
// 阿语名称
|
// 阿语名称
|
||||||
$("#giftArName").val(giftName);
|
$("#giftArName").val(giftName);
|
||||||
// 英语名称
|
// 英语名称
|
||||||
$("#giftEnName").val(giftName);
|
$("#giftEnName").val(giftName);
|
||||||
|
// 土耳其名称
|
||||||
|
$("#giftTrName").val(giftName);
|
||||||
}
|
}
|
||||||
$("#goldPrice").val(json.entity.goldPrice);
|
$("#goldPrice").val(json.entity.goldPrice);
|
||||||
|
|
||||||
@@ -1284,6 +1355,8 @@ export default {
|
|||||||
var hasSvga = parseNum(json.entity.hasSvga);
|
var hasSvga = parseNum(json.entity.hasSvga);
|
||||||
var isLatest = parseNum(json.entity.isLatest);
|
var isLatest = parseNum(json.entity.isLatest);
|
||||||
var isTimeLimit = parseNum(json.entity.isTimeLimit);
|
var isTimeLimit = parseNum(json.entity.isTimeLimit);
|
||||||
|
var notifyFull = parseNum(json.entity.notifyFull);
|
||||||
|
var showAvatarType = json.entity.showAvatarType;
|
||||||
var isWholeServer = parseNum(json.entity.isWholeServer);
|
var isWholeServer = parseNum(json.entity.isWholeServer);
|
||||||
var roomExclude = parseNum(json.entity.roomExclude);
|
var roomExclude = parseNum(json.entity.roomExclude);
|
||||||
var partitionFlag = json.entity.partitionFlag;
|
var partitionFlag = json.entity.partitionFlag;
|
||||||
@@ -1301,6 +1374,8 @@ export default {
|
|||||||
$("input:radio[name='hasSvga']")[hasSvga].checked = true;
|
$("input:radio[name='hasSvga']")[hasSvga].checked = true;
|
||||||
$("input:radio[name='isLatest']")[isLatest].checked = true;
|
$("input:radio[name='isLatest']")[isLatest].checked = true;
|
||||||
$("input:radio[name='isTimeLimit']")[isTimeLimit].checked = true;
|
$("input:radio[name='isTimeLimit']")[isTimeLimit].checked = true;
|
||||||
|
$("input:radio[name='notifyFull']")[notifyFull].checked = true;
|
||||||
|
$("input:radio[name='showAvatarType']")[showAvatarType].checked = true;
|
||||||
$("input:radio[name='isWholeServerLabel']")[isWholeServer].checked = true;
|
$("input:radio[name='isWholeServerLabel']")[isWholeServer].checked = true;
|
||||||
$("input:radio[name='roomExclude']")[roomExclude].checked = true;
|
$("input:radio[name='roomExclude']")[roomExclude].checked = true;
|
||||||
|
|
||||||
@@ -1390,8 +1465,10 @@ export default {
|
|||||||
var ar_name = $("#giftArName").val();
|
var ar_name = $("#giftArName").val();
|
||||||
// 英语名称
|
// 英语名称
|
||||||
var en_name = $("#giftEnName").val();
|
var en_name = $("#giftEnName").val();
|
||||||
|
// 土耳其名称
|
||||||
|
var tr_name = $("#giftTrName").val();
|
||||||
// 国际化字段
|
// 国际化字段
|
||||||
var jsonName = {"zh":name,"ar":ar_name,"en":en_name}
|
var jsonName = {"zh":name,"ar":ar_name,"en":en_name,'tr':tr_name}
|
||||||
const nameValue = JSON.stringify(jsonName);
|
const nameValue = JSON.stringify(jsonName);
|
||||||
// 修改属性值
|
// 修改属性值
|
||||||
formData.giftName = nameValue; // 将giftName修改为"newGiftName"
|
formData.giftName = nameValue; // 将giftName修改为"newGiftName"
|
||||||
|
|||||||
@@ -14,15 +14,6 @@
|
|||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
送礼用户id:<input type="text" name="senderErbanNo" id="senderErbanNo" class="input-sm" />
|
送礼用户id:<input type="text" name="senderErbanNo" id="senderErbanNo" class="input-sm" />
|
||||||
收礼用户id:<input type="text" name="receiverErbanNo" id="receiverErbanNo" class="input-sm" />
|
收礼用户id:<input type="text" name="receiverErbanNo" id="receiverErbanNo" class="input-sm" />
|
||||||
礼物类型:
|
|
||||||
<select name="giftType" id="giftType">
|
|
||||||
<option value="">全部</option>
|
|
||||||
<option value="0">背包礼物</option>
|
|
||||||
<option value="2">普通礼物</option>
|
|
||||||
<option value="5">福袋奖池礼物</option>
|
|
||||||
<option value="7">贵族礼物</option>
|
|
||||||
<option value="8">周星榜礼物</option>
|
|
||||||
</select>
|
|
||||||
礼物名称:<input type="text" name="giftName" id="giftName" class="input-sm" />
|
礼物名称:<input type="text" name="giftName" id="giftName" class="input-sm" />
|
||||||
送礼时间:<input type="text" name="startTime" id="startTime" class="input-sm">
|
送礼时间:<input type="text" name="startTime" id="startTime" class="input-sm">
|
||||||
- <input type="text" name="endTime" id="endTime" class="input-sm">
|
- <input type="text" name="endTime" id="endTime" class="input-sm">
|
||||||
@@ -50,42 +41,30 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData() {
|
initData() {
|
||||||
let tableLoaded = false;
|
|
||||||
let currParams = {};
|
let currParams = {};
|
||||||
|
|
||||||
$('#table').bootstrapTable('destroy');
|
$('#table').bootstrapTable('destroy');
|
||||||
$('#table').bootstrapTable({
|
$('#table').bootstrapTable({
|
||||||
columns: [
|
columns: [
|
||||||
{ field: 'senderErbanNo', title: '送礼用户id', align: 'center', width: '8%' },
|
{ field: 'senderErbanNo', title: '送礼用户id', align: 'center', width: '8%' },
|
||||||
{ field: 'senderNick', title: '送礼用户昵称', align: 'center', width: '16%' },
|
{ field: 'senderNick', title: '送礼用户昵称', align: 'center', width: '12%' },
|
||||||
{ field: 'receiverErbanNo', title: '收礼用户id', align: 'center', width: '8%' },
|
{ field: 'receiverErbanNo', title: '收礼用户id', align: 'center', width: '8%' },
|
||||||
{ field: 'receiverNick', title: '收礼用户昵称', align: 'center', width: '16%' },
|
{ field: 'receiverNick', title: '收礼用户昵称', align: 'center', width: '12%' },
|
||||||
{ field: 'giftType', title: '礼物类型', align: 'center', width: '16%' },
|
{ field: 'roomErbanNo', title: "房间id", align: 'center', width: '8%' },
|
||||||
{ field: 'giftName', title: '礼物名称', align: 'center', width: '10%' },
|
{ field: 'roomTitle', title: "房间", align: 'center', width: '12%' },
|
||||||
{ field: 'giftNum', title: '礼物数量', align: 'center', width: '6%' },
|
{ field: 'giftType', title: '礼物类型', align: 'center', width: '8%' },
|
||||||
|
{ field: 'giftName', title: '礼物名称', align: 'center', width: '8%' },
|
||||||
|
{ field: 'giftNum', title: '礼物数量', align: 'center', width: '4%' },
|
||||||
{ field: 'totalGoldNum', title: '礼物总价值(钻)', align: 'center', width: '10%' },
|
{ field: 'totalGoldNum', title: '礼物总价值(钻)', align: 'center', width: '10%' },
|
||||||
{
|
{ field: 'createTime', title: '送礼时间', align: 'center', valign: 'middle', width: '16%'},
|
||||||
field: 'createTime',
|
|
||||||
title: '送礼时间',
|
|
||||||
align: 'center',
|
|
||||||
valign: 'middle',
|
|
||||||
width: '10%',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
if (val) {
|
|
||||||
var date = new Date(val);
|
|
||||||
return date.format("yyyy-MM-dd hh:mm:ss");
|
|
||||||
} else {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
cache: false,
|
cache: false,
|
||||||
striped: true,
|
striped: true,
|
||||||
showRefresh: false,
|
showRefresh: false,
|
||||||
pageSize: 10,
|
pageSize: 30,
|
||||||
pagination: true,
|
pagination: true,
|
||||||
pageList: [10, 20, 30, 50],
|
pageList: [30, 50, 100, 200],
|
||||||
sidePagination: "server", //表示服务端请求
|
sidePagination: "server", //表示服务端请求
|
||||||
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
||||||
//设置为limit可以获取limit, offset, search, sort, order
|
//设置为limit可以获取limit, offset, search, sort, order
|
||||||
@@ -110,11 +89,9 @@ export default {
|
|||||||
url: '/admin/giftSendRecord/list',
|
url: '/admin/giftSendRecord/list',
|
||||||
onLoadSuccess: function () { //加载成功时执行
|
onLoadSuccess: function () { //加载成功时执行
|
||||||
console.log("load success");
|
console.log("load success");
|
||||||
tableLoaded = true;
|
|
||||||
},
|
},
|
||||||
onLoadError: function () { //加载失败时执行
|
onLoadError: function () { //加载失败时执行
|
||||||
console.log("load fail");
|
console.log("load fail");
|
||||||
tableLoaded = false;
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
$('#btnSearch').on('click', function () {
|
$('#btnSearch').on('click', function () {
|
||||||
@@ -123,7 +100,6 @@ export default {
|
|||||||
// $("#tipModal").modal('show');
|
// $("#tipModal").modal('show');
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
console.debug('ASDFASDF')
|
|
||||||
// if ($('#startTime').val() && $('#endTime').val()) {
|
// if ($('#startTime').val() && $('#endTime').val()) {
|
||||||
// var dateStart = new Date($('#startTime').val().replace(/\-/g, "/"));
|
// var dateStart = new Date($('#startTime').val().replace(/\-/g, "/"));
|
||||||
// var dateEnd = new Date($('#endTime').val().replace(/\-/g, "/"));
|
// var dateEnd = new Date($('#endTime').val().replace(/\-/g, "/"));
|
||||||
@@ -135,18 +111,24 @@ export default {
|
|||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
if (tableLoaded || currParams.pageNumber > 1) {
|
if (currParams.pageNumber > 1) {
|
||||||
TableHelper.doRefreshAndToPage1('#table');
|
TableHelper.doRefreshAndToPage1('#table');
|
||||||
} else {
|
} else {
|
||||||
TableHelper.doRefresh('#table');
|
TableHelper.doRefresh('#table');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
var picker1 = $("#startTime").datetimepicker({
|
var picker1 = $("#startTime").datetimepicker({
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
todayHighlight: true,
|
||||||
|
todayBtn: true,
|
||||||
|
language: "zh-cn",
|
||||||
|
format: 'yyyy-mm-dd hh:ii:ss',
|
||||||
autoclose: true
|
autoclose: true
|
||||||
})
|
})
|
||||||
var picker2 = $('#endTime').datetimepicker({
|
var picker2 = $('#endTime').datetimepicker({
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
todayHighlight: true,
|
||||||
|
todayBtn: true,
|
||||||
|
language: "zh-cn",
|
||||||
|
format: 'yyyy-mm-dd hh:ii:ss',
|
||||||
autoclose: true
|
autoclose: true
|
||||||
})
|
})
|
||||||
picker1.on('changeDate', function () {
|
picker1.on('changeDate', function () {
|
||||||
|
|||||||
@@ -91,6 +91,24 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 赠送天数 -->
|
||||||
|
<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 v-model="editObj.value2" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in editObj.options2"
|
||||||
|
:key="item.day"
|
||||||
|
:label="item.dayName"
|
||||||
|
:value="item.day"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<!-- 用户昵称 -->
|
<!-- 用户昵称 -->
|
||||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||||
@@ -183,6 +201,33 @@ export default {
|
|||||||
userId: "",
|
userId: "",
|
||||||
value: "",
|
value: "",
|
||||||
options: [],
|
options: [],
|
||||||
|
value2: "",
|
||||||
|
options2: [
|
||||||
|
{
|
||||||
|
dayName: "1天",
|
||||||
|
day: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dayName: "3天",
|
||||||
|
day: 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dayName: "5天",
|
||||||
|
day: 5,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dayName: "7天",
|
||||||
|
day: 7,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dayName: "15天",
|
||||||
|
day: 15,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dayName: "30天",
|
||||||
|
day: 30,
|
||||||
|
},
|
||||||
|
],
|
||||||
nick: "",
|
nick: "",
|
||||||
time: "",
|
time: "",
|
||||||
region: "",
|
region: "",
|
||||||
@@ -248,6 +293,7 @@ export default {
|
|||||||
vipSendSend({
|
vipSendSend({
|
||||||
uid: this.editObj.uid,
|
uid: this.editObj.uid,
|
||||||
vipLevel: this.editObj.value,
|
vipLevel: this.editObj.value,
|
||||||
|
days: this.editObj.value2,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.getData();
|
this.getData();
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
:src="scope.row.giftUrl"
|
:src="scope.row.giftUrl"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.giftUrl]"
|
:preview-src-list="[scope.row.giftUrl]"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
:src="scope.row.giftUrl"
|
:src="scope.row.giftUrl"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.giftUrl]"
|
:preview-src-list="[scope.row.giftUrl]"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user