20230921_2

DS7_JinGang
dengyu 1 year ago
parent 3e3ac668d8
commit cb2c39e3f1

1
.gitignore vendored

@ -96,3 +96,4 @@ DSWeb/Properties/PublishProfiles/FolderProfile.pubxml
/JobReqWebData/bin/Release/Newtonsoft.Json.dll
/JobReqWebData/bin/Release/JobReqWebData.pdb
/JobReqWebData/bin/Release/JobReqWebData.dll
/DS7SQL/update.rar

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort />

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
<assemblyIdentity name="DBUpd.application" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
<description asmv2:publisher="DBUpd" asmv2:product="DBUpd" xmlns="urn:schemas-microsoft-com:asm.v1" />
<deployment install="true" mapFileExtensions="true" />
<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
<framework targetVersion="4.5.2" profile="Full" supportedRuntime="4.0.30319" />
</compatibleFrameworks>
<dependency>
<dependentAssembly dependencyType="install" codebase="DBUpd.exe.manifest" size="6347">
<assemblyIdentity name="DBUpd.exe" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>nnDB23cR1Gvz/HlfFLvEnbTWOcdg7Rnr1qigjdVTu1Q=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
</asmv1:assembly>

Binary file not shown.

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="DBUpd.Properties.Settings.updateConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\update.mdb;Persist Security Info=True" providerName="System.Data.OleDb" />
<add name="DBUpd.Properties.Settings.UserInfoConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\UserInfo.mdb" providerName="System.Data.OleDb" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="JetEntityFrameworkProvider" type="JetEntityFrameworkProvider.JetProviderServices, JetEntityFrameworkProvider" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="JetEntityFrameworkProvider" />
<add invariant="JetEntityFrameworkProvider" name="Jet Entity Framework Provider" description="Jet Entity Framework Provider" type="JetEntityFrameworkProvider.JetProviderFactory, JetEntityFrameworkProvider" />
</DbProviderFactories>
</system.data>
</configuration>

@ -0,0 +1,119 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
<asmv1:assemblyIdentity name="DBUpd.exe" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
<application />
<entryPoint>
<assemblyIdentity name="DBUpd" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<commandLine file="DBUpd.exe" parameters="" />
</entryPoint>
<trustInfo>
<security>
<applicationRequestMinimum>
<PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
<defaultAssemblyRequest permissionSetReference="Custom" />
</applicationRequestMinimum>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!--
UAC 清单选项
如果要更改 Windows 用户帐户控制级别,请用以下节点之一替换
requestedExecutionLevel 节点。
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
如果要利用文件和注册表虚拟化提供
向后兼容性,请删除 requestedExecutionLevel 节点。
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentOS>
<osVersionInfo>
<os majorVersion="5" minorVersion="1" buildNumber="2600" servicePackMajor="0" />
</osVersionInfo>
</dependentOS>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="4.0.30319.0" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="DBUpd.exe" size="122864">
<assemblyIdentity name="DBUpd" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>BL8OldmOXHAnqeHUu1qu6E7eQ2I+tSu/W+/zxEH7OEw=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="EntityFramework.dll" size="4991352">
<assemblyIdentity name="EntityFramework" version="6.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>/0K8pwRgXhh6u0VSOGixUSjWrxworUCkV51QfTSpU7I=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="EntityFramework.SqlServer.dll" size="591752">
<assemblyIdentity name="EntityFramework.SqlServer" version="6.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>qWDdTS8PN7PAn/uVZ8MkJrh5ExDX65NcBMgZw9Rr1J4=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="JetEntityFrameworkProvider.dll" size="281600">
<assemblyIdentity name="JetEntityFrameworkProvider" version="6.0.0.0" publicKeyToken="756CF6BEB8FE7B41" language="neutral" processorArchitecture="x86" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>8twqZIsY/fRf0QeLMLqpkTJEt8M4WtFQuazzh1qbADc=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<file name="DBUpd.exe.config" size="1752">
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>UlTIj14Pg2eGVyhV4NrNuVLOWeb/8QodN7H6wb1v3kA=</dsig:DigestValue>
</hash>
</file>
<file name="update.mdb" size="51638272" writeableType="applicationData">
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>Up2WnRKgIOax3kOnuddasdPXPTED39lnlOU+/BEbz30=</dsig:DigestValue>
</hash>
</file>
<file name="UserInfo.mdb" size="1957888" writeableType="applicationData">
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>xbGWZVUxCZfYANpnI3kGl4RcL19XKlkCpENJO8oSD6k=</dsig:DigestValue>
</hash>
</file>
</asmv1:assembly>

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

@ -0,0 +1,58 @@
[database]
Provider=SQLOLEDB.1;
Password=Ds2019*20040201;
Persist Security Info=False;
User ID=sa;
Initial Catalog=shippingweb_ds;
Data Source=47.104.102.13,3433;
Use Procedure for Prepare=1;
Auto Translate=True;
Workstation ID=server
[other]
emp=邓羽
subcompy=青岛分公司
Exrate=7.7
qdisp=1
edmainbill=1
aedisp=1
sidisp=1
webmsg=1
closeusedate=0
[View]
t_project=1
Viewskin=4
tabindex=0
[NYKEDI]
SEND=030
RECIEVE=3213
SENDNAME=3213321
FTPSERVER=
FTPPATH=/
FTPNAME=
FTPPASS=
[PINGZHENG]
USDRATE=6.8
[seaeorder]
op=邓羽
opdept=软件开发部
kf=邓羽
kfdept=软件开发部
savecheck=1
[YMEDI]
SEND=
RECIEVE=
SENDNAME=
FTPSERVER=
FTPPATH=/
FTPNAME=
FTPPASS=
[BBEDI]
SENDCODE=启明信息青岛分公司
RECIEVECODE=
[CMA]
SEND_CODE=
SEND_NAME=
RECEIVE_CODE=
RECEIVE_NAME=

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -3418,5 +3418,186 @@ namespace DSWeb.Common.DB
}
[Table("ch_fee_InvListSettlement")]
public class ChFeeInvListSettlement
{
/// <summary>
///
/// </summary>
[Key]
public string GID { get; set; }
/// <summary>
///
/// </summary>
public string BILLNO { get; set; }
/// <summary>
///
/// </summary>
public int? BILLSTATUS { get; set; }
/// <summary>
///
/// </summary>
public string INPUTBY { get; set; }
/// <summary>
///
/// </summary>
public string INPUTBYID { get; set; }
/// <summary>
///
/// </summary>
public DateTime? INPUTTIME { get; set; }
/// <summary>
///
/// </summary>
public DateTime? SETTLETIME { get; set; }
/// <summary>
///
/// </summary>
public string CORPID { get; set; }
/// <summary>
///
/// </summary>
public string REMARK { get; set; }
/// <summary>
///
/// </summary>
public string INVNOTOTAL { get; set; }
/// <summary>
///
/// </summary>
public string MBLNOTOTAL { get; set; }
/// <summary>
///
/// </summary>
public string SETTLEMENTBILLNO { get; set; }
/// <summary>
///
/// </summary>
public decimal? AMOUNTTOTAL { get; set; }
/// <summary>
///
/// </summary>
public string CURRENCY { get; set; }
}
[Table("ch_fee_InvListSettlement_AppList")]
public class ChFeeInvListSettlementAppList
{
/// <summary>
///
/// </summary>
[Key]
public string GID { get; set; }
/// <summary>
///
/// </summary>
public string BSNO { get; set; }
/// <summary>
///
/// </summary>
public string APPLICATIONGID { get; set; }
/// <summary>
///
/// </summary>
public string INVOICECUSTNAME { get; set; }
/// <summary>
///
/// </summary>
public decimal? APPLYAMOUNT { get; set; }
/// <summary>
///
/// </summary>
public string CURRENCY { get; set; }
}
[Table("ch_fee_InvListSettlement_AppSettlementDetail")]
public class ChFeeInvListSettlementAppSettlementDetail
{
/// <summary>
///
/// </summary>
[Key]
public string GID { get; set; }
/// <summary>
///
/// </summary>
public string BSNO { get; set; }
/// <summary>
///
/// </summary>
public string APPLICATIONGID { get; set; }
public string BILLNO { get; set; }
/// <summary>
///
/// </summary>
public decimal? AMOUNT { get; set; }
/// <summary>
///
/// </summary>
public string SETTLEMENTBILLNO { get; set; }
/// <summary>
///
/// </summary>
public string INVNO { get; set; }
}
[Table("ch_fee_InvListSettlement_InvList")]
public class ChFeeInvListSettlementInvList
{
/// <summary>
///
/// </summary>
[Key]
public string GID { get; set; }
/// <summary>
///
/// </summary>
public string BSNO { get; set; }
/// <summary>
///
/// </summary>
public string INVOICECUSTNAME { get; set; }
/// <summary>
///
/// </summary>
public string INVNO { get; set; }
/// <summary>
///
/// </summary>
public string CURRENCY { get; set; }
/// <summary>
///
/// </summary>
public decimal? AMOUNT { get; set; }
/// <summary>
///
/// </summary>
public string SETTLEMENTBILLNO { get; set; }
}
}

