detect_complete.ftl 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="renderer" content="webkit|ie-comp|ie-stand">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="Cache-Control" content="no-siteapp" />
  9. <#include "/base/add_base.ftl">
  10. <title>检测完成</title>
  11. <style>
  12. .my-title{font-weight: 500;padding-left: 15px;position: relative;}
  13. .my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
  14. .my-input{padding: 8px 5px;width: 80%;border:1px solid rgba(0,0,0,.1);}
  15. .my-input-date{padding: 8px 10px;border:1px solid rgba(0,0,0,.1);width: 80%;background: url(http://s.iamberry.com/images/rili-1.png) 98.5% center no-repeat; background-size:auto 50%;}
  16. .input-box{margin: 18px 0;}
  17. .input-dic{float: left;margin:5px 10px 0 0;font-size: 12px;}
  18. .add-list{list-style-type: none;padding: 10px;background-color: #f5f5f5;width: 60%;float: left;margin: 0;}
  19. .add-list>li{margin: 10px 0;}
  20. .my-textarea{padding: 5px 10px;width: 80%;border:1px solid rgba(0,0,0,.1);}
  21. .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
  22. .my-btn-submit{padding: 10px 20px;width: 150px; background-color: #32a3d8;color: #fff;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
  23. .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;width: 60%; height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(http://s.iamberry.com/images/select-1.png) right center no-repeat #fff;background-size:auto 100%;}
  24. input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
  25. input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
  26. .spanWidth{width: 133px;float: left}
  27. .huanhang{ float:left}
  28. </style>
  29. <meta name="keywords" content="${path}">
  30. <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
  31. </head>
  32. <body>
  33. <article class="page-container">
  34. <form class="form form-horizontal" id="form-admin-add">
  35. <div class="input-box">
  36. <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">检测结果:</label>
  37. <div class="formControls col-xs-7 col-sm-7 skin-minimal huanhang" style="margin: 10px 0px;">
  38. <div class="radio-box">
  39. <input type="radio" id="radio-3" name="detectState" value="3" checked/>
  40. <label for="tel-3">检测通过</label>
  41. </div>
  42. <div class="radio-box">
  43. <input type="radio" id="radio-4" name="detectState" value="4"/>
  44. <label for="tel-4">检测未通过</label>
  45. </div>
  46. </div>
  47. </div>
  48. <#--<div class="input-box" style="margin-left: 14.2%">
  49. <span class="input-dic">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
  50. <textarea rows="3" cols="20" name="detectPhenomenon" id="detectPhenomenon" class="my-textarea" placeholder="工厂检测现象">${detectInfo.detectPhenomenon!''}</textarea>
  51. </div>
  52. <div class="input-box" style="margin-left: 14.2%">
  53. <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
  54. <textarea rows="3" cols="20" name="detectFailureClassification" id="detectFailureClassification" class="my-textarea" placeholder="故障分类">${detectInfo.detectFailureClassification!''}</textarea>
  55. </div>
  56. <div class="input-box" style="margin-left: 14.2%">
  57. <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
  58. <textarea rows="3" cols="20" name="detectFailureCause" id="detectFailureCause" class="my-textarea" placeholder="故障原因">${detectInfo.detectFailureCause!''}</textarea>
  59. </div>
  60. <div class="input-box" style="margin-left: 14.2%">
  61. <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
  62. <textarea rows="3" cols="20" name="detectResults" id="detectResults" class="my-textarea" placeholder="判定结果">${detectInfo.detectResults!''}</textarea>
  63. </div>
  64. <div class="input-box" style="margin-left: 14.2%">
  65. <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
  66. <textarea rows="3" cols="20" name="detectPoint" id="detectPoint" class="my-textarea" placeholder="故障指向">${detectInfo.detectPoint!''}</textarea>
  67. </div>
  68. <div class="input-box" style="margin-left: 14.2%">
  69. <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
  70. <textarea rows="3" cols="20" name="detectAnalysis" id="detectAnalysis" class="my-textarea" placeholder="原因分析">${detectInfo.detectAnalysis!''}</textarea>
  71. </div>-->
  72. <div class="input-box" style="margin-left: 17%;">
  73. <textarea rows="3" cols="20" name="detectPhenomenon" id="detectPhenomenon" class="my-textarea" placeholder="工厂检测现象">${detectInfo.detectPhenomenon!''}</textarea>
  74. </div>
  75. <div class="input-box" style="margin-left: 17%;">
  76. <textarea rows="3" cols="20" name="detectFailureClassification" id="detectFailureClassification" class="my-textarea" placeholder="故障分类">${detectInfo.detectFailureClassification!''}</textarea>
  77. </div>
  78. <div class="input-box" style="margin-left: 17%;">
  79. <textarea rows="3" cols="20" name="detectFailureCause" id="detectFailureCause" class="my-textarea" placeholder="故障原因">${detectInfo.detectFailureCause!''}</textarea>
  80. </div>
  81. <div class="input-box" style="margin-left: 17%;">
  82. <textarea rows="3" cols="20" name="detectResults" id="detectResults" class="my-textarea" placeholder="判定结果">${detectInfo.detectResults!''}</textarea>
  83. </div>
  84. <div class="input-box" style="margin-left: 17%;">
  85. <textarea rows="3" cols="20" name="detectPoint" id="detectPoint" class="my-textarea" placeholder="故障指向">${detectInfo.detectPoint!''}</textarea>
  86. </div>
  87. <div class="input-box" style="margin-left: 17%;">
  88. <textarea rows="3" cols="20" name="detectAnalysis" id="detectAnalysis" class="my-textarea" placeholder="原因分析">${detectInfo.detectAnalysis!''}</textarea>
  89. </div>
  90. <div class="input-box">
  91. <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">是否转入生产:</label>
  92. <div class=" col-xs-8 col-sm-8 skin-minimal" style="margin: 10px 0px;">
  93. <div class="radio-box">
  94. <input type="radio" id="radio-5" name="detectIsMaintenance" value="1" checked/>需要转入
  95. </div>
  96. <div class="radio-box">
  97. <input type="radio" id="radio-6" name="detectIsMaintenance" value="2"/>不需要转入
  98. </div>
  99. </div>
  100. </div>
  101. <div class="input-box" id="revolutionProducedId">
  102. <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">立即转入生产:</label>
  103. <div class="col-xs-7 col-sm-7 skin-minimal" style="margin: 10px 0px;">
  104. <div class="radio-box">
  105. <input type="radio" id="radio-7" name="detectRevolutionProduced" value="2" checked/>立即转入
  106. </div>
  107. <div class="radio-box">
  108. <input type="radio" id="radio-8" name="detectRevolutionProduced" value="1"/>以后转入
  109. </div>
  110. </div>
  111. </div>
  112. <div class="input-box">
  113. <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">QC检查状态:</label>
  114. <div class="formControls col-xs-7 col-sm-7 skin-minimal" style="margin: 10px 0px;">
  115. <div class="radio-box">
  116. <input type="radio" id="radio-9" name="maintenanceResults" value="1" checked/>通过
  117. </div>
  118. <div class="radio-box">
  119. <input type="radio" id="radio-10" name="maintenanceResults" value="2"/>不通过
  120. </div>
  121. </div>
  122. </div>
  123. <div class="input-box" >
  124. <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;">备注:</label>
  125. <div class="formControls col-xs-9 col-sm-9">
  126. <div class="radio-box">
  127. <textarea rows="3" style="width: 200%;margin-left: -15%;margin-top: 5%;" cols="20" name="detectDesc" id="detectDesc" class="my-textarea" placeholder="请详细备注签收的内容,便于以后复查。如果转入生产,则生产部门同事可查看!">${detectInfo.detectDesc!''}</textarea>
  128. </div>
  129. </div>
  130. </div>
  131. <div>
  132. <input type="hidden" value="${detectId!''}" id="detectId" name="detectId">
  133. <button type="button" style="margin-left: 35%;" class="my-btn-submit" onclick="add();">确认提交</button>
  134. </div>
  135. </form>
  136. </article>
  137. <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  138. <script type="text/javascript">
  139. /*初始化单选框样式*/
  140. $(function(){
  141. $('.skin-minimal input').iCheck({
  142. checkboxClass: 'icheckbox-blue',
  143. radioClass: 'iradio-blue',
  144. increaseArea: '20%'
  145. });
  146. $('input[name="detectIsMaintenance"]').on('ifChecked', function(event){
  147. if($(this).val() == 1){
  148. show();
  149. }else{
  150. hide();
  151. }
  152. });
  153. });
  154. function hide() {
  155. $("#revolutionProducedId").hide();
  156. }
  157. function show() {
  158. $("#revolutionProducedId").show();
  159. }
  160. function add() {
  161. var detectPhenomenon = $("#detectPhenomenon").val();
  162. if( detectPhenomenon == null || detectPhenomenon == "" ){
  163. layer.msg('请输入工厂检测现象',{icon: 5,time:1000});
  164. return;
  165. }
  166. if( detectPhenomenon.length > 300 ){
  167. layer.msg('工厂检测现象长度不得大于150个字符',{icon: 5,time:1000});
  168. return;
  169. }
  170. var detectFailureClassification = $("#detectFailureClassification").val();
  171. if( detectFailureClassification == null || detectFailureClassification == "" ){
  172. layer.msg('请输入故障分类',{icon: 5,time:1000});
  173. return;
  174. }
  175. if( detectFailureClassification.length > 50 ){
  176. layer.msg('故障分类长度不得大于25个字符',{icon: 5,time:1000});
  177. return;
  178. }
  179. var detectFailureCause = $("#detectFailureCause").val();
  180. if( detectFailureCause == null || detectFailureCause == "" ){
  181. layer.msg('请输入故障原因',{icon: 5,time:1000});
  182. return;
  183. }
  184. if( detectFailureCause.length > 100 ){
  185. layer.msg('故障原因长度不得大于50个字符',{icon: 5,time:1000});
  186. return;
  187. }
  188. var detectResults = $("#detectResults").val();
  189. if( detectResults == null || detectResults == "" ){
  190. layer.msg('请输入判定结果',{icon: 5,time:1000});
  191. return;
  192. }
  193. if( detectResults.length > 100 ){
  194. layer.msg('判定结果长度不得大于50个字符',{icon: 5,time:1000});
  195. return;
  196. }
  197. var detectPoint = $("#detectPoint").val();
  198. if( detectPoint == null || detectPoint == "" ){
  199. layer.msg('请输入故障指向',{icon: 5,time:1000});
  200. return;
  201. }
  202. if( detectPoint.length > 100 ){
  203. layer.msg('故障指向长度不得大于50个字符',{icon: 5,time:1000});
  204. return;
  205. }
  206. var detectAnalysis = $("#detectAnalysis").val();
  207. if( detectAnalysis == null || detectAnalysis == "" ){
  208. layer.msg('请输入原因分析',{icon: 5,time:1000});
  209. return;
  210. }
  211. if( detectAnalysis.length > 100 ){
  212. layer.msg('原因分析长度不得大于50个字符',{icon: 5,time:1000});
  213. return;
  214. }
  215. $.ajax({
  216. cache: true,
  217. type: "POST",
  218. url: "${path}/admin/detect/detect_complete",
  219. data:$('#form-admin-add').serialize(),// 你的formid
  220. async: false,
  221. success: function(data){
  222. if (data.returnCode == 200) {
  223. layer.msg('检测完成',{icon: 1,time:1000},function () {
  224. window.parent.location.reload();
  225. var index = parent.layer.getFrameIndex(window.name);
  226. parent.layer.close(index)
  227. });
  228. } else {
  229. layer.msg('检测完成失败',{icon: 5,time:1000});
  230. }
  231. },
  232. error: function(XmlHttpRequest, textStatus, errorThrown){
  233. layer.msg('检测错误',{icon: 5,time:1000});
  234. }
  235. });
  236. }
  237. </script>
  238. </body>
  239. </html>