@@ -13,7 +13,7 @@ | |||
<AppDesignerFolder>Properties</AppDesignerFolder> | |||
<RootNamespace>Learun.Application.WebApi</RootNamespace> | |||
<AssemblyName>Learun.Application.WebApi</AssemblyName> | |||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> | |||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion> | |||
<UseIISExpress>true</UseIISExpress> | |||
<IISExpressSSLPort /> | |||
<IISExpressAnonymousAuthentication /> | |||
@@ -107,7 +107,6 @@ | |||
<HintPath>..\packages\Oracle.ManagedDataAccess.EntityFramework.12.1.2400\lib\net45\Oracle.ManagedDataAccess.EntityFramework.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Activities" /> | |||
<Reference Include="System.Data.DataSetExtensions" /> | |||
<Reference Include="System.Net.Http" /> | |||
<Reference Include="System.Net.Http.Formatting, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | |||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.4\lib\net45\System.Net.Http.Formatting.dll</HintPath> | |||
@@ -121,7 +120,6 @@ | |||
<Reference Include="System.ComponentModel.DataAnnotations" /> | |||
<Reference Include="System" /> | |||
<Reference Include="System.Data" /> | |||
<Reference Include="System.Web.Extensions" /> | |||
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | |||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath> | |||
</Reference> | |||
@@ -155,7 +153,6 @@ | |||
<Reference Include="System.Configuration" /> | |||
<Reference Include="System.Web.Services" /> | |||
<Reference Include="System.EnterpriseServices" /> | |||
<Reference Include="System.Xml.Linq" /> | |||
<Reference Include="ThoughtWorks.QRCode, Version=1.0.4778.30637, Culture=neutral, processorArchitecture=MSIL"> | |||
<HintPath>..\packages\ThoughtWorks.QRCode.1.1.0\lib\ThoughtWorks.QRCode.dll</HintPath> | |||
</Reference> | |||
@@ -195,6 +192,7 @@ | |||
<ItemGroup> | |||
<Compile Include="Bootstraper.cs" /> | |||
<Compile Include="Modules\AnnexesApiWx.cs" /> | |||
<Compile Include="Modules\ReceiveSendFeeManagement\FinaChargeStuYearApi.cs" /> | |||
<Compile Include="Modules\StuFreshPayFeeApi.cs" /> | |||
<Compile Include="Modules\StuPayFeeApi.cs" /> | |||
<Compile Include="Modules\BaseNoLoginApi.cs" /> | |||
@@ -0,0 +1,213 @@ | |||
using System; | |||
using Learun.Application.Organization; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using Learun.Application.TwoDevelopment.EvaluationTeach; | |||
using Learun.Util; | |||
using Nancy; | |||
using System.Collections.Generic; | |||
using System.Drawing; | |||
using System.IO; | |||
using System.Linq; | |||
using System.Security.Cryptography; | |||
using System.Text; | |||
using System.Web; | |||
using System.Web.Mvc; | |||
using Learun.Application.Base.SystemModule; | |||
using Learun.Application.TwoDevelopment.Ask; | |||
using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement; | |||
using Newtonsoft.Json; | |||
using ThoughtWorks.QRCode.Codec; | |||
namespace Learun.Application.WebApi.Modules | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.0 数字化智慧校园 | |||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
/// 创建人:数字化智慧校园-框架开发组 | |||
/// 日 期:2018.01.04 | |||
/// 描 述: | |||
/// </summary> | |||
public class FinaChargeStuYearApi : BaseApi | |||
{ | |||
private FinaChargeStuYearIBLL finaChargeStuYearIBLL = new FinaChargeStuYearBLL(); | |||
public FinaChargeStuYearApi() | |||
: base("/ReceiveSendFeeManagement/FinaChargeStuYearApi") | |||
{ | |||
Get["/getpayfeelist"] = GetPayfeeList;// 获取缴费列表 | |||
//Get["/getpayfeeinfo"] = GetPayfeeInfo;//获取缴费明细 | |||
//Post["/generateqrcode"] = PayFeeQRCode;//生成缴费二维码 | |||
//Get["/getinvoice"] = GetInvoice;//获取发票 | |||
} | |||
//public Response GetInvoice(dynamic _) | |||
//{ | |||
// string keyValue = Request.Query["keyValue"]; | |||
// var list = stuInfoFreshIBLL.GetStuEnrollFeeOrder(keyValue, false); | |||
// return Success(list); | |||
//} | |||
public Response GetPayfeeList(dynamic _) | |||
{ | |||
ReqPageParam parameter = this.GetReqData<ReqPageParam>(); | |||
var data = finaChargeStuYearIBLL.GetPageList(parameter.pagination, parameter.queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = parameter.pagination.total, | |||
page = parameter.pagination.page, | |||
records = parameter.pagination.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
//public Response GetPayfeeInfo(dynamic _) | |||
//{ | |||
// string keyValue = Request.Query["keyValue"]; | |||
// var stuInfoBasic_PayFeeEntity = stuInfoBasic_PayFeeIBLL.GetStuInfoBasic_PayFeeEntity(keyValue); | |||
// var StuInfoFreshData = stuInfoBasicIbll.GetStuInfoBasicEntityByStuNo(stuInfoBasic_PayFeeEntity.StuNo); | |||
// //当前年度缴费记录 | |||
// var FinaChargesStandardList = new List<FinaChargesStandardEntity>(); | |||
// FinaChargesStandardList = finaChargesStandardIBLL.GetFinaChargesStandardListByYongYou(StuInfoFreshData.StuNo, stuInfoBasic_PayFeeEntity.PayYear.Value).ToList(); | |||
// var PayFeeTotal = FinaChargesStandardList.Select(x => x.SJAmount).Sum(); | |||
// var jsonData = new | |||
// { | |||
// StuInfoFreshData = StuInfoFreshData, | |||
// FinaChargesStandardList = FinaChargesStandardList, | |||
// PayFeeTotal = PayFeeTotal, | |||
// YJAmount = FinaChargesStandardList.Sum(x => x.PayedMoney) | |||
// }; | |||
// return Success(jsonData); | |||
//} | |||
public class PayfeeRequest | |||
{ | |||
public string strEntity { get; set; } | |||
public string detailList { get; set; } | |||
} | |||
/// <summary> | |||
/// 生成缴费二维码 | |||
/// </summary> | |||
/// <returns></returns> | |||
//public Response PayFeeQRCode(dynamic _) | |||
//{ | |||
// string keyValue = Request.Query["keyValue"]; | |||
// PayfeeRequest parameter = this.GetReqData<PayfeeRequest>(); | |||
// StuInfoFreshEntity entity = parameter.strEntity.ToObject<StuInfoFreshEntity>(); | |||
// List<StuEnrollFeeOrderDetailEntity> list = parameter.detailList.ToObject<List<StuEnrollFeeOrderDetailEntity>>(); | |||
// var model = stuInfoBasic_PayFeeIBLL.GetStuInfoBasic_PayFeeEntity(keyValue); | |||
// var imgUrl = ""; | |||
// Random ran = new Random(); | |||
// string merchantid = "105000082201406";//商户号 | |||
// string posid = "043724806";//商户柜台代码 | |||
// string branchid = "510000000";//分行代码 | |||
// string orderid = DateTime.Now.ToString("yyyyMMddhhmmss") + ran.Next(0, 100000); | |||
// string payment = entity.PayMoney.ToString(); | |||
// string curcode = "01"; | |||
// string txcode = "530550"; | |||
// string remark1 = model.StuNo; | |||
// string remark2 = model.PayYear.ToString(); | |||
// string returntype = "3"; | |||
// string timeout = DateTime.Now.AddMinutes(10).ToString("yyyyMMddHHmmss"); | |||
// string pub32tr2 = "40d987faa793a0a27e7a86ef020111"; | |||
// string bankURL = "https://ibsbjstar.ccb.com.cn/CCBIS/ccbMain?CCB_IBSVersion=V6"; | |||
// string tmp = "MERCHANTID=" + merchantid + "&POSID=" + posid + "&BRANCHID=" + branchid + "&ORDERID=" + orderid; | |||
// tmp += "&PAYMENT=" + payment + "&CURCODE=" + curcode + "&TXCODE=" + txcode + "&REMARK1=" + remark1; | |||
// tmp += "&REMARK2=" + remark2 + "&RETURNTYPE=" + returntype + "&TIMEOUT=" + timeout; | |||
// MD5 md5 = MD5.Create(); | |||
// string tmp1 = tmp; | |||
// tmp += "&PUB=" + pub32tr2; | |||
// byte[] buffer = Encoding.Default.GetBytes(tmp); | |||
// byte[] md5Buffer = md5.ComputeHash(buffer); | |||
// string strMd5 = ""; | |||
// //hdnOrderId.Value = orderid; | |||
// foreach (byte item in md5Buffer) | |||
// { | |||
// strMd5 += item.ToString("x2"); | |||
// } | |||
// string url = bankURL + "&" + tmp1 + "&MAC=" + strMd5; | |||
// string reJson = HttpMethods.Post(url); | |||
// LogEntity logEntity = new LogEntity(); | |||
// logEntity.F_CategoryId = 121; | |||
// logEntity.F_ExecuteResultJson = reJson; | |||
// logEntity.WriteLog(); | |||
// //HttpConnect conn = new HttpConnect(); | |||
// //string reJson = conn.Post(url, ""); | |||
// JsonBean MemberInfoList = JsonConvert.DeserializeObject<JsonBean>(reJson); | |||
// if (MemberInfoList.SUCCESS.Equals("true")) | |||
// { | |||
// string imgCode = HttpMethods.Post(MemberInfoList.PAYURL); | |||
// logEntity.F_CategoryId = 121; | |||
// logEntity.F_ExecuteResultJson = imgCode; | |||
// logEntity.WriteLog(); | |||
// MemberInfoList = JsonConvert.DeserializeObject<JsonBean>(imgCode); | |||
// if (MemberInfoList.SUCCESS.Equals("true")) | |||
// { | |||
// imgUrl = CreateQRImg(MemberInfoList.QRURL, orderid); | |||
// } | |||
// } | |||
// if (!string.IsNullOrEmpty(imgUrl)) | |||
// { | |||
// model.orderid = orderid; | |||
// stuInfoFreshIBLL.SaveFeeData(keyValue, model, list); | |||
// } | |||
// var backimgUrl = new{ imgUrl }; | |||
// return Success(backimgUrl); | |||
//} | |||
public class JsonBean | |||
{ | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public string SUCCESS { get; set; } | |||
public string PAYURL { get; set; } | |||
public string QRURL { get; set; } | |||
} | |||
/// <summary> | |||
/// 生成并保存二维码图片的方法 | |||
/// </summary> | |||
/// <param name="str">输入的内容</param> | |||
public string CreateQRImg(string str, string orderId) | |||
{ | |||
string QRCodeFile = Config.GetValue("QRCodeFile"); | |||
Random ran = new Random(); | |||
Bitmap bt; | |||
str = HttpUtility.UrlDecode(str); | |||
string enCodeString = str; | |||
//生成设置编码实例 | |||
QRCodeEncoder qrCodeEncoder = new QRCodeEncoder(); | |||
//设置二维码的规模,默认4 | |||
qrCodeEncoder.QRCodeScale = 3; | |||
//设置二维码的版本,默认7 | |||
qrCodeEncoder.QRCodeVersion = 7; | |||
//设置错误校验级别,默认中等 | |||
qrCodeEncoder.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M; | |||
//生成二维码图片 | |||
bt = qrCodeEncoder.Encode(enCodeString, Encoding.UTF8); | |||
//二维码图片的名称 | |||
string filename = orderId; | |||
if (!DirFileHelper.IsExistFile(QRCodeFile+"/Content/images/QRCode/")) | |||
{ | |||
Directory.CreateDirectory(QRCodeFile + "/Content/images/QRCode/"); | |||
} | |||
var path = QRCodeFile + "/Content/images/QRCode/" + filename + ".jpg"; | |||
//保存二维码图片在photos路径下 | |||
try | |||
{ | |||
bt.Save(path); | |||
} | |||
catch (Exception ex) | |||
{ | |||
return ""; | |||
} | |||
//图片控件要显示的二维码图片路径 | |||
return "/Content/images/QRCode/" + filename + ".jpg"; | |||
} | |||
} | |||
} |
@@ -1,4 +1,4 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<?xml version="1.0"?> | |||
<!-- | |||
有关如何配置 ASP.NET 应用程序的详细信息,请访问 | |||
http://go.microsoft.com/fwlink/?LinkId=169433 | |||
@@ -6,16 +6,16 @@ | |||
<configuration> | |||
<configSections> | |||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> | |||
<section name="redisconfig" type="Learun.Cache.Redis.RedisConfigInfo,Learun.Cache.Redis" /> | |||
<section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection,Microsoft.Practices.Unity.Configuration" /> | |||
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> | |||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> | |||
<section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" /> | |||
<section name="redisconfig" type="Learun.Cache.Redis.RedisConfigInfo,Learun.Cache.Redis"/> | |||
<section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection,Microsoft.Practices.Unity.Configuration"/> | |||
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/> | |||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/> | |||
<section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342"/> | |||
</configSections> | |||
<unity configSource="XmlConfig\ioc.config" /> | |||
<connectionStrings configSource="XmlConfig\database.config" /> | |||
<appSettings configSource="XmlConfig\system.config" /> | |||
<log4net configSource="XmlConfig\log4net.config" /> | |||
<unity configSource="XmlConfig\ioc.config"/> | |||
<connectionStrings configSource="XmlConfig\database.config"/> | |||
<appSettings configSource="XmlConfig\system.config"/> | |||
<log4net configSource="XmlConfig\log4net.config"/> | |||
<!-- | |||
有关 web.config 更改的说明,请参见 http://go.microsoft.com/fwlink/?LinkId=235367。 | |||
@@ -25,93 +25,93 @@ | |||
</system.Web> | |||
--> | |||
<system.web> | |||
<compilation debug="true" targetFramework="4.6.1" /> | |||
<pages controlRenderingCompatibilityVersion="4.0" /> | |||
<compilation debug="true" targetFramework="4.6.2"/> | |||
<pages controlRenderingCompatibilityVersion="4.0"/> | |||
<!--最大请求长度,单位为KB(千字节),默认为4M,设置为1G,上限为2G --> | |||
<httpRuntime maxRequestLength="1048576" executionTimeout="3600" /> | |||
<httpRuntime maxRequestLength="1048576" executionTimeout="3600"/> | |||
<httpHandlers> | |||
<add verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*" /> | |||
<add verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*"/> | |||
</httpHandlers> | |||
</system.web> | |||
<entityFramework> | |||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> | |||
<parameters> | |||
<parameter value="mssqllocaldb" /> | |||
<parameter value="mssqllocaldb"/> | |||
</parameters> | |||
</defaultConnectionFactory> | |||
<providers> | |||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> | |||
<provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version=6.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" /> | |||
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" /> | |||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/> | |||
<provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version=6.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342"/> | |||
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> | |||
</providers> | |||
</entityFramework> | |||
<system.webServer> | |||
<validation validateIntegratedModeConfiguration="false" /> | |||
<httpErrors existingResponse="PassThrough" /> | |||
<validation validateIntegratedModeConfiguration="false"/> | |||
<httpErrors existingResponse="PassThrough"/> | |||
<handlers> | |||
<add name="Nancy" verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*" /> | |||
<remove name="ExtensionlessUrlHandler-Integrated-4.0" /> | |||
<remove name="OPTIONSVerbHandler" /> | |||
<remove name="TRACEVerbHandler" /> | |||
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /> | |||
<add name="Nancy" verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*"/> | |||
<remove name="ExtensionlessUrlHandler-Integrated-4.0"/> | |||
<remove name="OPTIONSVerbHandler"/> | |||
<remove name="TRACEVerbHandler"/> | |||
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0"/> | |||
</handlers> | |||
</system.webServer> | |||
<system.data> | |||
<DbProviderFactories> | |||
<remove invariant="Oracle.ManagedDataAccess.Client" /> | |||
<add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" /> | |||
<remove invariant="MySql.Data.MySqlClient" /> | |||
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" /> | |||
<remove invariant="Oracle.ManagedDataAccess.Client"/> | |||
<add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342"/> | |||
<remove invariant="MySql.Data.MySqlClient"/> | |||
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> | |||
</DbProviderFactories> | |||
</system.data> | |||
<runtime> | |||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | |||
<dependentAssembly> | |||
<publisherPolicy apply="no" /> | |||
<assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" /> | |||
<publisherPolicy apply="no"/> | |||
<assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral"/> | |||
</dependentAssembly> | |||
<dependentAssembly> | |||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> | |||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" /> | |||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/> | |||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0"/> | |||
</dependentAssembly> | |||
<dependentAssembly> | |||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" /> | |||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" /> | |||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral"/> | |||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0"/> | |||
</dependentAssembly> | |||
<dependentAssembly> | |||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" /> | |||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> | |||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/> | |||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/> | |||
</dependentAssembly> | |||
<dependentAssembly> | |||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" /> | |||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> | |||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/> | |||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/> | |||
</dependentAssembly> | |||
<dependentAssembly> | |||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> | |||
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" /> | |||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/> | |||
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0"/> | |||
</dependentAssembly> | |||
<dependentAssembly> | |||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" /> | |||
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" /> | |||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral"/> | |||
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234"/> | |||
</dependentAssembly> | |||
<dependentAssembly> | |||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> | |||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" /> | |||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/> | |||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1"/> | |||
</dependentAssembly> | |||
<dependentAssembly> | |||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> | |||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" /> | |||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/> | |||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0"/> | |||
</dependentAssembly> | |||
<dependentAssembly> | |||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | |||
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" /> | |||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/> | |||
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0"/> | |||
</dependentAssembly> | |||
</assemblyBinding> | |||
</runtime> | |||
<oracle.manageddataaccess.client> | |||
<version number="*"> | |||
<dataSources> | |||
<dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " /> | |||
<dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) "/> | |||
</dataSources> | |||
</version> | |||
</oracle.manageddataaccess.client> |
@@ -2,7 +2,7 @@ export default { | |||
// 登录页显示的公司名称 | |||
"company": "数字化智慧校园", | |||
// App 版本号 | |||
"appVersion": "2.0", | |||
"appVersion": "1.0.0", | |||
// 是否允许用户注册 | |||
"enableSignUp": true, | |||
//请求数据的接口地址;可以配置多个,开发环境下登录页会出现选择菜单供您选择 | |||
@@ -21,12 +21,12 @@ export default { | |||
// "http://192.168.2.98:8088/" | |||
// ], | |||
"apiHost": [ | |||
// "http://localhost:31173/" | |||
"http://localhost:31173/" | |||
// "http://123.57.209.16:31173/" | |||
"http://112.45.152.8:8083/" | |||
// "http://112.45.152.8:8083/" | |||
], | |||
// "webHost":"http://123.57.209.16:8081/", | |||
"webHost":"http://112.45.152.8:8000/", | |||
"webHost":"http://localhost:20472/", | |||
// "webHost":"http://112.45.152.8:8000/", | |||
// 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示 | |||
"devAccount": [ | |||
// 20201130230 21364200000400266 老师 420528196310072253 学生 420528200606205026 420528200507261428 | |||
@@ -0,0 +1,275 @@ | |||
<template> | |||
<view class="page"> | |||
<!-- 主列表页 --> | |||
<view :class="sideOpen ? 'show' : ''" class="mainpage" style="padding-top: 80rpx"> | |||
<!-- 顶部条目/分页信息栏 --> | |||
<l-customlist-banner @buttonClick="sideOpen = false">{{ tips }}</l-customlist-banner> | |||
<!-- 滚动列表,跨端支持上拉/下拉 --> | |||
<l-scroll-list v-if="ready" @pullDown="pullDown" @toBottom="fetchList()" ref="list"> | |||
<l-customlist :tips="loadState" showTips> | |||
<!-- 单条记录 --> | |||
<view class="customlist-item" v-for="item of list" :key="item.ID" @click="tapLi(item)"> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">学号:</text> | |||
{{ item.StuNo }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">姓名:</text> | |||
{{ item.StuName }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">性别:</text> | |||
{{ displayListItem(item, 'GenderNo') }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">身份证号:</text> | |||
{{ item.IdentityCardNo }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">缴费年度:</text> | |||
{{ item.FSYear }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">应缴金额:</text> | |||
{{ item.YJAmount }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">实缴金额:</text> | |||
{{ item.SJAmount }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">缴费年度余额:</text> | |||
{{ item.FSBlance }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">缴费状态:</text> | |||
{{ displayListItem(item, 'PayFeeStatus') }} | |||
</view> | |||
</view> | |||
</l-customlist> | |||
</l-scroll-list> | |||
</view> | |||
<!-- 关闭侧边抽屉按钮 --> | |||
<view @click="sideOpen = false" :class="sideOpen ? 'show' : ''" class="sideclose"><l-icon type="pullright" color="blue" /></view> | |||
<!-- 侧边栏,用于设置查询条件 --> | |||
<scroll-view :class="sideOpen ? 'show' : ''" class="sidepage" scroll-y> | |||
<view v-if="ready" class="padding"> | |||
<l-input v-model="queryData.StuNo" title="学号" placeholder="请填写学号" right /> | |||
<!-- 重置查询条件按钮 --> | |||
<view class="padding-tb"><l-button @click="searchChange" line="orange" class="block" block>查询</l-button></view> | |||
</view> | |||
</scroll-view> | |||
</view> | |||
</template> | |||
<script> | |||
/* | |||
* 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 上海力软信息技术有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-10-12 17:22 | |||
* 描 述:班级自诊打卡 | |||
*/ | |||
/** | |||
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用 | |||
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录: | |||
* { "path": "pages/EducationalAdministration/Thermography/list", "style": { "navigationBarTitleText": "表单列表页" } } | |||
* | |||
* (navigationBarTitleText 字段为本页面的标题文本,可以修改) | |||
* (必须自行操作该步骤,力软代码生成器不会自动帮您修改 /pages.json 文件) | |||
*/ | |||
import moment from 'moment'; | |||
import get from 'lodash/get'; | |||
import set from 'lodash/set'; | |||
import pickBy from 'lodash/pickBy'; | |||
import mapValues from 'lodash/mapValues'; | |||
export default { | |||
data() { | |||
return { | |||
// 数据项的数据类型、结构 | |||
scheme: { | |||
ClassNo: { | |||
type: 'select', | |||
dataSource: '1', | |||
dataSourceId: 'bjsj,classname,classno' | |||
}, | |||
GenderNo:{ | |||
type: 'dataItem', | |||
dataType: 'dataDictionary' | |||
}, | |||
PayFeeStatus:{ | |||
type: 'dataItem', | |||
dataType: 'dataDictionary' | |||
}, | |||
InvoiceStatus:{ | |||
type: 'dataItem', | |||
dataType: 'dataDictionary' | |||
} | |||
}, | |||
defaultQueryData: {}, | |||
queryData: { | |||
StuNo: '', | |||
F_CheckMark: '', | |||
FSYear:'' | |||
}, | |||
user:null, | |||
// 数据源 | |||
dataSource: { | |||
ClassNo: [], | |||
GenderNo: Object.values(this.GET_GLOBAL('dataDictionary').usersexbit).map(t => ({ value: t.value, text: t.text })), | |||
PayFeeStatus:Object.values(this.GET_GLOBAL('dataDictionary').PayStatus).map(t => ({ value: t.value, text: t.text })), | |||
}, | |||
// 页面相关参数 | |||
ready: false, | |||
tips: '加载中...', | |||
loadState: '向下翻以加载更多', | |||
sideOpen: false, | |||
// 列表与分页信息 | |||
page: 1, | |||
total: 2, | |||
rows: 10, | |||
list: [], | |||
}; | |||
}, | |||
async onLoad() { | |||
await this.init(); | |||
}, | |||
onUnload() { | |||
this.OFF('stuInfoFreshPayFee'); | |||
}, | |||
methods: { | |||
// 页面初始化 | |||
async init() { | |||
this.ON('stuInfoFreshPayFee', this.refreshList); | |||
this.user = this.GET_GLOBAL('loginUser'); | |||
this.queryData.StuNo = this.user.account; | |||
this.queryData.F_CheckMark=1; | |||
// 拉取加载列表和数据源 | |||
await Promise.all([ | |||
this.FETCH_DATASOURCE('bjsj').then(data => { | |||
this.dataSource.ClassNo = data.data.map(t => ({ | |||
text: t.classname, | |||
value: t.classno | |||
})); | |||
}), | |||
() => {} | |||
]); | |||
await this.fetchList(); | |||
// 初始化查询条件 | |||
this.defaultQueryData = this.COPY(this.queryData); | |||
this.ready = true; | |||
}, | |||
tapLi({Id}) { | |||
this.NAV_TO('./single', {Id}, true); | |||
}, | |||
// 拉取列表 | |||
async fetchList(isConcat=true) { | |||
if (this.page > this.total) { | |||
return; | |||
} | |||
let _postParam = { | |||
pagination: { | |||
rows: this.rows, | |||
page: this.page | |||
}, | |||
queryJson: JSON.stringify(this.queryData) | |||
}; | |||
this.LOADING('加载数据中…'); | |||
await this.HTTP_GET('/ReceiveSendFeeManagement/FinaChargeStuYearApi/getpayfeelist', _postParam,'加载数据时出错').then(res => { | |||
this.HIDE_LOADING(); | |||
this.total = res.total; | |||
this.page = res.page + 1; | |||
this.list = isConcat?this.list.concat(res.rows):res.rows; | |||
this.tips = `已加载 ${Math.min(res.page, res.total)} / ${res.total} 页,共 ${res.records} 项`; | |||
this.loadState = res.page >= res.total ? '已加载所有项目' : '向下翻以加载更多'; | |||
}) | |||
}, | |||
// 刷新清空列表 | |||
async refreshList(isConcat=true) { | |||
this.page = 1; | |||
this.total = 2; | |||
this.list = []; | |||
await this.fetchList(isConcat); | |||
}, | |||
// 列表下拉 | |||
pullDown() { | |||
this.refreshList().then(() => { | |||
this.$refs.list.stopPullDown(); | |||
}); | |||
}, | |||
// 设置搜索条件 | |||
async searchChange() { | |||
this.sideOpen = false | |||
await this.refreshList(false); | |||
}, | |||
// 显示列表中的标题项 | |||
displayListItem(item, field) { | |||
const fieldItem = this.scheme[field]; | |||
const value = item[field]; | |||
switch (fieldItem.type) { | |||
case 'currentInfo': | |||
case 'organize': | |||
return fieldItem.dataType === 'time' ? value : get(this.GET_GLOBAL(fieldItem.dataType), `${value}.name`, ''); | |||
case 'radio': | |||
case 'select': | |||
const selectItem = this.dataSource[field].find(t => t.value === String(value)); | |||
return get(selectItem, 'text', ''); | |||
case 'dataItem': | |||
const sex = this.dataSource[field].find(t => t.value === String(value)); | |||
return get(sex, 'text', ''); | |||
case 'checkbox': | |||
if (!value || value.split(',').length <= 0) { | |||
return ''; | |||
} | |||
const checkboxItems = value.split(','); | |||
return this.dataSource[field] | |||
.filter(t => checkboxItems.includes(t.value)) | |||
.map(t => t.text) | |||
.join(','); | |||
case 'datetime': | |||
if (!value) { | |||
return ''; | |||
} | |||
return moment(value).format(Number(fieldItem.dateformat) === 0 ? 'YYYY年 M月 D日' : 'YYYY-MM-DD HH:mm'); | |||
default: | |||
return value === null || value === undefined ? '' : value; | |||
} | |||
} | |||
} | |||
}; | |||
</script> | |||
<style lang="less" scoped> | |||
@import '~@/common/css/sidepage.less'; | |||
@import '~@/common/css/customlist.less'; | |||
</style> |
@@ -0,0 +1,87 @@ | |||
<template> | |||
<view> | |||
<view class="menu"> | |||
<view v-for="item in menuOptions" :key="item.Id" :class="{menu_item:true,active:activeId==item.Id}" @click="()=>{activeId = item.Id;activeIdChange(item)}"> | |||
{{item.billNo}} | |||
</view> | |||
</view> | |||
<iframe v-for="item in menuOptions" :key="item.Id" v-show="activeId == item.Id" :src="item.billUrl"></iframe> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return { | |||
menuOptions:[], | |||
activeId:'', | |||
keyValue:'' | |||
} | |||
}, | |||
onLoad({keyValue}) { | |||
if(!keyValue){ | |||
this.NAV_BACK() | |||
setTimeout(()=>{ | |||
this.TOAST("请传入发票信息") | |||
},100) | |||
return | |||
} | |||
this.keyValue = keyValue | |||
this.init() | |||
}, | |||
methods: { | |||
// 选项卡改变 | |||
activeIdChange(item){ | |||
// | |||
}, | |||
init(){ | |||
this.LOADING() | |||
this.HTTP_GET("/learun/payfee/getinvoice?keyValue="+this.keyValue).then((success)=>{ | |||
this.HIDE_LOADING() | |||
if(!success)return | |||
if(!success.length){ | |||
this.NAV_BACK() | |||
setTimeout(()=>{ | |||
this.TOAST("暂无发票信息") | |||
},100) | |||
return | |||
} | |||
this.menuOptions = success | |||
this.activeId = this.menuOptions[0].Id | |||
}) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.menu{ | |||
display: flex; | |||
justify-content: space-between; | |||
background-color: #fff; | |||
border: 1px solid #E4E7ED; | |||
.menu_item{ | |||
flex: 1; | |||
text-align: center; | |||
box-sizing: border-box; | |||
line-height: 36px; | |||
border: 1px solid #E4E7ED; | |||
position: relative; | |||
} | |||
.menu_item.active::after{ | |||
content: ""; | |||
display: block; | |||
background-color: #409EFF; | |||
position: absolute; | |||
width: 50%; | |||
height: 2px; | |||
left: 0;right: 0; | |||
margin: auto; | |||
bottom: 0; | |||
} | |||
} | |||
iframe{ | |||
width: 100%; | |||
height: calc(100vh - 40px); | |||
} | |||
</style> |
@@ -0,0 +1,319 @@ | |||
<template> | |||
<view class="lr-form-container"> | |||
<l-input v-model="StuInfoFreshData.StuNo" disabled title="学号" placeholder="请填写学号" right/> | |||
<l-input v-model="StuInfoFreshData.StuName" disabled title="姓名" placeholder="请填写学号" right /> | |||
<l-input :value="displayListItem(StuInfoFreshData, 'ClassNo')" disabled title="班级" placeholder="请填写班级" right /> | |||
<l-input :value="displayListItem(StuInfoFreshData, 'DeptNo')" disabled title="系别" placeholder="请填写系别" right /> | |||
<!-- 姓名 StuName 班级 className 系别 deptName FinaChargesStandardList [缴费项目 ChargeItemName 收费标准 Standard 本次实缴 SJAmount] --> | |||
<l-customform-table | |||
@input="($event)=>{FinaChargesStandardList = $event}" | |||
:value="FinaChargesStandardList" | |||
:item="item" | |||
:edit="false" | |||
/> | |||
<view style="margin-top: 8px;"> | |||
<l-input v-model="PayFeeTotal" disabled title="应缴合计" disabled right /> | |||
<l-input v-model="payfeetotal" disabled title="实缴合计" disabled right /> | |||
<l-input v-model="YJAmount" disabled title="已缴金额" disabled right /> | |||
</view> | |||
<view style="display:flex;justify-content: center;padding-top: 18px;"> | |||
<image v-if="qrCodeUrl" :src="qrCodeUrl" mode="widthFix"></image> | |||
</view> | |||
<!-- :edit="isEdit(item)" --> | |||
<!-- @input="setValue(item.__valuePath__, $event)" --> | |||
<!-- <view> | |||
<l-select v-model="queryData.PayFeeStatus" :range="dataSource.PayStatus" title="线上缴费状态" placeholder="请选择" /> | |||
</view> | |||
<view> | |||
<l-input v-model="queryData.StudentLoan" :disabled="disabled" title="贷款回执码" placeholder="请填写贷款回执码" right /> | |||
</view> | |||
<view> | |||
<l-select v-model="queryData.OnsitePayFeeStatus" :range="dataSource.OnsitePayStatus" title="现场缴费状态" placeholder="请选择" /> | |||
</view> --> | |||
<view v-if="ready&&canPay&&!qrCodeUrl" class="btn" @click="tapBtn('getQRCode')"> | |||
生成二维码 | |||
</view> | |||
<view v-if="ready&&canPay" class="btn" @click="tapBtn('getPayRes')"> | |||
查询缴费结果 | |||
</view> | |||
<view class="btn" v-if="ready" @click="lookInvioce"> | |||
查看发票 | |||
</view> | |||
<view class="btn" @click="NAV_BACK()"> | |||
取消缴费 | |||
</view> | |||
<view style="height: 18px;"> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
import moment from 'moment'; | |||
import get from 'lodash/get'; | |||
import set from 'lodash/set'; | |||
import pickBy from 'lodash/pickBy'; | |||
import mapValues from 'lodash/mapValues'; | |||
import tkiQrcode from "@/components/tki-qrcode/tki-qrcode.vue" | |||
export default{ | |||
components:{ | |||
tkiQrcode, | |||
}, | |||
data() { | |||
return { | |||
disabled: false, | |||
ready:false, | |||
canPay:false, | |||
// 数据源 | |||
dataSource: { | |||
ClassNo:[], | |||
DeptNo:[], | |||
// PayStatus: Object.values(this.GET_GLOBAL('dataDictionary').PayStatus).map(t => ({ value: t.value, text: t.text })), | |||
// OnsitePayStatus: Object.values(this.GET_GLOBAL('dataDictionary').OnsitePayStatus).map(t => ({ value: t.value, text: t.text })) | |||
}, | |||
queryData: { | |||
StudentLoan: '', | |||
PayFeeStatus: '', | |||
OnsitePayFeeStatus: '', | |||
StudentLoanStatus: '0' | |||
}, | |||
pageInfo:{}, | |||
scheme: { | |||
ClassNo: { | |||
type: 'select', | |||
dataSource: '1', | |||
dataSourceId: 'bjsj,classname,classno' | |||
}, | |||
DeptNo:{ | |||
type: 'dataItem', | |||
dataType: 'dataDictionary' | |||
}, | |||
}, | |||
StuInfoFreshData:{}, | |||
PayFeeTotal:'', | |||
payfeetotal:'', | |||
YJAmount:'', | |||
FinaChargesStandardList:[], | |||
item:{ | |||
title:'缴费信息', | |||
fieldsData:[ | |||
{type:'label',field:'ChargeItemName',name:'缴费项目'}, | |||
{type:'label',field:'Standard',name:'收费标准'}, | |||
// {type:'label',field:'copy_SJAmount',name:'本次应缴'}, | |||
{type:'input',field:'SJAmount',name:'本次实缴',edit:true}, | |||
] | |||
}, | |||
qrCodeUrl:'', | |||
} | |||
}, | |||
watch: { | |||
FinaChargesStandardList: { | |||
handler (val) { | |||
this.getpayfeetotal() | |||
}, | |||
// 这里是关键,代表递归监听 demo 的变化 | |||
deep: true | |||
} | |||
}, | |||
methods:{ | |||
async init() { | |||
this.pageInfo = this.GET_PARAM(); //获取页面传递参数 | |||
this.LOADING('加载数据中…'); | |||
await Promise.all([ | |||
this.FETCH_DATASOURCE('bjsj').then(data => { | |||
this.dataSource.ClassNo = data.data.map(t => ({ | |||
text: t.classname, | |||
value: t.classno | |||
})); | |||
}), | |||
this.FETCH_DATASOURCE('CdDeptInfo').then(data => { | |||
this.dataSource.DeptNo = data.data.map(t => ({ | |||
text: t.deptname, | |||
value: t.deptno | |||
})); | |||
}), | |||
() => {} | |||
]); | |||
this.HTTP_GET('/learun/payfee/getpayfeeinfo?keyValue='+this.pageInfo.Id, null,'加载数据时出错').then(res => { | |||
this.HIDE_LOADING(); | |||
if(!res){ | |||
return | |||
} | |||
if (res['FinaChargesStandardList'].length == 0) { | |||
this.TOAST("未查询到该学生收费标准!请先维护收费标准。"); | |||
return; | |||
} | |||
this.FinaChargesStandardList = res.FinaChargesStandardList.map((item)=>{ | |||
item.copy_SJAmount = item.SJAmount | |||
return item | |||
}) | |||
this.StuInfoFreshData = res.StuInfoFreshData | |||
this.PayFeeTotal = res.PayFeeTotal | |||
this.getpayfeetotal() | |||
if(Number(this.payfeetotal)>0){ | |||
this.canPay = true | |||
}else{ | |||
this.changeIpnutEdit(false) | |||
this.TOAST("缴费已完成") | |||
} | |||
this.YJAmount = res.YJAmount | |||
this.ready = true | |||
}) | |||
}, | |||
// 显示列表中的标题项 | |||
displayListItem(item, field) { | |||
const fieldItem = this.scheme[field]; | |||
const value = item[field]; | |||
switch (fieldItem.type) { | |||
case 'currentInfo': | |||
case 'organize': | |||
return fieldItem.dataType === 'time' ? value : get(this.GET_GLOBAL(fieldItem.dataType), `${value}.name`, ''); | |||
case 'radio': | |||
case 'select': | |||
const selectItem = this.dataSource[field].find(t => t.value === String(value)); | |||
return get(selectItem, 'text', ''); | |||
case 'dataItem': | |||
const sex = this.dataSource[field].find(t => t.value === String(value)); | |||
return get(sex, 'text', ''); | |||
case 'checkbox': | |||
if (!value || value.split(',').length <= 0) { | |||
return ''; | |||
} | |||
const checkboxItems = value.split(','); | |||
return this.dataSource[field] | |||
.filter(t => checkboxItems.includes(t.value)) | |||
.map(t => t.text) | |||
.join(','); | |||
case 'datetime': | |||
if (!value) { | |||
return ''; | |||
} | |||
return moment(value).format(Number(fieldItem.dateformat) === 0 ? 'YYYY年 M月 D日' : 'YYYY-MM-DD HH:mm'); | |||
default: | |||
return value === null || value === undefined ? '' : value; | |||
} | |||
}, | |||
tapBtn(action) { | |||
if(action == "getQRCode"){ | |||
let list = [],detail="",isNull=false; | |||
this.FinaChargesStandardList.forEach(item=>{ | |||
let value = 0 | |||
if(/^-?\d+(,\d{3})*(\.\d{1,2})?$/.test(item.SJAmount)&&Number(item.SJAmount)<=Number(item.copy_SJAmount)&&Number(item.SJAmount)>=0){ | |||
value = Number(item.SJAmount) | |||
}else{ | |||
isNull=true | |||
} | |||
detail += item.ChargeItemCode + "!" + value + '&'; | |||
let entity = { | |||
Id: this.GUID(), | |||
ChargeItemName: item.ChargeItemName.replace(/^\s*|\s*$/g, ""), | |||
ChargeItemID: item.ChargeItemCode, | |||
YJAmount: item.Standard, | |||
SJAmount: value | |||
} | |||
list.push(entity) | |||
}) | |||
if (isNull) { | |||
this.TOAST("[本次实缴]金额为空或错误!最多两位小数。"); | |||
return; | |||
} | |||
if(Number(this.payfeetotal) == 0){ | |||
this.TOAST("[实缴合计]不能为0!缴费失败。"); | |||
return; | |||
} | |||
detail = detail.substring(0, detail.length - 1); | |||
var param = {}; | |||
param.PayFeeDetail = detail; | |||
param.PayMoney = this.payfeetotal; | |||
let postData = { strEntity: JSON.stringify(param), detailList: JSON.stringify(list) } | |||
console.log({ strEntity: param, detailList: list }); | |||
this.changeIpnutEdit(false) | |||
this.LOADING('正在生成付款信息请稍等…'); | |||
this.HTTP_POST('/learun/payfee/generateqrcode?keyValue=' + this.pageInfo.Id, postData ).then((res)=> { | |||
this.HIDE_LOADING(); | |||
if(!res){ | |||
return | |||
} | |||
this.qrCodeUrl = this.CONFIG("webHost")+res.imgUrl | |||
}); | |||
} | |||
if(action == "getPayRes"){ | |||
this.StuInfoFreshData = {} | |||
this.PayFeeTotal = '' | |||
this.payfeetotal = '' | |||
this.YJAmount = '' | |||
this.FinaChargesStandardList = [] | |||
this.init() | |||
} | |||
}, | |||
lookInvioce(){ | |||
this.NAV_TO("./payInvioce?keyValue="+this.pageInfo.Id) | |||
}, | |||
getpayfeetotal(){ | |||
let value = 0 | |||
this.FinaChargesStandardList.map(item=>{ | |||
let strValue = item.SJAmount.toString() | |||
// if(strValue.split(".")[1]&&strValue.split(".")[1].length>2){ | |||
// item.SJAmount = strValue.match(/^\d+(?:\.\d{0,2})?/) | |||
// } | |||
if(/^-?\d+(,\d{3})*(\.\d{1,2})?$/.test(item.SJAmount)){ | |||
if(strValue.indexOf(".") == -1&&Number(item.SJAmount)%1 === 0){ | |||
item.SJAmount = Number(item.SJAmount) | |||
} | |||
value = this.numSub(value,Number(item.SJAmount)) | |||
// value += Number(item.SJAmount) | |||
} | |||
}) | |||
this.payfeetotal = value | |||
}, | |||
changeIpnutEdit(edit){ | |||
let item = JSON.parse(JSON.stringify(this.item)) | |||
item.fieldsData = item.fieldsData.map((item1)=>{ | |||
if(["SJAmount"].includes(item1.field)){ | |||
item1.edit = edit | |||
} | |||
return item1 | |||
}) | |||
this.item = item | |||
}, | |||
numSub(num1, num2) { | |||
var baseNum, baseNum1, baseNum2; | |||
var precision;// 精度 | |||
try { | |||
baseNum1 = num1.toString().split(".")[1].length; | |||
} catch (e) { | |||
baseNum1 = 0; | |||
} | |||
try { | |||
baseNum2 = num2.toString().split(".")[1].length; | |||
} catch (e) { | |||
baseNum2 = 0; | |||
} | |||
baseNum = Math.pow(10, Math.max(baseNum1, baseNum2)); | |||
precision = (baseNum1 >= baseNum2) ? baseNum1 : baseNum2; | |||
return ((num1 * baseNum + num2 * baseNum) / baseNum).toFixed(precision); | |||
} | |||
}, | |||
created() { | |||
this.init() | |||
} | |||
} | |||
</script> | |||
<style lang="less" scoped> | |||
@import '~@/common/css/customlist.less'; | |||
@import '~@/common/css/sidepage.less'; | |||
</style> | |||