@ -118,6 +118,13 @@ namespace DSWeb.Common.DB
public DbSet<op_task_md> op_task { get; set; }
public DbSet<VW_JGWL_APPLYNEEDREAD_md> VW_JGWL_APPLYNEEDREAD { get; set; }
public DbSet<ChFeeInvListSettlement> ch_fee_InvListSettlement { get; set; }
public DbSet<ChFeeInvListSettlementAppList> ch_fee_InvListSettlement_AppList { get; set; }
public DbSet<ChFeeInvListSettlementAppSettlementDetail> ch_fee_InvListSettlement_AppSettlementDetail { get; set; }
public DbSet<ChFeeInvListSettlementInvList> ch_fee_InvListSettlement_InvList { get; set; }
}

@ -3649,7 +3649,9 @@ SELECT @ps_BillNo as N'billno'";
{"单证员",10},
{"箱使堆存",30},
{"EDI备注",2000},
{"航线管理",20}
{"航线管理",20},
{"订舱序列号",100}
};
foreach (var item in lengthDic)

@ -0,0 +1,380 @@
using System;
using System.Linq;
using System.Web.Mvc;
using DSWeb.Areas.Account.DAL.Chfee_InvListSettlement;
using DSWeb.Areas.Account.Models.Chfee_do_detail;
using DSWeb.Areas.Account.Models.BillChfeeDetail;
using DSWeb.MvcShipping.Helper;
using DSWeb.MvcShipping.Comm.Cookie;
using DSWeb.Areas.CommMng.DAL;
using System.Collections.Generic;
using HcUtility.Comm;
using HcUtility.Core;
using DSWeb.EntityDA;
using DSWeb.Areas.Account.Models.Chfee_Exrate;
using DSWeb.MvcShipping.DAL.MsSysBillNoSet;
using DSWeb.MvcShipping.Models.MsSysBillNoSet;
using DSWeb.MvcShipping.DAL.MsSysParamSet;
using System.Data;
using DSWeb.MvcShipping.DAL.MsCodeGoodInv;
using DSWeb.MvcShipping.DAL.MsChFeeDAL;
using DSWeb.Common.DB;
using System.Data.Entity.Migrations;
using DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication;
using DSWeb.MvcContainer.DAL.MsCodeCtnTk;
namespace DSWeb.Areas.Account.Controllers
{
[JsonRequestBehavior]
public class Chfee_InvListSettlementController : Controller
{
//
// GET:
public ActionResult Index()
{
return View();
}
//
// GET: /
public ActionResult Edit()
{
return View();
}
// GET
public ContentResult GetDataList(int start, int limit, string sort, string condition)
{
int totel = 0;
var dataList = Chfee_InvListSettlementDAL.GetDataList(start, limit, condition, out totel, Convert.ToString(Session["USERID"]), CookieConfig.GetCookie_UserCode(Request), Convert.ToString(Session["COMPANYID"]), sort);
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = totel, data = dataList.ToList() });
return new ContentResult() { Content = json };
}
public ContentResult GetBody_App( string GID)
{
int totel = 0;
var dataList = Chfee_InvListSettlementDAL.GetAppList(GID);
if (dataList != null) {
totel=dataList.Count;
}
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = totel, data = dataList.ToList() });
return new ContentResult() { Content = json };
}
public ContentResult GetBody_Inv(string GID)
{
int totel = 0;
var dataList = Chfee_InvListSettlementDAL.GetInvList(GID);
if (dataList != null)
{
totel = dataList.Count;
}
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = totel, data = dataList.ToList() });
return new ContentResult() { Content = json };
}
//public ContentResult GetBody_AppSettlement(int start, int limit, string sort, string condition, string isaudit, string userid, string companyid)
//{
// int totel = 0;
// var dataList = Chfee_InvListSettlementDAL.GetAuditDataList(start, limit, condition, out totel, userid, isaudit, companyid, sort);
// var list = dataList.Skip(start).Take(limit);
// var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = totel, data = list.ToList() });
// return new ContentResult() { Content = json };
//}
public ContentResult GetData(string handle, string condition)
{
ChFeeInvListSettlement head = null;
if (handle == "edit")
{
var list = Chfee_InvListSettlementDAL.GetDataListAll(condition, Convert.ToString(Session["USERID"]), CookieConfig.GetCookie_UserCode(Request), Convert.ToString(Session["COMPANYID"]));
if (list.Count > 0)
head = list[0];
}
if (head == null)
{
head = new ChFeeInvListSettlement();
}
if (handle == "add")
{
head.INPUTBYID= CookieConfig.GetCookie_UserId(Request);
head.CORPID = CookieConfig.GetCookie_CompanyId(Request);
head.INPUTBY = CookieConfig.GetCookie_UserName(Request);
head.CURRENCY = "RMB";
}
var json = JsonConvert.Serialize(
new { Success = true, Message = "查询成功", data = head });
return new ContentResult() { Content = json };
}
public ContentResult Save(string opstatus, string data, bool issubmit = false)
{
if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
{
var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
}
try
{
var cdc = new CommonDataContext();
var headData = JsonConvert.Deserialize<ChFeeInvListSettlement>(data);
if (opstatus == "add")
{
headData.GID = Guid.NewGuid().ToString();
//headData.BILLNO = PubSysDAL.GetBillNo("0306");
//headData.COMPANYID = CookieConfig.GetCookie_CompanyId(Request);
//headData.APPLICANT = CookieConfig.GetCookie_UserId(Request);
// headData.APPLYTIME = DateTime.Now;
headData.INPUTTIME = DateTime.Now;
//headData.DbOperationType = DbOperationType.DbotIns;
headData.BILLNO = PubSysDAL.GetBillNo("0312");
cdc.ch_fee_InvListSettlement.Add(headData);
cdc.SaveChanges();
}
else if (opstatus == "edit")
{
//headData.DbOperationType = DbOperationType.DbotUpd;
//headData.ModelUIStatus = "E";
cdc.ch_fee_InvListSettlement.AddOrUpdate(headData);
}
else
{
//headData.DbOperationType = DbOperationType.DbotDel;
}
//headData.OPERATETIME = DateTime.Now;
var jsonRespose = new JsonResponse
{
Success = true,
Message = "保存成功",
Data = headData
};
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
catch (Exception e) {
var jsonRespose = new JsonResponse
{
Success = false,
Message = e.Message,
Data = null
};
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
}
public ContentResult AddApplicatoin(string billno, string billcust, string billcurr, string feesql, string storeCurrExrate, bool islist, string GID, bool custgroup = false)
{
if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
{
var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
}
var exrateList = JsonConvert.Deserialize<List<ChFeeExrate>>(storeCurrExrate);
if (islist) {
var bodylist = ChinvoiceapplicationDAL.GetFeeDetailList(feesql + " and '代理'+FEENAME NOT IN (Select GOODNAME from code_goods_inv) ", Convert.ToString(Session["USERID"]), CookieConfig.GetCookie_UserCode(Request), Convert.ToString(Session["COMPANYID"]));
if (bodylist.Count != 0) {
var feenamelist = "";
if (bodylist != null)
{
foreach (var enumValue in bodylist)
{
feenamelist = feenamelist + enumValue.FeeName + ",";
}
}
if (feenamelist != "") {
var jsonRespose = new JsonResponse { Success = false, Message = "费用名称:" + feenamelist + "不在发票商品明细中,请先维护发票商品明细!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
}
}
var headData = ChinvoiceapplicationDAL.GetData(" BILLNO='" + billno + "'", Convert.ToString(Session["USERID"]), CookieConfig.GetCookie_UserCode(Request), Convert.ToString(Session["COMPANYID"]));
if ((exrateList == null) || (exrateList.Count == 0))
{
exrateList = ChinvoiceapplicationDAL.GetCurrExrateData(billcust, billcurr, feesql, custgroup);
if (exrateList.Count == 0)
{
var modb = new ModelObjectDB();
DBResult result = ChinvoiceapplicationDAL.AddBill(billno, billcust, billcurr, feesql, exrateList, Convert.ToString(Session["COMPANYID"]), islist, GID, headData, custgroup, Convert.ToString(Session["USERID"]));
if (result.Success) { ChinvoiceapplicationDAL.p_update_Amount(billno, GID); }
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
else
{
var INVGETNOWEXCHANGE = MsSysParamSetDAL.GetData("PARAMNAME='INVGETNOWEXCHANGE'").PARAMVALUE;
if (INVGETNOWEXCHANGE == "1")
{
var invratelist = MsChFeeDAL.GetFeeNowInvCurrList(headData.APPLYTIME);
if (invratelist != null)
{
foreach (var exrate in exrateList)
{
foreach (var invrate in invratelist)
{
if (invrate.CURR == exrate.CURR)
{
exrate.DFEXRATE = invrate.DEFRATE;
}
}
}
}
}
var jsonRespose = new JsonResponse { Success = true, Message = "查询成功", Data = exrateList.ToList() };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
}
else
{
var modb = new ModelObjectDB();
DBResult result = ChinvoiceapplicationDAL.AddBill(billno, billcust, billcurr, feesql, exrateList, Convert.ToString(Session["COMPANYID"]), islist, GID, headData, false, Convert.ToString(Session["USERID"]));
if (result.Success) { ChinvoiceapplicationDAL.p_update_Amount(billno, GID); }
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
}
public ContentResult DelApplication(string data, string billno, string GID)
{
var bodyList = JsonConvert.Deserialize<List<Chfee_do_detail>>(data);
DBResult result = ChinvoiceapplicationDAL.DelFeeDo(bodyList, GID);
if (result.Success) { ChinvoiceapplicationDAL.p_update_Amount(billno, GID); }
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
public ContentResult Delete(string data)
{
var cdc = new CommonDataContext();
var _headData = JsonConvert.Deserialize<ChFeeInvListSettlement>(data);
//var dataList = ChinvoiceapplicationDAL.GetBodyList("BILLNO='" + headData.BILLNO + "'");
//DBResult result = ChinvoiceapplicationDAL.DelFeeDo(dataList, headData.GID);
var headdata = cdc.ch_fee_InvListSettlement.FirstOrDefault(x => x.GID == _headData.GID);
var jsonRespose = new JsonResponse { Success = false, Message = "" };
if (headdata != null)
{
if (headdata.BILLSTATUS == 1)
{
jsonRespose.Success = false;
jsonRespose.Message = "已结算的批量结算单不能删除";
}
else
{
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA();
var blUpSQL = $" delete from ch_fee_InvListSettlement where GID='{headdata.GID}' ";
blUpSQL += $" delete from ch_fee_InvListSettlement_AppList where BSNO='{headdata.GID}' ";
blUpSQL += $" delete from ch_fee_InvListSettlement_AppSettlementDetail where BSNO='{headdata.GID}' ";
blUpSQL += $" delete from ch_fee_InvListSettlement_InvList where BSNO='{headdata.GID}' ";
bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL);
jsonRespose.Success = true;
jsonRespose.Message = "删除成功";
}
}
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
#region 用excel批量上传发票信息
public ContentResult ImportFile()
{
var jsonRespose = new JsonResponse { Success = false, Message = "" };
var dt = new DataTable();
var _r = BasicDataRefDAL.RequestExceltoDatatable(Request, out dt);
var GID = Request.Form["GID"];
if (_r.Success)
{
//var _rn = MsCodeCtnTkDAL.ImportInv(GID, Session["SHOWNAME"].ToString(), dt);
//if (_rn >= 0)
//{
// jsonRespose.Success = true;
// jsonRespose.Message = $"成功上传{_rn.ToString()}条发票数据";
//}
}
else
{
jsonRespose = new JsonResponse(_r);
}
return jsonRespose.getContentReult();
}
#endregion
public ContentResult CheckCanDoSettlement() {
var result = new ContentResult();
return result;
}
public ContentResult DoSettlement()
{
var result = new ContentResult();
return result;
}
}
}

@ -0,0 +1,499 @@
using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using DSWeb.Areas.Account.Models.Chfee_do_detail;
using DSWeb.Areas.Account.Models.MsOpBill;
using DSWeb.Areas.Account.Models.BillChfeeDetail;
using Microsoft.Practices.EnterpriseLibrary.Data;
using DSWeb.Areas.Account.Models.Chfee_Exrate;
using DSWeb.Areas.Account.Models.Chfee_do_Sum;
using DSWeb.Areas.CommMng.Models;
using DSWeb.EntityDA;
using HcUtility.Comm;
using DSWeb.Areas.CommMng.DAL;
using DSWeb.Areas.Account.Models.ChfeeDetail;
using DSWeb.MvcShipping.DAL.MsCodeGoodInv;
using DSWeb.Areas.MvcShipping.DAL;
using DSWeb.MvcShipping.DAL.MsSysParamSet;
using DSWeb.MvcShipping.DAL.MsBaseInfoDAL;
using DSWeb.Areas.Account.Models.TruckChfee_do_detail;
using System.Data.SqlClient;
using DSWeb.Areas.Account.Models.Chfee_Invoice;
using DSWeb.Common.DB;
using System.Web.Mvc;
using System.Linq;
using DSWeb.Areas.Account.Models.Chfee_Invoiceapplication;
namespace DSWeb.Areas.Account.DAL.Chfee_InvListSettlement
{
public partial class Chfee_InvListSettlementDAL
{
#region 业务查询列表
static public List<ChFeeInvListSettlement> GetDataList(int start, int limit, string strCondition, out int totel, string userid = "", string usercode = "", string orgcode = "", string sort = null)
{
var rangstr = GetRangStr("", userid, usercode, orgcode);
if (!string.IsNullOrEmpty(rangstr))
{
if (!string.IsNullOrEmpty(strCondition))
{
strCondition = strCondition + " and " + rangstr;
}
else
{
strCondition = rangstr;
}
}
var strSql = new StringBuilder();
strSql.Append(@"SELECT *,dbo.GetFeeNoStlByInvNo(BILLNO) as NOSTL from (SELECT row_number() over (");
var sortstring = DatasetSort.Getsortstring(sort);
if (!string.IsNullOrEmpty(sortstring))
{
//sortstring = sortstring.Replace("APPLICANTNAME", "(select ShowName from [user] where GID=cm.APPLICANT)");
//sortstring = sortstring.Replace("INVOICECATEGORYREF", "(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=97008 and EnumValueID=cm.INVOICECATEGORY)");
//sortstring = sortstring.Replace("BILLSTATUSREF", "(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=97010 and EnumValueID=cm.BILLSTATUS)");
//sortstring = sortstring.Replace("INVOICENOREF", "(select top 1 INVOICENO from ch_fee_invoice where BILLNO=cm.INVBILLNO)");
//sortstring = sortstring.Replace("INVDATE", "(select top 1 INVOICEMAKETIME from ch_fee_invoice where BILLNO=cm.INVBILLNO)");
strSql.Append(" order by " + sortstring);
}
else
{
strSql.Append(" order by INPUTTIME DESC");
}
strSql.Append(@") as num , ");
strSql.Append(" GID, BILLNO, BILLSTATUS, INPUTBY, INPUTBYID, INPUTTIME, SETTLETIME, CORPID, REMARK, INVNOTOTAL, MBLNOTOTAL, SETTLEMENTBILLNO, AMOUNTTOTAL, CURRENCY ");
strSql.Append(" FROM ch_fee_InvListSettlement where 1=1 ");
if (!string.IsNullOrEmpty(strCondition))
{
strSql.Append(" and " + strCondition);
}
strSql.Append(@")as t ");
strSql.Append(string.Format("where t.num>{0} and t.num<={1} order by t.num ", start, start + limit)); //
totel = getTotalCount(strCondition);
return SetData(strSql);
}
static public List<ChFeeInvListSettlement> GetDataListAll(string strCondition, string userid = "", string usercode = "", string orgcode = "", string sort = null)
{
var rangstr = "";
if (!string.IsNullOrEmpty(userid))
rangstr = GetRangStr("", userid, usercode, orgcode);
if (!string.IsNullOrEmpty(rangstr))
{
if (!string.IsNullOrEmpty(strCondition))
{
strCondition = strCondition + " and " + rangstr;
}
else
{
strCondition = rangstr;
}
}
var strSql = new StringBuilder();
strSql.Append("SELECT GID,BILLNO,BILLSTATUS,CUSTOMERNAME,ACTUALCUSTOMERNAME,CURRENCY,INVOICECUSTNAME,INVOICECATEGORY ");
strSql.Append(" ,BSNO,MBLNO,VESSELVOYAGE,POL,POD,ETD,APPLYAMOUNT,INVAMOUNT,AMOUNTCAPITAL,OTCURRAMOUNT");
strSql.Append(" ,APPLICANT,APPLYTIME,ENTERTIME,OPERATOR,OPERATETIME,INVBILLNO ");
strSql.Append(" ,REMARK,SHENREMARK,COMPANYID,ISAPPLY,CUSTRATENO,CUSTADDRTEL,CUSTBANK,RATE,INVOICENO,RECVCURR,FEEAMOUNT ");
strSql.Append(",(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=97010 and EnumValueID=cm.BILLSTATUS) as BILLSTATUSREF");
strSql.Append(",(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=97008 and EnumValueID=cm.INVOICECATEGORY) as INVOICECATEGORYREF");
strSql.Append(",(select ShowName from [user] where GID=cm.APPLICANT) as APPLICANTNAME");
strSql.Append(",(select DEPTNAME from [VW_user] where userid=cm.APPLICANT) as APPLICANTDEPT");
strSql.Append(",(select top 1 INVOICENO from ch_fee_invoice where BILLNO=cm.INVBILLNO) as INVOICENOREF ");
strSql.Append(",(select top 1 INVOICEMAKETIME from ch_fee_invoice where BILLNO=cm.INVBILLNO) as INVDATE ");
strSql.Append(",PAYCOMPANYID,(select name from company where gid=cm.PAYCOMPANYID) PAYCOMPANYREF,0 IsAudit,REASON,cm.ISPRINT,cm.PRINTCOUNT ");
strSql.Append(",PUSHMODE,PUSHMOBILE,PUSHEMAIL,dbo.F_getEnumValue(0,80002,cm.PUSHMODE) as PUSHMODEREF,'' as NOSTL");
strSql.Append(" FROM ch_fee_invoiceapplication cm where 1=1 ");
if (!string.IsNullOrEmpty(strCondition))
{
strSql.Append(" and " + strCondition);
}
var sortstring = DatasetSort.Getsortstring(sort);
if (!string.IsNullOrEmpty(sortstring))
{
strSql.Append(" order by " + sortstring);
}
else
{
strSql.Append(" order by APPLYTIME DESC");
}
return SetData(strSql);
}
public static int getTotalCount(string strCondition)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select count(*) ");
strSql.Append(" FROM ch_fee_InvListSettlement cm where 1=1 ");
if (!string.IsNullOrEmpty(strCondition))
{
strSql.Append(" and " + strCondition);
}
int cnt = 0;
Database db = DatabaseFactory.CreateDatabase();
using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
{
while (reader.Read())
{
cnt = Convert.ToInt32(reader[0]);
}
}
return cnt;
}
/*可开发票列表 */
static public List<ChFeeInvListSettlement> GetDataInvList(string strCondition, string userid = "", string usercode = "", string orgcode = "", string sort = null)
{
var rangstr = GetRangStr("", userid, usercode, orgcode);
if (!string.IsNullOrEmpty(rangstr))
{
if (!string.IsNullOrEmpty(strCondition))
{
strCondition = strCondition + " and " + rangstr;
}
else
{
strCondition = rangstr;
}
}
var strSql = new StringBuilder();
strSql.Append(" SELECT GID,cm.BILLNO,BILLSTATUS,CUSTOMERNAME,ACTUALCUSTOMERNAME,CURRENCY,INVOICECUSTNAME,INVOICECATEGORY ");
strSql.Append(" ,BSNO,MBLNO,VESSELVOYAGE,POL,POD,ETD,APPLYAMOUNT,INVAMOUNT,AMOUNTCAPITAL,OTCURRAMOUNT");
strSql.Append(" ,APPLICANT,APPLYTIME,ENTERTIME,OPERATOR,OPERATETIME,INVBILLNO ");
strSql.Append(" ,REMARK,SHENREMARK,COMPANYID,ISAPPLY,CUSTRATENO,CUSTADDRTEL,CUSTBANK,RATE,INVOICENO,RECVCURR,FEEAMOUNT ");
strSql.Append(",(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=97010 and EnumValueID=cm.BILLSTATUS) as BILLSTATUSREF");
strSql.Append(",(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=97008 and EnumValueID=cm.INVOICECATEGORY) as INVOICECATEGORYREF");
strSql.Append(",(select ShowName from [user] where GID=cm.APPLICANT) as APPLICANTNAME");
strSql.Append(",(select DEPTNAME from [VW_user] where userid=cm.APPLICANT) as APPLICANTDEPT");
strSql.Append(",(select top 1 INVOICENO from ch_fee_invoice where BILLNO=cm.INVBILLNO) as INVOICENOREF,null INVDATE ");
strSql.Append(",PAYCOMPANYID,(select name from company where gid=cm.PAYCOMPANYID) PAYCOMPANYREF,0 IsAudit,REASON,cm.ISPRINT,cm.PRINTCOUNT ");
strSql.Append(",PUSHMODE,PUSHMOBILE,PUSHEMAIL,dbo.F_getEnumValue(0,80002,cm.PUSHMODE) as PUSHMODEREF,'' as NOSTL");
strSql.Append(" FROM ch_fee_invoiceapplication cm ");
strSql.Append(" left join v_fee_do_payinvoiceNoInv NV ON (NV.BILLNO=cm.BILLNO) where ISNULL(NV.BILLNO,'')<>'' ");
if (!string.IsNullOrEmpty(strCondition))
{
strSql.Append(" and " + strCondition);
}
var sortstring = DatasetSort.Getsortstring(sort);
if (!string.IsNullOrEmpty(sortstring))
{
strSql.Append(" order by " + sortstring);
}
else
{
strSql.Append(" order by APPLYTIME DESC");
}
return SetData(strSql);
}
static public ChFeeInvListSettlement GetData(string condition, string userid = "", string usercode = "", string orgcode = "")
{
var list = GetDataListAll(condition, userid, usercode, orgcode);
if (list.Count > 0)
return list[0];
return new ChFeeInvListSettlement();
}
private static List<ChFeeInvListSettlement> SetData(StringBuilder strSql)
{
var headList = new List<ChFeeInvListSettlement>();
Database db = DatabaseFactory.CreateDatabase();
using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
{
while (reader.Read())
{
ChFeeInvListSettlement data = new ChFeeInvListSettlement();
#region Set DB data to Object
data.GID = Convert.ToString(reader["GID"]);
data.BILLNO = Convert.ToString(reader["BILLNO"]);
data.BILLSTATUS = Convert.ToInt32(reader["BILLSTATUS"]);
data.INPUTBY = Convert.ToString(reader["INPUTBY"]);
data.INPUTBYID = Convert.ToString(reader["INPUTBYID"]);
if (reader["INPUTTIME"] != DBNull.Value)
data.INPUTTIME = Convert.ToDateTime(reader["INPUTTIME"]);
if (reader["SETTLETIME"] != DBNull.Value)
data.SETTLETIME = Convert.ToDateTime(reader["SETTLETIME"]);
data.CORPID = Convert.ToString(reader["CORPID"]);
data.REMARK = Convert.ToString(reader["REMARK"]);
data.INVNOTOTAL = Convert.ToString(reader["INVNOTOTAL"]);
data.MBLNOTOTAL = Convert.ToString(reader["MBLNOTOTAL"]);
data.SETTLEMENTBILLNO = Convert.ToString(reader["SETTLEMENTBILLNO"]);
if (reader["AMOUNTTOTAL"] != DBNull.Value)
data.AMOUNTTOTAL = Convert.ToDecimal(reader["AMOUNTTOTAL"]);
data.CURRENCY = Convert.ToString(reader["CURRENCY"]);
#endregion
headList.Add(data);
}
reader.Close();
}
return headList;
}
#endregion
#region 发票申请明细
static public List<ChFeeInvListSettlementAppList> GetAppList(string BSNO)
{
var cdc = new CommonDataContext();
var result = cdc.ch_fee_InvListSettlement_AppList.Where(x => x.BSNO == BSNO).ToList();
//if (!string.IsNullOrEmpty(strCondition))
//{
// strSql.Append(" where " + strCondition);
//}
return result;
}
#endregion
#region 发票明细
static public List<ChFeeInvListSettlementInvList> GetInvList(string BSNO)
{
var cdc = new CommonDataContext();
var result = cdc.ch_fee_InvListSettlement_InvList.Where(x => x.BSNO == BSNO).ToList();
//if (!string.IsNullOrEmpty(strCondition))
//{
// strSql.Append(" where " + strCondition);
//}
return result;
}
#endregion
/// <summary>
/// 向一个发票批量结算单中,增加发票申请
/// </summary>
/// <param name="billno"></param>
/// <param name="bodyList"></param>
/// <param name="curr"></param>
/// <param name="companyid"></param>
/// <param name="isList"></param>
/// <param name="GID"></param>
/// <param name="headdata"></param>
/// <returns></returns>
public static DBResult AddApplication(string BILLNO, ChInvoiceapplication appdate)
{
var result = new DBResult();
var cdc = new CommonDataContext();
try
{
var head = cdc.ch_fee_InvListSettlement.FirstOrDefault(x => x.BILLNO == BILLNO);
var newrec = new ChFeeInvListSettlementAppList
{
GID = appdate.GID,//如果重复的话直接报错
BSNO = head.GID,
APPLICATIONGID = appdate.GID,
INVOICECUSTNAME = appdate.INVOICECUSTNAME,
APPLYAMOUNT = appdate.APPLYAMOUNT,
CURRENCY = appdate.CURRENCY
};
cdc.ch_fee_InvListSettlement_AppList.Add(newrec);
cdc.SaveChanges();
result.OK("添加成功");
return result;
}
catch (Exception e)
{
result.Success = false;
result.Message = $"出现错误{e.Message},请重试或联系系统管理员";
return result;
}
}
public static DBResult DelApplication(List<string> applicationgids)
{
var result = new DBResult();
var cdc = new CommonDataContext();
try
{
var delrecs = cdc.ch_fee_InvListSettlement_AppList.Where(x => applicationgids.Contains(x.APPLICATIONGID)).ToList();
if (delrecs != null && delrecs.Count > 0)
{
cdc.ch_fee_InvListSettlement_AppList.RemoveRange(delrecs);
cdc.SaveChanges();
result.OK("添加成功");
}
else
{
result.OK("没有可以删除的项目");
}
return result;
}
catch (Exception e)
{
result.Success = false;
result.Message = $"出现错误{e.Message},请重试或联系系统管理员";
return result;
}
}
#region 权限范围
public static string GetRangStr(string tb, string userid, string username, string companyid)
{
string str = "";
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(" VISIBLERANGE,OPERATERANGE,AUTHORITYID,VSSQL ");
strSql.Append(" from VW_User_Authority ");
strSql.Append(" where [NAME]='modChfeeInvListSettlement' and USERID='" + userid + "' and ISDELETE=0");
string visiblerange = "4";
string operaterange = "4";
string AUTHORITYID = "";
string VSSQL = "";
Database db = DatabaseFactory.CreateDatabase();
using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
{
while (reader.Read())
{
visiblerange = Convert.ToString(reader["VISIBLERANGE"]);
operaterange = Convert.ToString(reader["OPERATERANGE"]);
AUTHORITYID = Convert.ToString(reader["AUTHORITYID"]);
VSSQL = Convert.ToString(reader["VSSQL"]);
break;
}
reader.Close();
}
if (visiblerange == "4")
{
str = " (INPUTBYID='" + userid + "')";
}
else if (visiblerange == "3")
{
str = " (INPUTBYID='" + userid + "')";
}
else if (visiblerange == "2")
{
var rangeDa = new RangeDA();
var deptname = rangeDa.GetDEPTNAME(userid);
str = " INPUTBYID in (select USERID from user_company where COMPANYID='" + companyid + "') and APPLICANT in (select userid from user_baseinfo where DEPTNAME='" + deptname + "')";
}
else if (visiblerange == "5")
{
var userstr = new StringBuilder();
userstr.Append(" select COMPANYID from user_authority_range_company where userid='" + userid + "' and AUTHORITYID='" + AUTHORITYID + "' and VISIBLERANGE=1");
Database userdb = DatabaseFactory.CreateDatabase();
using (IDataReader reader = userdb.ExecuteReader(CommandType.Text, userstr.ToString()))
{
str = "";
while (reader.Read())
{
if (str == "")
{
str = " (INPUTBYID in (select USERID from user_company where COMPANYID='" + companyid + "') ";
}
else
{
str = str + " or INPUTBYID in (select USERID from user_company where COMPANYID='" + companyid + "')";
};
}
str = str + ")";
reader.Close();
}
}
else if (visiblerange == "6")
{
var userstr = new StringBuilder();
userstr.Append(" select OPID,(select SHOWNAME from [user] where GID=user_authority_range_op.OPID) SHOWNAME from user_authority_range_op where userid='" + userid + "' and AUTHORITYID='" + AUTHORITYID + "' and VISIBLERANGE=1");
Database userdb = DatabaseFactory.CreateDatabase();
using (IDataReader reader = userdb.ExecuteReader(CommandType.Text, userstr.ToString()))
{
str = "";
while (reader.Read())
{
if (str == "")
{
str = " (INPUTBYID='" + Convert.ToString(reader["OPID"]) + "' ";
}
else
{
str = str + " or INPUTBYID='" + Convert.ToString(reader["OPID"]) + "'";
};
}
str = str + ")";
reader.Close();
}
}
else if (visiblerange == "1")
{
str = " COMPANYID='" + companyid + "' ";
}
else if (visiblerange == "0")
{
str = " 1=1 ";
}
VSSQL = VSSQL.Trim();
if (!string.IsNullOrEmpty(VSSQL))
{
if (!string.IsNullOrEmpty(str))
{
str = str + " and (" + VSSQL + ") ";
}
else
{
str = " (" + VSSQL + ") ";
}
}
return str;
}
#endregion
}
}

@ -4,6 +4,7 @@ using System.Collections;
using System.Collections.Generic;
using HcUtility.Core;
using Newtonsoft.Json;
using DSWeb.Common.DB;
namespace DSWeb.Areas.Account.Models.Chfee_do_detail
{
@ -358,6 +359,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_do_detail
public decimal Tax { get; set; }
public List<v_op_bs_mb> VOpBsList { get; set; }
#endregion

@ -0,0 +1,848 @@
//集运管理-路单查询
Ext.namespace('DsTruck');
DsTruck.MsChFeeAutoDuiIndex = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.DsTruck.MsChFeeAutoDuiIndex.superclass.constructor.call(this);
};
//#region 当前时间
Date.prototype.format = function (format) {
var o = {
"M+": this.getMonth() + 1, //month
"d+": this.getDate(), //day
"h+": this.getHours(), //hour
"m+": this.getMinutes(), //minute
"s+": this.getSeconds(), //second
"q+": Math.floor((this.getMonth() + 3) / 3), //quarter
"S": this.getMilliseconds() //millisecond
}
if (/(y+)/.test(format)) format = format.replace(RegExp.$1,
(this.getFullYear() + "").substr(4 - RegExp.$1.length));
for (var k in o) if (new RegExp("(" + k + ")").test(format))
format = format.replace(RegExp.$1,
RegExp.$1.length == 1 ? o[k] :
("00" + o[k]).substr(("" + o[k]).length));
return format;
}
var xhr = new XMLHttpRequest();
var currdate = new Date();
if (!xhr) {
//...其他生成xmlhttprequest方法
}
xhr.open("HEAD", location.href, true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
var datestr = xhr.getResponseHeader("Date");
currdate = new Date(datestr);
// alert(currdate.format('yyyy-MM-dd'));
}
}
xhr.send(null);
//#endregion
Ext.extend(DsTruck.MsChFeeAutoDuiIndex, Ext.Panel, {
PageSize: 100,
OprationStatus: null, //仅当弹出界面时使用
SelectedRecord: null,
initUIComponents: function () {
//定义数据集
this.storeList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
model: 'MsChFeeAutoDuimb',
remoteSort: false,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsChFeeAutoDui/GetDataList',
reader: {
id: 'GID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.formname = "MsChFeeAutoDui";
//#region 表参照
//#endregion
this.column = [
{
sortable: true, style: 'text-align:center;', align: 'right',
dataIndex: 'GID',
header: '自动对账编号',
width: 110
},
{
sortable: true, style: 'text-align:center;', align: 'right',
dataIndex: 'CUSTOMERNAME',
header: '结算对象',
width: 80
},
{
sortable: true, style: 'text-align:center;', align: 'right',
dataIndex: 'FEETYPE',
header: '收付方向',
width: 80,
renderer: function (value) {
if (value == "0") {
return "";
} else if (value == "1") {
return "应收";
} else if (value == "2") {
return "应付";
} else if (value == "3") {
return "全部应收付";
}
}
},
{
sortable: true, style: 'text-align:center;', align: 'right',
dataIndex: 'DUISTATUS',
header: '对账状态',
width: 80
},
{
sortable: true, style: 'text-align:center;', align: 'right',
dataIndex: 'STARTDATE',
header: '开始日期',
width: 80
},
{
sortable: true, style: 'text-align:center;', align: 'right',
dataIndex: 'ENDDATE',
header: '结束日期',
width: 80
},
{
sortable: true, style: 'text-align:center;', align: 'right',
dataIndex: 'OP',
header: '对帐人',
width: 80
},
{
sortable: true, style: 'text-align:center;', align: 'right',
dataIndex: 'OPDATE',
header: '操作日期',
width: 80
},
{
sortable: true, style: 'text-align:center;', align: 'right',
dataIndex: 'REMARK',
header: '备注',
width: 80
},
{
sortable: true, hidden: true,
dataIndex: 'REMARK2',
header: 'REMARK2',
width: 80
},
{
sortable: true, style: 'text-align:center;', align: 'right',
dataIndex: 'STATUS',
header: '对账情况',
width: 80
},
{
sortable: true,hidden:true,
dataIndex: 'STATUS_REF',
header: 'STATUS_REF',
width: 80
},
{
sortable: true, style: 'text-align:center;', align: 'right',
dataIndex: 'HAVEDEBIT',
header: '是否包含已对账',
width: 110,
renderer: function (value) {
if (value == "0") {
return "";
} else if (value == "1") {
return "包含已对账";
}
}
},
{
sortable: true, style: 'text-align:center;', align: 'right',
dataIndex: 'FSTATUS',
header: '费用状态',
width: 80,
renderer: function (value) {
if (value == "0") {
return "全部";
} else if (value == "1") {
return "仅已审核";
} else if (value == "2") {
return "仅未审核";
}
}
},
{
sortable: true, style: 'text-align:center;', align: 'right',
dataIndex: 'DUINO',
header: '对账单编号',
width: 110
},
{
sortable: true, align: 'right',
dataIndex: 'RMBAMOUNT',
header: 'RMB对账金额',
width: 80,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
},
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
},
{
sortable: true, align: 'right',
dataIndex: 'USDAMOUNT',
header: 'USD对账金额',
width: 80,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
},
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
},
{
sortable: true, align: 'right',
dataIndex: 'L_RMBAMOUNT',
header: 'RMB本地金额',
width: 80,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
},
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
},
{
sortable: true, align: 'right',
dataIndex: 'L_USDAMOUNT',
header: 'USD本地金额',
width: 80,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
},
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}
];
this.cellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
});
this.PCCB = Ext.create('Ext.selection.CheckboxModel', { checkOnly: true });
Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, {
width: 45
});
//定义Grid
this.gridList = new Ext.grid.GridPanel({
store: this.storeList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
/*features: [{
ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性
}],*/
selModel: this.PCCB,
plugins: [this.cellEditing],
viewConfig: {
enableTextSelection: true, //允许复制数据
autoFill: true
},
columns: [new Ext.grid.RowNumberer(),
],
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
/////////////以下部分为获取存储的gridpanel显示样式
this.column = DsTruck.GetGridPanel(GID, this.formname, this.column);
this.column.unshift(new Ext.grid.RowNumberer());
this.gridList.reconfigure(this.storeList, this.column);
////////////////////////////
this.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
this.SelectedRecord = record;
this.OprationStatus = 'edit';
DsOpenEditWin('/MvcShipping/MsChFeeAutoDui/Edit', "自动对账明细");
}, this);
//#region formSearch
//#region formSearch枚举参照相关
var _this = this;
this.storeCustomerNameRef = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListRm' }
});
this.storeCustomerNameRef.load();
//this.storeAIRLINES = Ext.create('DsExt.ux.RefTableStore', {
// model: 'Tradermb',
// proxy: { url: '/CommMng/BasicDataRef/GetTrader' }
//});
//this.storeAIRLINES.load({ params: { condition: ""} });
this.comboxCUSTOMERNAME = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '结算对象',
forceSelection: true,
store: this.storeCustomerNameRef,
queryMode: 'remote',
minChars: 1,
queryParam: 'CODENAME',
lazyRender: false,
name: 'CUSTOMERNAME',
valueField: 'CustName',
displayField: 'CodeAndName',
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.UserRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' }
});
this.comboxOP= Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '对帐人',
store: this.storeOpCode,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'OP',
valueField: 'UserName',
displayField: 'CodeAndName'
});
//#endregion
this.formSearch = Ext.widget('form', {
frame: true,
region: 'center',
bodyPadding: 5,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 90,
msgTarget: 'qtip'
},
items: [
{//fieldset 1
xtype: 'container',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [
this.comboxCUSTOMERNAME
, { fieldLabel: '提单号',
name: 'MBLNO',
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}
, {
fieldLabel: '从..开船日期',
format: 'Y-m-d',
xtype: 'datefield',
name: 'ETDbgn',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: '到..开船日期',
format: 'Y-m-d',
xtype: 'datefield',
name: 'ETDend',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
},
{
fieldLabel: '自动对账编号', //到对账日期
name: 'GID',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxOP
]
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
});
//#endregion formSearch
//菜单
var menu_SetFee = new Ext.menu.Menu({
id: 'PriceMenu',
items: [{
text: '设定超重费用',
handler: clickHandler_1
}, {
text: '超重费用取消',
handler: clickHandler_2
}, {
text: '设定重回额外费用',
handler: clickHandler_3
}, {
text: '重回额外费用取消',
handler: clickHandler_4
}]
});
me = this;
function clickHandler_1() {
me.SetFee("超重费", "150", "1");
};
function clickHandler_2() {
me.SetFee("超重费", "150", "0");
};
function clickHandler_3() {
me.SetFee("双背附加费", "600", "1");
};
function clickHandler_4() {
me.SetFee("双背附加费", "600", "0");
};
//查询工具条
this.panelBtn = new Ext.Panel({
region: "north",
tbar: [
{
text: "执行查询",
iconCls: "btnrefresh",
handler: function (button, event) {
this.onRefreshClick(button, event);
},
scope: this
}, '-', {
text: "新建",
iconCls: "btnadd",
handler: function (button, event) {
this.OprationStatus = 'add';
DsOpenEditWin("/MvcShipping/MsChFeeAutoDui/Edit", "自动对账");
},
scope: this
}, {
text: '删除',
tooltip: '删除',
iconCls: "btndeletedetail",
handler: function (button, event) {
this.onDelPCClick(button, event);
},
scope: this
}, {
text: "保存修改",
iconCls: "btnsave",
handler: function (button, event) {
this.onSaveClick(button, event);
},
scope: this
}, '-', {
text: '复制添加',
tooltip: '复制添加选中的方案',
iconCls: "btncopy",
handler: function (button, event) {
this.onCOPYNEW(button, event);
},
scope: this
}, '-', {
text: "导出Excel",
id: "btnExportExcel",
iconCls: 'btnexportexcel',
handler: function (button, event) {
this.onExportClick(button, event);
},
scope: this
}, '-', {
text: "保存列表样式",
id: "btntest",
handler: function (button, event) {
DsTruck.SaveGridPanel(GID, this.formname, this.gridList.columns, this.column, 1, false);
},
scope: this
}
]
});
//#region 布局
this.panelTop = new Ext.Panel({
layout: "border",
region: "north",
height: 70,
items: [this.formSearch, this.panelBtn]
});
Ext.apply(this, {
items: [this.panelTop, this.gridList]
});
this.storeList.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: sql });
}, this);
//#endregion
}, //end initUIComponents
onAuditRefuseClick: function (button, event) {
var sql = " A.GID in (select bsno from ch_fee where FEESTATUS=6)";
this.storeList.load({
params: { start: 0, limit: this.PageSize, sort: "", condition: sql },
waitMsg: "正在查询数据...",
scope: this
});
},
onRefreshClick: function (button, event) {
if (!this.checkSearchCondition())
return;
var sql = this.getCondition();
this.storeList.load({
//GetDataList(int start, int limit, string sort, string condition)
params: { start: 0, limit: this.PageSize, sort: "", condition: sql },
waitMsg: "正在查询数据...",
scope: this
});
},
getCondition: function () {
var form = this.formSearch.getForm();
var sql = "";
var CUSTOMERNAME = form.findField('CUSTOMERNAME').getValue();
sql = sql + getAndConSql(sql, CUSTOMERNAME, " CUSTOMERNAME like '" + CUSTOMERNAME + "'");
var GID = form.findField('GID').getValue();
sql = sql + getAndConSql(sql, GID, " GID like '%" + GID + "%'");
var OP = form.findField('OP').getValue();
sql = sql + getAndConSql(sql, OP, " OP= '" + OP + "'");
var MBLNO = form.findField('MBLNO').getValue();
sql = sql + getAndConSql(sql, MBLNO, " GID in(select BSNO from CH_FEE_AutoDuiDetail where MBLNO like '%" + MBLNO + "%') ");
var ETDbgn = form.findField('ETDbgn').getRawValue();
sql = sql + getAndConSql(sql, ETDbgn, " GID in(select BSNO from CH_FEE_AutoDuiDetail where MBLNO in(select MBLNO from v_op_bill where ETD>='" + ETDbgn + "'))");
var ETDend = form.findField('ETDend').getRawValue();
sql = sql + getAndConSql(sql, ETDend, " GID in(select BSNO from CH_FEE_AutoDuiDetail where MBLNO in(select MBLNO from v_op_bill where ETD<='" + ETDend + " 23:59:59'))");
return sql;
},
checkSearchCondition: function () {
var form = this.formSearch.getForm();
if (!form.isValid()) {
Ext.Msg.alert('提示', '查询条件赋值错误,请检查。');
return false;
}
return true;
},
OprationSwap: function () {
var ret = new Array();
ret[0] = this.OprationStatus;
ret[1] = this.storeList;
ret[2] = this.SelectedRecord;
//ret[3] = this.SelectedRecord.data.REFBILLNO;
//ret[4] = "MsRptPcHeadQryIndex";
return ret;
},
onExportClick: function (button, event) {
GridExportExcelPage(this.gridList);
},
SetFee: function (FeeName, Amount, Type) {
var _condition = this.getCondition();
var GIDList = [];
var selectedRecords = this.gridList.selModel.getSelection();
for (var i = 0; i < selectedRecords.length; i++) {
var rec = selectedRecords[i];
GIDList.push(rec.get('GID'));
}
var _GIDList = ConvertStringListToJson(GIDList);
Ext.Ajax.request({//
waitMsg: '正在初始化库存数据...',
url: '/TruckMng/MsRptPcHeadQry/SetFee',
params: {
GIDList: _GIDList,
FeeName: FeeName,
Amount: Amount,
Type: Type
},
callback: function (_count) {
//alert('初始化完成');
//重新load库存表的store
this.storeList.load({ params: { condition: _condition} });
},
scope: this
}); //request over
},
onAddPCClick: function (button, event, type) {
var store = null;
store = this.storeList;
//var truckno = Ext.getCmp('S_TRUCKNO').getValue();
record = Ext.create('PCmb', {
TRUCKNO: "",
DRVCODE: "",
DRVNAME: "",
GId: newGuid(),
BillNo: "",
DdCode: usercode,
DdCode_Ref: SHOWNAME,
DDNAME: "",
ArriveDate: currdate.format('yyyy-MM-dd'),
CustCode: "QDHE",
CustName: "海尔",
TRUCKNO: "",
MBLNO: "",
DRVNAME: "",
DRVNAME_REF: "",
MOBILE: "",
CONTAINERTYPE: "",
CONTAINERTYPE_REF: "",
CONTAINERQTY: "",
YARDCODE_REF: "",
VOYVEG_REF: "",
DSTAREA: "",
NOLOADMIL: "",
OVERLOADMIL: "",
RATEDFUEL: "",
REALFUEL: "",
LRDATE: "",
USERCODE: "",
USERNAME: "",
REFBILLNO: "",
DETINATION: "",
CONTAINERNO: "",
SEALNO: "",
Ton: "",
ActualWeight: "",
IsDoubleREF: "",
IsDoubleREF: "",
TimeMark: 0
});
var _this = this;
var data = record.data;
Ext.Msg.wait('正在保存数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在保存数据...',
url: '/TruckMng/MsWl_Haier/CreatePC',
scope: this,
async: true,
params: {
data: Ext.JSON.encode(data)
},
callback: function (options, success, response) {
if (success) {
Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
record = jsonresult.Data;
store.add(record);
cellediting = this.cellEditing;
var n = store.getCount();
cellediting.startEditByPosition({ row: n - 1, column: 2 });
} else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
} else {
Ext.Msg.show({ title: '请重试',
msg: '服务器响应出错',
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
//alert('03');
}
});
},
onDelPCClick: function (button, event) {
var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择方案!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var selectedRecords = [];
selectedRecords = this.gridList.selModel.getSelection();
/*
var candelete = DsTruck.CheckBaoxiaoDelete(selectedRecords);
if (candelete == false) {
return;
}*/
var record = selections[0];
Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) {
if (btn == 'yes') {
Ext.Msg.wait('正在删除数据...');
Ext.Ajax.request({
waitMsg: '正在删除数据...',
url: '/MvcShipping/MsChFeeAutoDui/Delete',
params: {
data: Ext.JSON.encode(record.data)
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
this.storeList.remove(record);
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
}
},
failure: function (response, options) {
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) {
},
scope: this
}); //end Ext.Ajax.request
}
}, this);
//InitData();
} //onDeleteClick
,
onSaveClick: function (button, event) {
for (var i = 0; i < this.storeList.getCount(); i += 1) {
var record = this.storeList.getAt(i);
if (record.dirty) {
Ext.Ajax.request({
waitMsg: '正在保存数据...',
url: '/TruckMng/MsWl_Haier/SaveYDHZ',
scope: this,
async: false,
params: {
data: Ext.JSON.encode(record.data)
},
callback: function (options, success, response) {
if (success) {
//Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var returnData = jsonresult.Data;
var editp = Ext.create('PCmb', returnData);
this.storeList.getAt(i).fields.each(function (field) {
if (field.persist) {
name = field.name;
//alert(name + ' -- ' + editp.get(name));
if (name != 'BillNo')
this.storeList.getAt(i).set(name, editp.get(name));
}
}, this);
this.storeList.getAt(i).commit();
} else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
} else {
Ext.Msg.show({ title: '请重试',
msg: '服务器响应出错',
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
}
});
}
}
}
});

