Commit feae6dca authored by 18083's avatar 18083

会计月结关闭期间新增保证金时间价值流程校验

parent 27807866
...@@ -8,18 +8,27 @@ ...@@ -8,18 +8,27 @@
<model xmlns="http://www.leaf-framework.org/schema/bm"> <model xmlns="http://www.leaf-framework.org/schema/bm">
<operations> <operations>
<operation name="execute"> <operation name="execute">
<update-sql><![CDATA[ <update-sql><![CDATA[
begin begin
gld_period_pkg.close_period(${/session/@company_id}, gld_period_pkg.close_period(${/session/@company_id},
${@period_set_code}, ${@period_set_code},
${@period_name}, ${@period_name},
${/session/@user_id}, ${/session/@user_id});
${@p_err_msg}); end;
end; ]]></update-sql>
]]></update-sql> </operation>
<parameters> <operation name="update">
<parameter name="p_err_msg" dataType="java.lang.String" input="false" output="true" outputPath="@p_err_msg"/> <update-sql><![CDATA[
</parameters> begin
</operation> gld_period_pkg.close_period_check(${@period_set_code},
</operations> ${@period_name},
${/session/@user_id},
${@p_err_msg});
end;
]]></update-sql>
<parameters>
<parameter name="p_err_msg" dataType="java.lang.String" input="false" output="true" outputPath="@p_err_msg"/>
</parameters>
</operation>
</operations>
</model> </model>
...@@ -13,9 +13,10 @@ ...@@ -13,9 +13,10 @@
<a:link id="gld_period_pkg_init_period_link" model="db.gld_period_pkg.init_period" modelaction="update"/> <a:link id="gld_period_pkg_init_period_link" model="db.gld_period_pkg.init_period" modelaction="update"/>
<a:link id="gld_period_pkg_close_period_link" model="db.gld_period_pkg.close_period" modelaction="execute"/> <a:link id="gld_period_pkg_close_period_link" model="db.gld_period_pkg.close_period" modelaction="execute"/>
<a:link id="gld_period_pkg_open_period_link" model="db.gld_period_pkg.open_period" modelaction="execute"/> <a:link id="gld_period_pkg_open_period_link" model="db.gld_period_pkg.open_period" modelaction="execute"/>
<a:link id="gld_close_period_check_link" model="db.gld_period_pkg.close_period" modelaction="update"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
function openPeriodDs(value, record, name) { function openPeriodDs(value, record, name) {
var period_status_code = record.get('period_status_code'); var period_status_code = record.get('period_status_code');
var ds = "close_open_ds"; var ds = "close_open_ds";
if (period_status_code == 'C' || period_status_code == 'U') { if (period_status_code == 'C' || period_status_code == 'U') {
...@@ -25,7 +26,7 @@ ...@@ -25,7 +26,7 @@
return ''; return '';
} }
} }
function closePeriodDs(value, record, name) { function closePeriodDs(value, record, name) {
var period_status_code = record.get('period_status_code'); var period_status_code = record.get('period_status_code');
var ds = "close_open_ds"; var ds = "close_open_ds";
...@@ -36,10 +37,10 @@ ...@@ -36,10 +37,10 @@
return '<a href="javascript:executeClose(\'' + ds + '\',\'' + url + '\',' + record.id + ')">${l:CLOSE_PERIOD}</a>'; return '<a href="javascript:executeClose(\'' + ds + '\',\'' + url + '\',' + record.id + ')">${l:CLOSE_PERIOD}</a>';
} }
} }
function statusRenderer(value, record, name) { function statusRenderer(value, record, name) {
if (value == null || value == undefined) { if (value == null || value == undefined) {
return '${l:PROMPT.NOT_OPEN}'; return '${l:PROMPT.NOT_OPEN}';
} else if (value == 'O') { } else if (value == 'O') {
...@@ -48,26 +49,26 @@ ...@@ -48,26 +49,26 @@
return '${l:PROMPT.CLOSED}'; return '${l:PROMPT.CLOSED}';
} }
} }
function executeOpen(ds, url, id) { function executeOpen(ds, url, id) {
record = $(ds).findById(id); record = $(ds).findById(id);
Leaf.request({ Leaf.request({
url: url, url: url,
para: record.data, para: record.data,
success: function() { success: function() {
record.set('period_status_code','O'); record.set('period_status_code','O');
Leaf.SideBar.enable = true; Leaf.SideBar.enable = true;
Leaf.SideBar.show({ Leaf.SideBar.show({
msg: '打开成功', msg: '打开成功',
duration: 3000 duration: 3000
}); });
}, },
scope: this scope: this
}); });
} }
function executeClose(ds, url, id) { function executeClose(ds, url, id) {
record = $(ds).findById(id); record = $(ds).findById(id);
if ($('close_open_ds').getAll().length == 0) { if ($('close_open_ds').getAll().length == 0) {
...@@ -83,37 +84,63 @@ ...@@ -83,37 +84,63 @@
scope: this scope: this
}); });
} else { } else {
Leaf.request({ $L.request({
url: url, url: $('gld_close_period_check_link').getUrl(),
para: record.data, para: record.data,
success: function(args) { success: function (args) {
if (args.result.p_err_msg) { if (args.result.p_err_msg) {
$L.showConfirm('提示', args.result.p_err_msg, function () { Leaf.showConfirm('提示', args.result.p_err_msg, function okFun() {
record.set('period_status_code', 'C'); Leaf.request({
url: url,
para: record.data,
success: function() {
record.set('period_status_code','C');
Leaf.SideBar.enable = true;
Leaf.SideBar.show({
msg: '关闭成功',
duration: 3000
});
},
scope: this
}); });
},function canFun(){},600,400);
} else {
Leaf.request({
url: url,
para: record.data,
success: function() {
} else { record.set('period_status_code','C');
record.set('period_status_code','C');
Leaf.SideBar.enable = true;
Leaf.SideBar.show({
msg: '关闭成功',
duration: 3000
});
},
scope: this
});
}
},
failure: function () {
},
error: function () {
},
scope: this
});
Leaf.SideBar.enable = true;
Leaf.SideBar.show({
msg: '关闭成功',
duration: 3000
});
}
},
scope: this
});
} }
} }
// function doQuery() { // function doQuery() {
// $('close_open_ds').setQueryParameter('period_set_code', '${/model/fieldset/record/@period_set_code}'); // $('close_open_ds').setQueryParameter('period_set_code', '${/model/fieldset/record/@period_set_code}');
// $('close_open_ds').query(); // $('close_open_ds').query();
// //
// } // }
function find_index() { function find_index() {
// var close_open_ds = $('close_open_ds'); // var close_open_ds = $('close_open_ds');
// var ds_length = close_open_ds.getAll().length; // var ds_length = close_open_ds.getAll().length;
...@@ -121,24 +148,24 @@ ...@@ -121,24 +148,24 @@
// var record = close_open_ds.find('internal_period_num', internal_period_num_max); // var record = close_open_ds.find('internal_period_num', internal_period_num_max);
// var index = close_open_ds.indexOf(record); // var index = close_open_ds.indexOf(record);
// index = index + 3; // index = index + 3;
// 如果查询的数据是倒数第一条至倒数第三条,则直接定位到倒数第一条 // 如果查询的数据是倒数第一条至倒数第三条,则直接定位到倒数第一条
// if (index > ds_length) { // if (index > ds_length) {
// close_open_ds.locate(ds_length); // close_open_ds.locate(ds_length);
// } else { // } else {
// close_open_ds.locate(index); // close_open_ds.locate(index);
// } // }
} }
function monthly_closed_flag_save(){ function monthly_closed_flag_save(){
$('close_open_ds').submit(); $('close_open_ds').submit();
} }
function close_open_cellclick(grid, row, name, record){ function close_open_cellclick(grid, row, name, record){
if (name == 'monthly_closed_flag_desc') { if (name == 'monthly_closed_flag_desc') {
grid.setEditor('monthly_closed_flag_desc','closed_grid_comb'); grid.setEditor('monthly_closed_flag_desc','closed_grid_comb');
} }
} }
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
$Author: qwm $Author: qwm
$Date: 2013-12-28 下午1:24:13 $Date: 2013-12-28 下午1:24:13
$Revision: 1.0 $Revision: 1.0
$Purpose: $Purpose:
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure> <a:init-procedure>
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
<a:link id="hls_attachment_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/> <a:link id="hls_attachment_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="hls_attachment_uploadonlyFile_id" url="${/request/@context_path}/uploadonlyFile.lview"/> <a:link id="hls_attachment_uploadonlyFile_id" url="${/request/@context_path}/uploadonlyFile.lview"/>
<a:link id="con_exist_approving_id" model="hls.HLS801.con_exist_approving" modelaction="query"/> <a:link id="con_exist_approving_id" model="hls.HLS801.con_exist_approving" modelaction="query"/>
<a:link id="gld_close_period_check_link" model="db.gld_period_pkg.close_period" modelaction="update"/>
<script><![CDATA[ <script><![CDATA[
//HLS801.NEXT_STEP //HLS801.NEXT_STEP
var step = 1; var step = 1;
...@@ -272,7 +273,7 @@ ...@@ -272,7 +273,7 @@
// var quer_ds_1 = $('unearned_finance_income_query_ds'); // var quer_ds_1 = $('unearned_finance_income_query_ds');
// var qrec_1 = quer_ds_1.getAt(0); // var qrec_1 = quer_ds_1.getAt(0);
// qrec_1.set('day', day); // qrec_1.set('day', day);
// qrec_1.set('calc_end_date', value); // qrec_1.set('calc_end_date', value);
$('unearned_finance_income_ds').setQueryParameter('calc_end_date', record.get('calc_end_date')); $('unearned_finance_income_ds').setQueryParameter('calc_end_date', record.get('calc_end_date'));
$('unearned_finance_income_ds').query(); $('unearned_finance_income_ds').query();
} }
...@@ -348,27 +349,52 @@ ...@@ -348,27 +349,52 @@
scope: this scope: this
}); });
} else { } else {
Leaf.request({ $L.request({
url: url, url: $('gld_close_period_check_link').getUrl(),
para: record.data, para: record.data,
success: function (args) { success: function (args) {
if (args.result.p_err_msg) { if (args.result.p_err_msg) {
$L.showConfirm('提示', args.result.p_err_msg, function () { Leaf.showConfirm('提示', args.result.p_err_msg, function okFun() {
record.set('period_status_code', 'C'); Leaf.request({
}); url: url,
para: record.data,
} else { success: function() {
record.set('period_status_code', 'C'); record.set('period_status_code','C');
Leaf.SideBar.enable = true;
Leaf.SideBar.enable = true; Leaf.SideBar.show({
Leaf.SideBar.show({ msg: '关闭成功',
msg: '关闭成功', duration: 3000
duration: 3000 });
});
}
}, },
scope: this scope: this
}); });
},function canFun(){},700,400);
} else {
Leaf.request({
url: url,
para: record.data,
success: function() {
record.set('period_status_code','C');
Leaf.SideBar.enable = true;
Leaf.SideBar.show({
msg: '关闭成功',
duration: 3000
});
},
scope: this
});
}
},
failure: function () {
},
error: function () {
},
scope: this
});
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment