|
- <!DOCTYPE html>
- <html>
-
- <head>
- <meta charset="utf-8">
- <title>Hello MUI</title>
- <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <link rel="stylesheet" href="css/mui.min.css">
- <link rel="stylesheet" href="css/style.css">
- <link rel="stylesheet" type="text/css" href="css/mui.picker.min.css" />
- <script src="js/mui.min.js"></script>
- <script src="js/userinfos.js"></script>
- <script src="js/serverurl.js"></script>
- <script type="text/javascript" src="js/tools.js"></script>
- <script src="js/mui.picker.min.js"></script>
- </head>
-
- <body>
-
- <style>
- .mui-table-view .mui-media-object {
- max-width: 70px;
- height: 65px;
- }
-
- .mui-control-content {
- min-height: 215px;
- }
-
- .mui-control-content .mui-loading {
- margin-top: 50px;
- }
-
- .mui-media-body {
- font-size: 14px;
- }
-
- .mui-media-body span {
- color: #C70F1A;
- text-align: left;
- float: right;
- }
-
- .mui-table-view-cell p {
- line-height: 24px;
- }
- </style>
- <script type="text/javascript">
- function OpenAndSetPicker(picker, field) {
- picker.show(function(items) {
- if(confirm("是否修改缴费信息?")) {
- var xhr = new plus.net.XMLHttpRequest();
- xhr.responseType = "json";
- xhr.onreadystatechange = function() {
- switch(xhr.readyState) {
- case 4:
- if(xhr.status == 200) {
- plus.nativeUI.closeWaiting();
- if(xhr.response.result == "ok") {
- GetData();
- plus.nativeUI.toast("修改成功。");
- } else {
- plus.nativeUI.toast("操作失败,请重试。");
- }
- } else {
- plus.nativeUI.closeWaiting();
- plus.nativeUI.toast("操作失败,请重试。");
- }
- break;
- default:
- break;
- }
- }
- xhr.open("GET", encodeURI(serverdomain + "/WebService/UserService.ashx?Action=upadtePAYMENT_QUOTA&ID=" + field + "&paymentQuota=" + items[0].value + ""));
- xhr.send();
- plus.nativeUI.showWaiting("加载中...");
- }
- });
- }
- var userPickerpaymentQuota;
- mui.plusReady(function() {
- CheckLogin();
- userPickerpaymentQuota = new mui.PopPicker();
- GetDictionaryData(userPickerpaymentQuota, "100009100022000000");
- GetData();
- });
-
- function GetData() {
- var table = document.getElementById("table");
- //server data
- var xhr = new plus.net.XMLHttpRequest();
- xhr.responseType = "json";
- xhr.onreadystatechange = function() {
- switch(xhr.readyState) {
- case 4:
- if(xhr.status == 200) {
- table.innerHTML = "";
- table.innerText = "";
- if(xhr.response.msg != null && xhr.response.msg.length > 0) {
- for(var i in xhr.response.msg) {
- var dataobject = xhr.response.msg;
- var li = document.createElement('li');
- li.setAttribute("userid",""+dataobject[i].ID+"");
- li.addEventListener("tap", function() {
- OpenAndSetPicker(userPickerpaymentQuota, '' + this.getAttribute("userid") + '');
- });
- li.className = 'mui-table-view-cell mui-media';
- li.innerHTML = '<a>' +
- '<img class="mui-media-object mui-pull-left" src="' + serverdomain + '/' + dataobject[i].userPhoto + '">' +
- '<div class="mui-media-body">' +
- '姓名:' + dataobject[i].strdentName + ' '+dataobject[i].strMobile+'<span>' + dataobject[i].moneyQuota + '</span>' +
- '<p>学院:' + dataobject[i].schoolName + '</p>' +
- '<p class="mui-ellipsis">专业:' + dataobject[i].professionName + '</p>' +
- '<p>生活费: ' + dataobject[i].professionMoney + ' </p>' +
- '<button type="button" class="mui-btn mui-btn-danger" style="float: right;">去缴费</button>' +
- '</p>' +
- '</div>' +
- '</a>';
- table.appendChild(li, table.firstChild);
- }
- } else {}
- plus.nativeUI.closeWaiting();
- } else {
- plus.nativeUI.closeWaiting();
- plus.nativeUI.toast('世界上最遥远的距离就是没有网络。');
- }
- break;
- default:
- break;
- }
- }
- xhr.open("GET", encodeURI(serverdomain + "/WebService/UserService.ashx?Action=strdentList&content={'logname':'" + users.phone + "','num':'4'}"));
- xhr.send();
- plus.nativeUI.showWaiting("数据加载中...");
- }
- </script>
- <header class="mui-bar mui-bar-nav">
- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
- <h1 class="mui-title">学生缴费</h1>
- </header>
- <div class="mui-content">
- <ul class="mui-table-view" id="table">
-
- </ul>
-
- </div>
-
- </body>
-
- </html>
|