Pārlūkot izejas kodu

新生缴费管理--二维码缴费

西昌缴费二期
zhangli pirms 2 gadiem
vecāks
revīzija
d64e1e5d76
5 mainītis faili ar 55 papildinājumiem un 32 dzēšanām
  1. +2
    -0
      .gitignore
  2. +22
    -11
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs
  3. +16
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.cshtml
  4. +14
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.js
  5. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj

+ 2
- 0
.gitignore Parādīt failu

@@ -79,3 +79,5 @@ Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js
/Learun.Framework.Ultimate V7/Learun.Application.Mobile/platforms/android/assets/www
/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www.7z
/Learun.Framework.Ultimate V7/Learun.Application.WebApi/bin.7z
/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/QRCode
/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images

+ 22
- 11
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs Parādīt failu

@@ -1237,20 +1237,21 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult PayFeeQRCode(string keyValue)
public ActionResult PayFeeQRCode(string keyValue, string strEntity)
{
StuInfoFreshEntity entity = strEntity.ToObject<StuInfoFreshEntity>();
var model = stuInfoFreshIBLL.GetStuInfoFreshEntity(keyValue);
var imgUrl = "";
Random ran = new Random();
string merchantid = "105000082201406"; //UAT--可用防钓鱼接口
string posid = "043724806"; //分行代码
Random ran = new Random();
string merchantid = "105000082201406";//UAT--可用防钓鱼接口
string posid = "043724806";//分行代码
string branchid = "510000000";
string orderid = DateTime.Now.ToString("yyyyMMddhhmmss") + ran.Next(0, 100000);
string payment = "788";
//string payment = "0.1";
string payment = entity.PayMoney.ToString();
string curcode = "01";
string txcode = "530550";
string remark1 = "51d7ab92-1b3d-43f8-9b34-5ecc6e118804" + "-" + "2021";// bean.stuId +"-" + bean.feiYear;
string remark2 = "02!700&03!88&";// reKey;
string remark1 = model.StuNo + "-20" + model.Grade;
string remark2 = entity.PayFeeDetail.Replace("&", "-");
string returntype = "3";
string timeout = DateTime.Now.AddMinutes(10).ToString("yyyyMMddHHmmss");
string pub32tr2 = "40d987faa793a0a27e7a86ef020111";
@@ -1280,10 +1281,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
MemberInfoList = JsonConvert.DeserializeObject<JsonBean>(imgCode);
if (MemberInfoList.SUCCESS.Equals("true"))
{
imgUrl = CreateQRImg(MemberInfoList.QRURL, orderid);
imgUrl = CreateQRImg(MemberInfoList.QRURL, orderid);
}
}

if (!string.IsNullOrEmpty(imgUrl))
{
model.PayFeeDetail = entity.PayFeeDetail;
model.PayMoney = entity.PayMoney;
model.LoanMoney = entity.LoanMoney;
stuInfoFreshIBLL.SaveEntity(keyValue, model);
}

return Success(imgUrl);
}
#endregion
@@ -1370,10 +1379,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
bt = qrCodeEncoder.Encode(enCodeString, Encoding.UTF8);
//二维码图片的名称
string filename = orderId;

var path = Server.MapPath("~/Content/images/QRCode/") + filename + ".jpg";
//保存二维码图片在photos路径下
try
{
bt.Save(Server.MapPath("~/Content/images/") + filename + ".jpg");
bt.Save(path);
}
catch (Exception ex)
{
@@ -1382,7 +1393,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
}

//图片控件要显示的二维码图片路径
return "~/Content/images/" + filename + ".jpg";
return "/Content/images/QRCode/" + filename + ".jpg";
}
}
}

+ 16
- 13
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.cshtml Parādīt failu

@@ -3,34 +3,37 @@
Layout = "~/Views/Shared/_Form.cshtml";
}
<style>
.title{
text-align:center;
font-size:16px;
margin-bottom:10px;
.title {
text-align: center;
font-size: 16px;
margin-bottom: 10px;
}

#form {
padding: 10px 20px;
}
#btnBox{
text-align:center;
}
#btnBox > div{
margin-right:50px;
margin-top:20px;

#btnBox {
text-align: center;
}

#btnBox > div {
margin-right: 50px;
margin-top: 20px;
}

.table {
text-align: center;
margin: auto;
}

.tableLeft {
width: 30%;
}
</style>
<div class="lr-form-wrap" id="form">
<div class="title">费用明细</div>
<table class="table table-bordered" id="PayFeeDetail">
</table>
<table class="table table-bordered" id="PayFeeDetail"></table>
<div id="btnBox">
<div id="confirmPayFee" class="btn btn-primary">支付</div>
<div id="searchPayFee" class="btn btn-success">查询</div>


+ 14
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.js Parādīt failu

@@ -21,13 +21,22 @@ var bootstrap = function ($, learun) {
if (parseFloat($('#PayMoney').html()) > PayFeeTotal) {
return learun.alert.warning("所交费用超出应交费用!");
}
//$('.paydetail').each(function(i, item) {
// console.log('item',item);
//});
learun.httpAsyncPost(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/PayFeeQRCode', { keyValue: keyValue }, function (res) {
var detail = "";
$('.paydetail').each(function (i, item) {
detail += $(this).attr('id') + "!" + $(this).attr('value') + '&';
});
detail = detail.substring(0, detail.length - 1);
var param = {};
param.LoanMoney = $('#LoanMoney').val();
param.PayFeeDetail = detail;
param.PayMoney = $('#PayMoney').html();
//console.log('asd', JSON.stringify(param));
//$('#qrcodeImg').attr('src', "/Content/images/QRCode/2022070505103378891.jpg");
//return;
learun.httpAsyncPost(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/PayFeeQRCode?keyValue=' + keyValue, { strEntity: JSON.stringify(param) }, function (res) {
learun.loading(false);
console.log(res);
$('#qrcodeImg').attr('src', res.info);
$('#qrcodeImg').attr('src', res.info);
//if (res.code == learun.httpCode.success) {
// if (!!callback) {
// callback(res);
@@ -40,9 +49,6 @@ var bootstrap = function ($, learun) {
//}
//layer.close(layer.index);
});
//learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/PayFeeQRCode', { keyValue: keyValue}, function () {
// learun.frameTab.currentIframe().refreshGirdData();
//});
});
//取消缴费
$('#cancelPayFee').click(function () {


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Parādīt failu

@@ -6432,6 +6432,7 @@
<Folder Include="Areas\LR_ReportTestModule\Views\Shared\" />
<Folder Include="Areas\LR_WebChatModule\Views\User\" />
<Folder Include="Areas\LR_WorkFlowModule\Views\WfEngine\" />
<Folder Include="Content\images\QRCode\" />
</ItemGroup>
<ItemGroup>
<Content Include="packages.config" />


Notiek ielāde…
Atcelt
Saglabāt