Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
6f039191
Commit
6f039191
authored
Jun 07, 2020
by
季圣华
Browse files
优化管理模块页面的校验
parent
1c74faab
Changes
9
Hide whitespace changes
Inline
Side-by-side
erp_web/pages/manage/customer.html
View file @
6f039191
...
...
@@ -52,18 +52,18 @@
</div>
<table
id=
"tableData"
style=
"top:300px;border-bottom-color:#FFFFFF"
></table>
</div>
<div
id=
"supplierDlg"
class=
"easyui-dialog"
style=
"
width:580px;
padding:10px
2
0px"
<div
id=
"supplierDlg"
class=
"easyui-dialog"
style=
"padding:10px
4
0px"
fit=
"true"
closed=
"true"
buttons=
"#dlg-buttons"
modal=
"true"
collapsible=
"false"
closable=
"true"
>
<form
id=
"supplierFM"
>
<table>
<tr>
<td
style=
"width:
8
0px;height: 20px"
>
名称
</td>
<td
style=
"width:
18
0px;padding:5px"
>
<td
style=
"width:
12
0px;height: 20px"
>
名称
</td>
<td
style=
"width:
25
0px;padding:5px"
>
<input
name=
"supplier"
id=
"supplier"
class=
"easyui-textbox"
data-options=
"required:true,validType:'length[2,30]'"
style=
"width: 160px;"
/>
</td>
<td
style=
"width:
6
0px;height: 20px"
>
联系人
</td>
<td
style=
"width:
18
0px;padding:5px;"
>
<td
style=
"width:
12
0px;height: 20px"
>
联系人
</td>
<td
style=
"width:
25
0px;padding:5px;"
>
<input
name=
"contacts"
id=
"contacts"
class=
"easyui-textbox"
style=
"width: 160px;"
/>
</td>
</tr>
...
...
@@ -134,13 +134,13 @@
<tr>
<td>
地址
</td>
<td
style=
"padding:5px"
colspan=
"3"
>
<input
name=
"address"
id=
"address"
class=
"easyui-textbox"
style=
"width:
401
px;"
/>
<input
name=
"address"
id=
"address"
class=
"easyui-textbox"
style=
"width:
530
px;"
/>
</td>
</tr>
<tr>
<td>
备注
</td>
<td
style=
"padding:5px"
colspan=
"3"
>
<input
name=
"description"
id=
"description"
class=
"easyui-textbox"
data-options=
"multiline:true"
style=
"width:
401
px;height: 40px;"
/>
<input
name=
"description"
id=
"description"
class=
"easyui-textbox"
data-options=
"multiline:true"
style=
"width:
530
px;height: 40px;"
/>
</td>
</tr>
</table>
...
...
erp_web/pages/manage/depot.html
View file @
6f039191
...
...
@@ -457,11 +457,14 @@
//保存信息
$
(
"
#saveDepot
"
).
off
(
"
click
"
).
on
(
"
click
"
,
function
()
{
var
infoObj
=
$
(
"
#depotFM
"
).
serializeObject
();
infoObj
.
type
=
0
;
if
(
!
$
(
'
#depotFM
'
).
form
(
'
validate
'
)){
return
;
}
if
(
checkDepotName
())
{
return
;
}
var
infoObj
=
$
(
"
#depotFM
"
).
serializeObject
();
infoObj
.
type
=
0
;
$
.
ajax
({
url
:
url
,
type
:
"
post
"
,
...
...
erp_web/pages/manage/inOutItem.html
View file @
6f039191
...
...
@@ -353,13 +353,16 @@
//保存收支项目
$
(
"
#saveInOutItem
"
).
off
(
"
click
"
).
on
(
"
click
"
,
function
()
{
if
(
checkInOutItemName
(
))
{
if
(
!
$
(
'
#inOutItemFM
'
).
form
(
'
validate
'
)){
return
;
}
if
(
!
$
(
"
#type
"
).
val
())
{
$
.
messager
.
alert
(
'
提示
'
,
'
请选择类型!
'
,
'
warning
'
);
return
;
}
if
(
checkInOutItemName
())
{
return
;
}
$
.
ajax
({
url
:
url
,
type
:
"
post
"
,
...
...
erp_web/pages/manage/member.html
View file @
6f039191
...
...
@@ -52,18 +52,18 @@
</div>
<table
id=
"tableData"
style=
"top:300px;border-bottom-color:#FFFFFF"
></table>
</div>
<div
id=
"supplierDlg"
class=
"easyui-dialog"
style=
"
width:600px;
padding:10px
2
0px"
<div
id=
"supplierDlg"
class=
"easyui-dialog"
style=
"padding:10px
4
0px"
fit=
"true"
closed=
"true"
buttons=
"#dlg-buttons"
modal=
"true"
collapsible=
"false"
closable=
"true"
>
<form
id=
"supplierFM"
>
<table>
<tr>
<td
style=
"width:
8
0px;height: 20px"
>
名称
</td>
<td
style=
"width:
18
0px;padding:5px"
>
<td
style=
"width:
12
0px;height: 20px"
>
名称
</td>
<td
style=
"width:
25
0px;padding:5px"
>
<input
name=
"supplier"
id=
"supplier"
class=
"easyui-textbox"
data-options=
"required:true,validType:'length[2,30]'"
style=
"width: 160px;"
/>
</td>
<td
style=
"width:
6
0px;height: 20px"
>
联系人
</td>
<td
style=
"width:
18
0px;padding:5px;"
>
<td
style=
"width:
12
0px;height: 20px"
>
联系人
</td>
<td
style=
"width:
25
0px;padding:5px;"
>
<input
name=
"contacts"
id=
"contacts"
class=
"easyui-textbox"
style=
"width: 160px;"
/>
</td>
</tr>
...
...
@@ -116,7 +116,7 @@
<td
style=
"padding:5px"
>
<input
name=
"taxNum"
id=
"taxNum"
class=
"easyui-textbox"
style=
"width: 160px;"
/>
</td>
<td>
税率
</td>
<td>
税率
(%)
</td>
<td
style=
"padding:5px"
>
<input
name=
"taxRate"
id=
"taxRate"
class=
"easyui-textbox"
style=
"width: 160px;"
/>
</td>
...
...
@@ -134,13 +134,13 @@
<tr>
<td>
地址
</td>
<td
style=
"padding:5px"
colspan=
"3"
>
<input
name=
"address"
id=
"address"
class=
"easyui-textbox"
style=
"width:
401
px;"
/>
<input
name=
"address"
id=
"address"
class=
"easyui-textbox"
style=
"width:
530
px;"
/>
</td>
</tr>
<tr>
<td>
备注
</td>
<td
style=
"padding:5px"
colspan=
"3"
>
<textarea
name=
"description"
id=
"description"
class=
"easyui-textbox"
data-options=
"multiline:true"
style=
"width:
401
px;height: 40px;"
></textarea>
<textarea
name=
"description"
id=
"description"
class=
"easyui-textbox"
data-options=
"multiline:true"
style=
"width:
530
px;height: 40px;"
></textarea>
</td>
</tr>
</table>
...
...
erp_web/pages/manage/role.html
View file @
6f039191
...
...
@@ -272,6 +272,9 @@
//保存信息
$
(
"
#saveRole
"
).
off
(
"
click
"
).
on
(
"
click
"
,
function
()
{
if
(
!
$
(
'
#roleFM
'
).
form
(
'
validate
'
)){
return
;
}
if
(
checkRoleName
())
{
return
;
}
...
...
erp_web/pages/manage/vendor.html
View file @
6f039191
...
...
@@ -52,18 +52,18 @@
</div>
<table
id=
"tableData"
style=
"top:300px;border-bottom-color:#FFFFFF"
></table>
</div>
<div
id=
"supplierDlg"
class=
"easyui-dialog"
style=
"
width:580px;
padding:10px
2
0px"
<div
id=
"supplierDlg"
class=
"easyui-dialog"
style=
"padding:10px
4
0px"
fit=
"true"
closed=
"true"
buttons=
"#dlg-buttons"
modal=
"true"
collapsible=
"false"
closable=
"true"
>
<form
id=
"supplierFM"
>
<table>
<tr>
<td
style=
"width:
8
0px;height: 20px"
>
名称
</td>
<td
style=
"width:
18
0px;padding:5px"
>
<td
style=
"width:
12
0px;height: 20px"
>
名称
</td>
<td
style=
"width:
25
0px;padding:5px"
>
<input
name=
"supplier"
id=
"supplier"
class=
"easyui-textbox"
data-options=
"required:true,validType:'length[2,30]'"
style=
"width: 160px;"
/>
</td>
<td
style=
"width:
6
0px;height: 20px"
>
联系人
</td>
<td
style=
"width:
18
0px;padding:5px;"
>
<td
style=
"width:
12
0px;height: 20px"
>
联系人
</td>
<td
style=
"width:
25
0px;padding:5px;"
>
<input
name=
"contacts"
id=
"contacts"
class=
"easyui-textbox"
style=
"width: 160px;"
/>
</td>
</tr>
...
...
@@ -134,13 +134,13 @@
<tr>
<td>
地址
</td>
<td
style=
"padding:5px"
colspan=
"3"
>
<input
name=
"address"
id=
"address"
class=
"easyui-textbox"
style=
"width:
401
px;"
/>
<input
name=
"address"
id=
"address"
class=
"easyui-textbox"
style=
"width:
530
px;"
/>
</td>
</tr>
<tr>
<td>
备注
</td>
<td
style=
"padding:5px"
colspan=
"3"
>
<input
name=
"description"
id=
"description"
class=
"easyui-textbox"
data-options=
"multiline:true"
style=
"width:
401
px;height: 40px;"
/>
<input
name=
"description"
id=
"description"
class=
"easyui-textbox"
data-options=
"multiline:true"
style=
"width:
530
px;height: 40px;"
/>
</td>
</tr>
</table>
...
...
erp_web/pages/materials/person.html
View file @
6f039191
...
...
@@ -345,6 +345,9 @@
//保存信息
$
(
"
#savePerson
"
).
off
(
"
click
"
).
on
(
"
click
"
,
function
()
{
if
(
!
$
(
'
#personFM
'
).
form
(
'
validate
'
)){
return
;
}
if
(
!
$
(
"
#Type
"
).
val
())
{
$
.
messager
.
alert
(
'
提示
'
,
'
请选择类型!
'
,
'
warning
'
);
return
;
...
...
src/main/java/com/jsh/erp/service/role/RoleComponent.java
View file @
6f039191
...
...
@@ -65,7 +65,7 @@ public class RoleComponent implements ICommonQuery {
@Override
public
int
checkIsNameExist
(
Long
id
,
String
name
)
throws
Exception
{
return
0
;
return
roleService
.
checkIsNameExist
(
id
,
name
)
;
}
}
src/main/java/com/jsh/erp/service/role/RoleService.java
View file @
6f039191
...
...
@@ -136,6 +136,18 @@ public class RoleService {
return
result
;
}
public
int
checkIsNameExist
(
Long
id
,
String
name
)
throws
Exception
{
RoleExample
example
=
new
RoleExample
();
example
.
createCriteria
().
andIdNotEqualTo
(
id
).
andNameEqualTo
(
name
).
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
List
<
Role
>
list
=
null
;
try
{
list
=
roleMapper
.
selectByExample
(
example
);
}
catch
(
Exception
e
){
JshException
.
readFail
(
logger
,
e
);
}
return
list
==
null
?
0
:
list
.
size
();
}
public
List
<
Role
>
findUserRole
()
throws
Exception
{
RoleExample
example
=
new
RoleExample
();
example
.
setOrderByClause
(
"Id"
);
...
...
Write
Preview
Supports
Markdown
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