Administrator
2024-02-18 7cc1e4c3da18389b5ffd065afc6b317a9f6b02f9
SelM/Crm_ComplainVisitBillList.cs
@@ -30,6 +30,7 @@
        public Crm_ComplainVisitBill oFrm;
        Pub_Class.ClsGridListSum oSumGrid = new Pub_Class.ClsGridListSum();
        public string sDlgWhere = "";  //外窗体递入
        //
        private void initGrid()
        {
@@ -662,5 +663,57 @@
        {
            this.Sub_AbandonCancelltion();
        }
        private void btnOK_Click(object sender, EventArgs e)
        {
            Sub_FastQuery();
        }
        //快速过滤
        private void Sub_FastQuery()
        {
            string sFastSQL = "";
            //判断状态
            if (cmbHStatus.Text != "全部" && cmbHStatus.Text != "")
            {
                if (cmbHStatus.Text == "未审核")
                {
                    sFastSQL = sFastSQL + " and 审核人='' ";
                }
                if (cmbHStatus.Text == "已审核")
                {
                    sFastSQL = sFastSQL + " and 审核人<>'' ";
                }
                if (cmbHStatus.Text == "未关闭")
                {
                    sFastSQL = sFastSQL + " and 关闭人='' ";
                }
                if (cmbHStatus.Text == "已关闭")
                {
                    sFastSQL = sFastSQL + " and 关闭人<>'' ";
                }
            }
            //单据号
            if (txtHBillNo.Text.Trim() != "")
            {
                sFastSQL = sFastSQL + " and 单据号 like '%" + txtHBillNo.Text + "%'";
            }
            //往来单位
            if (txtHSupID.Text.Trim() != "")
            {
                sFastSQL = sFastSQL + " and 客户 like '%" + txtHSupID.Text + "%'";
            }
            if (sFastSQL.Trim() == "")
            {
                MessageBox.Show("没有输入条件!");
                return;
            }
            sDlgWhere = sFastSQL;
            Display();
            sDlgWhere = "";
        }
    }
}