@ -0,0 +1,60 @@
Ext.define('ChfeeInvListSettlementMd', {
extend: 'Ext.data.Model',
idProperty: 'GID',
fields: [
{ name: 'GID', type: 'string' },
{ name: 'BILLNO', type: 'string' },
{ name: 'BILLSTATUS', type: 'string' },
{ name: 'INPUTBY', type: 'string' },
{ name: 'INPUTBYID', type: 'string' },
{ name: 'INPUTTIME', type: 'string' },
{ name: 'SETTLETIME', type: 'string' },
{ name: 'CORPID', type: 'string' },
{ name: 'REMARK', type: 'string' },
{ name: 'INVNOTOTAL', type: 'string' },
{ name: 'MBLNOTOTAL', type: 'string' },
{ name: 'SETTLEMENTBILLNO', type: 'string' },
{ name: 'AMOUNTTOTAL', type: 'number' },
{ name: 'CURRENCY', type: 'string' }
]
});
Ext.define('ChfeeInvListSettlementAppListMd', {
extend: 'Ext.data.Model',
idProperty: 'GID',
fields: [
{ name: 'GID', type: 'string' },
{ name: 'BSNO', type: 'string' },
{ name: 'APPLICATIONGID', type: 'string' },
{ name: 'BILLNO', type: 'string' },
{ name: 'INVOICECUSTNAME', type: 'string' },
{ name: 'APPLYAMOUNT', type: 'string' },
{ name: 'CURRENCY', type: 'string' }
]
});
Ext.define('ChfeeInvListSettlementInvListMd', {
extend: 'Ext.data.Model',
idProperty: 'GID',
fields: [
{ name: 'GID', type: 'string' },
{ name: 'BSNO', type: 'string' },
{ name: 'INVOICECUSTNAME', type: 'string' },
{ name: 'INVNO', type: 'string' },
{ name: 'CURRENCY', type: 'string' },
{ name: 'AMOUNT', type: 'string' },
{ name: 'SETTLEMENTBILLNO', type: 'string' }
]
});
function RowClass(feeStatus) {
if (feeStatus == 1) {
return 'feestatus_pass';
} else
return '';
}

