提交试车代码
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" EnableCollapse="true" runat="server" DataIDField="TermItemId" DataKeyNames="TermItemId,SubItemId,WorkInspectId,SubInspectId,WorkPackId,InstallationId,ProcessesId,SystemId,SubSystemId" AllowSorting="true" SortField="Sort" SortDirection="ASC" EnableColumnLines="true" AllowCellEditing="true" AllowFilters="true" OnSort="Grid1_Sort" OnRowCommand="Grid1_RowCommand" IsDatabasePaging="true" BoxFlex="1">
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" EnableCollapse="true" runat="server" DataIDField="TermItemId" DataKeyNames="TermItemId,SubItemId,WorkInspectId,SubInspectId,WorkPackId,InstallationId,ProcessesId,SystemId,SubSystemId" AllowSorting="true" SortField="Sort" SortDirection="ASC" EnableColumnLines="true" AllowCellEditing="true" AllowFilters="true" OnSort="Grid1_Sort" OnRowCommand="Grid1_RowCommand" IsDatabasePaging="true" BoxFlex="1" ClicksToEdit="1">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" runat="server">
|
||||
<Items>
|
||||
@@ -111,79 +111,71 @@
|
||||
</f:Panel>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
return false;
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
return false;
|
||||
}
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
//检查人
|
||||
var ddlInspectedUser = '<%= ddlInspectedUser.ClientID %>';
|
||||
function renderInspectedUser(value) {
|
||||
if (value == -1) {
|
||||
return '';
|
||||
} else {
|
||||
return F(ddlInspectedUser).getTextByValue(value);
|
||||
}
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
//检查人
|
||||
var ddlInspectedUser = '<%= ddlInspectedUser.ClientID %>';
|
||||
function renderInspectedUser(value) {
|
||||
if (value == -1) {
|
||||
return '';
|
||||
} else {
|
||||
return F(ddlInspectedUser).getTextByValue(value);
|
||||
}
|
||||
|
||||
var ddbSysPipingClientID = '<%= ddbSysPiping.ClientID %>';
|
||||
var cbSysPipingClientID = '<%= cbSysPiping.ClientID %>';
|
||||
function onSelectAllClick() {
|
||||
var cbSysPiping = F(cbSysPipingClientID);
|
||||
$.each(cbSysPiping.items, function (index, item) {
|
||||
item.setValue(true);
|
||||
});
|
||||
|
||||
// 将数据控件中的值同步到输入框
|
||||
F(ddbSysPipingClientID).syncToBox();
|
||||
}
|
||||
|
||||
function onClearAllClick() {
|
||||
var cbSysPiping = F(cbSysPipingClientID);
|
||||
$.each(cbSysPiping.items, function (index, item) {
|
||||
item.setValue(false);
|
||||
});
|
||||
|
||||
// 将数据控件中的值同步到输入框
|
||||
F(ddbSysPipingClientID).syncToBox();
|
||||
}
|
||||
|
||||
//验证
|
||||
function isValid() {
|
||||
debugger;
|
||||
var grid1 = F('<%= Grid1.ClientID %>');
|
||||
var valid = true, modifiedData = grid1.getMergedData();
|
||||
|
||||
$.each(modifiedData, function (index, rowData) {
|
||||
if (rowData.status === 'deleted') {
|
||||
return true; // continue
|
||||
}
|
||||
}
|
||||
var name = rowData.values['InspectedUser'];
|
||||
if (typeof (name) != 'undefined' && $.trim(name) == '') {
|
||||
F.alert({
|
||||
message: '检查人不能为空!',
|
||||
ok: function () {
|
||||
grid1.startEdit(rowData.id, 'InspectedUser');
|
||||
}
|
||||
});
|
||||
|
||||
var ddbSysPipingClientID = '<%= ddbSysPiping.ClientID %>';
|
||||
var cbSysPipingClientID = '<%= cbSysPiping.ClientID %>';
|
||||
function onSelectAllClick() {
|
||||
var cbSysPiping = F(cbSysPipingClientID);
|
||||
$.each(cbSysPiping.items, function (index, item) {
|
||||
item.setValue(true);
|
||||
});
|
||||
valid = false;
|
||||
|
||||
// 将数据控件中的值同步到输入框
|
||||
F(ddbSysPipingClientID).syncToBox();
|
||||
}
|
||||
|
||||
function onClearAllClick() {
|
||||
var cbSysPiping = F(cbSysPipingClientID);
|
||||
$.each(cbSysPiping.items, function (index, item) {
|
||||
item.setValue(false);
|
||||
});
|
||||
|
||||
// 将数据控件中的值同步到输入框
|
||||
F(ddbSysPipingClientID).syncToBox();
|
||||
}
|
||||
|
||||
//验证
|
||||
function isValid() {
|
||||
debugger;
|
||||
var grid1 = F('<%= Grid1.ClientID %>');
|
||||
var valid = true, modifiedData = grid1.getMergedData();
|
||||
|
||||
$.each(modifiedData, function (index, rowData) {
|
||||
debugger;
|
||||
// rowData.id: 行ID
|
||||
// rowData.status: 行状态(newadded, modified, deleted)
|
||||
// rowData.values: 行中修改单元格对象,比如 { "Name": "刘国2", "Gender": 0, "EntranceYear": 2003 }
|
||||
if (rowData.status === 'deleted') {
|
||||
return true; // continue
|
||||
}
|
||||
var name = rowData.values['InspectedUser'];
|
||||
// 更改了姓名列,并且为空字符串
|
||||
// 如果typeof(name)=='undefined',则表示姓名没有更改,需要排除在外!!
|
||||
if (typeof (name) != 'undefined' && $.trim(name) == '') {
|
||||
F.alert({
|
||||
message: '检查人不能为空!',
|
||||
ok: function () {
|
||||
grid1.startEdit(rowData.id, 'InspectedUser');
|
||||
}
|
||||
});
|
||||
|
||||
valid = false;
|
||||
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return valid;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return valid;
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user