|
@@ -48,7 +48,115 @@
|
|
|
</div>
|
|
|
|
|
|
<div id="acc_container" class="accordion" region="center">
|
|
|
- <div region="center" title="添加投诉" data-options="iconCls:'icon-save',selected:true">
|
|
|
+ <div region="center" title="订单信息" data-options="iconCls:'icon-save',selected:true" style="overflow:auto;padding:10px;">
|
|
|
+ <div class="easyui-layout detail_layout">
|
|
|
+ <div data-options="region:'center'" class="detail_center">
|
|
|
+ <div class="detail_main">
|
|
|
+ <form id="order_content_form" method="post">
|
|
|
+ <ul>
|
|
|
+ <li class="f_item">
|
|
|
+ <div class="box">
|
|
|
+ <div class="f_label">
|
|
|
+ <span>ID: </span>
|
|
|
+ </div>
|
|
|
+ <div class="box_flex f_content">
|
|
|
+ <input type="hidden" name="porder_id" id="porder_id" value='' />
|
|
|
+ <span id="porder_id_str"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li class="f_item">
|
|
|
+ <div class="box">
|
|
|
+ <div class="f_label">
|
|
|
+ <span>地址: </span>
|
|
|
+ </div>
|
|
|
+ <div class="box_flex f_content">
|
|
|
+ <span id="address"></span>
|
|
|
+ </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="in_room_time" style="width: 250px;" />
|
|
|
+ <input type="hidden" name="in_room_time" id="in_room_time_str" >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li class="f_item">
|
|
|
+ <div class="box">
|
|
|
+ <div class="f_label">
|
|
|
+ <span>出房时间: </span>
|
|
|
+ </div>
|
|
|
+ <div class="box_flex f_content">
|
|
|
+
|
|
|
+ <div class="box_flex f_content">
|
|
|
+ <input id="out_room_time" style="width: 250px;" />
|
|
|
+ <input id="out_room_time_str" name="out_room_time" type="hidden" />
|
|
|
+ </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_edit" name="status_edit"/>
|
|
|
+ </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="edit_order_time" style="width: 250px;" />
|
|
|
+ <input id="edit_order_time_str" name="edit_order_time" type="hidden" />
|
|
|
+ </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="package_edit" name="package" style="width: 250px;" />
|
|
|
+ </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="edit_service_employer" name="service_employer" style="width: 250px;" />
|
|
|
+ <input id="edit_service_employer_phone" name="edit_service_employer_phone" style="width: 250px;" type="hidden" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <div data-options="region:'south'" class="detail_south">
|
|
|
+ <div class="detail_toolbar">
|
|
|
+ <a href="#" class="easyui-linkbutton set_button" iconCls="icon-save" onclick="save_order_content();return false;">保存</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div region="center" title="添加投诉" data-options="iconCls:'icon-save'">
|
|
|
<div class="easyui-layout detail_layout">
|
|
|
<div data-options="region:'center'" class="detail_center">
|
|
|
<div class="detail_main">
|
|
@@ -204,6 +312,7 @@
|
|
|
<script type="text/javascript">
|
|
|
var jq_dg_content = $('#dg_content');
|
|
|
var jq_content_form = $('#content_form');
|
|
|
+ var jq_order_content_form = $('#order_content_form');
|
|
|
var jq_filter_status = $('#filter_status');
|
|
|
var jq_setStatus_add = $('#setStatus_add');
|
|
|
var module_router = site_root + '/index.php?r=moonclub/POrder';
|
|
@@ -278,6 +387,75 @@
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ var buttons2 = $.extend([], $.fn.datebox.defaults.buttons);
|
|
|
+ buttons2[0].text = '确定';
|
|
|
+ buttons2[0].handler=function(){
|
|
|
+ var vals = $('#edit_order_time').datetimebox('spinner').spinner('getValue').split(':');
|
|
|
+ $('#edit_order_time').val( parseInt($('#edit_order_time').val())-(parseInt($('#edit_order_time').val())+8*3600)%86400 +vals[0]*3600+vals[1]*60);
|
|
|
+
|
|
|
+ var d=new Date(parseInt($('#edit_order_time').val())*1000);
|
|
|
+ $('#edit_order_time').datetimebox('setText',formatDate(d));
|
|
|
+ $('#edit_order_time').datetimebox('hidePanel');
|
|
|
+ };
|
|
|
+
|
|
|
+ $('#edit_order_time').datetimebox({
|
|
|
+ required: false,
|
|
|
+ showSeconds:false,
|
|
|
+ buttons:buttons2,
|
|
|
+ onSelect: function(date){
|
|
|
+ var currentDate = new Date();
|
|
|
+
|
|
|
+ $('#edit_order_time').val(date.getTime()/1000);
|
|
|
+ $('#edit_order_time_str').val(date.getTime()/1000);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+var buttons3 = $.extend([], $.fn.datebox.defaults.buttons);
|
|
|
+ buttons3[0].text = '确定';
|
|
|
+ buttons3[0].handler=function(){
|
|
|
+ var vals = $('#in_room_time').datetimebox('spinner').spinner('getValue').split(':');
|
|
|
+ $('#in_room_time').val( parseInt($('#in_room_time').val())-(parseInt($('#in_room_time').val())+8*3600)%86400 +vals[0]*3600+vals[1]*60);
|
|
|
+
|
|
|
+ var d=new Date(parseInt($('#in_room_time').val())*1000);
|
|
|
+ $('#in_room_time').datetimebox('setText',formatDate(d));
|
|
|
+ $('#in_room_time').datetimebox('hidePanel');
|
|
|
+ };
|
|
|
+
|
|
|
+ $('#in_room_time').datetimebox({
|
|
|
+ required: false,
|
|
|
+ showSeconds:false,
|
|
|
+ buttons:buttons3,
|
|
|
+ onSelect: function(date){
|
|
|
+ var currentDate = new Date();
|
|
|
+
|
|
|
+ $('#in_room_time').val(date.getTime()/1000);
|
|
|
+ $('#in_room_time_str').val(date.getTime()/1000);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+var buttons4 = $.extend([], $.fn.datebox.defaults.buttons);
|
|
|
+ buttons4[0].text = '确定';
|
|
|
+ buttons4[0].handler=function(){
|
|
|
+ var vals = $('#out_room_time').datetimebox('spinner').spinner('getValue').split(':');
|
|
|
+ $('#out_room_time').val( parseInt($('#out_room_time').val())-(parseInt($('#out_room_time').val())+8*3600)%86400 +vals[0]*3600+vals[1]*60);
|
|
|
+
|
|
|
+ var d=new Date(parseInt($('#out_room_time').val())*1000);
|
|
|
+ $('#out_room_time').datetimebox('setText',formatDate(d));
|
|
|
+ $('#out_room_time').datetimebox('hidePanel');
|
|
|
+ };
|
|
|
+
|
|
|
+ $('#out_room_time').datetimebox({
|
|
|
+ required: false,
|
|
|
+ showSeconds:false,
|
|
|
+ buttons:buttons4,
|
|
|
+ onSelect: function(date){
|
|
|
+ var currentDate = new Date();
|
|
|
+
|
|
|
+ $('#out_room_time').val(date.getTime()/1000);
|
|
|
+ $('#out_room_time_str').val(date.getTime()/1000);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -296,6 +474,22 @@
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
+//自动查询
|
|
|
+ $('#edit_service_employer').coolautosuggest({
|
|
|
+ url: "index.php?r=moonclub/POrder/GetUserInfo&user_name=",
|
|
|
+ showThumbnail: false,
|
|
|
+ showDescription: true,
|
|
|
+ onSelected: function (result) {
|
|
|
+ if (result != null) {
|
|
|
+ console.log(result)
|
|
|
+ $('#edit_service_employer').val(result.data)
|
|
|
+ $('#edit_service_employer_phone').val(result.description)
|
|
|
+
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
$('#pre_production_date').datetimebox({
|
|
|
required: false,
|
|
@@ -324,6 +518,16 @@
|
|
|
return type_temp;
|
|
|
})()
|
|
|
});
|
|
|
+ $('#package_edit').combobox({
|
|
|
+ editable : false,
|
|
|
+ data : (function () {
|
|
|
+ var type_temp = new Array();
|
|
|
+ $.extend(type_temp, package);
|
|
|
+ type_temp.shift();
|
|
|
+ return type_temp;
|
|
|
+ })()
|
|
|
+ });
|
|
|
+
|
|
|
|
|
|
|
|
|
jq_setStatus_add.combobox({
|
|
@@ -463,15 +667,39 @@
|
|
|
onSelect: function(index, row){
|
|
|
console.log(row)
|
|
|
$('#id_str').html(row.id);
|
|
|
+ $('#porder_id_str').html(row.id);
|
|
|
+ $('#address').html(row.address.floor+'楼'+row.address.room+'号');
|
|
|
+ $('#in_room_time').html(row.in_room_time);
|
|
|
+ $('#out_room_time').html(row.out_room_time);
|
|
|
+ $('#status_edit').combobox('setValue', row.status);
|
|
|
+ $('#package_edit').combobox('setValue', row.service_standards);
|
|
|
+ $('#edit_service_employer').val(row.service_employer_name);
|
|
|
+ $('#edit_order_time').datetimebox('setValue', parse_time(row,'order_time'));
|
|
|
+
|
|
|
+ date1 = row.in_room_time.replace(/年/g,'-');
|
|
|
+ date1 = date1.replace(/月/g,'-');
|
|
|
+ date1 = date1.replace(/日/g,'');
|
|
|
+
|
|
|
+ date = row.out_room_time.replace(/年/g,'-');
|
|
|
+ date = date.replace(/月/g,'-');
|
|
|
+ date = date.replace(/日/g,'');
|
|
|
+
|
|
|
+
|
|
|
+ console.log(date1);
|
|
|
+ $('#in_room_time').datetimebox('setValue',date1);
|
|
|
+ $('#out_room_time').datetimebox('setValue',date);
|
|
|
+ //$('#in_room_time').datetimebox('setValue', formatDate(in_time));
|
|
|
+
|
|
|
+ $('#porder_id').val(row.id);
|
|
|
$('#xorder_id').val(row.id);
|
|
|
- console.log(row.order_time*1000);
|
|
|
+ //console.log(row.order_time*1000);
|
|
|
|
|
|
$('#c_time').val(row.order_time*1000);
|
|
|
},
|
|
|
onLoadSuccess : function () {
|
|
|
|
|
|
jq_content_form.form('clear');
|
|
|
-
|
|
|
+ jq_order_content_form.form('clear');
|
|
|
jq_dg_content.datagrid('clearSelections');
|
|
|
jq_setStatus.combobox('setValue', 100);
|
|
|
$('#employe_id').val('')
|
|
@@ -500,6 +728,11 @@
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ $('#status_edit').combobox({
|
|
|
+ width: 100,
|
|
|
+ data: status_data,
|
|
|
+ });
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -541,7 +774,44 @@
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ jq_order_content_form.form({
|
|
|
+ url: module_router + '/edit',
|
|
|
+ onSubmit: function(param){
|
|
|
+ if ($('#xorder_id').val() == ""){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ var isValid = $(this).form('validate');
|
|
|
+ if (!isValid){
|
|
|
+ $.messager.progress('close');
|
|
|
+ }
|
|
|
+ return isValid;
|
|
|
+ },
|
|
|
+ success: function(res){
|
|
|
+ $.messager.progress('close');
|
|
|
+ var res = JSON.parse(res);
|
|
|
+
|
|
|
+ if (res.success){
|
|
|
+ jq_dg_content.datagrid('reload');
|
|
|
+ }
|
|
|
+ if(res.success){
|
|
|
+ $.messager.show({
|
|
|
+ title: '提示',
|
|
|
+ msg: '保存成功',
|
|
|
+ timeout: 3500,
|
|
|
+ showType: 'slide'
|
|
|
+ });
|
|
|
|
|
|
+ $('#technician_id').val(0);
|
|
|
+ }else{
|
|
|
+ $.messager.show({
|
|
|
+ title: '提示',
|
|
|
+ msg: res.message,
|
|
|
+ timeout: 3500,
|
|
|
+ showType: 'slide'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
jq_add_form.form({
|
|
|
url : module_router + '/add',
|
|
|
//url :'index.php?r=moonclub/xOrder/add',
|
|
@@ -626,11 +896,16 @@
|
|
|
$.messager.progress();
|
|
|
jq_content_form.submit();
|
|
|
}
|
|
|
+ function save_order_content(){
|
|
|
+ $.messager.progress();
|
|
|
+ jq_order_content_form.submit();
|
|
|
+ }
|
|
|
|
|
|
function add_content(){
|
|
|
jq_add_dialog.dialog('open');
|
|
|
}
|
|
|
function formatDate(now){
|
|
|
+
|
|
|
var year=now.getFullYear();
|
|
|
var month=now.getMonth()+1;
|
|
|
var date=now.getDate();
|
|
@@ -665,5 +940,22 @@
|
|
|
function export_order(exp,export_type) {
|
|
|
window.location.href = module_router+'/OutputExcel';
|
|
|
}
|
|
|
+ function parse_time(data,attr){
|
|
|
+ if(data[attr]){
|
|
|
+ var d=new Date(data[attr]*1000);
|
|
|
+ console.log(formatDate(d));
|
|
|
+ return formatDate(d);
|
|
|
+ }else{
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function parse_time1(attr){
|
|
|
+ if(attr){
|
|
|
+ var d=new Date(attr*1000);
|
|
|
|
|
|
+ return formatDate(d);
|
|
|
+ }else{
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ }
|
|
|
</script>
|