@ -0,0 +1,30 @@

Ext.BLANK_IMAGE_URL = '../../TruckMng/Content/Images/s.gif';
var panelEdit = null;
var inited = true;
var pcIndex = null;
var pcEdit = null;
var pcTabs = null;
var pcPanel = null;
var tabMainPc = null;
Ext.onReady(function () {
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = 'side';
panelEdit = new window.DsTruck.MsOpAirn_Freight_Edit({
tital: '费用方案明细',
region: 'center',
layout: 'border'
});
var view = new Ext.Viewport({
layout: 'border',
renderTo: 'viewport',
border: false,
items: [panelEdit]
});
});

@ -0,0 +1,102 @@
Ext.namespace('DsTruck');
DsTruck.FileImport = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
DsTruck.FileImport.superclass.constructor.call(this);
};
Ext.extend(DsTruck.FileImport, Ext.Window, {
StoreList: null,
initUIComponents: function () {
// BEGIN OF CODE GENERATION PARTS, DON'T DELETE CODE BELOW
Ext.apply(this, {
height: 140,
width: 200,
closable: true,
draggable: true,
defaultButton: 'btnImport',
resizable: false,
items: [{
region: "center",
frame: "true",
items: [{
xtype: 'filefield',
name: 'file', id: "filename",
fieldLabel: 'Excel文件',
labelWidth: 80,
anchor: '100%',
buttonText: '选择文件...'
}/*, {
xtype: 'monthfield',
name: 'ACCDATE',
fieldLabel: '月份',
labelWidth: 80,
anchor: '100%'
}, {
xtype: 'label',
//name: 'label1',
text: '依照月份与车号导入。月份与车号相同的会覆盖而非增加。'
//labelWidth: 80,
//anchor: '100%'
}*/],
xtype: "form",
layout: "form",
id: 'importForm',
buttons: [{
text: "导入",
id: 'btnImport',
handler: function (button, event) {
var form = Ext.getCmp("importForm").getForm();
var storeList = this.StoreList;
//var form = this.up("form").getForm();
if (form.isValid()) {
form.submit({
url: '/Account/Chfee_InvListSettlement/ImportFile', waitMsg: '正在导入文件...',
params: {
GID: panelEdit.GID
},
success: function (f, a) {
var result = a.result,
dataList = result.data;
/*
for (var i = 0; i < dataList.length; i++) {
var record = dataList[i];
storeList.add(record);
}*/
var win = Ext.getCmp("importWin");
win.close();
panelEdit.ReflashEdt(panelEdit.GID);
Ext.Msg.alert('Success', result.Message);
},
failure: function (f, a) { Ext.Msg.alert('Failure', a.result.Message); }
});
}
//this.onImportClick(button, event);
},
scope: this
}, {
text: "关闭",
handler: function (button, event) {
var win = this.up("window"); // Ext.getCmp("importWin");
win.close();
}
}]
}],
layout: "border",
width: 300,
xtype: "window",
id: "importWin"/*,
closeAction: "close"*/
});
// END OF CODE GENERATION PARTS, DON'T DELETE CODE ABOVE
}
});

