49 lines
2.2 KiB
HTML
49 lines
2.2 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="reportsubmit()" 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="reportff" method="post" name="wsff" enctype="multipart/form-data">
|
|
<p>对本月整体情况原因分析:</p>
|
|
<input id="reportfx" class="easyui-textbox" name="cause" style="width:480px;height:200px" data-options="multiline:true"
|
|
required=true />
|
|
<p>下一步安全生产工作的建议</p>
|
|
<input id="reportjy" class="easyui-textbox" name="suggest" style="width:480px;height:200px" data-options="multiline:true"
|
|
required=true/>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
console.log($('#yyfxdiv').text())
|
|
$('#reportfx').val($('#yyfxdiv').text())
|
|
$('#reportjy').val($('#jydiv').text())
|
|
function reportsubmit() {
|
|
var data = $('#reportff').serializeJSON();
|
|
$.ajax({
|
|
type: "POST",
|
|
url: 'api/report?a=add&year='+year+'&month='+month+'&part='+part,
|
|
data: JSON.stringify(data),
|
|
datatype: "json",
|
|
processData: false,
|
|
contentType: "application/json;charset=utf-8",
|
|
beforeSend: function () {
|
|
var bo = $('#reportff').form('validate')
|
|
if (bo == false) {
|
|
return bo
|
|
} else {
|
|
$('#submitb').linkbutton('disable');
|
|
}
|
|
},
|
|
success: function (data) {
|
|
if (data.code == 1) {
|
|
$("#dd").dialog("close");
|
|
$('#yyfxdiv').html($('#reportfx').textbox('getValue'))
|
|
$('#jydiv').html($('#reportjy').textbox('getValue'))
|
|
} else { $.messager.alert('提示', '失败!'); }
|
|
$('#submitb').linkbutton('enable');
|
|
},
|
|
});
|
|
}
|
|
|
|
</script> |