Нет описания

shiTimesq.html 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8" />
  5. <script src="../Script/Common/huayi.load.js"></script>
  6. <script src="../Script/Common/huayi.config.js"></script>
  7. <link href="../css/layer/need/layer.css" />
  8. <link rel="stylesheet" href="../css/init.css" />
  9. <title>延时申请</title>
  10. </head>
  11. <body>
  12. <div class="Common">
  13. <table>
  14. <tr>
  15. <th class="Importent">申请类别:</th>
  16. <td>
  17. <select class="form-control" id="type">
  18. <option value="">请选择</option>
  19. <option value="0">常规延时</option>
  20. <option value="1">特殊延时</option>
  21. <option value="2">类别错误更正</option>
  22. </select>
  23. </td>
  24. </tr>
  25. <tr style="display: none;" class="infoTypeEle">
  26. <th>工单类型:</th>
  27. <td>
  28. <select class="form-control" id="infoType"></select>
  29. </td>
  30. </tr>
  31. <tr>
  32. <th class="Importent">申请延时时间:</th>
  33. <td>
  34. <select class="form-control" class="startTime" id="startTime">
  35. <!--<option value="0">选择</option>-->
  36. <option value="1">一天</option>
  37. <option value="2">两天</option>
  38. <option value="4">四天</option>
  39. <option value="5">五天</option>
  40. <option value="9">九天</option>
  41. <!-- <option value="7">七天</option> -->
  42. </select>
  43. </td>
  44. </tr>
  45. <tr>
  46. <th class="Importent">申请延时原因:</th>
  47. <td colspan="2">
  48. <textarea
  49. data-adaptheight
  50. id="reason"
  51. name=""
  52. rows=""
  53. cols=""
  54. ></textarea>
  55. </td>
  56. </tr>
  57. <tr>
  58. <th>上传附件:</th>
  59. <td>
  60. <div class="fileBox"></div>
  61. <input class="input" type="file" name="upFile" id="upFile" multiple="multiple"
  62. style="display: none;">
  63. <input class="input" type="button" value="上传" id="scwj">
  64. <input type="hidden" id="file">
  65. <span style="color: #ff0000; border: none">
  66. (文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
  67. </span>
  68. </td>
  69. </tr>
  70. </table>
  71. <div class="btn_box">
  72. <button class="btns">保存</button>
  73. </div>
  74. </div>
  75. <script src="../css/laydate/laydate.js"></script>
  76. <script src="../js/adjustHeight.js"></script>
  77. <script src="../Script/Common/huayi.common.js"></script>
  78. <script>
  79. var nowTime=new Date();
  80. var wid = helper.request.queryString("wid");
  81. var level = helper.request.queryString("level");
  82. var roleCode = $.cookie("code");
  83. var apiUrl;
  84. $(document).ready(function () {
  85. LB($("#infoType"));
  86. $(".btns").click(function () {
  87. if ($("#type").val() == "") {
  88. layer.msg("申请类别不为空");
  89. } else if ($("#reason").val() == "") {
  90. layer.msg("申请原因不为空");
  91. } else {
  92. JA();
  93. }
  94. });
  95. $('#type').change(function(){
  96. var data= $(this).val();
  97. if (data.toString() == "2") {
  98. $(".infoTypeEle").show()
  99. } else{
  100. $(".infoTypeEle").hide()
  101. $("#infoType").val('')
  102. }
  103. });
  104. });
  105. //批示
  106. function JA() {
  107. $.post(
  108. huayi.config.callcenter_url + 'Affairs/DelayWorkOrder',
  109. {
  110. workorderid: wid,
  111. type: $("#type").val(), //
  112. infoType: $("#infoType").val(), //
  113. reason: $("#reason").val(),
  114. newlimittime: $("#startTime").val(),
  115. token: $.cookie("token"),
  116. },
  117. function (result) {
  118. result = JSON.parse(result);
  119. if (result.state.toLowerCase() == "success") {
  120. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  121. parent.layer.close(index); //再执行关闭
  122. parent.$("#orderlist").bootstrapTable("refresh");
  123. parent.layer.msg("申请延时成功");
  124. parent.closePage();
  125. }
  126. }
  127. );
  128. }
  129. function getNowDate() {
  130. var date = new Date();
  131. var year = date.getFullYear(); //当前年份
  132. var month = date.getMonth(); //当前月份
  133. var day = date.getDate(); //天
  134. month = month + 1
  135. var time = year + "-" + month + "-" + day
  136. return time
  137. }
  138. function getFiveDate() {
  139. var date = new Date();
  140. date.setTime(date.getTime() + 5*24*60*60*1000);
  141. var year = date.getFullYear(); //当前年份
  142. var month = date.getMonth(); //当前月份
  143. var day = date.getDate(); //天
  144. month = month + 1
  145. var time = year + "-" + month + "-" + day
  146. return time
  147. }
  148. $("#scwj").click(function () {
  149. $("#upFile").trigger("click");
  150. });
  151. $("#upFile").change(function () {
  152. upload('upFile','.fileBox',['png','jpg','mp3','mp4','avi','wmv','pdf','doc','docx','xls','xlsx'],'#file');
  153. });
  154. //类别
  155. function LB(obj) {
  156. obj.empty();
  157. $.ajax({
  158. type: "get",
  159. url: huayi.config.callcenter_url + "Dictionary/GetDicValueListById",
  160. dataType: "json",
  161. async: true,
  162. data: {
  163. "token": $.cookie("token"),
  164. id: 2
  165. },
  166. success: function(data) {
  167. if(data.state.toLowerCase() == "success") {
  168. var content = data.data;
  169. $(content).each(function(i, n) {
  170. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>")
  171. .appendTo(obj);
  172. })
  173. }
  174. }
  175. });
  176. }
  177. </script>
  178. </body>
  179. </html>