|
@@ -158,13 +158,25 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</li>
|
|
|
+ <li class="f_item">
|
|
|
+ <div class="box">
|
|
|
+ <div class="f_label">
|
|
|
+ <span>预约时间: </span>
|
|
|
+ </div>
|
|
|
+ <div class="box_flex f_content">
|
|
|
+ <input id="status_time" type="text" name="status_time">
|
|
|
+ <input type="hidden" id="status_time_str" name="status_time">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
<li class="f_item">
|
|
|
<div class="box">
|
|
|
<div class="f_label">
|
|
|
<span>服务开始时间: </span>
|
|
|
</div>
|
|
|
<div class="box_flex f_content">
|
|
|
- <input id="server_start_time" type="text" name="server_start_time">
|
|
|
+ <input id="server_start_time" type="text">
|
|
|
+ <input type="hidden" id="server_start_time_str" name="server_start_time">
|
|
|
</div>
|
|
|
</div>
|
|
|
</li>
|
|
@@ -175,6 +187,7 @@
|
|
|
</div>
|
|
|
<div class="box_flex f_content">
|
|
|
<input id="server_end_time" type="text" name="server_end_time">
|
|
|
+ <input type="hidden" id="server_end_time_str" name="server_end_time">
|
|
|
</div>
|
|
|
</div>
|
|
|
</li>
|
|
@@ -185,6 +198,7 @@
|
|
|
</div>
|
|
|
<div class="box_flex f_content">
|
|
|
<input id="yc_time" type="text" name="yc_time" >
|
|
|
+ <input type="hidden" id="yc_time_str" name="yc_time">
|
|
|
</div>
|
|
|
</div>
|
|
|
</li>
|
|
@@ -256,23 +270,87 @@
|
|
|
|
|
|
}
|
|
|
});
|
|
|
+ var buttons = $.extend([], $.fn.datebox.defaults.buttons);
|
|
|
+ buttons[0].text = '确定';
|
|
|
+ buttons[0].handler=function(){
|
|
|
+ var vals = $('#server_start_time').datetimebox('spinner').spinner('getValue').split(':');
|
|
|
+ $('#server_start_time_str').val( parseInt($('#server_start_time_str').val())-(parseInt($('#server_start_time_str').val())+8*3600)%86400 +vals[0]*3600+vals[1]*60);
|
|
|
+
|
|
|
+ var d=new Date(parseInt($('#server_start_time_str').val())*1000);
|
|
|
+
|
|
|
+ $('#server_start_time').datetimebox('setText',formatDate(d));
|
|
|
+ $('#server_start_time').datetimebox('hidePanel');
|
|
|
+ };
|
|
|
+
|
|
|
$('#server_start_time').datetimebox({
|
|
|
required: false,
|
|
|
showSeconds:false,
|
|
|
+ buttons:buttons,
|
|
|
+ onSelect: function(date){
|
|
|
+ $('#server_start_time_str').val(date.getTime()/1000);
|
|
|
+ }
|
|
|
});
|
|
|
+ var buttons1 = $.extend([], $.fn.datebox.defaults.buttons);
|
|
|
+ buttons1[0].text = '确定';
|
|
|
+ buttons1[0].handler=function(){
|
|
|
+ var vals = $('#status_time').datetimebox('spinner').spinner('getValue').split(':');
|
|
|
+ $('#status_time_str').val( parseInt($('#status_time_str').val())-(parseInt($('#status_time_str').val())+8*3600)%86400 +vals[0]*3600+vals[1]*60);
|
|
|
+
|
|
|
+ var d=new Date(parseInt($('#status_time_str').val())*1000);
|
|
|
+
|
|
|
+ $('#status_time').datetimebox('setText',formatDate(d));
|
|
|
+ $('#status_time').datetimebox('hidePanel');
|
|
|
+ };
|
|
|
+
|
|
|
+ $('#status_time').datetimebox({
|
|
|
+ required: false,
|
|
|
+ showSeconds:false,
|
|
|
+ buttons:buttons1,
|
|
|
+ onSelect: function(date){
|
|
|
+ $('#status_time_str').val(date.getTime()/1000);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ var buttons2 = $.extend([], $.fn.datebox.defaults.buttons);
|
|
|
+ buttons2[0].text = '确定';
|
|
|
+ buttons2[0].handler=function(){
|
|
|
+ var vals = $('#server_end_time').datetimebox('spinner').spinner('getValue').split(':');
|
|
|
+ $('#server_end_time_str').val( parseInt($('#server_end_time_str').val())-(parseInt($('#server_end_time_str').val())+8*3600)%86400 +vals[0]*3600+vals[1]*60);
|
|
|
+
|
|
|
+ var d=new Date(parseInt($('#server_end_time_str').val())*1000);
|
|
|
+
|
|
|
+ $('#server_end_time').datetimebox('setText',formatDate(d));
|
|
|
+ $('#server_end_time').datetimebox('hidePanel');
|
|
|
+ };
|
|
|
$('#server_end_time').datetimebox({
|
|
|
required: false,
|
|
|
showSeconds:false,
|
|
|
+ buttons:buttons2,
|
|
|
+ onSelect: function(date){
|
|
|
+ $('#server_end_time_str').val(date.getTime()/1000);
|
|
|
+ }
|
|
|
});
|
|
|
+ var buttons3 = $.extend([], $.fn.datebox.defaults.buttons);
|
|
|
+ buttons3[0].text = '确定';
|
|
|
+ buttons3[0].handler=function(){
|
|
|
+ var vals = $('#yc_time').datetimebox('spinner').spinner('getValue').split(':');
|
|
|
+ $('#yc_time_str').val( parseInt($('#yc_time_str').val())-(parseInt($('#yc_time_str').val())+8*3600)%86400 +vals[0]*3600+vals[1]*60);
|
|
|
+
|
|
|
+ var d=new Date(parseInt($('#yc_time_str').val())*1000);
|
|
|
+
|
|
|
+ $('#yc_time').datetimebox('setText',formatDate(d));
|
|
|
+ $('#yc_time').datetimebox('hidePanel');
|
|
|
+ };
|
|
|
$('#yc_time').datetimebox({
|
|
|
required: false,
|
|
|
showSeconds:false,
|
|
|
+ buttons:buttons3,
|
|
|
+ onSelect: function(date){
|
|
|
+ $('#yc_time_str').val(date.getTime()/1000);
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
- var buttons = $.extend([], $.fn.datebox.defaults.buttons);
|
|
|
- buttons[0].text = '确定';
|
|
|
|
|
|
jq_setStatus.combobox({
|
|
|
editable: false,
|
|
@@ -404,6 +482,15 @@
|
|
|
return month+"月"+date+"日"+hour+":00";
|
|
|
}
|
|
|
},
|
|
|
+ {field:'status_time', title:'预约时间', width:70,sortable:true,formatter: function(value, row){
|
|
|
+ var now=new Date(value*1000);
|
|
|
+
|
|
|
+ var month=now.getMonth()+1;
|
|
|
+ var date=now.getDate();
|
|
|
+ var hour = now.getHours();
|
|
|
+ return month+"月"+date+"日"+hour+":00";
|
|
|
+ }
|
|
|
+ },
|
|
|
{field:'yc_time', title:'预产期', width:70,sortable:true,formatter: function(value, row){
|
|
|
var now=new Date(value*1000);
|
|
|
|
|
@@ -420,7 +507,7 @@
|
|
|
$('#id_str').html(data.id);
|
|
|
$('#id').html(data.id);
|
|
|
$('#user_name').html(data.user_name);
|
|
|
- $('#server_start_time').datetimebox('setValue', parse_time(data,'server_start_time'));
|
|
|
+ $('#server_start_time').datetimebox('setValue', parse_time(data,'server_start_time'));$('#status_time').datetimebox('setValue', parse_time(data,'status_time'));
|
|
|
$('#server_end_time').datetimebox('setValue', parse_time(data,'server_end_time'));
|
|
|
$('#yc_time').datetimebox('setValue', parse_time(data,'yc_time'));
|
|
|
$('#mobile').html(data.mobile);
|
|
@@ -428,7 +515,6 @@
|
|
|
$('#age').val(data.age);
|
|
|
$('#tech').val(data.tech);
|
|
|
$('#desc').val(data.desc);
|
|
|
- console.log(data)
|
|
|
jq_content_form.form('load', data);
|
|
|
$('#admins_edit_info').html('');
|
|
|
if (data['action_user'] != ''){
|
|
@@ -437,8 +523,33 @@
|
|
|
jq_action_info.html('');
|
|
|
}
|
|
|
|
|
|
+ },
|
|
|
+ onLoadSuccess: function(){
|
|
|
+
|
|
|
+ $(this).datagrid('clearChecked');
|
|
|
+ jq_content_form.form('clear');
|
|
|
+ $('#id_str').html('');
|
|
|
+ $('#id').html('');
|
|
|
+ $('#user_name').html('');
|
|
|
+ $('#server_start_time').datetimebox('setValue', '');
|
|
|
+ $('#status_time').datetimebox('setValue', '');
|
|
|
+ $('#server_end_time').datetimebox('setValue', '');
|
|
|
+ $('#yc_time').datetimebox('setValue', '');
|
|
|
+ $('#mobile').html('');
|
|
|
+ $('#address').html('');
|
|
|
+ $('#age').val('');
|
|
|
+ $('#tech').val('');
|
|
|
+ $('#desc').val('');
|
|
|
+ jq_content_form.form('load', data);
|
|
|
+ $('#admins_edit_info').html('');
|
|
|
+
|
|
|
+ jq_action_info.html('');
|
|
|
+
|
|
|
+ jq_dg_content.datagrid('clearSelections');
|
|
|
+ jq_setStatus.combobox('setValue', 100);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
});
|
|
|
|
|
|
jq_filter_status.combobox({
|
|
@@ -529,9 +640,6 @@
|
|
|
});
|
|
|
|
|
|
function save_content(){
|
|
|
- if ($('#recharge_id').val() == ""){
|
|
|
- return false;
|
|
|
- }
|
|
|
$.messager.progress();
|
|
|
jq_content_form.submit();
|
|
|
}
|