diff --git a/dist.zip b/dist.zip new file mode 100644 index 0000000..a41e5dc Binary files /dev/null and b/dist.zip differ diff --git a/package.json b/package.json index 19fc0f9..0827a3b 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "axios": "0.17.1", "babel-plugin-component": "0.10.1", "babel-polyfill": "6.26.0", + "dayjs": "^1.11.18", "docx": "^9.5.1", "element-ui": "^2.15.14", "file-saver": "^2.0.5", diff --git a/src/router/index.js b/src/router/index.js index d065181..a6c1549 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -89,6 +89,7 @@ const mainRoutes = { { path: '/medicalrecords-userList', component: _import('modules/medicalrecords/userList'), name: 'medicalrecords-userList', meta: { title: '审核人员列表', isTab: true } }, { path: '/vipList-userList', component: _import('modules/vipList/userList'), name: 'vipList-userList', meta: { title: 'VIP用户列表', isTab: true } }, { path: '/vipList-vipDetail', component: _import('modules/vipList/vipDetail'), name: 'vipList-vipDetail', meta: { title: 'VIP详情', isTab: true } }, + { path: '/reportList-vipList', component: _import('modules/reportList/vipList'), name: 'reportList-vipList', meta: { title: 'VIP报表', isTab: true } }, ], beforeEnter (to, from, next) { diff --git a/src/views/modules/miniClass/miniClassList.vue b/src/views/modules/miniClass/miniClassList.vue index 0bb348a..a9865dc 100644 --- a/src/views/modules/miniClass/miniClassList.vue +++ b/src/views/modules/miniClass/miniClassList.vue @@ -149,6 +149,7 @@ >
查询 - 新增 - 批量删除 + + +
+
下载 {{year}} 年全部报表
+ + +
+
{{ monthNames[mIndex] }} 月 下载报表 +
+
+
+ + +
{{ d.title }}
+ + +
+ - +
+ + +
+
+ +
+ + + + + + \ No newline at end of file diff --git a/src/views/modules/reportList/vipList.vue b/src/views/modules/reportList/vipList.vue new file mode 100644 index 0000000..8f57240 --- /dev/null +++ b/src/views/modules/reportList/vipList.vue @@ -0,0 +1,106 @@ + + + + + \ No newline at end of file diff --git a/src/views/modules/user/user-point-memery.vue b/src/views/modules/user/user-point-memery.vue index d869f85..1f4722f 100644 --- a/src/views/modules/user/user-point-memery.vue +++ b/src/views/modules/user/user-point-memery.vue @@ -55,12 +55,18 @@ }} - + label="支付方式"> + + + - + +
+ + 微信 + 支付宝 + 银行支付 + 海外支付 + + +
+
- + { this.$http({ url: this.$http.adornUrl( - `/book/user/pointChange?pointType=${this.pointForm.pointType}¬e=${this.pointForm.remark}&pointAmount=${this.pointForm.pointAmount}&id=${this.pointForm.id}` + `/book/user/pointChange?pointType=${this.pointForm.pointType}¬e=${this.pointForm.remark?this.pointForm.remark:''}&pointAmount=${this.pointForm.pointAmount}&id=${this.pointForm.id}` ), method: "get", params: this.$http.adornParams() diff --git a/src/views/modules/vipList/user-open-vip.vue b/src/views/modules/vipList/user-open-vip.vue index 59fac66..1314e75 100644 --- a/src/views/modules/vipList/user-open-vip.vue +++ b/src/views/modules/vipList/user-open-vip.vue @@ -106,6 +106,15 @@
+ + + +
0) { return matchedData[0].dayAmount; + }else{ + const latest = data.userVipLogs.reduce((max, item) => { + return new Date(item.endTime) > new Date(max.endTime) ? item : max; +}); +if (latest && latest.endTime) { + return latest.dayAmount; + } + } } else { return null; @@ -591,7 +599,7 @@ export default { ${ this.getVipPrice(e) != null - ? "¥" + this.getVipPrice(e) + ? `¥${this.getVipPrice(e)}${e.state == 0 ? "" : " ( 已过期 ) "}` : '' } 有效期:${ @@ -607,11 +615,11 @@ export default { `${vipMap[e.type]} ${ this.getVipPrice(e) != null - ? "¥" + this.getVipPrice(e) + ? `¥${this.getVipPrice(e)}${e.state == 0 ? "" : " ( 已过期 ) "}` : '' } 有效期:${ @@ -627,13 +635,13 @@ export default { `${ vipMap[e.type] } ${ this.getVipPrice(e) != null - ? "¥" + this.getVipPrice(e) + ? `¥${this.getVipPrice(e)}${e.state == 0 ? "" : " ( 已过期 ) "}` : '' } 有效期:${ diff --git a/src/views/modules/vipList/vipDetail.vue b/src/views/modules/vipList/vipDetail.vue index 2fdcb01..d56959a 100644 --- a/src/views/modules/vipList/vipDetail.vue +++ b/src/views/modules/vipList/vipDetail.vue @@ -100,11 +100,11 @@ > - + @@ -113,18 +113,19 @@ - + @@ -157,14 +158,19 @@
- -
+
- - {{ option.label }} - - - 选择此类型会同时生成多条VIP明细 -
@@ -204,16 +213,26 @@
- {{ currentSheet.startTime}} - 插入 + {{ currentSheet.startTime }} + 插入 - {{currentSheet.endTime }} 插入 + {{ currentSheet.endTime }} + 插入
- - 天医币 银行支付 - 海外支付 + 海外支付 其他
{ @@ -514,17 +545,28 @@ date.setFullYear(date.getFullYear() - yearsToAdd); return; } } + if (!this.dataForm.payType) { + this.$message.error("请选择支付方式"); + return; + } if (this.dataForm.type == "order" && !this.dataForm.orderSn) { this.$message.error("请输入订单号"); return; } - if (!this.dataForm.payType) { - this.$message.error("请输入支付方式"); + + if ( + (this.dataForm.payType == "微信" || + this.dataForm.payType == "支付宝") && + !this.dataForm.orderSn && + this.dataForm.type != "order" + ) { + this.$message.error("请输入交易流水号"); return; } + if (this.dataForm.payType == "海外支付") { - this.dataForm.fee=0; - this.dataForm.jf=0; + this.dataForm.fee = 0; + this.dataForm.jf = 0; } // if (this.dataForm.jf == 0 && this.dataForm.fee == 0) { // this.$message.error("请重新填写金额或者积分,不能都为0"); @@ -540,10 +582,10 @@ date.setFullYear(date.getFullYear() - yearsToAdd); ...this.dataForm, jf: this.dataForm.jf || 0, fee: this.dataForm.fee || 0, - userId: this.userInfo.id + userId: this.userInfo.id, + orderSn: this.dataForm.orderSn || "" }; - if (this.editType == "add") { if (data.vipType == 1 || data.vipType == 2) { data.userVipId = ""; @@ -596,7 +638,7 @@ date.setFullYear(date.getFullYear() - yearsToAdd); handleAdd(data) { this.editType = "add"; console.log("data at line 263:", data); - + const vipMap = { 4: "中医VIP", 5: "针灸VIP", @@ -609,7 +651,11 @@ date.setFullYear(date.getFullYear() - yearsToAdd); console.log("at line 274:", vipMap[data.type]); this.currentSheet = { ...data, - info: { type: "master", typeName: vipMap[data.type],vipType:data.type } + info: { + type: "master", + typeName: vipMap[data.type], + vipType: data.type + } }; this.dataForm = { type: "master", @@ -629,7 +675,7 @@ date.setFullYear(date.getFullYear() - yearsToAdd); handleEdit(item, data) { this.editType = "edit"; console.log("data at line 263:", data); - + const vipMap = { 4: "中医VIP", 5: "针灸VIP", @@ -651,21 +697,21 @@ date.setFullYear(date.getFullYear() - yearsToAdd); }; this.tracesShow = true; }, - handleDelete(data) { + handleDelete(item) { this.$confirm("确定要删除该明细吗?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }) .then(() => { - return; this.$http({ - url: this.$http.adornUrl("/book/point/delPoint"), + url: this.$http.adornUrl("/master/userVip/delUserVipLogById"), method: "post", data: this.$http.adornData({ - pointId: item.id + id: item.id }) }).then(({ data }) => { + console.log("data at line 668:", data); if (data.code == 0) { this.$message.success("删除成功"); this.getData(); @@ -707,7 +753,7 @@ date.setFullYear(date.getFullYear() - yearsToAdd); `${vipMap[type]}` ); } else if (type == 8) { @@ -715,7 +761,7 @@ date.setFullYear(date.getFullYear() - yearsToAdd); `${ vipMap[type] }` @@ -1193,11 +1239,11 @@ ul.list { .DiscountColor { color: #f94f04; } -.coin_block{ +.coin_block { margin-bottom: 10px; } -.year_block{ - span{ +.year_block { + span { padding: 2px 10px; border: 1px solid #006699; color: #006699; diff --git a/static/config/index.js b/static/config/index.js index 493669f..88a0b47 100644 --- a/static/config/index.js +++ b/static/config/index.js @@ -5,8 +5,8 @@ window.SITE_CONFIG = {}; // api接口请求地址 - // window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; // 线上正式环境 - window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb'; //川 + window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; // 线上正式环境 + // window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb'; //川 // cdn地址 = 域名 + 版本号 window.SITE_CONFIG['domain'] = './'; // 域名