if ((CheckBox1.Checked) and (departmentid<>'')) then
        str := str + ' and folio.departmentid ='+departmentid+' ';
    if ((CheckBox2.Checked) and (operatorid<>'')) then
        str := str + ' and folio.operatorid ="'+operatorid+'" ';
    if ((CheckBox4.Checked) and (ComboBox6.text<>'')) then
        str := str + ' and folio.storeid ='+store_list[ComboBox6.itemindex]+' ';
    if ((CheckBox3.Checked) and (ComboBox4.text<>'')) then
        str := str + ' and folio.posid ='+pos_id+' ';delphi 的代码,你看看就懂了