心理咨询网
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

field.html 8.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. {include file='common/head.html'}
  2. <div class="layui-body">
  3. {if([$list])}
  4. <div class="layui-tab layui-tab-brief" lay-filter="tab">
  5. <ul class="layui-tab-title">
  6. <li class="layui-this" lay-id="t1">会员字段列表</li>
  7. <li lay-id="t2">会员字段新增</li>
  8. </ul>
  9. <div class="layui-tab-content">
  10. <div class="layui-tab-item layui-show">
  11. <table class="layui-table">
  12. <thead>
  13. <tr>
  14. <th width=40>序号</th>
  15. <th>描述</th>
  16. <th>字段</th>
  17. <th>长度</th>
  18. <th>是否必填</th>
  19. <th>是否启用</th>
  20. <th>排序</th>
  21. <th>操作</th>
  22. </tr>
  23. </thead>
  24. <tbody>
  25. {foreach $fields(key,value)}
  26. <tr>
  27. <td>[num]</td>
  28. <td>[value->description]</td>
  29. <td>[value->name]</td>
  30. <td>[value->length]</td>
  31. <td>
  32. {if($value->required)}
  33. <a href="{url./admin/'.C.'/mod/id/'.$value->id.'/field/required/value/0}"><i class='fa fa-toggle-on' title="点击关闭必填"></i></a>
  34. {else}
  35. <a href="{url./admin/'.C.'/mod/id/'.$value->id.'/field/required/value/1}"><i class='fa fa-toggle-off' title="点击开启必填"></i></a>
  36. {/if}
  37. </td>
  38. <td>
  39. {if($value->status)}
  40. <a href="{url./admin/'.C.'/mod/id/'.$value->id.'/field/status/value/0}"><i class='fa fa-toggle-on' title="点击禁用"></i></a>
  41. {else}
  42. <a href="{url./admin/'.C.'/mod/id/'.$value->id.'/field/status/value/1}"><i class='fa fa-toggle-off' title="点击启用"></i></a>
  43. {/if}
  44. </td>
  45. <td>[value->sorting]</td>
  46. <td>
  47. {fun=get_btn_del($value->id)}
  48. {fun=get_btn_mod($value->id)}
  49. </td>
  50. </tr>
  51. {/foreach}
  52. </tbody>
  53. </table>
  54. <div class="page">{$pagebar}</div>
  55. </div>
  56. <div class="layui-tab-item">
  57. <form action="{url./admin/MemberField/add}" method="post" class="layui-form">
  58. <input type="hidden" name="formcheck" value="{$formcheck}" >
  59. <div class="layui-form-item">
  60. <label class="layui-form-label">字段描述</label>
  61. <div class="layui-input-block">
  62. <input type="text" name="description" required lay-verify="required" placeholder="请输入字段描述,如:电话" class="layui-input">
  63. </div>
  64. </div>
  65. <div class="layui-form-item">
  66. <label class="layui-form-label">字段名称</label>
  67. <div class="layui-input-block">
  68. <input type="text" name="name" required maxlength="20" lay-verify="required" placeholder="请输入字段名称,必须以字母开头,如:telephone" class="layui-input">
  69. </div>
  70. </div>
  71. <div class="layui-form-item">
  72. <label class="layui-form-label">字段长度</label>
  73. <div class="layui-input-block">
  74. <input type="text" name="length" value="20" required lay-verify="required" class="layui-input">
  75. </div>
  76. </div>
  77. <div class="layui-form-item">
  78. <label class="layui-form-label">是否必填</label>
  79. <div class="layui-input-block">
  80. <input type="radio" name="required" value="1" title="必填" checked>
  81. <input type="radio" name="required" value="0" title="非必填" checked>
  82. </div>
  83. </div>
  84. <div class="layui-form-item">
  85. <label class="layui-form-label">是否启用</label>
  86. <div class="layui-input-block">
  87. <input type="radio" name="status" value="1" title="启用" checked>
  88. <input type="radio" name="status" value="0" title="禁用">
  89. </div>
  90. </div>
  91. <div class="layui-form-item">
  92. <label class="layui-form-label">字段排序</label>
  93. <div class="layui-input-block">
  94. <input type="text" name="sorting" value="255" required lay-verify="required" class="layui-input">
  95. </div>
  96. </div>
  97. <div class="layui-form-item">
  98. <div class="layui-input-block">
  99. <button class="layui-btn" lay-submit>立即提交</button>
  100. <button type="reset" class="layui-btn layui-btn-primary">重置</button>
  101. </div>
  102. </div>
  103. </form>
  104. </div>
  105. </div>
  106. </div>
  107. {/if}
  108. {if([$mod])}
  109. <div class="layui-tab layui-tab-brief" lay-filter="tab">
  110. <ul class="layui-tab-title">
  111. <li class="layui-this">会员字段修改</li>
  112. </ul>
  113. <div class="layui-tab-content">
  114. <div class="layui-tab-item layui-show">
  115. <form action="{url./admin/MemberField/mod/id/'.[$get.id].'}{$backurl}" method="post" class="layui-form">
  116. <input type="hidden" name="formcheck" value="{$formcheck}" >
  117. <div class="layui-form-item">
  118. <label class="layui-form-label">字段描述</label>
  119. <div class="layui-input-block">
  120. <input type="text" name="description" value="{$field->description}" placeholder="请输入字段描述,如:联系人" class="layui-input">
  121. </div>
  122. </div>
  123. <div class="layui-form-item">
  124. <label class="layui-form-label">字段名称</label>
  125. <div class="layui-input-block">
  126. <input type="text" name="name" readonly value="{$field->name}" class="layui-input readonly">
  127. </div>
  128. </div>
  129. <div class="layui-form-item">
  130. <label class="layui-form-label">字段长度</label>
  131. <div class="layui-input-block">
  132. <input type="text" name="length" readonly value="{$field->length}" class="layui-input readonly">
  133. </div>
  134. </div>
  135. <div class="layui-form-item">
  136. <label class="layui-form-label">是否必填</label>
  137. <div class="layui-input-block">
  138. <input type="radio" name="required" value="1" title="必填" {if([$field->required]==1)}checked{/if}>
  139. <input type="radio" name="required" value="0" title="非必填" {if([$field->required]==0)}checked{/if}>
  140. </div>
  141. </div>
  142. <div class="layui-form-item">
  143. <label class="layui-form-label">是否启用</label>
  144. <div class="layui-input-block">
  145. <input type="radio" name="status" value="1" title="启用" {if([$field->status]==1)}checked{/if}>
  146. <input type="radio" name="status" value="0" title="禁用" {if([$field->status]==0)}checked{/if}>
  147. </div>
  148. </div>
  149. <div class="layui-form-item">
  150. <label class="layui-form-label">字段排序</label>
  151. <div class="layui-input-block">
  152. <input type="text" name="sorting" value="{$field->sorting}" required lay-verify="required" class="layui-input">
  153. </div>
  154. </div>
  155. <div class="layui-form-item">
  156. <div class="layui-input-block">
  157. <button class="layui-btn" lay-submit>立即提交</button>
  158. <button type="reset" class="layui-btn layui-btn-primary">重置</button>
  159. {fun=get_btn_back()}
  160. </div>
  161. </div>
  162. </form>
  163. </div>
  164. </div>
  165. </div>
  166. {/if}
  167. </div>
  168. {include file='common/foot.html'}