@ -105,6 +105,13 @@ namespace DSWeb.Areas.CommMng.Controllers
if (formname == "查询明细")
{
var dataList = ChpayapplicationDAL.GetBodyAuditList(0, 9999, condition, "");
if (dataList != null && dataList.Count > 0) {
foreach (var item in dataList) {
item.VOpBsList= GetVOpBs(item.BSNO);
}
}
var json1 = JsonConvert.Serialize(new { Success = true, Message = "查询成功", data = dataList.ToList() });
return new ContentResult() { Content = json1 };
}
@ -152,6 +159,13 @@ namespace DSWeb.Areas.CommMng.Controllers
return new ContentResult() { Content = json1 };
}
public static List<v_op_bs_mb> GetVOpBs(string BSNO)
{
var cdc = new CommonDataContext();
var billList = cdc.v_op_bs.Where(x => x.BSNO == BSNO).ToList();
return billList;
}
/// <summary>
/// 付费发票审核
/// </summary>
@ -198,6 +212,13 @@ namespace DSWeb.Areas.CommMng.Controllers
if (formname == "查询明细")
{
var dataList = ChinvoicehexiaoDAL.GetBodyList( condition, "");
if (dataList != null && dataList.Count > 0)
{
foreach (var item in dataList)
{
item.VOpBsList = GetVOpBs(item.BSNO);
}
}
var json1 = JsonConvert.Serialize(new { Success = true, Message = "查询成功", data = dataList.ToList() });
return new ContentResult() { Content = json1 };
}
@ -343,6 +364,13 @@ namespace DSWeb.Areas.CommMng.Controllers
if (formname == "查询明细")
{
var dataList = ChinvoiceapplicationDAL.GetBodyList( condition, "");
if (dataList != null && dataList.Count > 0)
{
foreach (var item in dataList)
{
item.VOpBsList = GetVOpBs(item.BSNO);
}
}
var json1 = JsonConvert.Serialize(new { Success = true, Message = "查询成功", data = dataList.ToList() });
return new ContentResult() { Content = json1 };
}

