//protected string exportExcel()
    //{
    //    string applystarttm = Request.Params["applystarttm"];
    //    string applyendtm = Request.Params["applyendtm"];
    //    string starttm = Request.Params["starttm"];
    //    string endtm = Request.Params["endtm"];
    //    string applyName = Request.Params["apply_name"];
    //    string depart = Request.Params["depart"];
    //    string fee_depart = Request.Params["fee_depart"];
    //    string fee_detail = Request.Params["fee_detail"];
    //    string account_status = Request.Form["account_status"];

    //    DataTable dt = ReimbursementManage.findByCond(applystarttm, applyendtm, starttm, endtm, applyName, depart, fee_depart, fee_detail, account_status, null);

    //    JObject resultJObject = new JObject();

    //    if (dt == null || dt.Columns.Count == 0)
    //    {
    //        resultJObject.Add("msg", "暂无数据导出");
    //    }
    //    else
    //    {
    //        string[] chineseHeaders = new string[] {"序号", "编号", "提交日期", "审批日期", "财务审批日期",
    //                "提交人", "部门", "费用归属部门", "产品", "费用明细", "金额", "实报金额", "状态", "审批人", "财务审批人", "抄送人", "备注", "审批意见", "审批结果"};
    //        ExcelHelperV2_0.ExportByWeb(dt, "财务审批单据信息", "财务审批单据信息.xlsx", chineseHeaders);

    //        resultJObject.Add("msg", "导出成功");
    //    }

    //    return resultJObject.ToString();
    //}
    //private string uploadBudgetFile()
    //{
    //    string res = "读取文件失败!";
    //    DataTable dt = ExcelHelperV2_0.Import(Request);

    //    if (dt != null)
    //    {
    //        res=ReimbursementManage.uploadBudgetFile(dt);
    //    }
    //    return res;
    //}

    private string uploadFile()
    {
        string    res  = "上传成功!";
        DataTable dt   = ExcelHelperV2_0.Import(Request);
        UserInfo  user = (UserInfo)Session["user"];
        string    sql  = "";

        if (dt != null)
        {
            List <Dictionary <string, object> > list = new List <Dictionary <string, object> >();

            foreach (DataRow row in dt.Rows)
            {
                Dictionary <string, object> dict = new Dictionary <string, object>();

                dict.Add("code", row[0].ToString());
                dict.Add("actual_fee_amount", row[1].ToString());
                dict.Add("approver", user.userName.ToString());
                dict.Add("actual_fee_amount_time", DateTime.Now);

                list.Add(dict);
            }
            string msg = ReimbursementManage.updateActualFee(list);
        }
        return(res);
    }
    protected string updateActualFee()
    {
        string        codes    = Request.Form["codes"];
        List <string> codeList = JsonHelper.DeserializeJsonToObject <List <string> >(codes);

        string        names    = Request.Form["names"];
        List <string> nameList = JsonHelper.DeserializeJsonToObject <List <string> >(names);

        string fees = Request.Form["actual_fee_amount"];

        string originFees = Request.Form["originFees"];

        UserInfo user         = (UserInfo)Session["user"];
        string   approvalName = user.userName;

        List <string> originFeeList = new List <string>();

        if (originFees != null)
        {
            originFeeList = JsonHelper.DeserializeJsonToObject <List <string> >(originFees);
        }

        List <Dictionary <string, object> > list = new List <Dictionary <string, object> >();

        for (int i = 0; i < codeList.Count; i++)
        {
            Dictionary <string, object> dict = new Dictionary <string, object>();

            dict.Add("code", codeList[i]);

            if (originFees != null)
            {
                dict.Add("actual_fee_amount", originFeeList[i]);
            }
            else
            {
                dict.Add("actual_fee_amount", fees);
            }

            dict.Add("name", nameList[i]);
            dict.Add("approver", approvalName);

            list.Add(dict);
        }

        string msg = ReimbursementManage.updateActualFee(list);

        JObject resultJObject = new JObject();

        resultJObject.Add("msg", msg);

        return(resultJObject.ToString());
    }