123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- var patiCode = "",
- patiName = "",
- teamCode = "",
- teamName = "";
- new Promise(function(resolve, reject) {
- var html = template('table_tmpl',{
- data: {
- consult: {},
- followup: {},
- reservation: {},
- guidance: {},
- article: {}
- }
- });
-
- $('#wrapper').html(html);
- mui.plusReady(function() {
- var self = plus.webview.currentWebview();
- patiCode = self.patiCode;
- patiName = self.patiName;
- teamCode = self.teamCode;
- teamName = self.teamName;
- $('#team_name').text(teamName);
- $('#patientName').text(patiName);
- initScroller();
- resolve(true);
- })
- }).then(function() {
- initData();
- }).catch(function(e) {
- console && console.error(e);
- })
- function initData(){
- getReqPromise("doctor/patient/service/statistics",{
- patient: patiCode,
- teamCode: teamCode
- }, 'POST', true).then(function(res) {
- if(res.status == 200) {
- var html = template('table_tmpl',res);
- $('#wrapper').html(html);
- } else {
- mui.toast(res.msg);
- }
- }).catch(function(e) {
- console && console.error(e);
- });
- }
- function initScroller(){
- //阻尼系数
- var deceleration = mui.os.ios?0.003:0.0009;
- mui('.mui-scroll-wrapper').scroll({
- bounce: false,
- indicators: true, //是否显示滚动条
- deceleration:deceleration
- });
-
- mui(".mui-scroll").pullToRefresh({
- down: {
- callback: function() {
- var self = this;
- setTimeout(function() {
- initData();
- self.endPullDownToRefresh();
- }, 1000);
- }
- }
- });
- }
|