浏览代码

Signed-off-by: Changpeng Duan <838560574@qq.com>

Changpeng Duan 5 年之前
父节点
当前提交
d0b86d2dfb

+ 28 - 1
pc/README.md

@@ -141,4 +141,31 @@ order
  4.课程表模板详情预览(SttPlan/SttPlanPreview)
  
  5.课程表预览(SchoolTimetable/SchoolTimetablePreview)
-   
+   
+   
+   20200911
+   
+   1.管理员管理 增加新管理员后重新查一遍店铺列表 √
+   2.侧边栏对齐 √
+   3.adminManage 缺少备注 √
+   4.新增管理员所属门店下拉框对齐,调整输入框顺序:账号、密码、姓名、手机号、所属门店、备注。√
+   5.编辑管理员信息时,密码非必填。密码不填不修改密码。输入框顺序同增加管理员。
+   6.会员管理,会员有效期调整,弹窗标题错误。点击确认后,返回成功信息错误。
+     会员类型为”充值“的,点击有效期调整,弹窗中提示”用户不是年费会员,无法调整会员有效期“ √
+   7.会员管理列表,操作中,编辑不是按钮,列表中会员有效期为“0001-01-01“的隐藏不显示。 √
+   8.穿梭框最后一项偏右显示 √
+   9.首页,下课管理中,上课时间应包含上课时间,下课时间 √
+   10.下课管理 确认下课调错接口了√
+      应该调用 SchoolTimeTable/ClassOverConfirm√
+    11.首页下课管理中,点击下课,新页面顶部文字固定√
+12.教练管理列表中,暂时隐藏时长统计√
+
+
+   
+   .课程管理通用设置问题 √
+   .
+
+   
+   
+   99.添加课程表/课程表模板的单条时,选择课程后预填入课时上限。√
+   100.添加单条时,默认值问题√

+ 15 - 19
pc/src/api/Navs.js

