safesite/safesite/templates/checklistadd.html

108 lines
4.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="wssubmitForm()" 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="wsff" method="post" name="wsff" enctype="multipart/form-data">
<div style="margin-top:10px;margin-bottom:5px">
<input id="checktaskname" class="easyui-textbox" name="checktaskname" style="width:480px;height:40px" data-options="label:'任务名称'"
required=true />
</div>
<div style="margin-top:10px;margin-bottom:5px">
<input class="easyui-textbox" id="participantname" style="width:480px;height:60px" editable="false"
data-options="label:'检查人员',multiline:true,prompt:'请选择'" required=true>
<input type="hidden" id="participant" name="participant" />
<a id="chooserys" class='easyui-linkbutton' onclick="choseusers()" style="width:auto">选择</a>
</div>
<div style="margin-top:6px;margin-left:200px">
<input type="radio" name="zxstate" value="1" checked="true">同时执行</input>
<input type="radio" name="zxstate" value="2">单人执行</input>
</div>
<div style="margin-top:6px;">
<select id="tasktype" class="easyui-combobox" name="tasktype" style="width:480px;height:40px" data-options="label:'检查频率'"
required=true editable=false>
<option value="1">每天一次</option>
<option value="2">每周一次</option>
<option value="3">每月一次</option>
<option value="4">每季度一次</option>
<option value="5">每半年一次</option>
<option value="6">每年一次</option>
</select>
</div>
<div style="margin-top:10px;margin-bottom:5px">
<input id="starttime" editable="false" name="starttime" class="easyui-datetimebox" style="width:480px;height:40px"
data-options="label:'初次检查',currentText:'今天',closeText:'关闭',showSeconds:false" required=true />
</div>
<div style="margin-bottom:5px">
<input id="checktabtitlex" class="easyui-textbox" name="checktabtitle" style=" width: 480px;
height: 40px
" data-options="label:'检查表'" required=true />
</div>
<div style="margin-top:10px;margin-bottom:5px">
<input id="checkplace" class="easyui-textbox" name="checkplace" style=" width: 480px;
height: 40px
" data-options="label:'检查地点'"
required=true />
</div>
</form>
</div>
</div>
<script>
$(function () {
$("#checktabtitlex").combobox({
url: 'api/checkproject?a=checktablist',
valueField: 'value',
textField: 'text',
editable: false,
});
})
function aaa(x) {
if (x == "participant") {
$('#participant').attr('value', top.$('#in').val());
$('#participantname').textbox('setValue', top.$('#in').attr('show'));
$('#participantnum').textbox('setValue', top.$('#in').attr('total'));
}
}
function wssubmitForm() {
var wsdata = $('#wsff').serializeJSON();
$.ajax({
type: "POST",
url: 'api/checkproject?a=addchecklist',
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) {
$('#tasktab').datagrid('reload');
$("#dd").dialog("close");
} else { $.messager.alert('提示', '失败!'); }
$('#submitb').linkbutton('enable');
},
});
}
</script>