| <!DOCTYPE HTML> | 
| <html xmlns:th="http://www.thymeleaf.org"> | 
| <head> | 
|     <meta charset="utf-8"> | 
|     <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> | 
|     <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"/> | 
|     <!-- 本框架基本脚本和样式 --> | 
|     <script type="text/javascript" | 
|             th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> | 
|     <script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script> | 
| </head> | 
| <body> | 
| <div class="ibox-content"> | 
|     <form class="form-horizontal" id="dataform" | 
|           onsubmit="javascripr:return false;"> | 
|   | 
|         <input autocomplete="off"   type="hidden" name="id" id="tid" th:value="${obj?.id}"> | 
|   | 
|         <div class="form-group"> | 
|             <label class="col-offset-1 col-sm-2 control-label">入库类型</label> | 
|             <div class="col-sm-3"> | 
|                 <p class="form-control-static" th:text="${obj?.instoreType}"></p> | 
|             </div> | 
|   | 
|             <label class="col-sm-2 control-label">创建时间</label> | 
|             <div class="col-sm-3"> | 
|                 <p class="form-control-static" th:text="${#dates.format(obj?.instoreDate,'yyyy-MM-dd HH:mm:ss')}"> | 
|                 </p> | 
|             </div> | 
|         </div> | 
|   | 
|         <div class="form-group"> | 
|             <label class="col-sm-2 control-label">制单人</label> | 
|             <div class="col-sm-3"> | 
|                 <p class="form-control-static" th:text="${obj?.makingmanName}"></p> | 
|             </div> | 
|   | 
|             <label class="col-sm-2 control-label">审核人</label> | 
|             <div class="col-sm-3"> | 
|                 <p class="form-control-static" th:text="${obj?.appmanName}"></p> | 
|             </div> | 
|         </div> | 
|   | 
|         <div class="form-group"> | 
|             <label class="col-sm-2 control-label">往来单位</label> | 
|             <div class="col-sm-3"> | 
|                 <p class="form-control-static" th:text="${obj?.supplierName}"></p> | 
|             </div> | 
|   | 
|             <label class="col-sm-2 control-label">备注</label> | 
|             <div class="col-sm-3"> | 
|                 <p class="form-control-static" th:text="${obj?.remark}"></p> | 
|             </div> | 
|         </div> | 
|   | 
|         <div class="form-group"> | 
|             <label class="col-sm-2 control-label">入库仓库</label> | 
|             <!-- TODO============= --> | 
|             <div class="col-sm-3"> | 
|                 <p class="form-control-static" th:text="${obj?.storeName}"></p> | 
|             </div> | 
|   | 
|             <label class="col-sm-2 control-label">总价</label> | 
|             <div class="col-sm-3"> | 
|                 <p class="form-control-static" th:text="${obj?.sumall}"> | 
|                 </p> | 
|             </div> | 
|         </div> | 
|         <div class="form-group"> | 
|             <label class="col-sm-2 control-label">入库明细 <span | 
|                     class="text-danger">*</span></label> | 
|         </div> | 
|         <div class="form-group"> | 
|             <div class="col-sm-8 col-md-offset-2"> | 
|                 <table class="table table-striped table-hover table-bordered" | 
|                        id="mgrid"> | 
|                     <thead> | 
|                     <tr> | 
|                         <th>序号</th> | 
|                         <th>产品编码</th> | 
|                         <th>产品名称</th> | 
|                         <th>产品类型</th> | 
|                         <th>存货单位</th> | 
|                         <th width="120">数量 <span class="text-danger">*</span></th> | 
|                         <th width="120">采购单价 <span class="text-danger">*</span></th> | 
|                         <th>总金额</th> | 
|                     </tr> | 
|                     </thead> | 
|                     <tbody id="cpId"> | 
|                     <tr th:each="item,itemIndex:${obj.instoreDetails}"> | 
|                         <td th:text="${itemIndex.index }"></td> | 
|                         <td th:text="${item.goods.goodsNo }"></td> | 
|                         <td th:text="${item.goods.name}"></td> | 
|                         <td th:text="${item.goods.goodsSortName}"></td> | 
|                         <td th:text="${item.goods.unit}"></td> | 
|                         <td th:text="${item.amount}"></td> | 
|                         <td th:text="${item.price}"></td> | 
|                         <td th:text="${item.amount }*${item.price }"></td> | 
|                     </tr> | 
|                     </tbody> | 
|   | 
|                 </table> | 
|             </div> | 
|         </div> | 
|   | 
|         <div class="form-group "> | 
|             <div class="col-sm-12 text-center fixed-button"> | 
|                 <a  th:if="${obj.checkStatus eq '待审核'}" href="javascript:;" onclick="myForm.submit()" class="btn btn-info radius">确认审核</a>     | 
|                 <a th:if="${obj.checkStatus eq '待审核'}" href="javascript:;" onclick="toReject()"    class="btn btn-success radius">不予审核</a> | 
|                 <button onclick="MTools.closeForm()" class="btn btn-danger radius">取消</button> | 
|             </div> | 
|         </div> | 
|     </form> | 
| </div> | 
| </body> | 
|   | 
|   | 
| <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> | 
|   | 
|   | 
| <script th:inline="javascript"> | 
|     //初始化操作 | 
|     var myForm=MForm.initForm({ | 
|         invokeUrl:basePath+"/admin/instore/check", | 
|         afterSubmit:function(){ | 
|             parent.myGrid.serchData(); | 
|         }, | 
|     }); | 
|   | 
|   | 
|     //不予审核 | 
|     function toReject(){ | 
|         var id=$("#tid").val(); | 
|         layer.prompt({ | 
|             formType: 2, | 
|             title: '审核意见' | 
|         }, function(value, index, elem){ | 
|             $.AjaxProxy({ | 
|                 a : false, | 
|                 c : false, | 
|                 p:{id:id,appRemark:value} | 
|             }).invoke(basePath+"/admin/instore/addcheckremark", function(loj) { | 
|                 if(loj.attr("result").status=='200'){ | 
|                     layer.msg('备注成功', {icon: 1,time:500},function(){ | 
|                         parent.myGrid.serchData(); | 
|                         MTools.closeForm(); | 
|                     }); | 
|                 } | 
|             }); | 
|   | 
|         }); | 
|   | 
|     } | 
|   | 
|     function uncheck(){ | 
|         var id=$("#tid").val(); | 
|         layer.prompt({ | 
|             formType: 2, | 
|             title: '审核意见' | 
|         }, function(value, index, elem){ | 
|             $.AjaxProxy({ | 
|                 a : false, | 
|                 c : false, | 
|                 p:{id:id,appRemark:value} | 
|             }).invoke(basePath+"/admin/instore/unCheck", function(loj) { | 
|                 if(loj.attr("result").status=='200'){ | 
|                     layer.msg('撤销成功', {icon: 1,time:500},function(){ | 
|                         parent.myGrid.serchData(); | 
|                         MTools.closeForm(); | 
|                     }); | 
|                 } | 
|             }); | 
|         }); | 
|     } | 
|   | 
| </script> | 
| </body> | 
| </html> |