@@ -4,7 +4,7 @@ let navs = [{
     "clmname": "系统首页",
     "clmurl": "/",
     "prname": "",
-    "show": 1,
+    "show": 3,
     "grouplist": "2,5",
     "icon": "el-icon-house",
 }, {
@@ -13,7 +13,7 @@ let navs = [{
     "clmname": "会员管理",
     "clmurl": "/member",
     "prname": "",
-    "show": 1,
+    "show": 3,
     "grouplist": "2,5",
     "icon": "el-icon-user",
 }, {
@@ -22,7 +22,7 @@ let navs = [{
     "clmname": "课程管理",
     "clmurl": "/lesson",
     "prname": "",
-    "show": 1,
+    "show": 3,
     "grouplist": "2,5",
     "icon": "el-icon-collection",
 }, {
@@ -31,7 +31,7 @@ let navs = [{
     "clmname": "课程表模板",
     "clmurl": "/lessonTable",
     "prname": "",
-    "show": 1,
+    "show": 3,
     "grouplist": "2,5",
     "icon": "el-icon-tickets",
 }, {
@@ -40,7 +40,7 @@ let navs = [{
     "clmname": "课程表管理",
     "clmurl": "/lessonManage",
     "prname": "",
-    "show": 1,
+    "show": 3,
     "grouplist": "2,5",
     "icon": "el-icon-date",
 }, {
@@ -49,7 +49,7 @@ let navs = [{
     "clmname": "教练管理",
     "clmurl": "/coach",
     "prname": "",
-    "show": 1,
+    "show": 3,
     "grouplist": "2,5",
     "icon": "el-icon-medal-1",
 }, {
@@ -58,7 +58,7 @@ let navs = [{
     "clmname": "预约管理",
     "clmurl": "/appoint",
     "prname": "",
-    "show": 1,
+    "show": 3,
     "grouplist": "2,5",
     "icon": "el-icon-time",
 }, {
@@ -67,7 +67,7 @@ let navs = [{
     "clmname": "预约记录",
     "clmurl": "/record",
     "prname": "",
-    "show": 1,
+    "show": 3,
     "grouplist": "2,5",
     "icon": "el-icon-document-copy",
 }, {
@@ -76,7 +76,7 @@ let navs = [{
     "clmname": "消费记录",
     "clmurl": "/cost",
     "prname": "",
-    "show": 1,
+    "show": 3,
     "grouplist": "2,5",
     "icon": "el-icon-bank-card",
 }, {
@@ -85,7 +85,7 @@ let navs = [{
     "clmname": "下课管理",
     "clmurl": "/finish",
     "prname": "",
-    "show": 1,
+    "show": 3,
     "grouplist": "2,5",
     "icon": "el-icon-bell",
 }, {
@@ -94,7 +94,7 @@ let navs = [{
     "clmname": "系统设置",
     "clmurl": "/setting",
     "prname": "",
-    "show": 1,
+    "show": 3,
     "grouplist": "2,5",
     "icon": "el-icon-setting",
 }, {
@@ -103,8 +103,7 @@ let navs = [{
     "clmname": "管理员管理",
     "clmurl": "/adminManage",
     "prname": "",
-    "show": 1,
-    // "show": 2,
+    "show": 2,
     "grouplist": "2,5",
     "icon": "el-icon-user",
 }, {
@@ -113,8 +112,7 @@ let navs = [{
     "clmname": "店面管理",
     "clmurl": "/shopManage",
     "prname": "",
-    "show": 1,
-    // "show": 2,
+    "show": 2,
     "grouplist": "2,5",
     "icon": "el-icon-s-shop",
 }, {
@@ -123,8 +121,7 @@ let navs = [{
     "clmname": "操作日志",
     "clmurl": "/log",
     "prname": "",
-    "show": 1,
-    // "show": 2,
+    "show": 2,
     "grouplist": "2,5",
     "icon": "el-icon-s-claim",
 }, {
@@ -133,8 +130,7 @@ let navs = [{
     "clmname": "系统设置",
     "clmurl": "/adminSetting",
     "prname": "",
-    "show": 1,
-    // "show": 2,
+    "show": 2,
     "grouplist": "2,5",
     "icon": "el-icon-setting",
 }

+ 84 - 78
pc/src/api/getApiRes.js

@@ -53,111 +53,112 @@ export function testSelect(postdata) {
 
 // 获取验证图片
 export function GenVerifyPic(postdata) {
-    let url = headapi + '/v1/Auth/GenVerifyPic';
+    let url = headapi + 'v1/Auth/GenVerifyPic';
     return getApiBasic(url, postdata);
 }
 
 // 修改密码 √
 export function PassEdit(postdata) {
-    let url = headapi + '/v1/Auth/PassEdit';
+    let url = headapi + 'v1/Auth/PassEdit';
     return getApiBasic(url, postdata);
 }
 
 // 用户登录 √
 export function SignIn(postdata) {
-    let url = headapi + '/v1/Auth/SignIn';
+    let url = headapi + 'v1/Auth/SignIn';
     return getApiBasic(url, postdata);
 }
 
 // 用户退出
 export function SignOut(postdata) {
-    let url = headapi + '/v1/Auth/SignOut';
+    let url = headapi + 'v1/Auth/SignOut';
     return getApiBasic(url, postdata);
 }
 
 // 用户添加
 export function SignUp(postdata) {
-    let url = headapi + '/v1/Auth/SignUp';
+    let url = headapi + 'v1/Auth/SignUp';
     return getApiBasic(url, postdata);
 }
 
 // 用户微信登录
 export function WXSignIn(postdata) {
-    let url = headapi + '/v1/Auth/WXSignIn';
+    let url = headapi + 'v1/Auth/WXSignIn';
     return getApiBasic(url, postdata);
 }
 
 // class
 // √ 课程添加
 export function ClassAdd(postdata) {
-    let url = headapi + '/v1/Class/ClassAdd';
+    let url = headapi + 'v1/Class/ClassAdd';
     return getApiBasic(url, postdata);
 }
 // 课程统计
 export function ClassStatistics(postdata) {
-    let url = headapi + '/v1/Class/ClassStatistics';
+    let url = headapi + 'v1/Class/ClassStatistics';
     return getApiBasic(url, postdata);
 }
 
 // √ 课程颜色修改
 export function ClassColorEdit(postdata) {
-    let url = headapi + '/v1/Class/ClassColorEdit';
+    let url = headapi + 'v1/Class/ClassColorEdit';
     return getApiBasic(url, postdata);
 }
 
 // 课程单条查询
 export function ClassDetailOne(postdata) {
-    let url = headapi + '/v1/Class/ClassDetailOne';
+    let url = headapi + 'v1/Class/ClassDetailOne';
     return getApiBasic(url, postdata);
-}// √ 课程基本信息修改
+}
+// √ 课程基本信息修改
 export function ClassEdit(postdata) {
-    let url = headapi + '/v1/Class/ClassEdit';
+    let url = headapi + 'v1/Class/ClassEdit';
     return getApiBasic(url, postdata);
 }
 
 // √ 课程列表查询
 export function ClassListQuery(postdata) {
-    let url = headapi + '/v1/Class/ClassListQuery';
+    let url = headapi + 'v1/Class/ClassListQuery';
     return getApiBasic(url, postdata);
 }
 
 // √ 课程状态修改
 export function ClassStatusEdit(postdata) {
-    let url = headapi + '/v1/Class/ClassStatusEdit';
+    let url = headapi + 'v1/Class/ClassStatusEdit';
     return getApiBasic(url, postdata);
 }
 
 // 课程会员增删
 export function ClassVipuserEdit(postdata) {
-    let url = headapi + '/v1/Class/ClassVipuserEdit';
+    let url = headapi + 'v1/Class/ClassVipuserEdit';
     return getApiBasic(url, postdata);
 }
 
 // 课程会员查询
 export function ClassVipuserQuery(postdata) {
-    let url = headapi + '/v1/Class/ClassVipuserQuery';
+    let url = headapi + 'v1/Class/ClassVipuserQuery';
     return getApiBasic(url, postdata);
 }
 
 // 课程微信可见状态修改
 export function ClassVisibleStatusEdit(postdata) {
-    let url = headapi + '/v1/Class/ClassVisibleStatusEdit';
+    let url = headapi + 'v1/Class/ClassVisibleStatusEdit';
     return getApiBasic(url, postdata);
 }
 // order
 // 管理员今日预约添加
 export function OrderAddByManager(postdata) {
-    let url = headapi + '/v1/Order/OrderAddByManager';
+    let url = headapi + 'v1/Order/OrderAddByManager';
     return getApiBasic(url, postdata);
 }
 // 管理员今日预约取消
 export function OrderCancelByManager(postdata) {
-    let url = headapi + '/v1/Order/OrderCancelByManager';
+    let url = headapi + 'v1/Order/OrderCancelByManager';
     return getApiBasic(url, postdata);
 }
 // 预约记录查询
 export function OrderListQuery(postdata) {
-    let url = headapi + '/v1/Order/OrderListQuery';
+    let url = headapi + 'v1/Order/OrderListQuery';
     return getApiBasic(url, postdata);
 }
 // 今日预约统计
@@ -167,22 +168,22 @@ export function OrderStatistics(postdata) {
 }
 // 今日课程预约总览
 export function TodayClassOrderQuery(postdata) {
-    let url = headapi + '/v1/Order/TodayClassOrderQuery';
+    let url = headapi + 'v1/Order/TodayClassOrderQuery';
     return getApiBasic(url, postdata);
 }
 // 课程预约列表
 export function ClassOrderQuery(postdata) {
-    let url = headapi + '/v1/Order/ClassOrderQuery';
+    let url = headapi + 'v1/Order/ClassOrderQuery';
     return getApiBasic(url, postdata);
 }
 // 今日会员预约列表查询
 export function TodayVipOrderQuery(postdata) {
-    let url = headapi + '/v1/Order/TodayVipOrderQuery';
+    let url = headapi + 'v1/Order/TodayVipOrderQuery';
     return getApiBasic(url, postdata);
 }
 // 会员预约列表查询
 export function VipUserOrderQuery(postdata) {
-    let url = headapi + '/v1/Order/VipUserOrderQuery';
+    let url = headapi + 'v1/Order/VipUserOrderQuery';
     return getApiBasic(url, postdata);
 }
 
@@ -190,306 +191,311 @@ export function VipUserOrderQuery(postdata) {
 
 // 正在进行课程列表
 export function ClassOngoingList(postdata) {
-    let url = headapi + '/v1/SchoolTimeTable/ClassOngoingList';
+    let url = headapi + 'v1/SchoolTimeTable/ClassOngoingList';
+    return getApiBasic(url, postdata);
+}
+// 下课记录详情删除
+export function ClassOverDetailDel(postdata) {
+    let url = headapi + 'v1/SchoolTimeTable/ClassOverDetailDel';
     return getApiBasic(url, postdata);
 }
 // 课程表详情微信可预约状态修改
 export function STTDetailWxOrderEdit(postdata) {
-    let url = headapi + '/v1/SchoolTimeTable/STTDetailWxOrderEdit';
+    let url = headapi + 'v1/SchoolTimeTable/STTDetailWxOrderEdit';
     return getApiBasic(url, postdata);
 }
 // 某日课程表查询
 export function ClassListByOrderDate(postdata) {
-    let url = headapi + '/v1/SchoolTimeTable/ClassListByOrderDate';
+    let url = headapi + 'v1/SchoolTimeTable/ClassListByOrderDate';
     return getApiBasic(url, postdata);
 }
 
 
 // 确认下课
 export function ClassOverConfirm(postdata) {
-    let url = headapi + '/v1/SchoolTimeTable/ClassOverConfirm';
+    let url = headapi + 'v1/SchoolTimeTable/ClassOverConfirm';
     return getApiBasic(url, postdata);
 }
 // 下课记录详情添加
 export function ClassOverDetailAdd(postdata) {
-    let url = headapi + '/v1/SchoolTimeTable/ClassOverDetailAdd';
+    let url = headapi + 'v1/SchoolTimeTable/ClassOverDetailAdd';
     return getApiBasic(url, postdata);
 }
 // 下课记录详情列表
 export function ClassOverDetailListQuery(postdata) {
-    let url = headapi + '/v1/SchoolTimeTable/ClassOverDetailListQuery';
+    let url = headapi + 'v1/SchoolTimeTable/ClassOverDetailListQuery';
     return getApiBasic(url, postdata);
 }
 // 下课记录详情状态修改
 export function ClassOverDetailStatusEdit(postdata) {
-    let url = headapi + '/v1/SchoolTimeTable/ClassOverDetailStatusEdit';
+    let url = headapi + 'v1/SchoolTimeTable/ClassOverDetailStatusEdit';
     return getApiBasic(url, postdata);
 }
 // 待下课课程列表
 export function ClassOverPrepare(postdata) {
-    let url = headapi + '/v1/SchoolTimeTable/ClassOverPrepare';
+    let url = headapi + 'v1/SchoolTimeTable/ClassOverPrepare';
     return getApiBasic(url, postdata);
 }
 // 下课准备
 export function ClassPreFinishListQuery(postdata) {
-    let url = headapi + '/v1/SchoolTimeTable/ClassPreFinishListQuery';
+    let url = headapi + 'v1/SchoolTimeTable/ClassPreFinishListQuery';
     return getApiBasic(url, postdata);
 }
 
 // 课程表基本信息添加
 export function STTBasicAdd(postdata) {
-    let url = headapi + '/v1/SchoolTimeTable/STTBasicAdd';
+    let url = headapi + 'v1/SchoolTimeTable/STTBasicAdd';
     return getApiBasic(url, postdata);
 }
 // 课程表基本信息修改
 export function STTBasicEdit(postdata) {
-    let url = headapi + '/v1/SchoolTimeTable/STTBasicEdit';
+    let url = headapi + 'v1/SchoolTimeTable/STTBasicEdit';
     return getApiBasic(url, postdata);
 }
 
 // 课程表基本列表查询
 export function STTBasicListQuery(postdata) {
-    let url = headapi + '/v1/SchoolTimeTable/STTBasicListQuery';
+    let url = headapi + 'v1/SchoolTimeTable/STTBasicListQuery';
     return getApiBasic(url, postdata);
 }
 // 课程表上下线状态修改
 export function STTBasicOfflineEdit(postdata) {
-    let url = headapi + '/v1/SchoolTimeTable/STTBasicOfflineEdit';
+    let url = headapi + 'v1/SchoolTimeTable/STTBasicOfflineEdit';
     return getApiBasic(url, postdata);
 }
 // 课程表状态修改
 export function STTBasicStatusEdit(postdata) {
-    let url = headapi + '/v1/SchoolTimeTable/STTBasicStatusEdit';
+    let url = headapi + 'v1/SchoolTimeTable/STTBasicStatusEdit';
     return getApiBasic(url, postdata);
 }
 
 // 课程表详情批量保存
 export function STTDetailBatchSave(postdata) {
-    let url = headapi + '/v1/SchoolTimeTable/STTDetailBatchSave';
+    let url = headapi + 'v1/SchoolTimeTable/STTDetailBatchSave';
     return getApiBasic(url, postdata);
 }
 // 课程表详情列表查询
 export function STTDetailListQuery(postdata) {
-    let url = headapi + '/v1/SchoolTimeTable/STTDetailListQuery';
+    let url = headapi + 'v1/SchoolTimeTable/STTDetailListQuery';
     return getApiBasic(url, postdata);
 }
 // 复制课程表
 export function SchoolTimeTableCopy(postdata) {
-    let url = headapi + '/v1/SchoolTimeTable/SchoolTimeTableCopy';
+    let url = headapi + 'v1/SchoolTimeTable/SchoolTimeTableCopy';
     return getApiBasic(url, postdata);
 }
 // 今日未上课课程列表查询
 export function WaitingBeginClassList(postdata) {
-    let url = headapi + '/v1/SchoolTimeTable/WaitingBeginClassList';
+    let url = headapi + 'v1/SchoolTimeTable/WaitingBeginClassList';
     return getApiBasic(url, postdata);
 }
 
 // shop
 // √ 店铺添加
 export function ShopAdd(postdata) {
-    let url = headapi + '/v1/Shop/ShopAdd';
+    let url = headapi + 'v1/Shop/ShopAdd';
     return getApiBasic(url, postdata);
 }
 // 店铺微信预约状态修改
 export function ShopWxStatusEdit(postdata) {
-    let url = headapi + '/v1/Shop/ShopWxStatusEdit';
+    let url = headapi + 'v1/Shop/ShopWxStatusEdit';
     return getApiBasic(url, postdata);
 }
 // 店铺单条查询
 export function ShopDetailOne(postdata) {
-    let url = headapi + '/v1/Shop/ShopDetailOne';
+    let url = headapi + 'v1/Shop/ShopDetailOne';
     return getApiBasic(url, postdata);
 }
 
 // √ 店铺详情查询
 export function ShopDetailQuery(postdata) {
-    let url = headapi + '/v1/User/ShopDetailQuery';
+    let url = headapi + 'v1/User/ShopDetailQuery';
     return getApiBasic(url, postdata);
 }
 //  操作日志列表查询
 export function OptLogListQuery(postdata) {
-    let url = headapi + '/v1/User/OptLogListQuery';
+    let url = headapi + 'v1/User/OptLogListQuery';
     return getApiBasic(url, postdata);
 }
 
 
 // 店铺修改
 export function ShopEdit(postdata) {
-    let url = headapi + '/v1/Shop/ShopEdit';
+    let url = headapi + 'v1/Shop/ShopEdit';
     return getApiBasic(url, postdata);
 }
 
 // 店铺列表查询
 export function ShopListQuery(postdata) {
-    let url = headapi + '/v1/Shop/ShopListQuery';
+    let url = headapi + 'v1/Shop/ShopListQuery';
     return getApiBasic(url, postdata);
 }
 
 // 店铺状态修改
 export function ShopStatusEdit(postdata) {
-    let url = headapi + '/v1/Shop/ShopStatusEdit';
+    let url = headapi + 'v1/Shop/ShopStatusEdit';
     return getApiBasic(url, postdata);
 }
 
 // SttPlan
 // 课程表模板基本信息添加
 export function SttPlanBasicAdd(postdata) {
-    let url = headapi + '/v1/SttPlan/SttPlanBasicAdd';
+    let url = headapi + 'v1/SttPlan/SttPlanBasicAdd';
     return getApiBasic(url, postdata);
 }
 
 // 课程表模板基本信息修改
 export function SttPlanBasicEdit(postdata) {
-    let url = headapi + '/v1/SttPlan/SttPlanBasicEdit';
+    let url = headapi + 'v1/SttPlan/SttPlanBasicEdit';
     return getApiBasic(url, postdata);
 }
 
 // 课程表模板基本信息列表查询
 export function SttPlanBasicListQuery(postdata) {
-    let url = headapi + '/v1/SttPlan/SttPlanBasicListQuery';
+    let url = headapi + 'v1/SttPlan/SttPlanBasicListQuery';
     return getApiBasic(url, postdata);
 }
 
 // 课程表模板店铺通用修改
 export function SttPlanBasicShopEdit(postdata) {
-    let url = headapi + '/v1/SttPlan/SttPlanBasicShopEdit';
+    let url = headapi + 'v1/SttPlan/SttPlanBasicShopEdit';
     return getApiBasic(url, postdata);
 }
 
 // 课程表模板复制
 export function SttPlanCopy(postdata) {
-    let url = headapi + '/v1/SttPlan/SttPlanCopy';
+    let url = headapi + 'v1/SttPlan/SttPlanCopy';
     return getApiBasic(url, postdata);
 }
 // 课程表模板基本信息状态修改
 export function SttPlanBasicStatusEdit(postdata) {
-    let url = headapi + '/v1/SttPlan/SttPlanBasicStatusEdit';
+    let url = headapi + 'v1/SttPlan/SttPlanBasicStatusEdit';
     return getApiBasic(url, postdata);
 }
 
 // 课程表模板详情列表查询
 export function SttPlanDetailListQuery(postdata) {
-    let url = headapi + '/v1/SttPlan/SttPlanDetailListQuery';
+    let url = headapi + 'v1/SttPlan/SttPlanDetailListQuery';
     return getApiBasic(url, postdata);
 }
 // 课程表模板发布
 export function SttPlanPublish(postdata) {
-    let url = headapi + '/v1/SttPlan/SttPlanPublish';
+    let url = headapi + 'v1/SttPlan/SttPlanPublish';
     return getApiBasic(url, postdata);
 }
 
 // 课程表模板详情批量保存
 export function SttPlanDetailBatchSave(postdata) {
-    let url = headapi + '/v1/SttPlan/SttPlanDetailBatchSave';
+    let url = headapi + 'v1/SttPlan/SttPlanDetailBatchSave';
     return getApiBasic(url, postdata);
 }
 
 // teacher
 // 教练信息添加 √
 export function TeacherAdd(postdata) {
-    let url = headapi + '/v1/Teacher/TeacherAdd';
+    let url = headapi + 'v1/Teacher/TeacherAdd';
     return getApiBasic(url, postdata);
 }
 // 教练信息修改  √
 export function TeacherEdit(postdata) {
-    let url = headapi + '/v1/Teacher/TeacherEdit';
+    let url = headapi + 'v1/Teacher/TeacherEdit';
     return getApiBasic(url, postdata);
 }
 // 教练信息列表查询  √
 export function TeacherListQuery(postdata) {
-    let url = headapi + '/v1/Teacher/TeacherListQuery';
+    let url = headapi + 'v1/Teacher/TeacherListQuery';
     return getApiBasic(url, postdata);
 }
 // 教练状态修改  √
 export function TeacherStatusEdit(postdata) {
-    let url = headapi + '/v1/Teacher/TeacherStatusEdit';
+    let url = headapi + 'v1/Teacher/TeacherStatusEdit';
     return getApiBasic(url, postdata);
 }
 
 // User
 // √
 export function ManagerSelfQuery(postdata) {
-    let url = headapi + '/v1/User/ManagerSelfQuery';
+    let url = headapi + 'v1/User/ManagerSelfQuery';
     return getApiBasic(url, postdata);
 }
 
 // √ 店铺管理员添加
 export function ShopManagerAdd(postdata) {
-    let url = headapi + '/v1/User/ShopManagerAdd';
+    let url = headapi + 'v1/User/ShopManagerAdd';
     return getApiBasic(url, postdata);
 }
 
 // 店铺管理员修改
 export function ShopManagerEdit(postdata) {
-    let url = headapi + '/v1/User/ShopManagerEdit';
+    let url = headapi + 'v1/User/ShopManagerEdit';
     return getApiBasic(url, postdata);
 }
 
 // 店铺管理员列表查询
 export function ShopManagerListQuery(postdata) {
-    let url = headapi + '/v1/User/ShopManagerListQuery';
+    let url = headapi + 'v1/User/ShopManagerListQuery';
     return getApiBasic(url, postdata);
 }
 
 // 店铺管理员状态修改
 export function ShopManagerStatusEdit(postdata) {
-    let url = headapi + '/v1/User/ShopManagerStatusEdit';
+    let url = headapi + 'v1/User/ShopManagerStatusEdit';
     return getApiBasic(url, postdata);
 }
 // 会员用户课时调整
 export function VipUserHourEdit(postdata) {
-    let url = headapi + '/v1/User/VipUserHourEdit';
+    let url = headapi + 'v1/User/VipUserHourEdit';
     return getApiBasic(url, postdata);
 }
 // 会员统计
 export function VipUserStatistics(postdata) {
-    let url = headapi + '/v1/User/VipUserStatistics';
+    let url = headapi + 'v1/User/VipUserStatistics';
     return getApiBasic(url, postdata);
 }
 // 会员课程增删
 export function VipUserClassEdit(postdata) {
-    let url = headapi + '/v1/User/VipUserClassEdit';
+    let url = headapi + 'v1/User/VipUserClassEdit';
     return getApiBasic(url, postdata);
 }
 // 会员有效期调整
 export function VipUserExpEdit(postdata) {
-    let url = headapi + '/v1/User/VipUserExpEdit';
+    let url = headapi + 'v1/User/VipUserExpEdit';
     return getApiBasic(url, postdata);
 }
 
 // 会员用户添加
 export function VipUserAdd(postdata) {
-    let url = headapi + '/v1/User/VipUserAdd ';
+    let url = headapi + 'v1/User/VipUserAdd ';
     return getApiBasic(url, postdata);
 }
 
 // 会员用户基本信息修改
 export function VipUserEdit(postdata) {
-    let url = headapi + '/v1/User/VipUserEdit ';
+    let url = headapi + 'v1/User/VipUserEdit ';
     return getApiBasic(url, postdata);
 }
 // 会员消费记录查询
 export function VipUserConsumeListQuery(postdata) {
-    let url = headapi + '/v1/User/VipUserConsumeListQuery ';
+    let url = headapi + 'v1/User/VipUserConsumeListQuery ';
     return getApiBasic(url, postdata);
 }
 
 // 会员用户列表
 export function VipUserListQuery(postdata) {
-    let url = headapi + '/v1/User/VipUserListQuery';
+    let url = headapi + 'v1/User/VipUserListQuery';
     return getApiBasic(url, postdata);
 }
 
 
 // 会员用户基本信息查询
 export function VipUserSimpleQuery(postdata) {
-    let url = headapi + '/v1/User/VipUserSimpleQuery ';
+    let url = headapi + 'v1/User/VipUserSimpleQuery ';
     return getApiBasic(url, postdata);
 }
 
 // 会员用户状态修改
 export function VipUserStatusEdit(postdata) {
-    let url = headapi + '/v1/User/VipUserStatusEdit ';
+    let url = headapi + 'v1/User/VipUserStatusEdit ';
     return getApiBasic(url, postdata);
 }
 

+ 3 - 0
pc/src/assets/css/panel.css

@@ -294,4 +294,7 @@
  }
 .el-transfer .el-button+.el-button {
     margin-left: 0;
+}
+/deep/ .el-checkbox {
+    margin-right: 0;
 }

+ 5 - 0
pc/src/components/Headside.vue

@@ -85,6 +85,11 @@
                         localStorage.shopId = json.Rs.ShopId;
                         localStorage.userLevel = json.Rs.Role.State;
                     } else {
+                        if(json.Code == 1010){
+                            that.$message.error(json.Memo);
+                            that.$router.push({path: '/login', query: {status: 1}});
+                            return false
+                        }
                         that.$message.error(json.Memo);
                     }
                 })

+ 16 - 2
pc/src/components/Navside.vue

@@ -72,10 +72,16 @@
                     let json = res;
                     if (json.Code == 0) {
                         that.userLevelText = json.Rs.Role.Name;
-                        that.userLevel = json.Rs.Role.State;
+                        // 1 会员 2 系统 3 店铺
+                        that.userLevel = json.Rs.Role.Id;
                         localStorage.shopId = json.Rs.ShopId;
                         this.panelSelect(json.Rs.ShopId);
                     } else {
+                        if(json.Code == 1010){
+                            that.$message.error(json.Memo);
+                            that.$router.push({path: '/login', query: {status: 1}});
+                            return false
+                        }
                         that.$message.error(json.Memo);
                     }
                 })
@@ -123,7 +129,8 @@
         overflow: hidden;
         display: block;
         margin: 0 auto;
-        overflow-y: scroll;
+        /*overflow-y: scroll;*/
+        overflow-y: hidden;
         background-color: #fff;
         z-index: 4444;
     }
@@ -196,4 +203,11 @@
     /deep/ .el-menu-item:hover i {
         color: #fff!important;
     }
+    /deep/ .el-menu-item i{
+        position: relative;
+        float: left;
+        line-height: 55px;
+        left: 60px;
+    }
+
 </style>

+ 42 - 18
pc/src/views/AdminManage.vue

@@ -85,6 +85,24 @@
                         sortable
                 >
                 </el-table-column>
+                <el-table-column
+                        prop="Memo"
+                        label="备注"
+                        sortable
+                >
+                    <template slot-scope="scope">
+                        <el-popover
+                                placement="top"
+                                title="备注"
+                                width="200"
+                                trigger="hover"
+                                :content="scope.row.Memo">
+                            <span slot="reference"
+                                  v-if="scope.row.Memo.length > 10">{{scope.row.Memo.substr(0,10)}} ....</span>
+                        </el-popover>
+                        <span v-if="scope.row.Memo.length <= 10">{{scope.row.Memo}}</span>
+                    </template>
+                </el-table-column>
                 <el-table-column
                         prop="Status"
                         label="操作"
@@ -111,17 +129,17 @@
         <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="360px">
             <div>
                 <el-form ref="form" :model="form" label-width="80px">
-                    <el-form-item label="手机号">
-                        <el-input v-model="form.phone"></el-input>
-                    </el-form-item>
                     <el-form-item label="登陆账号">
                         <el-input v-model="form.userCode"></el-input>
                     </el-form-item>
+                    <el-form-item label="密码">
+                        <el-input v-model="form.password" type="password"></el-input>
+                    </el-form-item>
                     <el-form-item label="姓名">
                         <el-input v-model="form.name"></el-input>
                     </el-form-item>
-                    <el-form-item label="密码">
-                        <el-input v-model="form.password" type="password"></el-input>
+                    <el-form-item label="手机号">
+                        <el-input v-model="form.phone"></el-input>
                     </el-form-item>
                     <el-form-item label="所属门店">
                         <el-select v-model="form.shopId" placeholder="请选择所属门店">
@@ -297,17 +315,17 @@
                     this.$message.error('错了哦,登陆账号字数超过20个字');
                     return false
                 }
-                if (!that.form.password) {
-                    this.$message.error('错了哦,密码不能为空');
-                    return false
-                }
-                if (that.form.password.length < 6) {
-                    this.$message.error('错了哦,密码字数小于6个字');
-                    return false
-                }
-                if (that.form.password.length > 8) {
-                    this.$message.error('错了哦,密码字数超过8个字');
-                    return false
+
+                // 密码有输入才检测,没输入默认传空不修改
+                if (that.form.password) {
+                    if (that.form.password.length < 6) {
+                        this.$message.error('错了哦,密码字数小于6个字');
+                        return false
+                    }
+                    if (that.form.password.length > 8) {
+                        this.$message.error('错了哦,密码字数超过8个字');
+                        return false
+                    }
                 }
                 if (!that.form.name) {
                     this.$message.error('错了哦,姓名不能为空');
@@ -350,7 +368,7 @@
                         that.dialogVisible = false;
                         that.$message({
                             showClose: true,
-                            message: '管理员添加成功!',
+                            message: '管理员信息修改成功!',
                             type: 'success'
                         });
 
@@ -471,6 +489,8 @@
             // 新增管理员
             addAdmin() {
                 this.clearForm();
+                // 重载店面列表
+                this.panelSelect();
                 this.dialogVisible = true
                 this.dialogTitle = '新增管理员'
                 this.form.btnState = 0;
@@ -479,7 +499,8 @@
             editList() {
                 let that = this;
                 this.clearForm();
-
+                // 重载门店列表
+                this.panelSelect();
                 // checkNum
                 if (!this.multipleSelection.length) {
                     that.$message({
@@ -673,4 +694,7 @@
         float: right;
         margin-left: 10px;
     }
+    /deep/ .el-dialog .el-select .el-input__inner {
+        width: 240px;
+    }
 </style>

+ 39 - 32
pc/src/views/EditLessonManage.vue

@@ -8,9 +8,9 @@
                 <el-row :gutter="20">
                     <el-col :span="5">
                         <em>课程表名称:</em>
-                        <el-input v-model="panel.name" placeholder="请输入课程表名称"></el-input>
+                        <el-input v-model="panel.name" placeholder="请输入课程表名称" :disabled="panel.inputState"></el-input>
                     </el-col>
-                    <el-col :span="5">
+                    <el-col :span="5" v-if="!panel.inputState">
                         <em>课程表时间:</em>
                         <el-date-picker
                                 v-model="panel.week"
@@ -69,7 +69,7 @@
                         align="center"
                 >
                     <template slot-scope="scope">
-                        <el-select v-model="scope.row.ClassId">
+                        <el-select v-model="scope.row.ClassId" @change="getRowTop(scope.row)">
                             <el-option
                                     v-for="item in panel.options"
                                     :key="item.value"
@@ -95,7 +95,7 @@
                         align="center"
                 >
                     <template slot-scope="scope">
-                        <el-input-number v-model="scope.row.ConsumeHour" :min="1" :max="9999"
+                        <el-input-number v-model="scope.row.ConsumeHour" :min="0" :max="9999"
                                          label=""></el-input-number>
                     </template>
                 </el-table-column>
@@ -145,8 +145,12 @@
             <div class="rowBottom">
                 <el-button type="default" @click="$router.push('/lessonManage')">返回课程表</el-button>
                 <!--                ID为0是新建,不为0是修改-->
-                <el-button type="primary" class="pull-right" @click="confirmLessonTable" v-if="this.$route.query.id == 0">提交</el-button>
-                <el-button type="primary" class="pull-right" @click="confirmEditLessonTable" v-if="this.$route.query.id != 0">提交</el-button>
+                <el-button type="primary" class="pull-right" @click="confirmLessonTable"
+                           v-if="this.$route.query.id == 0">提交
+                </el-button>
+                <el-button type="primary" class="pull-right" @click="confirmEditLessonTable"
+                           v-if="this.$route.query.id != 0">提交
+                </el-button>
                 <el-button type="primary" class="pull-right" @click="addRow">新增课表</el-button>
             </div>
             <div>
@@ -187,7 +191,9 @@
         STTBasicEdit,
         testTable,
         testTableLong,
-        testSelect, ClassListQuery
+        testSelect,
+        ClassListQuery,
+        ClassDetailOne
     } from "../api/getApiRes";
 
     let qs = require('qs');
@@ -203,6 +209,7 @@
                 tableData: [],
                 // panel 配置项目
                 panel: {
+                    inputState: true,
                     name: '',
                     usercode: '',
                     username: '',
@@ -236,7 +243,7 @@
                     timeLong: [new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 9, 40)],
                     BeginStr: '08:30',
                     EndStr: '09:30',
-                    ClassId: 1,
+                    ClassId: '',
                     OrderToplimit: 1,
                     ConsumeHour: 1,
                 },
@@ -270,12 +277,15 @@
         mounted() {
             // 加载课程选项
             this.panelSelect();
-            if (this.$route.query.id == 0) {
+            if (parseInt(this.$route.query.id) == 0) {
                 //  深拷贝赋初始值
+                this.pageTitle = '新增课程表'
                 this.deepValue();
                 this.panel.name = '';
+                this.panel.week = '';
             } else {
                 // 读取赋值
+                this.pageTitle = '编辑课程表'
                 this.getTableQuery();
             }
         },
@@ -302,38 +312,30 @@
                     }
                 })
             },
-            confirmEditLessonTable() {
+            // 选择课程后,获取当前课程的建议上课人数和课时消耗
+            getRowTop(row) {
                 let that = this;
-                if (!this.panel.name) {
-                    this.$message.error('名称不能为空');
-                    return false
-                }
-                if (this.panel.name.length < 3) {
-                    this.$message.error('名称不能小于3个字符');
-                    return false
-                }
-                if (this.panel.name.length > 20) {
-                    this.$message.error('名称不能大于20个字符');
-                    return false
-                }
+                console.log(row);
                 let param = {
                     token: localStorage.token,
-                    incomingDate: nonTfmtDatetoLength(this.panel.week, 10),
-                    stbId: this.$route.query.id,
-                    name: this.panel.name,
+                    classId: row.ClassId,
                 };
                 let postdata = qs.stringify(param);
-                STTBasicEdit(postdata).then(res => {
+                ClassDetailOne(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
-                        let id = that.$route.query.id
-                        // 提交课程内容
-                        that.EditLessonTable(id);
+                        row.OrderToplimit = json.Rs.TopLimit;
+                        row.ConsumeHour = json.Rs.ConsumeHour;
                     } else {
                         that.$message.error(json.Memo);
                     }
                 })
             },
+            confirmEditLessonTable() {
+                let id = this.$route.query.id
+                // 提交课程内容,不再修改课程名称和时间的信息
+                this.EditLessonTable(id);
+            },
             // 删除
             delRow(scope) {
                 let delIndex = parseInt(scope.$index)
@@ -372,7 +374,7 @@
                     }
                 })
             },
-            // 修改课程
+            // 保存课程
             EditLessonTable(planId) {
                 let that = this;
                 // if (this.checkData()) {
@@ -396,10 +398,11 @@
                         thisRow.WeekDay = parseInt(i + 1);
                         thisRow.BeginStr = getHoursAndMin(thisRow.timeLong[0]);
                         thisRow.EndStr = getHoursAndMin(thisRow.timeLong[1]);
+                        thisRow.StdId = thisRow.StdId ? thisRow.StdId:0;
                         this.$delete(thisRow, 'Base');
                         this.$delete(thisRow, 'SpdId');
                         // this.$delete(thisRow, 'timeLong');
-                        planRs.push(thisRow)
+                        planRs.push(thisRow);
                     }
                 }
 
@@ -479,7 +482,6 @@
                 this.multipleSelection = val;
             },
             // 页面数据查询
-            // todo 获取默认时间
             getTableQuery() {
                 let that = this;
                 that.loading = true;
@@ -487,7 +489,11 @@
                     token: localStorage.token,
                     stbId: this.$route.query.id,//
                 };
+                // 只能读取,不能修改
+                this.panel.inputState = true;
                 this.panel.name = this.$route.query.name;
+
+
                 let postdata = qs.stringify(param);
                 STTDetailListQuery(postdata).then(res => {
                     let json = res;
@@ -680,6 +686,7 @@
         float: right;
         font-size: 12px;
     }
+
     .rowBottom button.pull-right {
         float: right;
     }

+ 33 - 16
pc/src/views/EditLessonTable.vue

@@ -60,7 +60,7 @@
                         align="center"
                 >
                     <template slot-scope="scope">
-                        <el-select v-model="scope.row.ClassId">
+                        <el-select v-model="scope.row.ClassId" @change="getRowTop(scope.row)" >
                             <el-option
                                     v-for="item in panel.options"
                                     :key="item.value"
@@ -85,7 +85,7 @@
                         align="center"
                 >
                     <template slot-scope="scope">
-                        <el-input-number v-model="scope.row.ConsumeHour" :min="1" :max="9999"
+                        <el-input-number v-model="scope.row.ConsumeHour" :min="0" :max="9999"
                                          label=""></el-input-number>
                     </template>
                 </el-table-column>
@@ -104,8 +104,11 @@
                 <el-button type="default" @click="$router.push('/lessonTable')">返回课程表模板</el-button>
 
                 <!--                ID为0是新建,不为0是修改-->
-                <el-button type="primary" class="pull-right" @click="confirmLessonTable" v-if="this.$route.query.id == 0">提交</el-button>
-                <el-button type="primary" class="pull-right" @click="confirmEditLessonTable" v-if="this.$route.query.id != 0">提交
+                <el-button type="primary" class="pull-right" @click="confirmLessonTable"
+                           v-if="this.$route.query.id == 0">提交
+                </el-button>
+                <el-button type="primary" class="pull-right" @click="confirmEditLessonTable"
+                           v-if="this.$route.query.id != 0">提交
                 </el-button>
                 <el-button type="primary" class="pull-right" @click="addRow">新增课表</el-button>
             </div>
@@ -141,6 +144,7 @@
         SttPlanDetailListQuery,
         SttPlanDetailBatchSave,
         SttPlanBasicEdit,
+        ClassDetailOne,
         testTable,
         testTableLong,
         testSelect, ClassListQuery
@@ -191,7 +195,7 @@
                     timeLong: [new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 9, 40)],
                     BeginStr: '08:30',
                     EndStr: '09:30',
-                    ClassId: 1,
+                    ClassId: '',
                     TopLimit: 1,
                     ConsumeHour: 0,
                 },
@@ -249,9 +253,27 @@
                 ClassListQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
-                        // that.dialogdata = json.Rs;
                         that.panel.options = turnClassResToOption(json.Rs)
-                        console.log( that.panel.options);
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 选择课程后,获取当前课程的建议上课人数和课时消耗
+            getRowTop(row) {
+                let that = this;
+                console.log(row);
+                let param = {
+                    token: localStorage.token,
+                    classId: row.ClassId,
+                };
+                let postdata = qs.stringify(param);
+                ClassDetailOne(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        row.TopLimit = json.Rs.TopLimit;
+                        row.ConsumeHour = json.Rs.ConsumeHour;
+                        console.log(row);
                     } else {
                         that.$message.error(json.Memo);
                     }
@@ -341,9 +363,9 @@
                     for (let j = 0; j < this.tabs[i].tableData.length; j++) {
                         thisRow = this.tabs[i].tableData[j];
                         thisRow.lessonIndex = parseInt(j);
-                        if(planId){
+                        if (planId) {
                             thisRow.PlanId = parseInt(planId);
-                        }else{
+                        } else {
                             thisRow.PlanId = parseInt(this.$route.query.id);
                         }
                         thisRow.WeekDay = parseInt(i + 1);
@@ -418,10 +440,6 @@
             },
             handleClick() {
             },
-            changeWechat(e, row) {
-                // todo
-                this.$message.success('当前用户微信已可见');
-            },
             // 增删会员课程
             lessonStudenChange() {
                 this.dialogVisible = true
@@ -454,12 +472,10 @@
                             // 遍历分配
                             Rs.map(function (item) {
                                 for (let i = 0; i < 7; i++) {
-                                    if (item.WeekDay == i+1) {
+                                    if (item.WeekDay == i + 1) {
                                         bt = new Date(2016, 9, 10, item.BeginStr.substr(0, 2), item.BeginStr.substr(3, 2));
                                         et = new Date(2016, 9, 10, item.EndStr.substr(0, 2), item.EndStr.substr(3, 2));
                                         item.timeLong = [bt, et];
-                                        // that.tabs[i - 1].tableData.push(item);
-                                        // tabs[0]是周一
                                         that.tabs[i].tableData.push(item);
 
                                     }
@@ -627,6 +643,7 @@
         float: right;
         font-size: 12px;
     }
+
     .rowBottom button.pull-right {
         float: right;
     }

+ 8 - 31
pc/src/views/Lesson.vue

@@ -68,12 +68,6 @@
                         sortable
                 >
                 </el-table-column>
-                <!--                <el-table-column-->
-                <!--                        prop="Recovered"-->
-                <!--                        label="课程会员人数"-->
-                <!--                        sortable-->
-                <!--                >-->
-                <!--                </el-table-column>-->
                 <el-table-column
                         prop="ClassSelf.WxVisible"
                         label="微信可见"
@@ -172,8 +166,8 @@
                         <el-form-item label="是否通用">
                             <el-switch
                                     v-model="form.allUse"
-                                    :active-value="1"
-                                    :inactive-value="0"
+                                    :active-value="0"
+                                    :inactive-value="1"
                                     active-color="#409EFF"
                                     inactive-color="#D9D9D9">
                             </el-switch>
@@ -395,7 +389,6 @@
             },
             confirmEditLesson() {
                 let that = this;
-
                 // checkNum
                 if (!that.form.ClassName) {
                     this.$message.error('错了哦,课程名称不能为空');
@@ -413,9 +406,11 @@
                 }
 
                 let teacherId = that.form.dialogValue ? that.form.dialogValue.toString() : '';
+                // 通用是0,非通用是shopid
+                let shopId = that.form.allUse == 0 ? 0:localStorage.ShopId;
                 let param = {
                     token: localStorage.token,
-                    shopId: localStorage.shopId,
+                    shopId: shopId,
                     classId: that.form.classId,
                     className: that.form.ClassName,
                     consumeHour: that.form.ConsumeHour,
@@ -457,6 +452,7 @@
                 this.form.dialogValue = [];
                 this.dialogLesson = true;
                 this.dialogTitle = '新增课程'
+                this.panelSelect();
             },
             // 改色
             changeColor(c, row) {
@@ -601,6 +597,7 @@
                     });
                     return false
                 }
+                this.panelSelect();
                 let row = this.multipleSelection[0];
                 let userArrary = [];
                 row.Userlist.map(function (item) {
@@ -610,7 +607,6 @@
                 this.dialogValue = userArrary;
                 this.dialogVisible = true
                 // 读取左侧会员列表
-
             },
             handleSelectionChange(val) {
                 this.multipleSelection = val;
@@ -638,6 +634,7 @@
                 this.form.dialogValue = row.teacherId;
                 this.form.classId = row.ClassId
                 this.form.ShopId = row.ShopId;
+                this.form.allUse = row.ShopId;
                 this.dialogLesson = true
                 this.dialogTitle = '编辑课程'
             },
@@ -653,9 +650,7 @@
             // 页面数据查询
             getTableQuery() {
                 let that = this;
-                // this.getGetChildRegionSelect(0, 1);
                 that.loading = true;
-                // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
                 let param = {
                     token: localStorage.token,
                     supregionid: 0,//
@@ -685,15 +680,6 @@
                     }
                 })
             },
-            // 导出excel
-            btnExpAll() {
-                let that = this;
-                let url = headapi + '?ctl=ajax&mod=czgl&act=czcx_excel';//获取
-                let bt = globaltime2String(that.panel.time1[0]);
-                let et = globaltime2String(that.panel.time1[1]);
-                let usercode = that.panel.usercode;
-                window.location = url + '&bt=' + bt + '&et=' + et + '&usercode=' + usercode;
-            },
             // 设置分页数据
             setPaginations() {
                 // 分页属性
@@ -731,20 +717,11 @@
                 that.start = index * that.draw;
                 that.getTableQuery();
             },
-            // 自动排序
-            sortChange(params) {
-                console.log(params)
-            },
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
                 return nonTfmtDate(column, 11);
             },
-            // 过滤金额
-            filterMoney(value, row, column) {
-                let that = this;
-                return parseFloat(column).toFixed(2);
-            },
         },
     }
 </script>

+ 6 - 18
pc/src/views/LessonTable.vue

@@ -81,7 +81,7 @@
                         <el-button type="text" @click="goEdit(scope.row)">编辑</el-button>
                         <!--                        <el-button type="text" @click="goEdit(scope.row)">详情</el-button>-->
                         <el-button type="text" @click="goEdit(scope.row)">预览本周</el-button>
-                        <el-button type="success" size="mini" v-if="scope.row.Status == 1"
+                        <el-button type="success" size="mini"
                                    @click="openLessonTable(scope.row)">发布
                         </el-button>
                         <!--                        <el-button type="warning" size="mini" v-if="scope.row.Status == 2" @click="unpubilc(scope.row)">-->
@@ -443,11 +443,6 @@
             handleSelectionChange(val) {
                 this.multipleSelection = val;
             },
-            // 查询按钮
-            query() {
-                // this.getTableQuery();
-                this.$message.success('查询完毕');
-            },
             // 页面数据查询
             getTableQuery() {
                 let that = this;
@@ -512,24 +507,17 @@
                 that.start = index * that.draw;
                 that.getTableQuery();
             },
-            // 自动排序
-            sortChange(params) {
-                console.log(params)
-            },
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
                 return nonTfmtDate(column, 11);
             },
-            // 过滤金额
-            filterMoney(value, row, column) {
-                let that = this;
-                return parseFloat(column).toFixed(2);
-            },
         },
         watch: {
-            $route() {
-                this.getTableQuery()
+            $route(to) {
+                if (to.name == 'lessonTable') {
+                    this.getTableQuery()
+                }
             },
         },
         components: {
@@ -589,7 +577,7 @@
         color: #fff;
         background: #3799FF;
         border-radius: 250px;
-        font-size: 18px;
+        font-size: 14px;
         overflow: hidden;
         display: block;
         margin: 0 auto;

+ 46 - 5
pc/src/views/Login.vue

@@ -18,9 +18,10 @@
                                 <el-input v-model="form.pwd" placeholder="密码" type="password"></el-input>
                             </el-form-item>
                             <el-form-item label="">
-                                <el-input v-model="form.valid" placeholder="验证码"></el-input>
+                                <el-input v-model="form.valid" placeholder="验证码"
+                                          @keyup.enter.native="onSubmit"></el-input>
                                 <img id="validImg" :src="valImgSrc" alt="" width="100px" height="30px"
-                                     title="看不清?刷一下试试!" @click="getGenVerifyPic" @keyup.enter="onSubmit">
+                                     title="看不清?刷一下试试!" @click="getGenVerifyPic">
                             </el-form-item>
                             <br>
                             <br>
@@ -40,12 +41,13 @@
     import {
         SignIn,
         GenVerifyPic,
-        testSelect
-    } from '../api/getApiRes.js'
+        ManagerSelfQuery
+    } from "../api/getApiRes";
 
     let qs = require('qs');
     import Global from '../Global.js'
 
+
     export default {
         data() {
             return {
@@ -58,6 +60,8 @@
                 valImgSrc: '',
                 valImgId: '',
                 overtime: '',
+                userLevel: '',
+                userLevelText: '',
             }
         },
         mounted() {
@@ -112,6 +116,43 @@
                 if (!globalValid(uservalid, 3, 5, '验证码', that)) return;
                 this.loginInfo();
             },
+            getManagerSelfQuery() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                ManagerSelfQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.userLevelText = json.Rs.Role.Name;
+                        // 1 会员 2 系统 3 店铺
+                        that.userLevel = json.Rs.Role.Id;
+                        localStorage.shopId = json.Rs.ShopId;
+                        localStorage.ShopId = json.Rs.ShopId;
+
+                        switch (parseInt(that.userLevel)) {
+                            case 1:
+                                that.$router.push({path: '/'});
+                                break;
+                            case 2:
+                                that.$router.push({path: '/adminManage'});
+                                break;
+                            case 3:
+                                that.$router.push({path: '/'});
+                                break;
+
+                        }
+                    } else {
+                        if (json.Code == 1010) {
+                            that.$message.error(json.Memo);
+                            that.$router.push({path: '/login', query: {status: 1}});
+                            return false
+                        }
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             // pwd登陆
             loginInfo: function () {
                 const that = this;
@@ -140,7 +181,7 @@
                         that.res = res.Rs;
                         localStorage.userName = username;
                         localStorage.token = res.Rs.token;
-                        that.$router.push({path: '/'});
+                        this.getManagerSelfQuery();
                     } else {
                         if (res.Code == 10005) {
                             that.$refs.userpwd.value = '';

+ 54 - 67
pc/src/views/Main.vue

@@ -23,17 +23,17 @@
                     <li @click="goPage('record')">
                         <img src="../assets/img/main/appoint.png" height="54" width="54"/>
                         <div class="liRight">
-                            <h5>预约人数</h5>
-                            <span>2239</span>
+                            <h5>今日预约人数</h5>
+                            <span>{{TodayOrderNum}}</span>
                         </div>
                         <div class="btLine">
                             <em class="emlt">
                                 <i class="el-icon-caret-top"></i>
-                                今日预约 36
+                                昨日预约 {{YestodayOrderNum}}
                             </em>
                             <em class="emrt">
                                 <i class="el-icon-caret-top"></i>
-                                较昨日新增 +6
+                                较昨日新增 {{TodayIncreaseNum}}
                             </em>
                         </div>
                     </li>
@@ -41,12 +41,12 @@
                         <img src="../assets/img/main/lesson.png" height="54" width="54"/>
                         <div class="liRight">
                             <h5>课程数量</h5>
-                            <span>2239</span>
+                            <span>{{ClassNum}}</span>
                         </div>
                         <div class="btLine">
                             <em class="emlt">
                                 <i class="el-icon-caret-top"></i>
-                                已预约课程 36
+                                已预约课程 {{TodayOrderSttNum}}
                             </em>
                         </div>
                     </li>
@@ -65,12 +65,10 @@
                         </div>
                         <div class="context">
                             <div class="ctl">
-                                <span>上课时间:     {{c.BeginStr}}</span>
-                                <span>预约人数: {{c.OrderNum}} 人</span>
+                                <span>上课时间:{{c.BeginStr}} - {{c.EndStr}}</span>
+                                <span>预约人数:{{c.OrderNum}} 人</span>
                             </div>
-                            <br>
-                            <br>
-                            <!--                            <el-button type="primary" plain @click="goPage('finish')">下课</el-button>-->
+                            <em>{{c.BeginTime|parseDate}}</em>
                             <el-button type="primary" plain @click="checkClassOverPrepare(c)">下课</el-button>
                         </div>
                     </li>
@@ -137,9 +135,6 @@
 
 <script>
     import {
-        testTable,
-        TodayClassOrderQuery,
-        TodayVipOrderQuery,
         ClassPreFinishListQuery,
         WaitingBeginClassList,
         ClassOngoingList,
@@ -163,21 +158,25 @@
                 TodayVipOrder: [],
                 AllCount: 0,
                 YesterdayCount: 0,
+                YestodayOrderNum: 0,
                 NowCount: 0,
                 CountAdd: 0,
+                TodayIncreaseNum: 0,
+                TodayOrderNum: 0,
+                ClassNum: 0,
+                TodayOrderSttNum: 0,
             }
         },
         mounted() {
             let that = this;
 
             // 下课管理
-            // this.getTodayClassOrderQuery();
-            // this.getTodayVipOrderQuery();
             this.getVipUserStatistics();
             this.getClassStatistics();
             this.ClassQuery();
             this.getVipUserOrderQuery();
-            // this.getOrderStatistics();
+            // 预约统计
+            this.getOrderStatistics();
             this.getWaitingBeginClassList();
             this.timer = setInterval(() => {
                 that.getVipUserOrderQuery();
@@ -208,6 +207,11 @@
                         that.NowCount = json.Rs.NowCount;
                         that.CountAdd = json.Rs.CountAdd;
                     } else {
+                        if(json.Code == 1010){
+                            that.$message.error(json.Memo);
+                            that.$router.push({path: '/login', query: {status: 1}});
+                            return false
+                        }
                         that.$message.error(json.Memo);
                     }
                 })
@@ -219,13 +223,11 @@
                     token: localStorage.token,
                 };
                 let postdata = qs.stringify(param);
-                VipUserStatistics(postdata).then(res => {
+                ClassStatistics(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
-                        that.AllCount = json.Rs.AllCount;
-                        that.YesterdayCount = json.Rs.YesterdayCount;
-                        that.NowCount = json.Rs.NowCount;
-                        that.CountAdd = json.Rs.CountAdd;
+                        that.ClassNum = json.Rs.ClassNum;
+                        that.TodayOrderSttNum = json.Rs.TodayOrderSttNum;
                     } else {
                         that.$message.error(json.Memo);
                     }
@@ -243,7 +245,9 @@
                     if (json.Code == 0) {
                         that.loading = false;
                         if (json.Rs) {
-                            console.log(json);
+                            that.TodayIncreaseNum = json.Rs.TodayIncreaseNum;
+                            that.TodayOrderNum = json.Rs.TodayOrderNum;
+                            that.YestodayOrderNum = json.Rs.YestodayOrderNum;
                         }
                     } else {
                         that.$message.error(json.Memo);
@@ -293,44 +297,6 @@
                     }
                 })
             },
-            getTodayClassOrderQuery() {
-                let that = this;
-                that.loading = true;
-                let param = {
-                    token: localStorage.token,
-                };
-                let postdata = qs.stringify(param);
-                TodayClassOrderQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.loading = false;
-                        if (json.Rs) {
-                            that.TodayClassOrder = json.Rs;
-                        }
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            getTodayVipOrderQuery() {
-                let that = this;
-                that.loading = true;
-                let param = {
-                    token: localStorage.token,
-                };
-                let postdata = qs.stringify(param);
-                TodayVipOrderQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.loading = false;
-                        if (json.Rs) {
-                            that.TodayVipOrder = json.Rs;
-                        }
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
             // 下课管理
             ClassQuery() {
                 let that = this;
@@ -375,23 +341,30 @@
                 })
             }
         },
+        filters: {
+            parseDate: function (value) {
+                if(!value){
+                    return false
+                }else{
+                    let res = nonTfmtDatetoLength(value,10).substr(5,10)
+                    return res;
+                }
+            },
+        },
         watch: {
             $route(to) {
                 if (to.name == 'Main') {
-                    // this.getTodayClassOrderQuery();
-                    // this.getTodayVipOrderQuery();
                     this.getVipUserStatistics();
                     this.getClassStatistics();
                     this.ClassQuery();
                     this.getVipUserOrderQuery();
-                    // this.getOrderStatistics();
+                    this.getOrderStatistics();
                     this.getWaitingBeginClassList();
-                }else{
+                } else {
                     clearInterval(this.timer);//页面销毁时清除定时器
                 }
             },
         },
-        components: {}
     }
 </script>
 
@@ -583,12 +556,24 @@
         border-top: none;
         padding-top: 16px;
         padding-bottom: 16px;
+        border-bottom-left-radius: 7px;
+        border-bottom-right-radius: 7px;
+    }
+    .finish .context em {
+        width: 85px;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        height: 40px;
+        line-height: 30px;
+        color: #BDBDBD;
     }
 
     .context .ctl {
-        width: 231px;
+        width: 211px;
         float: left;
         padding-left: 16px;
+        margin-right: 20px;
     }
 
     .ctl span {
@@ -601,6 +586,8 @@
         background-color: #F8F8F8;
         color: #404040;
         font-size: 14px;
+        text-align: left;
+        padding-left: 20px;
         margin-bottom: 15px;
     }
 

+ 20 - 30
pc/src/views/Member.vue

@@ -158,14 +158,15 @@
                 <el-table-column
                         prop="UserInfo.Status"
                         label="操作"
+                        width="160px"
                 >
                     <template slot-scope="scope">
-                        <el-button type="text" @click="editMember(scope.row)">编辑</el-button>
-                        <el-button type="danger" v-if="scope.row.UserInfo.Status == 1" size="mini"
+                        <el-button class="btn" type="default" size="mini" @click="editMember(scope.row)">编辑</el-button>
+                        <el-button class="btn" type="danger" v-if="scope.row.UserInfo.Status == 1" size="mini"
                                    @click="pauseRow(scope.row)">
                             禁用
                         </el-button>
-                        <el-button type="success" v-if="scope.row.UserInfo.Status == 8" size="mini"
+                        <el-button class="btn" type="success" v-if="scope.row.UserInfo.Status == 8" size="mini"
                                    @click="runRow(scope.row)">
                             启用
                         </el-button>
@@ -238,6 +239,8 @@
                 <h5>
                     用户:
                     <em class="blue">【 {{form.rowName}}】</em>
+                    <br>
+                    <br>
                     <span v-if="dialogLesson">当前课时</span>
                     <span v-if="dialogGift">当前赠送课时</span>
                     <span v-if="dialogExpTime">当前到期时间</span>
@@ -369,7 +372,6 @@
             editMember(row) {
                 let that = this;
                 this.clearForm();
-
                 this.form.phone = row.UserInfo.Phone;
                 this.form.name = row.UserInfo.Name;
                 this.form.memo = row.UserInfo.Memo;
@@ -482,7 +484,7 @@
                     return false
                 }
                 let row = this.multipleSelection[0];
-                if (parseInt(row.vipType) == 2) {
+                if (parseInt(row.UserInfo.VipType) == 2) {
                     this.$message({
                         showClose: true,
                         message: '错了哦,充值会员不能调整有效期',
@@ -490,7 +492,6 @@
                     });
                     return false
                 }
-                this.form.expTime = row.expTime;
                 this.form.rowName = row.UserInfo.Name;
                 this.form.userId = row.UserInfo.Id;
                 this.form.expTime = row.UserInfo.ExpTime
@@ -555,6 +556,8 @@
             lessonStudenChange() {
                 let that = this;
                 this.allDialogClose();
+                // 重载课程列表选项
+                this.panelSelect();
                 if (!this.multipleSelection.length) {
                     this.$message({
                         showClose: true,
@@ -806,7 +809,7 @@
                     }
                 })
             },
-            // 加载选项
+            // 加载课程列表选项
             panelSelect() {
                 let that = this;
                 let param = {
@@ -820,7 +823,6 @@
                 ClassListQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
-                        // that.dialogdata = json.Rs;
                         that.form.dialogdata = turnClassResToOption(json.Rs);
                     } else {
                         that.$message.error(json.Memo);
@@ -830,6 +832,7 @@
             // 新增会员
             addMember() {
                 this.clearForm();
+                this.panelSelect();
                 this.dialogMemberVisible = true
                 this.btnType = 0;
                 this.form.btnType = 0;
@@ -891,7 +894,6 @@
                     });
                 });
             },
-
             handleSelectionChange(val) {
                 this.multipleSelection = val;
             },
@@ -909,9 +911,7 @@
             // 页面数据查询
             getTableQuery() {
                 let that = this;
-                // this.getGetChildRegionSelect(0, 1);
                 that.loading = true;
-                // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
                 let param = {
                     token: localStorage.token,
                     vipType: that.panel.vipType,//
@@ -941,15 +941,6 @@
                     }
                 })
             },
-            // 导出excel
-            btnExpAll() {
-                let that = this;
-                let url = headapi + '?ctl=ajax&mod=czgl&act=czcx_excel';//获取
-                let bt = globaltime2String(that.panel.time1[0]);
-                let et = globaltime2String(that.panel.time1[1]);
-                let usercode = that.panel.usercode;
-                window.location = url + '&bt=' + bt + '&et=' + et + '&usercode=' + usercode;
-            },
             // 设置分页数据
             setPaginations() {
                 // 分页属性
@@ -988,19 +979,14 @@
                 that.start = index * that.draw;
                 that.getTableQuery();
             },
-            // 自动排序
-            sortChange(params) {
-                console.log(params)
-            },
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
-                return nonTfmtDate(column, 11);
-            },
-            // 过滤金额
-            filterMoney(value, row, column) {
-                let that = this;
-                return parseFloat(column).toFixed(2);
+                if(column == "0001-01-01T08:05:43+08:05"){
+                    return '无有效期';
+                }else{
+                    return nonTfmtDate(column, 11);
+                }
             },
         },
     }
@@ -1109,4 +1095,8 @@
         color: #545454;
         font-size: 12px;
     }
+    .btn {
+        float: left!important;
+        margin-right: 5px;
+    }
 </style>

+ 24 - 32
pc/src/views/appoint.vue

@@ -122,9 +122,9 @@
                                 </el-col>
                                 <el-col :span="5">
                                     <em>预约课程:</em>
-                                    <el-select v-model="panel.endType">
+                                    <el-select v-model="panel.classId">
                                         <el-option
-                                                v-for="item in panel.endTypeOptions"
+                                                v-for="item in panel.classOptions"
                                                 :key="item.value"
                                                 :label="item.label"
                                                 :value="item.value">
@@ -291,7 +291,7 @@
         OrderCancelByManager,
         STTDetailWxOrderEdit,
         testTable,
-        testSelect, WaitingBeginClassList, ShopWxStatusEdit
+        testSelect, WaitingBeginClassList, ShopWxStatusEdit, ClassListQuery
     } from "../api/getApiRes";
 
     let qs = require('qs');
@@ -319,6 +319,7 @@
                 panel: {
                     name: '',
                     phone: '',
+                    classId: '0',
                     usercode: '',
                     username: '',
                     compname: '',
@@ -385,6 +386,7 @@
         mounted() {
             this.vipSelect();
             this.ClassSelect();
+            this.panelSelect();
             // this.getCurrWeekDays();
             this.getFurtherDays();
         },
@@ -427,6 +429,22 @@
                     });
                 });
             },
+            panelSelect(){
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                ClassListQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.panel.classOptions = turnClassResToOption(json.Rs);
+                        that.panel.classOptions.unshift({value:'0',label:'全部'})
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             vipSelect() {
                 let that = this;
                 let param = {
@@ -530,8 +548,7 @@
                 }).then(() => {
                     let param = {
                         token: localStorage.token,
-                        Id: row.Id,
-                        status: 0,
+                        orderId : row.OrderId,
                     };
                     let postdata = qs.stringify(param);
                     OrderCancelByManager(postdata).then(res => {
@@ -968,22 +985,6 @@
                     }
                 })
             },
-            // 加载选项
-            panelSelect() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                };
-                let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.form.dialogdata = json.Rs;
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
             // 新增教练
             addMember() {
                 this.clearForm();
@@ -1072,7 +1073,7 @@
             },
             // 查询按钮
             query() {
-                // this.getTableQuery();
+                this.getTableQuery2();
                 this.$message.success('查询完毕');
             },
             clearForm() {
@@ -1117,7 +1118,7 @@
                 let dayIndex = parseInt(this.choiceDate);
                 let param = {
                     token: localStorage.token,
-                    classId: 0,//
+                    classId: this.panel.classId,//
                     stdId: 0,//
                     name: this.panel.name,//
                     phone: this.panel.phone,//
@@ -1144,15 +1145,6 @@
                     }
                 })
             },
