Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zhupu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sugar
zhupu
Commits
ffe652d8
Commit
ffe652d8
authored
Nov 24, 2023
by
sugar
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://rungit.jxdsy.cn:10000/sugar/zhupu
into dev
parents
d78d9eb5
8e9da6f9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
13 deletions
+27
-13
application/admin/controller/user/Agent.php
application/admin/controller/user/Agent.php
+25
-0
application/admin/lang/zh-cn/family/family.php
application/admin/lang/zh-cn/family/family.php
+1
-1
application/admin/view/user/agent/index.html
application/admin/view/user/agent/index.html
+0
-11
public/assets/js/backend/user/agent.js
public/assets/js/backend/user/agent.js
+1
-1
No files found.
application/admin/controller/user/Agent.php
View file @
ffe652d8
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
app\admin\controller\user
;
namespace
app\admin\controller\user
;
use
app\admin\controller\auth\Admin
;
use
app\admin\controller\auth\Admin
;
use
app\admin\model\family\Family
;
use
app\common\controller\Backend
;
use
app\common\controller\Backend
;
use
think\Db
;
use
think\Db
;
...
@@ -99,6 +100,18 @@ class Agent extends Backend
...
@@ -99,6 +100,18 @@ class Agent extends Backend
if
(
empty
(
$params
[
'family_id'
])){
if
(
empty
(
$params
[
'family_id'
])){
$this
->
error
(
"请选择族谱ID"
);
$this
->
error
(
"请选择族谱ID"
);
}
}
$family
=
Family
::
where
([
'id'
=>
$params
[
'family_id'
]])
->
find
();
if
(
$params
[
'type'
]
==
1
){
//族长
if
(
!
in_array
(
$params
[
'user_id'
],
explode
(
","
,
$family
[
'rw_user_id'
]))){
Family
::
where
([
'id'
=>
$params
[
'family_id'
]])
->
update
([
'rw_user_id'
=>
empty
(
$family
[
'rw_user_id'
])
?
$params
[
'user_id'
]
:
$family
[
'rw_user_id'
]
.
","
.
$params
[
'user_id'
]]);
}
}
else
if
(
$params
[
'type'
]
==
2
){
//传承人
if
(
!
in_array
(
$params
[
'user_id'
],
explode
(
","
,
$family
[
'ro_user_id'
]))){
Family
::
where
([
'id'
=>
$params
[
'family_id'
]])
->
update
([
'ro_user_id'
=>
empty
(
$family
[
'ro_user_id'
])
?
$params
[
'user_id'
]
:
$family
[
'ro_user_id'
]
.
","
.
$params
[
'user_id'
]]);
}
}
unset
(
$params
[
'province_id'
]);
unset
(
$params
[
'city_id'
]);
unset
(
$params
[
'area_id'
]);
unset
(
$params
[
'province_id'
]);
unset
(
$params
[
'city_id'
]);
unset
(
$params
[
'area_id'
]);
}
else
{
}
else
{
if
(
$params
[
"type"
]
==
3
){
if
(
$params
[
"type"
]
==
3
){
...
@@ -193,6 +206,18 @@ class Agent extends Backend
...
@@ -193,6 +206,18 @@ class Agent extends Backend
if
(
empty
(
$params
[
'family_id'
])){
if
(
empty
(
$params
[
'family_id'
])){
$this
->
error
(
"请选择族谱ID"
);
$this
->
error
(
"请选择族谱ID"
);
}
}
$family
=
Family
::
where
([
'id'
=>
$params
[
'family_id'
]])
->
find
();
if
(
$params
[
'type'
]
==
1
){
//族长
if
(
!
in_array
(
$params
[
'user_id'
],
explode
(
","
,
$family
[
'rw_user_id'
]))){
Family
::
where
([
'id'
=>
$params
[
'family_id'
]])
->
update
([
'rw_user_id'
=>
empty
(
$family
[
'rw_user_id'
])
?
$params
[
'user_id'
]
:
$family
[
'rw_user_id'
]
.
","
.
$params
[
'user_id'
]]);
}
}
else
if
(
$params
[
'type'
]
==
2
){
//传承人
if
(
!
in_array
(
$params
[
'user_id'
],
explode
(
","
,
$family
[
'ro_user_id'
]))){
Family
::
where
([
'id'
=>
$params
[
'family_id'
]])
->
update
([
'ro_user_id'
=>
empty
(
$family
[
'ro_user_id'
])
?
$params
[
'user_id'
]
:
$family
[
'ro_user_id'
]
.
","
.
$params
[
'user_id'
]]);
}
}
unset
(
$params
[
'province_id'
]);
unset
(
$params
[
'city_id'
]);
unset
(
$params
[
'area_id'
]);
unset
(
$params
[
'province_id'
]);
unset
(
$params
[
'city_id'
]);
unset
(
$params
[
'area_id'
]);
}
else
{
}
else
{
if
(
$params
[
"type"
]
==
3
){
if
(
$params
[
"type"
]
==
3
){
...
...
application/admin/lang/zh-cn/family/family.php
View file @
ffe652d8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
return
[
return
[
'Id'
=>
'id'
,
'Id'
=>
'id'
,
'Create_user_id'
=>
'
族长
信息'
,
'Create_user_id'
=>
'
创建人
信息'
,
'Realname'
=>
'创建人姓名'
,
'Realname'
=>
'创建人姓名'
,
'Surname_id'
=>
'姓氏'
,
'Surname_id'
=>
'姓氏'
,
'Family_name'
=>
'姓氏族谱'
,
'Family_name'
=>
'姓氏族谱'
,
...
...
application/admin/view/user/agent/index.html
View file @
ffe652d8
...
@@ -19,18 +19,7 @@
...
@@ -19,18 +19,7 @@
<a
href=
"javascript:;"
class=
"btn btn-primary btn-refresh"
title=
"{:__('Refresh')}"
><i
class=
"fa fa-refresh"
></i>
</a>
<a
href=
"javascript:;"
class=
"btn btn-primary btn-refresh"
title=
"{:__('Refresh')}"
><i
class=
"fa fa-refresh"
></i>
</a>
<a
href=
"javascript:;"
class=
"btn btn-success btn-add {:$auth->check('user/add')?'':'hide'}"
title=
"{:__('Add')}"
><i
class=
"fa fa-plus"
></i>
{:__('Add')}
</a>
<a
href=
"javascript:;"
class=
"btn btn-success btn-add {:$auth->check('user/add')?'':'hide'}"
title=
"{:__('Add')}"
><i
class=
"fa fa-plus"
></i>
{:__('Add')}
</a>
<a
href=
"javascript:;"
class=
"btn btn-success btn-edit btn-disabled disabled {:$auth->check('user/edit')?'':'hide'}"
title=
"{:__('Edit')}"
><i
class=
"fa fa-pencil"
></i>
{:__('Edit')}
</a>
<a
href=
"javascript:;"
class=
"btn btn-success btn-edit btn-disabled disabled {:$auth->check('user/edit')?'':'hide'}"
title=
"{:__('Edit')}"
><i
class=
"fa fa-pencil"
></i>
{:__('Edit')}
</a>
<a
href=
"javascript:;"
class=
"btn btn-danger btn-del btn-disabled disabled {:$auth->check('user/del')?'':'hide'}"
title=
"{:__('Delete')}"
><i
class=
"fa fa-trash"
></i>
{:__('Delete')}
</a>
<a
href=
"javascript:;"
class=
"btn btn-danger btn-import {:$auth->check('user/import')?'':'hide'}"
title=
"{:__('Import')}"
id=
"btn-import-file"
data-url=
"ajax/upload"
data-mimetype=
"csv,xls,xlsx"
data-multiple=
"false"
><i
class=
"fa fa-upload"
></i>
{:__('Import')}
</a>
<div
class=
"dropdown btn-group {:$auth->check('user/multi')?'':'hide'}"
>
<a
class=
"btn btn-primary btn-more dropdown-toggle btn-disabled disabled"
data-toggle=
"dropdown"
><i
class=
"fa fa-cog"
></i>
{:__('More')}
</a>
<ul
class=
"dropdown-menu text-left"
role=
"menu"
>
<li><a
class=
"btn btn-link btn-multi btn-disabled disabled"
href=
"javascript:;"
data-params=
"status=normal"
><i
class=
"fa fa-eye"
></i>
{:__('Set to normal')}
</a></li>
<li><a
class=
"btn btn-link btn-multi btn-disabled disabled"
href=
"javascript:;"
data-params=
"status=hidden"
><i
class=
"fa fa-eye-slash"
></i>
{:__('Set to hidden')}
</a></li>
</ul>
</div>
</div>
</div>
<table
id=
"table"
class=
"table table-striped table-bordered table-hover table-nowrap"
<table
id=
"table"
class=
"table table-striped table-bordered table-hover table-nowrap"
data-operate-edit=
"{:$auth->check('user/edit')}"
data-operate-edit=
"{:$auth->check('user/edit')}"
...
...
public/assets/js/backend/user/agent.js
View file @
ffe652d8
...
@@ -8,7 +8,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
...
@@ -8,7 +8,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
index_url
:
'
user/agent/index
'
+
location
.
search
,
index_url
:
'
user/agent/index
'
+
location
.
search
,
add_url
:
'
user/agent/add
'
,
add_url
:
'
user/agent/add
'
,
edit_url
:
'
user/agent/edit
'
,
edit_url
:
'
user/agent/edit
'
,
del_url
:
'
user/agent/del
'
,
//
del_url: 'user/agent/del',
multi_url
:
'
user/agent/multi
'
,
multi_url
:
'
user/agent/multi
'
,
table
:
'
agent
'
,
table
:
'
agent
'
,
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment