<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Выработка сотрудников доставки</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="description" content="jqGrid" />
<meta name="keywords" content="jqGrid, javascript, jquery" />
<link rel="stylesheet" type="text/css" media="screen" href="css/smoothness/jquery-ui-1.7.2.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/ui.jqgrid.css" />
</head>
<body>
<table id="list"></table>
<div id="pager"></div>
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/i18n/grid.locale-ru.js"></script>
<script type="text/javascript" src="js/jquery.jqGrid.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
var lastSel;
jQuery("#list").jqGrid({
url:'2getdatanew.php',
datatype: 'json',
mtype: 'POST',
colNames:['#', '1', '2','3','4','5','6','7','8','9','10'],
colModel :[
{name:'tid', index:'tid', width:50, align:'right', editable:true, search:true}
,{name:'ProductionResource_driver_id', index:'ProductionResource_driver_id', width:150,editable: true ,edittype:"select",editoptions:{dataUrl:'test.php'}}
,{name:'ProductionResource_forwarder_id', index:'ProductionResource_forwarder_id', width:150, align:'right', editable:true, edittype:"text", searchoptions:{sopt:['eq','ne','bw','cn','le','lt','gt','ge']}}
,{name:'Quantity_RN', index:'Quantity_RN', width:150, align:'right', editable:true, edittype:"text", searchoptions:{sopt:['eq','ne','bw','cn','le','lt','gt','ge']}}
,{name:'Quantity_TT', index:'Quantity_TT', width:150, align:'right', editable:true, edittype:"text", searchoptions:{sopt:['eq','ne','bw','cn','le','lt','gt','ge']}}
,{name:'SKU', index:'SKU', width:150, align:'right', editable:true, edittype:"text", searchoptions:{sopt:['eq','ne','bw','cn','le','lt','gt','ge']}}
,{name:'pcs', index:'pcs', width:150, align:'right', editable:true, edittype:"text", searchoptions:{sopt:['eq','ne','bw','cn','le','lt','gt','ge']}}
,{name:'box', index:'box', width:150, align:'right', editable:true, edittype:"text", searchoptions:{sopt:['eq','ne','bw','cn','le','lt','gt','ge']}}
,{name:'kg', index:'kg', width:150, align:'right', editable:true, edittype:"text", searchoptions:{sopt:['eq','ne','bw','cn','le','lt','gt','ge']}}
,{name:'ye', index:'ye', width:150, align:'right', editable:true, edittype:"text", searchoptions:{sopt:['eq','ne','bw','cn','le','lt','gt','ge']}}
,{name:'CreateDate', index:'CreateDate', width:150, formatter: 'date', align:'right', editable:false, edittype:"text", searchoptions:{sopt:['eq','ne','bw','cn','le','lt','gt','ge']}}
],
pager: jQuery('#pager'),
rowNum:30,
rowList:[3,20,30],
sortname: 'tid',
sortorder: "asc",
viewrecords: true,
autowidth: true,
caption: 'Выработка сотрудников доставки',
height: '100%', viewrecords: true, fixed: true, gridview: true, loadonce: false,
ondblClickRow: function(tid) {
if (tid && tid != lastSel) {
jQuery("#list").restoreRow(lastSel);
jQuery("#list").editRow(tid, true);
lastSel = tid;
}
},
editurl: 'editjqgrid.php'
}).navGrid('#pager',{view:false, del:true, add:true, edit:false},
{}, // default settings for edit
{addCaption: "Добавление записи",
editCaption: "Edit Record",
url:"addjqgrid.php",
bSubmit: "Добавить",
bCancel: "Отмена",
bClose: "Закрыть",
saveData: "Data has been changed! Save changes?",
bYes : "Да",
bNo : "Нет",
bExit : "Закрыть"}, // default settings for add
{caption: "Delete",
msg: "Delete selected record(s)?",
bSubmit: "Delete",
bCancel: "Cancel",
url: 'jqgriddelete.php',
reloadAfterSubmit:true,
mtype: "POST",
}, // delete instead that del:false we need this
{closeOnEscape:true, multipleSearch:true, closeAfterSearch:true}, // search options
{} /* view parameters*/
)
});
</script>
</body>
</html>