Administrator
2022-10-09 23f93897d618a5253a18b65b124196f95891f240
提交 | 用户 | 时间
58d006 1 <?xml version="1.0" encoding="UTF-8"?>
A 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml"
4 xmlns:c="http://java.sun.com/jsp/jstl/core"
5 xmlns:h="http://java.sun.com/jsf/html"
6 xmlns:f="http://java.sun.com/jsf/core"
7 xmlns:ui="http://java.sun.com/jsf/facelets">
8 <ui:composition template="/template/nit/tmp_brief.xhtml">
9     <ui:define name="acss">
10         <style>
11         #searchBtn {
12             height: 34px;
13         }
14         p.error {
15             color: #D9534F
16         }
17         input.error {
18             border: 1px solid #D9534F;
19         }
20         #simple-table th,#simple-table td{
21             text-align: center;
22             padding: 1px 8px;
23         }
24         #form .control-label {
25             margin-right: -14px
26         }
27         .t-error{
28             color: red;
29             position: relative;
30             right: 2px;
31             top: 3px;
32         }
33         i.fa.danger {
34             color: #D15B47
35         }
36         i.fa.success {
37             color: #87B87F
38         }
39         </style>
40     </ui:define>
41     <ui:define name="acontent">
42         <input type="hidden" value="#{param.page}" id="p" />
43         <input type="hidden" value="#{param.keyword}" id="k" />
44         <div class="row">
45             <div class="col-xs-2">
46                 <select name="" id="" class="form-control" data-bind="value: mtid, options: tList, optionsText: 'name', optionsValue: 'id', optionsCaption: '全部物料类型', event: {change: change}"></select>
47             </div>
48             <div class="col-xs-5" style="margin-left: -31px">
49                 <div class="input-group">
50                     <input class="form-control input-mask-date" type="text" id="keyword" placeholder="输入名称搜索" data-bind="value: keyword, valueUpdate: 'afterkeydown'" />
51                     <span class="input-group-btn">
52                         <button class="btn btn-sm btn-default" type="button" id="searchBtn">
53                             <i class="ace-icon fa fa-search bigger-110"></i>
54                             搜索
55                         </button>
56                     </span>
57                 </div>
58             </div>
59             <div class="col-xs-5" style="text-align: right;">
60                 <button class="btn btn-sm btn-info" type="button" id="newObj">
61                     <i class="ace-icon fa fa-plus bigger-110"></i>
62                     新物料
63                 </button>
64             </div>
65             <div class="col-xs-12 table-responsive" style="margin-top: 8px;">
66                 <table id="simple-table" class="table  table-bordered table-hover">
67                     <thead>
68                         <tr>
69                             <th class="detail-col" style="min-width: 48px">序号</th>
70                             <th style="min-width: 100px">物料类型</th>
71                             <th style="min-width: 100px">物料编号</th>
72                             <th style="min-width: 255px">物料名称</th>
73                             <th style="min-width: 100px">规格型号</th>
74                             <th style="min-width: 75px">计量单位</th>
75                             <th style="min-width: 100px">助记码</th>
76                             <th style="min-width: 75px">物料性质</th>
77                             <th style="min-width: 48px">状态</th>
78                             <th style="min-width: 100px">操作</th>
79                             <th style="min-width: 48px">备注</th>                            
80                         </tr>
81                     </thead>
82
83                     <tbody data-bind="foreach: list">
84                         <tr>
85                             <td class="center">
86                                 <span data-bind="text: $index() + 1"></span>
87                             </td>
88
89                             <td data-bind="text: mtname"></td>
90                             <td data-bind="text: materielNo"></td>
91                             <td data-bind="text: name"></td>
92                             <td data-bind="text: norms"></td>
93                             <td data-bind="text: unitname"></td>
94                             <td data-bind="text: helpcode"></td>
95                             <td data-bind="text: type"></td>
96                             <td >
97                                 <a href="javascript:;" title="启用中"><i class="fa fa-check success" data-bind="click: $parent.mtvalid, visible: valid(),css: {danger: !valid(), success: valid()}"></i></a>
98                                 <a href="javascript:;" title="禁用中"><i class="fa fa-close danger" data-bind="click: $parent.mtvalid, visible: !valid(),css: {danger: !valid(), success: valid()}"></i></a>
99                             </td>
100                             <td>
101                                 <div class="btn-group">
102                                     <button class="btn btn-xs btn-info" title="编辑" data-bind="click: $parent.edit">
103                                         <!--<i class="ace-icon fa fa-pencil bigger-120"></i>-->
104                                         编辑
105                                     </button>
106
107                                     <button class="btn btn-xs btn-danger" title="删除" data-bind="click: $parent.del">
108                                         <!--<i class="ace-icon fa fa-trash-o bigger-120"></i>-->
109                                         删除
110                                     </button>
111                                 </div>
112                             </td>
113                             <td data-bind="text: note"></td>
114                         </tr>
115                     </tbody>
116                 </table>
117                 <div id="pagdiv"></div>
118             </div>
119         </div>
120         <div class="modal fade" id="modal">
121             <div class="modal-dialog">
122                 <div class="modal-content">
123                     <div class="modal-header">
124                         <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
125                         <h4 class="modal-title">编辑物料信息</h4>
126                     </div>
127                     <div class="modal-body">
128                         <form class="form-horizontal" id="form">
129                             <div class="form-body">
130                                 <div class="form-group">
131                                     <label class="col-md-3 control-label">物料性质</label>
132                                     <div class="col-md-6">
133                                         <select name="" id="" class="form-control" data-bind="value: o().mtid, options: tList, optionsText: 'name', optionsValue: 'id'"></select>
134                                     </div>
135                                     <div class="col-md-3">
136                                         <p class="form-control-static text-error"></p>
137                                     </div>
138                                 </div>
139                                 <div class="form-group">
140                                     <label class="col-md-3 control-label"><span class="t-error">*</span> 物料编号</label>
141                                     <div class="col-md-6">
142                                         <input type="text" class="form-control" id="materielNo" name="materielNo" placeholder="" data-bind="value: o().materielNo"/>
143                                     </div>
144                                     <div class="col-md-3">
145                                         <p class="form-control-static text-error"></p>
146                                     </div>
147                                 </div>
148                                 <div class="form-group">
149                                     <label class="col-md-3 control-label"><span class="t-error">*</span>物料名称</label>
150                                     <div class="col-md-6">
151                                         <input type="text" class="form-control" placeholder="" name="name" data-bind="value: o().name"/>
152                                     </div>
153                                     <div class="col-md-3">
154                                         <p class="form-control-static text-error"></p>
155                                     </div>
156                                 </div>
157                                
158                                 
159                                 <div class="form-group">
160                                     <label class="col-md-3 control-label">规格型号 </label>
161                                     <div class="col-md-6">
162                                         <input type="text" class="form-control" placeholder="" name="norms" data-bind="value: o().norms"/>
163                                     </div>
164                                     <div class="col-md-3">
165                                         <p class="form-control-static text-error"></p>
166                                     </div>
167                                 </div>
168                                 <div class="form-group">
169                                     <label class="col-md-3 control-label"><span class="t-error">*</span>计量单位 </label>
170                                     <div class="col-md-6">
171                                         <input type="text" class="form-control" placeholder="" name="unitname" data-bind="value: o().unitname"/>
172                                     </div>
173                                     <div class="col-md-3">
174                                         <p class="form-control-static text-error"></p>
175                                     </div>
176                                 </div>
177                                 <div class="form-group">
178                                     <label class="col-md-3 control-label">助记码 </label>
179                                     <div class="col-md-6">
180                                         <input type="text" class="form-control" placeholder="" name="helpcode" data-bind="value: o().helpcode"/>
181                                     </div>
182                                     <div class="col-md-3">
183                                         <p class="form-control-static text-error"></p>
184                                     </div>
185                                 </div>
186                                 <div class="form-group">
187                                     <label class="col-md-3 control-label">物料属性</label>
188                                     <div class="col-md-6">
189                                         <select name="" id="" class="form-control" data-bind="value: o().type, options: tyList"></select>
190                                     </div>
191                                     <div class="col-md-3">
192                                         <p class="form-control-static text-error"></p>
193                                     </div>
194                                 </div>
195                                 <div class="form-group">
196                                     <label class="col-md-3 col-sm-3 control-label" for="form-field-1-1"> 启用 </label>
197                                 <div class="col-md-6 col-sm-6">
198                                     <label style="padding-top: 9px;">
199                                 <input name="switch-field-1" class="ace ace-switch" type="checkbox" data-bind="checked: o().valid"/>
200                                 <span class="lbl"></span>
201                                             </label>
202                                         </div>
203                             
204                                 </div>
205                                  <div class="form-group">
206                                     <label class="col-md-3 control-label">备注</label>
207                                     <div class="col-md-6">
208                                         <input type="text" class="form-control" placeholder="" data-bind="value: o().note"/>
209                                     </div>
210                                     <div class="col-md-3">
211                                         <p class="form-control-static text-error"></p>
212                                     </div>
213                                 </div>
214                             </div>
215                         </form>
216                     </div>
217                     <div class="modal-footer">
218                         <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
219                         <button type="button" class="btn btn-primary" id="save">保存</button>
220                     </div>
221                 </div>
222             </div>
223         </div>
224         <div id="dialog-confirm" class="hide">
225             <div class="alert alert-info bigger-110" id="modalContent">
226             </div>
227         </div>
228     </ui:define>
229     <ui:define name="myscript">
230     <script type="text/javascript" src="#{request.contextPath}/template/assets/js/chosen.jquery.js"></script>
231         <script src="js/material.js"></script>
232     </ui:define>
233 </ui:composition>
234 </html>