using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using DSWeb.Areas.Mobile.DAL; using DSWeb.Areas.Mobile.Models.Login; using DSWeb.Areas.Account.DAL.Chfee_Payapplication; using System.Text; using DSWeb.Areas.Mobile.Models.Common; using DSWeb.Areas.Account.Models.Chfee_Payapplication; using DSWeb.Areas.Account.Models.Chfee_do_detail; namespace DSWeb.Areas.Mobile.Views.Approval { public partial class FFSP : System.Web.Mvc.ViewPage { public User _User; string _Keyword; public PageContentModel model = new PageContentModel(); protected void Page_Load ( object sender, EventArgs e ) { var openid = Request.Cookies["openid"]==null?"":Request.Cookies["openid"].Value; DBLog.Log("", "openid", openid); _Keyword = Request["search"] == null ? "" : Request["search"]; if (openid=="") { DBLog.Log("cookies-openid","null"); //授权并跳转 //SetupHTML(openid.ToString()); SetupHTML("123"); } else { DBLog.Log("cookies-openid", Request.Cookies["openid"].Value); SetupHTML(openid.ToString()); } DBLog.Log("FFSP---COOKIES.COUNT",Request.Cookies.Count.ToString()); for (int i = 0; i < Request.Cookies.Count; i++) { DBLog.Log("",Request.Cookies[i].Name, Request.Cookies[i].Value); } DBLog.Log("FFSP---querystxring.COUNT", Request.Cookies.Count.ToString()); for (int i = 0; i < Request.QueryString.Count; i++) { DBLog.Log("",i.ToString(), Request.QueryString[i]); } hdkeyword.Value = _Keyword; } public void SetupHTML (string openid) { // string openid = Request.QueryString["openid"] != null ? Request.QueryString["openid"] : ""; DBLog.Log("FFSP","OPENID",openid); _User = LoginDAL.GetUserWithOpenId(openid); hduid.Value = _User.uid; if (_User.uid==null||_User.uid==string.Empty) { DBLog.Log("FFSP", "获取用户失败", openid); model.content = "没有权限或未绑定系统账户,请尝试重新点击【关联系统账户】!"; } DBLog.Log("FFSP", "GETUSERSUCCESS", _User.openid+","+_User.uid); string conditionM = ""; if (_Keyword!="") { conditionM = "( i.billno like '%" + _Keyword + "%' or i.BILLNO IN (SELECT billno from ch_fee_do where bsno IN (SELECT bsno from v_op_bs where MBLNO like'%" + _Keyword + "%'))) "; } var dataList = ChpayapplicationDAL.GetAuditDataList(conditionM, _User.uid, "3", _User.codename, _User.comid); StringBuilder sbMain = new StringBuilder(); if (dataList.Count > 0) { foreach (var cp in dataList) { //主内容 string listStr = cp.BILLNO + "[" + cp.CUSTOMERNAME + "]" + "
RMB:" + cp.AMOUNTRMB + " USD:" + cp.AMOUNTUSD; sbMain.Append("
  • "); sbMain.Append(""); sbMain.Append("
    "); sbMain.Append("

    " + listStr + "

    "); //详细内容 sbMain.Append("

    "); sbMain.Append("

      "); StringBuilder sbDet = new StringBuilder(); string condition = "BILLNO = '" + cp.BILLNO + "'"; List list = new List(); list = ChpayapplicationDAL.GetBodyAuditList(0,50,condition); foreach (var fee in list) { //费用名称 sbDet.Append("
    • "); sbDet.Append(fee.FEENAME); sbDet.Append("
    • "); //主提单号 sbDet.Append("
    • "); sbDet.Append("主提单号:"+fee.MBLNO); sbDet.Append("
    • "); //委托单位 sbDet.Append("
    • "); sbDet.Append("委托单位:"+fee.CUSTOMERNAME); sbDet.Append("
    • "); //核销金额 sbDet.Append("
    • "); sbDet.Append("核销金额:"+fee.AMOUNT); sbDet.Append("
    • "); //原始金额 sbDet.Append("
    • "); sbDet.Append("原始金额:"+fee.ORIGAMOUNT); sbDet.Append("
    • "); //原始币别 sbDet.Append("
    • "); sbDet.Append("原始币别:" + fee.ORIGCURRENCY); sbDet.Append("
    • "); //原始汇率 sbDet.Append("
    • "); sbDet.Append("原始汇率:"+fee.ORIGEXCHANGERATE); sbDet.Append("
    • "); //开船日期 sbDet.Append("
    • "); sbDet.Append("开船日期:" + fee.ETD); sbDet.Append("
    • "); } sbMain.Append(sbDet.ToString()); sbMain.Append("
    "); sbMain.Append("

    "); sbMain.Append("
    "); sbMain.Append("
  • "); } model.content = sbMain.ToString(); //页脚按钮 StringBuilder sbFooter = new StringBuilder(); if (_User.uid == null || _User.uid == string.Empty) { sbFooter.Append("
  • 返回
  • "); } else { sbFooter.Append("
  • 返回
  • "); sbFooter.Append("
  • 全部通过
  • "); sbFooter.Append("
  • 所选通过
  • "); sbFooter.Append("
  • 驳回
  • "); } model.footer = sbFooter.ToString(); } else { model.footer ="
  • 返回
  • "; } } } }