-            // 导出excel
-            btnExpAll() {
-                let that = this;
-                let url = headapi + '?ctl=ajax&mod=czgl&act=czcx_excel';//获取
-                let bt = globaltime2String(that.panel.time1[0]);
-                let et = globaltime2String(that.panel.time1[1]);
-                let usercode = that.panel.usercode;
-                window.location = url + '&bt=' + bt + '&et=' + et + '&usercode=' + usercode;
-            },
             // 设置分页数据
             setPaginations() {
                 // 分页属性

+ 0 - 234
pc/src/views/coach.vue

@@ -54,13 +54,6 @@
                         sortable
                 >
                 </el-table-column>
-                <el-table-column
-                        prop="SumHour"
-                        label="上课总时长(h)"
-                        width="180"
-                        sortable
-                >
-                </el-table-column>
                 <el-table-column
                         prop="TeacherId"
                         label="操作"
@@ -193,18 +186,14 @@
         methods: {
             // 编辑
             editMember(row) {
-                let that = this;
                 this.clearForm();
-
                 this.form.name = row.Name;
                 this.form.phone = row.Phone;
                 this.form.shopId = row.ShopId;
                 this.form.teacherId = row.TeacherId;
                 this.form.btnType = 1;
-
                 this.dialogMemberVisible = true
                 this.dialogTitle = '编辑教练'
-
             },
             // 禁用
             pauseRow(row) {
@@ -284,119 +273,6 @@
                 this.dialogExpTime = false;
                 this.dialogLessonTable = false;
             },
-            // 用户禁用 todo
-            // 用户启用 todo
-            // 有效期调整
-            ExpTimeChange() {
-                // 仅针对年费用户,使用日期格式
-                this.allDialogClose();
-                if (!this.multipleSelection.length) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,需要先选中至少一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                if (this.multipleSelection.length != 1) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,只能选中一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                let row = this.multipleSelection[0];
-                if (parseInt(row.vipType) == 2) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,充值教练不能调整有效期',
-                        type: 'error'
-                    });
-                    return false
-                }
-                this.form.expTime = row.expTime;
-                this.form.rowName = row.name;
-                this.dialogVisible = true;
-                this.dialogExpTime = true;
-            },
-            // 课时调整
-            lessonChange() {
-                this.allDialogClose();
-                if (!this.multipleSelection.length) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,需要先选中至少一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                if (this.multipleSelection.length != 1) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,只能选中一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                let row = this.multipleSelection[0];
-                this.form.lesson = row.Recovered;
-                this.form.rowName = row.name;
-                this.dialogVisible = true;
-                this.dialogLesson = true;
-
-            },
-            // 赠送调整
-            giftChange() {
-                this.allDialogClose();
-                if (!this.multipleSelection.length) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,需要先选中至少一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                if (this.multipleSelection.length != 1) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,只能选中一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                let row = this.multipleSelection[0];
-                this.form.gift = row.Recovered;
-                this.form.rowName = row.name;
-                this.dialogVisible = true;
-                this.dialogGift = true;
-
-            },
-            // 增删教练课程
-            lessonStudenChange() {
-                this.allDialogClose();
-                if (!this.multipleSelection.length) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,需要先选中至少一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                if (this.multipleSelection.length != 1) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,只能选中一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                let row = this.multipleSelection[0];
-                this.form.gift = row.Recovered;
-                this.form.rowName = row.name;
-                this.dialogVisible = true;
-                this.dialogLessonTable = true;
-            },
             // 确认提交新增教练
             confirmMember() {
                 let that = this;
@@ -514,106 +390,6 @@
                     }
                 })
             },
