Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hlcm
leaf-hlcm
Commits
34da4893
Commit
34da4893
authored
Jun 17, 2022
by
gzj34291
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商业伙伴主角色逻辑修改
parent
3ef6ee64
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
160 additions
and
3 deletions
+160
-3
hls_bp_master_create.lview
...ain/webapp/modules/hls/HLS213N/hls_bp_master_create.lview
+33
-0
hls_bp_master_modify.lview
...ain/webapp/modules/hls/HLS214N/hls_bp_master_modify.lview
+66
-1
hls_bp_master_req_modify.lview
...webapp/modules/hls/HLS214N/hls_bp_master_req_modify.lview
+61
-2
No files found.
src/main/webapp/modules/hls/HLS213N/hls_bp_master_create.lview
View file @
34da4893
...
@@ -829,6 +829,39 @@
...
@@ -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) {
function upload_file(id, name, query_only) {
...
...
src/main/webapp/modules/hls/HLS214N/hls_bp_master_modify.lview
View file @
34da4893
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<a:init-procedure>
<a:init-procedure>
<a:model-query
fetchAll=
"true"
model=
"prj.PRJ500D.user_agent_description"
rootPath=
"user_agent_description"
/>
<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
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:init-procedure>
<a:view>
<a:view>
<a:link
id=
"bank_account_num_link"
model=
"hls.HLS214.hls_bp_bank_account_num"
modelaction=
"update"
/>
<a:link
id=
"bank_account_num_link"
model=
"hls.HLS214.hls_bp_bank_account_num"
modelaction=
"update"
/>
...
@@ -46,6 +47,22 @@
...
@@ -46,6 +47,22 @@
// return;
// 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 ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var bp_record = $(ds_id).getCurrentRecord();
var bp_record = $(ds_id).getCurrentRecord();
...
@@ -380,10 +397,11 @@
...
@@ -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 dsId = ds.id;
var base_table_temp = 'hls_bp_master_role_ds';
var base_table_temp = 'hls_bp_master_role_ds';
if (dsId.substring(dsId.length - base_table_temp.length, dsId.length) == base_table_temp) {
if (dsId.substring(dsId.length - base_table_temp.length, dsId.length) == base_table_temp) {
...
@@ -396,7 +414,30 @@
...
@@ -396,7 +414,30 @@
if (ds.fields.parent_id) {
if (ds.fields.parent_id) {
record.getField('parent_id_n').setReadOnly(true);
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
//更新时调用 add by liukang
//填写银行账号时 允许银行账号相同 但是给一个提示(提示一下而已)
//填写银行账号时 允许银行账号相同 但是给一个提示(提示一下而已)
...
@@ -633,6 +674,30 @@
...
@@ -633,6 +674,30 @@
record.set('tax_registry_num',record.get('social_code'));
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')
}
}
}
}
}
}
};
};
...
...
src/main/webapp/modules/hls/HLS214N/hls_bp_master_req_modify.lview
View file @
34da4893
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<a:init-procedure>
<a:init-procedure>
<a:model-query
fetchAll=
"true"
model=
"prj.PRJ500D.user_agent_description"
rootPath=
"user_agent_description"
/>
<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
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:init-procedure>
<a:view>
<a:view>
<a:link
id=
"bank_account_num_link"
model=
"hls.HLS214.hls_bp_bank_account_num"
modelaction=
"update"
/>
<a:link
id=
"bank_account_num_link"
model=
"hls.HLS214.hls_bp_bank_account_num"
modelaction=
"update"
/>
...
@@ -47,6 +48,22 @@
...
@@ -47,6 +48,22 @@
// return;
// 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 ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
var bp_record = $(ds_id).getCurrentRecord();
var bp_record = $(ds_id).getCurrentRecord();
var address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address_req');
var address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address_req');
...
@@ -363,7 +380,7 @@
...
@@ -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 dsId = ds.id;
var grid_id = dsId.replace('ds', 'layout_grid_id');
var grid_id = dsId.replace('ds', 'layout_grid_id');
var base_table_temp = 'hls_bp_master_req_role_ds';
var base_table_temp = 'hls_bp_master_req_role_ds';
...
@@ -385,9 +402,31 @@
...
@@ -385,9 +402,31 @@
setListInterval(line_record, grid_id);
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) {
function setListInterval(record, grid_id) {
var btnListInterval = setTimeout(function() {
var btnListInterval = setTimeout(function() {
...
@@ -459,9 +498,11 @@
...
@@ -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');
var role_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role_req');
if (role_ds == ds.id) {
if (role_ds == ds.id) {
var bp_type_flag='N';
var primary_flag = record.get('primary_flag');
var primary_flag = record.get('primary_flag');
if (primary_flag == 'Y') {
if (primary_flag == 'Y') {
var bm_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
var bm_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
...
@@ -471,6 +512,25 @@
...
@@ -471,6 +512,25 @@
bm_record.set('bp_category', record.get('bp_category'));
bm_record.set('bp_category', record.get('bp_category'));
bm_record.set('bp_category_n', record.get('bp_category_n'));
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 @@
...
@@ -663,7 +723,6 @@
}
}
};
};
function upload_file(id, name, query_only) {
function upload_file(id, name, query_only) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment