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
41fe001c
Commit
41fe001c
authored
May 16, 2019
by
shj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决了数据库列表显示的bug:不能删除预算中已有的记录
parent
341ac144
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
30 deletions
+45
-30
budgetDetail.jsp
src/main/webapp/budgetDetail.jsp
+45
-30
No files found.
src/main/webapp/budgetDetail.jsp
View file @
41fe001c
...
...
@@ -134,7 +134,7 @@
<button
class=
"btn btn-success"
@
click=
"addToDatabase(sample)"
>
添加到数据库
</button>
</td>
</tr>
<tr
class=
"info"
>
<tr
class=
"info"
v-if=
"database.length>0"
>
<td>
<select
v-model=
"selectedIndex"
class=
"form-control"
>
<option
v-for=
"(record,i) in database"
:value=
"i"
>
...
...
@@ -452,7 +452,7 @@
</td>
</tr>
<tr
class=
"info"
>
<tr
class=
"info"
v-if=
"database.length>0"
>
<td>
<select
v-model=
"selectedIndex"
class=
"form-control"
>
<option
v-for=
"(record,i) in database"
:value=
"i"
>
...
...
@@ -502,7 +502,7 @@
</td>
</tr>
<tr
class=
"info"
>
<tr
class=
"info"
v-if=
"database.length>0"
>
<td>
<select
v-model=
"selectedIndex"
class=
"form-control"
>
<option
v-for=
"(record,i) in database"
:value=
"i"
>
...
...
@@ -589,28 +589,31 @@
this
.
items
=
data
.
body
.
data
;
console
.
log
(
"showlist"
);
updateBudgetPage
(
"equipment"
);
this
.
$http
.
get
(
"${pageContext.request.contextPath}/Database/Query/Equipment"
).
then
(
function
(
data
)
{
var
tmp
=
data
.
body
.
data
;
for
(
var
i
=
0
;
i
<
tmp
.
length
;
i
++
)
{
if
(
inItems
(
tmp
[
i
],
this
.
items
)){
tmp
.
splice
(
i
,
1
);
}
}
this
.
database
=
tmp
;
console
.
log
(
"show database"
);
},
function
(
error
)
{
console
.
log
(
error
)
}
)
this
.
showDatabase
();
},
function
(
error
)
{
console
.
log
(
error
)
}
);
},
showDatabase
:
function
(){
this
.
$http
.
get
(
"${pageContext.request.contextPath}/Database/Query/Equipment"
).
then
(
function
(
data
)
{
var
tmp
=
data
.
body
.
data
;
for
(
var
i
=
0
;
i
<
tmp
.
length
;
i
++
)
{
if
(
inItems
(
tmp
[
i
],
this
.
items
)){
console
.
log
(
"inItems:true, "
+
tmp
[
i
].
name
);
tmp
.
splice
(
i
,
1
);
i
--
;
}
}
this
.
database
=
tmp
;
console
.
log
(
"show database"
);
},
function
(
error
)
{
console
.
log
(
error
)
}
)
},
doUpdate
:
function
(
item
,
curd
)
{
this
.
$http
.
post
(
"${pageContext.request.contextPath}/Budget/Modify/Equipment"
,
{
...
...
@@ -982,20 +985,25 @@
function
(
data
)
{
this
.
items
=
data
.
body
.
data
;
console
.
log
(
"showlist"
);
updateBudgetPage
(
"labour"
)
updateBudgetPage
(
"labour"
);
this
.
showDatabase
()
},
function
(
error
)
{
console
.
log
(
error
)
}
);
},
showDatabase
:
function
(){
this
.
$http
.
get
(
"${pageContext.request.contextPath}/Database/Query/Labour"
).
then
(
function
(
data
)
{
this
.
database
=
data
.
body
.
data
;
for
(
var
i
=
0
;
i
<
this
.
database
.
length
;
i
++
)
var
list
=
data
.
body
.
data
;
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
inItems
(
this
.
database
[
i
],
this
.
items
)){
this
.
database
.
splice
(
i
,
1
);
if
(
inItems
(
list
[
i
],
this
.
items
)){
list
.
splice
(
i
,
1
);
i
--
;
}
}
this
.
database
=
list
;
console
.
log
(
"show database"
);
},
function
(
error
)
{
console
.
log
(
error
)
...
...
@@ -1046,20 +1054,27 @@
function
(
data
)
{
this
.
items
=
data
.
body
.
data
;
console
.
log
(
"showlist"
);
updateBudgetPage
(
"consultation"
)
updateBudgetPage
(
"consultation"
);
this
.
showDatabase
();
},
function
(
error
)
{
console
.
log
(
error
)
}
);
},
showDatabase
:
function
(){
this
.
$http
.
get
(
"${pageContext.request.contextPath}/Database/Query/Consultation"
).
then
(
function
(
data
)
{
this
.
database
=
data
.
body
.
data
;
for
(
var
i
=
0
;
i
<
this
.
database
.
length
;
i
++
)
var
list
=
data
.
body
.
data
;
console
.
log
(
this
.
items
);
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
inItems
(
this
.
database
[
i
],
this
.
items
)){
this
.
database
.
splice
(
i
,
1
);
if
(
inItems
(
list
[
i
],
this
.
items
)){
console
.
log
(
"deleted: "
+
list
[
i
].
name
);
list
.
splice
(
i
,
1
);
i
--
;
}
}
this
.
database
=
list
;
console
.
log
(
"show database"
);
},
function
(
error
)
{
console
.
log
(
error
)
...
...
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