-            // 确认提交赠送
-            confirmGift() {
-                let that = this;
-                // checkNum
-
-                let param = {
-                    token: localStorage.token,
-                    userCode: that.form.userCode,
-                    gift: that.form.gift,
-                };
-                let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '赠送课时调整成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            // 确认提交有效期
-            confirmExpTime() {
-                let that = this;
-                // checkNum
-
-                let param = {
-                    token: localStorage.token,
-                    userCode: that.form.userCode,
-                    expTime: that.form.expTime,
-                };
-                let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '赠送课时调整成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            // 确认提交教练课程
-            confirmLessonTable() {
-                let that = this;
-                // checkNum
-
-                let param = {
-                    token: localStorage.token,
-                    userCode: that.form.userCode,
-                    dialogValue: that.form.dialogValue,
-                };
-                let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '教练课程调整成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            // 加载选项
-            panelSelect() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                };
-                let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.form.dialogdata = json.Rs;
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
             // 新增教练
             addMember() {
                 this.clearForm();
@@ -764,16 +540,6 @@
             sortChange(params) {
                 console.log(params)
             },
-            // 过滤时间
-            filterFmtDate(value, row, column) {
-                let that = this;
-                return nonTfmtDate(column, 11);
-            },
-            // 过滤金额
-            filterMoney(value, row, column) {
-                let that = this;
-                return parseFloat(column).toFixed(2);
-            },
         },
     }
 </script>

+ 28 - 1
pc/src/views/cost.vue

@@ -50,6 +50,7 @@
                     element-loading-background="rgba(0, 0, 0, 0.8)"
                     class=""
                     show-summary
+                    :summary-method="getSummaries"
                     @selection-change="handleSelectionChange"
 
             >
@@ -314,7 +315,6 @@
                 this.form.shopId = row.Id;
                 this.dialogMemberVisible = true
                 this.dialogTitle = '编辑会员'
-
             },
             // 禁用
             pauseRow(row) {
@@ -386,6 +386,33 @@
                     });
                 });
             },
