You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
158 lines
7.2 KiB
C#
158 lines
7.2 KiB
C#
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("<cookies>", "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("<COOKIES>",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("<QueryString>",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 + "]" + "<br>RMB:" + cp.AMOUNTRMB + " USD:" + cp.AMOUNTUSD;
|
|
sbMain.Append("<li style=\"padding-top:0px;padding-bottom:0px;padding-right:20px;padding-left:0px;\">");
|
|
sbMain.Append("<input class=\"ckbBill\" value=\""+cp.BILLNO+"\" type=\"checkbox\" name=\"checkbox-0\" style=\"width:20px;height:20px;margin-top:20px\">");
|
|
sbMain.Append("<div data-role=\"collapsible\" style=\"margin-left:50px;padding:0px\">");
|
|
sbMain.Append("<h3>" + listStr + "</h3>");
|
|
//详细内容
|
|
sbMain.Append("<p>");
|
|
sbMain.Append("<ul data-role=\"listview\" data-inset=\"true\">");
|
|
StringBuilder sbDet = new StringBuilder();
|
|
string condition = "BILLNO = '" + cp.BILLNO + "'";
|
|
List<Chfee_do_detail> list = new List<Chfee_do_detail>();
|
|
list = ChpayapplicationDAL.GetBodyAuditList(0,50,condition);
|
|
foreach (var fee in list)
|
|
{
|
|
//费用名称
|
|
sbDet.Append("<li data-role=\"list-divider\" style=\"font-size:18px\">");
|
|
sbDet.Append(fee.FEENAME);
|
|
sbDet.Append("</li>");
|
|
//主提单号
|
|
sbDet.Append("<li>");
|
|
sbDet.Append("主提单号:"+fee.MBLNO);
|
|
sbDet.Append("</li>");
|
|
//委托单位
|
|
sbDet.Append("<li>");
|
|
sbDet.Append("委托单位:"+fee.CUSTOMERNAME);
|
|
sbDet.Append("</li>");
|
|
//核销金额
|
|
sbDet.Append("<li>");
|
|
sbDet.Append("核销金额:"+fee.AMOUNT);
|
|
sbDet.Append("</li>");
|
|
//原始金额
|
|
sbDet.Append("<li>");
|
|
sbDet.Append("原始金额:"+fee.ORIGAMOUNT);
|
|
sbDet.Append("</li>");
|
|
//原始币别
|
|
sbDet.Append("<li>");
|
|
sbDet.Append("原始币别:" + fee.ORIGCURRENCY);
|
|
sbDet.Append("</li>");
|
|
//原始汇率
|
|
sbDet.Append("<li>");
|
|
sbDet.Append("原始汇率:"+fee.ORIGEXCHANGERATE);
|
|
sbDet.Append("</li>");
|
|
//开船日期
|
|
sbDet.Append("<li>");
|
|
sbDet.Append("开船日期:" + fee.ETD);
|
|
sbDet.Append("</li>");
|
|
}
|
|
|
|
sbMain.Append(sbDet.ToString());
|
|
sbMain.Append("</ul>");
|
|
sbMain.Append("</p>");
|
|
sbMain.Append("</div>");
|
|
sbMain.Append("</li>");
|
|
}
|
|
model.content = sbMain.ToString();
|
|
|
|
//页脚按钮
|
|
StringBuilder sbFooter = new StringBuilder();
|
|
if (_User.uid == null || _User.uid == string.Empty)
|
|
{
|
|
sbFooter.Append("<li><a href=\"#\" data-icon=\"minus\" id=\"btnBack\">返回</a></li>");
|
|
}
|
|
else
|
|
{
|
|
sbFooter.Append("<li><a href=\"#\" data-icon=\"minus\" id=\"btnBack\">返回</a></li>");
|
|
sbFooter.Append("<li><a href=\"#\" data-icon=\"check\" id=\"btnOKALL\">全部通过</a></li>");
|
|
sbFooter.Append("<li><a href=\"#\" data-icon=\"check\" id=\"btnOK\">所选通过</a></li>");
|
|
sbFooter.Append("<li><a href=\"#\" data-icon=\"delete\" id=\"btnNO\">驳回</a></li>");
|
|
}
|
|
|
|
model.footer = sbFooter.ToString();
|
|
}
|
|
else
|
|
{
|
|
model.footer ="<li><a href=\"#\" data-icon=\"minus\" id=\"btnBack\">返回</a></li>";
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
} |