心理咨询网
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

extfield.html 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  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>序号</th>
  15. <th>内容模型</th>
  16. <th>字段描述</th>
  17. <th>字段名称</th>
  18. <th>字段类型</th>
  19. <th>排序</th>
  20. <th>操作</th>
  21. </tr>
  22. </thead>
  23. <tbody>
  24. {foreach $extfields(key,value)}
  25. <tr>
  26. <td>[num]</td>
  27. <td>
  28. {foreach $models(key2,value2,num2)}
  29. {if($value2->mcode==$value->mcode)}
  30. [value2->name]
  31. {/if}
  32. {/foreach}
  33. </td>
  34. <td>[value->description]</td>
  35. <td>[value->name]</td>
  36. <td>
  37. {if($value->type==1)}单行文本{/if}
  38. {if($value->type==2)}多行文本{/if}
  39. {if($value->type==3)}单选按钮{/if}
  40. {if($value->type==4)}多选按钮{/if}
  41. {if($value->type==5)}单图上传{/if}
  42. {if($value->type==10)}多图上传{/if}
  43. {if($value->type==6)}附件上传{/if}
  44. {if($value->type==7)}日期选择{/if}
  45. {if($value->type==8)}编辑器{/if}
  46. {if($value->type==9)}下拉选择{/if}
  47. </td>
  48. <td>[value->sorting]</td>
  49. <td>
  50. {fun=get_btn_del($value->id)}
  51. {fun=get_btn_mod($value->id)}
  52. </td>
  53. </tr>
  54. {/foreach}
  55. </tbody>
  56. </table>
  57. <div class="page">{$pagebar}</div>
  58. </div>
  59. <div class="layui-tab-item">
  60. <form action="{url./admin/ExtField/add}" method="post" class="layui-form">
  61. <input type="hidden" name="formcheck" value="{$formcheck}" >
  62. <div class="layui-form-item">
  63. <label class="layui-form-label">内容模型</label>
  64. <div class="layui-input-block">
  65. <select name="mcode" lay-verify="required">
  66. <option value="">请选择内容模型</option>
  67. {foreach $models(key,value)}
  68. <option value="[value->mcode]">[value->name]</option>
  69. {/foreach}
  70. </select>
  71. </div>
  72. </div>
  73. <div class="layui-form-item">
  74. <label class="layui-form-label">字段描述</label>
  75. <div class="layui-input-block">
  76. <input type="text" name="description" required lay-verify="required" placeholder="请输入字段描述,如:产品价格" class="layui-input">
  77. </div>
  78. </div>
  79. <div class="layui-form-item">
  80. <label class="layui-form-label">字段名称</label>
  81. <div class="layui-input-block">
  82. <input type="text" name="name" required maxlength="20" lay-verify="required" placeholder="请输入字段名称,字母、数组、下划线,如:price" class="layui-input">
  83. </div>
  84. </div>
  85. <div class="layui-form-item">
  86. <label class="layui-form-label">字段类型</label>
  87. <div class="layui-input-block">
  88. <select name="type" lay-verify="required">
  89. <option value="1">单行文本</option>
  90. <option value="2">多行文本</option>
  91. <option value="3">单选按钮</option>
  92. <option value="4">多选按钮</option>
  93. <option value="5">单图上传</option>
  94. <option value="10">多图上传</option>
  95. <option value="6">附件上传</option>
  96. <option value="7">日期选择</option>
  97. <option value="8">编辑器</option>
  98. <option value="9">下拉选择</option>
  99. </select>
  100. </div>
  101. </div>
  102. <div class="layui-form-item">
  103. <label class="layui-form-label">选择按钮值</label>
  104. <div class="layui-input-block">
  105. <textarea name="value" placeholder="多个选项用逗号隔开或者回车" class="layui-textarea"></textarea>
  106. <div class="layui-form-mid layui-word-aux">只在类型为单选或多选时填写有效。</div>
  107. </div>
  108. </div>
  109. <div class="layui-form-item">
  110. <label class="layui-form-label">排序</label>
  111. <div class="layui-input-block">
  112. <input type="text" name="sorting" required lay-verify="required" value="255" placeholder="请输入排序" class="layui-input">
  113. </div>
  114. </div>
  115. <div class="layui-form-item">
  116. <div class="layui-input-block">
  117. <button class="layui-btn" lay-submit>立即提交</button>
  118. <button type="reset" class="layui-btn layui-btn-primary">重置</button>
  119. </div>
  120. </div>
  121. </form>
  122. </div>
  123. </div>
  124. </div>
  125. {/if}
  126. {if([$mod])}
  127. <div class="layui-tab layui-tab-brief" lay-filter="tab">
  128. <ul class="layui-tab-title">
  129. <li class="layui-this">扩展字段修改</li>
  130. </ul>
  131. <div class="layui-tab-content">
  132. <div class="layui-tab-item layui-show">
  133. <form action="{url./admin/ExtField/mod/id/'.[$get.id].'}{$backurl}" method="post" class="layui-form">
  134. <input type="hidden" name="formcheck" value="{$formcheck}" >
  135. <div class="layui-form-item">
  136. <label class="layui-form-label">内容模型</label>
  137. <div class="layui-input-block">
  138. <select name="mcode" lay-verify="required">
  139. <option value="">请选择内容模型</option>
  140. {foreach $models(key,value)}
  141. <option value="[value->mcode]" {if($value->mcode==[$extfield->mcode])}selected{/if}>[value->name]</option>
  142. {/foreach}
  143. </select>
  144. </div>
  145. </div>
  146. <div class="layui-form-item">
  147. <label class="layui-form-label">字段描述</label>
  148. <div class="layui-input-block">
  149. <input type="text" name="description" value="{$extfield->description}" placeholder="请输入字段描述,如:产品价格" class="layui-input">
  150. </div>
  151. </div>
  152. <div class="layui-form-item">
  153. <label class="layui-form-label">字段名称</label>
  154. <div class="layui-input-block">
  155. <input type="text" name="name" readonly value="{$extfield->name}" maxlength="20" placeholder="请输入字段名称,字母、数组、下划线,如:price" class="layui-input readonly">
  156. </div>
  157. </div>
  158. <div class="layui-form-item">
  159. <label class="layui-form-label">字段类型</label>
  160. <div class="layui-input-block">
  161. <select name="type" lay-verify="required">
  162. {if([$extfield->type]==2)}
  163. <option value="2" selected>多行文本</option>
  164. {/if}
  165. {if([$extfield->type]==7)}
  166. <option value="7" selected>日期选择</option>
  167. {/if}
  168. {if([$extfield->type]==8)}
  169. <option value="8" selected>编辑器</option>
  170. {/if}
  171. {if([$extfield->type]==10)}
  172. <option value="10" selected>多图上传</option>
  173. {/if}
  174. {if([$extfield->type]!=2 && [$extfield->type]!=7 && [$extfield->type]!=8 && [$extfield->type]!=10)}
  175. <option value="1" {if([$extfield->type]==1)}selected{/if}>单行文本</option>
  176. <option value="3" {if([$extfield->type]==3)}selected{/if}>单选按钮</option>
  177. <option value="4" {if([$extfield->type]==4)}selected{/if}>多选按钮</option>
  178. <option value="5" {if([$extfield->type]==5)}selected{/if}>单图上传</option>
  179. <option value="6" {if([$extfield->type]==6)}selected{/if}>附件上传</option>
  180. <option value="9" {if([$extfield->type]==9)}selected{/if}>下拉选择</option>
  181. {/if}
  182. </select>
  183. </div>
  184. </div>
  185. <div class="layui-form-item">
  186. <label class="layui-form-label">选择按钮值</label>
  187. <div class="layui-input-block">
  188. <textarea name="value" placeholder="多个选项用逗号或回车隔开" class="layui-textarea">{$extfield->value}</textarea>
  189. <div class="layui-form-mid layui-word-aux">只在类型为单选或多选时填写有效,多个选项用逗号或回车隔开。</div>
  190. </div>
  191. </div>
  192. <div class="layui-form-item">
  193. <label class="layui-form-label">排序</label>
  194. <div class="layui-input-block">
  195. <input type="text" name="sorting" required lay-verify="required" value="{$extfield->sorting}" placeholder="请输入排序" class="layui-input">
  196. </div>
  197. </div>
  198. <div class="layui-form-item">
  199. <div class="layui-input-block">
  200. <button class="layui-btn" lay-submit>立即提交</button>
  201. <button type="reset" class="layui-btn layui-btn-primary">重置</button>
  202. {fun=get_btn_back()}
  203. </div>
  204. </div>
  205. </form>
  206. </div>
  207. </div>
  208. </div>
  209. {/if}
  210. </div>
  211. {include file='common/foot.html'}