$('.table-thead input:checkbox').click(function () {
|
if ($('.table-thead input:checkbox').attr("checked") == "checked") {
|
$('.table-tbody input:checkbox').attr("checked", "checked");
|
$('.table-tbody tr').addClass("tr-checked");
|
} else {
|
$('.table-tbody input:checkbox').removeAttr("checked");
|
$('.table-tbody tr').removeClass("tr-checked");
|
}
|
});
|
var len = $(".table-tbody input:checkbox").size();
|
$(".table-tbody input:checkbox").each(function (i) {
|
$(".table-tbody input:checkbox").eq(i).click(function () {
|
var check_num = 0;
|
if ($(this).attr("checked") == "checked") {
|
$(this).parent().parent().addClass("tr-checked");
|
for (var x = 0; x < len; x++) {
|
if ($('.table-tbody input:checkbox').eq(x).attr("checked") == "checked") {
|
check_num++;
|
} else {
|
break;
|
}
|
}
|
if (check_num == len) {
|
$('.table-thead input:checkbox').attr("checked", "checked");
|
} else {
|
$('.table-thead input:checkbox').removeAttr("checked");
|
}
|
} else {
|
$(this).parent().parent().removeClass("tr-checked");
|
$('.table-thead input:checkbox').removeAttr("checked");
|
}
|
});
|
});
|
|
$(function () {
|
$('.combo-select').comboSelect();
|
$('.dowebok div:first-child').hide();
|
|
$('.combo-select input').focus(function () {
|
$('#query-area').css("overflow", "visible");
|
$('#query-areaAdd').css("overflow", "visible");
|
});
|
$('.combo-open input').focus(function () {
|
$('#query-area').css("overflow", "visible");
|
$('#query-areaAdd').css("overflow", "visible");
|
});
|
|
$('#channel-title').click(function () {
|
$('#query-area').css("overflow", "hidden");
|
$('#query-areaAdd').css("overflow", "hidden");
|
});
|
|
$('.myselect_1').change(function (e, v) {
|
//$('.result').html('你选择了第' + e.target.selectedIndex + '项,值是' + e.target.value);
|
var itemId = e.target.value;
|
|
if (null != itemId && itemId != "") {
|
if (old_value != itemId) {
|
old_value = itemId;
|
$.ajax({
|
type: "post",
|
url: "/AJAX/ItemOperation/ItemInfoOperation.ashx",
|
data: { action: "QueryItemName_inboundInfo", q0: itemId },
|
async: false,
|
success: function (msg) {
|
if (msg.length > 0) {
|
document.getElementById("Q_ItemName").value = msg;
|
}
|
}
|
});
|
} else {
|
old_value = "";
|
return;
|
}
|
} else {
|
document.getElementById("Q_ItemName").value = "";
|
}
|
});
|
$('.myselect_2').change(function (e, v) {
|
//$('.result').html('你选择了第' + e.target.selectedIndex + '项,值是' + e.target.value);
|
var itemId = e.target.value;
|
|
if (null != itemId && itemId != "") {
|
if (old_value_2 != itemId) {
|
old_value_2 = itemId;
|
$.ajax({
|
type: "post",
|
url: "/AJAX/ItemOperation/ItemInfoOperation.ashx",
|
data: { action: "QueryItemName", q0: itemId },
|
async: false,
|
success: function (msg) {
|
if (msg.length > 0) {
|
document.getElementById("Item_Name").value = msg;
|
}
|
}
|
});
|
} else {
|
old_value_2 = "";
|
return;
|
}
|
} else {
|
document.getElementById("Item_Name").value = "";
|
}
|
});
|
});
|