<script type="text/javascript">
mini.parse();
var obj = mini.getParams();
var grid = mini.get("datagrid1");
// grid.load();
var url = location.search;
var Request = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(1)//去掉?号
strs = str.split("&");
for (var i = 0; i < strs.length; i++) {
Request[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
}
function add() {
var txt_id = mini.getbyName("INPUT_ID").value;
var txt_name = mini.getbyName("INPUT_NAME").value;
var txt_remark = mini.getbyName("INPUT_REMARK").value;
if (confirm("您是否确定增加数据吗?")) {
grid.loading("操作中,请稍后......");
$.ajax({
url: "../jjs/jjs_webtoserver.aspx?method=base_material_add",
type: 'post',
data: paramsObj,
success: function (text) {
grid.reload();
},
error: function () {
}
});
}
}
function edit() {
var currentRow = grid.getSelected();
var row = grid.indexOf(currentRow);
var txt_id = grid.data[row]["ID"];
var rows = grid.getSelecteds();
var txt_name = mini.getbyName("INPUT_NAME").value;
var txt_remark = mini.getbyName("INPUT_REMARK").value;
function remove() {
var currentRow = grid.getSelected();
var rows = grid.getSelecteds();
var row = grid.indexOf(currentRow);
var txt_id = grid.data[row]["ID"];
if (rows.length > 0) {
if (confirm("确定删除选中记录?")) {