+            // 表格合计
+            getSummaries(param){
+                const {columns, data} = param;
+                const sums = [];
+                columns.forEach((column, index) => {
+                    if (index === 0) {
+                        sums[index] = '合计';
+                        return;
+                    }
+                    const values = data.map(item => Number(item[column.property]));
+                    if (!values.every(value => isNaN(value)) && index != 0 && index != 1 && index != 2) {
+                        sums[index] = values.reduce((prev, curr) => {
+                            const value = Number(curr);
+                            if (!isNaN(value)) {
+                                return prev + curr;
+                            } else {
+                                return prev;
+                            }
+                        }, 0);
+                        sums[index] += '';
+                        sums[index] = parseInt(sums[index]);
+                    } else {
+                        sums[index] = '';
+                    }
+                });
+                return sums;
+            },
             // 关闭所有
             allDialogClose() {
                 this.dialogVisible = false;

+ 6 - 13
pc/src/views/finish.vue

@@ -188,11 +188,6 @@
             handleSelectionChange(val) {
                 this.multipleSelection = val;
             },
-            // 查询按钮
-            query() {
-                // this.getTableQuery();
-                this.$message.success('查询完毕');
-            },
             // 页面数据查询
             getTableQuery() {
                 let that = this;
@@ -261,19 +256,17 @@
                 that.start = index * that.draw;
                 that.getTableQuery();
             },
-            // 自动排序
-            sortChange(params) {
-                console.log(params)
-            },
             // 过滤时间
             filterFmtDate(value, row, column) {
                 let that = this;
                 return nonTfmtDate(column, 11);
             },
-            // 过滤金额
-            filterMoney(value, row, column) {
-                let that = this;
-                return parseFloat(column).toFixed(2);
+        },
+        watch: {
+            $route(to) {
+                if (to.name == 'finish') {
+                    this.getTableQuery();
+                }
             },
         },
     }

