安图前端代码

AddWorkOrder.html 9.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <link href="../css/init.css" rel="stylesheet" />
  7. <script src="../Script/Common/huayi.load.js"></script>
  8. <script src="../Script/Common/huayi.config.js"></script>
  9. <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
  10. <link href="../css/WorkOrder/Search.css" rel="stylesheet">
  11. <link href="../js/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" />
  12. <link rel="stylesheet" href="../css/WorkOrder/jquery.editable-select.css" />
  13. <link href="../css/init.css" rel="stylesheet" />
  14. <title>手工制单</title>
  15. <style>
  16. ul li {
  17. float: initial;
  18. list-style: none;
  19. }
  20. .common {
  21. width: 100%;
  22. text-align: center;
  23. padding: 10px 15px;
  24. }
  25. .common table {
  26. width: 100%;
  27. display: none;
  28. }
  29. .common table th {
  30. padding: 5px 8px 5px 0;
  31. text-align: right;
  32. /* width: 20%;*/
  33. }
  34. .common table td {
  35. padding: 6px 0 5px 10px;
  36. text-align: left;
  37. color: #717171;
  38. line-height: 200%;
  39. }
  40. .common table td textarea {
  41. width: 100%;
  42. vertical-align: middle;
  43. resize: none;
  44. outline: none;
  45. }
  46. .time-box {
  47. display: inline-block;
  48. position: relative;
  49. }
  50. i.tub {
  51. position: absolute;
  52. right: 8px;
  53. top: 8px;
  54. font-size: 18px;
  55. color: #00a0ca;
  56. }
  57. .treeList {
  58. top: 34px!important;
  59. border: 1px solid #e5e6e7!important;
  60. border-top: 0;
  61. height: auto!important;
  62. }
  63. #TreeDemo li {
  64. float: initial;
  65. }
  66. #typeclass {
  67. background: #fff;
  68. }
  69. .form-group {
  70. margin-bottom: 0;
  71. }
  72. .bootstrap-select>.dropdown-toggle.bs-placeholder {
  73. background-color: #ffffff!important;
  74. border-color: #e5e6e7!important;
  75. }
  76. .filter-option {
  77. color: #676b6d;
  78. }
  79. .bootstrap-select>.dropdown-toggle.btn-default {
  80. background-color: #ffffff!important;
  81. border-color: #e5e6e7!important;
  82. color: #555;
  83. }
  84. .testInput-list {
  85. position: absolute;
  86. z-index: 999;
  87. border: 1px solid rgb(204, 204, 204);
  88. background-color: rgb(255, 255, 255);
  89. z-index: 99999;
  90. padding-left: 0;
  91. width: 97.6%;
  92. display: none;
  93. }
  94. .testInput-list li {
  95. padding: 5px;
  96. }
  97. .testInput-list li:hover {
  98. background-color: #E43926;
  99. color: #fff;
  100. }
  101. #testInput1,#testInput2{
  102. outline:none;
  103. border: 1px solid #ccc;
  104. padding-left: 10px;
  105. outline-color :#fff;
  106. }
  107. </style>
  108. </head>
  109. <body class="gray-bg">
  110. <div class="daoHang clearfix" style="margin-bottom: 20px;">
  111. <div class="dhLeft">
  112. <sapn><i class="syIcon"></i>位置:
  113. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  114. <a href="javaScript:;">工单管理</a>&gt;
  115. <a href="" class="nowPosition">手工制单</a>
  116. </sapn>
  117. </div>
  118. <div class="dhRight">
  119. <a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
  120. </div>
  121. </div>
  122. <div class="clearfix wrapper wrapper-content animated fadeInRight">
  123. <div class="common">
  124. <!--客服部-->
  125. <table class="customerService">
  126. <tbody>
  127. <tr>
  128. <th>姓名:</th>
  129. <td>
  130. <div class="form-group">
  131. <input type="text" class="form-control" id="name" />
  132. </div>
  133. </td>
  134. <th>电话:</th>
  135. <td>
  136. <div class="form-group">
  137. <input type="text" class="form-control" id="tel" />
  138. </div>
  139. </td>
  140. <th>来电单位:</th>
  141. <td style="position: relative;">
  142. <!--<select name="" id="testInput1" class="">
  143. </select>-->
  144. <input id="testInput1" type="text" style="width:100%;" />
  145. <ul class="testInput-list">
  146. <li></li>
  147. </ul>
  148. </td>
  149. </tr>
  150. <tr>
  151. <th>反馈单位:</th>
  152. <td style="position: relative;">
  153. <input id="testInput2" type="text" style="width:100%;" style="display: none;" />
  154. <ul class="testInput-list">
  155. <li></li>
  156. </ul>
  157. </td>
  158. <th>工单来源:</th>
  159. <td>
  160. <div class="form-group">
  161. <select class="form-control selectpicker" id="orderSource" data-live-search="true">
  162. <option value="">请选择工单来源</option>
  163. </select>
  164. </div>
  165. </td>
  166. <th>工单状态:</th>
  167. <td>
  168. <div class="form-group">
  169. <select name="" class="form-control" id="State"> </select>
  170. </div>
  171. </td>
  172. </tr>
  173. <tr>
  174. <th>工单类型:</th>
  175. <td>
  176. <div class="time-box">
  177. <i class="tub fa fa-caret-down down" style="color: #676b6d;"></i>
  178. <input class="form-control" type="text" id="typeclass" readonly="readonly">
  179. <input type="hidden" id="typeclassId" />
  180. <div class="addTree treeList">
  181. <ul id="TreeDemo" class="ztree">
  182. </ul>
  183. </div>
  184. </div>
  185. </td>
  186. </tr>
  187. <tr>
  188. <th>反馈内容及处理结果:</th>
  189. <td colspan="5">
  190. <textarea name="" rows="5" cols="" placeholder="" id="feedBackCon"></textarea>
  191. </td>
  192. </tr>
  193. <tr>
  194. <th>快递信息:</th>
  195. <td colspan="5">
  196. <textarea name="" rows="" cols="" id="express"></textarea>
  197. </td>
  198. </tr>
  199. <tr>
  200. <th>备注一:</th>
  201. <td colspan="5">
  202. <textarea name="" rows="" cols="" id="remark1"></textarea>
  203. </td>
  204. </tr>
  205. <tr>
  206. <th>备注二:</th>
  207. <td colspan="5">
  208. <textarea name="" rows="" cols="" id="remark2"></textarea>
  209. </td>
  210. </tr>
  211. <tr>
  212. <th>备注三:</th>
  213. <td colspan="5">
  214. <textarea name="" rows="" cols="" id="remark3"></textarea>
  215. </td>
  216. </tr>
  217. <tr>
  218. <td colspan="6" style="text-align: center;">
  219. <button class="btns customerSubmit">保&nbsp;存</button>
  220. </td>
  221. </tr>
  222. </tbody>
  223. </table>
  224. <!--市场部-->
  225. <table class="market">
  226. <tbody>
  227. <tr>
  228. <th>姓名:</th>
  229. <td>
  230. <div class="form-group">
  231. <input type="text" class="form-control" id="name_market" />
  232. </div>
  233. </td>
  234. <th>电话:</th>
  235. <td>
  236. <div class="form-group">
  237. <input type="text" class="form-control" id="tel_market" />
  238. </div>
  239. </td>
  240. <th>来电单位:</th>
  241. <td>
  242. <select class="form-control selectpicker" id="comeCall_dep_market" data-live-search="true">
  243. <option value="">请选择来电单位</option>
  244. </select>
  245. </td>
  246. </tr>
  247. <tr>
  248. <th>反馈单位:</th>
  249. <td>
  250. <select class="form-control selectpicker" id="feedbackDep_market" data-live-search="true">
  251. <option value="">请选择反馈单位</option>
  252. </select>
  253. </td>
  254. </tr>
  255. <tr>
  256. <th>备注内容:</th>
  257. <td colspan="5">
  258. <textarea name="" rows="" cols="" id="remark_market"></textarea>
  259. </td>
  260. </tr>
  261. <tr>
  262. <td colspan="6" style="text-align: center;">
  263. <button class="btns marketSubmit">保&nbsp;存</button>
  264. </td>
  265. </tr>
  266. </tbody>
  267. </table>
  268. </div>
  269. </div>
  270. <script src="../js/zTree/jquery.ztree.core.js"></script>
  271. <script src="../My97DatePicker/WdatePicker.js"></script>
  272. <script src="../js/bootstrap-select/js/bootstrap-select.js"></script>
  273. <script src="../js/WorkOrder/AddWorkOrder.js"></script>
  274. <script src="../js/WorkOrder/jquery.editable-select.js"></script>
  275. <script>
  276. Select($("#testInput1"));
  277. Select($("#testInput2"));
  278. function Select(obj) {
  279. obj.click(function (event) {
  280. event.preventDefault();
  281. });
  282. obj.focus(function() { //
  283. //失去焦点后触发的事件
  284. obj.parent().find('.testInput-list').show();
  285. BindLDdep();
  286. });
  287. // obj.blur(function() { //
  288. // $('.testInput-list').hide();
  289. // });
  290. obj.bind("input propertychange", function() {
  291. var value = $(this).val();
  292. obj.parent().find('.testInput-list').show();
  293. BindLDdep(value)
  294. });
  295. //请求单位
  296. function BindLDdep(str) {
  297. $('.testInput-list').empty();
  298. $.ajax({
  299. type: "get",
  300. url: huayi.config.callcenter_url + "Customer/BindLDdep",
  301. dataType: 'json',
  302. async: true,
  303. data: {
  304. keypara: str,
  305. token: $.cookie("token")
  306. },
  307. success: function(data) {
  308. var Count = data.data.dep;
  309. console.log(Count);
  310. var html = '';
  311. $(Count).each(function(i, n) {
  312. html = '<li value="' + n + '">' + n + '</li>';
  313. $(html).appendTo($('.testInput-list'))
  314. });
  315. $('.testInput-list>li').click(function() {
  316. obj.val($(this).html());
  317. console.log($(this).html());
  318. $('.testInput-list').hide();
  319. })
  320. }
  321. });
  322. };
  323. //
  324. }
  325. $(document).ready(function(){
  326. $(document).click(function(e) {
  327. if(!$(e.target).is($('.testInput-list>li'))&&!$(e.target).is($('#testInput1'))&&!$(e.target).is($('#testInput2'))) {
  328. $('.testInput-list').hide();
  329. }
  330. })
  331. })
  332. </script>
  333. </body>
  334. </html>