You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

652 lines
25 KiB

  1. /**
  2. * Created by luocj on 2016/9/24.
  3. */
  4. var tr_order_str = $('#tr_order').prop('outerHTML');//获取tr中所有的字符串
  5. var order_status = 0;
  6. var start_date = '';
  7. var end_date = '';
  8. var province = $("#province").val();
  9. var city = $("#city").val();
  10. var hotel_name = $("#hotel_name").val();
  11. var org_id = $("#org_id").val();
  12. var more_search = $("#more_search").val();
  13. var date_type = $('#date_type').val();
  14. var confirm_number = $('#confirm_number').val();
  15. var yesterday = '';
  16. var today = '';
  17. var thisweekstartdate = '';
  18. var thisweekenddate = '';
  19. var thismonthstartdate = '';
  20. var thismonthenddate = '';
  21. var user_id = 1;
  22. var current = '1';
  23. var page_size = '10';
  24. var memodiv = $('.memo1').prop('outerHTML');
  25. var firstLoad = true;
  26. window.onload = function () {
  27. $("#start_date").val(getDateByDay(-3, getDateTime(0)));
  28. start_date = getDateByDay(-3, getDateTime(0));
  29. $("#end_date").val(getDateTime(0));
  30. end_date = getDateTime(0);
  31. // var url = base_api + "?type=order_HotelOrderList&op=order_list&date_type=" + date_type + "&start_date=" + start_date + "&end_date=" + end_date + "&province=" + province + "&city=" + city + "&hotel_name=" + hotel_name + "&order_status=" + order_status + "&org_id=" + org_id + "&more_search=" + more_search +"&current="+current +"&page_size="+page_size;
  32. getHotelList();
  33. getOrgList(base_api + "?type=order_HotelOrderList&op=org_list");
  34. provinceHTML = $('#province').html();
  35. cityHTML = $('#city').html();
  36. var apiurl = base_api + "?type=hotel_AddHotelProduct&op=provinceCity &area_id=";
  37. ZZLog(apiurl);
  38. $.getJSON(apiurl, function (res_data) {
  39. ZZLog(res_data);
  40. if (res_data['code'] != "0") {
  41. ZZAlertInfo(res_data['info']);
  42. } else {
  43. //地区
  44. var area_list = res_data['area_list'];
  45. var areaHTML = '<option value="0" style="font-size:12px;">选择省</option>';
  46. for (var i = 0, m = area_list.length; i < m; i++) {
  47. var tempDict = area_list[i];
  48. var tempHTML = provinceHTML;
  49. tempHTML = tempHTML.replace('选择省', tempDict['area_name']);
  50. tempHTML = tempHTML.replace('0', tempDict['area_id']);
  51. areaHTML += tempHTML;
  52. }
  53. $('#province').html(areaHTML);
  54. $('#province')[0].selectedIndex = 0;
  55. }
  56. })
  57. excel();
  58. };
  59. //获取订单列表
  60. function getHotelList() {
  61. start_date = $('#start_date').val();
  62. end_date = $('#end_date').val();
  63. province = $("#province").val();
  64. city = $("#city").val();
  65. hotel_name = $("#hotel_name").val();
  66. org_id = $("#org_id").val();
  67. more_search = $("#more_search").val();
  68. date_type = $("#date_type").val();
  69. confirm_number = $('#confirm_number').val();
  70. var com_url = base_api + "?type=order_HotelOrderList&op=order_list&date_type=" + date_type + "&start_date=" + start_date + "&end_date=" + end_date + "&province=" + province + "&city=" + city + "&hotel_name=" + hotel_name + "&order_status=" + order_status + "&org_id=" + org_id + "&more_search=" + more_search + "&current=" + current + "&page_size=" + page_size + "&confirm_number=" + confirm_number;
  71. ZZLog(com_url);
  72. if (!firstLoad)
  73. loading();
  74. firstLoad = false;
  75. $.getJSON(com_url, function (data) {
  76. closeLoading();
  77. ZZLog(data);
  78. setDataBody(data);
  79. if (data['total_count'] < 0) {
  80. $('.pageDiv').hide();
  81. } else {
  82. $(".pageDiv").createPage({
  83. pageCount: data['total_page'],//总页数
  84. current: current,//当前页
  85. turndown: 'true',//是否显示跳转框,显示为true,不现实为false,一定记得加上引号...
  86. backFn: function (p) {
  87. current = p;
  88. havePageData();
  89. }
  90. });
  91. $('.pageDiv').show();
  92. }
  93. }).error(function (msg) {
  94. closeLoading();
  95. });
  96. }
  97. //替换订单主体
  98. function setDataBody(data) {
  99. var order_list = data['order_list'];
  100. var comHTML = '';
  101. for (var i = 0; i < order_list.length; i++) {
  102. var dict = order_list[i];
  103. var HTML = tr_order_str;
  104. var order_id = dict['order_id'];
  105. var order_status_name = dict['order_status_name'];
  106. var org_name = dict['org_name'];
  107. var status_txt = '';
  108. //var order_info = filterRepeatStr(dict['order_description']);
  109. HTML = HTML.replace('[订单编号]', dict['order_id'] === null ? '-' : dict['order_id']);
  110. HTML = HTML.replace('[order_id]', dict['order_id'] === null ? '-' : dict['order_id']);
  111. HTML = HTML.replace('[order_status]', dict['order_status_name'] === null ? '-' : dict['order_status_name']);
  112. HTML = HTML.replace('[org_name]', dict['org_name'] === null ? '-' : dict['org_name']);
  113. HTML = HTML.replace('[org_id]', dict['org_id'] === null ? '-' : dict['org_id']);
  114. HTML = HTML.replace('[room_type]', dict['room_type'] === null ? '-' : dict['room_type']);
  115. HTML = HTML.replace('[hotel_id]', dict['hotel_id'] === null ? '-' : dict['hotel_id']);
  116. HTML = HTML.replace('[预订时间]', dict['create_time'] === null ? '-' : dict['create_time']);
  117. HTML = HTML.replace('[供应商]', dict['prod_supply_org_name'] === null ? '-' : dict['prod_supply_org_name']);
  118. HTML = HTML.replace('[预订产品]', dict['hotel_name'] + '&nbsp;' + dict['zifangxing'] + '<br/><span class="short-text" title="' + dict['order_description'] + '">' + dict['order_description'] + '</span>');
  119. HTML = HTML.replace('[客人信息]', dict['customer_name'] + '<br />' + dict['customer_mobile']);
  120. HTML = HTML.replace('[订单渠道]', dict['org_name'] === null ? '-' : dict['org_name'] + '<br/>');
  121. HTML = HTML.replace('[订单金额]', '¥' + dict['order_price']);
  122. HTML = HTML.replace('[支付方式]', dict['order_pay_type'] === null ? '-' : dict['order_pay_type']);
  123. //取消状态的订单要显示
  124. if ((dict['order_status'] == 148 || dict['order_status'] == 383) && dict['cancel_reason']) {
  125. status_txt = '<a href="javascritp:;" onclick="ZZAlertInfo(\'' + dict['cancel_reason'] + '\')">' + dict['order_status_name'] + '</a>';
  126. } else {
  127. status_txt = dict['order_status_name'];
  128. }
  129. HTML = HTML.replace('[状态]', status_txt);
  130. var order_id = dict['order_id'];
  131. var order_status = dict['order_status'];
  132. var hotel_id = dict['hotel_id'];
  133. var parent_room_type = dict['parent_room_type'];
  134. var room_type = dict['room_type'];
  135. var org_name = dict['org_name'];
  136. var org_id = dict['org_id'];
  137. var modify = ' <a onclick="modify_order(' + order_status + ',' + order_id + ',' + org_id + ',' + hotel_id + ',' + parent_room_type + ',' + room_type + ',\'' + org_name + '\')" style="cursor: pointer">修改</a>&nbsp;';
  138. var cancel = ' <a onclick="cancel_order(' + order_id + ',' + order_status + ',148)" style="cursor: pointer">取消</a> &nbsp;';
  139. var confirm = ' <a onclick="make_sure(' + order_id + ',' + order_status + ')" style="cursor: pointer">确认</a>&nbsp;';
  140. var send = ' <a style="cursor: pointer" onclick="billing(' + order_id + ',' + order_status + ')">发送确认单</a>&nbsp;';
  141. var sp_deal = ' <a style="cursor: pointer" onclick="showMB(' + order_id + ',' + order_status + ',\'' + order_status_name + '\')">异常订单处理</a>&nbsp;';
  142. if (dict['order_status'] == 145) {
  143. var cstr145 = modify + cancel;
  144. HTML = HTML.replace('[操作]', cstr145);
  145. } else if (dict['order_status'] == 313) {
  146. var cstr313 = modify + cancel + send;
  147. HTML = HTML.replace('[操作]', cstr313)
  148. } else if (dict['order_status'] == 198) {
  149. var cstr198 = confirm + sp_deal;
  150. HTML = HTML.replace('[操作]', cstr198)
  151. } else if (dict['order_status'] == 314) {
  152. HTML = HTML.replace('[操作]', sp_deal)
  153. } else if (dict['order_status'] == 382) { //已安排的订单 异常操作处理了,
  154. cancel = '<a onclick="cancel_order(' + order_id + ',' + order_status + ',383)" style="cursor: pointer"> 取消&nbsp; </a>';
  155. var cstr313 = modify + cancel + send;
  156. HTML = HTML.replace('[操作]', cstr313)
  157. } else if (dict['order_status'] == 383) {
  158. HTML = HTML.replace('[操作]', '-')
  159. HTML = HTML.replace('[font-color]', 'color: gray');
  160. }
  161. // else if (dict['order_status'] == 314 && dict['order_pay_type'] == '现金支付') {
  162. // HTML = HTML.replace('[操作]', sp_deal)
  163. // } else if (dict['order_status'] == 314 && dict['order_pay_type'] == '微信支付') {
  164. // var cstr314wx = modify;
  165. // HTML = HTML.replace('[操作]', cstr314wx)
  166. // }
  167. else if (dict['order_status'] == 147) {
  168. var cstr147 = modify + cancel;
  169. HTML = HTML.replace('[操作]', cstr147)
  170. } else if (dict['order_status'] == 148 || dict['order_status'] == 383) {
  171. HTML = HTML.replace('[操作]', '—');
  172. HTML = HTML.replace('[font-color]', 'color: #cccccc');
  173. }
  174. //公共备注
  175. if (dict['memo_flag'] != '') {
  176. HTML = HTML.replace('[公共备注]', '<a style="cursor: pointer" onclick="remarks(\'' + dict["memo_flag"] + '\')">有</a>')
  177. } else {
  178. HTML = HTML.replace('[公共备注]', '无')
  179. }
  180. comHTML += HTML;
  181. }
  182. $('#order_list').html(comHTML);
  183. $('#order_list').show();
  184. }
  185. function havePageData() {
  186. start_date = $('#start_date').val();
  187. end_date = $('#end_date').val();
  188. province = $("#province").val();
  189. city = $("#city").val();
  190. hotel_name = $("#hotel_name").val();
  191. org_id = $("#org_id").val();
  192. more_search = $("#more_search").val();
  193. date_type = $("#date_type").val();
  194. var com_url = base_api + "?type=order_HotelOrderList&op=order_list&date_type=" + date_type + "&start_date=" + start_date + "&end_date=" + end_date + "&province=" + province + "&city=" + city + "&hotel_name=" + hotel_name + "&order_status=" + order_status + "&org_id=" + org_id + "&more_search=" + more_search + "&current=" + current + "&page_size=" + page_size;
  195. ZZLog(com_url);
  196. $.getJSON(com_url, function (data) {
  197. ZZLog(data);
  198. if (data['code'] != "0") {
  199. ZZAlertInfo(data['info']);
  200. } else {
  201. setDataBody(data);
  202. }
  203. })
  204. }
  205. //获取订单渠道列表
  206. function getOrgList(url) {
  207. ZZLog(url);
  208. $.getJSON(url, function (data) {
  209. ZZLog(data);
  210. var org_list = data['org_list'];
  211. var sumHTML = $('#org_id').prop('outerHTML');
  212. for (var i = 0; i < org_list.length; i++) {
  213. var dict = org_list[i];
  214. var orgHTML = "<option value=0 style='font-size: 12px;'>请选择</option>";
  215. orgHTML = orgHTML.replace('请选择', dict['org_name']);
  216. orgHTML = orgHTML.replace('value=0', 'value=' + dict['org_id']);
  217. sumHTML += orgHTML;
  218. }
  219. $('#org_id').html(sumHTML);
  220. $('.select_line').comboSelect();
  221. })
  222. }
  223. $(document).ready(function () {
  224. //点击查询
  225. $('#search').bind('click', function () {
  226. getHotelList();
  227. });
  228. //昨日日期
  229. $('#yesterday').bind('click', function () {
  230. $("#start_date").val(getDateTime(10));
  231. $("#end_date").val(getDateTime(10));
  232. getHotelList();
  233. });
  234. //今日日期
  235. $('#today').bind('click', function () {
  236. $("#start_date").val(getDateTime(0));
  237. $("#end_date").val(getDateTime(0));
  238. getHotelList();
  239. });
  240. //本周日期
  241. $('#thisweek').bind('click', function () {
  242. $("#start_date").val(after(getDateTime(12)));
  243. $("#end_date").val(after(getDateTime(13)));
  244. getHotelList();
  245. });
  246. //本月日期
  247. $('#thismonth').bind('click', function () {
  248. $("#start_date").val(getDateTime(14));
  249. $("#end_date").val(getDateTime(15));
  250. getHotelList();
  251. });
  252. //选择省的事件
  253. $('#province').bind('change', function () {
  254. var area_id = $(this).val();
  255. if (area_id == "0" || area_id == "") {
  256. $('#city').html(cityHTML);
  257. return;
  258. }
  259. var url = base_api + "?type=hotel_AddHotelProduct&op=provinceCity&area_id=" + area_id;
  260. ZZLog(url);
  261. $.getJSON(url, function (res_data) {
  262. ZZLog(res_data);
  263. if (res_data['code'] != "0") {
  264. ZZAlertInfo(res_data['info']);
  265. } else {
  266. //地区
  267. var area_list = res_data['area_list'];
  268. var areaHTML = '<option value="0" style="font-size: 12px;">选择市</option>';
  269. for (var i = 0, m = area_list.length; i < m; i++) {
  270. var tempDict = area_list[i];
  271. var tempHTML = cityHTML;
  272. tempHTML = tempHTML.replace('选择市', tempDict['area_name']);
  273. tempHTML = tempHTML.replace('0', tempDict['area_id']);
  274. areaHTML += tempHTML;
  275. }
  276. if (areaHTML) {
  277. $('#city').html(areaHTML);
  278. $('#city')[0].selectedIndex = 0;
  279. }
  280. }
  281. })
  282. });
  283. }
  284. );
  285. //订单状态筛选
  286. var tempobj = null;
  287. function submit(param, obj) {
  288. if (tempobj) {
  289. $(tempobj).css("cssText", "font-size: 12px;width: 50px; padding: 3px;display: inline-block;margin-left: 5px;");
  290. }
  291. if (obj) {
  292. $(obj).css("cssText", "font-size: 12px;width: 50px; padding: 3px;display: inline-block;margin-left: 5px;background:dimgrey!important");
  293. }
  294. tempobj = obj;
  295. var url = getSelectInfo(param);
  296. getHotelList();
  297. }
  298. function getSelectInfo(status) {
  299. order_status = status;
  300. getHotelList();
  301. }
  302. //end 订单状态筛选
  303. //确认订单
  304. function make_sure(order_id, order_status) {
  305. //判断状态是否正确
  306. $.ajax({
  307. url: base_api,
  308. type: 'post',
  309. dataType: 'json',
  310. data: {
  311. order_id: order_id,
  312. order_status: order_status,
  313. op: 'to_do_next',
  314. type: "order_HotelOrderList"
  315. },
  316. success: function (res_data) {
  317. if (res_data['code'] != "0") {
  318. ZZAlertInfo(res_data['info']);
  319. getHotelList();
  320. } else {
  321. MakeSureNum();
  322. }
  323. }
  324. })
  325. function MakeSureNum() {
  326. var make_sure_num = ZZInput("请输入确认号", function (make_sure_num) {
  327. var make_sure_order_id = order_id;
  328. if (make_sure_num) { //点击的是确定
  329. make_sure_order_update(make_sure_order_id, make_sure_num);
  330. } else if (make_sure_num == "") { //没有输入内窝 点击了取消
  331. ZZAlertInfo('请正确输入确认单号');
  332. } else { //点击了取消
  333. }
  334. });
  335. }
  336. function make_sure_order_update(make_sure_order_id, make_sure_num) {
  337. var url = base_api + "?type=order_HotelOrderList&op=make_sure&make_sure_order_id=" + make_sure_order_id + "&make_sure_num=" + make_sure_num;
  338. var param = {
  339. type: "order_HotelOrderList",
  340. op: "make_sure",
  341. make_sure_order_id: make_sure_order_id,
  342. make_sure_num: make_sure_num
  343. }
  344. $.ajax({
  345. url: url,
  346. type: "post",
  347. dataType: "json",
  348. data: param,
  349. success: function (res_data) {
  350. ZZLog(res_data);
  351. if (res_data['code'] != "0") {
  352. ZZAlertInfo(res_data['info']);
  353. getHotelList();
  354. return;
  355. }else {
  356. ZZAlertInfo('确认成功');
  357. getHotelList();
  358. }
  359. },
  360. error:function (e) {
  361. console.log(e)
  362. }
  363. })
  364. }
  365. }//end 确认订单
  366. //修改订单
  367. function modify_order(order_status, order_id, org_id, hotel_id, parent_room_type, room_type, org_name) {
  368. //判断状态是否正确
  369. $.ajax({
  370. url: base_api,
  371. type: 'post',
  372. dataType: 'json',
  373. data: {
  374. order_id: order_id,
  375. order_status: order_status,
  376. op: 'to_do_next',
  377. type: "order_HotelOrderList"
  378. },
  379. success: function (res_data) {
  380. if (res_data['code'] != "0") {
  381. ZZAlertInfo(res_data['info']);
  382. getHotelList();
  383. } else {
  384. window.location = "hotel_modify_order.html?order_id=" + order_id + "&hotel_id=" + hotel_id + "&room_type=" + room_type + "&parent_room_type=" + parent_room_type + "&org_name=" + org_name + "&org_id=" + org_id + "&order_status=" + order_status;
  385. }
  386. }
  387. })
  388. }//end 修改订单
  389. //取消订单
  390. function cancel_order(cancel_order_id, cancel_order_status, new_status) {
  391. //判断状态是否正确,如果正确则调用取消订单函数
  392. $.ajax({
  393. url: base_api,
  394. type: 'post',
  395. dataType: 'json',
  396. data: {
  397. order_id: cancel_order_id,
  398. order_status: cancel_order_status,
  399. op: 'to_do_next',
  400. type: "order_HotelOrderList"
  401. },
  402. success: function (res_data) {
  403. if (res_data['code'] != "0") {
  404. ZZAlertInfo(res_data['info']);
  405. getHotelList();
  406. } else {
  407. ZZInput("请输入取消原因", function (cancel_reason) {
  408. if (cancel_reason) {
  409. cancel_order_update(cancel_order_id, cancel_order_status, new_status);
  410. cancel_reason_insert(cancel_order_id, cancel_reason);
  411. } else if (cancel_reason == '') {
  412. cancel_order_update(cancel_order_id, cancel_order_status, new_status);
  413. } else {
  414. }
  415. });
  416. }
  417. }
  418. });
  419. function cancel_order_update(cancel_order_id, cancel_order_status, new_status) {
  420. var url = base_api;
  421. ZZLog(url);
  422. var param = {
  423. type: "order_HotelOrderList",
  424. op: "cancel_order",
  425. cancel_order_id: cancel_order_id,
  426. user_id: user_id,
  427. cancel_order_status: cancel_order_status,
  428. new_status: new_status
  429. };
  430. $.ajax({
  431. url: url,
  432. type: 'post',
  433. dataType: 'json',
  434. data: param,
  435. success: function (res_data) {
  436. if (res_data['code'] != "0") {
  437. ZZAlertInfo(res_data['info']);
  438. getHotelList();
  439. } else {
  440. ZZAlertInfo('取消成功');
  441. getHotelList();
  442. }
  443. }
  444. })
  445. }
  446. function cancel_reason_insert(cancel_order_id, cancel_reason) {
  447. var url = base_api + "?type=order_HotelOrderList&op=reason_insert&cancel_order_id=" + cancel_order_id + "&cancel_reason=" + cancel_reason;
  448. if (cancel_reason == '') {
  449. ZZAlertInfo('请输入取消原因');
  450. return
  451. }
  452. ZZLog(url);
  453. $.getJSON(url, function (data) {
  454. ZZLog(data);
  455. getHotelList();
  456. })
  457. }
  458. }//end 取消订单
  459. //发单
  460. function billing(order_id, order_status) {
  461. //判断状态是否正确,如果正确则继续
  462. $.ajax({
  463. url: base_api,
  464. type: 'post',
  465. dataType: 'json',
  466. data: {
  467. order_id: order_id,
  468. order_status: order_status,
  469. op: 'to_do_next',
  470. type: "order_HotelOrderList"
  471. },
  472. success: function (res_data) {
  473. if (res_data['code'] != "0") {
  474. ZZAlertInfo(res_data['info']);
  475. getHotelList();
  476. } else {
  477. ZZConfirm("确定发送确认单吗?", function () {
  478. var url = base_api + "?type=order_HotelOrderList&op=billing&user_id=" + user_id + "&order_id=" + order_id;
  479. var param = {
  480. type: "order_HotelOrderList",
  481. op: "billing",
  482. user_id: user_id,
  483. order_id: order_id
  484. };
  485. $.ajax({
  486. url: url,
  487. type: "post",
  488. dataType: "json",
  489. data: param,
  490. success: function (res_data) {
  491. ZZLog(res_data);
  492. if (res_data['code'] != "0") {
  493. ZZAlertInfo(res_data['info'])
  494. } else {
  495. getHotelList();
  496. }
  497. }
  498. })
  499. });
  500. }
  501. }
  502. });
  503. }
  504. //删掉重复显示的房型
  505. function filterRepeatStr(str) {
  506. var array = str.split("|");
  507. var data = '<br/>';
  508. var dict = array[0];//得到第一条数据
  509. var str2 = dict.split(",");
  510. var str3 = str2[0];//得到重复房型
  511. for (var i = 0; i < array.length; i++) {
  512. var dict1 = array[i];
  513. if (i == 0) {
  514. data += dict1;
  515. } else {
  516. dict1 = dict1.replace(str3 + ",", "|");
  517. data += dict1;
  518. }
  519. }
  520. return data;
  521. }
  522. //点击备注
  523. function remarks(memo) {
  524. $('#beizhu').show();
  525. $('#mask').show();
  526. var row_arr = memo.split('|');
  527. var sumHTML = '';
  528. if (row_arr) {
  529. for (var i = 0; i < row_arr.length; i++) {
  530. var dict = row_arr[i];
  531. var HTML = memodiv;
  532. var temp = dict.split(',');
  533. var main = temp[2];
  534. var time = temp[1];
  535. var user = temp[0];
  536. HTML = HTML.replace('[备注main]', main);
  537. HTML = HTML.replace('[备注time]', time);
  538. HTML = HTML.replace('[备注user]', user);
  539. sumHTML += HTML
  540. }
  541. $('#beizhumain').html(sumHTML);
  542. $('.memo1:odd').css('background', 'lightgray');
  543. }
  544. }
  545. // 点击蒙板
  546. function showMB(order_id, order_status, order_status_name) {
  547. //判断状态是否正确,如果正确则继续
  548. $.ajax({
  549. url: base_api,
  550. type: 'post',
  551. dataType: 'json',
  552. data: {
  553. order_id: order_id,
  554. order_status: order_status,
  555. op: 'to_do_next',
  556. type: "order_HotelOrderList"
  557. },
  558. success: function (res_data) {
  559. if (res_data['code'] != "0") {
  560. ZZAlertInfo(res_data['info']);
  561. getHotelList();
  562. } else {
  563. $('#exception_handling').show();
  564. $('#mask').show();
  565. //提交异常状态处理状态
  566. $('#make_sure').unbind('click');
  567. $('#make_sure').on('click', function () {
  568. var text_reason = $('#text_reason').val();
  569. var url = base_api;
  570. var param = {
  571. type: 'order_HotelOrderList',
  572. op: 'handle_order',
  573. user_id: 1,
  574. order_id: order_id,
  575. text_reason: text_reason,
  576. order_status: order_status,
  577. order_status_name: order_status_name
  578. }
  579. $.ajax({
  580. url: url,
  581. type: "post",
  582. dataType: "json",
  583. data: param,
  584. success: function (data) {
  585. ZZLog(data);
  586. if (data['code'] != "0") {
  587. ZZAlertInfo(res_data['info']);
  588. } else {
  589. ZZLog('code=0');
  590. hideMB();
  591. getHotelList();
  592. }
  593. }, error: function (error) {
  594. ZZLog(error);
  595. }
  596. })
  597. })
  598. }
  599. }
  600. });
  601. }
  602. function hideMB() {
  603. $('#exception_handling').hide();
  604. $('#mask').hide();
  605. $("#text_reason").val('');
  606. $("#beizhu").hide();
  607. }
  608. function excel() {
  609. $('#excel').bind('click', function () {
  610. start_date = $('#start_date').val();
  611. end_date = $('#end_date').val();
  612. province = $("#province").val();
  613. city = $("#city").val();
  614. hotel_name = $("#hotel_name").val();
  615. org_id = $("#org_id").val();
  616. more_search = $("#more_search").val();
  617. date_type = $("#date_type").val();
  618. //var com_url = base_api + "?type=order_HotelOrderList&op=order_list&date_type=" + date_type + "&start_date=" + start_date + "&end_date=" + end_date + "&province=" + province + "&city=" + city + "&hotel_name=" + hotel_name + "&order_status=" + order_status + "&org_id=" + org_id + "&more_search=" + more_search +"&current="+current +"&page_size="+page_size
  619. window.location.href = "/zz-jd/st-ht/HTcontrol.php?type=order_HotelOrderList&op=execl&date_type=" + date_type + "&start_date=" + start_date + "&end_date=" + end_date + "&province=" + province + "&city=" + city + "&hotel_name=" + hotel_name + "&order_status=" + order_status + "&org_id=" + org_id + "&more_search=" + more_search + "&current=" + current + "&page_size=" + page_size;
  620. })
  621. }
  622. //发送短信
  623. function sendMessage() {
  624. }