safesite/safesite/templates/checkjobdetail.html

214 lines
7.4 KiB
HTML

<div class="easyui-layout" id="result" style="width:100%;height:100%"></div>
<script type="text/html" id="text">
{% verbatim %}
<div id='southdiv' data-options="region:'south'" style="height:50px;text-align:center;padding:5px">
{{if taskstate==2}}
<a id="yanshou" onclick="yanshou()" class="easyui-linkbutton" data-options="iconCls: 'fa-download'">验收</a>
{{/if}}
<a iconCls="fa-close" class="easyui-linkbutton" onclick="closeForm()">关闭</a>
</div>
<div data-options="region:'center'" style="height:100%;padding:15px 15px;">
<div style="text-align:center;font-size: 24px;font-weight: bold;margin-bottom: 20px;">{{checktask__checktaskname}}</div>
<table class='detailtable' style="text-align:center;">
<tr>
<td style="font-weight: bold;">检查人员</td>
<td>{{checkname__username}}/{{checkname__name}}</td>
<td style="font-weight: bold;">检查频率</td>
{{if checktask__tasktype==1}}
<td>每天一次</td>
{{else if checktask__tasktype==2}}
<td>每周一次</td>
{{else if checktask__tasktype==3}}
<td>每月一次</td>
{{else if checktask__tasktype==4}}
<td>每季度一次</td>
{{else if checktask__tasktype==5}}
<td>每半年一次</td>
{{else if checktask__tasktype==6}}
<td>每年一次</td>
{{/if}}
</tr>
<tr>
<td style="font-weight: bold;">任务时间段</td>
<td colspan="3">{{starttime| dateFormat 'yyyy-MM-dd hh:mm:ss'}}{{endtime| dateFormat 'yyyy-MM-dd hh:mm:ss'}}</td>
</tr>
<tr>
<td style="font-weight: bold;">检查时间段</td>
<td colspan="3">{{jctime| dateFormat 'yyyy-MM-dd hh:mm:ss'}}{{jctime2| dateFormat 'yyyy-MM-dd hh:mm:ss'}}</td>
</tr>
<tr>
<td style="font-weight: bold;">提交时间</td>
<td>{{jctime}}</td>
<td style="font-weight: bold;">整改时间</td>
<td>{{zgtime}}</td>
</tr>
<tr style="height:80px">
<td style="font-weight: bold;">检查内容</td>
<td colspan="3">{{checktask__checktype__checkcontent}}</td>
</tr>
<tr style="height:80px">
<td style="font-weight: bold;">检查记录</td>
<td colspan="3">{{checkquestion}}</td>
</tr>
<tr>
<td>问题图片</td>
<td colspan="3">
{{each yhtp value index}}
<div style="float:left"><img onclick='bigger(this)' class='tp' width="120" height="120" src='{{value}}' /></div>
{{/each}}
</td>
</tr>
<tr style="height:80px">
<td style="font-weight: bold;">整改情况</td>
<td colspan="3">{{zgjg}}</td>
</tr>
<tr>
<td>整改图片</td>
<td colspan="3">
{{each zghtp value index}}
<div style="float:left"><img onclick='bigger(this)' class='tp' width="120" height="120" src='{{value}}' /></div>
{{/each}}
</td>
</tr>
<tr>
<td style="font-weight: bold;">工作状态</td>
{{if taskstate==1}}
<td style="color:red;">整改中</td>
{{else if taskstate==2}}
<td style="color:darkblue;">整改完成</td>
{{else if taskstate==3}}
<td style="color:green;">任务关闭</td>
{{else if taskstate==4}}
<td style="color:orange;">待执行</td>
{{/if}}
<td style="font-weight: bold;">检查地点</td>
<td>{{checktask__checkplace}}</td>
</tr>
<!--<tr style="height:80px">
<td style="font-weight: bold;">整改要求</td>
<td colspan="3">{{zgyq}}</td>
</tr>
<tr style="height:80px">
<td style="font-weight: bold;">整改结果</td>
<td colspan="3">{{zgjg}}</td>
</tr>
<tr>
<td style="font-weight: bold;">整改人</td>
<td>{{zguser__username}}</td>
<td style="font-weight: bold;">整改时间</td>
<td>{{zgtime| dateFormat 'yyyy-MM-dd hh:mm:ss'}}</td>
</tr>-->
<tr>
<td style="font-weight: bold;">经验总结</td>
<td colspan="3">{{content}}</td>
</tr>
<tr>
<td style="font-weight: bold;">涉及人员</td>
<td colspan="3">{{bcfr==[]?'kkl':bcfr}}</td>
</tr>
<tr>
<td style="font-weight: bold;">验收人</td>
<td>{{yanshouren__name}}</td>
<td style="font-weight: bold;">验收时间</td>
<td>{{yanshou}}</td>
</tr>
</table>
<div style="font-size:25px;background-color:aquamarine;margin-top:30px;">
{{yanshou==null?'本任务还没有验收,需要发布人验收':'该任务已经验收完毕,验收人是:'}}{{yanshouren__name}}
</div>
</div>
{% endverbatim %}
</script>
<script type="text/javascript" src="/static/safesite/mystatic/js/template-web.js"></script>
<script>
var html;
var state;
var id = {{ id }};
template.defaults.imports.dateFormat = function (date, format) {
if(date==null) return "";
date = new Date(date);
var map = {
"M": date.getMonth() + 1, //月份
"d": date.getDate(), //日
"h": date.getHours(), //小时
"m": date.getMinutes(), //分
"s": date.getSeconds(), //秒
"q": Math.floor((date.getMonth() + 3) / 3), //季度
"S": date.getMilliseconds() //毫秒
};
format = format.replace(/([yMdhmsqS])+/g, function (all, t) {
var v = map[t];
if (v !== undefined) {
if (all.length > 1) {
v = '0' + v;
v = v.substr(v.length - 2);
}
return v;
}
else if (t === 'y') {
return (date.getFullYear() + '').substr(4 - all.length);
}
return all;
});
return format;
};
template.defaults.imports.gfilename = function(value){
x = value.split('/').pop();
return x;
}
$.ajax({
type: "get",
url: "api/checkproject?a=checkjobdetail",
data: { id: id },
async: false, // ajax同步使用false
success: function (data) {
html = template('text', data);
}
});
$('#result').html(html);
function yanshou() {
$.ajax({
type: "get",
url: "api/checkproject?a=yanshou",
data: { id: id },
async: false, // ajax同步使用false
success: function (data) {
if (data.code == 1) {
$('#jobtab').datagrid('reload');
$("#dd").dialog("close");
} else { $.messager.alert('提示', data.msg); }
$('#submitb').linkbutton('enable');
}
});
}
</script>