Commit 4e3face0 authored by gzj34291's avatar gzj34291

月结修改

parent 74f8fea5
......@@ -14,6 +14,9 @@
<a:model-query autoCount="false" fetchAll="true" model="gld.FND5800.gld_period_status_fieldset"
rootPath="fieldset"/>
<a:model-query autoCount="false" model="hls.HLS801.sys_role_flag" rootPath="sys_role_path"/>
<a:model-query defaultWhereClause="t1.role_id=${/session/@role_id}" fetchAll="true"
model="cont.CON733.query_roles_info" rootPath="role_code"/>
<a:model-query model="hls.HLS801.con_exist_approving" rootPath="con_status"/>
</a:init-procedure>
<a:view>
<a:link id="con_finance_income_link"
......@@ -40,9 +43,17 @@
<a:link id="hls_tax_refresh_link" model="hls.HLS801.hls_tax_act_confirm" modelaction="execute"/>
<a:link id="hls_tax_confirm_create_je_link"
url="${/request/@context_path}/modules/hls/HLS801/tax_confirm.lsc"/>
<a:link id="create_con_monthly_statement_link" model="hls.HLS801.con_monthly_statement" modelaction="update"/>
<a:link id="con_monthly_submit_link" model="hls.HLS801.con_monthly_statement_wfl" modelaction="update"/>
<a:link id="con_reset_monthlyend_link" model="hls.HLS801.get_wfl_status" modelaction="update"/>
<!-- <a:link id="acp_invoice_attachment_uploadFile_id" url="${/request/@context_path}/check_uploadFile.lview"/>-->
<a:link id="hls_attachment_uploadFile_id" url="${/request/@context_path}/uploadFile.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="con_exist_approving_id" model="hls.HLS801.con_exist_approving" modelaction="query"/>
<script><![CDATA[
//HLS801.NEXT_STEP
var step = 0;
var step = 1;
var g_company_id;
var g_company_id_2;
......@@ -56,6 +67,17 @@
history.back();
});
}
if('${/model/role_code/record/@role_code}'!='0013'&&'${/model/role_code/record/@role_code}'!='HAND'&&'${/model/role_code/record/@role_code}'!='0017'){
document.getElementById('step_0').style.display = "none";
document.getElementById('step_next').style.display = "none";
document.getElementById('reset_monthlyend_id').style.display = "none";
}
if('${/model/con_status/record/@wfl_count}'>0){
var rocode= $('attachment_list_ds');
rocode.getField('report_name').setReadOnly(true);
document.getElementById('hls801_delete_id').style.display = "none";
}
$('attachment_list_ds').query();
});
function nextStep() {
......@@ -396,6 +418,198 @@
}
var g_return_value;
function month_end_next() {
var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0);
var year = record.get('period_name').substring(0, 4);
var month = record.get('period_name').substring(5, 7);
var date = year+month;
var wfl_count;
$L.request({
url: '${/request/@context_path}/autocrud/hls.HLS801.get_wfl_status/query',
para: {
date: date
},
sync: true,
success: function (res) {
wfl_count=res.result.record.wfl_count;
},
error: function () {
},
failure: function () {
},
scope: this,
sync: true,
});
if( wfl_count ==0){
$L.showMessage('提示','请先提交审批在再进行下一步');
return ;
}else{
nextStep();
}
}
//add by gzj
function next_monthly_end() {
//nextStep();
var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0);
var year = record.get('period_name').substring(0, 4);
var month = record.get('period_name').substring(5, 7);
var date = year+month;
Leaf.request({
url: $('create_con_monthly_statement_link').getUrl(),
para: {
date: date
},
success: function () {
$('month_report_ds').query();
nextStep();
},
scope: this
});
}
//add by 月结报表提交审批
function submit() {
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确定提交审批?', function() {
var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0);
var year = record.get('period_name').substring(0, 4);
var month = record.get('period_name').substring(5, 7);
var date = year+month;
Leaf.request({
url: $('con_monthly_submit_link').getUrl(),
para: {
date: date
},
success: function () {
Leaf.showMessage('${l:HLS.PROMPT}', '提交审批成功');
$('month_report_ds').query();
},
scope: this
});
});
}
//add by 34291 重置月结
function reset_monthlyend (){
Leaf.showConfirm('${l:HLS.PROMPT}', '请确认是否重置当月月结?', function() {
var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0);
var year = record.get('period_name').substring(0, 4);
var month = record.get('period_name').substring(5, 7);
var date = year+month;
Leaf.request({
url: $('con_reset_monthlyend_link').getUrl(),
para: {
date: date
},
success: function () {
Leaf.showMessage('${l:HLS.PROMPT}', '操作成功');
$('month_report_ds').query();
},
scope: this
});
}, null, null, 85);
}
function detail_upload_window(record_id) {
var record = $('month_report_ds').getAll()[0];
var status=record.get('status_name');
if('${/model/role_code/record/@role_code}'=='0014'){
if(status=='APPROVING'||status=='APPROVED'){
var url = $('hls_attachment_downloadFile_id').getUrl() + '?table_name=BUSINESS_REPORT&header_id=' + record_id;
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'month_downloadFile_id',
width: 850,
height: 400
});
win.on('close', function() {
$('month_report_ds').query();
});
}else{
var url = $('hls_attachment_uploadFile_id').getUrl() + '?table_name=BUSINESS_REPORT&header_id=' + record_id;
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'month_uploadFile_id',
width: 850,
height: 400
});
}
win.on('close', function() {
$('month_report_ds').query();
});
}else{
var url = $('hls_attachment_downloadFile_id').getUrl() + '?table_name=BUSINESS_REPORT&header_id=' + record_id;
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'month_downloadFile_id',
width: 850,
height: 400
});
win.on('close', function() {
$('month_report_ds').query();
});
}
}
function attachment_upload(val,rec,name) {
return '<a href=javascript:detail_upload_window('+rec.get('tab_id')+')>附件上传</a>';
}
function sbo_detail_upload_window(record_id) {
var record = $('month_report_ds').getAll()[0];
var status=record.get('status_name');
if('${/model/role_code/record/@role_code}'=='0014'){
if(status=='APPROVING'||status=='APPROVED'){
var url = $('hls_attachment_downloadFile_id').getUrl() + '?table_name=SBO_REPORT&header_id=' + record_id;
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'sbo_month_downloadFile_id',
width: 850,
height: 400
});
win.on('close', function() {
$('month_report_ds').query();
});
}else{
var url = $('hls_attachment_uploadFile_id').getUrl() + '?table_name=SBO_REPORT&header_id=' + record_id;
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'sbo_month_uploadFile_id',
width: 850,
height: 400
});
win.on('close', function() {
$('month_report_ds').query();
});
}
}else{
var url = $('hls_attachment_downloadFile_id').getUrl() + '?table_name=SBO_REPORT&header_id=' + record_id;
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'sbo_month_downloadFile_id',
width: 850,
height: 400
});
win.on('close', function() {
$('month_report_ds').query();
});
}
}
function sbo_attachment_upload(val,rec,name) {
return '<a href=javascript:sbo_detail_upload_window('+rec.get('tab_id')+')>附件上传</a>';
}
function unearned_finance_income_confirm() {
var headers_ds = $('hls_monthly_statement_ds');
......@@ -465,9 +679,38 @@
@Description: 月结结束校验
@Param:
*/
var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0);
var role_flag = '${/model/sys_role_path/record/@role_code}';
//add by 34291 月结结束前需要提交审批
var year = record.get('period_name').substring(0, 4);
var month = record.get('period_name').substring(5, 7);
var date = year+month;
var wfl_count;
$L.request({
url: '${/request/@context_path}/autocrud/hls.HLS801.get_wfl_status/query',
para: {
date: date
},
sync: true,
success: function (res) {
wfl_count=res.result.record.wfl_count;
},
error: function () {
},
failure: function () {
},
scope: this,
sync: true,
});
if( wfl_count ==0){
$L.showMessage('提示','请先提交审批通过后在再进行下一步');
return ;
}
Leaf.showConfirm('${l:HLS.PROMPT}', '本次月结结束后不可执行当月其他相关操作,是否确认结束?', function okFun() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}');
$L.request({
......@@ -582,7 +825,6 @@
var record = $('csh_transaction_confirm_ds').getSelected()[0];
//校验是否还有未审核的保证金划转
var trans_review_count;
$L.request({
url: '${/request/@context_path}/autocrud/csh.CSH531.get_trans_review_status/query',
para: {
......@@ -614,7 +856,6 @@
$L.showMessage('提示', '该月收款已确认,无需再次确认');
return;
}
$L.showConfirm('提示', '是否进行月结确认?', function () {
$L.Masker.mask(Ext.getBody(), '正在确认......');
$L.request({
......@@ -671,6 +912,7 @@
//$L.showErrorMessage("提示", args.result.p_err_msg, null, 800, 400);
} else {
set_value_for_next_step(record.get('csh_date'));
}
......@@ -764,7 +1006,6 @@
}
function tax_confirm() {
debugger;
var records = $('hl_sales_tax_act_ds').getAll();
var calc_end_date = $('hls_monthly_statement_ds').getAt(0).get('calc_end_date');
var period_name = $('hls_monthly_statement_ds').getAt(0).get('period_name');
......@@ -808,6 +1049,62 @@
});
}
function hls801_add() {
var ds = $('attachment_list_ds');
var record = ds.create(ds.currentIndex);
$('attachment_list_id').showEditorByRecord(record);
}
function hls801_delete() {
var ds = $('attachment_list_ds');
var records = ds.getSelected();
if (records.length != 0) {
Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS030.CONFIRM_DELETE}', function() {
ds.remove(records);
});
}
}
function hls801_save() {
Leaf.request({
url: $('con_exist_approving_id').getUrl(),
success: function(res) {
var wfl_count = res.result.record.wfl_count;
if (wfl_count==0){
var ds = $('attachment_list_ds');
if (ds.validate()) {
ds.submit();
}
//$('attachment_list_ds').query();
}else{
Leaf.showMessage('${l:HLS.PROMPT}', '存在审批中的数据,无法修改月结资料!');
return false;
}
},
scope: this
});
}
function process_monitoring(){
var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0);
var year = record.get('period_name').substring(0, 4);
var month = record.get('period_name').substring(5, 7);
var date = year+month;
var win = new Leaf.Window({
id: 'history_check',
url: '${/request/@context_path}/modules/hls/HLS801/zj_wfl_approve_history_check.lview',
params: {
date: date
},
title: '单据历史查看',
height: 500,
width: 860,
fullScreen: true
});
}
]]></script>
<a:dataSets>
......@@ -917,6 +1214,19 @@
<a:event name="beforeremove" handler="tax_confirm_beforeremove"/>
</a:events>
</a:dataSet>
<a:dataSet id="report_name_ds" lookupCode="HLS_REPORT_NAME"/>
<a:dataSet id="month_report_ds" autoQuery="false" fetchAll="true" model="hls.HLS801.con_monthly_statement"
queryDataSet="unearned_finance_income_query_ds">
<a:fields>
<a:field name="report_name" />
</a:fields>
</a:dataSet>
<a:dataSet id="attachment_list_ds" autoQuery="true" fetchAll="true" model="hls.HLS801.hls_attachment_list" selectable="true"
queryUrl="${/request/@context_path}/autocrud/hls.HLS801.hls_attachment_list/query">
<a:fields>
<a:field name="report_name" required="true"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
......@@ -928,7 +1238,7 @@
<a:hBox>
<a:tabPanel id="step" marginHeight="80" marginWidth="50">
<a:tabs>
<a:tab id="step_0" disabled="false" marginHeight="20" width="100" prompt="营业月结"
<a:tab id="step_1" disabled="false" marginHeight="20" width="100" prompt="营业月结"
selected="true">
<a:hBox height="50">
<!--<a:button click="upStep" text="HLS801.LAST_STEP"/>-->
......@@ -938,7 +1248,6 @@
<a:button click="csh_transaction_confirm" text="月结确认"/>
<a:label width="5"/>
</a:hBox>
<p/>
<a:grid id="csh_transaction_confirm_grid" bindTarget="csh_transaction_confirm_ds"
marginHeight="200" marginWidth="80" navBar="true" style="margin-left:3px">
......@@ -973,11 +1282,34 @@
<a:hBox>
<a:tabPanel id="step" marginHeight="80" marginWidth="50">
<a:tabs>
<a:tab id="step_0" disabled="false" marginHeight="20" width="100" prompt="营业月结"
selected="true">
<a:tab id="step_0" disabled="true" prompt="月结资料维护" selected="false"
width="100">
<a:hBox height="50">
<a:button disabled="true" click="upStep" text="HLS801.LAST_STEP"/>
<a:label width="5"/>
<a:button click="nextStep" text="HLS801.NEXT_STEP"/>
<a:label width="80"/>
<a:gridButton click="hls801_add" text="新增"/>
<a:gridButton id="hls801_delete_id" click="hls801_delete" text="删除"/>
<a:gridButton click="hls801_save" text="HLS.SAVE"/>
</a:hBox>
<p/>
<a:grid id="attachment_list_id" bindTarget="attachment_list_ds" marginHeight="200"
marginWidth="80" navBar="true" >
<a:columns>
<a:column name="report_name" align="center" prompt="报表名称" editor="report_name_edit"
width="100" />
</a:columns>
<a:editors>
<a:textField id="report_name_edit"/>
</a:editors>
</a:grid>
</a:tab>
<a:tab id="step_1" disabled="false" marginHeight="20" width="100" prompt="营业月结"
selected="true">
<a:hBox height="50">
<a:button id="step_next" click="upStep" text="HLS801.LAST_STEP"/>
<a:label width="5"/>
<a:button click="csh_transaction_confirm" text="HLS801.NEXT_STEP"/>
</a:hBox>
<p/>
......@@ -1007,7 +1339,7 @@
</a:grid>
</a:tab>
<a:tab id="step_1" disabled="true" prompt="GLD_PERIODS.PERIOD_NAME" selected="false"
<a:tab id="step_2" disabled="true" prompt="GLD_PERIODS.PERIOD_NAME" selected="false"
width="100">
<a:hBox height="50">
<a:button click="upStep" text="HLS801.LAST_STEP"/>
......@@ -1024,7 +1356,7 @@
</a:fieldSet>
</a:hBox>
</a:tab>
<a:tab id="step_2" disabled="true" marginHeight="200" prompt="提前收款确认增值税"
<a:tab id="step_3" disabled="true" marginHeight="200" prompt="提前收款确认增值税"
selected="false"
width="140">
<a:hBox height="50">
......@@ -1069,7 +1401,7 @@
</a:columns>
</a:grid>
</a:tab>
<a:tab id="step_3" disabled="true" marginHeight="20" prompt="HLS801.INCOME"
<a:tab id="step_4" disabled="true" marginHeight="20" prompt="HLS801.INCOME"
selected="false"
width="100">
<a:hBox height="50">
......@@ -1147,30 +1479,12 @@
</a:columns>
</a:grid>
</a:tab>
<a:tab id="step_3" disabled="true" prompt="HLS801.MONTH_END" selected="false"
<a:tab id="step_4" disabled="true" prompt="HLS801.PERIOD_CONTROL" selected="false"
width="100">
<a:hBox height="50">
<a:button click="upStep" text="HLS801.LAST_STEP"/>
<a:label width="5"/>
<a:button click="nextStep" text="HLS801.NEXT_STEP"/>
<a:label width="80"/>
<a:button click="monthlyendFun" text="HLS801.MONTH_END"/>
</a:hBox>
<a:form column="1" marginWidth="80" style="margin-left:3px" title="HLS.QUERY_TITLE">
<a:box column="2" labelWidth="150" style="margin-left:-80px">
<a:textField name="year" bindTarget="unearned_finance_income_query_ds"
prompt="HLS801.YEAR" readOnly="true"/>
<a:textField name="month" bindTarget="unearned_finance_income_query_ds"
prompt="HLS801.MONTH" readOnly="true"/>
</a:box>
</a:form>
</a:tab>
<a:tab id="step_5" disabled="true" prompt="HLS801.PERIOD_CONTROL" selected="false"
width="100">
<a:hBox height="50">
<a:button click="upStep" text="HLS801.LAST_STEP"/>
<a:label width="5"/>
<a:button disabled="true" text="HLS801.NEXT_STEP"/>
<a:button click="next_monthly_end" text="HLS801.NEXT_STEP"/>
<a:label width="50"/>
</a:hBox>
<a:grid id="close_open_grid" bindTarget="close_open_ds" marginHeight="300"
......@@ -1208,6 +1522,40 @@
</a:editors>
</a:grid>
</a:tab>
<a:tab id="step_5" disabled="true" prompt="HLS801.MONTH_END" selected="false"
width="100">
<a:hBox height="50">
<a:button click="upStep" text="HLS801.LAST_STEP"/>
<a:label width="5"/>
<a:button disabled="true" click="month_end_next" text="HLS801.NEXT_STEP"/>
<a:label width="80"/>
<a:button click="submit" text="提交审批"/>
<a:button id="reset_monthlyend_id" click="reset_monthlyend" text="重置月结"/>
<a:button click="process_monitoring" text="流程监控"/>
<!-- <a:button click="monthlyendFun" text="HLS801.MONTH_END"/>-->
</a:hBox>
<a:form column="1" marginWidth="80" style="margin-left:3px" title="HLS.QUERY_TITLE">
<a:box column="2" labelWidth="150" style="margin-left:-80px">
<a:textField name="year" bindTarget="unearned_finance_income_query_ds"
prompt="HLS801.YEAR" readOnly="true"/>
<a:textField name="month" bindTarget="unearned_finance_income_query_ds"
prompt="HLS801.MONTH" readOnly="true"/>
</a:box>
</a:form>
<a:grid id="month_report_id" bindTarget="month_report_ds" marginHeight="300"
marginWidth="80">
<a:columns>
<a:column name="report_name" align="center" prompt="报表名称"
width="100" />
<a:column name="sbo_attachment_upload" align="center" prompt="SB0报表" renderer="sbo_attachment_upload" width="80"/>
<a:column name="sbo_file_name" align="center" prompt="附件名称"
width="100" />
<a:column name="attachment_upload" align="center" prompt="业务系统报表" renderer="attachment_upload" width="80"/>
<a:column name="business_file_name" align="center" prompt="附件名称"
width="100" />
</a:columns>
</a:grid>
</a:tab>
</a:tabs>
</a:tabPanel>
</a:hBox>
......
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