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
ff335add
Commit
ff335add
authored
Aug 02, 2024
by
18083
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
营业月结跨月核销及划转提示
parent
fad61571
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
390 additions
and
80 deletions
+390
-80
csh_data_confirm.lwm
...n/webapp/WEB-INF/classes/csh/CSH531N/csh_data_confirm.lwm
+24
-1
csh_transaction.lwm
...in/webapp/WEB-INF/classes/csh/CSH531N/csh_transaction.lwm
+6
-4
csh_write_off_interface.lview
.../webapp/modules/csh/CSH531N/csh_write_off_interface.lview
+262
-61
csh_transaction_deposit_transfer_detail.lview
..._DEPOSIT102/csh_transaction_deposit_transfer_detail.lview
+98
-14
No files found.
src/main/webapp/WEB-INF/classes/csh/CSH531N/csh_data_confirm.lwm
View file @
ff335add
...
...
@@ -4,8 +4,9 @@
<bm:operation
name=
"update"
>
<bm:update-sql>
<![CDATA[
begin
csh_transaction_interface_pkg.post_interface(p_transaction_id =>
${@transaction_id},
p_user_id =>${/session/@user_id},
p_user_id =>${/session/@user_id},
p_err_count =>${@err_count});
end;
]]>
</bm:update-sql>
...
...
@@ -15,8 +16,11 @@
</bm:operation>
<bm:operation
name=
"execute"
>
<bm:update-sql>
<![CDATA[
declare
v_transaction_num varchar2(400);
begin
if ${@flag} = 'SUBMIT' then
csh_transaction_interface_pkg.check_operat_flag(p_transaction_id =>
${@transaction_id} );
update CSH_TRANSACTION
set confirmed_flag = 'WF_APPROVING'
where transaction_id = ${@transaction_id};
...
...
@@ -27,6 +31,25 @@
end if;
end;
]]>
</bm:update-sql>
</bm:operation>
<bm:operation
name=
"query"
>
<bm:query-sql>
<![CDATA[
Select decode(Count(t1.transaction_id), Count(t1.csh_confirm), 'Y', 'N') As csh_confirm_flag
From (Select t.transaction_date,
t.transaction_id,
(Select c2.transaction_id
From csh_transaction c2
Where c2.transaction_id = t.transaction_id
And nvl(c2.business_monthly_flag, 'N') = 'Y') As csh_confirm
From csh_transaction t
Where t.confirmed_flag in
('ACCAUDITED', 'APPROVED', 'WF_REJECTED', 'WF_APPROVING')
And t.transaction_type not in ('DEPOSIT', 'PAYMENT')
And t.returned_flag not in ('RETURN', 'FULL')
And nvl(t.reversed_flag, 'N') = 'N') t1
Where to_char(t1.transaction_date, 'yyyymm') =
to_char(to_date(${@transaction_date},'yyyy/mm/dd'), 'yyyymm')
]]>
</bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
src/main/webapp/WEB-INF/classes/csh/CSH531N/csh_transaction.lwm
View file @
ff335add
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-5-14 下午01:23:36
$Revision: 1.0
$Purpose:
$Author: gaoyang
$Date: 2013-5-14 下午01:23:36
$Revision: 1.0
$Purpose:
-->
<bm:model
xmlns:bm=
"http://www.leaf-framework.org/schema/bm"
xmlns:f=
"leaf.database.features"
alias=
"t1"
baseTable=
"CSH_TRANSACTION"
>
...
...
@@ -217,6 +217,8 @@
expression=
"(select nvl(sum(ctr.this_return_amount),0) from csh_transaction_return ctr where ctr.transaction_id = t1.transaction_id and ctr.status = 'APPROVING')"
forInsert=
"false"
forUpdate=
"false"
prompt=
"审批中退款金额"
/>
<!--end-->
<bm:field
name=
"guarantor_name_duty"
/>
</bm:fields>
<bm:features>
<f:standard-who/>
...
...
src/main/webapp/modules/csh/CSH531N/csh_write_off_interface.lview
View file @
ff335add
...
...
@@ -9,8 +9,7 @@
<a:link
id=
"csh531n_submit_link_id"
model=
"csh.CSH531N.csh_data_confirm"
modelaction=
"execute"
/>
<a:link
id=
"transaction_uploadFile_id"
url=
"${/request/@context_path}/uploadFile.lview"
/>
<a:link
id=
"transaction_downloadFile_id"
url=
"${/request/@context_path}/downloadFile.lview"
/>
<a:link
id=
"csh531n_submit_interface_link_id"
model=
"csh.CSH531N.csh_write_off_interface"
modelaction=
"batch_update"
/>
<a:link
id=
"csh531n_submit_interface_link_id"
model=
"csh.CSH531N.csh_write_off_interface"
modelaction=
"batch_update"
/>
<script
src=
"${/request/@context_path}/javascripts/calculate.js"
type=
"text/javascript"
/>
<script
type=
"text/javascript"
>
<![CDATA[
...
...
@@ -27,10 +26,9 @@
}
function init() {
if ('${/parameter/@collection_classes}' == 'COMBINED' && '${/parameter/@transaction_type}' !== 'DEPOSIT') {
if ('${/parameter/@collection_classes}' == 'COMBINED' && '${/parameter/@transaction_type}' !== 'DEPOSIT') {
document.getElementById('write_off_deposit').style.display = 'block';
document.getElementById('write_off_operat').style.display = 'block';
}
if ('${/parameter/@advanceDisplayFlag}' == 'Y') {
document.getElementById('write_off_advance').style.display = 'block';
...
...
@@ -39,8 +37,10 @@
if ('${/parameter/@readOnly}' == 'Y') {
$('csh_grid_add_bt').setVisible(false);
$('csh_grid_delete_bt').setVisible(false);
$('csh_grid_deposit_add_bt').setVisible(false);
$('csh_grid_deposit_add_bt').setVisible(false);
$('csh_grid_deposit_delete_bt').setVisible(false);
$('csh_grid_operat_add_bt').setVisible(false);
$('csh_grid_operat_delete_bt').setVisible(false);
$('csh_write_off_grid').hideColumn('left_amount');
$('csh_write_off_grid').hideColumn('left_principal');
$('csh_write_off_grid').hideColumn('left_interest');
...
...
@@ -71,7 +71,7 @@
var readOnly = '${/parameter/@readOnly}';
var write_off_type = record.get('write_off_type');
if (batch_status == 'SUBMIT' || readOnly == 'Y') {
return;
} else {
if (name == 'contract_number') {
if (write_off_type != 'DEPOSIT_POOL_CREDIT') {
...
...
@@ -105,6 +105,9 @@
}
if (write_off_type == 'RECEIPT_DEPOSIT_POOL') {
return 'csh_transaction_deposit_grid_dp';
}
if (write_off_type == 'OPERAT_COMBINED') {
return 'csh_transaction_operat_grid_dp';
}
}
if (name == 'agent_id_desc') {
...
...
@@ -115,7 +118,7 @@
if (name == 'write_off_classification_desc') {
return 'csh_write_off_grid_cb';
}
return;
}
}
...
...
@@ -152,7 +155,7 @@
function csh531_update_fun(ds, record, name, value, oldValue) {
if (name == 'write_off_amount') {
if
(!checkAmount())
{
if
(!checkAmount())
{
setTimeout(function () {//防止递归
record.set(name, oldValue);
});
...
...
@@ -179,7 +182,7 @@
} else {
record.set('write_off_principal', null);
}
x_amount = minus(value,
left_principal);
x_amount = minus(value,left_principal);
if (left_interest > 0) {
record.set('write_off_interest', x_amount);
} else {
...
...
@@ -279,8 +282,8 @@
record.set('left_principal', '');
record.set('left_interest', '');
}
if (name == 'wirte_off_date')
{
record.set('journal_date',
value);
if (name == 'wirte_off_date'){
record.set('journal_date',value);
}
}
...
...
@@ -313,13 +316,14 @@
var interfaceRs = $('csh_write_off_interface_ds').getAll();
var depositRs = $('csh_transaction_deposit_ds').getAll();
var advancedRs = $('csh_transaction_advanced_ds').getAll();
var operatRs = $('csh_transaction_operat_ds').getAll();
//IE浏览器不支持ES6语法
// var allRs = [...interfaceRs, ...depositRs, ...advancedRs];
var allRs = [];
allRs = interfaceRs.concat(depositRs).concat(advancedRs);
allRs = interfaceRs.concat(depositRs).concat(advancedRs)
.concat(operatRs)
;
for (var i = 0; i
< allRs.length
;
i++)
{
if
(allRs[i].dirty)
{
...
...
@@ -380,12 +384,19 @@
for (var i = 0; i
< write_off_recs.length
;
i++)
{
var
t =
parseFloat(write_off_recs[i].get('write_off_amount'));
if
(!isNaN(t))
{
sum =
plus(sum,
t);
sum =
plus(sum,t);
}
}
var
deposit_recs =
$('csh_transaction_deposit_ds').getAll();
for
(var
i =
0;
i
<
deposit_recs.length;
i++)
{
var
t =
parseFloat(deposit_recs[i].get('write_off_amount'));
if
(!isNaN(t))
{
sum =
plus(sum,t);
}
}
var
operat_recs =
$('csh_transaction_operat_ds').getAll();
for
(var
i =
0;
i
<
operat_recs.length;
i++)
{
var
t =
parseFloat(operat_recs[i].get('write_off_amount'));
if
(!isNaN(t))
{
sum =
plus(sum,
t);
}
...
...
@@ -394,15 +405,15 @@
for
(var
i =
0;
i
<
advanced_recs.length;
i++)
{
var
t =
parseFloat(advanced_recs[i].get('write_off_amount'));
if
(!isNaN(t))
{
sum =
plus(sum,
t);
sum =
plus(sum,t);
}
}
var
h_record =
$('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
var
for_allocate_amount =
0;
if
(h_record.get('unwrite_off_amount')
&&
h_record.get('unwrite_off_amount')
>
0)
{
for_allocate_amount = minus(h_record.get('unwrite_off_amount'),
sum);
if
(h_record.get('unwrite_off_amount')
&&
h_record.get('unwrite_off_amount')
>
0)
{
for_allocate_amount = minus(h_record.get('unwrite_off_amount'),sum);
}
h_record.set('for_allocate_amount',
for_allocate_amount);
h_record.set('for_allocate_amount',for_allocate_amount);
}
function csh531n_write_off_return() {
...
...
@@ -498,19 +509,17 @@
var record = ds.getCurrentRecord();
// var header_id = '${/parameter/@transaction_id}';
var header_id = record.get('transaction_id');
if (record.get('transaction_type') == 'ADVANCE_RECEIPT' || record.get('transaction_type') == 'DEPOSIT') {
header_id = record.get('source_csh_trx_id');
}
if (header_id) {
var url = $('transaction_downloadFile_id').getUrl() + '?table_name=CSH_TRANSACTION
&
header_id=' + header_id;
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'transaction_downFile_winid',
width: 850,
height: 400
});
}
//if(record.get('transaction_type') == 'ADVANCE_RECEIPT'||record.get('transaction_type') == 'DEPOSIT'){
//header_id = record.get('source_csh_trx_id');
//}
var url = $('transaction_uploadFile_id').getUrl() + '?table_name=CSH_TRANSACTION
&
header_id=' + header_id;
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'transaction_downFile_winid',
width: 850,
height: 400
});
// win.on('close', function () {
// window.location.href = $('csh_transaction_receipt_id').getUrl();
// // var url = $('csh_transaction_receipt_id').getUrl();
...
...
@@ -518,12 +527,12 @@
// });
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
return;
}
}
function attachment_rendered() {
return '
<a
href=
"javascript:attachment_upload()"
><span
style=
"color:red;"
>
附件
查看
</span></a>
';
return '
<a
href=
"javascript:attachment_upload()"
><span
style=
"color:red;"
>
附件
上传
</span></a>
';
}
function csh531_add_fun(ds, record, index) {
...
...
@@ -536,7 +545,7 @@
var datas = [];
var para = {};
var records = $('csh_write_off_interface_ds').getAll();
for (var i = 0;
i
< records.length
;
i++)
{
for (var i = 0;
i
< records.length
;
i++)
{
para =
records[i].data;
para['_status']
=
'update';
datas.push(para);
...
...
@@ -544,17 +553,18 @@
Leaf.request({
url:
$('csh531n_submit_interface_link_id').getUrl(),
para:
datas,
success:
function
(res)
{
success:
function(res)
{
Leaf.Masker.unmask(Ext.getBody());
$('csh_transaction_deposit_ds').submit();
$('csh_transaction_operat_ds').submit();
$('csh_transaction_advanced_ds').submit();
csh531_submitsuccess();
},
failure:
function
()
{
failure:
function()
{
Leaf.Masker.unmask(Ext.getBody());
csh531_submitfailed();
},
error:
function
()
{
error:
function()
{
Leaf.Masker.unmask(Ext.getBody());
csh531_submitfailed();
},
...
...
@@ -572,12 +582,19 @@
for
(var
i =
0;
i
<
write_off_recs.length;
i++)
{
var
t =
parseFloat(write_off_recs[i].get('write_off_amount'));
if
(!isNaN(t))
{
sum =
plus(sum,
t);
sum =
plus(sum,t);
}
}
var
deposit_recs =
$('csh_transaction_deposit_ds').getAll();
for
(var
i =
0;
i
<
deposit_recs.length;
i++)
{
var
t =
parseFloat(deposit_recs[i].get('write_off_amount'));
if
(!isNaN(t))
{
sum =
plus(sum,t);
}
}
var
operat_recs =
$('csh_transaction_operat_ds').getAll();
for
(var
i =
0;
i
<
operat_recs.length;
i++)
{
var
t =
parseFloat(operat_recs[i].get('write_off_amount'));
if
(!isNaN(t))
{
sum =
plus(sum,
t);
}
...
...
@@ -586,7 +603,7 @@
for
(var
i =
0;
i
<
advanced_recs.length;
i++)
{
var
t =
parseFloat(advanced_recs[i].get('write_off_amount'));
if
(!isNaN(t))
{
sum =
plus(sum,
t);
sum =
plus(sum,t);
}
}
var
header_rec =
$('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
...
...
@@ -620,24 +637,33 @@
function csh_deposit_edit_function(record, name) {
if ('${/parameter/@readOnly}' == 'Y') {
return;
} else {
if (name == 'write_off_amount') {
return 'csh_transaction_deposit_grid_nf';
}
}
}
function csh_operat_edit_function(record, name) {
if ('${/parameter/@readOnly}' == 'Y') {
} else {
if (name == 'write_off_amount') {
return 'csh_transaction_operat_grid_nf';
}
}
}
function csh_advance_edit_function(record, name) {
if ('${/parameter/@readOnly}' == 'Y') {
return;
} else {
if (name == 'write_off_amount') {
var r = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
var deposit_ds = $('csh_transaction_deposit_ds');
var operat_ds = $('csh_transaction_operat_ds');
var advanced_ds = $('csh_transaction_advanced_ds');
var current_deposit_r = deposit_ds.getAt(0);
var current_operat_r = operat_ds.getAt(0);
var current_advance_r = advanced_ds.getAt(0);
if (r.get('exists_deposit_flag') == 'Y'
&&
current_deposit_r) {
return;
...
...
@@ -652,6 +678,72 @@
}
}
}
//获取当前日期的上一个月
function getPreMonth(date) {
var arr = date.split('-');
var year = arr[0]; //获取当前日期的年份
var month = arr[1]; //获取当前日期的月份
var day = arr[2]; //获取当前日期的日
var days = new Date(year, month, 0);
days = days.getDate(); //获取当前日期中月的天数
var year2 = year;
var month2 = parseInt(month) - 1;
if (month2 == 0) {
year2 = parseInt(year2) - 1;
month2 = 12;
}
var day2 = day;
var days2 = new Date(year2, month2, 0);
days2 = days2.getDate();
if (day2 > days2) {
day2 = days2;
}
if (month2
< 10
)
{
month2 =
'0'
+
month2;
}
var
t2 =
year2
+
'-'
+
month2
+
'-'
+
day2;
return
t2;
}
//获取月结期间是否关闭
function
get_period_closed(date){
var
csh_confirm_flag;
$L.request({
url:
'${/request/@context_path}/autocrud/csh.CSH531N.csh_data_confirm/query',
para:
{
transaction_date:
date
},
sync:
true,
success:
function
(res)
{
csh_confirm_flag=
res.result.record.csh_confirm_flag;
},
error:
function
()
{
},
failure:
function
()
{
},
scope:
this,
sync:
true,
});
if(
csh_confirm_flag=
='N'){
return
false;
}
return
true;
}
function
check_transaction(){
var
transaction_ds =
$('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
var
paid_byother_flag=
transaction_ds.get('paid_byother_flag');
var
collection_classes=
transaction_ds.get('collection_classes');
var
guarantor_name_duty=
transaction_ds.get('guarantor_name_duty');
var
transaction_type=
transaction_ds.get('transaction_type');
if(
paid_byother_flag=
='T'
&&
collection_classes=
='COMBINED'
&&
guarantor_name_duty=
='NULL'
&&
transaction_type=
='ADVANCE_RECEIPT'){
return
false;
}
return
true;
}
function
csh531n_write_off_submit()
{
var
returning_amount =
$('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord().get('returning_amount')
||
0;
...
...
@@ -662,13 +754,14 @@
var interfaceRs = $('csh_write_off_interface_ds').getAll();
var depositRs = $('csh_transaction_deposit_ds').getAll();
var advancedRs = $('csh_transaction_advanced_ds').getAll();
var operatRs = $('csh_transaction_operat_ds').getAll();
//IE浏览器不支持ES6语法
// var allRs = [...interfaceRs, ...depositRs, ...advancedRs];
var allRs = [];
allRs = interfaceRs.concat(depositRs).concat(advancedRs);
allRs = interfaceRs.concat(depositRs).concat(advancedRs)
.concat(operatRs)
;
var sum = 0;
...
...
@@ -677,7 +770,7 @@
//
Leaf.showInfoMessage("提示",
"存在未保存数据,请先保存再进行提交操作!");
//
return;
//
}
sum =
plus(sum,
allRs[i].get('write_off_amount')
||
0);
sum =
plus(sum,allRs[i].get('write_off_amount')
||
0);
}
if
(
sum =
=
0)
{
...
...
@@ -685,18 +778,67 @@
return;
}
//
以旧换新与三方协议合同的首付款不可进行电汇核销
var
cf_item_2_count =
0;
var
cf_item_2_count=
0;
var
write_date_count =
0;
for
(var
i =
0;
i
<
interfaceRs.length;
i++)
{
if
((interfaceRs[i].get('payment_deduction')
==
'TRADE_IN'
||
interfaceRs[i].get('payment_deduction')
==
'TRI_AGREEMENT'||interfaceRs[i].get('payment_deduction')=='DOWN_PAYMENT_DEDUCTION')
&&
interfaceRs[i].get('write_off_cf_item')
==
'2')
{
cf_item_2_count =
plus(cf_item_2_count,
1);
if
((interfaceRs[i].get('payment_deduction')
=='TRADE_IN'||interfaceRs[i].get('payment_deduction')=='TRI_AGREEMENT'||interfaceRs[i].get('payment_deduction')=='DOWN_PAYMENT_DEDUCTION')&&interfaceRs[i].get('write_off_cf_item')==
'2')
{
cf_item_2_count =
plus(cf_item_2_count,1);
}
if
(interfaceRs[i].get('division')
==
'95'
&&
Leaf.formatDate(interfaceRs[i].get('write_off_date'))
<
Leaf.formatDate(interfaceRs[i].get('due_date'))
&&
interfaceRs[i].get('write_off_cf_item')
==
'1')
{
write_date_count =
plus(write_date_count,
1);
}
}
if
(cf_item_2_count
>
0) {
if
(cf_item_2_count
>
0) {
Leaf.showInfoMessage('提示', ' 首付款抵扣为“无”以外的合同,不可进行首付款电汇核销!');
return;
}
if (write_date_count > 0) {
Leaf.showInfoMessage('提示', '经营性租赁合同收款核销当天的系统日期不得早于应收日!');
return;
}
//收款核销为融租保证金和经租保证金时:校验收款日期和核销日期存在跨月且收款日期所在月份的营业月结未确认时 18083 2024/7/15
var depositRs_date_count=0;
var operatRs_date_count=0;
var interfaceRs_date_count=0;
var transaction_date = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord().get('transaction_date');
var transaction_type = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord().get('transaction_type');
//核销为融租保证金
for(var j=0;j
<depositRs.length
;j++){
if(!get_period_closed(transaction_date)
&&check_transaction()
&&(depositRs[j].get('write_off_date').getFullYear()
!=transaction_date.getFullYear()||depositRs[j].get('write_off_date').getMonth()+1
!=transaction_date.getMonth()+1)){
depositRs_date_count =
plus(depositRs_date_count,
1);
}
}
//核销为经租保证金
for(var
j=
0;j<operatRs.length;j++){
if(!get_period_closed(transaction_date)
&&check_transaction()
&&(operatRs[j].get('write_off_date').getFullYear()
!=transaction_date.getFullYear()||operatRs[j].get('write_off_date').getMonth()+1
!=transaction_date.getMonth()+1)){
operatRs_date_count =
plus(operatRs_date_count,
1);
}
}
//保证金抵扣为债券
if(
transaction_type =
=
'DEPOSIT'){
for(var
j=
0;j<interfaceRs.length;j++){
var
Rs_write_date =
Leaf.formatDate(interfaceRs[j].get('write_off_date'));
var
interfaceRs_date =
getPreMonth(Leaf.formatDate(interfaceRs[j].get('write_off_date')));
if(!get_period_closed(interfaceRs_date)
&&(Rs_write_date.split('-')[0]
!=transaction_date.getFullYear()
||
Rs_write_date.split('-')[1]!=transaction_date.getMonth()+1)){
interfaceRs_date_count =
plus(interfaceRs_date_count,
1);
break;
}
}
}
var
promt;
if(depositRs_date_count
>
0 ||operatRs_date_count>0){
promt =(transaction_date.getMonth()+1)+'月营业月结未确认,收款日期为'+Leaf.formatDate(transaction_date)+',与当前选择
<br/>
保证金的核销日期存在跨月,会影响会计凭证日期,确认
<br/>
要提交吗?'
}else if(interfaceRs_date_count>0){
promt = interfaceRs_date.split('-')[0]+'-'+interfaceRs_date.split('-')[1]+'月营业月结未确认,与当前选择的核销日期存在
<br/>
跨月,会影响会计凭证日期,确认要提交吗?'
}else{
promt = '确认提交复核吗?'
}
var createConfirm = Leaf.showConfirm('提示',
'确认提交复核吗'
, function () {
var createConfirm = Leaf.showConfirm('提示',
promt
, function () {
$('csh531n_write_off_submit_btn_id').disable();
csh511_save_all();
});
...
...
@@ -727,15 +869,15 @@
}
function write_off_amount_dblclick(grid, record, row, name) {
if
(!record)
{
if
(!record)
{
record = grid.record;
}
var head_record = $('csh_transaction_receipt_write_off_detail_ds').getAt(0);
// record = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
var for_allocate_amount = head_record.get('for_allocate_amount'),
unreceived_amount = record.get('unreceived_amount');
if
(unreceived_amount)
{
if (Ext.isEmpty(record.get('write_off_amount'))
||
record.get('write_off_amount') == 0) {
if
(unreceived_amount)
{
if (Ext.isEmpty(record.get('write_off_amount'))
||
record.get('write_off_amount') == 0) {
record.set('write_off_amount', get_min_amount(for_allocate_amount, unreceived_amount));
}
}
...
...
@@ -780,7 +922,7 @@
displayField=
"code_value_name"
returnField=
"collection_classes"
valueField=
"code_value"
/>
<a:field
name=
"ref_v01"
/>
<a:field
name=
"approving_return_amount"
readOnly=
"true"
/>
<a:field
name=
"for_allocate_amount"
readOnly=
"true"
/>
<a:field
name=
"for_allocate_amount"
readOnly=
"true"
/>
</a:fields>
</a:dataSet>
...
...
@@ -790,8 +932,7 @@
selectable=
"true"
>
<a:fields>
<a:field
name=
"company_id"
defaultValue=
"${/parameter/@company_id}"
/>
<a:field
name=
"write_off_date"
datatype=
"java.util.Date"
validator=
"write_off_date_validator"
required=
"true"
<a:field
name=
"write_off_date"
datatype=
"java.util.Date"
validator=
"write_off_date_validator"
required=
"true"
defaultValue=
"${/model/sys_default_time/record/@now_date}"
/>
<a:field
name=
"journal_date"
required=
"true"
defaultValue=
"${/model/sys_default_time/record/@now_date}"
/>
...
...
@@ -809,7 +950,7 @@
<a:field
name=
"contract_number"
prompt=
"合同编号"
autoComplete=
"true"
lovAutoQuery=
"true"
lovHeight=
"850"
required=
"true"
lovUrl=
"${/request/@context_path}/modules/csh/CSH531N/csh_write_off_ref_contract.lview?bp_id=${/model/csh_transaction_path/record/@bp_id}&deposit_flag=${/parameter/@deposit_flag}&transaction_date=${/model/csh_transaction_path/record/@transaction_date}"
lovWidth=
"1
3
50"
title=
"合同号选择"
>
lovWidth=
"1
5
50"
title=
"合同号选择"
>
<a:mapping>
<a:map
from=
"contract_number"
to=
"contract_number"
/>
<a:map
from=
"contract_name"
to=
"contract_name"
/>
...
...
@@ -818,6 +959,7 @@
<a:map
from=
"bp_id_tenant_name"
to=
"write_off_bp_name"
/>
<a:map
from=
"contract_status_desc"
to=
"contract_status_desc"
/>
<a:map
from=
"payment_deduction"
to=
"payment_deduction"
/>
<a:map
from=
"division"
to=
"division"
/>
</a:mapping>
</a:field>
<a:field
name=
"batch_id"
defaultValue=
"${/parameter/@batch_id}"
/>
...
...
@@ -827,6 +969,7 @@
valueField=
"code_value"
/>
<a:field
name=
"write_off_bp_id"
/>
<a:field
name=
"payment_deduction"
/>
<a:field
name=
"division"
/>
<a:field
name=
"write_off_classification_desc"
prompt=
"核销分类"
options=
"ds_csh_write_off_classification_ds"
returnField=
"write_off_classification"
valueField=
"code_value"
displayField=
"code_value_name"
/>
...
...
@@ -895,7 +1038,6 @@
</a:mapping>
</a:field>
<a:field
name=
"bp_id"
defaultValue=
"${/parameter/@bp_id}"
/>
<a:field
name=
"bp_name"
defaultValue=
"${/parameter/@bp_name}"
/>
<a:field
name=
"transaction_id"
defaultValue=
"${/parameter/@transaction_id}"
/>
<a:field
name=
"write_off_type"
defaultValue=
"RECEIPT_ADVANCE_RECEIPT"
/>
<a:field
name=
"company_id"
defaultValue=
"${/session/@company_id}"
/>
...
...
@@ -905,6 +1047,32 @@
defaultValue=
"${/model/sys_default_time/record/@now_date}"
/>
</a:fields>
</a:dataSet>
<a:dataSet
id=
"csh_transaction_operat_ds"
model=
"csh.CSH531N.csh_transaction_plan_query"
fetchAll=
"true"
autoQuery=
"true"
queryUrl=
"${/request/@context_path}/autocrud/csh.CSH531N.csh_transaction_plan_query/query?transaction_id=${/parameter/@transaction_id}&write_off_type=OPERAT_COMBINED"
selectable=
"true"
>
<a:fields>
<a:field
name=
"bp_name"
readOnly=
"true"
autoComplete=
"true"
lovGridHeight=
"350"
lovHeight=
"550"
lovLabelWidth=
"50"
lovWidth=
"550"
required=
"true"
lovService=
"basic.hls_bp_master_v_for_lov?bp_id=${/parameter/@bp_id}"
title=
"HLS.BP_TITLE"
>
<a:mapping>
<a:map
from=
"bp_id"
to=
"bp_id"
/>
<a:map
from=
"bp_name"
to=
"bp_name"
/>
</a:mapping>
</a:field>
<a:field
name=
"bp_id"
defaultValue=
"${/parameter/@bp_id}"
/>
<a:field
name=
"bp_name"
defaultValue=
"${/model/csh_transaction_path/record/@bp_name}"
/>
<a:field
name=
"transaction_id"
defaultValue=
"${/parameter/@transaction_id}"
/>
<a:field
name=
"write_off_type"
defaultValue=
"OPERAT_COMBINED"
/>
<a:field
name=
"company_id"
defaultValue=
"${/session/@company_id}"
/>
<a:field
name=
"write_off_amount"
/>
<a:field
name=
"create_wf_flag"
defaultValue=
"N"
/>
<a:field
name=
"write_off_date"
validator=
"write_off_date_validator"
required=
"true"
defaultValue=
"${/model/sys_default_time/record/@now_date}"
/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
...
...
@@ -961,10 +1129,9 @@
bindTarget=
"csh_transaction_receipt_write_off_detail_ds"
readOnly=
"true"
/>
</a:box>
<a:box
column=
"3"
labelWidth=
"100"
>
<a:label
prompt=
"附件
查看
"
colspan=
"2"
bindTarget=
"csh_transaction_receipt_write_off_detail_ds"
<a:label
prompt=
"附件
上传
"
colspan=
"2"
bindTarget=
"csh_transaction_receipt_write_off_detail_ds"
renderer=
"attachment_rendered"
width=
"370"
/>
<a:numberField
name=
"for_allocate_amount"
renderer=
"Leaf.formatMoney"
prompt=
"剩余可分配金额"
readOnly=
"true"
bindTarget=
"csh_transaction_receipt_write_off_detail_ds"
/>
<a:numberField
name=
"for_allocate_amount"
renderer=
"Leaf.formatMoney"
prompt=
"剩余可分配金额"
readOnly=
"true"
bindTarget=
"csh_transaction_receipt_write_off_detail_ds"
/>
</a:box>
<!-- <a:box column="4" labelWidth="100">-->
...
...
@@ -1099,7 +1266,7 @@
</a:events>
</a:grid>
</a:tab>
<a:tab
id=
"write_off_deposit"
tabStyle=
"display:none"
prompt=
"核销为保证金"
width=
"150"
>
<a:tab
id=
"write_off_deposit"
tabStyle=
"display:none"
prompt=
"核销为
融租
保证金"
width=
"150"
>
<a:grid
id=
"csh_transaction_deposit_grid"
navBar=
"true"
bindTarget=
"csh_transaction_deposit_ds"
height=
"370"
...
...
@@ -1166,6 +1333,40 @@
<a:event
name=
"dblclick"
handler=
"write_off_amount_dblclick"
/>
</a:events>
</a:grid>
</a:tab>
<a:tab
id=
"write_off_operat"
tabStyle=
"display:none"
prompt=
"核销为经租保证金"
width=
"150"
>
<a:grid
id=
"csh_transaction_operat_grid"
navBar=
"true"
bindTarget=
"csh_transaction_operat_ds"
height=
"370"
marginWidth=
"10"
>
<a:toolBar>
<a:button
id=
"csh_grid_operat_add_bt"
type=
"add"
/>
<a:button
id=
"csh_grid_operat_delete_bt"
type=
"delete"
/>
</a:toolBar>
<a:columns>
<a:column
name=
"bp_name"
prompt=
"商业伙伴"
width=
"180"
align=
"center"
editor=
"csh_transaction_operat_grid_lv"
/>
<a:column
name=
"write_off_amount"
prompt=
"核销金额"
editorFunction=
"csh_operat_edit_function"
renderer=
"Leaf.formatMoney"
width=
"180"
align=
"right"
footerRenderer=
"summaryRenderer"
/>
<a:column
name=
"write_off_date"
prompt=
"核销日期"
width=
"180"
align=
"center"
renderer=
"Leaf.formatDate"
editorFunction=
"csh_edit_function"
/>
</a:columns>
<a:editors>
<a:lov
id=
"csh_transaction_operat_grid_lv"
/>
<a:numberField
id=
"csh_transaction_operat_grid_nf"
allowNegative=
"false"
>
<a:events>
<a:event
name=
"focus"
handler=
"write_off_amount_dblclick"
/>
</a:events>
</a:numberField>
<a:datePicker
id=
"csh_transaction_operat_grid_dp"
/>
</a:editors>
<a:events>
<a:event
name=
"dblclick"
handler=
"write_off_amount_dblclick"
/>
</a:events>
</a:grid>
</a:tab>
</a:tabs>
</a:tabPanel>
...
...
src/main/webapp/modules/cus_deposit/CUS_DEPOSIT102/csh_transaction_deposit_transfer_detail.lview
View file @
ff335add
...
...
@@ -17,6 +17,63 @@
$('${/parameter/@winId}').close();
}
//获取当前日期的上一个月
function getPreMonth(date) {
var arr = date.split('-');
var year = arr[0]; //获取当前日期的年份
var month = arr[1]; //获取当前日期的月份
var day = arr[2]; //获取当前日期的日
var days = new Date(year, month, 0);
days = days.getDate(); //获取当前日期中月的天数
var year2 = year;
var month2 = parseInt(month) - 1;
if (month2 == 0) {
year2 = parseInt(year2) - 1;
month2 = 12;
}
var day2 = day;
var days2 = new Date(year2, month2, 0);
days2 = days2.getDate();
if (day2 >
days2) {
day2 = days2;
}
if (month2
< 10
)
{
month2 =
'0'
+
month2;
}
var
t2 =
year2
+
'-'
+
month2
+
'-'
+
day2;
return
t2;
}
//校验保证金划转是否存在跨月:经济业务发生日与经济业务发生日的前一个月比较
18083
2024/7/15
function
check_extend_month(){
var
csh_confirm_flag;
var
deposit_records =
$('deposit_transfer_detail_result_ds').getAll();
var
je_date =
deposit_records[0].get('je_date');
var
last_je_date =
getPreMonth(je_date.format('yyyy-mm-dd'));
$L.request({
url:
'${/request/@context_path}/autocrud/csh.CSH531N.csh_data_confirm/query',
para:
{
transaction_date:
last_je_date
},
sync:
true,
success:
function
(res)
{
csh_confirm_flag=
res.result.record.csh_confirm_flag;
},
error:
function
()
{
},
failure:
function
()
{
},
scope:
this,
sync:
true,
});
if(
csh_confirm_flag =
='N'){
return
false;
}
return
true;
}
function
cshdeposit102_transfer_submit()
{
if
($('deposit_transfer_detail_result_ds').validate())
{
if($('deposit_transfer_detail_result_ds').isModified()){
...
...
@@ -44,17 +101,30 @@
var
trans_record;
trans_record =
deposit_records[i];
//划出代理店与划入代理店一致且划出代理店为经租代理店时,提交经租营业本部长审批
var check_flag= false;
if(head_record.get('agent_bp_code')!='D00010027'){
check_flag= true
}else if(head_record.get('agent_bp_code')=='D00010027'){
for (var j = 0; j < deposit_records.length; j++) {
if(head_record.get('agent_bp_code') !=deposit_records[j].get('agent_bp_code')){
var check_flag= true;
break;
}
}
}
var
check_flag=
true;
//
if(head_record.get('agent_bp_code')!='D00010027'){
//
check_flag=
true
//
}else
if(head_record.get('agent_bp_code')=='D00010027'){
//
for
(var
j =
0;
j
<
deposit_records.length;
j++)
{
//
if(head_record.get('agent_bp_code')
!=deposit_records[j].get('agent_bp_code')){
//
var
check_flag=
true;
//
break;
//
}
//
}
//
}
//经营性租赁划转到其他,提交经租副部长审批
if(head_record.get('business_type')
==
'LEASEOPERAT'){
check_flag =
=
false;
}
//融租划转到经租,提交经租副部长审批
if(head_record.get('business_type')
!=
'LEASEOPERAT'){
for(var
j=
0;
j<deposit_records.length;
j++){
if(deposit_records[j].get('business_type')
==
'Y'
||
deposit_records[j].get('business_type')
==
'LEASEOPERAT'){
check_flag =
false;
break;
}
}
}
if(check_flag){
trans_record.set('review_type',
'REVIEWING');
}else{
...
...
@@ -93,7 +163,14 @@
}
}
if
(flag){
Leaf.showConfirm('${l:PROMPT}',
'确定提交保证金划转?',
function
()
{
if(!check_extend_month()){
var
je_date_year =
getPreMonth(deposit_records[0].get('je_date').format('yyyy-mm-dd')).split('-')[0];
var
je_date_month =
getPreMonth(deposit_records[0].get('je_date').format('yyyy-mm-dd')).split('-')[1];
var
promt =
je_date_year+'-'+je_date_month+'月营业月结未确认,与当前选择的经济业务发生<br/
>
日存在跨月,会影响会计凭证日期,确认要提交吗?';
}else{
var promt ='确定提交保证金划转?'
}
Leaf.showConfirm('${l:PROMPT}',promt, function () {
Leaf.Masker.mask($('${/parameter/@winId}').wrap, "正在执行划转。。。");
Leaf.request({
url: $('csh_review_transfer_link_id').getUrl(),
...
...
@@ -117,8 +194,15 @@
}, function () {
Leaf.Masker.unmask($('${/parameter/@winId}').wrap);
}, null, null);
}else{
Leaf.showConfirm('${l:PROMPT}',
'是否确认在不同代理店之间进行划转?',
function
()
{
}else{
if(!check_extend_month()){
var je_date_year = getPreMonth(deposit_records[0].get('je_date').format('yyyy-mm-dd')).split('-')[0];
var je_date_month = getPreMonth(deposit_records[0].get('je_date').format('yyyy-mm-dd')).split('-')[1];
var promt =je_date_year+'-'+je_date_month+'月营业月结未确认,与当前选择的经济业务发生
<br/>
日存在跨月,会影响会计凭证日期,确认要提交吗?';
}else{
var promt ='是否确认在不同代理店之间进行划转?'
}
Leaf.showConfirm('${l:PROMPT}',promt, function () {
Leaf.Masker.mask($('${/parameter/@winId}').wrap, "正在执行划转。。。");
Leaf.request({
url: $('csh_review_transfer_link_id').getUrl(),
...
...
taoruidan
@trd18083
mentioned in commit
8517d77f
·
Aug 02, 2024
mentioned in commit
8517d77f
mentioned in commit 8517d77f7d07fc6e4365f07d5e94ed07e221509a
Toggle commit list
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