diff --git a/groups/templates/groups/company.html b/groups/templates/groups/company.html
index 5b00fca2..0d7cbefd 100644
--- a/groups/templates/groups/company.html
+++ b/groups/templates/groups/company.html
@@ -36,27 +36,28 @@
| 公司名称 |
+ aria-label="Rendering engine: activate to sort column descending">公司ID
Browser |
+ aria-label="Browser: activate to sort column ascending">公司名称
Platform(s) |
+ aria-label="Platform(s): activate to sort column ascending">超管账号
超管账号 |
+ aria-label="Engine version: activate to sort column ascending">建立时间
建立时间 |
+ aria-label="CSS grade: activate to sort column ascending">查看员工
{% for i in companys %}
- | {{i.partname}} |
- Firefox 1.0 |
- Win 98+ / OSX.2+ |
+ {{i.partid}} |
+ {{i.partname}} |
{{i.useradmin}} |
{{i.creattime}} |
+ 员工 |
{% endfor %}
+
diff --git a/groups/templates/groups/company_user.html b/groups/templates/groups/company_user.html
new file mode 100644
index 00000000..b75a7cc0
--- /dev/null
+++ b/groups/templates/groups/company_user.html
@@ -0,0 +1,101 @@
+{% extends "./base.html" %}
+{% load static %}
+{% block headother%}
+
+
+
+{% endblock %}
+
+
+{% block title %}公司员工列表{% endblock %}
+
+{% block pagehead %}
+
+{% endblock %}
+{% block content %}
+
+
+
+
+
+
+
+
+
+
+
+ | 员工ID |
+ 员工名称 |
+ 员工账号 |
+ 员工工号 |
+ 操作 |
+
+
+
+ {% for user in users %}
+
+ | {{user.userid}} |
+ {{user.name}} |
+ {{user.username}} |
+ {{user.empid}} |
+ 修改 |
+
+ {% endfor %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+{% endblock %}
+
+
+{% block endother%}
+
+
+
+
+
+
+
+
+
+
+{% endblock %}
+
+
diff --git a/groups/templates/groups/company_userdetail.html b/groups/templates/groups/company_userdetail.html
new file mode 100644
index 00000000..01f9bca6
--- /dev/null
+++ b/groups/templates/groups/company_userdetail.html
@@ -0,0 +1,10 @@
+
+
+
+
+ Title
+
+
+ uid={{ uid }}
+
+
\ No newline at end of file
diff --git a/groups/urls.py b/groups/urls.py
index 7e8087f1..17e63f00 100644
--- a/groups/urls.py
+++ b/groups/urls.py
@@ -9,6 +9,9 @@ urlpatterns = [
path('logout/', views.logout, name='groups_logout'),
path('captcha/', include('captcha.urls')),
path('company/', views.company, name='groups_company'),
+ path('company/user//', views.company_user, name='groups_cuser'),
+ path('company/userdetail//', views.company_userdetail, name='groups_userdetail'),
+
path('trouble/', views.job, name='groups_trouble'),
path('observe/', views.job, name='groups_observe'),
path('miss/', views.job, name='groups_miss'),
diff --git a/groups/views.py b/groups/views.py
index b354a695..f03398d8 100644
--- a/groups/views.py
+++ b/groups/views.py
@@ -32,6 +32,7 @@ def login(request):
request.session['is_login'] = True
request.session['user_id'] = user.id
request.session['user_name'] = user.username
+ request.session['group_id'] = user.group
return redirect('/groups/index/')
else:
return render(request, 'groups/login.html', locals())
@@ -63,3 +64,16 @@ def company(request):
def job(request):
return render(request, 'groups/job.html', locals())
+
+
+def company_user(request, cid):
+ users = s_models.User.objects.filter(usecomp=cid)
+ # for user in users:
+ # dump(user)
+ return render(request, 'groups/company_user.html', locals())
+
+def company_userdetail(request, uid):
+ return render(request, 'groups/company_userdetail.html', locals())
+
+def dump(obj):
+ print('\n'.join(['%s:%s' % item for item in obj.__dict__.items()]))
\ No newline at end of file