95 lines
3.7 KiB
JavaScript
Raw Normal View History

2025-08-13 11:14:39 +08:00
/* * PIT-ADMS V7.0.3 敏捷开发框架
* Copyright (c) 2013-2018 Hexagon PPM
* 创建人超级管理员
* 2022-02-28 14:47
* 属性组表
*/
var refreshGirdData;
var ProjectId = request('ProjectId');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 查询
$('#btn_Search').on('click', function () {
page.search();
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/ZZDT_EC/ec_propertyg/Form?ProjectId=' + ProjectId,
width: 550,
height: 180,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('PropertyGID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/ZZDT_EC/ec_propertyg/Form?keyValue=' + keyValue + "&ProjectId=" + ProjectId,
width: 550,
height: 180,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('PropertyGID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/ZZDT_EC/ec_propertyg/DeleteForm', { keyValue: keyValue, ProjectId: ProjectId }, function () {
refreshGirdData();
});
}
});
}
});
},
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/ZZDT_EC/ec_propertyg/GetPageList',
headData: [
{ label: '属性组名称', name: 'PropertyGroupName', width: 300, align: "left", sort: false },
{ label: '排序', name: 'OrderID', width: 100, align: "center", sort: false },
{ label: "创建人", name: "CreateUserName", width: 120, align: "center", sort: false },
{ label: '创建时间', name: 'CreateTime', width: 150, align: "center", sort: false },
{ name: "", width: 1, sort: false }
],
mainId: 'PropertyGID',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
param.ProjectId = ProjectId;
param.PropertyGroupName = $("#PropertyGroupName").val();
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}