safesite/safesite/templates/checkjobdetail.html

197 lines
6.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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">
<a id="yanshou" onclick="yanshou()" class="easyui-linkbutton" data-options="iconCls: 'fa-download'">验收</a>
<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}}</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>{{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>
<td>{{taskstate==1?'正在检查':'检查完毕'}}</td>
<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__username}}
</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) {
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('提示', '失败!'); }
$('#submitb').linkbutton('enable');
}
});
}
</script>