|
|
-define(["$","template","native","config","user","api"],function(e,t,n,r,i,s){function o(t){t.preventDefault(),e(document).trigger("spa:navigate",{hash:"",pushData:{dontNeedReload:!0}})}function u(t,n){e(".model-box").css("display","inline"),e(".model").css("bottom","0"),e(".model-title").html(t),e(".model-content").html(n);return}var a;return{title:"雇员",body:"",init:function(t,n){var r=this,i=e(document);r.on("swipeRight",function(e){o.call(this,e)}),e.newTouch(".back-button",function(e){o.call(this,e)},r),r.on("tapBackButton",function(e){o.call(this,e)}),e.newTouch("#submit",function(e){e.preventDefault()},r),e.newTouch(".model-content",function(t){s.getModifyPOrderStatus({id:a.id,status:2},function(e){e.success&&i.trigger("spa:navigate",{hash:"service-info",pushData:{needReload:!0}})});return;var n},r),e.newTouch("#submit",function(t){var n=e(".in-room-time").text(),r=e(".out-room-time").text();n==="暂无服务时间"?u("是否开始清洁服务","确定"):r==="暂无服务时间"&&u("是否结束清洁服务","确定")},r),n.resolve()},beforeopen:function(n,r){var i=this,s=e(document);a=n.pushData.orderInfo,console.log(a);if(n.pushData.orderInfo===undefined)s.trigger("spa:navigate",{hash:"service-info",pushData:{needReload:!0}});else{var o=t("employe/YorderInfo",{orderInfo:a});e(".spa-page-body",i).html(o),e(".in-room-time").text()==="暂无服务时间"?e("#submit").html("开始"):e("#submit").html("结束")}r.resolve()},afteropen:function(e,t){t.resolve()},beforeclose:function(e,t){t.resolve()}}});
|
|
|
+define(["$","template","native","config","user","api"],function(e,t,n,r,i,s){function o(t){t.preventDefault(),e(document).trigger("spa:navigate",{hash:"",pushData:{dontNeedReload:!0}})}function u(t,n){e(".model-box").css("display","inline"),e(".model").css("bottom","0"),e(".model-title").html(t),e(".model-content").html(n);return}var a;return{title:"雇员",body:"",init:function(t,n){var r=this,i=e(document);r.on("swipeRight",function(e){o.call(this,e)}),e.newTouch(".back-button",function(e){o.call(this,e)},r),r.on("tapBackButton",function(e){o.call(this,e)}),e.newTouch("#submit",function(e){e.preventDefault()},r),e.newTouch(".model-content",function(t){s.getModifyPOrderStatus({id:a.id,status:2},function(e){e.success&&i.trigger("spa:navigate",{hash:"service-info",pushData:{needReload:!0}})});return;var n},r),e.newTouch("#submit",function(t){var n=e(".in-room-time").text(),r=e(".out-room-time").text();n==="暂无服务时间"?u("是否开始清洁服务","确定"):r==="暂无服务时间"&&u("是否结束清洁服务","确定")},r),e.newTouch(".model-content-stop",function(e){e.preventDefault(),i.trigger("spa:navigate",{hash:"service-info",pushData:{needReload:!0}})},r),n.resolve()},beforeopen:function(n,r){var i=this,s=e(document);a=n.pushData.orderInfo,console.log(a);if(n.pushData.orderInfo===undefined)s.trigger("spa:navigate",{hash:"service-info",pushData:{needReload:!0}});else{var o=t("employe/YorderInfo",{orderInfo:a});e(".spa-page-body",i).html(o),e(".in-room-time").text()==="暂无服务时间"?e("#submit").html("开始"):e("#submit").html("结束")}r.resolve()},afteropen:function(e,t){t.resolve()},beforeclose:function(e,t){t.resolve()}}});
|