Commit 612a4afe authored by xsh241908's avatar xsh241908

Merge remote-tracking branch 'origin/develop' into develop

parents bad322ea 85b8a2f2
......@@ -116,7 +116,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 returned_flag not in ( &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 not in (&apos;ACCAUDITING&apos;,&apos;NEW&apos;,&apos;CT_REJECTED&apos;) and t1.write_off_flag in(&apos;NOT&apos;,&apos;PARTIAL&apos;))"/>-->
<!-- <bm:data-filter name="query" expression="(t1.confirmed_flag not in (&apos;ACCAUDITING&apos;,&apos;NEW&apos;,&apos;CT_REJECTED&apos;) and t1.write_off_flag in(&apos;NOT&apos;,&apos;PARTIAL&apos;))"/>-->
<bm:data-filter name="query" expression="(t1.confirmed_flag not in (&apos;ACCAUDITING&apos;,&apos;NEW&apos;,&apos;CT_REJECTED&apos;))"/>
</bm:data-filters>
<bm:query-fields>
......
......@@ -21,6 +21,7 @@
<a:link id="csh515_amount_return_link" url="${/request/@context_path}/modules/csh/CSH515/csh_amount_return.lview"/>
<a:link id="csh515_get_layout_link" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="csh_transaction_receipt_maintain_readonly_link" url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_hand_receipt_update_readonly.lview"/>
<a:link id="prj500_cdd_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<script type="text/javascript"><![CDATA[
function dateValidator(record, name, value) { //日期校验方法
if (name == 'transaction_date_from' || name == 'transaction_date_to') {
......@@ -51,12 +52,18 @@
dirty_flag = 'Y';
}
}
if (dirty_flag == 'N') {
Leaf.showConfirm('${l:PROMPT}', '${l:CSH510.CSH_RECEIPT_QUERY_INFORMATION}', function() {
return;
}, function() {
$('csh_transaction_receipt_return_maintain_ds').query();
}, null, null);
// Leaf.showConfirm('${l:PROMPT}', '${l:CSH510.CSH_RECEIPT_QUERY_INFORMATION}', function() {
// return false;
// }
// , function() {
// $('csh_transaction_receipt_return_maintain_ds').query();
// }, null, null);
Leaf.showConfirm('${l:PROMPT}', '${l:CSH510.CSH_RECEIPT_QUERY_INFORMATION}');
return false;
} else {
$('csh_transaction_receipt_return_maintain_ds').query();
}
......@@ -86,6 +93,47 @@
return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>';
}
}
function attachment_uploadFile(value, record, name) {
if (name == 'attachment') {
var role_code = '${/model/role_info/record/@role_code}';
if (role_code !== '0008'&&role_code !== '0014'&&role_code !== '0014-1'&&role_code !== '0017'&&role_code !== 'HAND') {
return null;
}
return '<a href="javascript:prj501n_upload_file(\'' + record.get('transaction_id') + '\');">' +'附件上传'+ '</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])) {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
return url;
}
}
}
function prj501n_upload_file(transaction_id) {
if (transaction_id) {
var url;
url = $('prj500_cdd_uploadFile_id').getUrl() + '?table_name=CON_CONTRACT_BANK&header_id=' + transaction_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 () {
$('csh_transaction_receipt_return_maintain_ds').query();
});
}
function openWindow(url) {
new Leaf.Window({
......@@ -274,6 +322,7 @@
<a:dataSet id="returned_flag_ds" lookupCode="CSH510_RETURN_SELECT"/>
<a:dataSet id="reversed_flag_ds" lookupCode="CSH510_REVERSE_SELECT"/>
<a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>
<a:dataSet id="attachment_return_ds" lookupCode="ATTACHMENT_RETURN"/>
<a:dataSet id="csh_transaction_receipt_maintain_query_ds" autoCreate="true">
<a:fields>
<a:field name="payment_method_display" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/>
......@@ -389,18 +438,23 @@
<a:field name="currency_code_from"/>
<a:field name="currency_name_to_display" displayField="currency_name" options="currency_ds" returnField="currency_code_to" valueField="currency_code"/>
<a:field name="currency_code_to"/>
<a:field name="transaction_category" defaultValue="BUSINESS"/>
<!-- <a:field name="transaction_category" defaultValue="BUSINESS"/>-->
<a:field name="transaction_category" />
<a:field name="write_off_flag"/>
<a:field name="collection_classes"/>
<a:field name="collection_classes_desc" options="ds_collection_classes_ds"
prompt="款项用途"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="attachment_return"/>
<a:field name="attachment_return_desc" options="attachment_return_ds"
prompt="银行回单是否上传"
displayField="code_value_name" returnField="attachment_return" valueField="code_value"/>
</a:fields>
<a:events>
<a:event name="update" handler="csh510_receipt_maintain_update"/>
</a:events>
</a:dataSet>
<a:dataSet id="csh_transaction_receipt_return_maintain_ds" autoQuery="false" model="csh.CSH515.csh_transaction_receipt_return_query" queryDataSet="csh_transaction_receipt_maintain_query_ds" selectable="true" selectionModel="single">
<a:dataSet id="csh_transaction_receipt_return_maintain_ds" autoQuery="false" model="csh.CSH515.new_csh_transaction_receipt_return_query" queryDataSet="csh_transaction_receipt_maintain_query_ds" selectable="true" selectionModel="single">
<a:fields>
<a:field name="payment_method_display" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/>
<a:field name="bank_account_code" autoComplete="true" autoCompleteField="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="580" title="CSH511.BANK_ACCOUNT_CODE">
......@@ -464,6 +518,8 @@
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
<a:textField name="contract_number" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="合同编号"/>
<a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="款项用途"/>
<a:comboBox name="attachment_return_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="银行回单是否上传"/>
</a:fieldSet>
......@@ -484,6 +540,7 @@
<a:column name="bank_slip_num" prompt="银行流水号" align="center"/>
<a:column name="this_return_amount" prompt="退款中金额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="returned_amount" renderer="Leaf.formatMoney" align="right"/>
<!-- <a:column name="posted_flag" prompt="HLS.POST"/> -->
<!-- <a:column name="bank_account_code" prompt="CSH511.BANK_ACCOUNT_CODE"/>
<a:column name="bank_account_name" prompt="CSH511.BANK_ACCOUNT_NAME"/>-->
......@@ -505,6 +562,9 @@
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_BANK" name="opposite_band_na" align="center"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NUM" name="bp_bank_account_num" align="center"/>
</a:column>
<a:column name="attachment" prompt="银行回单附件上传" renderer="attachment_uploadFile" width="120" align="center"/>
<a:column name="attach_file_name" prompt="银行回单文件" renderer="attachment_uploadFile" width="120" align="center"/>
</a:columns>
</a:grid>
</a:screenBody>
......
......@@ -829,6 +829,39 @@
}
}
}
var role_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
if (role_ds == ds.id) {
var bp_type_flag='N';
var records = $(ds.id).getAll();
if(name=='bp_type'){
for (var i = 0;i < records.length;i++) {
if(records[i].get('bp_type')=='TENANT'){
bp_type_flag='Y';
}
}
if(bp_type_flag=='Y'){
for (var i = 0;i < records.length;i++) {
if(records[i].get('bp_type')=='TENANT'){
records[i].set('primary_flag','Y')
}else{
records[i].set('primary_flag','N')
}
}
}
}
var primary_flag = record.get('primary_flag');
if (primary_flag == 'Y') {
var bm_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var bm_record = $(bm_ds_id).getCurrentRecord();
bm_record.set('bp_type', record.get('bp_type'));
bm_record.set('bp_type_n', record.get('bp_type_n'));
bm_record.set('bp_category', record.get('bp_category'));
bm_record.set('bp_category_n', record.get('bp_category_n'));
}
}
};
function upload_file(id, name, query_only) {
......
......@@ -10,6 +10,7 @@
<a:init-procedure>
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
<a:model-query fetchAll="true" model="hls.HLS214N.hls_bp_master_modify_user" rootPath="modify_user"/>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure>
<a:view>
<a:link id="bank_account_num_link" model="hls.HLS214.hls_bp_bank_account_num" modelaction="update"/>
......@@ -46,6 +47,22 @@
// return;
// }
// }
var role_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
var v_primary_flag_count=0;
var role_records = $(role_ds_id).getAll();
for (var i = 0;i < role_records.length;i++) {
if(role_records[i].get('primary_flag') == 'Y'){
v_primary_flag_count=v_primary_flag_count+1;
}
}
if(v_primary_flag_count!=1){
Leaf.showErrorMessage('错误', '一个商业伙伴有且仅有一个主角色!');
return false;
}
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var bp_record = $(ds_id).getCurrentRecord();
......@@ -380,10 +397,11 @@
}
}
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, line_record) {
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds,line_record) {
var dsId = ds.id;
var base_table_temp = 'hls_bp_master_role_ds';
if (dsId.substring(dsId.length - base_table_temp.length, dsId.length) == base_table_temp) {
......@@ -396,7 +414,30 @@
if (ds.fields.parent_id) {
record.getField('parent_id_n').setReadOnly(true);
}
var role_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_ROLE', 'hls_bp_master_role');
if("${/model/role_info/record/@role_code}"!="0017"&&"${/model/role_info/record/@role_code}"!="HAND"){
if(role_ds_id == ds.id){
var records = $(ds.id).getAll();
for (var i = 0;i < records.length;i++) {
records[i].getField('primary_flag').setReadOnly(true);
}
}
}
};
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function(ds, record, config_records, bp_seq) {
var role_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_ROLE', 'hls_bp_master_role');
if("${/model/role_info/record/@role_code}"!="0017"&&"${/model/role_info/record/@role_code}"!="HAND"){
if(role_ds_id == ds.id){
var records = $(ds.id).getAll();
for (var i = 0;i < records.length;i++) {
records[i].getField('primary_flag').setReadOnly(true);
}
}
}
}
//更新时调用 add by liukang
//填写银行账号时 允许银行账号相同 但是给一个提示(提示一下而已)
......@@ -633,6 +674,30 @@
record.set('tax_registry_num',record.get('social_code'));
}
}
var role_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
if (role_ds == ds.id) {
var bp_type_flag='N';
var records = $(ds.id).getAll();
if("${/model/role_info/record/@role_code}"!="0017"&&"${/model/role_info/record/@role_code}"!="HAND"){
if(name=='bp_type'){
for (var i = 0;i < records.length;i++) {
if(records[i].get('bp_type')=='TENANT'){
bp_type_flag='Y';
}
}
if(bp_type_flag=='Y'){
for (var i = 0;i < records.length;i++) {
if(records[i].get('bp_type')=='TENANT'){
records[i].set('primary_flag','Y')
}else{
records[i].set('primary_flag','N')
}
}
}
}
}
}
};
......
......@@ -10,6 +10,7 @@
<a:init-procedure>
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
<a:model-query fetchAll="true" model="hls.HLS214N.hls_bp_master_modify_user" rootPath="modify_user"/>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure>
<a:view>
<a:link id="bank_account_num_link" model="hls.HLS214.hls_bp_bank_account_num" modelaction="update"/>
......@@ -47,6 +48,22 @@
// return;
// }
// }
var role_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role_req');
var v_primary_flag_count=0;
var role_records = $(role_ds_id).getAll();
for (var i = 0;i < role_records.length;i++) {
if(role_records[i].get('primary_flag') == 'Y'){
v_primary_flag_count=v_primary_flag_count+1;
}
}
if(v_primary_flag_count!=1){
Leaf.showErrorMessage('错误', '一个商业伙伴有且仅有一个主角色!');
return false;
}
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
var bp_record = $(ds_id).getCurrentRecord();
var address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address_req');
......@@ -363,7 +380,7 @@
}
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, line_record) {
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds,line_record) {
var dsId = ds.id;
var grid_id = dsId.replace('ds', 'layout_grid_id');
var base_table_temp = 'hls_bp_master_req_role_ds';
......@@ -385,9 +402,31 @@
setListInterval(line_record, grid_id);
}
}
var role_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_ROLE', 'hls_bp_master_role_req');
if("${/model/role_info/record/@role_code}"!="0017"&&"${/model/role_info/record/@role_code}"!="HAND"){
if(role_ds_id == ds.id){
var records = $(ds.id).getAll();
for (var i = 0;i < records.length;i++) {
records[i].getField('primary_flag').setReadOnly(true);
}
}
}
};
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function(ds, record, config_records, bp_seq) {
var role_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_ROLE', 'hls_bp_master_role_req');
if("${/model/role_info/record/@role_code}"!="0017"&&"${/model/role_info/record/@role_code}"!="HAND"){
if(role_ds_id == ds.id){
var records = $(ds.id).getAll();
for (var i = 0;i < records.length;i++) {
records[i].getField('primary_flag').setReadOnly(true);
}
}
}
}
function setListInterval(record, grid_id) {
var btnListInterval = setTimeout(function() {
......@@ -459,9 +498,11 @@
}
}
}
var records = $(ds.id).getAll();
var role_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role_req');
if (role_ds == ds.id) {
var bp_type_flag='N';
var primary_flag = record.get('primary_flag');
if (primary_flag == 'Y') {
var bm_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
......@@ -471,6 +512,25 @@
bm_record.set('bp_category', record.get('bp_category'));
bm_record.set('bp_category_n', record.get('bp_category_n'));
}
if("${/model/role_info/record/@role_code}"!="0017"&&"${/model/role_info/record/@role_code}"!="HAND"){
if(name=='bp_type'){
for (var i = 0;i < records.length;i++) {
if(records[i].get('bp_type')=='TENANT'){
bp_type_flag='Y';
}
}
if(bp_type_flag=='Y'){
for (var i = 0;i < records.length;i++) {
if(records[i].get('bp_type')=='TENANT'){
records[i].set('primary_flag','Y')
}else{
records[i].set('primary_flag','N')
}
}
}
}
}
}
......@@ -663,7 +723,6 @@
}
};
function upload_file(id, name, query_only) {
......
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