var qlsblhKsdw = $("#qlsblhIframe").contents().find("#qlsblhKsdw").val();
var qlsblhJsdw = $("#qlsblhIframe").contents().find("#qlsblhJsdw").val();
parent.("#htxxZt").val(("#zfxxZxzt").val());
align: "left", halign: 'center'
.datagrid-header td:first-child{
border-left: solid 1px #0076c8;
}
.datagrid-body {
border-left: solid 0px #e3e6e8;
}
$("#sdname").textbox('setValue', this.getLabel().getContent());
var rowIndex = ('#qlxxSbGrid').datagrid('getRowIndex',('#qlxxSbGrid').datagrid('getSelected'));
var total = $('#qlxxSbGrid').datagrid('getPager').data("pagination").options.total;
$('#cmbJob').combobox('clear');//清空选中项
$('#cmbJob').combobox('loadData', {});//清空option选项
function saveCallBack(){
$(this).linkbutton('disable');//按钮禁用
$(this).linkbutton('enable');//按钮取消禁用
$("#zfIframe").get(0).contentWindow.submitForm();
}
parent.$("#saveBtn").linkbutton('enable');
{ field: 'RECORD_MSG', title: '审核意见', width: 20, align: 'center',
formatter: function(value, row, index){
return '<span title='+value+'>'+value+'</span>';
}
}
var data = [
{ id: "-99", pid: "0", name: "中交一航局路桥公司", type: 0 },
{ id: "1", pid: "-99", name: "一公司", type: 1 },
{ id: "2", pid: "-99", name: "一公司项目部", type: 2 }
];
data: {"total":3,"rows":[
{ "tzggBt":"昭通都香高速 昭阳至金阳段开工","tzggTypeMc":"抢险管理","createdTime":"2019-04-27 10:57:46","publishFlag":"已发布" },
{ "tzggBt":"都香高速昭阳到金阳段永丰大桥首跨桥梁架设成功","tzggTypeMc":"项目动态","createdTime":"2019-04-27 10:55:18","publishFlag":"已发布" },
{ "tzggBt":"总投资435亿元 都香高速都匀至安顺段获国家发改委批复建设","tzggTypeMc":"项目动态","createdTime":"2019-04-27 10:23:22","publishFlag":"已发布" }
]},
//面板(panel)展开后触发
$("#p").panel({
onExpand:function(){
debugger;
}
});
formatter: function(value, row, index){
return '<span title='+value+'>'+value+'</span>';
}
//弹窗位置调整
$.messager.alert({ title: '提示', msg: '请选择要删除的附件', icon: 'warning', top: (document).scrollTop()+((window).height()-700)*0.5 });
$('#win').window('center');
$.messager.alert('提示', data.msg, 'error').window({ width: 500 });
eval(chart+"('part_'+i)");
onClickRow: function (rowIndex, rowData) {
if(rowData.gchfDetailId && rowData.gchfDetailId > 0){
$(this).datagrid('selectRow', rowIndex);
}else{
$(this).datagrid('unselectRow', rowIndex);
}
},
onCheckAll: function(rows){
checkAllData(rows);
},
onCheck: function(rowIndex, rowData){
checkData(rowData);
},
onUncheckAll: function(rows){
unCheckAllData(rows);
},
onUncheck: function(rowIndex,rowData){
unCheckData(rowData);
},
$('#syxmGrid').datagrid("selectRow", 0);
$('#xxqdTable').datagrid('checkRow', i);
$('#gclqdGrid').datagrid('updateRow', {
index: index,
row: {
bgSum: data.obj
}
});
$('#treelist').treegrid("select", data['rows'][i].orgId);
$('#qddmTable').treegrid('clearSelections');
$('#qddmTable').treegrid('reload', {qddmJsnr: $("#qddmJsnr").val()});
map.setViewport(points, 12); //调整视野
$("input[name='hasYhxxFlag']").radiobutton({
onChange: function (checked) {
if(checked){
var newVal = $(this).val();
if(newVal == 0){
$("#wyhDescId").show();
$("#yhxx_div_id").hide();
}else{
$("#yhxx_div_id").show();
$("#wyhDescId").hide();
$("#wyhDescription").val('');
}
}
}
});
$("#dnwFlag").checkbox('setValue', '0');
$("#dnwFlag").checkbox({checked: false});
<input class="easyui-radiobutton" id="agree" name="DOWITH_MARK" value="1" style="width: 14px;height: 14px;"><span style="display: contents;font-size: 12px;color: #536383;"> 同意 </span>
$("#veto").radiobutton('check');
//复选框改变
$(".dnwFlag").checkbox({
onChange: function (checked) {
if(checked){
$("#dnwFlag").checkbox('setValue', '1');
}else{
$("#dnwFlag").checkbox('setValue', '0');
}
}
});
//下拉框改变
$("#sjxxSfyj").combobox({
onChange: function(){
var sjxxSfyj = $("#sjxxSfyj").combobox('getValue');//获取下拉框的值
if(sjxxSfyj == 1){
$("#sjxxYjdj").combobox('enable');//开启下拉框
$("#sjxxYjdj").attr('validType', 'selectValueRequired[\'#sjxxYjdj\']');//下拉框必填(自定义必填方法)
$("#sjxxYjyy").textbox('enable');//禁用文本框
$("#sjxxYjyy").textbox({required: true});//文本框必填
}else{
$("#sjxxYjdj").combobox('disable');//禁用下拉框
$("#sjxxYjdj").removeAttr('validType');//下拉框取消必填
$('#sjxxYjdj').combobox('clear');//清空选中项
$("#sjxxYjyy").textbox('disable');//禁用文本框
$("#sjxxYjyy").textbox({required: false});//文本框取消必填
$("#sjxxYjyy").textbox('setValue', '');
}
}
});
if(dataMark == 1){//下拉框改为必填
$('#billCcIds').combobox('options').required = true;
$('#billCcIds').combobox('textbox').validatebox('options').required = true;
$('#billCcIds').combobox('validate');
}else{
$('#billCcIds').combobox('options').required = false;
$('#billCcIds').combobox('textbox').validatebox('options').required = false;
}
.extend(.fn.validatebox.defaults.rules, {
selectValueRequired: {
validator: function(value,param){
return $(param[0]).find("option:contains('"+value+"')").val() != '';
},
message: '该输入项为必输项'
}
});
//onkeyup
$("#htAmount").numberbox({
inputEvents: $.extend({}, $.fn.numberbox.defaults.inputEvents, {
keyup: function (e) {
var value = $(this).val();
var unitprice = $("#unitprice").val();
$('#htSum').numberbox('setValue', (value*unitprice).toFixed(2));
}
})
});
easyui toolbar 动态显示与隐藏
if(user==1){
//隐藏第一个按钮
$('div.datagrid-toolbar a').eq(0).hide();
//隐藏第一条分隔线
$('div.datagrid-toolbar div').eq(0).hide();
//显示第一个按钮
$('div.datagrid-toolbar a').eq(0).show();
//显示第一条分隔线
$('div.datagrid-toolbar div').eq(0).hide();
//禁用disable toolbar按钮
$('#btnpichuli').linkbutton('disable');
//取消禁用enable toolbar按钮
$('#btnpichuli').linkbutton('enable');
}
$(".datagrid-toolbar").remove();//移除工具栏
$("#ryjcGrid").datagrid("hideColumn", "lwryId");//隐藏列
//分页获取数据
idField: 'gchfDetailId',
var data = $('#gchfGrid').datagrid('getSelections');
//显示底部栏
showFooter: true,
formatter: function(value, row, index){
if(row.isFooter == '1'){//判断出是否footer
return;
}else{
return '<a href="javascript:;" style="cursor: hand;" οnclick="approveHis(' + row.zjjlId + ')">审批流程</a>';
}
}
List<ZjjlDetail> list = new ArrayList<>();
ZjjlDetail z = new ZjjlDetail();
z.setFyCodeNo("合计");
z.setUnitprice(new BigDecimal("123"));
z.setDesignAmount(new BigDecimal("456"));
list.add(z);
JSONArray a = JSONArray.fromObject(list);
String data = "{\"result\": "+"{ \"total\": "+pageModel.getTotalRecords()+", \"rows\": "+array.toString()+", \"footer\": "+a.toString()+"}}";
$('#dg_careersystem').datagrid('loadData',{total:0,rows:[]});
//iframe刷新
parent.location.reload();
$("#cltzGrid tr:gt(0)")//排除第一行
$("#cltzGrid tr:first")//第一行
var contentheight = window.parent.$("#tt").height();
var contentwidth = window.parent.$("#tt").width();
$(".easyui-layout").layout("resize", {
width: width,
height: height
});
//关闭所有页签
function closeAll() {
$(".tabs li").each(function(index, obj) {
var tab = $(".tabs-closable", this).text();
$(".easyui-tabs").tabs('close', tab);
});
}
//自定义table input
input:focus {
border-color: #6b9cde !important;
box-shadow: 0 0 3px 0 #95B8E7;
outline: -webkit-focus-ring-color auto 0px;
}
:focus {
outline: -webkit-focus-ring-color auto 0px;
box-shadow: 0 0 3px 0 #95B8E7;
}
loadFilter: function(data) {
return data['result'];
},
rowStyler: function(index, row){
if (row.approveStatus == 1) {
return 'background-color: #1DFF13;';
}
if (row.approveStatus == 2) {
return 'background-color: #FF151D;';
}
},