+ 58 - 330
pc/src/views/finishDetail.vue

@@ -2,7 +2,7 @@
     <div class="context">
         <div class="panel">
             <h5>下课详情
-                <span class="current">{{form.BeginTime}} {{form.ClassName}} </span>
+                <span class="current">{{BeginTime}} {{ClassName}} </span>
             </h5>
             <div class="panel-body">
                 <div class="panel_control">
@@ -35,7 +35,6 @@
                     element-loading-background="rgba(0, 0, 0, 0.8)"
                     class=""
                     @selection-change="handleSelectionChange"
-
             >
                 <el-table-column
                         type="index"
@@ -69,18 +68,18 @@
                         label="操作"
                 >
                     <template slot-scope="scope">
-                        <el-button type="danger" round v-if="scope.row.Status == 3" size="mini"
-                                   @click="pauseRow(scope.row,1)">
-                            撤销
-                        </el-button>
                         <el-button type="primary" round v-if="scope.row.Status == 1" size="mini"
                                    @click="pauseRow(scope.row,2)">
                             预约未到
                         </el-button>
-                        <!--                        <el-button type="warning" round v-if="scope.row.Status == 2" size="mini"-->
-                        <!--                                   @click="runRow(scope.row)">-->
-                        <!--                            删除-->
-                        <!--                        </el-button>-->
+                        <el-button type="warning" round v-if="scope.row.Status == 2" size="mini"
+                                   @click="pauseRow(scope.row,1)">
+                            撤销
+                        </el-button>
+                        <el-button type="danger" round v-if="scope.row.Status == 3" size="mini"
+                                   @click="getClassOverDetailDel(scope.row)">
+                            删除
+                        </el-button>
                     </template>
                 </el-table-column>
             </el-table>