@ -963,7 +963,6 @@ Ext.extend(Shipping.MsCodeCtnTkIndex, Ext.Panel, {
resizable: false,
border: false,
items: imgform
});
win.show();

@ -597,6 +597,11 @@
<Content Include="Areas\Account\Viewsjs\ChMonthClose\MsChMonthCloseIndex.js" />
<Content Include="Areas\Account\Viewsjs\ChMonthClose\MsChMonthCloseModel.js" />
<Content Include="Areas\Account\Viewsjs\jquery-3.1.1.js" />
<Content Include="Areas\Account\Viewsjs\Chfee_InvListSettlement\Edit.js" />
<Content Include="Areas\Account\Viewsjs\Chfee_InvListSettlement\FileImport.js" />
<Content Include="Areas\Account\Viewsjs\Chfee_InvListSettlement\Chfee_InvListSettlementEdit.js" />
<Content Include="Areas\Account\Viewsjs\Chfee_InvListSettlement\Chfee_InvListSettlementIndex.js" />
<Content Include="Areas\Account\Viewsjs\Chfee_InvListSettlement\Chfee_InvListSettlementModel.js" />
<Content Include="Areas\Account\Views\Account_Monthlock\Index.aspx" />
<Content Include="Areas\Account\Views\Chfee_Audit\BLIndex.aspx" />
<Content Include="Areas\Account\Views\Chfee_Audit\TruckIndex.aspx" />
@ -7475,6 +7480,7 @@
<Compile Include="Areas\Account\Controllers\Chfee_ForeignPayController.cs" />
<Compile Include="Areas\Account\Controllers\Chfee_ForeignsettlementController.cs" />
<Compile Include="Areas\Account\Controllers\Chfee_hexiaoController.cs" />
<Compile Include="Areas\Account\Controllers\Chfee_InvListSettlementController.cs" />
<Compile Include="Areas\Account\Controllers\Chfee_invoiceapplicationController.cs" />
<Compile Include="Areas\Account\Controllers\Chfee_invoice_HangXinController.cs" />
<Compile Include="Areas\Account\Controllers\Chfee_invoiceController.cs" />
@ -7492,6 +7498,7 @@
<Compile Include="Areas\Account\DAL\Chfee_cheque\Chfee_ChequeDAL.cs" />
<Compile Include="Areas\Account\DAL\Chfee_ForeignPay\Chfee_ForeignPayDAL.cs" />
<Compile Include="Areas\Account\DAL\Chfee_hexiao\Chfee_HexiaoDAL.cs" />
<Compile Include="Areas\Account\DAL\Chfee_InvListSettlement\Chfee_InvListSettlementDAL.cs" />
<Compile Include="Areas\Account\DAL\Chfee_invoice_HangXin\Chfee_InvBookDAL.cs" />
<Compile Include="Areas\Account\DAL\Chfee_invoice_HangXin\Chfee_InvoiceDAL.cs" />
<Compile Include="Areas\Account\DAL\Chfee_invoiceapplication\Chfee_InvoiceapplicationDAL.cs" />

@ -4,7 +4,7 @@
<ProjectView>ShowAllFiles</ProjectView>
<NameOfLastUsedPublishProfile>E:\DS7_JinGang\DS7\DSWeb\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<Use64BitIISExpress />
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort />

Loading…
Cancel
Save