update_complete.ftl 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  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: 65%;border:1px solid rgba(0,0,0,.1);margin-left: 12.5%;}
  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: 130px; background-color: #50a2ea;color: #fff;border: 1px solid #50a2ea;cursor:pointer;margin: 10px auto 0 auto;display: block;}
  23. .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;height: 34px; -webkit-appearance:none;appearance:none;background: url(/common/images/pts/select-11.png) right center no-repeat;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. .huanhang{ float:left}
  27. .check-box, .radio-box{padding-left: 0;}
  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;"><span class="c-red">*</span>是否故障:</label>
  37. <div class=" col-xs-9 col-sm-9 huanhang" >
  38. <div class="radio-box">
  39. <input type="radio" id="radio-3" name="isMaintenance" value="2" checked
  40. <#if detectInfo.isMaintenance??><#if detectInfo.isMaintenance == 2>checked</#if></#if>/><label for="radio-3">无故障</label>
  41. </div>
  42. <div class="radio-box">
  43. <input type="radio" id="radio-4" name="isMaintenance" value="1"
  44. <#if detectInfo.isMaintenance??><#if detectInfo.isMaintenance == 1>checked</#if></#if>/><label for="radio-4">有故障</label>
  45. </div>
  46. </div>
  47. </div>
  48. <div class="input-box" style="margin-top: 20px;">
  49. <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>是否可翻新:</label>
  50. <div class=" col-xs-9 col-sm-9 huanhang" >
  51. <div class="radio-box" style="margin: 10px 0px;">
  52. <input type="radio" id="radio-7" name="detectRenovation" value="1" checked
  53. <#if detectInfo.detectRenovation??><#if detectInfo.detectRenovation == 1>checked</#if></#if>/><label for="radio-7">可翻新</label>
  54. </div>
  55. <div class="radio-box">
  56. <input type="radio" id="radio-8" name="detectRenovation" value="2"
  57. <#if detectInfo.detectRenovation??><#if detectInfo.detectRenovation == 2>checked</#if></#if>/><label for="radio-8">不可翻新</label>
  58. </div>
  59. </div>
  60. </div>
  61. <div class="input-box" style="margin-top: 20px;">
  62. <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">厚膜类型:</label>
  63. <div class=" col-xs-9 col-sm-9 huanhang" >
  64. <div class="radio-box" style="margin: 10px 0px;">
  65. <input type="radio" id="radio-9" name="detectFilmType" value="1" checked
  66. <#if detectInfo.detectFilmType??><#if detectInfo.detectFilmType == 1>checked</#if></#if>/><label for="radio-9">圆</label>
  67. </div>
  68. <div class="radio-box">
  69. <input type="radio" id="radio-10" name="detectFilmType" value="2"
  70. <#if detectInfo.detectFilmType??><#if detectInfo.detectFilmType == 2>checked</#if></#if>/><label for="radio-10">扁</label>
  71. </div>
  72. </div>
  73. </div>
  74. <div class="input-box" style="margin-top: 20px;">
  75. <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">浮子类型:</label>
  76. <div class=" col-xs-9 col-sm-9 huanhang" >
  77. <div class="radio-box" style="margin: 10px 0px;">
  78. <input type="radio" id="radio-11" name="detectFloatType" value="1" checked
  79. <#if detectInfo.detectFloatType??><#if detectInfo.detectFloatType == 1>checked</#if></#if>/><label for="radio-11">长</label>
  80. </div>
  81. <div class="radio-box">
  82. <input type="radio" id="radio-12" name="detectFloatType" value="2"
  83. <#if detectInfo.detectFloatType??><#if detectInfo.detectFloatType == 2>checked</#if></#if>/><label for="radio-12">短</label>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="input-box" style="margin-top: 20px;">
  88. <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">是否翻新机:</label>
  89. <div class=" col-xs-9 col-sm-9 huanhang" >
  90. <div class="radio-box" style="margin: 10px 0px;">
  91. <input type="radio" id="radio-13" name="detectIsRefurbishing" value="1" checked
  92. <#if detectInfo.detectIsRefurbishing??><#if detectInfo.detectIsRefurbishing == 1>checked</#if></#if>/><label for="radio-13">是</label>
  93. </div>
  94. <div class="radio-box">
  95. <input type="radio" id="radio-14" name="detectIsRefurbishing" value="2"
  96. <#if detectInfo.detectIsRefurbishing??><#if detectInfo.detectIsRefurbishing == 2>checked</#if></#if>/><label for="radio-14">否</label>
  97. </div>
  98. </div>
  99. </div>
  100. <div class="input-box">
  101. <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">生产月份:</label>
  102. <div class="formControls col-9 col-sm-9 text-c huanhang" style="margin-left: -4%;margin: 10px 0px 10px -14px;">
  103. <input class="my-input" style="width: 90%;" type="text" value="" name="detectProduction" id="detectProduction" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M',dateFmt: 'yyyy-MM'})" placeholder="请选择月份" readonly="readonly"/>
  104. </div>
  105. </div>
  106. <div class="input-box" >
  107. <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">机身条码:</label>
  108. <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
  109. <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectFuselageBarcode!''}" name="detectFuselageBarcode" id="detectFuselageBarcode" placeholder="请输入机身条码"/>
  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;">版本号:</label>
  114. <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
  115. <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectVersionNumber!''}" name="detectVersionNumber" id="detectVersionNumber" placeholder="请输入版本号"/>
  116. </div>
  117. </div>
  118. <div class="input-box" >
  119. <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">检测现象:</label>
  120. <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
  121. <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectPhenomenon" id="detectPhenomenon" class="my-textarea" placeholder="请输入工厂的检测现象">${detectInfo.detectPhenomenon!''}</textarea>-->
  122. <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectPhenomenon!''}" name="detectPhenomenon" id="detectPhenomenon" placeholder="请输入检测现象"/>
  123. </div>
  124. </div>
  125. <div class="input-box">
  126. <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">故障分类:</label>
  127. <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
  128. <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectClassification" id="detectClassification" class="my-textarea" placeholder="请输入故障分类">${detectInfo.detectClassification!''}</textarea>-->
  129. <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectClassification!''}" name="detectClassification" id="detectClassification" placeholder="请输入故障分类"/>
  130. </div>
  131. </div>
  132. <div class="input-box">
  133. <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">故障原因:</label>
  134. <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
  135. <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectFailureCause" id="detectFailureCause" class="my-textarea" placeholder="请输入故障原因">${detectInfo.detectFailureCause!''}</textarea>-->
  136. <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectFailureCause!''}" name="detectFailureCause" id="detectFailureCause" placeholder="请输入故障原因"/>
  137. </div>
  138. </div>
  139. <div class="input-box">
  140. <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">判定结果:</label>
  141. <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
  142. <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectResults" id="detectResults" class="my-textarea" placeholder="请输入判定结果">${detectInfo.detectResults!''}</textarea>-->
  143. <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectResults!''}" name="detectResults" id="detectResults" placeholder="请输入判定结果"/>
  144. </div>
  145. </div>
  146. <div class="input-box">
  147. <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">故障指向:</label>
  148. <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
  149. <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectPoint" id="detectPoint" class="my-textarea" placeholder="请输入故障指向">${detectInfo.detectPoint!''}</textarea>-->
  150. <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectPoint!''}" name="detectPoint" id="detectPoint" placeholder="请输入故障指向"/>
  151. </div>
  152. </div>
  153. <div class="input-box">
  154. <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">原因分析:</label>
  155. <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
  156. <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectNalysis" id="detectNalysis" class="my-textarea" placeholder="请输入原因分析">${detectInfo.detectNalysis!''}</textarea>-->
  157. <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectNalysis!''}" name="detectNalysis" id="detectNalysis" placeholder="请输入原因分析"/>
  158. </div>
  159. </div>
  160. <#-- <div class="input-box">
  161. <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">检测内容:</label>
  162. <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
  163. &lt;#&ndash;<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectContent" id="detectContent" class="my-textarea" placeholder="请输入检测内容">${detectInfo.detectContent!''}</textarea>&ndash;&gt;
  164. <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectContent!''}" name="detectContent" id="detectContent" placeholder="请输入检测内容"/>
  165. </div>
  166. </div>-->
  167. <div class="input-box">
  168. <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">维修报价:</label>
  169. <div class="formControls col-9 col-sm-9 text-c huanhang" style="margin-left: -4%;margin: 10px 0px 10px -14px;">
  170. <input class="my-input" style="width: 90%;" type="text" value="" name="detect_Offer" id="detect_Offer" placeholder="请输入维修报价" oninput = "value=value.replace(/[^\d]/g,'')"/>
  171. <input type="hidden" name="detectOffer" id="detectOffer" value="">
  172. </div>
  173. </div>
  174. <div class="input-box">
  175. <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>检测日期:</label>
  176. <div class="formControls col-9 col-sm-9 text-c huanhang" style="margin-left: -4%;margin: 10px 0px 10px -14px;">
  177. <input class="my-input" style="width: 90%;" type="text" value="<#if detectInfo.detectDate??>${detectInfo.detectDate?string("yyyy-MM-dd")!''}</#if>" name="detect_date" id="detectDate" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" placeholder="请选择检测日期" readonly="readonly"/>
  178. </div>
  179. </div>
  180. <div class="input-box">
  181. <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;">备注信息:</label>
  182. <div class="col-xs-9 col-sm-9 skin-minimal">
  183. <div class="radio-box" style="padding: 0px; width: 100%;">
  184. <textarea style="height: 60px;margin: 10px 0px 10px 0px;width: 85%;" name="detectDesc" id="detectDesc" class="my-textarea" placeholder="请填写寄出订单备注信息!">${detectInfo.detectDesc!''}</textarea>
  185. </div>
  186. </div>
  187. </div>
  188. <div class="row cl">
  189. <label class="form-label col-xs-3 col-sm-3 huanhang" style="text-align: right;">添加附件:</label>
  190. <div class="formControls col-xs-2 col-sm-2" id="fileDiv" style="width: 17%;width: 100px;height: 100px;margin-left: 8px;">
  191. <input type="file" name="file" id="fileid" style="opacity: 0; position: absolute; width: 80px;height: 80px;">
  192. <img alt="介绍图" src="${path}/common/images/pts/addparts.jpg" id="partsImg" width="80" height="80">
  193. <#--<input type="hidden" id="componentsImg" name="componentsImg" value=""/>-->
  194. <#--<button type="button" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="uploadSubmit"><i class="Hui-iconfont">&#xe665;</i> 上传</button>-->
  195. </div>
  196. <div id="imgDiv">
  197. </div>
  198. </div>
  199. <div>
  200. <input type="hidden" value="${detectId!''}" id="detectId" name="detectId">
  201. <input type="hidden" value="${detectInfo.customerId!''}" id="customerId" name="customerId">
  202. <button type="button" class="my-btn-submit" onclick="add();">确认添加</button>
  203. </div>
  204. </form>
  205. </article>
  206. <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  207. <script type="text/javascript" src="${path}/common/lib/jquery/1.9.1/ajaxfileupload.js"></script>
  208. <script type="text/javascript">
  209. /*初始化单选框样式*/
  210. $(function(){
  211. $('.skin-minimal input').iCheck({
  212. checkboxClass: 'icheckbox-blue',
  213. radioClass: 'iradio-blue',
  214. increaseArea: '20%'
  215. });
  216. });
  217. /***
  218. * 删除图片
  219. */
  220. function deleteImg(obj){
  221. layer.confirm("确认要删除该图片吗", { title: "确认" }, function (index) {
  222. layer.close(index);
  223. obj.remove();
  224. });
  225. }
  226. $('#fileid').change(function() {
  227. fileUpload();
  228. });
  229. function fileUpload() {
  230. $.ajaxFileUpload({
  231. url:"${path}/admin/machineParts/fileUpload",
  232. secureuri:false,
  233. fileElementId:"fileid",//文件选择框的id属性
  234. dataType: 'json', //json
  235. success: function (data) {
  236. if(data.returnCode == 200){
  237. /*<input type="file" name="file" id="fileid" style="opacity: 0; position: absolute; width: 90px;height: 80px;">*/
  238. $("#imgDiv").append('<div class="col-xs-8 col-sm-8" onclick="deleteImg(this);" style="width: 17%;width: 100px;height: 100px;">'
  239. +'<img src="'+root_path+data.returnMsg.imgUrl+'" width="90" height="80">'
  240. +'<input type="hidden" name="componentsImg" value="'+data.returnMsg.imgUrl+'"/>'
  241. +'</div>');
  242. }else{
  243. layer.msg('上传失败,请重试!',{icon: 5,time:2000});
  244. }
  245. }
  246. });
  247. $('#fileid').change(function() {
  248. fileUpload();
  249. });
  250. }
  251. function add() {
  252. /*var detectPhenomenon = $("#detectPhenomenon").val();
  253. if( detectPhenomenon == null || detectPhenomenon == "" ){
  254. layer.msg('请输入检测现象',{icon: 5,time:1000});
  255. return;
  256. }
  257. if( detectPhenomenon.length > 300 ){
  258. layer.msg('工厂检测现象长度不得大于150个字符',{icon: 5,time:1000});
  259. return;
  260. }
  261. var detectClassification = $("#detectClassification").val();
  262. if( detectClassification == null || detectClassification == "" ){
  263. layer.msg('请输入故障分类',{icon: 5,time:1000});
  264. return;
  265. }
  266. if( detectClassification.length > 50 ){
  267. layer.msg('故障分类长度不得大于25个字符',{icon: 5,time:1000});
  268. return;
  269. }
  270. var detectFailureCause = $("#detectFailureCause").val();
  271. if( detectFailureCause == null || detectFailureCause == "" ){
  272. layer.msg('请输入故障原因',{icon: 5,time:1000});
  273. return;
  274. }
  275. if( detectFailureCause.length > 100 ){
  276. layer.msg('故障原因长度不得大于50个字符',{icon: 5,time:1000});
  277. return;
  278. }
  279. var detectResults = $("#detectResults").val();
  280. if( detectResults == null || detectResults == "" ){
  281. layer.msg('请输入判定结果',{icon: 5,time:1000});
  282. return;
  283. }
  284. if( detectResults.length > 100 ){
  285. layer.msg('判定结果长度不得大于50个字符',{icon: 5,time:1000});
  286. return;
  287. }
  288. var detectPoint = $("#detectPoint").val();
  289. if( detectPoint == null || detectPoint == "" ){
  290. layer.msg('请输入故障指向',{icon: 5,time:1000});
  291. return;
  292. }
  293. if( detectPoint.length > 100 ){
  294. layer.msg('故障指向长度不得大于50个字符',{icon: 5,time:1000});
  295. return;
  296. }
  297. var detectNalysis = $("#detectNalysis").val();
  298. if( detectNalysis == null || detectNalysis == "" ){
  299. layer.msg('请输入原因分析',{icon: 5,time:1000});
  300. return;
  301. }
  302. if( detectNalysis.length > 100 ){
  303. layer.msg('原因分析长度不得大于50个字符',{icon: 5,time:1000});
  304. return;
  305. }
  306. var detectContent = $("#detectContent").val();
  307. if( detectContent == null || detectContent == "" ){
  308. layer.msg('请输入维修内容',{icon: 5,time:1000});
  309. return;
  310. }
  311. if( detectContent.length > 300 ){
  312. layer.msg('维修内容长度不得大于150个字符',{icon: 5,time:1000});
  313. return;
  314. }*/
  315. var detect_Offer = $("#detect_Offer").val();
  316. if(detect_Offer != null && detect_Offer != ""){
  317. $("#detectOffer").val(detect_Offer * 100)
  318. }
  319. $.ajax({
  320. cache: true,
  321. type: "POST",
  322. url: "${path}/admin/detect/update_complete",
  323. data:$('#form-admin-add').serialize(),// 你的formid
  324. async: false,
  325. success: function(data){
  326. if (data.returnCode == 200) {
  327. layer.msg('检测完成',{icon: 1,time:1000},function () {
  328. window.parent.location.reload();
  329. var index = parent.layer.getFrameIndex(window.name);
  330. parent.layer.close(index)
  331. });
  332. } else {
  333. layer.msg('检测完成失败',{icon: 5,time:1000});
  334. }
  335. },
  336. error: function(XmlHttpRequest, textStatus, errorThrown){
  337. layer.msg('检测错误',{icon: 5,time:1000});
  338. }
  339. });
  340. }
  341. </script>
  342. </body>
  343. </html>