(imgCode);
+ if (MemberInfoList.SUCCESS.Equals("true"))
+ {
+ imgUrl = CreateQRImg(MemberInfoList.QRURL, orderid);
+ }
+ }
+
+ return Success(imgUrl);
+ }
#endregion
#region 上传图片
@@ -1279,5 +1339,50 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
}
#endregion
+ public class JsonBean
+ {
+ ///
+ ///
+ ///
+ public string SUCCESS { get; set; }
+ public string PAYURL { get; set; }
+ public string QRURL { get; set; }
+ }
+ ///
+ /// 生成并保存二维码图片的方法
+ ///
+ /// 输入的内容
+ public string CreateQRImg(string str, string orderId)
+ {
+ 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;
+ //保存二维码图片在photos路径下
+ try
+ {
+ bt.Save(Server.MapPath("~/Content/images/") + filename + ".jpg");
+ }
+ catch (Exception ex)
+ {
+
+ return "";
+ }
+
+ //图片控件要显示的二维码图片路径
+ return "~/Content/images/" + filename + ".jpg";
+ }
}
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.cshtml
index 21b382ff1..ba7fa3451 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.cshtml
@@ -18,21 +18,23 @@
margin-right:50px;
margin-top:20px;
}
+ .table {
+ text-align: center;
+ margin: auto;
+ }
+ .tableLeft {
+ width: 30%;
+ }
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.js")
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.js
index b4af7c58f..c83802f23 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.js
@@ -6,6 +6,7 @@
*/
var acceptClick;
var keyValue = request('keyValue');
+var PayFeeTotal = 0;//应交费用
var bootstrap = function ($, learun) {
"use strict";
var page = {
@@ -15,11 +16,33 @@ var bootstrap = function ($, learun) {
page.initData();
},
bind: function () {
- //确认缴费
+ //获取缴费二维码
$('#confirmPayFee').click(function () {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/IsPayFee', { keyValue: keyValue, status: 1 }, function () {
- learun.frameTab.currentIframe().refreshGirdData();
+ 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) {
+ learun.loading(false);
+ console.log(res);
+ $('#qrcodeImg').attr('src', res.info);
+ //if (res.code == learun.httpCode.success) {
+ // if (!!callback) {
+ // callback(res);
+ // }
+ // learun.alert.success(res.info);
+ //}
+ //else {
+ // learun.alert.error(res.info);
+ // learun.httpErrorLog(res.info);
+ //}
+ //layer.close(layer.index);
});
+ //learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/PayFeeQRCode', { keyValue: keyValue}, function () {
+ // learun.frameTab.currentIframe().refreshGirdData();
+ //});
});
//取消缴费
$('#cancelPayFee').click(function () {
@@ -28,16 +51,51 @@ var bootstrap = function ($, learun) {
});
});
+ //计算实交金额
+ $('table').on('change',
+ '.paydetail',
+ function () {
+ var num = 0;
+ $(".paydetail").each(function (i, item) {
+ num += parseFloat($(this).val());
+ });
+ $('#PayMoney').html(num);
+ });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetPayFeeDetail?keyValue=' + keyValue, function (data) {
- var html = "";
- html += '收费项目名称 | 收费项目标准 |
';
+ var StuInfoFresh = data['StuInfoFreshData'];
+ var className = "";
+ learun.clientdata.getAsync('custmerData', {
+ url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
+ key: StuInfoFresh.ClassNo,
+ keyId: 'classno',
+ callback: function (_data) {
+ className = _data['classname'];
+ }
+ });
+ var deptName = "";
+ learun.clientdata.getAsync('custmerData', {
+ url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
+ key: StuInfoFresh.DeptNo,
+ keyId: 'deptno',
+ callback: function (_data) {
+ deptName = _data['deptname'];
+ }
+ });
+ PayFeeTotal = parseFloat(data['PayFeeTotal']);
+ var html = "学号 | " + StuInfoFresh.StuNo + " | |
";
+ html += "姓名 | " + StuInfoFresh.StuName + " |
";
+ html += "班级 | " + className + " |
";
+ html += "系别 | " + deptName + " |
";
+ html += '缴费项目 | 应交费用 | 本次实交 |
';
$.each(data['FinaChargesStandardList'], function (i, item) {
- html += '' + item.ChargeItemName + ' | ' + item.Standard + '元 |
';
+ html += '' + item.ChargeItemName + ' | ' + item.Standard + '元 | |
';
});
- html += '合计: ' + data['PayFeeTotal'] + '元 |
';
+ html += '合计 | ' + data['PayFeeTotal'] + '元 | ' + data['PayFeeTotal'] + ' |
';
+ html += '贷款金额 | |
';
+ html += '已交金额 | |
';
$('#PayFeeDetail').html(html);
});
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeIndex.cshtml
index 54c4b777e..fae9ce86b 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeIndex.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeIndex.cshtml
@@ -25,6 +25,7 @@
同步
查看
@* 缴费*@
+ 二维码缴费
线上缴费
取消线上缴费
@* 填写贷款回执码*@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeIndex.js
index 7b12b1be7..2521c8593 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeIndex.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeIndex.js
@@ -39,6 +39,25 @@ var bootstrap = function ($, learun) {
});
}
});
+ //二维码缴费
+ $('#lr_payCode').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('ID');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.PayFeeStatus == "1") {
+ learun.alert.warning("当前新生已缴费!");
+ return;
+ }
+ learun.layerForm({
+ id: 'form_payCode',
+ title: '二维码缴费',
+ url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/PayFeeForm?keyValue=' + keyValue,
+ width: 800,
+ height: 600,
+ btn: null
+ });
+ }
+ });
// 缴费
$('#lr_payFee').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
index 1efd44821..bab19b580 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
@@ -265,6 +265,9 @@
..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll
+
+ ..\packages\ThoughtWorks.QRCode.1.1.0\lib\ThoughtWorks.QRCode.dll
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/packages.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/packages.config
index 7d8ffd51c..b34fd9b03 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/packages.config
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/packages.config
@@ -75,5 +75,6 @@
+
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshEntity.cs
index 01055cb7a..70e4b6e6c 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshEntity.cs
@@ -619,6 +619,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
[Column("BANKLOCATION")]
public string BankLocation { get; set; }
+
+ ///
+ /// 缴费明细
+ ///
+ [Column("PAYFEEDETAIL")]
+ public string PayFeeDetail { get; set; }
+ ///
+ /// 缴费金额
+ ///
+ [Column("PAYMONEY")]
+ public decimal? PayMoney { get; set; }
+ ///
+ /// 贷款金额
+ ///
+ [Column("LOANMONEY")]
+ public decimal? LoanMoney { get; set; }
+ ///
+ /// 是否开票
+ ///
+ [Column("ISINVOICE")]
+ public int? IsInvoice { get; set; }
#endregion
#region 扩展操作
diff --git a/Learun.Framework.Ultimate V7/packages/ThoughtWorks.QRCode.1.1.0/.signature.p7s b/Learun.Framework.Ultimate V7/packages/ThoughtWorks.QRCode.1.1.0/.signature.p7s
new file mode 100644
index 000000000..5920afe5e
Binary files /dev/null and b/Learun.Framework.Ultimate V7/packages/ThoughtWorks.QRCode.1.1.0/.signature.p7s differ
diff --git a/Learun.Framework.Ultimate V7/packages/ThoughtWorks.QRCode.1.1.0/ThoughtWorks.QRCode.1.1.0.nupkg b/Learun.Framework.Ultimate V7/packages/ThoughtWorks.QRCode.1.1.0/ThoughtWorks.QRCode.1.1.0.nupkg
new file mode 100644
index 000000000..c7891604b
Binary files /dev/null and b/Learun.Framework.Ultimate V7/packages/ThoughtWorks.QRCode.1.1.0/ThoughtWorks.QRCode.1.1.0.nupkg differ
diff --git a/Learun.Framework.Ultimate V7/packages/ThoughtWorks.QRCode.1.1.0/lib/ThoughtWorks.QRCode.dll b/Learun.Framework.Ultimate V7/packages/ThoughtWorks.QRCode.1.1.0/lib/ThoughtWorks.QRCode.dll
new file mode 100644
index 000000000..45b1b5267
Binary files /dev/null and b/Learun.Framework.Ultimate V7/packages/ThoughtWorks.QRCode.1.1.0/lib/ThoughtWorks.QRCode.dll differ