@@ -134,7 +133,9 @@
         ClassOverDetailStatusEdit,
         ClassOverConfirm,
         testTable,
-        testSelect, TeacherListQuery
+        testSelect,
+        TeacherListQuery,
+        ClassOverDetailDel
     } from "../api/getApiRes";
 
     let qs = require('qs');
@@ -151,6 +152,8 @@
                 current: getNowDate(),
                 dialogValue: [],
                 dialogCoachValue: [],
+                BeginTime: '',
+                ClassName: '',
                 // panel 配置项目
                 panel: {
                     name: '',
@@ -217,8 +220,8 @@
             }
         },
         mounted() {
-            this.form.BeginTime = nonTfmtDatetoLength(this.$route.query.BeginTime, 16);
-            this.form.ClassName = this.$route.query.ClassName;
+            this.BeginTime = nonTfmtDatetoLength(this.$route.query.BeginTime, 16);
+            this.ClassName = this.$route.query.ClassName;
             this.getTableQuery();
             // 获取教练选项
             this.getCoachOption();
@@ -260,6 +263,40 @@
                     }
                 })
             },
+            // 下课记录详情删除
+            getClassOverDetailDel(row) {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    stdId: row.StdId,
+                    cfId: row.CfId,
+                };
+                this.$confirm('是否删除用户' + row.Name + '的下课记录?', '禁用操作', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    let postdata = qs.stringify(param);
+                    ClassOverDetailDel(postdata).then(res => {
+                        let json = res;
+                        if (json.Code == 0) {
+                            that.$message({
+                                showClose: true,
+                                message: '当前学生上课记录已删除!',
+                                type: 'success'
+                            });
+                            that.getTableQuery();
+                        } else {
+                            that.$message.error(json.Memo);
+                        }
+                    })
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消删除'
+                    });
+                });
+            },
             // 编辑
             editMember(row) {
                 let that = this;
@@ -314,41 +351,6 @@
                 //     });
                 // });
             },
