//通过主键_获取出库类型
function SearchService_IOType_Out(iot_id) {
    $.ajax({
        type: "POST",
        contentType: "application/json",
        url: '../../Base/IOType/IOType_Service.asmx/Get',
        data: "{iot_id:'" + iot_id + "'}",
        dataType: 'json',
        success: function (result) {
            $("#iot_id_out").val(result.d.iot_id);
            $("#iot_name_out").val(result.d.iot_name);
        }
    });
}

//查询出库类型
function FastSearch_IOType_Out() {
    $("#iot_name_out").fast_search({
        url: '../../Component/FastSearch/FastSearch_IOType.aspx?iot_flag=0',
        replaceNull: true,
        searchButton: true,
        colModel: [{ 'columnName': 'iot_id', 'hidden': true, 'width': '80', 'label': 'id' },
            { 'columnName': 'iot_code', 'width': '80', 'label': '编码' },
            { 'columnName': 'iot_name', 'width': '100', 'label': '名称'}],
        select: function (event, ui) {
            SearchService_IOType_Out(ui.item.iot_id);
            return false;
        }
    });
}


//通过主键_获取入库类型
function SearchService_IOType_In(iot_id) {
    $.ajax({
        type: "POST",
        contentType: "application/json",
        url: '../../Base/IOType/IOType_Service.asmx/Get',
        data: "{iot_id:'" + iot_id + "'}",
        dataType: 'json',
        success: function (result) {
            $("#iot_id_in").val(result.d.iot_id);
            $("#iot_name_in").val(result.d.iot_name);
        }
    });
}

//查询入库类型
function FastSearch_IOType_In() {
    $("#iot_name_in").fast_search({
        url: '../../Component/FastSearch/FastSearch_IOType.aspx?iot_flag=1',
        replaceNull: true,
        searchButton: true,
        colModel: [{ 'columnName': 'iot_id', 'hidden': true, 'width': '80', 'label': 'id' },
            { 'columnName': 'iot_code', 'width': '80', 'label': '编码' },
            { 'columnName': 'iot_name', 'width': '100', 'label': '名称'}],
        select: function (event, ui) {
            SearchService_IOType_In(ui.item.iot_id);
            return false;
        }
    });
}