From 939005a530b011fee0ab0c21255436f086bbea06 Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期五, 13 十月 2023 14:03:56 +0800
Subject: [PATCH] 10.12
---
cloud-server-management/src/main/webapp/static/modular/system/appUser/tAppUser.js | 144 ++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 132 insertions(+), 12 deletions(-)
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/appUser/tAppUser.js b/cloud-server-management/src/main/webapp/static/modular/system/appUser/tAppUser.js
index bdeeb44..07704cd 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/appUser/tAppUser.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/appUser/tAppUser.js
@@ -79,7 +79,7 @@
TQuestion.openChange = function () {
var selected = $('#' + this.id).bootstrapTable('getSelections');
if(selected.length >1 ){
- Feng.info("只能选择一个问题进行编辑!");
+ Feng.info("只能选择一个用户进行编辑!");
}else {
if (this.check()){
var selected = $('#' + this.id).bootstrapTable('getSelections');
@@ -102,7 +102,7 @@
TQuestion.openInfo = function () {
var selected = $('#' + this.id).bootstrapTable('getSelections');
if(selected.length >1 ){
- Feng.info("只能选择一个问题进行编辑!");
+ Feng.info("只能选择一个用户进行查看!");
}else {
if (this.check()){
var selected = $('#' + this.id).bootstrapTable('getSelections');
@@ -119,25 +119,63 @@
}
};
/**
+ * 查看学员详情
+ */
+TQuestion.studentInfo = function (e) {
+ var index = layer.open({
+ type: 2,
+ title: '详情',
+ area: ['100%', '100%'], //宽高
+ fix: false, //不固定
+ maxmin: true,
+ content: Feng.ctxPath + '/tStudent/tStudent_info/' + e
+ });
+ this.layerIndex = index;
+};
+/**
+ * 添加学员
+ */
+TQuestion.openAddStudent = function (e) {
+ var selected = $('#' + this.id).bootstrapTable('getSelections');
+ if(selected.length >1 ){
+ Feng.info("只能选择一个用户进行添加学员!");
+ }else {
+ if (this.check()) {
+ var index = layer.open({
+ type: 2,
+ title: '详情',
+ area: ['100%', '100%'], //宽高
+ fix: false, //不固定
+ maxmin: true,
+ content: Feng.ctxPath + '/appUser/addStudent/' + TQuestion.seItem.id
+ });
+ this.layerIndex = index;
+ }
+ }
+};
+/**
* 上架
*/
TQuestion.onShelf = function () {
if (this.check()){
var selected = $('#' + this.id).bootstrapTable('getSelections');
-
- var ids=[];
+ const data1 = {
+ ids:[],
+ state:null
+ };
selected.forEach(function(obj) {
var id = obj.id;
- ids.push(id);
+ data1.ids.push(id);
});
+ data1.state = 1;
$.ajax({
- url: Feng.ctxPath + "/bodySideAppointment/changeState",
+ url: Feng.ctxPath + "/appUser/changeState",
type: "POST",
contentType: "application/json", // 设置请求头的 Content-Type
- data: JSON.stringify(ids), // 将数据转换为 JSON 字符串
+ data: JSON.stringify(data1), // 将数据转换为 JSON 字符串
success: function(response) {
- Feng.success("修改成功!");
+ Feng.success("解冻成功!");
TQuestion.search();
},
@@ -155,7 +193,6 @@
* 下架
*/
TQuestion.offShelf = function () {
-
if (this.check()){
var selected = $('#' + this.id).bootstrapTable('getSelections');
const data1 = {
@@ -167,13 +204,15 @@
data1.ids.push(id);
});
data1.state = 2;
+ console.log("看看")
+ console.log(data1)
$.ajax({
- url: Feng.ctxPath + "/bodySideAppointment/changeState",
+ url: Feng.ctxPath + "/appUser/changeState",
type: "POST",
contentType: "application/json", // 设置请求头的 Content-Type
data: JSON.stringify(data1), // 将数据转换为 JSON 字符串
success: function(response) {
- Feng.success("修改成功!");
+ Feng.success("冻结成功!");
TQuestion.search();
},
error: function(xhr, status, error) {
@@ -332,6 +371,82 @@
});
};
+TQuestion.addStudentSubmit = function(){
+ var data = {
+ appUserId:null,
+ phone:"",
+ name:"",
+ birthday:"",
+ sex:null,
+ idCard:"",
+ lateralSurface:"",
+ weight:null,
+ height:null,
+ state:1,
+
+ };
+ data.phone = $("#phone").val()
+ data.name = $("#name").val()
+ data.birthday = $("#birthday").val()
+ data.sex = $("#gender").val()
+ data.idCard = $("#idCard").val()
+ data.appUserId = $("#userId").val()
+ data.lateralSurface = $("#img").val()
+ data.weight = $("#weight").val()
+ data.height = $("#height").val()
+
+
+
+
+ if($("#learnerName").val()=='' ){
+ Feng.info("请输入学员姓名")
+ return;
+ }
+ if($("#birthday").val()=='' ){
+ Feng.info("请选择生日")
+ return;
+ }
+ if($("#gender").val()=='' ){
+ Feng.info("请选择性别")
+ return;
+ }
+ if($("#height").val()==''){
+ Feng.info("请输入身高")
+ return;
+ }
+ if($("#weight").val()==''){
+ Feng.info("请输入体重")
+ return;
+ }
+ if($("#phone").val()=='' ){
+ Feng.info("请输入联系方式")
+ return;
+ }
+ if($("#idCard").val()=='' ){
+ Feng.info("请输入身份证号")
+ return;
+ }
+ if($("#img").val()=='' ){
+ Feng.info("请上传体测表")
+ return;
+ }
+
+ $.ajax({
+ url: Feng.ctxPath + "/appUser/addAppUserStudent" ,
+ type: "POST",
+ data: JSON.stringify(data),
+ contentType: "application/json",
+ success: function (response) {
+ window.parent.TQuestion.table.refresh();
+ TQuestion.close();
+ Feng.success("添加成功");
+ },
+ error: function (xhr, status, error) {
+ Feng.error("添加失败!" + error);
+ }
+ });
+
+};
TQuestion.updateSubmit = function(){
var data = {
id:null,
@@ -438,10 +553,15 @@
TQuestion.search(null);
};
-
+function UploadFileFn(){
+ $('#upFile').click();
+}
$(function () {
var defaultColunms = TQuestion.initColumn();
var table = new BSTable(TQuestion.id, "/appUser/listAll", defaultColunms);
table.setPaginationType("client");
TQuestion.table = table.init();
+ var carPhoto = new $WebUpload("img");
+ carPhoto.setUploadBarId("progressBar");
+ carPhoto.init();
});
--
Gitblit v1.7.1