73 lines
3.6 KiB
HTML
73 lines
3.6 KiB
HTML
<div class="easyui-layout" style="width:100%;height:100%;">
|
|
<div id='southdiv' data-options="region:'south'" style="height:50px;text-align:center;padding:5px">
|
|
<a href="javascript:void(0)" iconCls="fa-check" class="easyui-linkbutton" onclick="mesubmitForm()" id="submitb">提交</a>
|
|
<a href="javascript:void(0)" iconCls="fa-close" class="easyui-linkbutton" onclick="closeForm()">取消</a>
|
|
</div>
|
|
<div data-options="region:'center'" style="height:100%;padding:15px 15px;">
|
|
<form id="meff" method="post" name="wsff" enctype="multipart/form-data">
|
|
<div style="margin-bottom:5px;">
|
|
<input id="misstime" editable="false" name="misstime" class="easyui-datetimebox" style="width:480px"
|
|
data-options="label:'发生时间',currentText:'今天',closeText:'关闭'" required=true />
|
|
</div>
|
|
<div style="margin-bottom:5px">
|
|
<input id="missplace" class="easyui-textbox" name="missplace" style="width:480px" data-options="
|
|
label:'发生地点',"
|
|
required=true>
|
|
</div>
|
|
<div style="margin-bottom:5px">
|
|
<input type="hidden" name="missimg" id="missimg" />
|
|
<label>现场图片</label><input type="file" id="file" name="" accept="image/*" style="margin-left:30px;" />
|
|
<span id='ps' style="display:none">
|
|
<progress id="progressBar" value="0" max="100" style="width: 100px;"></progress>
|
|
<span id="percentage"></span><span id="time"></span></span>
|
|
<ul id="addImage" class="imgul"></ul>
|
|
<HR width="480px" color='blue' SIZE=1 align='left'>
|
|
</div>
|
|
<div style="margin-top:10px;margin-bottom:5px">
|
|
<input id="description" class="easyui-textbox" name="description" style="width:480px;height:100px" data-options="label:'简要描述',multiline:true"
|
|
required=true />
|
|
</div>
|
|
<div style="margin-bottom:5px">
|
|
<input id="prevent" class="easyui-textbox" name="prevent" style="width:480px;height:100px" data-options="label:'防范措施',multiline:true"
|
|
/>
|
|
</div>
|
|
<div style="margin-bottom:5px">
|
|
<input id="lesson" class="easyui-textbox" name="lesson" style="width:480px;height:100px" data-options="label:'经验总结',multiline:true"
|
|
/>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
function wssubmitForm() {
|
|
var missimg = new Array();
|
|
$(".missimg").each(function () {
|
|
missimg.push($(this).attr("filepath"));
|
|
});
|
|
var wsdata = $('#wsff').serializeJSON();
|
|
wsdata['missimg']=missimg
|
|
$.ajax({
|
|
type: "POST",
|
|
url: 'api/miss?a=add',
|
|
data: JSON.stringify(wsdata),
|
|
datatype: "json",
|
|
processData: false,
|
|
contentType: "application/json;charset=utf-8",
|
|
beforeSend: function () {
|
|
var bo = $('#wsff').form('validate')
|
|
if (bo == false) {
|
|
return bo
|
|
} else {
|
|
$('#submitb').linkbutton('disable');
|
|
}
|
|
},
|
|
success: function (data) {
|
|
if (data.code == 1) {
|
|
$('#wstable').datagrid('reload');
|
|
$("#dd").dialog("close");
|
|
} else { $.messager.alert('提示', '失败!'); }
|
|
$('#submitb').linkbutton('enable');
|
|
},
|
|
});
|
|
}
|
|
</script> |