Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
confucius
Commits
63473145
Commit
63473145
authored
Dec 16, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
76b6a4ad
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
97 deletions
+81
-97
classFee.vue
src/components/course/classFee.vue
+19
-38
socialclass.vue
src/pages/course/socialclass.vue
+62
-59
No files found.
src/components/course/classFee.vue
View file @
63473145
...
...
@@ -68,7 +68,7 @@
<tr>
<td
colspan=
"2"
></td>
<td
v-for=
"(item,index) in FullClassRateList"
@
click=
"getColEdit(item,index)"
>
<div
class=
"Classdel_Div"
>
{{
item
.
StartValue
}}
%-
{{
item
.
EndValue
}}
%
<i
@
click=
"deleCole(index)"
<div
class=
"Classdel_Div"
>
{{
item
.
StartValue
}}
%-
{{
item
.
EndValue
}}
%
<i
@
click
.
stop
=
"deleCole(index)"
class=
"iconfont icon-shanchu"
></i></div>
<q-popup-proxy>
<q-banner
v-if=
"isShowColEdit"
>
...
...
@@ -112,12 +112,12 @@
</tr>
<template
v-for=
"(item,index) in dataList.List"
>
<tr>
<td
@
click=
"getDataItem(item,index)"
rowspan=
"2"
>
<td
@
click=
"getDataItem(item,index)"
rowspan=
"2"
style=
"width:150px;"
>
<div
class=
"div_RowList"
>
{{
item
.
StartValue
}}
<span
v-if=
"item.StartValue>=0"
>
%
</span><span
v-if=
"item.StartValue>=0&&item.EndValue>=0"
>
-
</span>
{{
item
.
EndValue
}}
<span
v-if=
"item.EndValue>=0"
>
%
</span>
<i
@
click=
"deletRow(index)"
class=
"iconfont icon-shanchu"
></i>
<i
@
click
.
stop
=
"deletRow(index)"
class=
"iconfont icon-shanchu"
></i>
</div>
<q-popup-proxy>
<q-banner
v-if=
"isShowrowEdit"
>
...
...
@@ -137,7 +137,7 @@
</q-banner>
</q-popup-proxy>
</td>
<td>
奖励课时费
</td>
<td
style=
"width:150px;"
>
奖励课时费
</td>
<td
v-for=
"(subItem,subIndex) in item.FullClassList"
>
{{
subItem
.
ClassMoney
}}
<q-popup-edit
v-model
.
number=
"subItem.ClassMoney"
buttons
>
...
...
@@ -261,7 +261,6 @@
Type
:
2
}
GetTeachingRewardsList
(
msg
).
then
(
res
=>
{
console
.
log
(
res
,
'初始数据'
);
if
(
res
.
Code
==
1
)
{
this
.
dataList
=
res
.
Data
;
if
(
this
.
dataList
.
FullClassRateList
.
length
>
0
)
{
...
...
@@ -312,29 +311,23 @@
return
;
}
for
(
var
i
=
0
;
i
<
this
.
dataList
.
List
.
length
;
i
++
)
{
if
(
this
.
dataList
.
List
[
i
].
StartValue
==
this
.
addObj
.
StartValue
)
{
if
(((
parseInt
(
this
.
addObj
.
StartValue
)
>=
this
.
dataList
.
List
[
i
].
StartValue
)
&&
(
parseInt
(
this
.
addObj
.
StartValue
)
<=
this
.
dataList
.
List
[
i
].
EndValue
))
||
((
parseInt
(
this
.
addObj
.
EndValue
)
>=
this
.
dataList
.
List
[
i
].
StartValue
)
&&
(
parseInt
(
this
.
addObj
.
EndValue
)
<=
this
.
dataList
.
List
[
i
].
EndValue
))){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`最小上课值已经存在`
})
return
;
}
if
(
this
.
dataList
.
List
[
i
].
EndValue
==
this
.
addObj
.
EndValue
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`最大上课值已经存在`
message
:
`已存在交集`
})
return
;
}
}
this
.
addObj
.
FullClassList
=
[];
this
.
FullClassRateList
.
forEach
(
x
=>
{
x
.
ClassMoney
=
''
x
.
PeopelNum
=
''
this
.
addObj
.
FullClassList
.
push
(
x
);
})
this
.
dataList
.
List
.
push
(
this
.
addObj
);
this
.
dataList
.
List
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
addObj
)));
this
.
dataList
.
List
.
sort
(
this
.
compare
(
"StartValue"
,
true
));
this
.
isShowAddMenu
=
false
;
},
...
...
@@ -353,7 +346,6 @@
},
//添加列
addColList
()
{
console
.
log
(
'来了老弟'
);
if
(
this
.
addBanObj
.
StartValue
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
...
...
@@ -381,32 +373,22 @@
})
return
;
}
let
isExist
=
false
;
this
.
dataList
.
List
.
forEach
(
x
=>
{
x
.
FullClassList
.
forEach
(
y
=>
{
console
.
log
(
this
.
addBanObj
.
StartValue
,
'---'
,
y
.
StartValue
);
console
.
log
(
this
.
addBanObj
.
EndValue
,
'---'
,
y
.
EndValue
);
console
.
log
(
parseInt
(
this
.
addBanObj
.
StartValue
)
>
y
.
StartValue
);
console
.
log
(
parseInt
(
this
.
addBanObj
.
EndValue
)
<
y
.
EndValue
);
if
((
parseInt
(
this
.
addBanObj
.
StartValue
)
>
y
.
StartValue
)
&&
(
parseInt
(
this
.
addBanObj
.
EndValue
)
<
y
.
EndValue
))
{
for
(
var
i
=
0
;
i
<
this
.
FullClassRateList
.
length
;
i
++
){
if
(((
parseInt
(
this
.
addBanObj
.
StartValue
)
>=
this
.
FullClassRateList
[
i
].
StartValue
)
&&
(
parseInt
(
this
.
addBanObj
.
StartValue
)
<=
this
.
FullClassRateList
[
i
].
EndValue
))
||
((
parseInt
(
this
.
addBanObj
.
EndValue
)
>=
this
.
FullClassRateList
[
i
].
StartValue
)
&&
(
parseInt
(
this
.
addBanObj
.
EndValue
)
<=
this
.
FullClassRateList
[
i
].
EndValue
))){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`已经存在交集`
})
isExist
=
true
}
else
{
isExist
=
false
;
return
;
}
})
if
(
!
isExist
)
{
x
.
FullClassList
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
addBanObj
)));
}
})
if
(
!
isExist
)
{
this
.
FullClassRateList
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
addBanObj
)));
}
this
.
dataList
.
List
.
forEach
(
x
=>
{
x
.
FullClassList
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
addBanObj
)));
})
this
.
isShowBanMenu
=
false
;
},
//删除列
...
...
@@ -463,7 +445,6 @@
}
GetTeachingRewardsBaseInfo
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
console
.
log
(
res
,
'数据'
);
this
.
setTeachMsg
.
Id
=
res
.
Data
.
Id
;
this
.
setTeachMsg
.
BasicMoney
=
res
.
Data
.
BasicMoney
;
this
.
setTeachMsg
.
BasicHour
=
res
.
Data
.
BasicHour
;
...
...
src/pages/course/socialclass.vue
View file @
63473145
...
...
@@ -51,9 +51,9 @@
<div
style=
"margin-top:20px;"
>
<div
class=
"col"
style=
"display:flex;"
>
<div>
<q-select
class=
"q-pb-lg q-pr-lg"
style=
"width:300px;"
multiple
clearable
filled
stack-label
use-input
use-chips
option-value=
"CTypeId"
option-label=
"CTypeName"
v-model=
"tempSchool"
ref=
"PostId"
:options=
"DropDownList
"
label=
"班级类型"
:dense=
"false"
emit-value
map-options
>
<q-select
class=
"q-pb-lg q-pr-lg"
style=
"width:300px;"
multiple
clearable
filled
stack-label
use-input
use-chips
option-value=
"CTypeId"
option-label=
"CTypeName"
v-model=
"tempSchool"
ref=
"PostId
"
:options=
"DropDownList"
label=
"班级类型"
:dense=
"false"
emit-value
map-options
>
</q-select>
</div>
<div
style=
"margin-top:15px;"
>
...
...
@@ -74,7 +74,7 @@
<tr>
<td></td>
<td
v-for=
"(item,index) in FullClassRateList"
@
click=
"getColEdit(item,index)"
>
<div
class=
"Classdel_Div"
>
{{
item
.
StartValue
}}
%-
{{
item
.
EndValue
}}
%
<i
@
click=
"deleCole(index)"
<div
class=
"Classdel_Div"
>
{{
item
.
StartValue
}}
%-
{{
item
.
EndValue
}}
%
<i
@
click
.
stop
=
"deleCole(index)"
class=
"iconfont icon-shanchu"
></i></div>
<q-popup-proxy>
<q-banner
v-if=
"isShowColEdit"
>
...
...
@@ -124,7 +124,7 @@
{{
item
.
StartValue
}}
<span
v-if=
"item.StartValue>=0"
>
%
</span><span
v-if=
"item.StartValue>=0&&item.EndValue>=0"
>
-
</span>
{{
item
.
EndValue
}}
<span
v-if=
"item.EndValue>=0"
>
%
</span>
<i
@
click=
"deletRow(index)"
class=
"iconfont icon-shanchu"
></i>
<i
@
click
.
stop
=
"deletRow(index)"
class=
"iconfont icon-shanchu"
></i>
</div>
<q-popup-proxy>
<q-banner
v-if=
"isShowrowEdit"
>
...
...
@@ -243,15 +243,15 @@
isShowrowEdit
:
false
,
isShowColEdit
:
false
,
DropDownList
:[],
//社会班下拉数据
tempSchool
:[],
//选中的班级
DropDownList
:
[],
//社会班下拉数据
tempSchool
:
[],
//选中的班级
setTeachMsg
:{
Id
:
0
,
Type
:
1
,
BasicMoney
:
''
,
BasicHour
:
''
,
ClassTypeIds
:
''
setTeachMsg
:
{
Id
:
0
,
Type
:
1
,
BasicMoney
:
''
,
BasicHour
:
''
,
ClassTypeIds
:
''
}
}
},
...
...
@@ -317,31 +317,42 @@
})
return
;
}
for
(
var
i
=
0
;
i
<
this
.
dataList
.
List
.
length
;
i
++
)
{
if
(
this
.
dataList
.
List
[
i
].
StartValue
==
this
.
addObj
.
StartValue
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`最小上课值已经存在`
})
return
;
}
if
(
this
.
dataList
.
List
[
i
].
EndValue
==
this
.
addObj
.
EndValue
)
{
if
(((
parseInt
(
this
.
addObj
.
StartValue
)
>=
this
.
dataList
.
List
[
i
].
StartValue
)
&&
(
parseInt
(
this
.
addObj
.
StartValue
)
<=
this
.
dataList
.
List
[
i
].
EndValue
))
||
((
parseInt
(
this
.
addObj
.
EndValue
)
>=
this
.
dataList
.
List
[
i
].
StartValue
)
&&
(
parseInt
(
this
.
addObj
.
EndValue
)
<=
this
.
dataList
.
List
[
i
].
EndValue
)))
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`
最大上课值已经存在
`
message
:
`
已存在交集
`
})
return
;
}
}
this
.
addObj
.
FullClassList
=
[];
this
.
FullClassRateList
.
forEach
(
x
=>
{
x
.
ClassMoney
=
''
this
.
addObj
.
FullClassList
.
push
(
x
);
})
this
.
dataList
.
List
.
push
(
this
.
addObj
);
this
.
dataList
.
List
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
addObj
)));
this
.
dataList
.
List
.
sort
(
this
.
compare
(
"StartValue"
,
true
));
this
.
isShowAddMenu
=
false
;
},
compare
(
property
,
desc
)
{
return
function
(
a
,
b
)
{
var
value1
=
a
[
property
];
var
value2
=
b
[
property
];
if
(
desc
==
true
)
{
// 升序排列
return
value1
-
value2
;
}
else
{
// 降序排列
return
value2
-
value1
;
}
}
},
//添加列
addColList
()
{
console
.
log
(
'来了老弟'
);
...
...
@@ -372,32 +383,24 @@
})
return
;
}
let
isExist
=
false
;
this
.
dataList
.
List
.
forEach
(
x
=>
{
x
.
FullClassList
.
forEach
(
y
=>
{
console
.
log
(
this
.
addBanObj
.
StartValue
,
'---'
,
y
.
StartValue
);
console
.
log
(
this
.
addBanObj
.
EndValue
,
'---'
,
y
.
EndValue
);
console
.
log
(
parseInt
(
this
.
addBanObj
.
StartValue
)
>
y
.
StartValue
);
console
.
log
(
parseInt
(
this
.
addBanObj
.
EndValue
)
<
y
.
EndValue
);
if
((
parseInt
(
this
.
addBanObj
.
StartValue
)
>
y
.
StartValue
)
&&
(
parseInt
(
this
.
addBanObj
.
EndValue
)
<
y
.
EndValue
))
{
for
(
var
i
=
0
;
i
<
this
.
FullClassRateList
.
length
;
i
++
)
{
if
(((
parseInt
(
this
.
addBanObj
.
StartValue
)
>=
this
.
FullClassRateList
[
i
].
StartValue
)
&&
(
parseInt
(
this
.
addBanObj
.
StartValue
)
<=
this
.
FullClassRateList
[
i
].
EndValue
))
||
((
parseInt
(
this
.
addBanObj
.
EndValue
)
>=
this
.
FullClassRateList
[
i
].
StartValue
)
&&
(
parseInt
(
this
.
addBanObj
.
EndValue
)
<=
this
.
FullClassRateList
[
i
].
EndValue
)))
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`已经存在交集`
})
isExist
=
true
}
else
{
isExist
=
false
;
return
;
}
})
if
(
!
isExist
)
{
x
.
FullClassList
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
addBanObj
)));
}
})
if
(
!
isExist
)
{
this
.
FullClassRateList
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
addBanObj
)));
}
this
.
dataList
.
List
.
forEach
(
x
=>
{
x
.
FullClassList
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
addBanObj
)));
})
this
.
isShowBanMenu
=
false
;
},
//删除列
...
...
@@ -427,20 +430,20 @@
this
.
isShowrowEdit
=
false
;
},
//修改满班率
getColEdit
(
item
,
index
)
{
this
.
isShowColEdit
=
true
;
getColEdit
(
item
,
index
)
{
this
.
isShowColEdit
=
true
;
this
.
CommonIndex
=
index
;
this
.
editObj
.
StartValue
=
item
.
StartValue
;
this
.
editObj
.
EndValue
=
item
.
EndValue
;
},
//保存修改满班率
editManBan
(){
editManBan
()
{
this
.
FullClassRateList
[
this
.
CommonIndex
].
StartValue
=
this
.
editObj
.
StartValue
;
this
.
FullClassRateList
[
this
.
CommonIndex
].
EndValue
=
this
.
editObj
.
EndValue
;
this
.
isShowColEdit
=
false
;
this
.
dataList
.
List
.
forEach
(
x
=>
{
x
.
FullClassList
.
forEach
((
y
,
index
)
=>
{
if
(
index
==
this
.
CommonIndex
)
{
this
.
isShowColEdit
=
false
;
this
.
dataList
.
List
.
forEach
(
x
=>
{
x
.
FullClassList
.
forEach
((
y
,
index
)
=>
{
if
(
index
==
this
.
CommonIndex
)
{
y
.
StartValue
=
parseInt
(
this
.
editObj
.
StartValue
);
y
.
EndValue
=
parseInt
(
this
.
editObj
.
EndValue
)
}
...
...
@@ -448,13 +451,13 @@
})
},
//获取设置数据
getBaseDropInfo
(){
getBaseDropInfo
()
{
let
msg
=
{
Type
:
1
Type
:
1
}
GetTeachingRewardsBaseInfo
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
console
.
log
(
res
,
'数据'
);
console
.
log
(
res
,
'数据'
);
this
.
setTeachMsg
.
Id
=
res
.
Data
.
Id
;
this
.
setTeachMsg
.
BasicMoney
=
res
.
Data
.
BasicMoney
;
this
.
setTeachMsg
.
BasicHour
=
res
.
Data
.
BasicHour
;
...
...
@@ -475,7 +478,7 @@
})
},
//保存上部
saveClass
(){
saveClass
()
{
this
.
setTeachMsg
.
ClassTypeIds
=
this
.
tempSchool
.
toString
();
SetTeachingRewardsBase
(
this
.
setTeachMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
...
...
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