From 7e7f901b2172281dc294dfbc67e6ad00625f09f4 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期一, 04 三月 2024 10:11:21 +0800
Subject: [PATCH] 合并代码

---
 cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageStudent.js |   32 ++++++++++++--------------------
 1 files changed, 12 insertions(+), 20 deletions(-)

diff --git a/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageStudent.js b/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageStudent.js
index c1d1b38..0ca98b7 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageStudent.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/coursePackageStudent.js
@@ -15,7 +15,7 @@
 CoursePackageStudent.initColumn = function () {
     let columns = [
         {field: 'selectItem', radio: true},
-        {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
+        {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'},
         {title: '所属用户', field: 'userName', align: 'center', valign: 'middle'},
         {title: '姓名', field: 'studentName', align: 'center', valign: 'middle'},
         {title: '联系电话', field: 'phone', align: 'center', valign: 'middle'},
@@ -31,7 +31,7 @@
         },
         {title: '到课状态', field: 'signInOrNot', align: 'center', valign: 'middle',
             formatter: function (v, row) {
-                if (row.reservationStatus === 0) {
+                if (row.signInOrNot === 2) {
                     return '请假';
                 } else {
                     switch (v) {
@@ -42,16 +42,7 @@
                     }
                 }
             }
-        },
-        {title: '预定状态', field: 'reservationStatus', align: 'center', valign: 'middle',hidden:true,
-            formatter: function (v) {
-                if (v == 0) {
-                    return '已取消';
-                } else {
-                    return '正常';
-                }
-            }
-        },
+        }
     ];
     return columns;
 };
@@ -75,6 +66,10 @@
 
 /**
  * 取消预约
+ * if(CoursePackageStudent.seItem.signInOrNot == 1){
+            Feng.error("不能取消预约操作");
+            return
+        }
  */
 CoursePackageStudent.cancelReservation = function () {
     if (this.check()) {
@@ -82,25 +77,22 @@
             Feng.error("不能重复操作");
             return
         }
-        if(CoursePackageStudent.seItem.signInOrNot == 1){
-            Feng.error("不能取消预约操作");
-            return
-        }
+
         let operation = function(){
             let ajax = new $ax(Feng.ctxPath + "/coursePackage/cancelReservation", function (res) {
                 if(res.code == 200){
-                    Feng.success("取消成功!");
+                    Feng.success("请假成功!");
                     CoursePackageStudent.table.refresh();
                 }else{
                     Feng.error(res.msg);
                 }
             }, function (data) {
-                Feng.error("取消失败!" + data.responseJSON.message + "!");
+                Feng.error("请假失败!" + data.responseJSON.message + "!");
             });
             ajax.set("id", CoursePackageStudent.seItem.id);
             ajax.start();
         };
-        Feng.confirm("是否取消预约",operation);
+        Feng.confirm("是否请假",operation);
     }
 };
 
@@ -112,7 +104,7 @@
             return
         }
         if(CoursePackageStudent.seItem.reservationStatus == 0){
-            Feng.error("该数据已取消预约");
+            Feng.error("当前学员已请假");
             return
         }
         let operation = function(){

--
Gitblit v1.7.1