Commit e6791ace authored by 18083's avatar 18083

电子档案池按钮优化

parent da2338a7
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-10 早上10:03:31
$Revision: 1.0
$Purpose:电子档池定义
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure>
<!-- <a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="prj.PRJ500D.sys_user_lv" rootPath="user_name_path"/> -->
<a:model-query fetchAll="true" model="efile.EFILE1030.e_archive_pool_batch_query" rootPath="pool_data"/>
</a:init-procedure>
<a:view>
<a:link id="att_link_id" url="${/request/@context_path}/modules/efile/EFILE1030/efile_att_json_lov.lview"/>
<a:link id="post_stru_link_id" url="${/request/@context_path}/modules/efile/EFILE1030/efile_post_stru_json_lov.lview"/>
<a:link id="doc_post_link" url="${/request/@context_path}/modules/efile/EFILE1040/efile_doc_import.lsc"/>
<a:link id="efile_create_pool_temp_link" url="${/request/@context_path}/modules/efile/EFILE1030/create_pool_temp.lsc"/>
<a:link id="elec_file_save_link" model="efile.EFILE1010.elec_file_type" modelaction="batch_update"/>
<a:link id="elec_file_delete_link" model="efile.EFILE1010.elec_file_type" modelaction="batch_update"/>
<script type="text/javascript"><![CDATA[
function efile_archive_pool_batch_trans() {
var records=$('pool_temp_ds').getAll();
var saveData = [];
var param = {};
Leaf.showConfirm('特别注意', '<span style="color: #ff0000; ">该操作将导致上个月满足条件的电子档案全部传输!!!如果不需要传输所有数据,请一定点击取消按钮!!!</span>', function() {
var detail_mask = Ext.getBody();
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
for (var i = 0;i < records.length;i++) {
var record = records[i];
saveData.push({
'document_id': record.get('pool_id'),
'_status': 'insert'
});
}
param['details'] = saveData;
Leaf.request({
url: $('efile_create_pool_temp_link').getUrl(),
para: param,
success: function() {
Leaf.Masker.unmask(detail_mask);
Leaf.showMessage('提示','传输成功',function(){
$('efile_archive_pool_ds').query();
});
},
failure: function() {
Leaf.Masker.unmask(detail_mask);
},
error: function() {
Leaf.Masker.unmask(detail_mask);
},
scope: this
});
}, function () {
}, 300, 150);
}
function efile_archive_pool_manual_trans() {
var record = $('efile_archive_pool_ds').getSelected();
if (record.length==0){
Leaf.showMessage('提示','请选择传输数据!');
return;
}
for (var i = 0; i < record.length; i++) {
if(record[i].get('monthly_closed_flag')=='0'){
Leaf.showMessage('提示','资料期间对应的会计期间必须是关账状态!');
return;
}
if(record[i].get('post_status')=='POST_SUCCESS'){
Leaf.showMessage('提示','已传输成功不可重复传输!');
return;
}
}
var records = new Array();
for (i = 0;i < record.length;i++) {
records.push(record[i].data);
/* if (record[i].get('upload_ftp_flag') == 'Y') {
Aurora.showMessage('提示','已上传批次不能重复上传!');
return;
}*/
}
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('doc_post_link').getUrl(),
para: records,
success: function() {
Leaf.Masker.unmask(Ext.getBody());
Leaf.showMessage('提示','传输成功',function(){
$('efile_archive_pool_ds').query();
});
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
function efile_archive_pool_reset() {
$('for_query_ds').reset();
}
function efile_archive_pool_query() {
$('efile_archive_pool_ds').query();
}
function att_update_renderer(value, record, name) {
if(name=='att'){
return '<a href="javascript:efile_archive_att_list(\'' + record.get('pool_id') + '\')">附件</a>';
}
if(name=='post_stru_data'){
return '<a href="javascript:efile_archive_post_stru_data_list(\'' + record.get('pool_id') + '\')">结构化数据</a>';
}
}
function efile_archive_att_list(record_id) {
var record = $('efile_archive_pool_ds').findById(record_id);
var url = $('att_link_id').getUrl();
if (!Leaf.isEmpty(record_id)) {
var win = new Leaf.Window({
id: 'att_id_winid',
url: url,
params: {
pool_id: record_id
},
height: 480,
width: 1100
});
}
}
function efile_archive_post_stru_data_list(record_id) {
var record = $('efile_archive_pool_ds').findById(record_id);
var url = $('post_stru_link_id').getUrl();
if (!Leaf.isEmpty(record_id)) {
var win = new Leaf.Window({
id: 'post_stru_id_winid',
url: url,
params: {
pool_id: record_id
},
height: 550,
width: 800
});
}
}
function checklength(ds, record, name, value, oldvalue) {
}
]]></script>
<a:dataSets>
<a:dataSet id="pool_temp_ds">
<a:datas dataSource="/model/pool_data"/>
</a:dataSet>
<a:dataSet id="yes_no_ds" lookupCode="YES_NO"/>
<a:dataSet id="data_cf_ds" lookupCode="DATA_CLASSIFICATION"/>
<a:dataSet id="post_status_ds" lookupCode="POST_STATUS_DESC"/>
<a:dataSet id="for_query_ds" autoCreate="true">
<a:fields>
<a:field name="internal_period_num_from" />
<a:field name="internal_period_num_to" />
<a:field name="internal_period_num" />
<a:field name="hly_req_number" />
<a:field name="primary_field" />
<a:field name="document_info" />
<a:field name="post_status" />
<a:field name="archive_type" />
<a:field name="suppl_trans_flag" />
<a:field name="archive_type_desc" displayField="code_value_name" options="data_cf_ds" returnField="archive_type" valueField="code_value"/>
<a:field name="suppl_trans_flag_desc" displayField="code_value_name" options="yes_no_ds" returnField="suppl_trans_flag" valueField="code_value"/>
<a:field name="post_status_desc" displayField="code_value_name" options="post_status_ds" returnField="post_status" valueField="code_value"/>
</a:fields>
</a:dataSet>
<a:dataSet id="efile_archive_pool_ds" model="efile.EFILE1030.e_archive_pool_query" queryDataSet="for_query_ds" selectable="true">
<a:fields>
<a:field name="monthly_closed_flag" />
<a:field name="post_message" readOnly="true" />
<a:field name="post_status_desc" displayField="code_value_name" options="post_status_ds" returnField="post_status" valueField="code_value"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<!--<a:screenTitle/>-->
<a:gridButton click="efile_archive_pool_query" text="HLS.QUERY"/>
<a:gridButton click="efile_archive_pool_reset" text="重置"/>
<a:gridButton id="efile_archive_pool_batch_id" click="efile_archive_pool_batch_trans" text="启动批量传输"/>
<a:gridButton click="efile_archive_pool_manual_trans" text="手动传输"/>
</a:screenTopToolbar>
<a:form column="4" marginWidth="30" title="查询条件">
<a:textField name="internal_period_num_from" bindTarget="for_query_ds" prompt="资料期间从"/>
<a:textField name="internal_period_num_to" bindTarget="for_query_ds" prompt="资料期间到"/>
<a:comboBox name="archive_type_desc" bindTarget="for_query_ds" prompt="资料类型"/>
<a:textField name="primary_field" bindTarget="for_query_ds" prompt="主键"/>
<a:comboBox name="suppl_trans_flag_desc" bindTarget="for_query_ds" prompt="是否补传"/>
<a:textField name="document_info" bindTarget="for_query_ds" prompt="原始资料号"/>
<a:comboBox name="post_status_desc" bindTarget="for_query_ds" prompt="传输状态"/>
<a:textField name="hly_req_number" bindTarget="for_query_ds" prompt="传输批次号"/>
</a:form>
<a:grid id="efile_archive_pool_ds_id" bindTarget="efile_archive_pool_ds" marginHeight="200" marginWidth="30" navBar="true">
<a:columns>
<a:column name="primary_field" prompt="主键" width="320"/>
<a:column name="internal_period_num" prompt="资料期间" width="120"/>
<a:column name="archive_type_desc" prompt="资料类型" width="120"/>
<a:column name="document_info" prompt="原始资料号" width="300"/>
<a:column name="post_stru_data" prompt="结构化数据" renderer="att_update_renderer" width="110"/>
<a:column name="att" align="center" prompt="附件" renderer="att_update_renderer"/>
<a:column name="suppl_trans_flag_desc" align="center" width="120" prompt="是否补传"/>
<a:column name="post_status_desc" align="center" width="120" prompt="传输状态"/>
<a:column name="post_message" align="center" editor="textarea_id" width="180" prompt="传输结果"/>
<a:column name="hly_req_number" align="center" width="120" prompt="传输批次号"/>
</a:columns>
<a:editors>
<a:textField id="text_ed"/>
<a:textArea id="textarea_id"/>
<a:textField id="text_ed_up" typeCase="upper"/>
<a:checkBox id="checkbox_ed"/>
<a:lov id="conBasicClauseParaDs_grid_lov"/>
<a:comboBox id="efile_type_comed"/>
</a:editors>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
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