e97a6950 by wang

Merge remote-tracking branch 'origin/develop' into develop

2 parents ba06911b ee6a2d46
...@@ -155,7 +155,7 @@ class Work extends CI_Controller ...@@ -155,7 +155,7 @@ class Work extends CI_Controller
155 'operatorRecord'=>$ret2, 155 'operatorRecord'=>$ret2,
156 'id'=>$id 156 'id'=>$id
157 ); 157 );
158 // var_dump($data);exit; 158
159 $this->load->view('work/资料/资料补录', $data); 159 $this->load->view('work/资料/资料补录', $data);
160 } 160 }
161 161
......
...@@ -155,4 +155,37 @@ ...@@ -155,4 +155,37 @@
155 } 155 }
156 }) 156 })
157 } 157 }
158
159 function json(data) {
160 const n = new Object();
161 $.each(data, function (index, value) {
162 tree(index, value, n)
163 });
164
165 return n;
166 }
167
168 function tree(attr, value, tree) {
169 var nestedAttrs = attr.split('.')
170 for(var i = 0 ; i < nestedAttrs.length ; i++) {
171 if(i === (nestedAttrs.length -1)) {
172 if(tree[nestedAttrs[i]] !== value) {
173 tree[nestedAttrs[i]] = value
174 }
175 } else if(!tree.hasOwnProperty(nestedAttrs[i])) {
176 tree[nestedAttrs[i]] = {}
177 tree = tree[nestedAttrs[i]]
178 } else {
179 tree = tree[nestedAttrs[i]]
180 }
181 }
182 }
183
184 $('.Wdate').on('focus', function () {
185 WdatePicker();
186 });
187
188 function reload() {
189 table.fnDraw();
190 }
158 </script> 191 </script>
......
...@@ -115,10 +115,6 @@ ...@@ -115,10 +115,6 @@
115 115
116 }); 116 });
117 } 117 }
118
119 function reload() {
120 table.fnDraw();
121 }
122 </script> 118 </script>
123 </body> 119 </body>
124 <html> 120 <html>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
6 <div class="form-group col-sm-3 col-md-2"> 6 <div class="form-group col-sm-3 col-md-2">
7 <label>资料上传</label> 7 <label>资料上传</label>
8 <span class="form-control select-box"> 8 <span class="form-control select-box">
9 <select class="select uploader" size="1" name="sourceType" id="upload"> 9 <select class="select uploader" size="1" id="upload">
10 <?php foreach ($this->session->sourceBaseType as $k=>$v):?> 10 <?php foreach ($this->session->sourceBaseType as $k=>$v):?>
11 <option value="<?=$v->code?>" data-name="<?=$v->desc?>"><?=$v->desc?></option> 11 <option value="<?=$v->code?>" data-name="<?=$v->desc?>"><?=$v->desc?></option>
12 <?php if($v->children && !empty($v->children)):?> 12 <?php if($v->children && !empty($v->children)):?>
......
...@@ -326,3 +326,7 @@ label.radio > input:checked + img{ ...@@ -326,3 +326,7 @@ label.radio > input:checked + img{
326 .top .name, .top .num { 326 .top .name, .top .num {
327 padding-left: 40px; 327 padding-left: 40px;
328 } 328 }
329
330 .input-text[type="number"] {
331 width: 100%;
332 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!