Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lwby_copyright_book_data
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
maliang
lwby_copyright_book_data
Commits
1ad7fdab
Commit
1ad7fdab
authored
Jun 11, 2020
by
maliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传bug修复
parent
058ce2e1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
301 additions
and
91 deletions
+301
-91
CopyrightBookController.java
...t/security/server/controller/CopyrightBookController.java
+26
-6
CopyrightDao.java
src/main/java/com/boot/security/server/dao/CopyrightDao.java
+6
-0
PageTableRequest.java
...com/boot/security/server/page/table/PageTableRequest.java
+36
-0
CopyrightBookServiceImpl.java
...ecurity/server/service/impl/CopyrightBookServiceImpl.java
+56
-72
CopyrightMapper.xml
src/main/resources/mybatis-mappers/CopyrightMapper.xml
+4
-4
global.css
src/main/resources/static/css/global.css
+19
-9
copyrightDeductionConfig.html
...tic/pages/copyrightBookData/copyrightDeductionConfig.html
+154
-0
No files found.
src/main/java/com/boot/security/server/controller/CopyrightBookController.java
View file @
1ad7fdab
package
com
.
boot
.
security
.
server
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.boot.security.server.dao.CopyrightDao
;
import
com.boot.security.server.model.BaseSettlement
;
import
com.boot.security.server.page.table.PageTableRequest
;
...
...
@@ -8,6 +9,8 @@ import io.swagger.annotations.ApiOperation;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
@RestController
@RequestMapping
(
"/copyrightBookController"
)
public
class
CopyrightBookController
{
...
...
@@ -23,12 +26,6 @@ public class CopyrightBookController {
return
copyrightBookService
.
selectSettlement
(
request
.
getCopyrightIds
(),
request
.
getPage
(),
request
.
getLimit
());
}
// @PostMapping("/exportSettlementMonth")
// @ApiOperation(value = "获取月结算数据")
// @ResponseBody
// public String exportSettlementMonth(@RequestBody PageTableRequest request) {
// return copyrightBookService.selectSettlement(null,null,null);
// }
@PostMapping
(
"/settlementBookMonth"
)
@ApiOperation
(
value
=
"获取书籍月结算数据"
)
...
...
@@ -51,6 +48,29 @@ public class CopyrightBookController {
return
copyrightBookService
.
getSchema
(
request
.
getCopyrightIds
());
}
@PostMapping
(
"/getDeductionConfig"
)
@ApiOperation
(
value
=
"获取总的未结算数据"
)
@ResponseBody
public
String
getDeductionConfig
(
@RequestBody
PageTableRequest
request
){
List
<
BaseSettlement
>
deductionConfig
=
copyrightDao
.
getDeductionConfig
(
request
.
getPage
(),
request
.
getLimit
());
List
<
BaseSettlement
>
deductionConfigs
=
copyrightDao
.
getDeductionConfig
(
0
,
1000
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"data"
,
deductionConfig
);
jsonObject
.
put
(
"count"
,
deductionConfigs
.
size
());
jsonObject
.
put
(
"code"
,
0
);
return
jsonObject
.
toJSONString
();
}
@PostMapping
(
"/updateDeductionConfig"
)
@ApiOperation
(
value
=
"更新结算状态"
)
public
void
updateDeductionConfig
(
@RequestBody
PageTableRequest
request
){
Integer
type
=
1
;
if
(
request
.
getTypeName
().
equals
(
"固定扣量"
)){
type
=
2
;
}
copyrightDao
.
updateDeductionConfig
(
request
.
getCopyrightId
(),
request
.
getTypeName
(),
type
,
request
.
getContext
());
}
@PostMapping
(
"/updateSettlementStatus"
)
@ApiOperation
(
value
=
"更新结算状态"
)
public
void
updateSettlementStatus
(
@RequestBody
PageTableRequest
request
){
...
...
src/main/java/com/boot/security/server/dao/CopyrightDao.java
View file @
1ad7fdab
...
...
@@ -44,4 +44,10 @@ public interface CopyrightDao {
int
updateReleaseStatus
(
@Param
(
"copyrightId"
)
Integer
copyrightId
,
@Param
(
"reportDate"
)
String
reportDate
,
@Param
(
"releaseStatus"
)
Integer
releaseStatus
,
@Param
(
"releaseStatusName"
)
String
releaseStatusName
);
int
updateUserCopyrightMap
(
List
<
BaseSettlement
>
baseSettlements
);
@Select
(
"select copyright_id copyrightId,copyright_name copyrightName,type,type_name typeName,context from copyright_data.copyright_deduction limit #{page},#{limit};"
)
List
<
BaseSettlement
>
getDeductionConfig
(
@Param
(
"page"
)
Integer
page
,
@Param
(
"limit"
)
Integer
limit
);
@Update
(
"update copyright_data.copyright_deduction set type=#{type},type_name=#{typeName},context=#{context} where copyright_id=#{copyrightId}"
)
int
updateDeductionConfig
(
@Param
(
"copyrightId"
)
Integer
copyrightId
,
@Param
(
"typeName"
)
String
typeName
,
@Param
(
"type"
)
Integer
type
,
@Param
(
"context"
)
String
context
);
}
src/main/java/com/boot/security/server/page/table/PageTableRequest.java
View file @
1ad7fdab
...
...
@@ -29,6 +29,42 @@ public class PageTableRequest implements Serializable {
private
BaseSettlement
baseSettlement
;
private
Long
bookId
;
private
String
bookName
;
private
String
context
;
private
Integer
type
;
private
String
typeName
;
private
Integer
copyrightId
;
public
Integer
getCopyrightId
()
{
return
copyrightId
;
}
public
void
setCopyrightId
(
Integer
copyrightId
)
{
this
.
copyrightId
=
copyrightId
;
}
public
String
getContext
()
{
return
context
;
}
public
void
setContext
(
String
context
)
{
this
.
context
=
context
;
}
public
Integer
getType
()
{
return
type
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
public
String
getTypeName
()
{
return
typeName
;
}
public
void
setTypeName
(
String
typeName
)
{
this
.
typeName
=
typeName
;
}
public
Long
getBookId
()
{
return
bookId
;
...
...
src/main/java/com/boot/security/server/service/impl/CopyrightBookServiceImpl.java
View file @
1ad7fdab
...
...
@@ -271,83 +271,67 @@ public class CopyrightBookServiceImpl implements CopyrightBookService {
DecimalFormat
df
=
new
DecimalFormat
(
"#.00"
);
for
(
BaseSettlement
baseSettlement
:
baseSettlements
)
{
Integer
type
=
baseSettlement
.
getType
();
Double
totalAmount
=
baseSettlement
.
getTotalAmount
();
String
context
=
baseSettlement
.
getContext
();
Double
count
=
0.0
;
if
(
totalAmount
<=
2000.0
){
count
=
totalAmount
;
}
else
if
(
totalAmount
>=
2001.0
&&
totalAmount
<=
5000.0
){
Double
a1
=
totalAmount
-
2000.0
;
count
=
2000.0
+
a1
*
0.5
;
}
else
if
(
totalAmount
>=
5001.0
&&
totalAmount
<=
10000.0
){
Double
a1
=
totalAmount
-
5000.0
;
count
=
2000.0
+
3000
*
0.5
+
a1
*
0.2
;
}
else
if
(
totalAmount
>=
10001.0
&&
totalAmount
<=
30000.0
){
Double
a1
=
totalAmount
-
10000.0
;
count
=
2000.0
+
3000
*
0.5
+
5000
*
0.2
+
a1
*
0.2
;
}
else
if
(
totalAmount
>=
30001.0
&&
totalAmount
<=
50000.0
){
Double
a1
=
totalAmount
-
30000.0
;
count
=
2000.0
+
3000
*
0.5
+
5000
*
0.2
+
20000
*
0.2
+
a1
*
0.15
;
}
else
if
(
totalAmount
>=
50001.0
&&
totalAmount
<=
100000.0
){
Double
a1
=
totalAmount
-
50000.0
;
count
=
2000.0
+
3000
*
0.5
+
5000
*
0.2
+
20000
*
0.2
*
2
+
a1
*
0.15
;
}
else
if
(
totalAmount
>=
100001.0
&&
totalAmount
<=
300000.0
){
Double
a1
=
totalAmount
-
100000.0
;
count
=
2000.0
+
3000
*
0.5
+
5000
*
0.2
+
20000
*
0.2
*
2
+
50000
*
0.15
+
a1
*
0.1
;
}
else
if
(
totalAmount
>=
300001.0
&&
totalAmount
<=
500000.0
){
Double
a1
=
totalAmount
-
300000.0
;
count
=
2000.0
+
3000
*
0.5
+
5000
*
0.2
+
20000
*
0.2
*
2
+
50000
*
0.15
+
200000
*
0.1
+
a1
*
0.05
;
}
else
if
(
totalAmount
>=
500001.0
&&
totalAmount
<=
1000000.0
){
Double
a1
=
totalAmount
-
500000.0
;
count
=
2000.0
+
3000
*
0.5
+
5000
*
0.2
+
20000
*
0.2
*
2
+
50000
*
0.15
+
200000
*
0.1
*
2
+
a1
*
0.02
;
}
else
if
(
totalAmount
>=
1000001.0
&&
totalAmount
<=
3000000.0
){
Double
a1
=
totalAmount
-
1000000.0
;
count
=
2000.0
+
3000
*
0.5
+
5000
*
0.2
+
20000
*
0.2
*
2
+
50000
*
0.15
+
200000
*
0.1
*
2
+
500000
*
0.02
+
a1
*
0.02
;
}
else
if
(
totalAmount
>=
3000001.0
&&
totalAmount
<=
5000000.0
){
Double
a1
=
totalAmount
-
3000000.0
;
count
=
2000.0
+
3000
*
0.5
+
5000
*
0.2
+
20000
*
0.2
*
2
+
50000
*
0.15
+
200000
*
0.1
*
2
+
500000
*
0.02
+
2000000
*
0.02
+
a1
*
0.02
;
Double
count1
=
0.0
;
Double
totalAdvertAmount
=
baseSettlement
.
getTotalAdvertAmount
();
//扣量算法
if
(
type
==
1
){
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
context
);
Set
<
String
>
keySet
=
jsonObject
.
keySet
();
ArrayList
<
Integer
>
list
=
new
ArrayList
<>();
list
.
add
(
0
);
for
(
String
s
:
keySet
)
{
list
.
add
(
Integer
.
valueOf
(
s
));
}
Collections
.
sort
(
list
);
int
size
=
list
.
size
();
int
flag
=
0
;
int
flag1
=
0
;
Double
a1
=
0
D
;
Double
a2
=
0
D
;
for
(
int
i
=
1
;
i
<
size
;
i
++){
if
(
totalAmount
>=
list
.
get
(
i
-
1
)&&
totalAmount
<=
list
.
get
(
i
)){
flag
=
i
;
a1
=
totalAmount
-
list
.
get
(
i
-
1
);
count
=
a1
*
jsonObject
.
getDouble
(
String
.
valueOf
(
list
.
get
(
i
)
)
);
break
;
}
}
for
(
int
i
=
1
;
i
<
size
;
i
++){
if
(
totalAdvertAmount
>=
list
.
get
(
i
-
1
)&&
totalAdvertAmount
<=
list
.
get
(
i
)){
flag1
=
i
;
a2
=
totalAdvertAmount
-
list
.
get
(
i
-
1
);
count1
=
a2
*
jsonObject
.
getDouble
(
String
.
valueOf
(
list
.
get
(
i
)
)
);
break
;
}
}
for
(
int
i
=
1
;
i
<
flag
;
i
++){
count
+=
list
.
get
(
i
)*
jsonObject
.
getDouble
(
String
.
valueOf
(
list
.
get
(
i
)
));
}
for
(
int
i
=
1
;
i
<
flag1
;
i
++){
count1
+=
list
.
get
(
i
)*
jsonObject
.
getDouble
(
String
.
valueOf
(
list
.
get
(
i
)
));
}
}
else
{
count
=
totalAmount
*
Double
.
valueOf
(
context
);
count1
=
totalAmount
*
Double
.
valueOf
(
context
);
}
count
=
Double
.
valueOf
(
df
.
format
(
count
));
baseSettlement
.
setTotalAmount
(
count
);
baseSettlement
.
setSettlementAmount
(
Double
.
valueOf
(
df
.
format
(
count
*
0.5
)));
count
=
0.0
;
Double
totalAdvertAmount
=
baseSettlement
.
getTotalAdvertAmount
();
if
(
totalAdvertAmount
<=
2000.0
){
count
=
totalAdvertAmount
;
}
else
if
(
totalAdvertAmount
>=
2001.0
&&
totalAdvertAmount
<=
5000.0
){
Double
a1
=
totalAdvertAmount
-
2000.0
;
count
=
2000.0
+
a1
*
0.5
;
}
else
if
(
totalAdvertAmount
>=
5001.0
&&
totalAdvertAmount
<=
10000.0
){
Double
a1
=
totalAdvertAmount
-
5000.0
;
count
=
2000.0
+
3000
*
0.5
+
a1
*
0.2
;
}
else
if
(
totalAdvertAmount
>=
10001.0
&&
totalAdvertAmount
<=
30000.0
){
Double
a1
=
totalAdvertAmount
-
10000.0
;
count
=
2000.0
+
3000
*
0.5
+
5000
*
0.2
+
a1
*
0.2
;
}
else
if
(
totalAdvertAmount
>=
30001.0
&&
totalAdvertAmount
<=
50000.0
){
Double
a1
=
totalAdvertAmount
-
30000.0
;
count
=
2000.0
+
3000
*
0.5
+
5000
*
0.2
+
20000
*
0.2
+
a1
*
0.15
;
}
else
if
(
totalAdvertAmount
>=
50001.0
&&
totalAdvertAmount
<=
100000.0
){
Double
a1
=
totalAdvertAmount
-
50000.0
;
count
=
2000.0
+
3000
*
0.5
+
5000
*
0.2
+
20000
*
0.2
*
2
+
a1
*
0.15
;
}
else
if
(
totalAdvertAmount
>=
100001.0
&&
totalAdvertAmount
<=
300000.0
){
Double
a1
=
totalAdvertAmount
-
100000.0
;
count
=
2000.0
+
3000
*
0.5
+
5000
*
0.2
+
20000
*
0.2
*
2
+
50000
*
0.15
+
a1
*
0.1
;
}
else
if
(
totalAdvertAmount
>=
300001.0
&&
totalAdvertAmount
<=
500000.0
){
Double
a1
=
totalAdvertAmount
-
300000.0
;
count
=
2000.0
+
3000
*
0.5
+
5000
*
0.2
+
20000
*
0.2
*
2
+
50000
*
0.15
+
200000
*
0.1
+
a1
*
0.05
;
}
else
if
(
totalAdvertAmount
>=
500001.0
&&
totalAdvertAmount
<=
1000000.0
){
Double
a1
=
totalAdvertAmount
-
500000.0
;
count
=
2000.0
+
3000
*
0.5
+
5000
*
0.2
+
20000
*
0.2
*
2
+
50000
*
0.15
+
200000
*
0.1
*
2
+
a1
*
0.02
;
}
else
if
(
totalAdvertAmount
>=
1000001.0
&&
totalAdvertAmount
<=
3000000.0
){
Double
a1
=
totalAdvertAmount
-
1000000.0
;
count
=
2000.0
+
3000
*
0.5
+
5000
*
0.2
+
20000
*
0.2
*
2
+
50000
*
0.15
+
200000
*
0.1
*
2
+
500000
*
0.02
+
a1
*
0.02
;
}
else
if
(
totalAdvertAmount
>=
3000001.0
&&
totalAdvertAmount
<=
5000000.0
){
Double
a1
=
totalAdvertAmount
-
3000000.0
;
count
=
2000.0
+
3000
*
0.5
+
5000
*
0.2
+
20000
*
0.2
*
2
+
50000
*
0.15
+
200000
*
0.1
*
2
+
500000
*
0.02
+
2000000
*
0.02
+
a1
*
0.02
;
}
else
if
(
totalAdvertAmount
>=
5000001.0
){
Double
a1
=
totalAdvertAmount
-
5000000.0
;
count
=
2000.0
+
3000
*
0.5
+
5000
*
0.2
+
20000
*
0.2
*
2
+
50000
*
0.15
+
200000
*
0.1
*
2
+
500000
*
0.02
+
2000000
*
0.02
+
2000000
*
0.02
+
a1
*
0.02
;
}
count
=
Double
.
valueOf
(
df
.
format
(
count
));
count
=
Double
.
valueOf
(
df
.
format
(
count1
));
Integer
id
=
baseSettlement
.
getCopyrightId
();
if
(
id
==
3219
||
id
==
3230
||
id
==
3254
||
id
==
3253
){
count
=
Double
.
valueOf
(
df
.
format
(
baseSettlement
.
getTotalAmount
()+
count
));
...
...
@@ -364,7 +348,7 @@ public class CopyrightBookServiceImpl implements CopyrightBookService {
schema
+=
Double
.
valueOf
(
df
.
format
(
baseSettlement
.
getSettlementAmount
()+
baseSettlement
.
getSettlementAdAmount
()));
}
}
Integer
count
=
copyrightDao
.
selectTableListMonthCount
(
baseSettlementList
,
status
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"schema"
,
Double
.
valueOf
(
df
.
format
(
schema
)));
return
jsonObject
.
toJSONString
();
...
...
src/main/resources/mybatis-mappers/CopyrightMapper.xml
View file @
1ad7fdab
...
...
@@ -101,10 +101,10 @@
<!--</select>-->
<select
id=
"selectTableListMonthSchema"
resultType=
"com.boot.security.server.model.BaseSettlement"
parameterType=
"com.boot.security.server.model.BaseSettlement"
>
SELECT report_date,
copyright_id,
copyright_name,total_amount as totalAmount,
IFNULL(total_ad_amount,0) totalAdvertAmount,jiesuan_status_name statusName,jiesuan_status status,release_status_name releaseStatusName,release_status releaseStatus
FROM bi_report.report_book_settlement_month_copyright a
WHERE a.report_date>='2020-04'
SELECT report_date,
a.copyright_id,a.
copyright_name,total_amount as totalAmount,
IFNULL(total_ad_amount,0) totalAdvertAmount,jiesuan_status_name statusName,jiesuan_status status,release_status_name releaseStatusName,release_status releaseStatus
,b.type,b.type_name,b.context
FROM bi_report.report_book_settlement_month_copyright a
,copyright_data.copyright_deduction b
WHERE a.report_date>='2020-04'
and a.copyright_id=b.copyright_id
<if
test=
"copyrightId != null"
>
and a.copyright_id in
<foreach
collection=
"copyrightId"
item=
"item"
index=
"index"
separator=
","
open=
"("
close=
")"
>
...
...
src/main/resources/static/css/global.css
View file @
1ad7fdab
...
...
@@ -17,11 +17,11 @@
.menu
a
{
position
:
relative
;
padding
:
0
20px
;
margin
:
0
20px
;
color
:
#c2c2c2
;
font-size
:
14px
;}
.menu
a
:hover
{
color
:
#fff
;
transition
:
all
.5s
;
-webkit-transition
:
all
.5s
}
.menu
a
.this
{
color
:
#fff
}
.menu
a
.this
::after
{
content
:
''
;
position
:
absolute
;
left
:
0
;
bottom
:
-1px
;
width
:
100%
;
height
:
5px
;
background-color
:
#
5FB878
;}
.menu
a
.this
::after
{
content
:
''
;
position
:
absolute
;
left
:
0
;
bottom
:
-1px
;
width
:
100%
;
height
:
5px
;
background-color
:
#
01AAED
;}
/* #5FB878 #01AAED*/
.header-index
{
background-color
:
#080018
;
border
:
none
;}
.layui-layout-admin
.header-demo
{
border-bottom-color
:
#
1AA094
;
background-color
:
#fff
;}
.layui-layout-admin
.header-demo
{
border-bottom-color
:
#
01AAED
;
background-color
:
#fff
;}
/* #1AA094 #01AAED*/
.header-demo
.logo
{
left
:
40px
;}
.header-demo
.layui-nav
{
top
:
0
;}
.header-demo
.layui-nav
.layui-nav-item
{
margin
:
0
10px
;
line-height
:
65px
;}
...
...
@@ -125,7 +125,7 @@ body .layui-layer-dir .layui-layer-content{padding: 10px; max-height: 280px; ove
.site-tree
.layui-tree
li
a
cite
{
padding
:
0
8px
;}
.site-tree
.layui-tree
.site-tree-noicon
a
cite
{
padding-left
:
15px
;}
.site-tree
.layui-tree
li
a
em
{
font-size
:
12px
;
color
:
#bbb
;
padding-right
:
5px
;
font-style
:
normal
;}
.site-tree
.layui-tree
li
h2
{
line-height
:
36px
;
border-left
:
5px
solid
#0
09E94
;
margin
:
15px
0
5px
;
padding
:
0
10px
;
background-color
:
#f2f2f2
;}
.site-tree
.layui-tree
li
h2
{
line-height
:
36px
;
border-left
:
5px
solid
#0
1AAED
;
margin
:
15px
0
5px
;
padding
:
0
10px
;
background-color
:
#f2f2f2
;}
/* #009E94 #01AAED*/
.site-tree
.layui-tree
li
ul
{
margin-left
:
27px
;
line-height
:
28px
;}
.site-tree
.layui-tree
li
ul
a
,
.site-tree
.layui-tree
li
ul
a
i
{
color
:
#777
;}
...
...
@@ -271,16 +271,20 @@ body .site-demo-nav .layui-nav-item{line-height: 40px}
border
:
0
;
height
:
100%
;
}
/* #1AA094 #01AAED*/
.admin-nav-card
>
.layui-tab-title
{
border-bottom
:
1px
solid
#
1AA094
;
border-bottom
:
1px
solid
#
01AAED
;
}
.admin-nav-card
.layui-tab-title
cite
{
font-style
:
normal
;
padding-left
:
5px
;
}
/* #1AA094 #01AAED*/
.admin-nav-card
>
.layui-tab-title
.layui-this
{
color
:
white
;
background-color
:
#
1AA094
;
background-color
:
#
01AAED
;
}
.admin-nav-card
>
.layui-tab-title
.layui-this
:after
{
border-bottom
:
0
;
...
...
@@ -307,11 +311,13 @@ body .site-demo-nav .layui-nav-item{line-height: 40px}
.admin-header-lock-img
img
{
width
:
60px
;
height
:
60px
;
border-radius
:
100%
;
}
/* #009688 #01AAED*/
.admin-header-lock-name
{
color
:
#0
09688
;
margin
:
8px
0
15px
0
;
color
:
#0
1AAED
;
margin
:
8px
0
15px
0
;
}
/* #009688 #01AAED*/
.admin-header-lock-input
{
width
:
150px
;
color
:
#FFFFFF
;
height
:
30px
;
border
:
0
;
background-color
:
#0
09688
;
padding
:
0
7px
;
border-radius
:
2px
;
width
:
150px
;
color
:
#FFFFFF
;
height
:
30px
;
border
:
0
;
background-color
:
#0
1AAED
;
padding
:
0
7px
;
border-radius
:
2px
;
}
/*table*/
.site-table
tbody
tr
td
{
text-align
:
center
;}
...
...
@@ -323,6 +329,8 @@ body .site-demo-nav .layui-nav-item{line-height: 40px}
/**/
.admin-main
{
margin
:
15px
;}
/* #1AA094 #01AAED*/
.admin-side-toggle
,
.admin-side-full
{
position
:
absolute
;
cursor
:
pointer
;
z-index
:
19940201
;
...
...
@@ -331,12 +339,14 @@ body .site-demo-nav .layui-nav-item{line-height: 40px}
text-align
:
center
;
width
:
30px
;
height
:
30px
;
background-color
:
#
1AA094
;
background-color
:
#
01AAED
;
line-height
:
30px
;
top
:
25%
;
}
/* #5FB878 #01AAED*/
.admin-side-toggle
:hover
{
background-color
:
#
5FB878
;
background-color
:
#
01AAED
;
}
.admin-side-full
{
left
:
240px
;
...
...
src/main/resources/static/pages/copyrightBookData/copyrightDeductionConfig.html
0 → 100644
View file @
1ad7fdab
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
扣量配置
</title>
</head>
<link
rel=
"stylesheet"
href=
"../../css/treetable/jquery.treetable.css"
/>
<link
rel=
"stylesheet"
href=
"../../css/treetable/jquery.treetable.theme.default.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"../../layui/css/layui.css"
>
<body>
<div
class=
"layui-container"
>
<div
class=
"layui-form"
>
<div
class=
"layui-row"
>
</div>
<div
class=
"layui-row"
>
<table
class=
"layui-table"
id=
"copyrightConfig_table"
lay-filter=
"test"
>
</table>
</div>
</div>
</div>
</body>
</html>
<script
type=
"text/javascript"
src=
"../../js/libs/jquery-2.1.1.min.js"
></script>
<script
type=
"text/javascript"
src=
"../../js/jq.js"
></script>
<script
type=
"text/javascript"
src=
"../../layui/layui.js"
></script>
<script
type=
"text/javascript"
src=
"../../js/my/permission.js"
></script>
<script
src=
"../../js/libs/jquery.treetable.js"
></script>
<script
type=
"text/javascript"
src=
"../../js/echarts.min.js"
></script>
<!--<script type="text/html" id="operation">-->
<!--<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>-->
<!--</script>-->
<!--<script type="text/html" id="release">-->
<!--{{# if(d.releaseStatus == 0){ }}-->
<!--<button class="layui-btn layui-btn-normal" name="" lay-event="release">未发布</button>-->
<!--{{# } else { }}-->
<!--<button class="layui-btn layui-btn-danger" name="" lay-event="release">已发布</button>-->
<!--{{# } }}-->
<!--</script>-->
<script>
var
copyrightId
;
copyrightId
=
$
(
"#copyrightId"
);
var
form
;
var
copyrights
;
var
tableIns
;
function
table1
(){
layui
.
use
(
'table'
,
function
()
{
var
table
=
layui
.
table
;
tableIns
=
table
.
render
({
elem
:
'#copyrightConfig_table'
,
id
:
'idTest'
,
method
:
'post'
,
contentType
:
'application/json'
,
url
:
'/copyrightBookController/getDeductionConfig'
,
page
:
true
,
toolbar
:
'true'
,
defaultToolbar
:
[
'exports'
]
,
limit
:
20
,
limits
:[
20
,
30
,
40
,
50
,
60
,
70
,
80
,
90
]
,
height
:
500
,
cols
:
[[
,{
field
:
'copyrightId'
,
title
:
'版权费id'
,
hide
:
true
}
,{
field
:
'copyrightName'
,
title
:
'版权方名称'
}
,{
field
:
'typeName'
,
title
:
'扣量方式'
,
edit
:
"text"
}
,{
field
:
'type'
,
title
:
'扣量方式id'
,
hide
:
true
}
,{
field
:
'context'
,
title
:
'扣量比例'
,
edit
:
"text"
}
]]
//设置表头
});
table
.
on
(
'edit(test)'
,
function
(
obj
){
//注:edit是固定事件名,test是table原始容器的属性 lay-filter="对应的值"
var
list
=
obj
.
data
;
layer
.
confirm
(
'你确定更改吗?'
,
{
btn
:
[
'确定'
,
'取消'
]
//可以无限个按钮
},
function
(
index
,
layero
){
$
.
ajax
({
//请求方式
type
:
"post"
,
//请求的媒体类型
contentType
:
"application/json;charset=UTF-8"
,
//请求地址
url
:
"/copyrightBookController/updateDeductionConfig"
,
async
:
false
,
//数据,json字符串
data
:
JSON
.
stringify
(
list
),
//ajax controller有请求参数必须传参写data
//请求成功
success
:
function
(
result
)
{
layer
.
open
({
content
:
'修改成功'
});
reload
()
}
});
},
function
(
index
){
reload
()
});
});
});
}
function
reload
(
data
)
{
//执行重载
tableIns
.
reload
({
page
:
{
curr
:
1
//重新从第 1 页开始
}
,
where
:
{
copyrightIds
:
data
}
});
}
var
roleId
;
function
init
(){
//var list={copyrightId:copyrightId};
$
.
ajax
({
//请求方式
type
:
"post"
,
//请求的媒体类型
contentType
:
"application/json;charset=UTF-8"
,
//请求地址
url
:
"/copyrightBookController/getAllCopyright"
,
async
:
false
,
//数据,json字符串
//data : JSON.stringify(list),ajax controller有请求参数必须传参写data
//请求成功
success
:
function
(
result
)
{
var
jsonObj
=
JSON
.
parse
(
result
);
roleId
=
jsonObj
.
roleId
;
}
});
}
init
();
if
(
roleId
==
3
){
table1
();
}
else
{
}
</script>
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