懒羊羊
2023-11-25 9bd5461a1387becd4da03158061a1ed17ddf6a6c
提交 | 用户 | 时间
71e81e 1 @layout("/common/_form.html",{js:["/assets${context.modularName}/${lowerEntity}/${lowerEntity}_edit.js"]}){
2
3 <form class="layui-form" id="${lowerEntity}Form" lay-filter="${lowerEntity}Form">
4     <div class="layui-fluid" style="padding-bottom: 75px;">
5         <div class="layui-card">
6             <div class="layui-card-header">基本信息</div>
7             <div class="layui-card-body">
8                 <div class="layui-form-item layui-row">
9                     <input name="${keyPropertyName}" type="hidden"/>
10
11                 <% for(var i=0 ; i < fieldConfigs.~size ; i++){     %>
12                     <div class="layui-inline layui-col-md12">
13                         <label class="layui-form-label">${fieldConfigs[i].columnComment}<span style="color: red;">*</span></label>
14                 <% if(fieldConfigs[i].inputType == 1){              %>
15                         <div class="layui-input-block">
16                             <input id="${fieldConfigs[i].camelFieldName}" name="${fieldConfigs[i].camelFieldName}" placeholder="请输入${fieldConfigs[i].columnComment}" type="text" class="layui-input" lay-verify="required" required/>
17                         </div>
18                 <% }                                                %>
19                 <% if(fieldConfigs[i].inputType == 2){              %>
20                         <div class="layui-input-block">
21                             <select name="${fieldConfigs[i].camelFieldName}" lay-filter="${fieldConfigs[i].camelFieldName}">
22                                 <option value="">下拉单选框</option>
23                             </select>
24                         </div>
25                 <% }                                                %>
26                 <% if(fieldConfigs[i].inputType == 3 ){             %>
27                         <div class="layui-input-block">
28                             <select name="${fieldConfigs[i].camelFieldName}" xm-select="sel${fieldConfigs[i].camelFieldName}">
29                                 <option value="">下拉多选框</option>
30                             </select>
31                         </div>
32                 <% }                                                %>
33                 <% if(fieldConfigs[i].inputType == 4 ){             %>
34                         <div class="layui-input-block">
35                             <input type="text" class="layui-input" id="${fieldConfigs[i].camelFieldName}">
36                         </div>
37                 <% }                                                %>
38                 <% if(fieldConfigs[i].inputType == 5){              %>
39                         <div class="layui-upload">
40                             <button type="button" class="layui-btn" id="${fieldConfigs[i].camelFieldName}">上传图片</button>
41                             <div class="layui-upload-list">
42                                 <img class="layui-upload-img" id="filePreview">
43                             </div>
44                         </div>
45                 <% }                                                %>
46                     </div>
47                 <% }                                                %>
48                 </div>
49             </div>
50         </div>
51     </div>
52     <div class="form-group-bottom text-center">
53         <button class="layui-btn" lay-filter="btnSubmit" lay-submit>&emsp;提交&emsp;</button>
54     <% if(jumpType){            %>
55         <button type="reset" class="layui-btn layui-btn-primary" ew-event="closeDialog">&emsp;取消&emsp;</button>
56     <% }else{                   %>
57         <button type="reset" class="layui-btn layui-btn-primary" id="cancel">&emsp;取消&emsp;</button>
58     <% }                        %>
59     </div>
60
61 </form>
62
63 @}