Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BudgetManagementSystem
Overview
Overview
Details
Activity
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
王利雷
BudgetManagementSystem
Commits
b45184a0
Commit
b45184a0
authored
Apr 22, 2019
by
shj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
08160e08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
111 additions
and
10 deletions
+111
-10
DetailHandler.java
src/main/java/handlers/DetailHandler.java
+30
-0
budgetDetail.jsp
src/main/webapp/budgetDetail.jsp
+81
-10
No files found.
src/main/java/handlers/DetailHandler.java
View file @
b45184a0
...
...
@@ -225,4 +225,34 @@ public class DetailHandler {
e
.
printStackTrace
();
}
}
@RequestMapping
(
"/Conference"
)
public
void
conferenceDetail
(
HttpServletRequest
request
,
HttpServletResponse
response
){
try
{
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setContentType
(
"text/html;charset=utf-8"
);
PrintWriter
writer
=
response
.
getWriter
();
JSONObject
object
=
new
JSONObject
();
String
sessionID
=
BudgetHandler
.
getSessionID
(
request
.
getCookies
());
Budget
budget
=
BudgetHandler
.
retrieveBudget
(
sessionID
);
Map
<
Conference
,
Pair
>
conferencePairMap
=
budget
.
getConferences
();
List
<
JSONObject
>
list
=
new
LinkedList
<>();
for
(
Conference
item
:
conferencePairMap
.
keySet
())
{
JSONObject
obj
=
new
JSONObject
();
obj
.
put
(
"id"
,
item
.
getId
());
obj
.
put
(
"name"
,
item
.
getName
());
obj
.
put
(
"experts"
,
item
.
getExperts
());
obj
.
put
(
"expertType"
,
"专家"
);
obj
.
put
(
"price"
,
item
.
getPrice
());
obj
.
put
(
"people"
,
conferencePairMap
.
get
(
item
).
getPeople
());
obj
.
put
(
"days"
,
conferencePairMap
.
get
(
item
).
getDays
());
list
.
add
(
obj
);
}
object
.
put
(
"data"
,
list
);
writer
.
write
(
JSON
.
toJSONString
(
object
));
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
src/main/webapp/budgetDetail.jsp
View file @
b45184a0
...
...
@@ -80,7 +80,7 @@
<li><a
href=
"#test"
data-toggle=
"tab"
>
测试化验加工费
</a></li>
<li><a
href=
"#power"
data-toggle=
"tab"
>
燃料动力费
</a></li>
<li><a
href=
"#travel"
data-toggle=
"tab"
onclick=
travelVue.showlist()
>
差旅费
</a></li>
<li><a
href=
"#conference"
data-toggle=
"tab"
>
会议费(包含咨询费)
</a></li>
<li><a
href=
"#conference"
data-toggle=
"tab"
onclick=
"conferenceVue.showlist()"
>
会议费(包含咨询费)
</a></li>
<li><a
href=
"#international"
data-toggle=
"tab"
>
国际交流合作费
</a></li>
<li><a
href=
"#property"
data-toggle=
"tab"
onclick=
"propertyVue.showlist()"
>
出版/文献/信息传播/知识产权事务费
</a></li>
<li><a
href=
"#labour"
data-toggle=
"tab"
>
劳务费
</a></li>
...
...
@@ -250,15 +250,37 @@
<table
class=
"table table-hover"
>
<thead>
<tr>
<th>
编号
</th>
<th
hidden
>
编号
</th>
<th>
名称
</th>
<th>
专家类型
</th>
<th>
需要专家人数
</th>
<th>
单价
</th>
<th>
需要专家
</th>
<th>
参会人数*会议次数
</th>
<th>
参会人数
</th>
<th>
会议次数
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
<tr
v-for=
"item in items"
v-bind:title=
"item.name"
>
<td><input
type=
"text"
readonly
v-model=
"item.name"
></td>
<td>
<select
class=
"form-control"
v-model=
"item.expertType"
>
<option
disabled
value=
""
>
请选择其中一项
</option>
<option>
专家
</option>
<option>
B
</option>
<option>
C
</option>
</select>
</td>
<td><input
type=
"number"
v-model=
"item.experts"
></td>
<td><input
type=
"number"
v-model=
"item.price"
></td>
<td><input
type=
"number"
v-model=
"item.people"
></td>
<td><input
type=
"number"
v-model=
"item.days"
></td>
<td>
<button
class=
"btn btn-success"
@
click=
"update(item)"
>
确认
</button>
<button
class=
"btn btn-danger"
@
click=
"del(item)"
>
删除
</button>
</td>
</tr>
</tbody>
</table>
...
...
@@ -369,11 +391,11 @@
</thead>
<tbody
id=
"indirect-body"
>
<tr
v-for=
"item in items"
>
<td>
{{item.name}}
</td>
<td>
{{item.price}}
</td>
<td>
{{item.nums}}
</td>
</tr>
<tr
v-for=
"item in items"
>
<td>
{{item.name}}
</td>
<td>
{{item.price}}
</td>
<td>
{{item.nums}}
</td>
</tr>
</tbody>
</table>
...
...
@@ -552,7 +574,7 @@
}
});
var
indirectVue
=
new
Vue
({
var
indirectVue
=
new
Vue
({
el
:
"#indirect"
,
data
:
{
items
:
[]
...
...
@@ -573,6 +595,55 @@
}
});
var
conferenceVue
=
new
Vue
({
el
:
"#conference"
,
data
:
{
items
:
[],
sample
:
{
name
:
"sample"
,
expertType
:
"专家"
,
experts
:
0
,
price
:
0
,
people
:
0
,
days
:
0
}
},
methods
:
{
update
:
function
(
item
)
{
this
.
doUpdate
(
item
,
2
);
},
del
:
function
(
item
)
{
this
.
doUpdate
(
item
,
1
);
},
add
:
function
(
item
)
{
this
.
doUpdate
(
item
,
0
);
},
showlist
:
function
()
{
this
.
$http
.
get
(
"${pageContext.request.contextPath}/Budget/Detail/Conference"
).
then
(
function
(
data
)
{
this
.
items
=
data
.
body
.
data
;
console
.
log
(
"showlist"
);
updateBudgetPage
(
"conference"
)
},
function
(
error
)
{
console
.
log
(
error
)
}
)
},
doUpdate
:
function
(
item
,
curd
)
{
this
.
$http
.
post
(
"${pageContext.request.contextPath}/Budget/Modify/Conference"
,
{
name
:
item
.
name
,
expertType
:
item
.
expertType
,
experts
:
item
.
experts
,
price
:
item
.
price
,
people
:
item
.
people
,
days
:
item
.
days
,
curd
:
curd
},
{
emulateJSON
:
true
}
).
then
(
function
(
value
)
{
this
.
showlist
();
});
}
},
created
:
function
()
{
}
});
/**
* 更新差值
...
...
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