|
@@ -0,0 +1,752 @@
|
|
|
+<style>
|
|
|
+ .f_label {width: 90px;}
|
|
|
+ .accordion-body {padding: 0;}
|
|
|
+ #view_select_position {
|
|
|
+ display:inline-block;
|
|
|
+ padding:1px 4px 1px 4px;
|
|
|
+ border:1px solid #999999;
|
|
|
+ text-decoration:none;
|
|
|
+ color:#333333;
|
|
|
+ }
|
|
|
+</style>
|
|
|
+
|
|
|
+<div id="main">
|
|
|
+ <div region="west" border="false" id="west_panel">
|
|
|
+ <table id="dg_content"></table>
|
|
|
+ <div id="tb_content">
|
|
|
+
|
|
|
+ <div class="tb_line">
|
|
|
+ <span class="tb_label">状态: </span>
|
|
|
+ <input id="filter_status" />
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!--<div style="margin: 3px 2px;padding:5px;border: 1px solid #95B8E7;">
|
|
|
+ <a href="#" class='easyui-linkbutton' plain="true" iconCls="icon-add" onclick="add_content();return false;">新增订单</a>
|
|
|
+ </div>-->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div id="acc_container" class="accordion" region="center">
|
|
|
+ <div region="center" title="投诉信息" data-options="iconCls:'icon-save',selected:true">
|
|
|
+ <div class="easyui-layout detail_layout">
|
|
|
+ <div data-options="region:'center'" class="detail_center">
|
|
|
+ <div class="detail_main">
|
|
|
+ <form id="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="id" id="xorder_id" value='' />
|
|
|
+ <span id="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">
|
|
|
+ <input id="c_time" name="c_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 name="user_name" id="user_name" />
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li class="f_item">
|
|
|
+ <div class="box">
|
|
|
+ <div class="f_label">
|
|
|
+ <span>投诉信息: </span>
|
|
|
+ </div>
|
|
|
+ <div class="box_flex f_content">
|
|
|
+ <input name="c_info" id="c_info" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li class="f_item">
|
|
|
+ <div class="box">
|
|
|
+ <div class="f_label">
|
|
|
+ <span id="s_time">处理结果: </span>
|
|
|
+ </div>
|
|
|
+ <div class="box_flex f_content">
|
|
|
+ <input id="result" name="result" type="text" >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li class="f_item">
|
|
|
+ <div class="box">
|
|
|
+ <div class="f_label">
|
|
|
+ <span id="s_time">客户意见: </span>
|
|
|
+ </div>
|
|
|
+ <div class="box_flex f_content">
|
|
|
+ <input id="feedback" name="feedback" type="text" >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+
|
|
|
+ <li class="f_item">
|
|
|
+ <div class="box">
|
|
|
+ <div class="f_label">
|
|
|
+ <span>备注: </span>
|
|
|
+ </div>
|
|
|
+ <div class="box_flex f_content">
|
|
|
+ <textarea id="desc" name="desc" style="width: 250px;min-height: 50px" ></textarea>
|
|
|
+ </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_content();return false;">保存</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<div style="display: none;">
|
|
|
+ <div id="add_dialog" style="padding: 15px 0;">
|
|
|
+
|
|
|
+ <form id="add_form" method="post">
|
|
|
+
|
|
|
+ <ul>
|
|
|
+ <li class="f_item">
|
|
|
+ <div class="box">
|
|
|
+ <div class="f_label">
|
|
|
+ <span>客户手机号: </span>
|
|
|
+ </div>
|
|
|
+ <div class="box_flex f_content">
|
|
|
+ <input id="user_phone" name="user_phone" 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="user_name" name="user_name" 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="houserkeeper" name="houserkeeper" 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="sign_name" name="sign_name" 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="pre_production_date" name="pre_production_date" 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="production_date" name="production_date" 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="hospital" name="hospital" 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 type="radio" id="baby_sex" name="baby_sex" value="1" checked />男
|
|
|
+ <input type="radio" name="baby_sex" value="0" />女
|
|
|
+ </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" 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="add_address" name="address" style="width: 250px;" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </ul>
|
|
|
+
|
|
|
+
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+
|
|
|
+</div>
|
|
|
+<div style="display:none;">
|
|
|
+ <div id="refund_tip_dialog" style="padding: 30px 0;">
|
|
|
+ <div style="text-align:center;"><span id="refund_tip"></span></div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<script language="javascript" type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/coolautosuggest/jquery.coolautosuggest.js"></script>
|
|
|
+<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/js/coolautosuggest/jquery.coolautosuggest.css" />
|
|
|
+<script type="text/javascript">
|
|
|
+ var jq_dg_content = $('#dg_content');
|
|
|
+ var jq_content_form = $('#content_form');
|
|
|
+ var jq_filter_status = $('#filter_status');
|
|
|
+ var jq_setStatus_add = $('#setStatus_add');
|
|
|
+ var module_router = site_root + '/index.php?r=moonclub/Complaints';
|
|
|
+ var status_data = <?php echo json_encode($status); ?>;
|
|
|
+ var package = <?php echo json_encode($package_product); ?>;
|
|
|
+ var jq_setStatus = $('#setStatus');
|
|
|
+ var w_width = $(window).width();
|
|
|
+ var w_height = $(window).height();
|
|
|
+ var jq_ss = $('#ss');
|
|
|
+ var jq_add_dialog = $('#add_dialog');
|
|
|
+ var jq_add_form = $('#add_form');
|
|
|
+
|
|
|
+ var jq_set_precedence = $('#set_precedence');
|
|
|
+ var tmp = 1;
|
|
|
+
|
|
|
+ var jq_acc = $('#acc_container');
|
|
|
+ var jq_package_product = $('#package');
|
|
|
+
|
|
|
+ $(function(){
|
|
|
+
|
|
|
+ jq_acc.accordion({
|
|
|
+ height: w_height - 18,
|
|
|
+ onSelect: function(title) {
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ var buttons0 = $.extend([], $.fn.datebox.defaults.buttons);
|
|
|
+ buttons0[0].text = '确定';
|
|
|
+ buttons0[0].handler=function(){
|
|
|
+ var vals = $('#booking_time').datetimebox('spinner').spinner('getValue').split(':');
|
|
|
+ $('#booking_time_str').val( parseInt($('#booking_time_str').val())-(parseInt($('#booking_time_str').val())+8*3600)%86400 +vals[0]*3600+vals[1]*60);
|
|
|
+
|
|
|
+ var d=new Date(parseInt($('#booking_time_str').val())*1000);
|
|
|
+ $('#booking_time').datetimebox('setText',formatDate(d));
|
|
|
+ $('#booking_time').datetimebox('hidePanel');
|
|
|
+ };
|
|
|
+
|
|
|
+ $('#booking_time').datetimebox({
|
|
|
+ required: false,
|
|
|
+ showSeconds:false,
|
|
|
+ buttons:buttons0,
|
|
|
+ onSelect: function(date){
|
|
|
+ var currentDate = new Date();
|
|
|
+ $('#booking_time_str').val(date.getTime()/1000);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ var buttons1 = $.extend([], $.fn.datebox.defaults.buttons);
|
|
|
+ buttons1[0].text = '确定';
|
|
|
+ buttons1[0].handler=function(){
|
|
|
+ var vals = $('#start_time').datetimebox('spinner').spinner('getValue').split(':');
|
|
|
+ $('#start_time_str').val( parseInt($('#start_time_str').val())-(parseInt($('#start_time_str').val())+8*3600)%86400 +vals[0]*3600+vals[1]*60);
|
|
|
+
|
|
|
+ var d=new Date(parseInt($('#start_time_str').val())*1000);
|
|
|
+ $('#start_time').datetimebox('setText',formatDate(d));
|
|
|
+ $('#start_time').datetimebox('hidePanel');
|
|
|
+ };
|
|
|
+
|
|
|
+ $('#start_time').datetimebox({
|
|
|
+ required: false,
|
|
|
+ showSeconds:false,
|
|
|
+ buttons:buttons1,
|
|
|
+ onSelect: function(date){
|
|
|
+ var currentDate = new Date();
|
|
|
+ $('#start_time_str').val(date.getTime()/1000);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ var buttons2 = $.extend([], $.fn.datebox.defaults.buttons);
|
|
|
+ buttons2[0].text = '确定';
|
|
|
+ buttons2[0].handler=function(){
|
|
|
+ var vals = $('#report_time').datetimebox('spinner').spinner('getValue').split(':');
|
|
|
+ $('#report_time_str').val( parseInt($('#report_time_str').val())-(parseInt($('#report_time_str').val())+8*3600)%86400 +vals[0]*3600+vals[1]*60);
|
|
|
+
|
|
|
+ var d=new Date(parseInt($('#report_time_str').val())*1000);
|
|
|
+ $('#report_time').datetimebox('setText',formatDate(d));
|
|
|
+ $('#report_time').datetimebox('hidePanel');
|
|
|
+ };
|
|
|
+
|
|
|
+ $('#report_time').datetimebox({
|
|
|
+ required: false,
|
|
|
+ showSeconds:false,
|
|
|
+ buttons:buttons2,
|
|
|
+ onSelect: function(date){
|
|
|
+ var currentDate = new Date();
|
|
|
+ $('#report_time_str').val(date.getTime()/1000);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //自动查询
|
|
|
+ $('#user_phone').coolautosuggest({
|
|
|
+ url: "index.php?r=moonclub/xOrder/GetUserInfo&mobile=",
|
|
|
+ showThumbnail: false,
|
|
|
+ showDescription: true,
|
|
|
+ onSelected: function (result) {
|
|
|
+ if (result != null) {
|
|
|
+ console.log(result)
|
|
|
+ $('#user_name').val(result.data)
|
|
|
+ $('#user_phone').val(result.description)
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ //自动查询
|
|
|
+ $('#houserkeeper').coolautosuggest({
|
|
|
+ url: "index.php?r=moonclub/xOrder/GetHouserKeeperInfo&houser_keeper=",
|
|
|
+ showThumbnail: false,
|
|
|
+ showDescription: true,
|
|
|
+ onSelected: function (result) {
|
|
|
+ if (result != null) {
|
|
|
+ console.log(result)
|
|
|
+ // $('#houserkeeper').val(result.data)
|
|
|
+ // $('#user_phone').val(result.description)
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ $('#pre_production_date').datetimebox({
|
|
|
+ required: false,
|
|
|
+ showSeconds:false,
|
|
|
+ //buttons:buttons_add,
|
|
|
+ // onSelect: function(date){
|
|
|
+ // var currentDate = new Date();
|
|
|
+ // $('#order_time_str_add').val(date.getTime()/1000);
|
|
|
+ // }
|
|
|
+ });
|
|
|
+ $('#production_date').datetimebox({
|
|
|
+ required: false,
|
|
|
+ showSeconds:false,
|
|
|
+ //buttons:buttons_add,
|
|
|
+ // onSelect: function(date){
|
|
|
+ // var currentDate = new Date();
|
|
|
+ // $('#order_time_str_add').val(date.getTime()/1000);
|
|
|
+ // }
|
|
|
+ });
|
|
|
+ jq_package_product.combobox({
|
|
|
+ editable : false,
|
|
|
+ data : (function () {
|
|
|
+ var type_temp = new Array();
|
|
|
+ $.extend(type_temp, package);
|
|
|
+ type_temp.shift();
|
|
|
+ return type_temp;
|
|
|
+ })()
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ var buttons = $.extend([], $.fn.datebox.defaults.buttons);
|
|
|
+ buttons[0].text = '确定';
|
|
|
+
|
|
|
+ jq_setStatus.combobox({
|
|
|
+ editable: false,
|
|
|
+ data: status_data,
|
|
|
+ onSelect: function(res){
|
|
|
+ //自动查询
|
|
|
+ $('#employer_name').coolautosuggest({
|
|
|
+ url: "index.php?r=moonclub/employe/EmployerDetail&auth="+res.value+"&user_name=",
|
|
|
+ showThumbnail: false,
|
|
|
+ showDescription: true,
|
|
|
+ onSelected: function (result) {
|
|
|
+ if (result != null) {
|
|
|
+ console.log(result)
|
|
|
+ $('#employe_id').val(result.description)
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (res.value == 0) {
|
|
|
+ $('#report_show').show();
|
|
|
+ } else {
|
|
|
+ $('#report_show').hide();
|
|
|
+ }
|
|
|
+ switch (res.value) {
|
|
|
+ case 0:$('#s_time').html('预约日期');$('#e_time').html('诊脉日期');break;
|
|
|
+ case 1:$('#s_time').html('预约日期');$('#e_time').html('确认日期');break;
|
|
|
+ case 2:$('#s_time').html('预约日期');$('#e_time').html('保洁日期');break;
|
|
|
+ case 3:$('#s_time').html('上岗日期');$('#e_time').html('结束日期');break;
|
|
|
+ case 4:$('#s_time').html('预约日期');$('#e_time').html('催乳日期');break;
|
|
|
+ case 5:$('#s_time').html('开始日期');$('#e_time').html('结束日期');break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ jq_setStatus_add.combobox({
|
|
|
+ editable: false,
|
|
|
+ data: (function () {
|
|
|
+ var status_data_temp = new Array();
|
|
|
+ $.extend(status_data_temp, status_data);
|
|
|
+ status_data_temp.shift();
|
|
|
+
|
|
|
+ return status_data_temp;
|
|
|
+ })()
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ var p_width = parseInt(w_width / 2);
|
|
|
+ if (p_width < 520){
|
|
|
+ p_width = 520;
|
|
|
+ }
|
|
|
+ var d_width = p_width - 10;
|
|
|
+ $('#west_panel').css({width : p_width});
|
|
|
+ $('#main').css({width: w_width - 25, height: w_height - 18}).layout();
|
|
|
+
|
|
|
+ jq_ss.searchbox({
|
|
|
+ width: 130,
|
|
|
+ searcher:function(value){
|
|
|
+ search_content();
|
|
|
+ },
|
|
|
+ prompt: '请输入关键字'
|
|
|
+ });
|
|
|
+
|
|
|
+ jq_add_dialog.dialog({
|
|
|
+ title: '新建订单',
|
|
|
+ width: 500,
|
|
|
+ height: 500,
|
|
|
+ closed: true,
|
|
|
+ modal: true,
|
|
|
+ buttons:[{
|
|
|
+ text: '确认',
|
|
|
+ iconCls: 'icon-ok',
|
|
|
+ handler: function(){
|
|
|
+ // ------ 数据完整性检查 ------
|
|
|
+ var check = checkAddForm();
|
|
|
+ if (!check) {
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ $.messager.progress();
|
|
|
+ jq_add_form.submit();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },{
|
|
|
+ text: '取消',
|
|
|
+ iconCls: 'icon-cancel',
|
|
|
+ handler: function(){
|
|
|
+ jq_add_dialog.dialog('close');
|
|
|
+ }
|
|
|
+ }],
|
|
|
+ onOpen:function(){
|
|
|
+ jq_add_form.form('clear');
|
|
|
+ jq_add_form.form('load', {});
|
|
|
+ jq_set_precedence.combobox('setValue', 0);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ jq_dg_content.datagrid({
|
|
|
+ url: module_router + '/list',
|
|
|
+ title: '投诉列表',
|
|
|
+ width: d_width,
|
|
|
+ height: w_height - 18,
|
|
|
+ fitColumns: true,
|
|
|
+ autoRowHeight: true,
|
|
|
+ striped: true,
|
|
|
+ toolbar: '#tb_content',
|
|
|
+ singleSelect: true,
|
|
|
+ selectOnCheck: false,
|
|
|
+ checkOnSelect: false,
|
|
|
+ rowStyler: function(index,row){
|
|
|
+ if (row.status==1){
|
|
|
+ //return 'color:red;';
|
|
|
+ }else if(row.status==-3){
|
|
|
+ return 'color:green;';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ pagination: true,
|
|
|
+ pageList: [20, 30, 50],
|
|
|
+ pageSize: 20,
|
|
|
+ nowrap: false,
|
|
|
+ idField: 'id',
|
|
|
+ sortName: 'order_time',
|
|
|
+ sortOrder: 'desc',
|
|
|
+ queryParams: get_param_obj(),
|
|
|
+ frozenColumns:[[
|
|
|
+ {field:'ck',checkbox:true}
|
|
|
+ ]],
|
|
|
+ columns:[[
|
|
|
+ {field:'id', title:'id', hidden:true},
|
|
|
+ {field:'p_id', title:'工单号', width:25,sortable:false},
|
|
|
+ {field:'user_name', title:'客户姓名', width:25,sortable:false},
|
|
|
+ {field:'employer', title:'服务人员', width:25,sortable:false},
|
|
|
+ {field:'result', title:'处理结果', width:25,sortable:false},
|
|
|
+ {field:'feedback', title:'客户意见', width:25,sortable:false},
|
|
|
+ {field:'desc', title:'备注', width:25,sortable:false},
|
|
|
+ {field:'address', title:'地址', width:25,sortable:false,formatter: function(value, row){
|
|
|
+
|
|
|
+ return value.floor +'楼'+value.room+'号';
|
|
|
+ }},
|
|
|
+
|
|
|
+ {field:'com_time', title:'下单时间', width:25,sortable:false,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";
|
|
|
+ }}
|
|
|
+ ]],
|
|
|
+
|
|
|
+ onSelect: function(index, row){
|
|
|
+ console.log(row)
|
|
|
+ $('#id_str').html(row.id);
|
|
|
+ $('#xorder_id').val(row.id);
|
|
|
+ },
|
|
|
+ onLoadSuccess : function () {
|
|
|
+
|
|
|
+ jq_content_form.form('clear');
|
|
|
+
|
|
|
+ jq_dg_content.datagrid('clearSelections');
|
|
|
+ jq_setStatus.combobox('setValue', 100);
|
|
|
+ $('#employe_id').val('')
|
|
|
+ $('#id_str').html('');
|
|
|
+ $('#xorder_id').val('');
|
|
|
+ $('#employer_name').val('');
|
|
|
+ $('#address').val('');
|
|
|
+ $('#').val('');
|
|
|
+ $('#booking_time_str').val('');
|
|
|
+ $('#start_time').val('');
|
|
|
+ $('#start_time_str').val('');
|
|
|
+ $('#report_time').val('');
|
|
|
+ $('#jq_auth_info').val('');
|
|
|
+ $('#desc').val('');
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ jq_filter_status.combobox({
|
|
|
+ width: 100,
|
|
|
+ data: status_data,
|
|
|
+ editable: false,
|
|
|
+ onSelect: function(){
|
|
|
+ search_content();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ jq_content_form.form({
|
|
|
+ url: module_router + '/AddTechInfo',
|
|
|
+ onSubmit: function(param){
|
|
|
+ if ($('#order_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',
|
|
|
+ onSubmit : function (param) {
|
|
|
+ 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) {
|
|
|
+ $.messager.show({
|
|
|
+ title : '提示',
|
|
|
+ msg : '保存成功',
|
|
|
+ timeout : 3500,
|
|
|
+ showType : 'slide'
|
|
|
+ });
|
|
|
+ jq_add_dialog.dialog('close');
|
|
|
+ jq_dg_content.datagrid('reload');
|
|
|
+ } else {
|
|
|
+ $.messager.show({
|
|
|
+ title : '提示',
|
|
|
+ msg : res.message,
|
|
|
+ timeout : 3500,
|
|
|
+ showType : 'slide'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ function search_content(){
|
|
|
+
|
|
|
+ var filter_status = jq_filter_status.combobox('getValue');
|
|
|
+
|
|
|
+ jq_dg_content.datagrid({
|
|
|
+ pageNum: 1,
|
|
|
+ queryParams: {
|
|
|
+ status : filter_status
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ };
|
|
|
+
|
|
|
+ function checkAddForm () {
|
|
|
+ // 空数据检查
|
|
|
+
|
|
|
+
|
|
|
+ if ($('#user_phone').val() == '') {
|
|
|
+ $.messager.alert('提示', '请输入客户手机号', 'warning');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if ($('#sign_name').val() == '') {
|
|
|
+ $.messager.alert('提示', '请输入签约人名称', 'warning');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if ($('#houserkeeper').val() == '') {
|
|
|
+ $.messager.alert('提示', '请输入管家姓名', 'warning');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if ($('#pre_production_date').datebox('getValue') == '') {
|
|
|
+ $.messager.alert('提示', '请选择预产日期', 'warning');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if ($('#production_date').datebox('getValue') == '') {
|
|
|
+ $.messager.alert('提示', '请选择生产日期', 'warning');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if ($('#hospital').val() == '') {
|
|
|
+ $.messager.alert('提示', '请输入医院名称', 'warning');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if ($('#package').combobox('getValue') == '') {
|
|
|
+ $.messager.alert('提示', '请选择产品套餐', 'warning');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if ($('#add_address').val() == '') {
|
|
|
+ $.messager.alert('提示', '请输入月子地址', 'warning');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ function save_content(){
|
|
|
+ $.messager.progress();
|
|
|
+ jq_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();
|
|
|
+ var hour = now.getHours();
|
|
|
+ var minute = now.getMinutes();
|
|
|
+ return year+"-"+month+"-"+date+" "+hour+":"+minute;
|
|
|
+ }
|
|
|
+
|
|
|
+</script>
|