-            // 启用
-            runRow(row) {
-                let that = this;
-                this.$confirm('是否启用用户' + row.name + '?', '启用操作', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    let param = {
-                        token: localStorage.token,
-                        Id: row.Id,
-                        status: 1,
-                    };
-                    let postdata = qs.stringify(param);
-                    testTable(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: row.name + '启用成功!',
-                                type: 'success'
-                            });
-                            // table 重载
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo);
-                        }
-                    })
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消启用'
-                    });
-                });
-            },
             // 关闭所有
             allDialogClose() {
                 this.dialogVisible = false;
@@ -357,117 +359,6 @@
                 this.dialogExpTime = false;
                 this.dialogLessonTable = false;
             },
-            // 有效期调整
-            ExpTimeChange() {
-                // 仅针对年费用户,使用日期格式
-                this.allDialogClose();
-                if (!this.multipleSelection.length) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,需要先选中至少一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                if (this.multipleSelection.length != 1) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,只能选中一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                let row = this.multipleSelection[0];
-                if (parseInt(row.vipType) == 2) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,充值会员不能调整有效期',
-                        type: 'error'
-                    });
-                    return false
-                }
-                this.form.expTime = row.expTime;
-                this.form.rowName = row.name;
-                this.dialogVisible = true;
-                this.dialogExpTime = true;
-            },
-            // 课时调整
-            lessonChange() {
-                this.allDialogClose();
-                if (!this.multipleSelection.length) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,需要先选中至少一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                if (this.multipleSelection.length != 1) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,只能选中一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                let row = this.multipleSelection[0];
-                this.form.lesson = row.Recovered;
-                this.form.rowName = row.name;
-                this.dialogVisible = true;
-                this.dialogLesson = true;
-
-            },
-            // 赠送调整
-            giftChange() {
-                this.allDialogClose();
-                if (!this.multipleSelection.length) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,需要先选中至少一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                if (this.multipleSelection.length != 1) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,只能选中一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                let row = this.multipleSelection[0];
-                this.form.gift = row.Recovered;
-                this.form.rowName = row.name;
-                this.dialogVisible = true;
-                this.dialogGift = true;
-
-            },
-            // 增删会员课程
-            lessonStudenChange() {
-                this.allDialogClose();
-                if (!this.multipleSelection.length) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,需要先选中至少一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                if (this.multipleSelection.length != 1) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,只能选中一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                let row = this.multipleSelection[0];
-                this.form.gift = row.Recovered;
-                this.form.rowName = row.name;
-                this.dialogVisible = true;
-                this.dialogLessonTable = true;
-            },
             // 确认提交下课会员
             confirmMember() {
                 let that = this;
@@ -510,7 +401,7 @@
                 };
                 let postdata = qs.stringify(param);
                 // 下课记录详情添加
-                ClassOverDetailAdd(postdata).then(res => {
+                ClassOverConfirm(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         // 关闭弹窗
@@ -522,63 +413,9 @@
                             message: '当前课程已确认下课!',
                             type: 'success'
                         });
-                        that.getTableQuery()
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            confirmEditMember() {
-                console.log(123);
-                let that = this;
-                // checkNum
-                if (!that.form.userCode) {
-                    this.$message.error('错了哦,手机号不能为空');
-                    return false
-                }
-                console.log(that.form.userCode);
-                if (!globalCheckPhone(that.form.userCode)) {
-                    this.$message.error('错了哦,手机号格式不正确');
-                    return false
-                }
-                if (!that.form.name) {
-                    this.$message.error('错了哦,会员名不能为空');
-                    return false
-                }
-                if (that.form.name.length > 8) {
-                    this.$message.error('错了哦,会员名字数超过8个字');
-                    return false
-                }
-                if (that.form.memo) {
-                    if (that.form.memo.length > 200) {
-                        this.$message.error('错了哦,备注字数超过200个字');
-                        return false
-                    }
-                }
-                let param = {
-                    token: localStorage.token,
-                    userCode: that.form.userCode,
-                    name: that.form.name,
-                    memberType: that.form.memberType,
-                    lesson: that.form.lesson,
-                    gift: that.form.gift,
-                    memo: that.form.memo,
-                    dialogValue: that.dialogValue,
-                };
-                let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogFinishVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '会员信息编辑成功!',
-                            type: 'success'
-                        });
-
+                        // 返回下课列表
+                        // that.$router.push({path: '/finish'});
+                        this.$router.go(-1);
                     } else {
                         that.$message.error(json.Memo);
                     }
@@ -612,112 +449,12 @@
                     }
                 })
             },
-            // 确认提交赠送
-            confirmGift() {
-                let that = this;
-                // checkNum
-
-                let param = {
-                    token: localStorage.token,
-                    userCode: that.form.userCode,
-                    gift: that.form.gift,
-                };
-                let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '赠送课时调整成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            // 确认提交有效期
-            confirmExpTime() {
-                let that = this;
-                // checkNum
-
-                let param = {
-                    token: localStorage.token,
-                    userCode: that.form.userCode,
-                    expTime: that.form.expTime,
-                };
-                let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '赠送课时调整成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            // 确认提交会员课程
-            confirmLessonTable() {
-                let that = this;
-                // checkNum
-
-                let param = {
-                    token: localStorage.token,
-                    userCode: that.form.userCode,
-                    dialogValue: that.form.dialogValue,
-                };
-                let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '会员课程调整成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            // 加载选项
-            panelSelect() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                };
-                let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.form.coachOptions = json.Rs;
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
             // 新增会员
             addFinish() {
                 this.clearForm();
                 this.dialogFinishVisible = true
                 this.btnType = 0;
-                this.dialogTitle = '新增会员'
+                this.dialogTitle = '确认下课'
             },
             addFinishMember() {
                 this.clearForm();
@@ -871,22 +608,13 @@
             sortChange(params) {
                 console.log(params)
             },
-            // 过滤时间
-            filterFmtDate(value, row, column) {
-                let that = this;
-                return nonTfmtDate(column, 11);
-            },
-            // 过滤金额
-            filterMoney(value, row, column) {
-                let that = this;
-                return parseFloat(column).toFixed(2);
-            },
         },
         watch: {
             $route(to) {
                 if (to.name == 'finishDetail') {
-                    this.form.BeginTime = nonTfmtDatetoLength(this.$route.query.BeginTime, 16);
-                    this.form.ClassName = this.$route.query.ClassName;
+                    this.BeginTime = nonTfmtDatetoLength(this.$route.query.BeginTime, 16);
+                    this.ClassName = this.$route.query.ClassName;
+                    console.log(this.form.ClassName);
                 }
             },
         },

+ 64 - 7
pc/src/views/lessonManage.vue

@@ -7,7 +7,7 @@
             <el-button type="primary" @click="addLessonTable">新增课程表</el-button>
             <el-button type="" @click="copy">复制</el-button>
             <el-button type="" @click="delList">删除</el-button>
-            <el-button type="" @click="  query">查询</el-button>
+            <el-button type="" @click="query">查询</el-button>
         </div>
         <div class="table">
             <el-table
@@ -84,8 +84,9 @@
                         label="操作"
                 >
                     <template slot-scope="scope">
-                        <el-button type="text" @click="goEdit(scope.row)">编辑</el-button>
-                        <el-button type="text" @click="goEdit(scope.row)">预览本周</el-button>
+                        <el-button type="text" @click="editName(scope.row)">编辑名称</el-button>
+                        <el-button type="text" @click="goEdit(scope.row)">修改课程</el-button>
+                        <el-button type="text" @click="seeWeek(scope.row)">预览本周</el-button>
                     </template>
                 </el-table-column>
 
@@ -160,6 +161,17 @@
                 <el-button @click="dialogCopyVisible = false" size="small">取消</el-button>
             </div>
         </el-dialog>
+        <el-dialog title="编辑名称" :visible.sync="dialogNameVisible" width="640px">
+            <el-form ref="form" :model="form" label-width="160px">
+                <el-form-item label="课程表名称">
+                    <el-input v-model="form.name"></el-input>
+                </el-form-item>
+            </el-form>
+            <div class="dialogFooter">
+                <el-button type="primary" size="small" @click="confirmName">确定</el-button>
+                <el-button @click="dialogNameVisible = false" size="small">取消</el-button>
+            </div>
+        </el-dialog>
     </div>
 </template>
 
@@ -170,7 +182,7 @@
         STTBasicOfflineEdit,
         STTBasicStatusEdit,
         SchoolTimeTableCopy,
-        testTable,
+        STTBasicEdit,
         testSelect
     } from "../api/getApiRes";
 
@@ -180,6 +192,7 @@
             return {
                 dialogVisible: false,
                 dialogCopyVisible: false,
+                dialogNameVisible: false,
                 dialogdata: [],
                 dialogValue: [],
                 // panel 配置项目
@@ -212,6 +225,16 @@
             this.getTableQuery();
         },
         methods: {
+            // 编辑名称
+            editName(row) {
+                this.form.name = row.Name;
+                this.form.stbId = row.StbId;
+                this.dialogNameVisible = true;
+            },
+            // 预览本周
+            seeWeek() {
+                console.log(123);
+            },
             addLessonTable() {
                 this.$router.push({
                     path: '/editLessonManage', query: {
@@ -275,11 +298,47 @@
                     });
                 });
             },
+            // 提交名称修改
+            confirmName() {
+                let that = this;
+                if (!this.form.name) {
+                    this.$message.error('名称不能为空');
+                    return false
+                }
+                if (this.form.name.length < 3) {
+                    this.$message.error('名称不能小于3个字符');
+                    return false
+                }
+                if (this.form.name.length > 20) {
+                    this.$message.error('名称不能大于20个字符');
+                    return false
+                }
+                let param = {
+                    token: localStorage.token,
+                    stbId: this.form.stbId,
+                    name: this.form.name,
+                };
+                let postdata = qs.stringify(param);
+                STTBasicEdit(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.$message({
+                            showClose: true,
+                            message: '名称修改成功!',
+                            type: 'success'
+                        });
+                        this.getTableQuery();
+                        this.dialogNameVisible = false;
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             confirmCopy() {
                 let that = this;
                 let row = this.copyForm;
 
-                if(!row.week){
+                if (!row.week) {
                     that.$message.error('没有选择发布周期');
                     return false
                 }
@@ -414,9 +473,7 @@
             // 页面数据查询
             getTableQuery() {
                 let that = this;
-                // this.getGetChildRegionSelect(0, 1);
                 that.loading = true;
-                // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
                 let param = {
                     token: localStorage.token,
                     start: 1,//

+ 1 - 9
pc/src/views/record.vue

@@ -292,15 +292,7 @@
                     }
                 })
             },
-            // 导出excel
-            btnExpAll() {
-                let that = this;
-                let url = headapi + '?ctl=ajax&mod=czgl&act=czcx_excel';//获取
-                let bt = globaltime2String(that.panel.time1[0]);
-                let et = globaltime2String(that.panel.time1[1]);
-                let usercode = that.panel.usercode;
-                window.location = url + '&bt=' + bt + '&et=' + et + '&usercode=' + usercode;
-            },
+
             // 设置分页数据
             setPaginations() {
                 // 分页属性