Commit ead7c2b8 authored by Darming's avatar Darming

[refactor] 核销改动

parents d013037c d6a94bea
......@@ -108,7 +108,7 @@
</bm:primary-key>
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id} and t1.posted_flag=&apos;Y&apos; and t1.reversed_flag=&apos;N&apos; and write_off_flag&lt;&gt; &apos;FULL&apos; and returned_flag not in ( &apos;FULL&apos;,&apos;RETURN&apos;) and t1.transaction_type in (&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;) and (nvl(t1.returned_amount, 0)+nvl(t1.write_off_amount, 0)&lt;t1.transaction_amount)) "/>
<bm:data-filter name="query" expression="(t1.confirmed_flag=&apos;APPROVED&apos; and t1.write_off_flag in(&apos;NOT&apos;,&apos;PARTIAL&apos;))"/>
<bm:data-filter name="query" expression="(t1.confirmed_flag=&apos;ACCAUDITED&apos; and t1.write_off_flag in(&apos;NOT&apos;,&apos;PARTIAL&apos;))"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field field="confirmed_flag" queryExpression="t1.confirmed_flag =${@confirmed_flag}"/>
......
......@@ -14,13 +14,15 @@
p_project_id =>${@project_id},
p_payment_deduction =>${@payment_deduction},
p_secondary_lease =>${@secondary_lease},
p_price_list =>${@price_list}
p_price_list =>${@price_list},
p_detention => ${@detention}
);
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="payment_deduction" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@payment_deduction"/>
<bm:parameter name="secondary_lease" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@secondary_lease"/>
<bm:parameter name="detention" dataType="java.lang.Double" input="false" output="true" outputPath="/parameter/@detention"/>
<bm:parameter name="price_list" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@price_list"/>
</bm:parameters>
......
var add_datafilters = [ {
name : 'contract_id',
expression : 't1.contract_id=${/parameter/@contract_id}'
} ];
add_datafilter();
\ No newline at end of file
......@@ -39,9 +39,9 @@ var override_queryfields = [
];
var add_datafilters = [{
name : 'bp_category_filter',
expression : "t1.bp_category != 'AGENT'"
}];
add_datafilter();
// var add_datafilters = [{
// name : 'bp_category_filter',
// expression : "t1.bp_category != 'AGENT'"
// }];
// add_datafilter();
override();
......@@ -29,6 +29,14 @@
<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>
<script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[
Leaf.onReady(function(){
var acp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acp_invoice_ln');
if('${/parameter/@contract_id}'){
$(acp_ds_id).setQueryParameter('contract_id','${/parameter/@contract_id}');
$(acp_ds_id).query();
}
})
Ext.ux.Lightbox.register('a[ref=img]', true);
......
......@@ -243,7 +243,13 @@
var kind = $('acr515_invoiceVatParaDs').getAt(0).get('invoice_kind');
//默认为2
kind=2;
window.location.href = $('acr515_interface_import_link').getUrl()+'?kind='+kind;
new Leaf.Window({
id: 'gld_interface_window',
url: $('acr515_interface_import_link').getUrl()+'?kind='+kind,
title: '导入开票结果',
fullScreen :true
});
// window.location.href =
}
function summaryRenderer(datas, name) {
var sum=0;
......
......@@ -13,6 +13,10 @@
url="${/request/@context_path}/modules/cont/CON_REPO001/hls_fin_calculator_update_n.lview"/>
<a:link id="con_update_record_link_id" model="cont.CON_REPO001.save_calc_from_con" modelaction="execute"/>
<a:link id="con_update_record_link1_id" model="cont.CON_REPO001.con_change_calc_from_con" modelaction="execute"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id"
url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id"
url="${/request/@context_path}/downloadFile.lview"/>
<script type="text/javascript"><![CDATA[
var calc_flag = false;
......@@ -38,14 +42,14 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
var repurchase_types = record.get('repurchase_types');
if (repurchase_types == 'ONE_TIME_REPURCHASE') {
record.getField('payment_frequency_n').setRequired(false);
record.getField('payment_frequency').setRequired(false);
/* record.getField('payment_frequency_n').setRequired(false);
record.getField('payment_frequency').setRequired(false);*/
record.getField('payment_period').setRequired(false);
record.getField('payment_frequency_n').setReadOnly(true);
/* record.getField('payment_frequency_n').setReadOnly(true);*/
record.getField('payment_period').setReadOnly(true);
record.set('payment_period', 1);
record.set('payment_frequency', null);
record.set('payment_frequency_n', null);
record.set('payment_frequency', 'MONTH');
record.set('payment_frequency_n', 'MONTH');
}
};
// window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'] = function () {
......@@ -82,8 +86,7 @@
record.getField('payment_frequency_n').setReadOnly(true);
record.getField('payment_period').setReadOnly(true);
record.set('payment_period', 1);
record.set('payment_frequency', null);
record.set('payment_frequency_n', null);
record.set('payment_frequency', 'MONTH');
if (name == 'ccr_due_amount') {
var due_amount = record.get('due_amount') || 0;
if (due_amount < value) {
......@@ -201,14 +204,19 @@
};
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function() {
$('${/parameter/@layout_code}_submit_approval').disable();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
$('${/parameter/@layout_code}_submit_approval').disable();
var req_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASE_01', 'con_contract');
var req_record = $(req_ds_id).getAt(0);
var case_type = '';
var document_type = '${/parameter/@document_type}';
var calc_session_id = req_record.get('calc_session_id');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
if (req_record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
$('${/parameter/@layout_code}_submit_approval').enable();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if ($(req_ds_id).validate($('${/parameter/@layout_code}_submit_approval').enable())) {
// if (req_record.dirty) {
// Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
......@@ -274,7 +282,7 @@
if (record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
return false;
}
if($(ds_id_head).validate()){
if(record.get('repurchase_types') == 'ONE_TIME_REPURCHASE'){
......@@ -359,13 +367,14 @@
};
//取消变更
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
$('${/parameter/@layout_code}_user_button3').disable(); //按钮不可用
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认取消变更?', function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('con_repo001_cancel_link').getUrl(),
para: {
change_req_id: ${/parameter/@change_req_id}
change_req_id:' ${/parameter/@change_req_id}'
},
success: function(res) {
$('${/parameter/@layout_code}_user_button3').enable(); //按钮启用
......@@ -415,13 +424,71 @@
}
};
//查询时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) {
/* window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) {
var ds_us_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_BASE_03', 'hls_document_use_seal');
if (ds == $(ds_us_id)) {
ds.setQueryParameter('document_table','CON_CONTRACT_CHANGE_REQ');
ds.setQueryParameter('change_req_id','${/parameter/@change_req_id}');
ds.query();
}
};*/
//add by lijingjing
function con_repo001_upload_file(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if (record.get('check_id')) {
var url;
if (query_only == 'Y' || '${/parameter/@function_usage}' == 'QUERY') {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
} else {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'prj500_cdd_uploadFile_screen_id',
width: 850,
height: 400
});
win.on('close', function () {
record.ds.query();
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
}
}
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
var link_function = '';
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'attachment') {
link_function = 'con_repo001_upload_file';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'attach_file_name') {
if (value != null ) {
var link = '${/request/@context_path}/atm_download.lsc?attachment_id=';
var str = value.split(';;');
var url = '';
for (var i = 0;i < str.length;i++) {
//
var temp = str[i].split('--');
if (!Leaf.isEmpty(temp[0])) {
var file_name = temp[0].toUpperCase();
var file_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase();
if (file_name.indexOf('.PDF') >= 0) {
url = url + '<a href=javascript:view_pdf(\'' + temp[1] + '\')>' + temp[0] + '</a>' + ',';
} //else if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
else if (file_name.indexOf('.BMP') >= 0 || file_name.indexOf('.JPG') >= 0 || file_name.indexOf('.JPEG') >= 0 || file_name.indexOf('.PNG') >= 0 || file_name.indexOf('.GIF') >= 0) {
url = url + '<a href=' + link + temp[1] + ' ref="img">' + temp[0] + '</a>' + ',';
} else {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
}
return url;
}
}
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......
......@@ -15,8 +15,9 @@
var param = record.data;
param['function_code'] = 'CON301';
param['function_usage'] = 'QUERY';
param['contract_id'] = record.get('normal_contract_id');
param['download'] = 'Y';
param['maintain_type'] = 'UPDATE';
/* param['maintain_type'] = 'UPDATE';*/
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_repo_modify_link', ds_id);
}
......
......@@ -403,13 +403,11 @@
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var records_l = $(lnds_id).getAll();
console.log(records_l);
var hd_record = $(hdds_id).getCurrentRecord();
//add by st
var url;
/* url = $('tre_loan_con_print_excel_link_id').getUrl() + '?payment_req_id=' +hd_record.get('payment_req_id');
window.open(href = url);*/
debugger
/*var sale_id = record[0].get('sale_id');
var sale_code = record[0].get('sale_code');*/
var template_name = 'payment_apply_content.xml';
......@@ -496,10 +494,12 @@
//发票确认
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var contract_id = '${/parameter/@contract_id}';
var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var datas=$(lnds_id).getAt(0);
var contract_id =datas.get('contract_id') ;
var param = {};
param['function_code'] = 'ACP517_CONFIRM';
param['function_usage'] = 'MODIFY';
param['function_code'] = 'ACR_INVOICE_QUERY_N';
param['function_usage'] = 'QUERY';
param['contract_id'] = contract_id;
param['winid'] = 'csh501_confirm_invoice_link_winid';
param['url_title'] = '发票确认';
......
......@@ -316,8 +316,8 @@
url: $('get_special_fields_link_id').getUrl(),
para: {
document_category: 'BP',
// document_type: head_record.get('bp_type'),
document_type: 'TENANT',
document_type: head_record.get('bp_type'),
// document_type: 'TENANT',
bp_class: head_record.get('bp_class'),
id_type: head_record.get('id_type'),
id_card_no: head_record.get('id_card_no'),
......@@ -363,8 +363,8 @@
url: $('get_special_fields_link_id').getUrl(),
para: {
document_category: 'BP',
// document_type: head_record.get('bp_type'),
document_type: 'TENANT',
document_type: head_record.get('bp_type'),
// document_type: 'TENANT',
bp_class: head_record.get('bp_class'),
id_type: head_record.get('id_type'),
id_card_no: head_record.get('id_card_no'),
......
......@@ -31,12 +31,12 @@
// if(value=='AGENT' || value=='GUTA_ORG' || value=='VENDER'){
if(value=='GUTA_ORG'){
record.set('bp_class','ORG');
record.set('bp_class_n','企业');
record.set('bp_class_n','法人');
record.getField('bp_class_n').setReadOnly(true);
}
else if(value=='GUTA_NP'){
record.set('bp_class','NP');
record.set('bp_class_n','人');
record.set('bp_class_n','自然人');
record.getField('bp_class_n').setReadOnly(true);
}
else if(value=='TENANT'){
......
......@@ -8,7 +8,7 @@ $Purpose: 商业伙伴授信维护
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id} and position_code in(00215,00215)" fetchAll="true" model="csh.CSH509.query_roles_info" rootPath="position_code"/>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id} and position_code in(006,007)" fetchAll="true" model="csh.CSH509.query_roles_info" rootPath="position_code"/>
</a:init-procedure>
<a:view>
......
......@@ -8,7 +8,7 @@ $Purpose: 商业伙伴授信维护
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id} and position_code in(002)" fetchAll="true" model="csh.CSH509.query_roles_info" rootPath="position_code"/>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id} and position_code in(003)" fetchAll="true" model="csh.CSH509.query_roles_info" rootPath="position_code"/>
</a:init-procedure>
<a:view>
......
......@@ -107,7 +107,7 @@
if((count/denominator)<0.15){
Leaf.showMessage('${l:PROMPT}', '首付款比例+首付款保证金比例之和不能低于15%');
unlock_calc_current_window('${l:HLS.CALCULATING}');
return;
return false;
}
}
if(price_list=='HL_PRICR_E' ||price_list=='HL_PRICR_TEST'||price_list=='HL_PRICR_NTEST'||price_list=='HL_PRICR_EN'){
......@@ -647,7 +647,7 @@
var sum=record.get('column_value')-4.75
if(sum<0){
Leaf.showMessage('${l:PROMPT}', '利率最低值不能低于4.75');
return;
return false;
}
}
if (record.get('lov_return_vcode') == 'N' && (record.get('validation_type') == 'COMBOBOX' || record.get('validation_type') == 'LOV')) {
......@@ -832,7 +832,37 @@
}
if('${/parameter/@document_category}'=='PROJECT'){
Leaf.request({
url: $('prj_check_prj_record_link_id').getUrl(),
para: {
'project_id': '${/parameter/@document_id}'
},
success: function(res) {
var detention = res.result.detention;
for (var i = 0;i < headRecords.length;i++) {
var column_name = headRecords[i].get('column_name')
if(column_name =="residual_value"){
headRecords[i].set('column_value',detention);
headRecords[i].set('column_value_c',detention);
}
}
},
failure: function() {
unlock_calc_current_window('${l:HLS.SAVING}');
},
error: function() {
unlock_calc_current_window('${l:HLS.SAVING}');
},
scope: this
});
}
if (headRecords[0].get('show_column_code') == 'N') {
$('hls_fin_calculator_hd_grid_id').hideColumn('column_code');
$('hls_fin_calculator_export_grid_id').hideColumn('column_code');
......
......@@ -96,7 +96,7 @@
'mail_cc': record.get('mail_cc'),
'subject': record.get('subject'),
'body': record.get('body'),
'mail_list_id':record.get('mail_list_id')
// 'mail_list_id':record.get('mail_list_id')
},
success: function(res) {
unlock_window();
......
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