From 312cd22230809437aae8462d71d3335e6540f78a Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期二, 12 十二月 2023 08:54:56 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai

---
 cloud-server-management/src/main/webapp/static/modular/system/cpPayment/cpPayment_info.js |  405 ++++++++++++++++++++++++++++-----------------------------
 1 files changed, 202 insertions(+), 203 deletions(-)

diff --git a/cloud-server-management/src/main/webapp/static/modular/system/cpPayment/cpPayment_info.js b/cloud-server-management/src/main/webapp/static/modular/system/cpPayment/cpPayment_info.js
index 5189058..019b22a 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/cpPayment/cpPayment_info.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/cpPayment/cpPayment_info.js
@@ -7,8 +7,8 @@
     table: null,
     layerIndex: -1
 };
-var role =$("#roleType").val()
-var appUserId ;
+var role = $("#roleType").val()
+var appUserId;
 /**
  * 初始化表格的列
  */
@@ -16,36 +16,40 @@
     return [
         {field: 'selectItem', checkbox: true},
         {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'},
-        {title: '所在省市', field: 'provinceAndCity', visible: role==1?true:false, align: 'center', valign: 'middle'},
-        {title:  '门店名称', field: 'storeName', visible: true, align: 'center', valign: 'middle'},
-        {title:  '课包类型', field: 'coursePackageType', visible: true, align: 'center', valign: 'middle'},
-        {title:  '课包名称', field: 'coursePackage', visible: true, align: 'center', valign: 'middle'},
-        {title:  '购买用户', field: 'payUser', visible: true, align: 'center', valign: 'middle'},
-        {title:  '联系方式', field: 'phone', visible: true, align: 'center', valign: 'middle'},
-        {title:  '购课学员', field: 'payStudent', visible: true, align: 'center', valign: 'middle'},
-        {title:  '购买方式', field: 'buyType', visible: true, align: 'center', valign: 'middle',
-            formatter:function (data) {
-                return{1:"线下",2:"线上",3:"折扣"}[data]
+        {title: '所在省市', field: 'provinceAndCity', visible: role == 1 ? true : false, align: 'center', valign: 'middle'},
+        {title: '门店名称', field: 'storeName', visible: true, align: 'center', valign: 'middle'},
+        {title: '课包类型', field: 'coursePackageType', visible: true, align: 'center', valign: 'middle'},
+        {title: '课包名称', field: 'coursePackage', visible: true, align: 'center', valign: 'middle'},
+        {title: '购买用户', field: 'payUser', visible: true, align: 'center', valign: 'middle'},
+        {title: '联系方式', field: 'phone', visible: true, align: 'center', valign: 'middle'},
+        {title: '购课学员', field: 'payStudent', visible: true, align: 'center', valign: 'middle'},
+        {
+            title: '购买方式', field: 'buyType', visible: true, align: 'center', valign: 'middle',
+            formatter: function (data) {
+                return {1: "线下", 2: "线上", 3: "折扣"}[data]
             }
         },
-        {title:  '支付方式', field: 'buyTypeName', visible: true, align: 'center', valign: 'middle'},
-        {title:  '总金额', field: 'originalPrice', visible: true, align: 'center', valign: 'middle'},
-        {title:  '优惠金额', field: 'discountAmount', visible: true, align: 'center', valign: 'middle'},
-        {title:  '支付价格', field: 'cashPayment', visible: true, align: 'center', valign: 'middle'},
-        {title:  '支付状态', field: 'payStatus', visible: true, align: 'center', valign: 'middle',
-            formatter:function (data) {
-                return{1:"待支付",2:"已支付"}[data]
+        {title: '支付方式', field: 'buyTypeName', visible: true, align: 'center', valign: 'middle'},
+        {title: '总金额', field: 'originalPrice', visible: true, align: 'center', valign: 'middle'},
+        {title: '优惠金额', field: 'discountAmount', visible: true, align: 'center', valign: 'middle'},
+        {title: '支付价格', field: 'cashPayment', visible: true, align: 'center', valign: 'middle'},
+        {
+            title: '支付状态', field: 'payStatus', visible: true, align: 'center', valign: 'middle',
+            formatter: function (data) {
+                return {1: "待支付", 2: "已支付"}[data]
             }
         },
-        {title:  '赠送课时', field: 'giftClassHours', visible: true, align: 'center', valign: 'middle'}
+        {title: '赠送课时', field: 'giftClassHours', visible: true, align: 'center', valign: 'middle'}
     ];
 };
-function currentTime(timestamp){
+
+function currentTime(timestamp) {
     var time = timestamp + '';
-    if(time.length != 13){
+    if (time.length != 13) {
         timestamp = timestamp * 1000;
     }
-    var date = new Date(timestamp);;
+    var date = new Date(timestamp);
+    ;
     var Y = date.getFullYear() + '-';
     var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
     var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' ';
@@ -57,12 +61,13 @@
     return strDate
 }
 
-function currentTime1(timestamp){
+function currentTime1(timestamp) {
     var time = timestamp + '';
-    if(time.length != 13){
+    if (time.length != 13) {
         timestamp = timestamp * 1000;
     }
-    var date = new Date(timestamp);;
+    var date = new Date(timestamp);
+    ;
     var Y = date.getFullYear() + '-';
     var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
     var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' ';
@@ -70,18 +75,19 @@
     var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':';
     var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':';
     var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds());
-    var strDate = Y + M + D ;
+    var strDate = Y + M + D;
     return strDate
 }
+
 /**
  * 检查是否选中
  */
 TQuestion.check = function () {
     var selected = $('#' + this.id).bootstrapTable('getSelections');
-    if(selected.length == 0){
+    if (selected.length == 0) {
         Feng.info("请先选中表格中的某一记录!");
         return false;
-    }else{
+    } else {
         TQuestion.seItem = selected[0];
         return true;
     }
@@ -109,7 +115,7 @@
     if (this.check()) {
         var index = layer.open({
             type: 2,
-            title:'编辑',
+            title: '编辑',
             area: ['100%', '100%'], //宽高
             fix: false, //不固定
             maxmin: true,
@@ -122,7 +128,7 @@
     if (this.check()) {
         var index = layer.open({
             type: 2,
-            title:'详情',
+            title: '详情',
             area: ['100%', '100%'], //宽高
             fix: false, //不固定
             maxmin: true,
@@ -135,7 +141,7 @@
     if (this.check()) {
         var index = layer.open({
             type: 2,
-            title:'免费福利',
+            title: '免费福利',
             area: ['100%', '100%'], //宽高
             fix: false, //不固定
             maxmin: true,
@@ -148,7 +154,7 @@
     if (this.check()) {
         var index = layer.open({
             type: 2,
-            title:'首页设置',
+            title: '首页设置',
             area: ['100%', '100%'], //宽高
             fix: false, //不固定
             maxmin: true,
@@ -164,193 +170,189 @@
 TQuestion.delete = function () {
     if (this.check()) {
         var nickname = TQuestion.seItem.carLicensePlate;
-        if (nickname == "" || nickname == null || nickname == undefined){
+        if (nickname == "" || nickname == null || nickname == undefined) {
             nickname = "该车辆";
-        }else{
-            nickname = "【"+nickname+"】";
+        } else {
+            nickname = "【" + nickname + "】";
         }
         swal({
-            title: language==1?"您是否确认删除" + nickname + "?":(language==2?"Are you sure to delete the" + nickname + "?":"Apakah Anda pasti akan menghapus" + nickname + "?"),
-            text: language==1?"请谨慎操作!":(language==2?' Please operate with caution!':'Harap beroperasi dengan hati -hati!'),
+            title: language == 1 ? "您是否确认删除" + nickname + "?" : (language == 2 ? "Are you sure to delete the" + nickname + "?" : "Apakah Anda pasti akan menghapus" + nickname + "?"),
+            text: language == 1 ? "请谨慎操作!" : (language == 2 ? ' Please operate with caution!' : 'Harap beroperasi dengan hati -hati!'),
             type: "warning",
             showCancelButton: true,
             confirmButtonColor: "#DD6B55",
-            confirmButtonText: language==1?"删除":(language==2?'Delete':'Hapus'),
+            confirmButtonText: language == 1 ? "删除" : (language == 2 ? 'Delete' : 'Hapus'),
             closeOnConfirm: true
         }, function () {
             var ajax = new $ax(Feng.ctxPath + "/TCompetition/delete", function (data) {
-                if(language==1){
+                if (language == 1) {
                     swal("删除成功", "您已经成功删除了" + nickname + "。", "success");
-                }else if(language==2){
+                } else if (language == 2) {
                     swal("Delete succeeded!", "You have successfully deleted it" + nickname + "。", "success");
-                }else {
+                } else {
                     swal("Hapus berhasil!", "Anda berhasil menghapus" + nickname + "。", "success");
                 }
                 TQuestion.table.refresh();
             }, function (data) {
-                if(language==1){
+                if (language == 1) {
                     swal("删除失败", data.responseJSON.message + "!", "warning");
-                }else if(language==2){
+                } else if (language == 2) {
                     swal("Failed to delete", data.responseJSON.message + "!", "warning");
-                }else {
+                } else {
                     swal("Hapus Gagal", data.responseJSON.message + "!", "warning");
                 }
 
             });
-            ajax.set("TCompetitionId",TCompetition.seItem.id);
+            ajax.set("TCompetitionId", TCompetition.seItem.id);
             ajax.start();
         });
     }
 };
 TQuestion.oneChange = function (e) {
     console.log(111)
-    var oneId=$(e).val();
+    var oneId = $(e).val();
     console.log(oneId)
     var content = "<option value=''>请选择</option>";
-    var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){
-        if(data!=null){
+    var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function (data) {
+        if (data != null) {
 
-            $.each(data, function(k,v) {
-                content += "<option value='"+v.name+"'>"+v.name+"</option>";
+            $.each(data, function (k, v) {
+                content += "<option value='" + v.name + "'>" + v.name + "</option>";
             });
             $("#cCode").empty().append(content);
         }
     });
-    ajax.set("oneId",oneId);
+    ajax.set("oneId", oneId);
     ajax.start();
 };
 
 TQuestion.nextStore = function (e) {
-    var oneId=$(e).val();
+    var oneId = $(e).val();
     console.log(oneId)
     var content = "<option value=''>请选择</option>";
-    var ajax = new $ax(Feng.ctxPath + "/coursePackage/getCoursePackageByStoreId", function(data){
-        if(data!=null){
+    var ajax = new $ax(Feng.ctxPath + "/coursePackage/getCoursePackageByStoreId", function (data) {
+        if (data != null) {
 
-            $.each(data, function(k,v) {
-                content += "<option value='"+v.id+"'>"+v.name+"</option>";
+            $.each(data, function (k, v) {
+                content += "<option value='" + v.id + "'>" + v.name + "</option>";
             });
             $("#coursePackageType").empty().append(content);
         }
     });
-    ajax.set("storeId",oneId);
+    ajax.set("storeId", oneId);
     ajax.start();
 };
-TQuestion.addSubmit = function(){
-    var data = {
-        appUserId:null,
-        studentId:null,
-        coursePackageId:null,
-        payType:null,
-        classHours:null,
-        originalPrice:null,
-        cashPayment:null,
-        playPaiCoin:null,
-        totalClassHours:null,
-        laveClassHours:null,
-        absencesNumber:null,
-        payUserType:2,
-        payStatus:1,
-        orderNumber:null,
-        payUserId:2,
-        status:1,
-        withdrawalTime:"",
-        certificate:"",
-        state:1,
-        giftClassHours:null,
-        useTime:"",
-        payUserName:"",
-        coursePackageConfigId:null
-    };
-    data.appUserId            = appUserId;
-    console.log("我看看规格id")
-    console.log($("#courseTime").val())
-    data.coursePackageConfigId            = $("#courseTime").val();
-    data.studentId                = $("#student").val()
-    data.coursePackageId       = $("#coursePackageName").val()
-    data.cashPayment             = $("#cashPayment").val()
-    data.playPaiCoin          = $("#playPaiCoin").val()
-    data.classHours          = $('#courseTime option:selected').text()
-    if (role == 1){
-        if($("#studentId").val()=='' ){
-            Feng.info("请选择学员")
-            return;
-        }
-        if($("#pCode").val()=='' ){
-            Feng.info("请选择省")
-            return;
-        }
-        if($("#cCode").val()=='' ){
-            Feng.info("请选择市")
-            return;
-        }
+TQuestion.addSubmit = function () {
+    let studentId = $("#studentId").val();
+    let pCode = $("#pCode").val();
+    let cCode = $("#cCode").val();
+    let store = $("#store").val();
+    let coursePackageType = $("#coursePackageType").val();
+    let coursePackageName = $("#coursePackageName").val();
+    if (studentId == '' || studentId == null) {
+        Feng.info("请选择学员")
+        return;
     }
-    if (role!=3){
-        if($("#store").val()==''){
-            Feng.info("请选择门店")
-            return;
-        }
+    if (pCode == '' || pCode == null) {
+        Feng.info("请选择省")
+        return;
     }
-    if($("#coursePackageType").val()=='' ){
+    if (cCode == '' || cCode == null) {
+        Feng.info("请选择市")
+        return;
+    }
+    if (store == '' || store == null) {
+        Feng.info("请选择门店")
+        return;
+    }
+    if (coursePackageType == '' || coursePackageType == null) {
         Feng.info("请选择课包类型")
         return;
     }
-    if($("#coursePackageName").val()==''){
+    if (coursePackageName == '' || coursePackageName == null) {
         Feng.info("请选择课包名称")
         return;
     }
-
+    var data = {
+        appUserId: null,
+        studentId: null,
+        coursePackageId: null,
+        payType: null,
+        classHours: null,
+        originalPrice: null,
+        cashPayment: null,
+        playPaiCoin: null,
+        totalClassHours: null,
+        laveClassHours: null,
+        absencesNumber: null,
+        payUserType: 2,
+        payStatus: 1,
+        orderNumber: null,
+        payUserId: 2,
+        status: 1,
+        withdrawalTime: "",
+        certificate: "",
+        state: 1,
+        giftClassHours: null,
+        useTime: "",
+        payUserName: "",
+        coursePackageConfigId: null
+    };
+    data.appUserId = appUserId;
+    data.coursePackageConfigId = $("#courseTime").val();
+    data.studentId = $("#student").val()
+    data.coursePackageId = $("#coursePackageName").val()
+    data.cashPayment = $("#cashPayment").val()
+    data.playPaiCoin = $("#playPaiCoin").val()
+    data.classHours = $('#courseTime option:selected').text()
     var selectElement = document.getElementById('coursePackageName');
     var selectedOption = selectElement.options[selectElement.selectedIndex];
-    console.log("插入")
     var type = selectedOption.getAttribute('data-type');
-    console.log('type----------'+type)
 
 
-
-if (type==1) {
-    if (role == 1) {
-        if ($("#courseTime").val() == '') {
-            Feng.info("请选择课时规格")
-            return;
+    if (type == 1) {
+        if (role == 1) {
+            if ($("#courseTime").val() == '') {
+                Feng.info("请选择课时规格")
+                return;
+            }
         }
+    } else {
+        data.classHours = 0
     }
-}else {
-    data.classHours = 0
-}
-    if($("#cashPayment").val()==''){
+    if ($("#cashPayment").val() == '') {
         Feng.info("请输入支付金额")
         return;
     }
-    if($("#playPaiCoin").val()==''){
+    if ($("#playPaiCoin").val() == '') {
         Feng.info("请输入玩湃币支付")
         return;
     }
-    var courseTimeId= $("#courseTime").val()
+    var courseTimeId = $("#courseTime").val()
     console.log("看看课时")
     console.log(courseTimeId)
-    data.coursePackageConfigId            = courseTimeId;
-    if(typeof courseTimeId === 'undefined'){
+    data.coursePackageConfigId = courseTimeId;
+    if (typeof courseTimeId === 'undefined') {
         console.log("进入")
-        courseTimeId=0;
+        courseTimeId = 0;
     }
     $.ajax({
         url: Feng.ctxPath + "/cpPayment/addCoursePackagePayment",
         type: "POST",
         contentType: "application/json", // 设置请求头的 Content-Type
         data: JSON.stringify(data), // 将数据转换为 JSON 字符串
-        success: function(response) {
-            if (response == "5001"){
+        success: function (response) {
+            if (response == "5001") {
                 Feng.error("当前课包预约人数已满!")
-            }else if(response == "5002"){
+            } else if (response == "5002") {
                 Feng.error("剩余课时不足,无法购买!")
-            }else{
+            } else {
                 Feng.success("购买成功!");
                 TQuestion.close();
                 window.parent.TQuestion.table.refresh();
             }
         },
-        error: function(xhr, status, error) {
+        error: function (xhr, status, error) {
             var errorMessage = xhr.responseText ? xhr.responseText : "上架失败!";
             Feng.error("您的网络异常!");
         }
@@ -359,67 +361,66 @@
 /**
  * 关闭此对话框
  */
-TQuestion.close = function() {
+TQuestion.close = function () {
     parent.layer.close(window.parent.TQuestion.layerIndex);
 }
 TQuestion.getCoursePackage = function (e) {
-    var oneId=$(e).val();
+    var oneId = $(e).val();
     console.log("门店id")
     console.log(oneId)
     var storeId = $("#store").val();
     console.log("课包类型")
     console.log(storeId)
     var content = "<option value=''>请选择</option>";
-    var ajax = new $ax(Feng.ctxPath + "/coursePackage/getCoursePackageByType", function(data){
-        if(data!=null){
+    var ajax = new $ax(Feng.ctxPath + "/coursePackage/getCoursePackageByType", function (data) {
+        if (data != null) {
 
-            $.each(data, function(k,v) {
+            $.each(data, function (k, v) {
                 // content += "<option value='"+v.id+"'>"+v.name+"</option>";
-                content += "<option value='"+v.id+"'  data-type='"+v.type+"'>"+v.name+"</option>";
+                content += "<option value='" + v.id + "'  data-type='" + v.type + "'>" + v.name + "</option>";
             });
             $("#coursePackageName").empty().append(content);
         }
     });
-    ajax.set("storeId",storeId);
-    ajax.set("typeId",oneId);
+    ajax.set("storeId", storeId);
+    ajax.set("typeId", oneId);
     ajax.start();
 };
 TQuestion.getCoursePackageConfig = function (e) {
     var c1 = document.getElementById("c1");
     var c2 = document.getElementById("c2");
-    var oneId=$(e).val();
+    var oneId = $(e).val();
     console.log(oneId)
     var content = "<option value=''>请选择</option>";
-    var ajax = new $ax(Feng.ctxPath + "/cpPayment/getCoursePackageConfig", function(data){
-        if(data!=null){
+    var ajax = new $ax(Feng.ctxPath + "/cpPayment/getCoursePackageConfig", function (data) {
+        if (data != null) {
 
-            $.each(data, function(k,v) {
-                content += "<option value='"+v.id+"'  data-cashPayment='"+v.cashPayment+"' data-playPaiCoin='"+v.playPaiCoin+"'>"+v.classHours+"</option>";
+            $.each(data, function (k, v) {
+                content += "<option value='" + v.id + "'  data-cashPayment='" + v.cashPayment + "' data-playPaiCoin='" + v.playPaiCoin + "'>" + v.classHours + "</option>";
             });
             $("#courseTime").empty().append(content);
-        }else{
+        } else {
             c1.style.display = "none";
             c2.style.display = "none";
         }
     });
-    if (oneId == ""){
+    if (oneId == "") {
         console.log("关闭");
         c1.style.display = "none";
         c2.style.display = "none";
-    }else{
+    } else {
         console.log("展示")
         c1.style.display = 'block'
         c2.style.display = 'block'
     }
-    ajax.set("id",oneId);
+    ajax.set("id", oneId);
     ajax.start();
 
 
-
-    var ajax1 = new $ax(Feng.ctxPath + "/cpPayment/getCoursePackageType", function(data){
-        if(data!=null){
-                console.log("data ===="+data)
-            if (data != 1){
+    var ajax1 = new $ax(Feng.ctxPath + "/cpPayment/getCoursePackageType", function (data) {
+        if (data != null) {
+            console.log("data ====" + data)
+            if (data != 1) {
                 document.getElementById("toHidden").style.display = "none";
 
                 var selectElement = document.getElementById('courseTime');
@@ -433,7 +434,7 @@
                 $("#playPaiCoin").val(playPaiCoin);
 
 
-            }else {
+            } else {
                 document.getElementById("toHidden").style.display = "block";
 
             }
@@ -441,14 +442,14 @@
         }
     });
 
-    ajax1.set("id",oneId);
+    ajax1.set("id", oneId);
     ajax1.start();
 
 };
 TQuestion.getCoursePackagePrice = function (e) {
     var c1 = document.getElementById("c1");
     var c2 = document.getElementById("c2");
-    var oneId=$(e).val();
+    var oneId = $(e).val();
     var selectElement = document.getElementById('courseTime');
     var selectedOption = selectElement.options[selectElement.selectedIndex];
     console.log("插入")
@@ -460,42 +461,42 @@
     $("#playPaiCoin").val(playPaiCoin);
 };
 TQuestion.twoChange = function (e) {
-    var oneId=e;
+    var oneId = e;
     var content = "<option value=''>请选择</option>";
-    var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){
-        if(data!=null){
+    var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function (data) {
+        if (data != null) {
 
-            $.each(data, function(k,v) {
-                content += "<option value='"+v.name+"'>"+v.name+"</option>";
+            $.each(data, function (k, v) {
+                content += "<option value='" + v.name + "'>" + v.name + "</option>";
             });
             $("#cCode").empty().append(content);
         }
     });
-    ajax.set("oneId",oneId);
+    ajax.set("oneId", oneId);
     ajax.start();
 };
 
 TQuestion.threeChange = function (e) {
-    var oneId=$(e).val();
+    var oneId = $(e).val();
     var content1 = "<option value=''>请选择门店</option>";
-    var ajax2=new $ax(Feng.ctxPath + "/cpPayment/getStore", function(data){
-        $.each(data, function(k,v) {
-            content1 += "<option value='"+v.id+"'>"+v.name+"</option>";
+    var ajax2 = new $ax(Feng.ctxPath + "/cpPayment/getStore", function (data) {
+        $.each(data, function (k, v) {
+            content1 += "<option value='" + v.id + "'>" + v.name + "</option>";
         });
         $("#store").empty().append(content1);
     });
-    ajax2.set("city",oneId);
+    ajax2.set("city", oneId);
     ajax2.start();
 };
 TQuestion.fourChange = function (e) {
     var content1 = "<option value=''>请选择门店</option>";
-    var ajax2=new $ax(Feng.ctxPath + "/cpPayment/getStore", function(data){
-        $.each(data, function(k,v) {
-            content1 += "<option value='"+v.id+"'>"+v.name+"</option>";
+    var ajax2 = new $ax(Feng.ctxPath + "/cpPayment/getStore", function (data) {
+        $.each(data, function (k, v) {
+            content1 += "<option value='" + v.id + "'>" + v.name + "</option>";
         });
         $("#store").empty().append(content1);
     });
-    ajax2.set("city",e);
+    ajax2.set("city", e);
     ajax2.start();
 };
 
@@ -513,13 +514,13 @@
     var c;
     var content = "<option value=''>请选择学员</option>";
     $.ajax({
-        url: Feng.ctxPath + "/cpPayment/getUserByPhone/"+phone,
+        url: Feng.ctxPath + "/cpPayment/getUserByPhone/" + phone,
         type: "GET",
         contentType: "application/json", // 设置请求头的 Content-Type
-        success: function(response) {
+        success: function (response) {
             console.log("===================");
             console.log(response)
-            if (response==""){
+            if (response == "") {
                 let htmlStr =
                     '<div class="form-horizontal">' +
                     '   <div class="col-sm-11" style="padding: 20px;">' +
@@ -540,7 +541,7 @@
                     , yes: function () {
                         var index = layer.open({
                             type: 2,
-                            title:'添加用户',
+                            title: '添加用户',
                             area: ['100%', '100%'], //宽高
                             fix: false, //不固定
                             maxmin: true,
@@ -548,16 +549,16 @@
                         });
                         // layer.closeAll('page');
                     },
-                    btn2:function () {
+                    btn2: function () {
                     }
                 });
-            }else{
+            } else {
                 province = response.province;
                 city = response.city;
                 appUserId = response.id;
-                var ajax1=new $ax(Feng.ctxPath + "/cpPayment/queryStudentList", function(data){
+                var ajax1 = new $ax(Feng.ctxPath + "/cpPayment/queryStudentList", function (data) {
 
-                    if (data.length==0){
+                    if (data.length == 0) {
                         let htmlStr =
                             '<div class="form-horizontal">' +
                             '   <div class="col-sm-11" style="padding: 20px;">' +
@@ -578,18 +579,18 @@
                             , yes: function () {
                                 var index = layer.open({
                                     type: 2,
-                                    title:'首页设置',
+                                    title: '首页设置',
                                     area: ['100%', '100%'], //宽高
                                     fix: false, //不固定
                                     maxmin: true,
-                                    content: Feng.ctxPath + '/appUser/addStudent/'+appUserId
+                                    content: Feng.ctxPath + '/appUser/addStudent/' + appUserId
                                 });
                                 // layer.closeAll('page');
                             },
                         });
                     }
-                    $.each(data, function(k,v) {
-                        content += "<option value='"+v.id+"'>"+v.name+"</option>";
+                    $.each(data, function (k, v) {
+                        content += "<option value='" + v.id + "'>" + v.name + "</option>";
                     });
                     $("#student").empty().append(content);
                     var provinceSelect = document.getElementById("pCode");
@@ -609,19 +610,18 @@
                         var option = citySelect.options[i];
                         if (option.text === city) {
                             option.selected = true;
-                            c =  option.text;
+                            c = option.text;
                             TQuestion.fourChange(c)
 
                             break; // 找到匹配的选项后,可以选择停止遍历
                         }
                     }
                 });
-                ajax1.set("appUserId",appUserId);
+                ajax1.set("appUserId", appUserId);
                 ajax1.start();
             }
         }
     });
-
 
 
 };
@@ -634,7 +634,7 @@
         }, function (data) {
             Feng.error("冻结失败!" + data.responseJSON.message + "!");
         });
-        ajax.set("id",this.seItem.id);
+        ajax.set("id", this.seItem.id);
         ajax.start();
     }
 };
@@ -644,10 +644,10 @@
         console.log("看看选择")
         console.log(selected)
         const data1 = {
-            ids:[],
-            payUserName:""
+            ids: [],
+            payUserName: ""
         };
-        selected.forEach(function(obj) {
+        selected.forEach(function (obj) {
             var id = "";
             id = obj.id;
             data1.ids.push(id);
@@ -658,11 +658,11 @@
             type: "POST",
             contentType: "application/json", // 设置请求头的 Content-Type
             data: JSON.stringify(data1), // 将数据转换为 JSON 字符串
-            success: function(response) {
+            success: function (response) {
                 Feng.success("支付成功!");
                 TQuestion.table.refresh();
             },
-            error: function(xhr, status, error) {
+            error: function (xhr, status, error) {
                 var errorMessage = xhr.responseText ? xhr.responseText : "上架失败!";
                 Feng.error("您的网络异常!");
             }
@@ -672,14 +672,14 @@
 TQuestion.reload = function () {
     if (this.check()) {
         let id = this.seItem.id
-        var operation = function(){
+        var operation = function () {
             var ajax = new $ax(Feng.ctxPath + "/tCity/pwd", function (data) {
                 Feng.success("重置成功!");
                 TQuestion.table.refresh();
             }, function (data) {
                 Feng.error("重置失败!" + data.responseJSON.message + "!");
             });
-            ajax.set("id",id);
+            ajax.set("id", id);
             ajax.start();
         }
         Feng.confirm("确认重置密码?重置后密码为:a123456", operation);
@@ -691,7 +691,7 @@
     if (this.check()) {
         var index = layer.open({
             type: 2,
-            title: language==1?'车辆保险':(language==2?'Vehicle insurance':'Asuransi kendaraan'),
+            title: language == 1 ? '车辆保险' : (language == 2 ? 'Vehicle insurance' : 'Asuransi kendaraan'),
             area: ['100%', '100%'], //宽高
             fix: false, //不固定
             maxmin: true,
@@ -702,15 +702,14 @@
 };
 
 
-
 /**
  * 查询车辆管理列表
  */
 TQuestion.search = function () {
     var queryData = {};
-    if ($('#pCode option:selected').text()!="全部"){
+    if ($('#pCode option:selected').text() != "全部") {
         queryData['province'] = $('#pCode option:selected').text();
-    }else{
+    } else {
         queryData['province'] = "";
     }
 

--
Gitblit v1.7.1