Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hlcm
leaf-hlcm
Commits
c02e856e
Commit
c02e856e
authored
Dec 04, 2019
by
stone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【fix】修改罚息减免计算逻辑
parent
0228ec61
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
80 deletions
+89
-80
contract_penalty_reduction_create.lview
...ules/cont/CON1020/contract_penalty_reduction_create.lview
+0
-3
contract_penalty_reduction_maintain.lview
...es/cont/CON1020/contract_penalty_reduction_maintain.lview
+15
-4
sys_mail_send_by_java.lsc
src/main/webapp/modules/sys/SYS405/sys_mail_send_by_java.lsc
+74
-73
No files found.
src/main/webapp/modules/cont/CON1020/contract_penalty_reduction_create.lview
View file @
c02e856e
...
...
@@ -148,9 +148,6 @@
return;
}
}
//判断所有的单据是否已经进行测算过
Leaf.request({
url:
$('con_contract_penalty_reduction_link').getUrl(),
...
...
src/main/webapp/modules/cont/CON1020/contract_penalty_reduction_maintain.lview
View file @
c02e856e
...
...
@@ -35,7 +35,9 @@
if (res.result.header_result == 'success') {
var ds_id2 = 'CON_PENALTY_REDUCTION_MAINTAIN_G_PENALTY_DETAIL_con_contract_cashflow_ds';
$(ds_id2).setQueryParameter('copy_contract_id',record1.get('copy_contract_id'));
$(ds_id2).setQueryParameter('copy_contract_id',record1.get('copy_contract_id'));
$(ds_id2).query();
debugger
var records2 = $(ds_id2).getAll();
if (records2 && records2.length != 0) {
var param_list = [];
...
...
@@ -222,17 +224,26 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
if (value != old_value) {
if (update_falg != 'Y') {
if (name == 'reduce_amount_total') {
var ratio = parseFloat(Leaf.formatNumber(div(record.get('reduce_amount_total'), record.get('unreceived_overdue_amount')), 4));
update_falg = 'Y';
// record.set('reduce_amount_total',value>
record.get('unreceived_overdue_amount') ?record.get('unreceived_overdue_amount'):value);
if(value>record.get('unreceived_overdue_amount')){
$L.showErrorMessage('提示','减免金额不能大于最大减免金额!');
record.set('reduce_amount_total',record.get('unreceived_overdue_amount'));
$(ds).getAt(0).set('reduce_amount_total','');
return;
}
var ratio = parseFloat(Leaf.formatNumber(div(record.get('reduce_amount_total'), record.get('total_overdue_amount')), 4));
// update_falg = 'Y';
record.set('reduce_amount_total_ratio', ratio);
}
if (name == 'reduce_amount_total_ratio') {
var amount = parseFloat(mul(record.get('reduce_amount_total_ratio'), record.get('
unreceived
_overdue_amount')), 2);
update_falg = 'Y';
var amount = parseFloat(mul(record.get('reduce_amount_total_ratio'), record.get('
total
_overdue_amount')), 2);
//
update_falg = 'Y';
record.set('reduce_amount_total', amount);
}
...
...
src/main/webapp/modules/sys/SYS405/sys_mail_send_by_java.lsc
View file @
c02e856e
<?xml version="1.0" encoding="UTF-8"?>
<a:service
xmlns:s=
"leaf.plugin.script"
xmlns:msg=
"leaf.application.features.msg"
xmlns:a=
"http://www.leaf-framework.org/application"
xmlns:dr=
"leaf.plugin.excelreport"
xmlns:excel=
"leaf.application.task.excel"
xmlns:t=
"uncertain.composite.transform"
xmlns:mail=
"leaf.plugin.mail"
xmlns:p=
"uncertain.proc"
trace=
"true"
>
<a:init-procedure>
<s:server-script>
<![CDATA[
importPackage(java.io);
importPackage(Packages.hl.mail);
try {
var mail_server_bm = $bm('sys.SYS405.sys_get_mail_server');
var mail_server_result = mail_server_bm.queryAsMap().getChildren();
var mail_list_bm = $bm('sys.SYS405.zj_sys_mailing_list');
var mail_list_result = mail_list_bm.queryAsMap().getChildren();
println('###############' + mail_list_result.length + '###############');
for (var i = 0; i < mail_list_result.length; i++) {
var mb = new HlMailBean();
mb.setHost(mail_server_result[0].mail_smtp_host); // 设置SMTP主机(163),若用126,则设为:smtp.126.com
mb.setPort(mail_server_result[0].mail_port_number); //设置端口号
mb.setUsername(mail_server_result[0].mail_username); // 设置发件人邮箱的用户名
mb.setPassword(mail_server_result[0].mail_password); // 设置发件人邮箱的密码,需将*号改成正确的密码
mb.setFrom(mail_server_result[0].mail_address); // 设置发件人的邮箱
mb.setTo(mail_list_result[i].mail_to); // 设置收件人的邮箱
println(mail_list_result[i].mail_to);
if (mail_list_result[i].mail_cc) {
mb.setCc(mail_list_result[i].mail_cc); // 设置抄送人的邮箱
} else {
mb.setCc(mail_list_result[i].mail_to);
}
mb.setSubject(mail_list_result[i].subject); // 设置邮件的主题
mb.setContent(mail_list_result[i].body); // 设置邮件的正文
//mb.setContent(mail_list_result[i].content_type); // 设置邮件的格式 text/html为html,text/plain为纯文本
//设置附件
//mb.attachFile("D:\\abc.xlsx"); // 往邮件中添加附件
var mail_file_bm = $bm('sys.SYS405.zj_sys_mailing_file');
var mail_file_result = mail_file_bm.queryAsMap({
mailing_list_id: mail_list_result[i].mailing_list_id
}).getChildren();
for (var j = 0; j < mail_file_result.length; j++) {
mb.attachFile(mail_file_result[j].file_path);
}
var sm = new HlSendMail();
if (mail_list_result[i].content_type == "text/html") {
println(mail_list_result[i].mailing_list_id);
if (sm.sendHtmlMail(mb)) {
$bm('sys.SYS405.zj_sys_mailing_list').update({
mailing_list_id: mail_list_result[i].mailing_list_id
});
} else {
$bm('sys.SYS405.zj_sys_mailing_list').execute({
mailing_list_id: mail_list_result[i].mailing_list_id
});
}
} else {
if (sm.sendMail(mb)) {
$bm('sys.SYS405.zj_sys_mailing_list').update({
mailing_list_id: mail_list_result[i].mailing_list_id
});
} else {
$bm('sys.SYS405.zj_sys_mailing_list').execute({
mailing_list_id: mail_list_result[i].mailing_list_id
});
}
}
}
} catch (e) {
raise_app_error(e);
}
]]>
</s:server-script>
</a:init-procedure>
<a:service-output/>
</a:service>
<?xml version="1.0" encoding="UTF-8"?>
<a:service
xmlns:s=
"leaf.plugin.script"
xmlns:msg=
"leaf.application.features.msg"
xmlns:a=
"http://www.leaf-framework.org/application"
xmlns:dr=
"leaf.plugin.excelreport"
xmlns:excel=
"leaf.application.task.excel"
xmlns:t=
"uncertain.composite.transform"
xmlns:mail=
"leaf.plugin.mail"
xmlns:p=
"uncertain.proc"
trace=
"true"
>
<a:init-procedure>
<s:server-script>
<![CDATA[
importPackage(java.io);
importPackage(Packages.hl.mail);
try {
var mail_server_bm = $bm('sys.SYS405.sys_get_mail_server');
var mail_server_result = mail_server_bm.queryAsMap().getChildren();
var mail_list_bm = $bm('sys.SYS405.zj_sys_mailing_list');
var mail_list_result = mail_list_bm.queryAsMap().getChildren();
println('###############' + mail_list_result.length + '###############');
for (var i = 0; i < mail_list_result.length; i++) {
var mb = new HlMailBean();
mb.setHost(mail_server_result[0].mail_smtp_host); // 设置SMTP主机(163),若用126,则设为:smtp.126.com
mb.setPort(mail_server_result[0].mail_port_number); //设置端口号
println(mail_server_result[0].mail_port_number);
mb.setUsername(mail_server_result[0].mail_username); // 设置发件人邮箱的用户名
mb.setPassword(mail_server_result[0].mail_password); // 设置发件人邮箱的密码,需将*号改成正确的密码
mb.setFrom(mail_server_result[0].mail_address); // 设置发件人的邮箱
mb.setTo(mail_list_result[i].mail_to); // 设置收件人的邮箱
println(mail_list_result[i].mail_to);
if (mail_list_result[i].mail_cc) {
mb.setCc(mail_list_result[i].mail_cc); // 设置抄送人的邮箱
} else {
mb.setCc(mail_list_result[i].mail_to);
}
mb.setSubject(mail_list_result[i].subject); // 设置邮件的主题
mb.setContent(mail_list_result[i].body); // 设置邮件的正文
//mb.setContent(mail_list_result[i].content_type); // 设置邮件的格式 text/html为html,text/plain为纯文本
//设置附件
//mb.attachFile("D:\\abc.xlsx"); // 往邮件中添加附件
var mail_file_bm = $bm('sys.SYS405.zj_sys_mailing_file');
var mail_file_result = mail_file_bm.queryAsMap({
mailing_list_id: mail_list_result[i].mailing_list_id
}).getChildren();
for (var j = 0; j < mail_file_result.length; j++) {
mb.attachFile(mail_file_result[j].file_path);
}
var sm = new HlSendMail();
if (mail_list_result[i].content_type == "text/html") {
println(mail_list_result[i].mailing_list_id);
if (sm.sendHtmlMail(mb)) {
$bm('sys.SYS405.zj_sys_mailing_list').update({
mailing_list_id: mail_list_result[i].mailing_list_id
});
} else {
$bm('sys.SYS405.zj_sys_mailing_list').execute({
mailing_list_id: mail_list_result[i].mailing_list_id
});
}
} else {
if (sm.sendMail(mb)) {
$bm('sys.SYS405.zj_sys_mailing_list').update({
mailing_list_id: mail_list_result[i].mailing_list_id
});
} else {
$bm('sys.SYS405.zj_sys_mailing_list').execute({
mailing_list_id: mail_list_result[i].mailing_list_id
});
}
}
}
} catch (e) {
raise_app_error(e);
}
]]>
</s:server-script>
</a:init-procedure>
<a:service-output/>
</a:service>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment