作业审批详情显示
This commit is contained in:
parent
af48a12425
commit
b8885bba8b
1488
safesite/models.py
1488
safesite/models.py
File diff suppressed because it is too large
Load Diff
|
@ -1,24 +1,49 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
||||||
<title>绑定微信号</title>
|
|
||||||
<style>
|
|
||||||
*{margin:0;padding:0;outline:0;}
|
|
||||||
#p{ margin:10px 10px;font-size: 18px;}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<p id = "p">{{msg}}</p>
|
|
||||||
{% if code == 1 %}
|
|
||||||
<p>您已可接受微信通知</p>
|
|
||||||
<p>可识别下方二维码打开小程序</p>
|
|
||||||
<img src="/static/safesite/mystatic/images/weixinmp.jpg" width="80%" height="80%" style="margin-top:10px;text-align: center" />
|
|
||||||
{% endif %}
|
|
||||||
{% if code != 1 %}
|
|
||||||
<img src="/static/safesite/mystatic/images/ctcgzh.jpg" width="80%" height="80%" style="margin-top:10px;text-align: center" />
|
|
||||||
|
|
||||||
{% endif %}
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||||
|
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
|
||||||
|
<title>绑定微信号</title>
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#p {
|
||||||
|
margin: 10px 10px;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<p id="p">{{msg}}</p>
|
||||||
|
{% if code == 1 %}
|
||||||
|
<p>您已可接受微信通知</p>
|
||||||
|
<div id="mpdiv">
|
||||||
|
<p>可识别下方二维码打开小程序</p>
|
||||||
|
<img src="/static/safesite/mystatic/images/weixinmp.jpg" width="80%" height="80%"
|
||||||
|
style="margin-top:10px;text-align: center" />
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if code != 1 %}
|
||||||
|
<img src="/static/safesite/mystatic/images/ctcgzh.jpg" width="80%" height="80%"
|
||||||
|
style="margin-top:10px;text-align: center" />
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
<script>
|
||||||
|
if(window.__wxjs_environment === 'miniprogram'){document.getElementById("mpdiv").innerHTML = "<input onclick='back()' type='button' value='返回小程序'></input>"
|
||||||
|
|
||||||
|
}
|
||||||
|
function back(){
|
||||||
|
wx.miniProgram.reLaunch({url:'/pages/main/main'})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
|
@ -1,7 +1,8 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv='refresh' content='1800'>
|
||||||
<title>数据大屏</title>
|
<title>数据大屏</title>
|
||||||
<link rel="stylesheet" href="/static/safesite/mystatic/css/bigdata/style.css" />
|
<link rel="stylesheet" href="/static/safesite/mystatic/css/bigdata/style.css" />
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<div id="zytablebar" style="padding:6px;height:auto">
|
<div id="zytablebar" style="padding:6px;height:auto">
|
||||||
<div style="margin-bottom:2px;margin-top:2px">
|
<div style="margin-bottom:2px;margin-top:2px">
|
||||||
<a class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain:true" onclick="javascript:opendg('申请作业','html/operation/add')">申请作业(无审批)</a>
|
<a class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain:true" onclick="javascript:opendg('申请作业','html/operation/add')">申请作业(无审批)</a>
|
||||||
|
<a id="gbzy" class="easyui-linkbutton" onclick="gbzy()" data-options="iconCls: 'fa-close',plain:true">关闭作业</a>
|
||||||
<a onclick="javascript:$('#sdg_zy').dialog('open')" class="easyui-linkbutton" data-options="iconCls: 'fa-search',plain:true">详细筛选</a>
|
<a onclick="javascript:$('#sdg_zy').dialog('open')" class="easyui-linkbutton" data-options="iconCls: 'fa-search',plain:true">详细筛选</a>
|
||||||
<a id="delzy" class="easyui-linkbutton" onclick="delzy()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
<a id="delzy" class="easyui-linkbutton" onclick="delzy()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
||||||
<a id="zydetail" onclick="zydetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">查看详情</a>
|
<a id="zydetail" onclick="zydetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">查看详情</a>
|
||||||
|
@ -88,8 +89,9 @@
|
||||||
case '待关闭': return 'background-color:orange;'; break;
|
case '待关闭': return 'background-color:orange;'; break;
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
{ field: 'zylx__dickeyname', title: '作业类型', width: 120 },
|
{ field: 'zyqy__name', title: '作业区域', width: 100 },
|
||||||
{ field: 'zyfzr__name', title: '作业负责人', width: 120 },
|
{ field: 'zylx__dickeyname', title: '作业类型', width: 100 },
|
||||||
|
{ field: 'zyfzr__name', title: '作业负责人', width: 100 },
|
||||||
{ field: 'zynr', title: '作业内容', width: 200 },
|
{ field: 'zynr', title: '作业内容', width: 200 },
|
||||||
{ field: 'submittime', title: '提交时间', width: 100 },
|
{ field: 'submittime', title: '提交时间', width: 100 },
|
||||||
]]
|
]]
|
||||||
|
@ -146,5 +148,37 @@
|
||||||
let url = 'api/operation?a=exportexcel'
|
let url = 'api/operation?a=exportexcel'
|
||||||
$('<form method="post" action="' + url + '"></form>').appendTo('body').submit().remove();
|
$('<form method="post" action="' + url + '"></form>').appendTo('body').submit().remove();
|
||||||
}
|
}
|
||||||
|
function gbzy(){
|
||||||
|
var row = $('#zytable').datagrid('getSelected');
|
||||||
|
if (row) {
|
||||||
|
$.messager.confirm('提示', '确定关闭该作业吗?', function (r) {
|
||||||
|
if (r) {
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: 'api/operation?a=gbzy',
|
||||||
|
data: JSON.stringify({ 'zyid': row.zyid }),
|
||||||
|
datatype: "json",
|
||||||
|
contentType: "application/json;charset=utf-8",
|
||||||
|
beforeSend: function () { },
|
||||||
|
success: function (data) {
|
||||||
|
if (data.code == 1) {
|
||||||
|
$("#zytable").datagrid('reload');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$.messager.alert('提示', '你无权关闭该作业!');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
complete: function (XMLHttpRequest, textStatus) {
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$.messager.alert('提示', '请选择一行数据!');
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
|
@ -13,6 +13,10 @@
|
||||||
<td>作业编号:{{zynum}}</td>
|
<td>作业编号:{{zynum}}</td>
|
||||||
<td>提交时间:{{submittime| dateFormat 'yyyy-MM-dd hh:mm'}}</td>
|
<td>提交时间:{{submittime| dateFormat 'yyyy-MM-dd hh:mm'}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>作业区域:{{zyqy__name}}</td>
|
||||||
|
<td>作业地点:{{zydd}}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">作业类型:{{zylx__dickeyname}}</td>
|
<td colspan="2">作业类型:{{zylx__dickeyname}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -27,7 +31,11 @@
|
||||||
<td style="width:50%">开始时间:{{kssj| dateFormat 'yyyy-MM-dd hh:mm'}}</td>
|
<td style="width:50%">开始时间:{{kssj| dateFormat 'yyyy-MM-dd hh:mm'}}</td>
|
||||||
<td style="width:50%">结束时间:{{jssj| dateFormat 'yyyy-MM-dd hh:mm'}}</td>
|
<td style="width:50%">结束时间:{{jssj| dateFormat 'yyyy-MM-dd hh:mm'}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">作业人员:{{zyry}}</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<div class="labeldiv">作业人员确认详情</div>
|
||||||
<table class='detailtable'>
|
<table class='detailtable'>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -65,7 +73,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</table>
|
</table>
|
||||||
<div class="labeldiv">流程详情</div>
|
<div class="labeldiv">作业审批详情</div>
|
||||||
<table class='detailtable'>
|
<table class='detailtable'>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -119,10 +119,14 @@
|
||||||
field: 'shresult', title: '隐患状态', width: 100, styler: function (value, row, index) {
|
field: 'shresult', title: '隐患状态', width: 100, styler: function (value, row, index) {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case 1: return ''; break;
|
case 1: return ''; break;
|
||||||
case 2: return 'background-color:red;'; break;
|
case 2: return 'color:red;font-weight:bold'; break;
|
||||||
case 3: return 'background-color:red;'; break;
|
case 3: return 'color:red;font-weight:bold'; break;
|
||||||
case 4: return 'background-color:yellow;'; break;
|
case 4: return 'color:orange;font-weight:bold'; break;
|
||||||
case 6: return 'background-color:yellow;'; break;
|
case 6: return 'color:orange;font-weight:bold'; break;
|
||||||
|
}
|
||||||
|
let zgqx = new Date(row.zgqx);
|
||||||
|
if(new Date()>zgqx&&row.yhzt==3){
|
||||||
|
return 'color:red;font-weight:bold'
|
||||||
}
|
}
|
||||||
}, formatter: function (value, row, index) {
|
}, formatter: function (value, row, index) {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
|
@ -133,8 +137,13 @@
|
||||||
case 5: return '评估未通过'; break;
|
case 5: return '评估未通过'; break;
|
||||||
case 6: return '未采纳'; break;
|
case 6: return '未采纳'; break;
|
||||||
}
|
}
|
||||||
|
let zgqx = new Date(row.zgqx);
|
||||||
|
if(new Date()>zgqx&&row.yhzt==3){
|
||||||
|
return '超期未整改'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{ field: 'tbsj', title: '提交时间', width: 100 },
|
||||||
]]
|
]]
|
||||||
});
|
});
|
||||||
$('#kjcxyh').combobox({
|
$('#kjcxyh').combobox({
|
||||||
|
|
|
@ -3506,7 +3506,7 @@ def mplogin(req):
|
||||||
username = a.username
|
username = a.username
|
||||||
req.session['userid'] = userid
|
req.session['userid'] = userid
|
||||||
# print(req.session,req.COOKIES)
|
# print(req.session,req.COOKIES)
|
||||||
return JsonResponse({"code": 1, 'userid': userid, 'username': username, 'mpopenid': mpopenid})
|
return JsonResponse({"code": 1, 'userid': userid, 'username': username, 'mpopenid': mpopenid,'openid':a.openid})
|
||||||
else:
|
else:
|
||||||
return JsonResponse({"code": 0, 'mpopenid': mpopenid})
|
return JsonResponse({"code": 0, 'mpopenid': mpopenid})
|
||||||
|
|
||||||
|
@ -4987,7 +4987,7 @@ def apioperation(req):
|
||||||
total = a.count()
|
total = a.count()
|
||||||
startnum, endnum = fenye(req)
|
startnum, endnum = fenye(req)
|
||||||
a = a[startnum:endnum].values('zyid', 'zylx__dickeyname', 'zynum',
|
a = a[startnum:endnum].values('zyid', 'zylx__dickeyname', 'zynum',
|
||||||
'zyfzr__name', 'zynr', 'zyzt', 'submittime', 'todouser__name')
|
'zyfzr__name', 'zynr', 'zyzt', 'submittime', 'todouser__name','zyqy__name')
|
||||||
return HttpResponse(transjson(total, a), content_type="application/json")
|
return HttpResponse(transjson(total, a), content_type="application/json")
|
||||||
elif a == 'exportexcel':
|
elif a == 'exportexcel':
|
||||||
userid = req.session['userid']
|
userid = req.session['userid']
|
||||||
|
@ -5007,7 +5007,7 @@ def apioperation(req):
|
||||||
total = a.count()
|
total = a.count()
|
||||||
startnum, endnum = fenye(req)
|
startnum, endnum = fenye(req)
|
||||||
a = a[startnum:endnum].values(
|
a = a[startnum:endnum].values(
|
||||||
'zyid', 'zylx__dickeyname', 'zynum', 'zyfzr__name', 'zynr', 'zyzt', 'submittime')
|
'zyid', 'zylx__dickeyname', 'zynum', 'zyfzr__name', 'zynr', 'zyzt', 'submittime','zyqy__name')
|
||||||
return HttpResponse(transjson(total, a), content_type="application/json")
|
return HttpResponse(transjson(total, a), content_type="application/json")
|
||||||
elif a == 'listself':
|
elif a == 'listself':
|
||||||
userid = req.session['userid']
|
userid = req.session['userid']
|
||||||
|
@ -5017,13 +5017,13 @@ def apioperation(req):
|
||||||
total = a.count()
|
total = a.count()
|
||||||
startnum, endnum = fenye(req)
|
startnum, endnum = fenye(req)
|
||||||
a = a[startnum:endnum].values('zyid', 'zylx__dickeyname', 'zynum',
|
a = a[startnum:endnum].values('zyid', 'zylx__dickeyname', 'zynum',
|
||||||
'zyfzr__name', 'zynr', 'zyzt', 'submittime', 'todouser__name')
|
'zyfzr__name', 'zynr', 'zyzt', 'submittime', 'todouser__name','zyqy__name')
|
||||||
return HttpResponse(transjson(total, a), content_type="application/json")
|
return HttpResponse(transjson(total, a), content_type="application/json")
|
||||||
elif a == 'detail':
|
elif a == 'detail':
|
||||||
zyid = req.GET.get('zyid')
|
zyid = req.GET.get('zyid')
|
||||||
a = Operation.objects.filter(zyid=zyid)
|
a = Operation.objects.filter(zyid=zyid)
|
||||||
x = a.values('zyid', 'zydd', 'zylx__dickeyname', 'zynum', 'zyfzr__name', 'zynr', 'zyzt', 'zyimg',
|
x = a.values('zyid', 'zydd', 'zylx__dickeyname', 'zynum', 'zyfzr__name', 'zynr', 'zyzt', 'zyimg',
|
||||||
'submittime', 'zybm__partname', 'sdbm__partname', 'kssj', 'jssj', 'fxcs', 'zyimg2')[0]
|
'submittime', 'zybm__partname', 'sdbm__partname', 'kssj', 'jssj', 'fxcs', 'zyimg2','zyqy__name')[0]
|
||||||
if x['zyzt']['splc']:
|
if x['zyzt']['splc']:
|
||||||
for i in x['zyzt']['splc']:
|
for i in x['zyzt']['splc']:
|
||||||
i['sprs'] = ','.join(list(User.objects.filter(
|
i['sprs'] = ','.join(list(User.objects.filter(
|
||||||
|
@ -5241,9 +5241,10 @@ def apioperation(req):
|
||||||
data = json.loads(req.body.decode('utf-8'))
|
data = json.loads(req.body.decode('utf-8'))
|
||||||
# print(data)
|
# print(data)
|
||||||
zyid = data['zyid']
|
zyid = data['zyid']
|
||||||
zyimg2 = data['zyimg2']
|
|
||||||
obj = Operation.objects.get(zyid=zyid)
|
obj = Operation.objects.get(zyid=zyid)
|
||||||
obj.zyimg2 = '?'.join(zyimg2)
|
if 'zyimg2' in data:
|
||||||
|
zyimg2 = data['zyimg2']
|
||||||
|
obj.zyimg2 = '?'.join(zyimg2)
|
||||||
obj.zyzt['zyzt'] = '已关闭'
|
obj.zyzt['zyzt'] = '已关闭'
|
||||||
obj.zyzt['jdmc'] = ''
|
obj.zyzt['jdmc'] = ''
|
||||||
obj.todouser = None
|
obj.todouser = None
|
||||||
|
|
Loading…
Reference in New Issue