分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-01-16 5884c9023393061afbe6d3d6e709e53e672ddde8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
$('.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 = "";
        }
    });
});