87147b7c by Zelig

资料补录限制

1 parent 8c6ecffd
......@@ -155,7 +155,7 @@ class Work extends CI_Controller
'operatorRecord'=>$ret2,
'id'=>$id
);
// var_dump($data);exit;
$this->load->view('work/资料/资料补录', $data);
}
......
......@@ -155,4 +155,37 @@
}
})
}
function json(data) {
const n = new Object();
$.each(data, function (index, value) {
tree(index, value, n)
});
return n;
}
function tree(attr, value, tree) {
var nestedAttrs = attr.split('.')
for(var i = 0 ; i < nestedAttrs.length ; i++) {
if(i === (nestedAttrs.length -1)) {
if(tree[nestedAttrs[i]] !== value) {
tree[nestedAttrs[i]] = value
}
} else if(!tree.hasOwnProperty(nestedAttrs[i])) {
tree[nestedAttrs[i]] = {}
tree = tree[nestedAttrs[i]]
} else {
tree = tree[nestedAttrs[i]]
}
}
}
$('.Wdate').on('focus', function () {
WdatePicker();
});
function reload() {
table.fnDraw();
}
</script>
......
......@@ -115,10 +115,6 @@
});
}
function reload() {
table.fnDraw();
}
</script>
</body>
<html>
......
......@@ -6,7 +6,7 @@
<div class="form-group col-sm-3 col-md-2">
<label>资料上传</label>
<span class="form-control select-box">
<select class="select uploader" size="1" name="sourceType" id="upload">
<select class="select uploader" size="1" id="upload">
<?php foreach ($this->session->sourceBaseType as $k=>$v):?>
<option value="<?=$v->code?>" data-name="<?=$v->desc?>"><?=$v->desc?></option>
<?php if($v->children && !empty($v->children)):?>
......
......@@ -326,3 +326,7 @@ label.radio > input:checked + img{
.top .name, .top .num {
padding-left: 40px;
}
.input-text[type="number"] {
width: 100%;
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!