切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
差异文件
浏览文件
作者
刘朕
5 years ago
提交
14f3d2d46737759ce369c0dcb1423aab72f305ff
2 个父辈
17b88e3c
7b3b62e6
1 个管道 的构建
通过
耗费 22 秒
合并分支 'liuzhen' 到 'master'
Liuzhen 查看合并请求
!138
变更
7
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
7 个修改的文件
包含
192 行增加
和
50 行删除
app/portal/controller/OrderSalesmanController.php
app/portal/controller/PersonalcenterController.php
app/portal/controller/SchoolController.php
data/conf/database.php
public/themes/simpleboot3/portal/school/add_school.html
public/themes/simpleboot3/portal/school/school.html
public/themes/simpleboot3/portal/school/school_edit.html
app/portal/controller/OrderSalesmanController.php
查看文件 @
14f3d2d
...
...
@@ -49,6 +49,8 @@ class OrderSalesmanController extends WeChatBaseController
$user_id
=
$this
->
user_id
;
if
(
$this
->
status
==
2
){
$where
[
'salesman_uid'
]
=
[
'eq'
,
$user_id
];
//获取当前业务员下级的所有老师
$user_ids
=
Db
::
name
(
'my_user'
)
->
where
([
'pid'
=>
$this
->
pid
])
->
column
(
'uid'
);
}
else
{
//获取当前用户的所有下级
$user_child
=
Db
::
name
(
'my_user'
)
->
where
([
'pid'
=>
$this
->
pid
])
->
select
();
...
...
@@ -80,11 +82,14 @@ class OrderSalesmanController extends WeChatBaseController
}
$this
->
assign
(
'goods_count'
,
$goods_count
);
// 身份为老师,获取上级业务员的id
$school_uid
=
$user_id
;
if
(
$this
->
my_user
[
'status'
]
==
3
)
{
$school
=
[];
if
(
$this
->
my_user
[
'status'
]
==
2
)
{
$user_ids
[]
=
$user_id
;
$school
=
Db
::
name
(
'school'
)
->
whereIn
(
'uid'
,
$user_ids
)
->
order
(
'create_time desc'
)
->
select
()
->
toArray
();
}
elseif
(
$this
->
my_user
[
'status'
]
==
3
)
{
$school_uid
=
Db
::
name
(
'my_user'
)
->
where
(
'id'
,
$this
->
my_user
[
'pid'
])
->
value
(
'uid'
);
$school
=
Db
::
name
(
'school'
)
->
whereIn
(
'uid'
,[
$user_id
,
$school_uid
])
->
order
(
'create_time desc'
)
->
select
()
->
toArray
();
}
$school
=
Db
::
name
(
'school'
)
->
where
(
'uid'
,
$school_uid
)
->
order
(
'create_time desc'
)
->
select
()
->
toArray
();
if
(
count
(
$school
)
!=
0
){
$schools
=
[];
foreach
(
$school
as
$key
=>
$val
){
...
...
@@ -387,6 +392,8 @@ class OrderSalesmanController extends WeChatBaseController
$user_id
=
$this->user_id
;
if(
$this->status
== 2){
$where['salesman_uid']
= ['eq',
$user_id
];
//获取当前业务员下级的所有老师
$user_ids
= Db::name('my_user')->where(['pid'=>
$this->pid
])->column('uid');
}else{
//获取当前用户的所有下级
$user_child
= Db::name('my_user')->where(['pid'=>
$this->pid
])->select();
...
...
@@ -418,11 +425,14 @@ class OrderSalesmanController extends WeChatBaseController
}
$this->assign
('goods_count',
$goods_count
);
// 身份为老师,获取上级业务员的id
$school_uid
=
$user_id
;
if(
$this->my_user
['status'] == 3) {
$school
= [];
if(
$this->my_user
['status'] == 2) {
$user_ids
[] =
$user_id
;
$school
= Db::name('school')->whereIn('uid',
$user_ids
)->order('create_time desc')->select()->toArray();
} elseif(
$this->my_user
['status'] == 3) {
$school_uid
= Db::name('my_user')->where('id',
$this->my_user
['pid'])->value('uid');
$school
= Db::name('school')->whereIn('uid',[
$user_id
,
$school_uid
])->order('create_time desc')->select()->toArray();
}
$school
= Db::name('school')->where('uid',
$school_uid
)->order('create_time desc')->select()->toArray();
if(count(
$school
)!=0){
$schools
= [];
foreach (
$school
as
$key
=>
$val
){
...
...
app/portal/controller/PersonalcenterController.php
查看文件 @
14f3d2d
...
...
@@ -786,8 +786,14 @@ class PersonalcenterController extends WeChatBaseController{
if
(
!
empty
(
$grade_class
)){
foreach
(
$grade_class
as
$key
=>
$val
){
$class
=
explode
(
'-'
,
$val
[
'class'
]);
for
(
$i
=
$class
[
0
];
$i
<=
$class
[
1
];
$i
++
){
$grade_class_show
[]
=
$val
[
'grade'
]
.
' - '
.
$i
.
"班"
;
if
(
$val
[
'grade'
]
==
'学龄前'
)
{
foreach
(
$class
as
$kc
=>
$vc
)
{
$grade_class_show
[]
=
$vc
;
}
}
else
{
for
(
$i
=
$class
[
0
];
$i
<=
$class
[
1
];
$i
++
){
$grade_class_show
[]
=
$val
[
'grade'
]
.
' - '
.
$i
.
"班"
;
}
}
}
foreach
(
$grade_class_show
as
$key
=>
$val
){
...
...
app/portal/controller/SchoolController.php
查看文件 @
14f3d2d
...
...
@@ -63,22 +63,28 @@ class SchoolController extends WeChatBaseController{
foreach
(
$val
[
'grade'
]
as
$key1
=>
$val1
){
//循环传过来的年级
foreach
(
$class_data
as
$key2
=>
$val2
){
$val2
=
explode
(
'-'
,
$val2
);
if
(
$val2
[
0
]
==
$val1
[
'grade'
]){
//将班级拆分循环装进数组
$class_s
=
explode
(
'-'
,
$val1
[
'class'
]);
for
(
$i
=
$class_s
[
0
];
$i
<=
$class_s
[
1
];
$i
++
){
$class_db
[]
=
$i
;
}
//将传过来的班级循环
for
(
$j
=
$val2
[
1
];
$j
<=
$val2
[
2
];
$j
++
){
$class_my
[]
=
$j
;
}
$result
=
array_intersect
(
$class_db
,
$class_my
);
$result
=
count
(
$result
);
if
(
$result
>
0
){
if
(
$_POST
[
'type'
]
==
'学龄前'
){
if
(
in_array
(
$val2
,
explode
(
'-'
,
$val1
[
'class'
])))
{
return
5
;
}
}
else
{
$val2
=
explode
(
'-'
,
$val2
);
if
(
$val2
[
0
]
==
$val1
[
'grade'
]){
//将班级拆分循环装进数组
$class_s
=
explode
(
'-'
,
$val1
[
'class'
]);
for
(
$i
=
$class_s
[
0
];
$i
<=
$class_s
[
1
];
$i
++
){
$class_db
[]
=
$i
;
}
//将传过来的班级循环
for
(
$j
=
$val2
[
1
];
$j
<=
$val2
[
2
];
$j
++
){
$class_my
[]
=
$j
;
}
$result
=
array_intersect
(
$class_db
,
$class_my
);
$result
=
count
(
$result
);
if
(
$result
>
0
){
return
5
;
}
}
}
}
}
...
...
@@ -94,12 +100,21 @@ class SchoolController extends WeChatBaseController{
return
5
;
}
$school_id
=
Db
::
name
(
'school'
)
->
insertGetId
(
$school
);
foreach
(
$class_data
as
$key
=>
$val
){
$grade_class
=
explode
(
'-'
,
$val
);
// 判断是否是学龄前
if
(
$_POST
[
'type'
]
==
'学龄前'
)
{
$grade_class
=
implode
(
'-'
,
$class_data
);
$grade
[
'school_id'
]
=
$school_id
;
$grade
[
'grade'
]
=
$grade_class
[
0
];
$grade
[
'class'
]
=
$grade_class
[
1
]
.
'-'
.
$grade_class
[
2
];
$grade
[
'grade'
]
=
$_POST
[
'type'
];
$grade
[
'class'
]
=
$grade_class
;
Db
::
name
(
'grade_class'
)
->
insert
(
$grade
);
}
else
{
foreach
(
$class_data
as
$key
=>
$val
)
{
$grade_class
=
explode
(
'-'
,
$val
);
$grade
[
'school_id'
]
=
$school_id
;
$grade
[
'grade'
]
=
$grade_class
[
0
];
$grade
[
'class'
]
=
$grade_class
[
1
]
.
'-'
.
$grade_class
[
2
];
Db
::
name
(
'grade_class'
)
->
insert
(
$grade
);
}
}
if
(
$school_id
){
return
true
;
...
...
@@ -132,12 +147,21 @@ class SchoolController extends WeChatBaseController{
$class_data
[]
=
$val
;
}
}
foreach
(
$class_data
as
$key
=>
$val
){
$grade_class
=
explode
(
'-'
,
$val
);
// 判断是否是学龄前
if
(
$_POST
[
'type'
]
==
'学龄前'
)
{
$grade_class
=
implode
(
'-'
,
$class_data
);
$grade
[
'school_id'
]
=
$_POST
[
'id'
];
$grade
[
'grade'
]
=
$grade_class
[
0
];
$grade
[
'class'
]
=
$grade_class
[
1
]
.
'-'
.
$grade_class
[
2
];
$grade
[
'grade'
]
=
$_POST
[
'type'
];
$grade
[
'class'
]
=
$grade_class
;
Db
::
name
(
'grade_class'
)
->
insert
(
$grade
);
}
else
{
foreach
(
$class_data
as
$key
=>
$val
){
$grade_class
=
explode
(
'-'
,
$val
);
$grade
[
'school_id'
]
=
$_POST
[
'id'
];
$grade
[
'grade'
]
=
$grade_class
[
0
];
$grade
[
'class'
]
=
$grade_class
[
1
]
.
'-'
.
$grade_class
[
2
];
Db
::
name
(
'grade_class'
)
->
insert
(
$grade
);
}
}
return
true
;
}
else
{
...
...
data/conf/database.php
查看文件 @
14f3d2d
...
...
@@ -7,7 +7,7 @@ return [
// 数据库类型
'type'
=>
'mysql'
,
// 服务器地址
'hostname'
=>
'rm-m5eblhc9o3515i25n.mysql.rds.aliyuncs.com'
,
'hostname'
=>
'rm-m5eblhc9o3515i25n
eo
.mysql.rds.aliyuncs.com'
,
// 数据库名
'database'
=>
'xkeasy'
,
// 用户名
...
...
public/themes/simpleboot3/portal/school/add_school.html
查看文件 @
14f3d2d
...
...
@@ -94,6 +94,12 @@
<div
class=
"log_four_contant_left"
>
<img
src=
"__TMPL__/public/assets/images/73.png"
alt=
""
/>
</div>
<div
class=
"log_four_contant_right"
>
学龄前
</div>
</div>
<div
class=
"log_four_contant_one"
>
<div
class=
"log_four_contant_left"
>
<img
src=
"__TMPL__/public/assets/images/39_0.png"
alt=
""
/>
</div>
<div
class=
"log_four_contant_right"
>
小学
</div>
</div>
<div
class=
"log_four_contant_one"
>
...
...
@@ -115,6 +121,42 @@
<div
class=
"log_four_contants"
>
<div
class=
" log_four_contant_ones"
>
<div
class=
"log_botms"
>
<div
class=
"log_four_contants_left xuelingqian"
data-name=
"小班"
data-class=
"1"
>
<img
class=
"log_Img9"
src=
"__TMPL__/public/assets/images/39_0.png"
alt=
""
/>
</div>
<div
class=
"log_four_contants_right"
>
小班
</div>
</div>
</div>
<div
class=
" log_four_contant_ones"
>
<div
class=
"log_botms"
>
<div
class=
"log_four_contants_left xuelingqian"
data-name=
"中班"
data-class=
"2"
>
<img
class=
"log_Img9"
src=
"__TMPL__/public/assets/images/39_0.png"
alt=
""
/>
</div>
<div
class=
"log_four_contants_right"
>
中班
</div>
</div>
</div>
<div
class=
" log_four_contant_ones"
>
<div
class=
"log_botms"
>
<div
class=
"log_four_contants_left xuelingqian"
data-name=
"大班"
data-class=
"3"
>
<img
class=
"log_Img9"
src=
"__TMPL__/public/assets/images/39_0.png"
alt=
""
/>
</div>
<div
class=
"log_four_contants_right"
>
大班
</div>
</div>
</div>
<div
class=
" log_four_contant_ones"
>
<div
class=
"log_botms"
>
<div
class=
"log_four_contants_left xuelingqian"
data-name=
"学前班"
data-class=
"4"
>
<img
class=
"log_Img9"
src=
"__TMPL__/public/assets/images/39_0.png"
alt=
""
/>
</div>
<div
class=
"log_four_contants_right"
>
学前班
</div>
</div>
</div>
</div>
</div>
<div
class=
"log_four_radios"
style=
"display: none"
>
<div
class=
"log_four_contants"
>
<div
class=
" log_four_contant_ones"
>
<div
class=
"log_botms"
>
<div
class=
"log_four_contants_left"
>
<img
class=
"log_Img9"
src=
"__TMPL__/public/assets/images/73.png"
alt=
""
/>
</div>
...
...
@@ -679,9 +721,9 @@
$
(
'.log_four_radios'
).
on
(
'click'
,
'.log_botms'
,
function
()
{
var
root
=
$
(
this
).
parents
(
'.log_four_radios'
).
index
();
var
index
=
$
(
this
).
parent
().
index
();
console
.
log
(
index
)
//
console.log(index)
index
=
root
==
0
?
index
:
root
==
1
?
index
+
6
:
index
+
9
console
.
log
(
index
)
//
console.log(index)
if
(
$
(
this
).
find
(
'.log_Img9'
).
attr
(
"src"
)
==
'__TMPL__/public/assets/images/39_0.png'
)
{
$
(
this
).
find
(
'.log_Img9'
).
attr
(
"src"
,
"__TMPL__/public/assets/images/73.png"
);
$
(
this
).
next
(
'.log_four_contants_input_block'
).
slideDown
();
...
...
@@ -690,18 +732,28 @@
var
tempData
=
''
;
var
classes
=
index
==
0
?
'一年级'
:
index
==
1
?
'二年级'
:
index
==
2
?
'三年级'
:
index
==
3
?
'四年级'
:
index
==
4
?
'五年级'
:
index
==
5
?
'六年级'
:
index
==
6
?
'初一'
:
index
==
7
?
'初二'
:
index
==
8
?
'初三'
:
index
==
9
?
'高一'
:
index
==
10
?
'高二'
:
index
==
11
?
'高三'
:
''
;
if
(
$
(
this
).
parents
(
".log_four_contant_ones"
).
find
(
".log_four_contants_left"
).
find
(
"img"
).
attr
(
"src"
)
==
"__TMPL__/public/assets/images/73.png"
)
{
if
(
inputs
[
0
].
value
&&
inputs
[
1
].
value
)
{
tempData
=
classes
+
'-'
+
inputs
[
0
].
value
+
'-'
+
inputs
[
1
].
value
if
(
inputs
.
length
==
0
)
{
var
name
=
$
(
this
).
find
(
'.xuelingqian'
).
data
(
'name'
);
var
ind
=
$
(
this
).
find
(
'.xuelingqian'
).
data
(
'class'
);
arr
[
ind
-
1
]
=
name
;
}
else
{
if
(
inputs
[
0
].
value
&&
inputs
[
1
].
value
)
{
tempData
=
classes
+
'-'
+
inputs
[
0
].
value
+
'-'
+
inputs
[
1
].
value
}
arr
[
index
]
=
tempData
;
}
arr
[
index
]
=
tempData
;
}
else
{
arr
[
index
]
=
''
}
}
else
{
$
(
this
).
find
(
'.log_Img9'
).
attr
(
"src"
,
'__TMPL__/public/assets/images/39_0.png'
);
$
(
this
).
next
(
'.log_four_contants_input_block'
).
slideUp
();
arr
[
index
]
=
''
var
ind
=
$
(
this
).
find
(
'.xuelingqian'
).
data
(
'class'
);
if
(
ind
)
{
arr
[
ind
-
1
]
=
''
;
}
else
{
arr
[
index
]
=
''
}
}
console
.
log
(
arr
)
});
...
...
public/themes/simpleboot3/portal/school/school.html
查看文件 @
14f3d2d
...
...
@@ -86,7 +86,7 @@
<div
class=
"log_seven_left_one"
>
{$val.school}
</div>
<div
class=
"log_seven_left_two"
>
<volist
name=
"val.class"
id=
"vo"
>
<span>
{$vo.grade}{$vo.class}
班
</span>
<span>
{$vo.grade}{$vo.class}
<neq
name=
"val.type"
value=
"学龄前"
>
班
</neq>
</span>
</volist>
</div>
<div
class=
"log_secen_left_three"
>
{$val.region}
</div>
...
...
public/themes/simpleboot3/portal/school/school_edit.html
查看文件 @
14f3d2d
...
...
@@ -93,6 +93,16 @@
<div
class=
"log_four_contant"
>
<div
class=
"log_four_contant_one"
>
<div
class=
"log_four_contant_left"
>
<if
condition=
"$data.type eq '学龄前'"
>
<img
src=
"__TMPL__/public/assets/images/73.png"
alt=
""
/>
<else/>
<img
src=
"__TMPL__/public/assets/images/39_0.png"
alt=
""
/>
</if>
</div>
<div
class=
"log_four_contant_right"
>
学龄前
</div>
</div>
<div
class=
"log_four_contant_one"
>
<div
class=
"log_four_contant_left"
>
<if
condition=
"$data.type eq '小学'"
>
<img
src=
"__TMPL__/public/assets/images/73.png"
alt=
""
/>
<else/>
...
...
@@ -129,6 +139,42 @@
<div
class=
"log_four_contants"
>
<div
class=
" log_four_contant_ones"
>
<div
class=
"log_botms"
>
<div
class=
"log_four_contants_left xuelingqian"
data-name=
"小班"
data-class=
"1"
>
<img
class=
"log_Img9"
src=
"__TMPL__/public/assets/images/39_0.png"
alt=
""
/>
</div>
<div
class=
"log_four_contants_right"
>
小班
</div>
</div>
</div>
<div
class=
" log_four_contant_ones"
>
<div
class=
"log_botms"
>
<div
class=
"log_four_contants_left xuelingqian"
data-name=
"中班"
data-class=
"2"
>
<img
class=
"log_Img9"
src=
"__TMPL__/public/assets/images/39_0.png"
alt=
""
/>
</div>
<div
class=
"log_four_contants_right"
>
中班
</div>
</div>
</div>
<div
class=
" log_four_contant_ones"
>
<div
class=
"log_botms"
>
<div
class=
"log_four_contants_left xuelingqian"
data-name=
"大班"
data-class=
"3"
>
<img
class=
"log_Img9"
src=
"__TMPL__/public/assets/images/39_0.png"
alt=
""
/>
</div>
<div
class=
"log_four_contants_right"
>
大班
</div>
</div>
</div>
<div
class=
" log_four_contant_ones"
>
<div
class=
"log_botms"
>
<div
class=
"log_four_contants_left xuelingqian"
data-name=
"学前班"
data-class=
"4"
>
<img
class=
"log_Img9"
src=
"__TMPL__/public/assets/images/39_0.png"
alt=
""
/>
</div>
<div
class=
"log_four_contants_right"
>
学前班
</div>
</div>
</div>
</div>
</div>
<div
class=
"log_four_radios"
style=
"display: none"
>
<div
class=
"log_four_contants"
>
<div
class=
" log_four_contant_ones"
>
<div
class=
"log_botms"
>
<div
class=
"log_four_contants_left"
>
<img
class=
"log_Img9"
src=
"__TMPL__/public/assets/images/73.png"
alt=
""
/>
</div>
...
...
@@ -632,12 +678,9 @@
$
(
".log_four_contant_one"
).
each
(
function
()
{
$
(
this
).
click
(
function
()
{
var
index
=
$
(
this
).
index
();
console
.
log
(
index
);
var
text1
=
$
(
this
).
find
(
".log_four_contant_right"
).
text
();
console
.
log
(
text1
)
$
(
"#four_inp"
).
attr
(
"placeholder"
,
text1
).
attr
(
"value"
,
text1
);
xcg
=
$
(
this
).
find
(
'.log_four_contant_right'
).
text
();
console
.
log
(
xcg
)
$
(
".log_four_contant_one img"
).
eq
(
index
).
attr
(
"src"
,
"__TMPL__/public/assets/images/73.png"
).
parents
(
".log_four_contant_one"
).
siblings
().
find
(
"img"
).
attr
(
"src"
,
"__TMPL__/public/assets/images/39_0.png"
);
if
(
$
(
".log_four_contant_one img"
).
eq
(
index
).
attr
(
"src"
)
==
"__TMPL__/public/assets/images/73.png"
)
{
$
(
".log_four_radios"
).
eq
(
index
).
css
({
...
...
@@ -679,7 +722,6 @@
tempData
=
classes
+
'-'
+
inputs
[
0
].
value
+
'-'
+
inputs
[
1
].
value
}
arr
[
index
]
=
tempData
;
console
.
log
(
arr
)
}
else
{
tempData
=
""
}
...
...
@@ -690,9 +732,7 @@
$
(
'.log_four_radios'
).
on
(
'click'
,
'.log_botms'
,
function
()
{
var
root
=
$
(
this
).
parents
(
'.log_four_radios'
).
index
();
var
index
=
$
(
this
).
parent
().
index
();
console
.
log
(
index
)
index
=
root
==
0
?
index
:
root
==
1
?
index
+
6
:
index
+
9
console
.
log
(
index
)
if
(
$
(
this
).
find
(
'.log_Img9'
).
attr
(
"src"
)
==
'__TMPL__/public/assets/images/39_0.png'
)
{
$
(
this
).
find
(
'.log_Img9'
).
attr
(
"src"
,
"__TMPL__/public/assets/images/73.png"
);
$
(
this
).
next
(
'.log_four_contants_input_block'
).
slideDown
();
...
...
@@ -701,18 +741,28 @@
var
tempData
=
''
;
var
classes
=
index
==
0
?
'一年级'
:
index
==
1
?
'二年级'
:
index
==
2
?
'三年级'
:
index
==
3
?
'四年级'
:
index
==
4
?
'五年级'
:
index
==
5
?
'六年级'
:
index
==
6
?
'初一'
:
index
==
7
?
'初二'
:
index
==
8
?
'初三'
:
index
==
9
?
'高一'
:
index
==
10
?
'高二'
:
index
==
11
?
'高三'
:
''
;
if
(
$
(
this
).
parents
(
".log_four_contant_ones"
).
find
(
".log_four_contants_left"
).
find
(
"img"
).
attr
(
"src"
)
==
"__TMPL__/public/assets/images/73.png"
)
{
if
(
inputs
[
0
].
value
&&
inputs
[
1
].
value
)
{
tempData
=
classes
+
'-'
+
inputs
[
0
].
value
+
'-'
+
inputs
[
1
].
value
if
(
inputs
.
length
==
0
)
{
var
name
=
$
(
this
).
find
(
'.xuelingqian'
).
data
(
'name'
);
var
ind
=
$
(
this
).
find
(
'.xuelingqian'
).
data
(
'class'
);
arr
[
ind
-
1
]
=
name
;
}
else
{
if
(
inputs
[
0
].
value
&&
inputs
[
1
].
value
)
{
tempData
=
classes
+
'-'
+
inputs
[
0
].
value
+
'-'
+
inputs
[
1
].
value
}
arr
[
index
]
=
tempData
;
}
arr
[
index
]
=
tempData
;
}
else
{
arr
[
index
]
=
''
}
}
else
{
$
(
this
).
find
(
'.log_Img9'
).
attr
(
"src"
,
'__TMPL__/public/assets/images/39_0.png'
);
$
(
this
).
next
(
'.log_four_contants_input_block'
).
slideUp
();
arr
[
index
]
=
''
var
ind
=
$
(
this
).
find
(
'.xuelingqian'
).
data
(
'class'
);
if
(
ind
)
{
arr
[
ind
-
1
]
=
''
;
}
else
{
arr
[
index
]
=
''
}
}
console
.
log
(
arr
)
});
...
...
请
注册
或
登录
后发表评论