phone.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <div class="row">
  4. <div class="col-xs-12">
  5. <div class="panel panel-default">
  6. <div class="panel-body">
  7. <form class="form" data-next="true" action="#" method="GET">
  8. <input type="hidden" name="id" value="{$id}">
  9. <div class="form-group">
  10. <div class="form-group">
  11. <label class="control-label">电话</label>
  12. <input class="form-control" readonly value="{$info['phone']}" placeholder="电话" />
  13. </div>
  14. <div class="form-group">
  15. <label class="control-label">订单类型</label>
  16. <select name="mode" class="form-control" onchange="changeType(this)">
  17. {foreach $worktype as $k=>$v}
  18. <option value="{$v['id']}">{$v['title']}</option>
  19. {/foreach}
  20. </select>
  21. </div>
  22. <div class="form-group text-center">
  23. <button type="button" onclick="tt()" class="btn btn-sm btn-primary">下一步</button>
  24. </div>
  25. </div>
  26. </form>
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. {/block}
  32. {block name="script"}
  33. <script>
  34. var mode = 1;
  35. function changeType(_self) {
  36. mode = $(_self).val();
  37. }
  38. function tt() {
  39. var title = '';
  40. if(mode == 1){
  41. title = '添加报修';
  42. }else if(mode == 2){
  43. title = '添加保洁';
  44. }else if(mode == 3){
  45. title = '添加运送';
  46. }else if(mode == 4){
  47. title = '添加应急';
  48. }else{
  49. title = '添加';
  50. }
  51. var url = '{:url("orders/dispatchAdd",[],"")}/mode/'+mode+'?id={$id}';
  52. lay_open(title,url);
  53. }
  54. function lay_open (title,url) {
  55. parent.layer.open({
  56. type: 2,
  57. title: title,
  58. shadeClose: true,
  59. shade: 0.3,
  60. maxmin: true,
  61. area: ['90%', '90%'],
  62. content: url,
  63. end: function () {
  64. }
  65. });
  66. }
  67. </script>
  68. {/block}