| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282 |
- <!DOCTYPE HTML>
- <html xmlns:th="http://www.thymeleaf.org"
- xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
- layout:decorate="~{admin/common/common}">
- <head>
- <title>详情</title>
- <style>
- .childTit{
- font-size:14px;
- color:#333;
- padding:8px 5px;
- /*margin: 15px 0;*/
- border-left: 3px solid #409EFF;
- background: rgba(240,240,240,0.9);
- text-align: left;
- }
- .line {
- display: block;
- text-align: left;
- background-color: #fff;
- color: #333;
- border-bottom: 1px solid #0a6999;
- border-color: #fff;
- border-bottom: 1px solid #0a6999;
- margin-top: 10px;
- vertical-align: middle;
- padding: 4px 12px;
- height: 31px;
- line-height: 31px;
- font-size: 14px;
- font-weight: bold;
- }
- </style>
- </head>
- <body layout:fragment="content">
- <article class="page-container">
- <form class="form form-horizontal" id="form-add">
- <input type="hidden" name = "status" value="1" readonly/>
- <div class="line">基本信息</div>
- <div class="row cl">
- <div class="col-xs-6 col-sm-6">
- <input type="hidden" name = "id" th:value="${retreatOptimization.id}" readonly/>
- <label class="form-label col-xs-3 col-sm-3">板块:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <input type="test" class="input-text" name = "plateName" th:value="${retreatOptimization.plateName}" readonly/>
- </div>
- </div>
- <div class="col-xs-6 col-sm-6">
- <label class="form-label col-xs-3 col-sm-3">上传用户:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <input type="test" class="input-text" name = "userNsme" th:value="${retreatOptimization.userName}" readonly/>
- </div>
- </div>
- </div>
- <div class="row cl">
- <div class="col-xs-6 col-sm-6">
- <label class="form-label col-xs-3 col-sm-3">上传时间:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <input type="test" class="input-text" name = "createTime" th:value="${retreatOptimization.commit_time}" readonly/>
- </div>
- </div>
- <div class="col-xs-6 col-sm-6">
- <label class="form-label col-xs-3 col-sm-3">状态:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <input type="test" class="input-text" name = "statusStr" th:value="${retreatOptimization.statusStr}" readonly/>
- </div>
- </div>
- </div>
- <div class="row cl">
- <div class="col-xs-6 col-sm-6">
- <label class="form-label col-xs-3 col-sm-3">类型:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <input type="test" class="input-text" name = "typeStr" th:value="${retreatOptimization.typeStr}" readonly/>
- </div>
- </div>
- </div>
- <!--<div class="row cl">-->
- <!--<h2 class="childTit">文件资料</h2>-->
- <!--</div>-->
- <div class="line">文件资料</div>
- <div class="row cl">
- <div class="col-xs-6 col-sm-6">
- <label class="form-label col-xs-3 col-sm-3">类型:</label>
- <select class=" col-xs-6 col-sm-6" th:name="type" id="type" onChange="changeType()" style="height: 30px;">
- <option value="">-- 请选择类型 --</option>
- <option th:value="1" th:text="每年度初上报材料"></option>
- <option th:value="2" th:text="季度进展情况"></option>
- <option th:value="3" th:text="项目完成上报材料"></option>
- <option th:value="4" th:text="需提交会办材料"></option>
- </select>
- </div>
- </div>
- <div class="row cl" id="template">
- <table class="table table-border table-bordered table-bg table-hover" style="margin-top: 15px">
- <thead>
- <tr class="text-c">
- <th>编号</th>
- <th>模版</th>
- <th>附件</th>
- <!--<th>上传材料</th>-->
- </tr>
- </thead>
- <tbody>
- <tr class="text-c" th:each="model,iterStat:${materials}" th:object="${model}">
- <td class="index" th:text="${iterStat.index+1}"></td>
- <td class="templateFile">
- <div>
- <a th:href="${fileUrl} + *{url} " target="_blank" style="color: #5b98dd;">[[*{item_name}]]</a>
- </div>
- </td>
- <td class="td_material">
- <div th:if="*{fileDown}">
- <a th:href="${fileUrl} + *{fileDown.file_url}" target="_blank" style="color: #5b98dd;">[[*{fileDown.file_name}]]</a>
- </div>
- </td>
- <!--<td>-->
- <!--<input class="uploadFileTemplateId" type="hidden" th:name="materials[+${iterStat.index}+].id" />-->
- <!--<input class="uploadFileName input-text" name="uploadFileName" readonly="readonly" type="text"-->
- <!--th:onclick="'javascript:addFile(\'添加文件\',\'/retreatOpt/addFile/1/'+*{id}+'\',\'800\',\'350\')'"/>-->
- <!--<input class="uploadFileId" type="hidden" th:name="materials[+${iterStat.index}+].fileDown.file_id" />-->
- <!--</td>-->
- </tr>
- </tbody>
- </table>
- </div>
- <!--<div class="row cl">-->
- <!--<h2 class="childTit">流程信息</h2>-->
- <!--</div>-->
- <div class="line">流程信息</div>
- <div class="row cl" id="approval">
- <table class="table table-border table-bordered table-bg table-hover processTb" style="margin-top: 15px">
- <thead>
- <tr class="text-c">
- <th>单位</th>
- <th>用户</th>
- <th>时间</th>
- <th>操作</th>
- <th>意见与建议</th>
- </tr>
- </thead>
- <tbody>
- <tr class="text-c" th:each="model,iterStat:${approvals}" th:object="${model}">
- <td th:text="*{department}"></td>
- <td th:text="*{create_name}"></td>
- <td th:text="*{create_time}"></td>
- <td th:text="*{oper_type}"></td>
- <td class="viewComment" th:data="*{approval_comment}" th:text="*{approval_comment}"></td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="row cl">
- <div class="col-xs-12 col-sm-9 col-xs-offset-5 col-sm-offset-5">
- <a class="btn btn-primary radius" onclick="save()"> 提交 </a>
- <button onClick="removeIframe();" class="btn btn-default radius" type="button"> 取消 </button>
- </div>
- </div>
- </form>
- </article>
- <script type="text/javascript" th:src="@{/js/common/page.js}"></script>
- <script th:inline="javascript">
- var fileUrl = [[${fileUrl}]];
- var type = [[${retreatOptimization.type}]];
- $("#type").val(type);
- function changeType(){
- $.ajax({
- url :pagePath+"/retreatOpt/getTemplateFile",
- type : "get",
- data : {
- 'type': $("#type").val()
- },
- dataType : "json",
- success: function (result) {
- if (result.success) {
- var templates = result.obj;
- if(templates.length>0){
- $("#template").find("tbody tr").remove();
- for(var i=0;i< templates.length;i++){
- var file = templates[i].fileDown;
- var tr = '<tr class="text-c" >';
- //编号
- tr +='<td class="index" > '+(i+1)+' </td>';
- //模板
- tr += '<td class ="templateFile">'
- if(file && file.file_url){
- url = fileUrl + file.file_url;
- tr += '<a href="'+url+'" target="_blank">'+file.file_name+'</a>';
- }else{
- tr += '<span>'+templates[i].item_name+'</span>';
- }
- tr += '</td>';
- //上传文件
- tr += '<td id="materials">';
- tr += '<input class="uploadFileTemplateId" type="hidden" name="materials['+i+'].id" value="'+templates[i].id+'"/>';
- tr += '<input class="uploadFileName input-text" name="uploadFileName" readonly="readonly" type="text" onclick="javascript:addFile(\'添加文件\',\'/retreatOpt/addFile/1/'+templates[i].id+'\',\'800\',\'350\');"/>';
- tr += '<input class="uploadFileId" type="hidden" name="materials['+i+'].fileDown.file_id" />';
- tr += '</td>';
- $("#template").find("tbody").append(tr);
- }
- }else{
- $("#template").find("tbody tr").remove();
- }
- } else {
- errorMessage(result.message);
- }
- },
- error: function () {
- errorMessage('系统错误!');
- }
- });
- }
- //添加文件
- function addFile(title, url, w, h) {
- layer_show(title, pagePath + url, w, h);
- }
- function save(){
- var validateFile = true;
- $("#materials").find(".uploadFileName").each(function(){
- if($(this).val()==""){
- errorMessage('请上传所有材料!');
- validateFile = false;
- }
- });
- if($("#type").val() === ""){
- errorMessage('请选择类型!');
- validateFile = false;
- }
- if (validateFile){
- $("#form-add").ajaxSubmit({
- type: 'post',
- url: pagePath + "/retreatOpt/edit",
- dataType: "json",
- success: function (data) {
- if (data.success) {
- succeedMessage(data.message);
- console.log(data.message)
- setTimeClose();
- // window.location.href =pagePath + "/retreatOpt/index";
- } else {
- errorMessage(data.message);
- }
- },
- error: function () {
- errorMessage('系统错误!');
- }
- });
- }
- }
- //查看完整意见
- $(".viewComment").on("click", function () {
- layer.alert(
- $(this).attr('data'),
- {area: ['800px', '500px']}
- )
- });
- /**
- * 取消
- */
- function removeIframe(){
- var index = parent.layer.getFrameIndex(window.name);
- parent.layer.close(index);
- }
- </script>
- </body>
- </html>
|