main
tamguo 7 years ago
parent edc49ed883
commit 547a63a0a0

@ -4,7 +4,7 @@
<select id="listData" resultType="BookEntity">
SELECT
b.uid,
b.id,
b.subject_id,
b.course_id,
b.name,
@ -21,8 +21,8 @@
c.name AS course_name
FROM
tiku_book b
LEFT JOIN tiku_subject s ON s.uid = b.subject_id
LEFT JOIN tiku_course c ON c.uid = b.course_id
LEFT JOIN tiku_subject s ON s.id = b.subject_id
LEFT JOIN tiku_course c ON c.id = b.course_id
WHERE
1 = 1
<if test="name != null and name != ''">

@ -51,10 +51,10 @@ public class CourseController {
@SuppressWarnings("unchecked")
@RequestMapping(path="update")
public ModelAndView update(String uid, ModelAndView model) {
public ModelAndView update(String id, ModelAndView model) {
model.setViewName(COURSE_UPDATE_PAGE);
model.addObject("subjectList", iSubjectService.selectList(Condition.create().eq("status", SubjectStatusEnum.NORMAL.getValue())));
model.addObject("course", iCourseService.selectById(uid));
model.addObject("course", iCourseService.selectById(id));
return model;
}
@ -89,9 +89,9 @@ public class CourseController {
@RequestMapping(path="delete",method=RequestMethod.POST)
@ResponseBody
public Result delete(String uid) {
public Result delete(String id) {
try {
iCourseService.delete(uid);
iCourseService.delete(id);
return Result.result(0, null, "删除科目成功");
} catch (Exception e) {
return ExceptionSupport.resolverResult("删除科目", this.getClass(), e);
@ -100,9 +100,9 @@ public class CourseController {
@RequestMapping(path="enable",method=RequestMethod.POST)
@ResponseBody
public Result enable(String uid) {
public Result enable(String id) {
try {
iCourseService.enable(uid);
iCourseService.enable(id);
return Result.result(0, null, "激活科目成功");
} catch (Exception e) {
return ExceptionSupport.resolverResult("激活科目", this.getClass(), e);
@ -111,9 +111,9 @@ public class CourseController {
@RequestMapping(path="disabled",method=RequestMethod.POST)
@ResponseBody
public Result disabled(String uid) {
public Result disabled(String id) {
try {
iCourseService.disabled(uid);
iCourseService.disabled(id);
return Result.result(0, null, "停用科目成功");
} catch (Exception e) {
return ExceptionSupport.resolverResult("停用科目", this.getClass(), e);

@ -69,7 +69,7 @@ var setting = {view:{selectedMulti:false},data:{key:{title:"title"},simpleData:
callback:{onClick:function(event, treeId, treeNode){
tree.expandNode(treeNode);
win.$('input[type=reset]').click();
win.$('#companyCode').val(treeNode.uid);
win.$('#companyCode').val(treeNode.id);
win.$('#companyName').val(treeNode.name);
win.page();
}}

@ -56,7 +56,7 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
<div class="control-inline width-120">
<select id="subjectId" name="subjectId" class="form-control">
<option value="">&nbsp;</option>
<option th:value="${subject.uid}" th:each="subject,subjectStat:${subjectList}" th:text="${subject.name}">财务经理</option>
<option th:value="${subject.id}" th:each="subject,subjectStat:${subjectList}" th:text="${subject.name}">财务经理</option>
</select>
</div>
</div>

@ -33,7 +33,7 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
<div class="form-group">
<label class="control-label">科目编码:</label>
<div class="control-inline">
<input type="text" id="uid" name="uid" value="" maxlength="64" class="form-control width-120"/>
<input type="text" id="id" name="id" value="" maxlength="64" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
@ -47,7 +47,7 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
<div class="control-inline width-120">
<select id="subjectId" name="subjectId" class="form-control">
<option value="">&nbsp;</option>
<option th:value="${subject.uid}" th:each="subject,subjectStat:${subjectList}" th:text="${subject.name}">财务经理</option>
<option th:value="${subject.id}" th:each="subject,subjectStat:${subjectList}" th:text="${subject.name}">财务经理</option>
</select>
</div>
</div>
@ -91,10 +91,10 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
{header:'类型名称', name:'name', index:'a.post_name', width:200, align:"center", frozen:true, formatter: function(val, obj, row, act){
return '<a href="'+ctx+'tiku/course/update?uid='+row.uid+'" class="btnList" data-title="编辑岗位">'+(val||row.uid)+'</a>';
{header:'科目名称', name:'name', index:'a.post_name', width:200, align:"center", frozen:true, formatter: function(val, obj, row, act){
return '<a href="'+ctx+'tiku/course/update?id='+row.id+'" class="btnList" data-title="编辑岗位">'+(val||row.id)+'</a>';
}},
{header:'类型编码', name:'uid', index:'a.post_code', width:200, align:"center"},
{header:'科目编码', name:'id', index:'a.post_code', width:200, align:"center"},
{header:'排序号', name:'sort', index:'a.post_sort', width:80, align:"center"},
{header:'更新时间', name:'updateDate', index:'a.update_date', width:150, align:"center"},
{header:'备注信息', name:'remarks', index:'a.remarks', width:200, align:"left"},
@ -109,14 +109,14 @@ $('#dataGrid').dataGrid({
}},
{header:'操作', name:'actions', width:130, sortable:false, title:false, formatter: function(val, obj, row, act){
var actions = [];
actions.push('<a href="'+ctx+'tiku/course/update?uid='+row.uid+'" class="btnList" title="编辑分类"><i class="fa fa-pencil"></i></a>&nbsp;');
actions.push('<a href="'+ctx+'tiku/course/update?id='+row.id+'" class="btnList" title="编辑分类"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == "normal"){
actions.push('<a href="'+ctx+'tiku/course/disabled?uid='+row.uid+'" class="btnList" title="停用分类" data-confirm="确认要停用该分类吗?"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
actions.push('<a href="'+ctx+'tiku/course/disabled?id='+row.id+'" class="btnList" title="停用分类" data-confirm="确认要停用该分类吗?"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
}
if (row.status == "disabled"){
actions.push('<a href="'+ctx+'tiku/course/enable?uid='+row.uid+'" class="btnList" title="启用分类" data-confirm="确认要启用该分类吗?"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
actions.push('<a href="'+ctx+'tiku/course/enable?id='+row.id+'" class="btnList" title="启用分类" data-confirm="确认要启用该分类吗?"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="'+ctx+'tiku/course/delete?uid='+row.uid+'" class="btnList" title="删除分类" data-confirm="确认要删除该分类吗?"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="'+ctx+'tiku/course/delete?id='+row.id+'" class="btnList" title="删除分类" data-confirm="确认要删除该分类吗?"><i class="fa fa-trash-o"></i></a>&nbsp;');
return actions.join('');
}}
],

@ -44,7 +44,7 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
<label class="control-label col-sm-4" title="">
<span class="required ">*</span> 科目编码:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<input type="text" id="uid" name="uid" th:value="${course.uid}" maxlength="64" readonly="true" class="form-control required abc"/>
<input type="text" id="id" name="id" th:value="${course.id}" maxlength="64" readonly="true" class="form-control required abc"/>
</div>
</div>
</div>
@ -57,7 +57,7 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
<div class="col-sm-8">
<select id="subjectId" name="subjectId" class="form-control">
<option value="">&nbsp;</option>
<option th:selected="${subject.uid eq course.subjectId} ? true : false" th:value="${subject.uid}" th:each="subject,subjectStat:${subjectList}" th:text="${subject.name}">财务经理</option>
<option th:selected="${subject.id eq course.subjectId} ? true : false" th:value="${subject.id}" th:each="subject,subjectStat:${subjectList}" th:text="${subject.name}">财务经理</option>
</select>
</div>
</div>

Loading…
Cancel
Save