safesite/safesite/templates/checkjobdetail.html

136 lines
5.0 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>
<td>{{checktask__checktime| dateFormat 'yyyy-MM-dd hh:mm:ss'}}</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 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>{{createuser__username}}</td>
<td style="font-weight: bold;">填报时间</td>
<td>{{zgtime| dateFormat 'yyyy-MM-dd hh:mm:ss'}}</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>