123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="renderer" content="webkit|ie-comp|ie-stand">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
- <meta http-equiv="Cache-Control" content="no-siteapp" />
- <#include "/base/add_base.ftl">
- <title>修改维修记录 - H-ui.filter v2.4</title>
- <style>
- .my-title{font-weight: 500;padding-left: 15px;position: relative;}
- .my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
- .my-input{padding: 8px 5px;width: 80%;border:1px solid rgba(0,0,0,.1);}
- .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%;}
- .input-box{margin: 18px 0;}
- .input-dic{float: left;margin:5px 10px 0 0;font-size: 12px;}
- .add-list{list-style-type: none;padding: 10px;background-color: #f5f5f5;width: 60%;float: left;margin: 0;}
- .add-list>li{margin: 10px 0;}
- .my-textarea{padding: 5px 10px;width: 65%;border:1px solid rgba(0,0,0,.1);margin-left: 12.5%;}
- .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
- .my-btn-submit{padding: 10px 20px;width: 150px; background-color: #32a3d8;color: #fff;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
- 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;}
- 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;}
- .huanhang{ float:left}
- .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%;}
- </style>
- <meta name="keywords" content="${path}">
- <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
- </head>
- <body>
- <article class="page-container">
- <form class="form form-horizontal" id="form-admin-add">
- <div class="input-box">
- <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;">维修产品:</label>
- <div class="col-9 col-sm-9 text-c">
- <div class="radio-box" style="margin-right: -37%;padding-left: 0px;">
- <table class="table table-border table-bg table-bordered" style="width: 420px;">
- <thead>
- <tr class="text-c">
- <th style="text-align: center;" width="100">产品名称</th>
- <th style="text-align: center;" width="50">产品颜色</th>
- <th style="text-align: center;" width="50">产品编号</th>
- </tr>
- </thead>
- <tbody id="addProduct">
- <#if (productList?size > 0)>
- <#list productList as product>
- <tr>
- <td>
- <div class="col-xs-12 col-sm-12 skin-minimal">
- <input type="radio" id="radio-X${product.productId!''}" name="productId" value="${product.productId!''}" <#if product.productId == maintenanceInfo.productId>checked</#if>/>
- <label for="radio-X${product.productId!''}"> ${product.productName!''}</label>
- </div>
- </td>
- <td>
- <select name="colorId${product.productId!''}" id="colorId${product.productId!''}" style="width:90%" class="my-select">
- <#if (product.colorList?size > 0)>
- <#list product.colorList as colorList>
- <option value ="${colorList.colorId!''}">${colorList.colorName!''}</option>
- </#list>
- <#else>
- <option value ="">暂无颜色</option>
- </#if>
- </select>
- </td>
- <td>
- <input class="input-text" type="text" <#if product.productId == maintenanceInfo.productId>value="${maintenanceInfo.maintenanceEquipmentNumber!''}"</#if> id="maintenanceEquipmentNumber${product.productId!''}" name="maintenanceEquipmentNumber${product.productId!''}" style="width: 100%;" placeholder="机器编号" /><br>
- </td>
- </tr>
- </#list>
- </#if>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <div class="input-box">
- <label class="col-3 col-sm-3 huanhang" style="text-align: right;">维修日期:</label>
- <div class="formControls col-7 col-sm-7 text-c huanhang" style="margin-left: -4.5%;">
- <input class="my-input-date" type="text" value="${(maintenanceInfo.maintenanceContentDate)?string("yyyy-MM-dd")!''}" name="maintenanceContent_Date" id="maintenanceContentDate" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" placeholder="请选择维修日期" readonly="readonly"/>
- </div>
- </div>
- <div class="input-box" style="margin-top: 11%;">
- <label class="col-3 col-sm-3 huanhang" style="text-align: right;">维修结果:</label>
- <div class="col-8 col-sm-8 text-c skin-minimal" >
- <div class="radio-box">
- <input type="radio" id="radio-3" name="maintenanceState" value="1" <#if maintenanceInfo.maintenanceState == 1>checked</#if>/>
- <label for="radio-3">正在维修</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="radio-4" name="maintenanceState" value="2" <#if maintenanceInfo.maintenanceState == 2>checked</#if>/>
- <label for="radio-4">已完成</label>
- </div>
- </div>
- </div>
- <div class="input-box">
- <label class="col-3 col-sm-3 huanhang" style="text-align: right;">是否可返修:</label>
- <div class=" col-8 col-sm-8 text-c skin-minimal">
- <div class="radio-box">
- <input type="radio" id="radio-5" name="maintenanceIsRepair" value="1" <#if maintenanceInfo.maintenanceIsRepair == 1>checked</#if>/>
- <label for="radio-5">不可返修</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="radio-6" name="maintenanceIsRepair" value="2" <#if maintenanceInfo.maintenanceIsRepair == 2>checked</#if>/>
- <label for="radio-6">可返修</label>
- </div>
- </div>
- </div>
- <div class="input-box">
- <label class="col-3 col-sm-3 huanhang" style="text-align: right;">是否可入库:</label>
- <div class="formControls col-10 col-sm-10 text-c skin-minimal">
- <div class="radio-box">
- <input type="radio" id="radio-7" name="maintenanceIsWarehousing" value="2" <#if maintenanceInfo.maintenanceIsWarehousing == 2>checked</#if>/>
- <label for="radio-7">已入库</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="radio-8" name="maintenanceIsWarehousing" value="1" <#if maintenanceInfo.maintenanceIsWarehousing == 1>checked</#if>/>
- <label for="radio-8">未入库</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="radio-9" name="maintenanceIsWarehousing" value="3" <#if maintenanceInfo.maintenanceIsWarehousing == 3>checked</#if>/>
- <label for="radio-9">无法入库</label>
- </div>
- </div>
- </div>
- <div class="input-box">
- <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">备注:</label>
- <div class="formControls col-xs-9 col-sm-9">
- <div class="radio-box">
- <textarea rows="3" style="width: 221%;margin-left: -20%;margin-top: 5%;" cols="20" name="maintenanceDesc" id="maintenanceDesc" class="my-textarea" placeholder="请详细备注维修的内容!">${maintenanceInfo.maintenanceDesc!''}</textarea>
- </div>
- </div>
- </div>
- <div style="margin-left: 35%;">
- <input type="hidden" value="${maintenanceInfo.maintenanceId!''}" name="maintenanceId" id="maintenanceId">
- <button type="button" class="my-btn-submit" onclick="add();">确认提交</button>
- </div>
- </form>
- </article>
- <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
- <script type="text/javascript">
- /*初始化单选框样式*/
- $(function(){
- $('input[name="productId"]').on('ifChecked', function(event){
- $("input[name='productId']").each(function () {
- $("#maintenanceEquipmentNumber"+$(this).val()).val("");
- });
- });
- $('.skin-minimal input').iCheck({
- checkboxClass: 'icheckbox-blue',
- radioClass: 'iradio-blue',
- increaseArea: '20%'
- });
- });
- function add() {
- var maintenanceContentDate = $("#maintenanceContentDate").val();
- if( maintenanceContentDate == null || maintenanceContentDate == "" ){
- layer.msg('请选择检测日期',{icon: 5,time:1000});
- return;
- }
- var maintenanceDesc = $("#maintenanceDesc").val();
- if( !maintenanceDesc == null){
- if( maintenanceDesc.length > 150 ){
- layer.msg('备注长度不得大于150个字符',{icon: 5,time:1000});
- return;
- }
- }
- $.ajax({
- cache: true,
- type: "POST",
- url: "${path}/admin/maintenance/update_maintenance",
- data:$('#form-admin-add').serialize(),// 你的formid
- async: false,
- success: function(data){
- if (data.returnCode == 200) {
- layer.msg('修改成功',{icon: 1,time:1000},function () {
- window.parent.location.reload();
- var index = parent.layer.getFrameIndex(window.name);
- parent.layer.close(index)
- });
- } else {
- layer.msg('修改失败',{icon: 5,time:1000});
- }
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- layer.msg('添加错误',{icon: 5,time:1000});
- }
- });
- }
- </script>
- </body>
- </html>
|