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>
......
......@@ -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