Toggle navigation
This project
Loading...
Sign in
najixian
/
xt_dc_admin
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Download as
Email Patches
Plain Diff
Browse Files
Commit
acd4b83d0c587a161995beb8b57e00f2df416c70
Authored by
teemitop
2019-12-30 12:16:33 +0800
1 parent
9c413034
build: skipped
代理商列表调整
Changes
2
Builds
0
Inline
Side-by-side
Showing
2 changed files
with
99 additions
and
0 deletions
application/admin/controller/Area.php
application/admin/view/area/operatorlist.html
application/admin/controller/Area.php
View file @
acd4b83
...
...
@@ -1007,4 +1007,49 @@ class Area extends Common
}
return
view
();
}
/**
* 代理商及代理商下运营人远列表
*/
public
function
Operatorlist
(){
$data
=
Request
::
except
(
'file'
);
if
(
Request
::
isAjax
()){
$operator_list
=
Db
::
query
(
"SELECT
a.areaid,
a.areaname,
t.`level`,
t.sub_openid,
t.cdate,
w.nickname
FROM
`xt-member-two-LINE`.xt_dc_dz_agent AS a
LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_agent_account AS t ON a.areaid = t.areaid
LEFT JOIN `xt-member-two-LINE`.xt_wechat AS w ON t.sub_openid = w.openid
WHERE
a.is_exist = 1
AND w.source = 0
ORDER BY
a.areaid,t.`level`"
);
foreach
(
$operator_list
as
$key
=>
$value
)
{
switch
(
$value
[
'level'
])
{
case
'1'
:
$operator_list
[
$key
][
'level'
]
=
'代理商'
;
break
;
case
'2'
:
$operator_list
[
$key
][
'level'
]
=
'运营'
;
break
;
default
:
# code...
break
;
}
$operator_list
[
$key
][
'cdate'
]
=
date
(
"Y年m月d日 H时i分"
,
$value
[
'cdate'
]);
}
return
[
'code'
=>
0
,
'msg'
=>
'获取成功!'
,
'data'
=>
$operator_list
,
'rel'
=>
1
];
}
return
$this
->
fetch
();
}
}
...
...
application/admin/view/area/operatorlist.html
0 → 100644
View file @
acd4b83
{include file="common/head"/}
<div
class=
"admin-main layui-anim layui-anim-upbit"
>
<fieldset
class=
"layui-elem-field layui-field-title"
>
<legend>
代理商/运营列表信息
</legend>
</fieldset>
<table
class=
"layui-table"
id=
"list"
lay-filter=
"list"
></table>
</div>
{include file="common/foot"/}
<!--<script type="text/html" id="barDemo">
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">{:lang('del')}</a>
</script>-->
<script>
layui
.
use
([
'table'
,
'form'
],
function
()
{
var
table
=
layui
.
table
,
form
=
layui
.
form
,
$
=
layui
.
jquery
;
var
tableIn
=
table
.
render
({
elem
:
'#list'
,
url
:
'{:url("Operatorlist")}'
,
method
:
'post'
,
cols
:
[[
{
field
:
'areaid'
,
title
:
'区域ID'
,
fixed
:
true
}
,{
field
:
'areaname'
,
title
:
'区域名称'
}
,{
field
:
'nickname'
,
title
:
'用户微信昵称'
}
,{
field
:
'level'
,
title
:
'用户身份'
}
,{
field
:
'sub_openid'
,
title
:
'公众号OPENID'
}
,{
field
:
'cdate'
,
title
:
'加入时间'
}
,{
width
:
160
,
title
:
'操作'
,
align
:
'center'
,
toolbar
:
'#barDemo'
}
]]
});
//删除运营人员
/*table.on('tool(list)', function(obj){
var data = obj.data;
if(obj.event === 'del'){
layer.confirm('{:lang("Are you sure you want to delete it")}', function(index){
$.post("{:url('operateDel')}",{id:data.id},function(res){
if(res.code==1){
layer.msg(res.msg,{time:1000,icon:1});
obj.del();
}else{
layer.msg(res.msg,{time:1000,icon:2});
}
});
layer.close(index);
});
}
});*/
});
</script>
</body>
</html>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment