Commit 75c39cc6c34824f4a2c51d655a4636ba120fe636

Authored by 孙向锦
1 parent 57330ff4

章节修改,添加所属教材

WebRoot/WEB-INF/jsp/sunvote/chapter/chapter_edit.jsp
... ... @@ -44,6 +44,10 @@
44 44 <td><input type="text" name="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" placeholder="这里输入备注" title="备注" style="width:98%;"/></td>
45 45 </tr>
46 46 <tr>
  47 + <td style="width:75px;text-align: right;padding-top: 13px;">所属教材:</td>
  48 + <td><input type="number" name="TEACHINGMATERIAL_ID" id="TEACHINGMATERIAL_ID" value="${pd.TEACHINGMATERIAL_ID}" maxlength="32" placeholder="这里输入所属教材" title="所属教材" style="width:98%;"/></td>
  49 + </tr>
  50 + <tr>
47 51 <td style="text-align: center;" colspan="10">
48 52 <a class="btn btn-mini btn-primary" onclick="save();">保存</a>
49 53 <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a>
... ... @@ -108,6 +112,16 @@
108 112 $("#REMARK").focus();
109 113 return false;
110 114 }
  115 + if($("#TEACHINGMATERIAL_ID").val()==""){
  116 + $("#TEACHINGMATERIAL_ID").tips({
  117 + side:3,
  118 + msg:'请输入所属教材',
  119 + bg:'#AE81FF',
  120 + time:2
  121 + });
  122 + $("#TEACHINGMATERIAL_ID").focus();
  123 + return false;
  124 + }
111 125 $("#Form").submit();
112 126 $("#zhongxin").hide();
113 127 $("#zhongxin2").show();
... ...
WebRoot/WEB-INF/jsp/sunvote/chapter/chapter_list.jsp
... ... @@ -69,6 +69,7 @@
69 69 <th class="center">章节名称</th>
70 70 <th class="center">章节描述</th>
71 71 <th class="center">备注</th>
  72 + <th class="center">所属教材</th>
72 73 <th class="center">操作</th>
73 74 </tr>
74 75 </thead>
... ... @@ -87,6 +88,7 @@
87 88 <td class='center'>${var.NAME}</td>
88 89 <td class='center'>${var.CDESCRIPTION}</td>
89 90 <td class='center'>${var.REMARK}</td>
  91 + <td class='center'>${var.TEACHINGMATERIAL_ID}</td>
90 92 <td class="center">
91 93 <c:if test="${QX.edit != 1 && QX.del != 1 }">
92 94 <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span>
... ...
resources/mybatis1/sunvote/ChapterMapper.xml
... ... @@ -12,6 +12,7 @@
12 12 NAME,
13 13 CDESCRIPTION,
14 14 REMARK,
  15 + TEACHINGMATERIAL_ID,
15 16 ID
16 17 </sql>
17 18  
... ... @@ -20,6 +21,7 @@
20 21 #{NAME},
21 22 #{CDESCRIPTION},
22 23 #{REMARK},
  24 + #{TEACHINGMATERIAL_ID},
23 25 #{ID}
24 26 </sql>
25 27  
... ... @@ -30,11 +32,13 @@
30 32 (
31 33 NAME,
32 34 CDESCRIPTION,
33   - REMARK
  35 + REMARK,
  36 + TEACHINGMATERIAL_ID
34 37 ) values (
35 38 #{NAME},
36 39 #{CDESCRIPTION},
37   - #{REMARK}
  40 + #{REMARK},
  41 + #{TEACHINGMATERIAL_ID}
38 42 )
39 43 </insert>
40 44  
... ... @@ -54,6 +58,7 @@
54 58 NAME = #{NAME},
55 59 CDESCRIPTION = #{CDESCRIPTION},
56 60 REMARK = #{REMARK},
  61 + TEACHINGMATERIAL_ID = #{TEACHINGMATERIAL_ID},
57 62 ID = #{ID}
58 63 where
59 64 ID = #{ID}
... ...