Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
registration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
13
Issues
13
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
丁伟
registration
Commits
78da22b6
Commit
78da22b6
authored
Apr 28, 2021
by
丁伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、增加多次报名科目功能
parent
140dad81
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
443 additions
and
125 deletions
+443
-125
docker-compose.yml
+24
-0
src/main/java/org/ccpit/base/controller/UploadFileController.java
+26
-1
src/main/java/org/ccpit/business/registerManage/IndexController.java
+62
-32
src/main/java/org/ccpit/business/registerManage/RegisterController.java
+52
-0
src/main/java/org/ccpit/business/registerManage/SubjectInfo.java
+25
-0
src/main/java/org/ccpit/business/registerManage/SubjectInfoService.java
+1
-1
src/main/resources/framework.properties
+9
-1
src/main/webapp/WEB-INF/jsp/business/registerInfoListPage.jsp
+0
-0
src/main/webapp/WEB-INF/jsp/front/info.jsp
+29
-10
src/main/webapp/resource/business/registration.js
+140
-25
src/main/webapp/resource/front/js/info.js
+74
-54
src/main/webapp/resource/front/js/photoUpload.js
+1
-1
No files found.
docker-compose.yml
0 → 100644
View file @
78da22b6
version
:
'
3'
services
:
mysql
:
environment
:
MYSQL_ROOT_PASSWORD
:
root
image
:
itc/mariadb:10.2
volumes
:
-
/dockerv/ccpit.org/itc/registration/database:/var/lib/mysql
command
:
mysqld --lower_case_table_names=1
web
:
depends_on
:
-
mysql
image
:
itc/tomcat:8.5-jre8
volumes
:
-
./web:/usr/local/tomcat/webapps/ROOT
-
./logs:/logs
- ./upload.peixunbaoming.ccpit.org:/data/vhosts/upload.peixunbaoming.ccpit.org
ports
:
-
"
30070:8080"
src/main/java/org/ccpit/base/controller/UploadFileController.java
View file @
78da22b6
...
@@ -31,10 +31,14 @@ import org.apache.commons.fileupload.FileUploadException;
...
@@ -31,10 +31,14 @@ import org.apache.commons.fileupload.FileUploadException;
import
org.apache.commons.fileupload.ProgressListener
;
import
org.apache.commons.fileupload.ProgressListener
;
import
org.apache.commons.fileupload.disk.DiskFileItemFactory
;
import
org.apache.commons.fileupload.disk.DiskFileItemFactory
;
import
org.apache.commons.fileupload.servlet.ServletFileUpload
;
import
org.apache.commons.fileupload.servlet.ServletFileUpload
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.ccpit.base.utils.ReadConfigUtil
;
import
org.ccpit.base.utils.ReadConfigUtil
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.util.FileCopyUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
/**
/**
...
@@ -95,7 +99,7 @@ public class UploadFileController extends BaseController {
...
@@ -95,7 +99,7 @@ public class UploadFileController extends BaseController {
Map
<
String
,
Object
>
result
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
result
=
new
HashMap
<
String
,
Object
>();
String
file
=
uploadFile
(
request
);
String
file
=
uploadFile
(
request
);
result
.
put
(
"message"
,
!
StringUtils
.
isEmpty
(
file
));
result
.
put
(
"message"
,
!
StringUtils
.
isEmpty
(
file
));
result
.
put
(
"fileSavePath"
,
DOWNLOADFILEPATH
+
file
);
result
.
put
(
"fileSavePath"
,
file
);
return
result
;
return
result
;
}
}
...
@@ -248,4 +252,25 @@ public class UploadFileController extends BaseController {
...
@@ -248,4 +252,25 @@ public class UploadFileController extends BaseController {
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
@RequestMapping
(
value
=
"show"
)
public
ResponseEntity
<
byte
[]>
show
(
@RequestParam
(
"path"
)
String
path
,
HttpServletResponse
response
)
{
try
{
// IE could not read ResponseEntity
if
(
StringUtils
.
isNotBlank
(
path
))
{
File
imageFile
=
new
File
(
this
.
UPLOADFILEPATH
,
path
);
if
(
imageFile
.
exists
())
{
response
.
setHeader
(
"Pragma"
,
"No-cache"
);
response
.
setHeader
(
"Cache-Control"
,
"No-cache"
);
//response.setHeader("Content-Type", MediaType.IMAGE_JPEG_VALUE);
response
.
setContentLength
((
int
)
imageFile
.
length
());
response
.
setContentType
(
"image/"
+
path
.
substring
(
path
.
lastIndexOf
(
'.'
)
+
1
));
FileCopyUtils
.
copy
(
FileUtils
.
readFileToByteArray
(
imageFile
),
response
.
getOutputStream
());
}
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
}
}
src/main/java/org/ccpit/business/registerManage/IndexController.java
View file @
78da22b6
...
@@ -72,18 +72,18 @@ public class IndexController extends BaseController {
...
@@ -72,18 +72,18 @@ public class IndexController extends BaseController {
}
}
return
new
ModelAndView
(
"front/login"
);
return
new
ModelAndView
(
"front/login"
);
}
}
/**
//
/**
* 跳转去登录页
//
* 跳转去登录页
* @return
//
* @return
*/
//
*/
@RequestMapping
(
value
=
"/loginp2"
,
method
=
RequestMethod
.
GET
)
//
@RequestMapping(value="/loginp2",method=RequestMethod.GET)
public
ModelAndView
loginPage2
(){
//
public ModelAndView loginPage2(){
if
(
check
()!=
null
){
//
if (check()!=null){
ModelAndView
mv
=
new
ModelAndView
(
"front/error"
);
//
ModelAndView mv = new ModelAndView("front/error");
return
mv
;
//
return mv;
}
//
}
return
new
ModelAndView
(
"front/login2"
);
//
return new ModelAndView("front/login2");
}
//
}
/**
/**
* 跳转去注册页
* 跳转去注册页
* @return
* @return
...
@@ -111,23 +111,23 @@ public class IndexController extends BaseController {
...
@@ -111,23 +111,23 @@ public class IndexController extends BaseController {
* 跳转去注册页
* 跳转去注册页
* @return
* @return
*/
*/
@RequestMapping
(
value
=
"/regp2"
,
method
=
RequestMethod
.
GET
)
//
@RequestMapping(value="/regp2",method=RequestMethod.GET)
public
ModelAndView
regPage2
(){
//
public ModelAndView regPage2(){
if
(
check
()!=
null
){
//
if (check()!=null){
ModelAndView
mv
=
new
ModelAndView
(
"front/error"
);
//
ModelAndView mv = new ModelAndView("front/error");
return
mv
;
//
return mv;
}
//
}
ModelAndView
mv
=
new
ModelAndView
(
"front/reg2"
);
//
ModelAndView mv = new ModelAndView("front/reg2");
List
<
Metadata
>
encityType
=
metadataService
.
getMetadatasByType2
(
"encityType"
);
//
List<Metadata> encityType = metadataService.getMetadatasByType2("encityType");
List
<
Metadata
>
subject
=
metadataService
.
getMetadatasByType2
(
"subject2"
);
//
List<Metadata> subject = metadataService.getMetadatasByType2("subject2");
List
<
Metadata
>
engender
=
metadataService
.
getMetadatasByType2
(
"engender"
);
//
List<Metadata> engender = metadataService.getMetadatasByType2("engender");
List
<
Metadata
>
invoiceType
=
metadataService
.
getMetadatasByType2
(
"invoiceType"
);
//
List<Metadata> invoiceType = metadataService.getMetadatasByType2("invoiceType");
mv
.
addObject
(
"encityType"
,
encityType
);
//
mv.addObject("encityType",encityType);
mv
.
addObject
(
"invoiceType"
,
invoiceType
);
//
mv.addObject("invoiceType",invoiceType);
mv
.
addObject
(
"subject"
,
subject
);
//
mv.addObject("subject",subject);
mv
.
addObject
(
"engender"
,
engender
);
//
mv.addObject("engender",engender);
return
mv
;
//
return mv;
}
//
}
/**
/**
* 跳转去个人信息页
* 跳转去个人信息页
* @return
* @return
...
@@ -147,7 +147,11 @@ public class IndexController extends BaseController {
...
@@ -147,7 +147,11 @@ public class IndexController extends BaseController {
RegisterInfo
reg
=
registerService
.
queryRegisterById
(
registerInfo
.
getId
());
RegisterInfo
reg
=
registerService
.
queryRegisterById
(
registerInfo
.
getId
());
mv
.
addObject
(
"registerInfo"
,
reg
);
mv
.
addObject
(
"registerInfo"
,
reg
);
}
}
List
<
SubjectInfo
>
subjectInfos
=
subjectInfoService
.
queryList
(
"from SubjectInfo where registerInfo_id = "
+
registerInfo
.
getId
());
SubjectInfo
sub_info
=
new
SubjectInfo
();
sub_info
.
setId
(
registerInfo
.
getId
());
sub_info
.
setSubject
(
registerInfo
.
getSubject
());
subjectInfos
.
add
(
sub_info
);
List
<
Metadata
>
status
=
metadataService
.
getMetadatasByType2
(
"status"
);
List
<
Metadata
>
status
=
metadataService
.
getMetadatasByType2
(
"status"
);
List
<
Metadata
>
status2
=
metadataService
.
getMetadatasByType2
(
"status2"
);
List
<
Metadata
>
status2
=
metadataService
.
getMetadatasByType2
(
"status2"
);
List
<
Metadata
>
invoiceType
=
metadataService
.
getMetadatasByType2
(
"invoiceType"
);
List
<
Metadata
>
invoiceType
=
metadataService
.
getMetadatasByType2
(
"invoiceType"
);
...
@@ -160,6 +164,7 @@ public class IndexController extends BaseController {
...
@@ -160,6 +164,7 @@ public class IndexController extends BaseController {
mv
.
addObject
(
"subject"
,
subject
);
mv
.
addObject
(
"subject"
,
subject
);
mv
.
addObject
(
"subject2"
,
subject2
);
mv
.
addObject
(
"subject2"
,
subject2
);
mv
.
addObject
(
"registerType"
,
registerType
);
mv
.
addObject
(
"registerType"
,
registerType
);
mv
.
addObject
(
"subjectInfos"
,
subjectInfos
);
return
mv
;
return
mv
;
}
}
...
@@ -169,16 +174,41 @@ public class IndexController extends BaseController {
...
@@ -169,16 +174,41 @@ public class IndexController extends BaseController {
*/
*/
@RequestMapping
(
"/saveCertificateId"
)
@RequestMapping
(
"/saveCertificateId"
)
public
Object
saveCertificateId
(
HttpServletRequest
request
){
public
Object
saveCertificateId
(
HttpServletRequest
request
){
RegisterInfo
registerInfo
=
(
RegisterInfo
)
request
.
getSession
().
getAttribute
(
"registerInfo"
);
String
img1
=
request
.
getParameter
(
"img1"
);
String
img1
=
request
.
getParameter
(
"img1"
);
String
img2
=
request
.
getParameter
(
"img2"
);
String
img2
=
request
.
getParameter
(
"img2"
);
String
img3
=
request
.
getParameter
(
"img3"
);
String
img3
=
request
.
getParameter
(
"img3"
);
String
obj_id
=
request
.
getParameter
(
"obj_id"
);
RegisterInfo
registerInfo
=
registerService
.
queryRegisterById
(
Long
.
valueOf
(
obj_id
));
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
if
(
null
!=
registerInfo
){
registerInfo
.
setImg1
(
img1
);
registerInfo
.
setImg1
(
img1
);
registerInfo
.
setImg2
(
img2
);
registerInfo
.
setImg2
(
img2
);
registerInfo
.
setImg3
(
img3
);
registerInfo
.
setImg3
(
img3
);
boolean
result
=
registerService
.
updateRegisterInfo
(
registerInfo
);
boolean
result
=
registerService
.
updateRegisterInfo
(
registerInfo
);
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"result"
,
result
);
map
.
put
(
"result"
,
result
);
}
SubjectInfo
subjectInfo
=
subjectInfoService
.
querySubjectInfoById
(
Long
.
valueOf
(
obj_id
));
if
(
null
!=
subjectInfo
){
subjectInfo
.
setImg1
(
img1
);
subjectInfo
.
setImg2
(
img2
);
subjectInfo
.
setImg3
(
img3
);
boolean
result
=
subjectInfoService
.
updateSubjectInfo
(
subjectInfo
);
map
.
put
(
"result"
,
result
);
}
return
map
;
}
@RequestMapping
(
"/getObj"
)
public
Object
getObj
(
HttpServletRequest
request
){
String
obj_id
=
request
.
getParameter
(
"obj_id"
);
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
RegisterInfo
registerInfo
=
registerService
.
queryRegisterById
(
Long
.
valueOf
(
obj_id
));
if
(
null
!=
registerInfo
){
map
.
put
(
"obj"
,
registerInfo
);
}
SubjectInfo
subjectInfo
=
subjectInfoService
.
querySubjectInfoById
(
Long
.
valueOf
(
obj_id
));
if
(
null
!=
subjectInfo
){
map
.
put
(
"obj"
,
subjectInfo
);
}
return
map
;
return
map
;
}
}
...
...
src/main/java/org/ccpit/business/registerManage/RegisterController.java
View file @
78da22b6
...
@@ -78,6 +78,7 @@ public class RegisterController extends BaseController {
...
@@ -78,6 +78,7 @@ public class RegisterController extends BaseController {
mv
.
addObject
(
"phases"
,
JSON
.
toJSON
(
phaseService
.
queryAll
()));
mv
.
addObject
(
"phases"
,
JSON
.
toJSON
(
phaseService
.
queryAll
()));
return
mv
;
return
mv
;
}
}
@RequestMapping
(
"/addOrUpdateRegisterInfo"
)
@RequestMapping
(
"/addOrUpdateRegisterInfo"
)
public
Object
addOrUpdateRegisterInfo
(
HttpServletRequest
request
,
RegisterInfo
registerInfo
,
String
operate
,
HttpServletResponse
response
)
{
public
Object
addOrUpdateRegisterInfo
(
HttpServletRequest
request
,
RegisterInfo
registerInfo
,
String
operate
,
HttpServletResponse
response
)
{
boolean
success
=
false
;
boolean
success
=
false
;
...
@@ -121,6 +122,39 @@ public class RegisterController extends BaseController {
...
@@ -121,6 +122,39 @@ public class RegisterController extends BaseController {
return
null
;
return
null
;
}
}
@RequestMapping
(
"/updateSubject"
)
public
Object
updateSubject
(
HttpServletRequest
request
,
SubjectInfo
subjectInfo
,
HttpServletResponse
response
,
Long
id
)
{
boolean
success
=
false
;
SubjectInfo
old_subjectInfo
=
subjectInfoService
.
querySubjectInfoById
(
id
);
if
(
old_subjectInfo
!=
null
){
old_subjectInfo
.
setAddressName
(
subjectInfo
.
getAddressName
());
old_subjectInfo
.
setAppreciationTaxType
(
subjectInfo
.
getAppreciationTaxType
());
old_subjectInfo
.
setBankAccount
(
subjectInfo
.
getBankAccount
());
old_subjectInfo
.
setBankAddress
(
subjectInfo
.
getBankAddress
());
old_subjectInfo
.
setInvoiceType
(
subjectInfo
.
getInvoiceType
());
old_subjectInfo
.
setInvoiceTitle
(
subjectInfo
.
getInvoiceTitle
());
old_subjectInfo
.
setModifyTime
(
new
Date
());
old_subjectInfo
.
setPayTime
(
subjectInfo
.
getPayTime
());
old_subjectInfo
.
setRegisterStatus
(
subjectInfo
.
getRegisterStatus
());
old_subjectInfo
.
setRemark
(
subjectInfo
.
getRemark
());
old_subjectInfo
.
setSubject
(
subjectInfo
.
getSubject
());
old_subjectInfo
.
setTaxIssue
(
subjectInfo
.
getTaxIssue
());
old_subjectInfo
.
setTaxpayerNum
(
subjectInfo
.
getTaxpayerNum
());
old_subjectInfo
.
setTelephone
(
subjectInfo
.
getTelephone
());
success
=
subjectInfoService
.
updateSubjectInfo
(
old_subjectInfo
);
}
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"flag"
,
success
);
map
.
put
(
"info"
,
success
?
"保存成功"
:
"保存失败"
);
try
{
response
.
getWriter
().
print
(
"{flag:"
+
success
+
",info:'"
+
(
success
?
"保存成功"
:
"保存失败"
)+
"'}"
);
}
catch
(
IOException
e
)
{
}
return
null
;
}
@RequestMapping
(
"/queryAllRegisterInfo"
)
@RequestMapping
(
"/queryAllRegisterInfo"
)
public
Object
queryAllRegisterInfo
(
HttpServletRequest
request
,
String
name
,
String
status
,
String
status2
,
String
subject
,
String
subject2
,
Long
phase
)
{
public
Object
queryAllRegisterInfo
(
HttpServletRequest
request
,
String
name
,
String
status
,
String
status2
,
String
subject
,
String
subject2
,
Long
phase
)
{
PageRequest
pageRequest
=
getPage
(
request
);
PageRequest
pageRequest
=
getPage
(
request
);
...
@@ -175,6 +209,14 @@ public class RegisterController extends BaseController {
...
@@ -175,6 +209,14 @@ public class RegisterController extends BaseController {
return
registerService
.
queryRegisterById
(
Long
.
valueOf
(
registerInfoId
));
return
registerService
.
queryRegisterById
(
Long
.
valueOf
(
registerInfoId
));
}
}
@RequestMapping
(
"/querySubjectById"
)
public
SubjectInfo
query_subject_by_id
(
HttpServletRequest
request
,
HttpServletResponse
response
,
long
id
)
{
response
.
setHeader
(
"expires"
,
"0"
);
response
.
setHeader
(
"cache-control"
,
"max-age=0"
);
response
.
setHeader
(
"Pragma"
,
"no-cache"
);
return
subjectInfoService
.
querySubjectInfoById
(
id
);
}
@RequestMapping
(
"/deleteByIds"
)
@RequestMapping
(
"/deleteByIds"
)
public
Object
deleteRegisters
(
HttpServletRequest
request
){
public
Object
deleteRegisters
(
HttpServletRequest
request
){
String
ids
=
request
.
getParameter
(
"ids"
);
String
ids
=
request
.
getParameter
(
"ids"
);
...
@@ -184,6 +226,16 @@ public class RegisterController extends BaseController {
...
@@ -184,6 +226,16 @@ public class RegisterController extends BaseController {
map
.
put
(
"flag"
,
success
);
map
.
put
(
"flag"
,
success
);
return
map
;
return
map
;
}
}
@RequestMapping
(
"/delete_subject_ById"
)
public
Object
delete_subject_ById
(
HttpServletRequest
request
){
String
id
=
request
.
getParameter
(
"id"
);
boolean
success
=
subjectInfoService
.
deleteSubjectInfos
(
Long
.
valueOf
(
id
));
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"flag"
,
success
);
return
map
;
}
@RequestMapping
(
"/updateStatus"
)
@RequestMapping
(
"/updateStatus"
)
public
Object
updateStatus
(
HttpServletRequest
request
){
public
Object
updateStatus
(
HttpServletRequest
request
){
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
...
...
src/main/java/org/ccpit/business/registerManage/SubjectInfo.java
View file @
78da22b6
...
@@ -39,6 +39,14 @@ public class SubjectInfo implements Serializable {
...
@@ -39,6 +39,14 @@ public class SubjectInfo implements Serializable {
*/
*/
private
Integer
appreciationTaxType
;
private
Integer
appreciationTaxType
;
/**
/**
* 发票类型 :CDCS考试费 | 培训费 | 培训服务费
*/
private
Integer
invoiceType
;
/**
* 发票抬头
*/
private
String
invoiceTitle
;
/**
* 发票 纳税人识别号
* 发票 纳税人识别号
*/
*/
private
String
taxpayerNum
;
private
String
taxpayerNum
;
...
@@ -236,7 +244,24 @@ public class SubjectInfo implements Serializable {
...
@@ -236,7 +244,24 @@ public class SubjectInfo implements Serializable {
return
modifyTime
;
return
modifyTime
;
}
}
public
Integer
getInvoiceType
()
{
return
invoiceType
;
}
public
void
setInvoiceType
(
Integer
invoiceType
)
{
this
.
invoiceType
=
invoiceType
;
}
public
void
setModifyTime
(
Date
modifyTime
)
{
public
void
setModifyTime
(
Date
modifyTime
)
{
this
.
modifyTime
=
modifyTime
;
this
.
modifyTime
=
modifyTime
;
}
}
public
String
getInvoiceTitle
()
{
return
invoiceTitle
;
}
public
void
setInvoiceTitle
(
String
invoiceTitle
)
{
this
.
invoiceTitle
=
invoiceTitle
;
}
}
}
src/main/java/org/ccpit/business/registerManage/SubjectInfoService.java
View file @
78da22b6
...
@@ -43,7 +43,7 @@ public class SubjectInfoService {
...
@@ -43,7 +43,7 @@ public class SubjectInfoService {
return
subjectInfoDao
.
deleteById
(
id
);
return
subjectInfoDao
.
deleteById
(
id
);
}
}
public
SubjectInfo
query
Register
ById
(
long
id
)
{
public
SubjectInfo
query
SubjectInfo
ById
(
long
id
)
{
return
subjectInfoDao
.
queryById
(
id
);
return
subjectInfoDao
.
queryById
(
id
);
}
}
...
...
src/main/resources/framework.properties
View file @
78da22b6
# jdbc.X
# jdbc.X
jdbc.driverClassName
=
com.mysql.jdbc.Driver
jdbc.driverClassName
=
com.mysql.jdbc.Driver
# 生产环境 docker 环境下一定要注意 将localhost 换成mysql
#jdbc.url=jdbc:mysql://mysql:3306/registration?createDatabaseIfNotExist=true&characterEncoding=utf-8
#jdbc.user=root
#jdbc.pass=root
# 开发环境
jdbc.url
=
jdbc:mysql://localhost:3306/registration?createDatabaseIfNotExist=true&characterEncoding=utf-8
jdbc.url
=
jdbc:mysql://localhost:3306/registration?createDatabaseIfNotExist=true&characterEncoding=utf-8
jdbc.user
=
ccpit
jdbc.user
=
ccpit
jdbc.pass
=
ccpit1516
jdbc.pass
=
ccpit1516
...
@@ -12,5 +17,8 @@ hibernate.hbm2ddl.auto=update
...
@@ -12,5 +17,8 @@ hibernate.hbm2ddl.auto=update
#email
#email
email.name
=
passwordcdcs@ccpit.org
email.name
=
passwordcdcs@ccpit.org
email.password
=
Ccoic208
email.password
=
Ccoic208
8
email.smtp
=
smtp.exmail.qq.com
email.smtp
=
smtp.exmail.qq.com
system.uploadFilePath
=
/data/vhosts/upload.peixunbaoming.ccpit.org
system.downloadFilePath
=
/data/vhosts/upload.peixunbaoming.ccpit.org
src/main/webapp/WEB-INF/jsp/business/registerInfoListPage.jsp
View file @
78da22b6
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/jsp/front/info.jsp
View file @
78da22b6
...
@@ -64,10 +64,13 @@
...
@@ -64,10 +64,13 @@
<tr
name=
"trEmial"
>
<tr
name=
"trEmial"
>
<td
class=
"name"
width=
"25%"
style=
"font-weight: bold;font-size: 15px"
>
已报名科目:
</td>
<td
class=
"name"
width=
"25%"
style=
"font-weight: bold;font-size: 15px"
>
已报名科目:
</td>
<td>
<td>
<c:forEach
items=
"${subjectInfos}"
var=
"subj"
>
<c:forEach
items=
"${subject}"
var=
"s"
>
<c:forEach
items=
"${subject}"
var=
"s"
>
<c:if
test=
"${registerInfo.subject == s.dataNameId}"
>
${s.dataName}
</c:if>
<font
style=
"font-size: 14px"
><c:if
test=
"${subj.subject == s.dataNameId}"
>
${s.dataName}
<br></c:if></font>
</c:forEach>
</c:forEach>
</c:forEach>
</td>
</td>
</tr>
</tr>
</c:if>
</c:if>
<c:if
test=
"${!registerInfo.regType}"
>
<c:if
test=
"${!registerInfo.regType}"
>
...
@@ -172,7 +175,7 @@
...
@@ -172,7 +175,7 @@
</tr>
</tr>
<tr>
<tr>
<td
class=
"name"
>
发票抬头:
</td>
<td
class=
"name"
>
发票抬头:
</td>
<td>
${registerInfo.invoiceTitle}
</td>
<td
id=
"invoiceTitle_id"
>
${registerInfo.invoiceTitle}
</td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"name"
>
发票类型:
</td>
<td
class=
"name"
>
发票类型:
</td>
...
@@ -185,31 +188,31 @@
...
@@ -185,31 +188,31 @@
<c:if
test=
"${registerInfo.appreciationTaxType == 2}"
>
<c:if
test=
"${registerInfo.appreciationTaxType == 2}"
>
<tr>
<tr>
<td
class=
"name"
>
纳税人识别号:
</td>
<td
class=
"name"
>
纳税人识别号:
</td>
<td>
${registerInfo.taxpayerNum}
</td>
<td
id=
"taxpayerNum_id"
>
${registerInfo.taxpayerNum}
</td>
</tr>
</tr>
</c:if>
</c:if>
<c:if
test=
"${registerInfo.appreciationTaxType == 2}"
>
<c:if
test=
"${registerInfo.appreciationTaxType == 2}"
>
<tr>
<tr>
<td
class=
"name"
>
公司地址:
</td>
<td
class=
"name"
>
公司地址:
</td>
<td>
${registerInfo.addressName}
</td>
<td
id=
"addressName_id"
>
${registerInfo.addressName}
</td>
</tr>
</tr>
</c:if>
</c:if>
<c:if
test=
"${registerInfo.appreciationTaxType == 2}"
>
<c:if
test=
"${registerInfo.appreciationTaxType == 2}"
>
<tr>
<tr>
<td
class=
"name"
>
公司电话:
</td>
<td
class=
"name"
>
公司电话:
</td>
<td>
${registerInfo.telephone}
</td>
<td
id=
"telephone_id"
>
${registerInfo.telephone}
</td>
</tr>
</tr>
</c:if>
</c:if>
<c:if
test=
"${registerInfo.appreciationTaxType == 2}"
>
<c:if
test=
"${registerInfo.appreciationTaxType == 2}"
>
<tr>
<tr>
<td
class=
"name"
>
开户行:
</td>
<td
class=
"name"
>
开户行:
</td>
<td>
${registerInfo.bankAddress}
</td>
<td
id=
"bankAddress_id"
>
${registerInfo.bankAddress}
</td>
</tr>
</tr>
</c:if>
</c:if>
<c:if
test=
"${registerInfo.appreciationTaxType == 2}"
>
<c:if
test=
"${registerInfo.appreciationTaxType == 2}"
>
<tr>
<tr>
<td
class=
"name"
>
银行账号:
</td>
<td
class=
"name"
>
银行账号:
</td>
<td>
${registerInfo.bankAccount}
</td>
<td
id=
"bankAccount_id"
>
${registerInfo.bankAccount}
</td>
</tr>
</tr>
</c:if>
</c:if>
<tr>
<tr>
...
@@ -259,7 +262,23 @@
...
@@ -259,7 +262,23 @@
<td
class=
"name"
>
COUNTRY:
</td>
<td
class=
"name"
>
COUNTRY:
</td>
<td>
中国
</td>
<td>
中国
</td>
</tr>
</tr>
<tr>
<td
class=
"title"
background=
"/resource/front/img/dh.gif"
height=
"24"
colspan=
"3"
>
查看/上传证书
</td>
</tr>
<tr>
<td
class=
"name"
>
选择科目
</td>
<td
align=
"left"
width=
"30%"
>
<select
id=
"choose_subject_id"
>
<c:forEach
items=
"${subjectInfos}"
var=
"subj"
>
<option
value=
"${subj.id}"
>
<c:forEach
items=
"${subject}"
var=
"s"
>
<c:if
test=
"${subj.subject == s.dataNameId}"
>
${s.dataName}
</c:if>
</c:forEach>
</option>
</c:forEach>
</select>
</td>
</tr>
<tr>
<tr>
<td
class=
"name"
>
证书照片1:
</td>
<td
class=
"name"
>
证书照片1:
</td>
<td
align=
"left"
width=
"30%"
>
<td
align=
"left"
width=
"30%"
>
...
@@ -343,7 +362,7 @@
...
@@ -343,7 +362,7 @@
<form
id=
"form"
>
<form
id=
"form"
>
<table
id=
"tabThesis"
name=
"tabThesis"
align=
"center"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
width=
"100%"
>
<table
id=
"tabThesis"
name=
"tabThesis"
align=
"center"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
width=
"100%"
>
<tbody><tr>
<tbody><tr>
<td
class=
"title"
background=
"/resource/front/img/dh.gif"
height=
"24"
>
参加
考试科目
</td>
<td
class=
"title"
background=
"/resource/front/img/dh.gif"
height=
"24"
>
报名
考试科目
</td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"body"
>
<td
class=
"body"
>
...
@@ -457,7 +476,7 @@
...
@@ -457,7 +476,7 @@
邮箱:training@ccpit.org
技术支持:中贸促信息技术有限责任公司
</p>
邮箱:training@ccpit.org
技术支持:中贸促信息技术有限责任公司
</p>
</div>
</div>
</div>
</div>
<
script
src=
"/resource/front/js/jquery.min.js"
type=
"text/javascript"
></script
>
<
%
--
<
script
src=
"/resource/front/js/jquery.min.js"
type=
"text/javascript"
></script>
--%
>
<script
src=
"/resource/front/js/jquery.form.min.js"
type=
"text/javascript"
></script>
<script
src=
"/resource/front/js/jquery.form.min.js"
type=
"text/javascript"
></script>
<script
src=
"/resource/front/js/jquery-ui-datepicker.js"
type=
"text/javascript"
></script>
<script
src=
"/resource/front/js/jquery-ui-datepicker.js"
type=
"text/javascript"
></script>
</body>
</body>
...
...
src/main/webapp/resource/business/registration.js
View file @
78da22b6
...
@@ -53,6 +53,7 @@ $(function() {
...
@@ -53,6 +53,7 @@ $(function() {
$
(
"#editStatusWinId"
).
window
(
'close'
);
$
(
"#editStatusWinId"
).
window
(
'close'
);
$
(
"#addEmailInfoWinId"
).
window
(
'close'
);
$
(
"#addEmailInfoWinId"
).
window
(
'close'
);
$
(
"#emailSendWinId"
).
window
(
'close'
);
$
(
"#emailSendWinId"
).
window
(
'close'
);
$
(
"#subjectWinId"
).
window
(
'close'
);
//初始状态是隐藏
//初始状态是隐藏
$
(
"#newsTypeId01"
).
hide
();
//无用
$
(
"#newsTypeId01"
).
hide
();
//无用
...
@@ -221,6 +222,7 @@ function subjectTableById(id){
...
@@ -221,6 +222,7 @@ function subjectTableById(id){
pagination
:
true
,
pagination
:
true
,
rownumbers
:
true
,
rownumbers
:
true
,
pageList
:
[
5
,
10
,
15
],
pageList
:
[
5
,
10
,
15
],
singleSelect
:
true
,
autoRowHeight
:
false
,
autoRowHeight
:
false
,
fitColumns
:
true
,
fitColumns
:
true
,
title
:
"用户报名科目列表"
,
title
:
"用户报名科目列表"
,
...
@@ -256,7 +258,7 @@ function subjectTableById(id){
...
@@ -256,7 +258,7 @@ function subjectTableById(id){
return
"增值税普通发票"
;
return
"增值税普通发票"
;
}
}
if
(
2
==
val
){
if
(
2
==
val
){
return
"
表示
增值税专用发票"
;
return
"增值税专用发票"
;
}
}
}
}
},
{
},
{
...
@@ -285,6 +287,7 @@ function subjectTableById(id){
...
@@ -285,6 +287,7 @@ function subjectTableById(id){
width
:
20
width
:
20
}]
],
}]
],
onDblClickRow
:
function
(
index
,
row
)
{
// 双击"任一行"执行
onDblClickRow
:
function
(
index
,
row
)
{
// 双击"任一行"执行
},
},
onLoadSuccess
:
function
(
data
)
{
// 加载成功之后执行
onLoadSuccess
:
function
(
data
)
{
// 加载成功之后执行
}
}
...
@@ -326,6 +329,43 @@ function initInputWidth(){
...
@@ -326,6 +329,43 @@ function initInputWidth(){
$
(
"#dcNumberId"
).
attr
(
"style"
,
"width:"
+
fixShortWidth
()
+
"px"
);
$
(
"#dcNumberId"
).
attr
(
"style"
,
"width:"
+
fixShortWidth
()
+
"px"
);
$
(
"#countryId"
).
attr
(
"style"
,
"width:"
+
fixShortWidth
()
+
"px"
);
$
(
"#countryId"
).
attr
(
"style"
,
"width:"
+
fixShortWidth
()
+
"px"
);
$
(
"#invoiceTitle_Id"
).
attr
(
"style"
,
"width:"
+
fixShortWidth
()
+
"px"
);
$
(
"#addressName_Id"
).
attr
(
"style"
,
"width:"
+
fixShortWidth
()
+
"px"
);
$
(
"#telephone_Id"
).
attr
(
"style"
,
"width:"
+
fixShortWidth
()
+
"px"
);
$
(
"#trTaxpayerNum_Id"
).
attr
(
"style"
,
"width:"
+
fixShortWidth
()
+
"px"
);
$
(
"#bankAddress_Id"
).
attr
(
"style"
,
"width:"
+
fixShortWidth
()
+
"px"
);
$
(
"#bankAccount_Id"
).
attr
(
"style"
,
"width:"
+
fixShortWidth
()
+
"px"
);
$
(
"#dcNumber_Id"
).
attr
(
"style"
,
"width:"
+
fixShortWidth
()
+
"px"
);
$
(
"#remarkId"
).
attr
(
"style"
,
"width:"
+
fixShortWidth
()
+
"px"
);
$
(
"#appreciationTaxType_Id"
).
combobox
({
width
:
fixShortWidth
()
+
4
,
panelHeight
:
'auto'
});
$
(
"#invoiceType_Id"
).
combobox
({
width
:
fixShortWidth
()
+
4
,
panelHeight
:
'auto'
});
$
(
"#subject_Id"
).
combobox
({
width
:
fixShortWidth
()
+
4
,
panelHeight
:
'auto'
});
$
(
"#registerStatus_Id"
).
combobox
({
width
:
fixShortWidth
()
+
4
,
panelHeight
:
'auto'
});
$
(
"#taxIssue_id"
).
combobox
({
width
:
fixShortWidth
()
+
4
,
panelHeight
:
'auto'
});
$
(
"#payTime_Id"
).
datebox
({
width
:
fixShortWidth
()
+
4
,
valueField
:
'id'
,
panelHeight
:
'auto'
,
textField
:
'text'
});
$
(
"#city_enId"
).
combobox
({
$
(
"#city_enId"
).
combobox
({
url
:
'/admin/metadataManage/getMetadatasList?dataType=encityType'
,
url
:
'/admin/metadataManage/getMetadatasList?dataType=encityType'
,
valueField
:
'id'
,
valueField
:
'id'
,
...
@@ -536,7 +576,7 @@ function openAddWin(){
...
@@ -536,7 +576,7 @@ function openAddWin(){
$
(
'#newsForm'
)[
0
].
reset
();
$
(
'#newsForm'
)[
0
].
reset
();
operation
=
"add"
;
operation
=
"add"
;
$
(
"#main_area"
).
height
(
addWinHeight
);
$
(
"#main_area
_01
"
).
height
(
addWinHeight
);
$
(
"#addNewsWinId"
).
window
({
$
(
"#addNewsWinId"
).
window
({
title
:
'新增报名信息'
,
title
:
'新增报名信息'
,
width
:
addWinWidth
,
width
:
addWinWidth
,
...
@@ -581,7 +621,8 @@ function formatDateField(selector,val){
...
@@ -581,7 +621,8 @@ function formatDateField(selector,val){
$
(
selector
).
datebox
(
"setValue"
,
d
.
format
(
"yyyy-MM-dd"
));
$
(
selector
).
datebox
(
"setValue"
,
d
.
format
(
"yyyy-MM-dd"
));
}
}
}
}
//打开修改窗口
//打开报名信息修改窗口
function
openEditWin
(){
function
openEditWin
(){
$
(
".certificatePhoto"
).
attr
(
"src"
,
""
);
$
(
".certificatePhoto"
).
attr
(
"src"
,
""
);
operation
=
"edit"
;
operation
=
"edit"
;
...
@@ -596,7 +637,7 @@ function openEditWin(){
...
@@ -596,7 +637,7 @@ function openEditWin(){
formatDateField
(
"#date1"
,
data
.
birthday
);
formatDateField
(
"#date1"
,
data
.
birthday
);
formatDateField
(
"#date2"
,
data
.
dateOfBirth
);
formatDateField
(
"#date2"
,
data
.
dateOfBirth
);
formatDateField
(
"#payTimeId"
,
data
.
payTime
);
formatDateField
(
"#payTimeId"
,
data
.
payTime
);
$
(
"#main_area"
).
height
((
bodyHeight
/
5
)
*
4
);
$
(
"#main_area
_01
"
).
height
((
bodyHeight
/
5
)
*
4
);
});
});
$
(
"#addNewsWinId"
).
window
({
$
(
"#addNewsWinId"
).
window
({
title
:
'修改报名信息'
,
title
:
'修改报名信息'
,
...
@@ -617,6 +658,68 @@ function openEditWin(){
...
@@ -617,6 +658,68 @@ function openEditWin(){
$
.
messager
.
alert
(
'提示'
,
'请选中一条记录'
,
'info'
);
$
.
messager
.
alert
(
'提示'
,
'请选中一条记录'
,
'info'
);
}
}
}
}
//打开报名科目修改窗口
function
open_subject_win
(){
$
(
".certificatePhoto"
).
attr
(
"src"
,
""
);
operation
=
"edit"
;
var
rows
=
$
(
'#subjectTable'
).
datagrid
(
'getSelections'
);
if
(
rows
.
length
==
1
){
var
row
=
$
(
'#subjectTable'
).
datagrid
(
'getSelected'
);
$
.
getJSON
(
"/admin/business/registerManage/querySubjectById?id="
+
row
.
id
,
function
(
data
)
{
$
(
"#subjectForm"
).
form
(
'load'
,
data
);
$
(
"#img_1"
).
attr
(
"src"
,
data
.
img1
);
$
(
"#img_2"
).
attr
(
"src"
,
data
.
img2
);
$
(
"#img_3"
).
attr
(
"src"
,
data
.
img3
);
formatDateField
(
"#payTime_Id"
,
data
.
payTime
);
$
(
"#main_area_05"
).
height
((
bodyHeight
/
5
)
*
4
);
});
$
(
"#subjectWinId"
).
window
({
title
:
'修改报名科目信息'
,
width
:
addWinWidth
,
height
:
addWinHeight
,
left
:
(
dataGridWidth
-
addWinWidth
)
/
2
,
top
:
(
bodyHeight
-
addWinHeight
)
/
2
,
closable
:
true
,
// 否显示关闭按钮
collapsible
:
false
,
// 是否显示折叠按钮
minimizable
:
false
,
// 是否显示最小化按钮
maximizable
:
false
,
// 是否显示最大化按钮
close
:
true
,
// 初始是否关闭
modal
:
true
});
$
(
"#saveButton01"
).
show
();
$
(
"#subjectWinId"
).
window
(
'open'
);
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选中一条记录'
,
'info'
);
}
}
function
closeSubjectWindow
()
{
$
(
"#subjectWinId"
).
window
(
'close'
);
$
(
"#subjectForm"
).
form
(
'clear'
);
}
function
saveSubjcetData
()
{
var
row
=
$
(
'#subjectTable'
).
datagrid
(
'getSelected'
);
url
=
"/admin/business/registerManage/updateSubject?id="
+
row
.
id
;
$
(
'#subjectForm'
).
form
(
'submit'
,{
url
:
url
,
onSubmit
:
function
(){
return
$
(
this
).
form
(
'validate'
);
},
success
:
function
(
data
){
var
data
=
eval
(
"("
+
data
+
")"
);
if
(
data
.
flag
){
$
.
messager
.
alert
(
'提示'
,
data
.
info
,
'ok'
);
closeWindow3
();
queryData
();
}
else
{
$
.
messager
.
alert
(
"提示"
,
data
.
info
,
'error'
);
}
}
});
}
//打开查看窗口
//打开查看窗口
function
viewData
(
id
){
function
viewData
(
id
){
$
(
".certificatePhoto"
).
attr
(
"src"
,
""
);
$
(
".certificatePhoto"
).
attr
(
"src"
,
""
);
...
@@ -629,7 +732,7 @@ function viewData(id){
...
@@ -629,7 +732,7 @@ function viewData(id){
formatDateField
(
"#date2"
,
data
.
dateOfBirth
);
formatDateField
(
"#date2"
,
data
.
dateOfBirth
);
formatDateField
(
"#payTimeId"
,
data
.
payTime
);
formatDateField
(
"#payTimeId"
,
data
.
payTime
);
});
});
$
(
"#main_area"
).
height
((
bodyHeight
/
5
)
*
4
);
$
(
"#main_area
_01
"
).
height
((
bodyHeight
/
5
)
*
4
);
$
(
"#addNewsWinId"
).
window
({
$
(
"#addNewsWinId"
).
window
({
title
:
'查看'
,
title
:
'查看'
,
width
:
addWinWidth
,
width
:
addWinWidth
,
...
@@ -650,25 +753,6 @@ function viewData(id){
...
@@ -650,25 +753,6 @@ function viewData(id){
//保存数据
//保存数据
function
saveData
(){
function
saveData
(){
var
url
=
""
;
var
url
=
""
;
if
(
'add'
==
operation
){
url
=
"/admin/business/registerManage/addOrUpdateRegisterInfo?operate="
+
operation
;
$
(
'#newsForm'
).
form
(
'submit'
,{
url
:
url
,
onSubmit
:
function
(){
return
$
(
this
).
form
(
'validate'
);
},
success
:
function
(
data
){
var
data
=
eval
(
"("
+
data
+
")"
);
if
(
data
.
flag
){
$
.
messager
.
alert
(
'提示'
,
data
.
info
,
'ok'
);
closeWindow
();
queryData
();
}
else
{
$
.
messager
.
alert
(
"提示"
,
data
.
info
,
'error'
);
}
}
});
}
if
(
'edit'
==
operation
){
if
(
'edit'
==
operation
){
var
row
=
$
(
'#registersTable'
).
datagrid
(
'getSelected'
);
var
row
=
$
(
'#registersTable'
).
datagrid
(
'getSelected'
);
url
=
"/admin/business/registerManage/addOrUpdateRegisterInfo?operate="
+
operation
+
"&id="
+
row
.
id
;
url
=
"/admin/business/registerManage/addOrUpdateRegisterInfo?operate="
+
operation
+
"&id="
+
row
.
id
;
...
@@ -717,6 +801,33 @@ function deleteNews(){
...
@@ -717,6 +801,33 @@ function deleteNews(){
}
}
}
}
//删除科目信息
function
delete_subject
(){
var
rows
=
$
(
'#subjectTable'
).
datagrid
(
'getSelections'
);
if
(
rows
.
length
!=
0
){
var
jsonIds
=
arrayTojson
(
rows
);
$
.
messager
.
confirm
(
"删除"
,
"确定删除?"
,
function
(
r
){
if
(
r
){
var
postUrl
=
'/admin/business/registerManage/delete_subject_ById'
;
$
.
post
(
postUrl
,{
"ids"
:
jsonIds
},
function
(
result
){
if
(
result
.
flag
){
$
.
messager
.
alert
(
'提示'
,
"数据删除成功!"
,
'ok'
);
initDataTable
();
}
else
{
$
.
messager
.
alert
(
'提示'
,
"数据删除失败!"
,
'error'
);
initDataTable
();
return
;
}
},
'json'
);
}
});
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选中一条要删除记录'
,
'info'
);
}
}
/**
/**
* id数组转换为json字符串
* id数组转换为json字符串
*/
*/
...
@@ -738,7 +849,7 @@ function arrayTojson(arr) {
...
@@ -738,7 +849,7 @@ function arrayTojson(arr) {
function
openEmailWin
()
{
function
openEmailWin
()
{
rows
=
$
(
'#registersTable'
).
datagrid
(
'getSelections'
);
rows
=
$
(
'#registersTable'
).
datagrid
(
'getSelections'
);
if
(
rows
.
length
!=
0
){
if
(
rows
.
length
!=
0
){
$
(
"#main_area"
).
height
(
addWinHeight
);
$
(
"#main_area
_02
"
).
height
(
addWinHeight
);
$
(
"#addEmailInfoWinId"
).
window
({
$
(
"#addEmailInfoWinId"
).
window
({
title
:
'新增邮件信息'
,
title
:
'新增邮件信息'
,
resizable
:
false
,
resizable
:
false
,
...
@@ -800,3 +911,7 @@ function closeWindow2(){
...
@@ -800,3 +911,7 @@ function closeWindow2(){
$
(
"#editStatusWinId"
).
window
(
'close'
);
$
(
"#editStatusWinId"
).
window
(
'close'
);
}
}
//关闭窗口
function
closeWindow3
(){
$
(
"#subjectWinId"
).
window
(
'close'
);
}
src/main/webapp/resource/front/js/info.js
View file @
78da22b6
$
(
function
()
{
$
(
function
()
{
$
(
"#appreciationTaxTypeId"
).
change
(
function
()
{
$
(
"#appreciationTaxTypeId"
).
change
(
function
()
{
var
appreciationTaxType
=
$
(
"#appreciationTaxTypeId"
).
find
(
"option:selected"
).
val
();
var
appreciationTaxType
=
$
(
"#appreciationTaxTypeId"
).
find
(
"option:selected"
).
val
();
if
(
"1"
==
appreciationTaxType
)
{
if
(
"1"
==
appreciationTaxType
)
{
$
(
"#companyNameId"
).
css
(
"display"
,
""
);
$
(
"#companyNameId"
).
css
(
"display"
,
""
);
$
(
"#subjectNameId"
).
css
(
"display"
,
""
);
$
(
"#subjectNameId"
).
css
(
"display"
,
""
);
$
(
"#taxpayerNumId"
).
css
(
"display"
,
""
);
$
(
"#taxpayerNumId"
).
css
(
"display"
,
""
);
$
(
"#addressNameId"
).
css
(
"display"
,
"none"
);
$
(
"#addressNameId"
).
css
(
"display"
,
"none"
);
$
(
"#telephoneId"
).
css
(
"display"
,
"none"
);
$
(
"#telephoneId"
).
css
(
"display"
,
"none"
);
$
(
"#bankAddressId"
).
css
(
"display"
,
"none"
);
$
(
"#bankAddressId"
).
css
(
"display"
,
"none"
);
$
(
"#bankAccountId"
).
css
(
"display"
,
"none"
);
$
(
"#bankAccountId"
).
css
(
"display"
,
"none"
);
$
(
"#taxpayerNumId01"
).
removeAttr
(
"class"
);
$
(
"#taxpayerNumId01"
).
removeAttr
(
"class"
);
$
(
"#addressNameId01"
).
removeAttr
(
"class"
);
$
(
"#addressNameId01"
).
removeAttr
(
"class"
);
$
(
"#telephoneId01"
).
removeAttr
(
"class"
);
$
(
"#telephoneId01"
).
removeAttr
(
"class"
);
$
(
"#bankAddressId01"
).
removeAttr
(
"class"
);
$
(
"#bankAddressId01"
).
removeAttr
(
"class"
);
$
(
"#bankAccountId01"
).
removeAttr
(
"class"
);
$
(
"#bankAccountId01"
).
removeAttr
(
"class"
);
}
else
if
(
"2"
==
appreciationTaxType
){
$
(
"#companyNameId01"
).
val
(
$
(
"#invoiceTitle_id"
).
text
());
$
(
"#companyNameId"
).
css
(
"display"
,
""
);
$
(
"#taxpayerNumId01"
).
val
(
$
(
"#taxpayerNum_id"
).
text
());
$
(
"#subjectNameId"
).
css
(
"display"
,
""
);
}
else
if
(
"2"
==
appreciationTaxType
)
{
$
(
"#taxpayerNumId"
).
css
(
"display"
,
""
);
$
(
"#companyNameId"
).
css
(
"display"
,
""
);
$
(
"#addressNameId"
).
css
(
"display"
,
""
);
$
(
"#subjectNameId"
).
css
(
"display"
,
""
);
$
(
"#telephoneId"
).
css
(
"display"
,
""
);
$
(
"#taxpayerNumId"
).
css
(
"display"
,
""
);
$
(
"#bankAddressId"
).
css
(
"display"
,
""
);
$
(
"#addressNameId"
).
css
(
"display"
,
""
);
$
(
"#bankAccountId"
).
css
(
"display"
,
""
);
$
(
"#telephoneId"
).
css
(
"display"
,
""
);
$
(
"#taxpayerNumId01"
).
attr
(
"class"
,
"required"
);
$
(
"#bankAddressId"
).
css
(
"display"
,
""
);
$
(
"#addressNameId01"
).
attr
(
"class"
,
"required"
);
$
(
"#bankAccountId"
).
css
(
"display"
,
""
);
$
(
"#telephoneId01"
).
attr
(
"class"
,
"required"
);
$
(
"#taxpayerNumId01"
).
attr
(
"class"
,
"required"
);
$
(
"#bankAddressId01"
).
attr
(
"class"
,
"required"
);
$
(
"#addressNameId01"
).
attr
(
"class"
,
"required"
);
$
(
"#bankAccountId01"
).
attr
(
"class"
,
"required"
);
$
(
"#telephoneId01"
).
attr
(
"class"
,
"required"
);
}
else
{
$
(
"#bankAddressId01"
).
attr
(
"class"
,
"required"
);
$
(
"#companyNameId"
).
css
(
"display"
,
"none"
);
$
(
"#bankAccountId01"
).
attr
(
"class"
,
"required"
);
$
(
"#subjectNameId"
).
css
(
"display"
,
"none"
);
$
(
"#companyNameId01"
).
val
(
$
(
"#invoiceTitle_id"
).
text
());
$
(
"#taxpayerNumId"
).
css
(
"display"
,
"none"
);
$
(
"#taxpayerNumId01"
).
val
(
$
(
"#taxpayerNum_id"
).
text
());
$
(
"#addressNameId"
).
css
(
"display"
,
"none"
);
$
(
"#addressNameId01"
).
val
(
$
(
"#addressName_id"
).
text
());
$
(
"#telephoneId"
).
css
(
"display"
,
"none"
);
$
(
"#telephoneId01"
).
val
(
$
(
"#telephone_id"
).
text
());
$
(
"#bankAddressId"
).
css
(
"display"
,
"none"
);
$
(
"#bankAddressId01"
).
val
(
$
(
"#bankAddress_id"
).
text
());
$
(
"#bankAccountId"
).
css
(
"display"
,
"none"
);
$
(
"#bankAccountId01"
).
val
(
$
(
"#bankAccount_id"
).
text
());
}
else
{
$
(
"#companyNameId"
).
css
(
"display"
,
"none"
);
$
(
"#subjectNameId"
).
css
(
"display"
,
"none"
);
$
(
"#taxpayerNumId"
).
css
(
"display"
,
"none"
);
$
(
"#addressNameId"
).
css
(
"display"
,
"none"
);
$
(
"#telephoneId"
).
css
(
"display"
,
"none"
);
$
(
"#bankAddressId"
).
css
(
"display"
,
"none"
);
$
(
"#bankAccountId"
).
css
(
"display"
,
"none"
);
$
(
"#taxpayerNumId01"
).
removeAttr
(
"class"
);
$
(
"#taxpayerNumId01"
).
removeAttr
(
"class"
);
$
(
"#addressNameId01"
).
removeAttr
(
"class"
);
$
(
"#addressNameId01"
).
removeAttr
(
"class"
);
$
(
"#telephoneId01"
).
removeAttr
(
"class"
);
$
(
"#telephoneId01"
).
removeAttr
(
"class"
);
...
@@ -43,39 +51,40 @@ $(function(){
...
@@ -43,39 +51,40 @@ $(function(){
$
(
"#subjectNameId01"
).
removeAttr
(
"class"
);
$
(
"#subjectNameId01"
).
removeAttr
(
"class"
);
$
(
"#bankAccountId01"
).
removeAttr
(
"class"
);
$
(
"#bankAccountId01"
).
removeAttr
(
"class"
);
}
}
})
});
$
(
"#saveCertificateId"
).
click
(
function
()
{
$
(
"#saveCertificateId"
).
click
(
function
()
{
$
.
post
(
'/training/saveCertificateId'
,
$
.
post
(
'/training/saveCertificateId'
,
{
{
img1
:
$
(
"#img1"
).
attr
(
"src"
),
img1
:
$
(
"#img1"
).
attr
(
"src"
),
img2
:
$
(
"#img2"
).
attr
(
"src"
),
img2
:
$
(
"#img2"
).
attr
(
"src"
),
img3
:
$
(
"#img3"
).
attr
(
"src"
)
img3
:
$
(
"#img3"
).
attr
(
"src"
),
obj_id
:
$
(
"#choose_subject_id"
).
val
()
},
},
function
(
data
)
{
function
(
data
)
{
if
(
data
.
result
)
{
if
(
data
.
result
)
{
alert
(
"保存证件照成功!"
);
alert
(
"保存证件照成功!"
);
}
else
{
}
else
{
alert
(
"保存证件照失败!"
);
alert
(
"保存证件照失败!"
);
}
}
});
});
});
});
$
(
"#submit"
).
on
(
"click"
,
function
()
{
$
(
"#submit"
).
on
(
"click"
,
function
()
{
$
(
".message"
).
html
();
$
(
".message"
).
html
();
if
(
checkRequired
())
{
if
(
checkRequired
())
{
var
sn
=
$
(
"input[name='subject']:checked"
)[
0
].
nextSibling
.
nodeValue
;
var
sn
=
$
(
"input[name='subject']:checked"
)[
0
].
nextSibling
.
nodeValue
;
var
registerInfo_id
=
$
(
"#registerInfo_id"
).
val
();
var
registerInfo_id
=
$
(
"#registerInfo_id"
).
val
();
if
(
confirm
(
"您报名的科目是“"
+
sn
+
"”,请牢记您的用户名和密码,报名成功后可凭此登陆查看缴费等状态,信息提交之后不可再更改,确认要提交吗?"
))
{
if
(
confirm
(
"您报名的科目是“"
+
sn
+
"”,请牢记您的用户名和密码,报名成功后可凭此登陆查看缴费等状态,信息提交之后不可再更改,确认要提交吗?"
))
{
$
(
"#form"
).
ajaxSubmit
({
$
(
"#form"
).
ajaxSubmit
({
url
:
"/training/reg3?registerInfo_id="
+
registerInfo_id
,
url
:
"/training/reg3?registerInfo_id="
+
registerInfo_id
,
type
:
"post"
,
type
:
"post"
,
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
success
)
{
if
(
data
.
success
)
{
location
.
href
=
"/training/infop"
;
location
.
href
=
"/training/infop"
;
}
else
{
}
else
{
$
(
".message"
).
html
(
data
.
info
);
$
(
".message"
).
html
(
data
.
info
);
}
}
}
}
...
@@ -84,19 +93,29 @@ $(function(){
...
@@ -84,19 +93,29 @@ $(function(){
}
}
});
});
$
(
"#choose_subject_id"
).
change
(
function
()
{
var
obj_id
=
$
(
"#choose_subject_id"
).
val
();
$
.
get
(
'/training/getObj?obj_id='
+
obj_id
,
function
(
data
)
{
$
(
"#img1"
).
attr
(
'src'
,
data
.
obj
.
img1
);
$
(
"#img2"
).
attr
(
'src'
,
data
.
obj
.
img2
);
$
(
"#img3"
).
attr
(
'src'
,
data
.
obj
.
img3
);
})
})
})
})
function
checkRequired
(){
function
checkRequired
()
{
var
success
=
true
;
var
success
=
true
;
$
(
".required"
).
each
(
function
(
n
,
v
)
{
$
(
".required"
).
each
(
function
(
n
,
v
)
{
if
(
$
.
trim
(
$
(
this
).
val
())
==
''
)
{
if
(
$
.
trim
(
$
(
this
).
val
())
==
''
)
{
showWarning
(
$
(
this
),
"请填写此信息"
);
showWarning
(
$
(
this
),
"请填写此信息"
);
success
=
false
;
success
=
false
;
}
}
});
});
return
success
;
return
success
;
}
}
function
showWarning
(
obj
,
text
)
{
function
showWarning
(
obj
,
text
)
{
$
(
obj
).
parent
().
parent
().
find
(
"span.reg_body"
).
html
(
"<b style='color:red'>"
+
text
+
"</b>"
);
$
(
obj
).
parent
().
parent
().
find
(
"span.reg_body"
).
html
(
"<b style='color:red'>"
+
text
+
"</b>"
);
}
}
\ No newline at end of file
src/main/webapp/resource/front/js/photoUpload.js
View file @
78da22b6
...
@@ -27,7 +27,7 @@ function ajaxFileUpload(target) {
...
@@ -27,7 +27,7 @@ function ajaxFileUpload(target) {
if
(
status
)
{
if
(
status
)
{
imagePath
=
data
.
fileSavePath
;
imagePath
=
data
.
fileSavePath
;
$
(
"img[data-target='"
+
target
+
"']"
).
attr
(
"src"
,
imagePath
);
$
(
"img[data-target='"
+
target
+
"']"
).
attr
(
"src"
,
'/base/upload/show?path='
+
imagePath
);
}
else
{
}
else
{
alert
(
"图片上传失败,请重新上传!"
);
alert
(
"图片上传失败,请重新上传!"
);
}
}
...
...
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