shanchu
This commit is contained in:
parent
b4c83999e3
commit
4f82974fe7
|
@ -10,9 +10,9 @@
|
||||||
{% if request|has_permission:'b_checklist_add' %}
|
{% if request|has_permission:'b_checklist_add' %}
|
||||||
<a id="addtask" class="easyui-linkbutton" onclick="addcheckrw()" data-options="iconCls: 'fa-plus',plain:true">发布任务</a>
|
<a id="addtask" class="easyui-linkbutton" onclick="addcheckrw()" data-options="iconCls: 'fa-plus',plain:true">发布任务</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if request|has_permission:'b_checklist_del' %}
|
||||||
<a id="delprg" class="easyui-linkbutton" onclick="deltask()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
<a id="delprg" class="easyui-linkbutton" onclick="deltask()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
||||||
|
{% endif %}
|
||||||
<a id="detailcheck" class="easyui-linkbutton" onclick="detailcheck()" data-options="iconCls: 'fa-info-circle',plain:true">详情</a>
|
<a id="detailcheck" class="easyui-linkbutton" onclick="detailcheck()" data-options="iconCls: 'fa-info-circle',plain:true">详情</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -11,9 +11,9 @@
|
||||||
{% if request|has_permission:'b_checktable_add' %}
|
{% if request|has_permission:'b_checktable_add' %}
|
||||||
<a id="addtask" class="easyui-linkbutton" onclick="addtask()" data-options="iconCls: 'fa-plus',plain:true">新增</a>
|
<a id="addtask" class="easyui-linkbutton" onclick="addtask()" data-options="iconCls: 'fa-plus',plain:true">新增</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<!--{% if request|has_permission:'b_checktable_del' %}
|
{% if request|has_permission:'b_checktable_del' %}
|
||||||
<a id="delprg" class="easyui-linkbutton" onclick="deltask()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
<a id="delprg" class="easyui-linkbutton" onclick="deltab()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
||||||
{% endif %}-->
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -54,5 +54,38 @@
|
||||||
opendg('修改检查内容','html/updchecktable/'+row.id)
|
opendg('修改检查内容','html/updchecktable/'+row.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function deltab() {
|
||||||
|
var row = $('#tasktab').datagrid('getSelected');
|
||||||
|
if (row) {
|
||||||
|
$.messager.confirm('提示', '确定删除吗?', function (r) {
|
||||||
|
if (r) {
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url: 'api/checkproject?a=deltab',
|
||||||
|
data: { 'id': row.id },
|
||||||
|
datatype: "json",
|
||||||
|
beforeSend: function () { },
|
||||||
|
success: function (data) {
|
||||||
|
if (data.code == 1) {
|
||||||
|
$("#tasktab").datagrid('reload');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$.messager.alert('提示', '你无权删除该条信息!');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
complete: function (XMLHttpRequest, textStatus) {
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$.messager.alert('提示', '请选择一行数据!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
|
@ -7908,7 +7908,7 @@ def checkprojects(req):
|
||||||
obj.save()
|
obj.save()
|
||||||
return JsonResponse({'code': 1})
|
return JsonResponse({'code': 1})
|
||||||
elif a=='checktablist':
|
elif a=='checktablist':
|
||||||
projectlist = Checktable.objects.filter(usecomp__partid=companyid).values('id', 'checktitle')
|
projectlist = Checktable.objects.filter(usecomp__partid=companyid,deletemark=1).values('id', 'checktitle')
|
||||||
return HttpResponse(transstr(projectlist,'id','checktitle'),content_type="application/json")
|
return HttpResponse(transstr(projectlist,'id','checktitle'),content_type="application/json")
|
||||||
elif a=='addchecklist':
|
elif a=='addchecklist':
|
||||||
data = json.loads(req.body.decode('utf-8'))
|
data = json.loads(req.body.decode('utf-8'))
|
||||||
|
@ -8001,6 +8001,17 @@ def checkprojects(req):
|
||||||
a.checkcontent = data['checkcontent']
|
a.checkcontent = data['checkcontent']
|
||||||
a.save()
|
a.save()
|
||||||
return JsonResponse({"code": 1})
|
return JsonResponse({"code": 1})
|
||||||
|
elif a == 'deltab':
|
||||||
|
id =req.GET.get('id')
|
||||||
|
a = Checktable.objects.get(id=id)
|
||||||
|
if a.createuser==User.objects.get(userid=userid):
|
||||||
|
a.deletemark=0
|
||||||
|
a.save()
|
||||||
|
return JsonResponse({"code":1})
|
||||||
|
|
||||||
|
else:
|
||||||
|
|
||||||
|
return JsonResponse({"code":0})
|
||||||
|
|
||||||
|
|
||||||
elif a == 'checkjobdetail':
|
elif a == 'checkjobdetail':
|
||||||
|
|
Loading…
Reference in New Issue