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
a4349bf3
Commit
a4349bf3
authored
Dec 08, 2020
by
liyuan.chen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/商业伙伴维护修改等' into develop
parents
bdb19a8a
1b41fda0
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1193 additions
and
148 deletions
+1193
-148
pom.xml
pom.xml
+7
-0
ConExportMapper.xml
...sources/com/hand/hls/hlcm/cont/mapper/ConExportMapper.xml
+17
-17
config.properties
src/main/resources/config.properties
+2
-2
config.properties
src/main/resources/profiles/dev/config.properties
+2
-2
hls_bp_master_req_create.lwm
.../WEB-INF/classes/hls/HLS214N/hls_bp_master_req_create.lwm
+40
-0
hls_bp_master_req_submit.lwm
.../WEB-INF/classes/hls/HLS214N/hls_bp_master_req_submit.lwm
+21
-0
uncertain.local.xml
src/main/webapp/WEB-INF/uncertain.local.xml
+1
-1
hls_bp_master_create.lview
...ain/webapp/modules/hls/HLS213N/hls_bp_master_create.lview
+92
-42
hls_bp_master_billing.lview
...in/webapp/modules/hls/HLS214N/hls_bp_master_billing.lview
+176
-41
hls_bp_master_modify_entrance.lview
...p/modules/hls/HLS214N/hls_bp_master_modify_entrance.lview
+97
-43
hls_bp_master_req_modify.lview
...webapp/modules/hls/HLS214N/hls_bp_master_req_modify.lview
+738
-0
No files found.
pom.xml
View file @
a4349bf3
...
@@ -159,6 +159,13 @@
...
@@ -159,6 +159,13 @@
<scope>
system
</scope>
<scope>
system
</scope>
<systemPath>
${project.basedir}/src/main/webapp/WEB-INF/lib/jodconverter-2.2.2.jar
</systemPath>
<systemPath>
${project.basedir}/src/main/webapp/WEB-INF/lib/jodconverter-2.2.2.jar
</systemPath>
</dependency>
</dependency>
<dependency>
<groupId>
com.gson
</groupId>
<artifactId>
sys-gson
</artifactId>
<version>
1.0.0
</version>
<scope>
system
</scope>
<systemPath>
${project.basedir}/src/main/webapp/WEB-INF/lib/gson-2.6.2.jar
</systemPath>
</dependency>
<!--end -->
<!--end -->
...
...
src/main/resources/com/hand/hls/hlcm/cont/mapper/ConExportMapper.xml
View file @
a4349bf3
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
nvl((Select Sum(tn.write_off_due_amount)
nvl((Select Sum(tn.write_off_due_amount)
From csh_write_off tn
From csh_write_off tn
Where tn.cashflow_id = cwo.cashflow_id
Where tn.cashflow_id = cwo.cashflow_id
And tn.creation_date
<
=
And tn.creation_date
<
=
cwo.creation_date),
cwo.creation_date),
0) + cwo.write_off_due_amount) As due_amount,
0) + cwo.write_off_due_amount) As due_amount,
--收款日
--收款日
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
nvl((Select Sum(tn.write_off_due_amount)
nvl((Select Sum(tn.write_off_due_amount)
From csh_write_off tn
From csh_write_off tn
Where tn.cashflow_id = cwo.cashflow_id
Where tn.cashflow_id = cwo.cashflow_id
And tn.creation_date
<
=
And tn.creation_date
<
=
cwo.creation_date),
cwo.creation_date),
0)) As unreceived_amount
0)) As unreceived_amount
From con_contract_cashflow ccc,
From con_contract_cashflow ccc,
...
@@ -135,7 +135,7 @@
...
@@ -135,7 +135,7 @@
nvl((Select Sum(tn.write_off_due_amount)
nvl((Select Sum(tn.write_off_due_amount)
From csh_write_off tn
From csh_write_off tn
Where tn.cashflow_id = cwo.cashflow_id
Where tn.cashflow_id = cwo.cashflow_id
And tn.creation_date
<
=
And tn.creation_date
<
=
cwo.creation_date),
cwo.creation_date),
0) + cwo.write_off_due_amount) As due_amount,
0) + cwo.write_off_due_amount) As due_amount,
--收款日
--收款日
...
@@ -147,7 +147,7 @@
...
@@ -147,7 +147,7 @@
nvl((Select Sum(tn.write_off_due_amount)
nvl((Select Sum(tn.write_off_due_amount)
From csh_write_off tn
From csh_write_off tn
Where tn.cashflow_id = cwo.cashflow_id
Where tn.cashflow_id = cwo.cashflow_id
And tn.creation_date
<
=
And tn.creation_date
<
=
cwo.creation_date),
cwo.creation_date),
0)) As unreceived_amount
0)) As unreceived_amount
From con_contract_cashflow ccc,
From con_contract_cashflow ccc,
...
@@ -301,7 +301,7 @@
...
@@ -301,7 +301,7 @@
nvl((Select Sum(tn.write_off_due_amount)
nvl((Select Sum(tn.write_off_due_amount)
From csh_write_off tn
From csh_write_off tn
Where tn.cashflow_id = cwo.cashflow_id
Where tn.cashflow_id = cwo.cashflow_id
And tn.creation_date
<
=
And tn.creation_date
<
=
cwo.creation_date),
cwo.creation_date),
0) + cwo.write_off_due_amount) As due_amount,
0) + cwo.write_off_due_amount) As due_amount,
--收款日
--收款日
...
@@ -313,7 +313,7 @@
...
@@ -313,7 +313,7 @@
nvl((Select Sum(tn.write_off_due_amount)
nvl((Select Sum(tn.write_off_due_amount)
From csh_write_off tn
From csh_write_off tn
Where tn.cashflow_id = cwo.cashflow_id
Where tn.cashflow_id = cwo.cashflow_id
And tn.creation_date
<
=
And tn.creation_date
<
=
cwo.creation_date),
cwo.creation_date),
0)) As unreceived_amount
0)) As unreceived_amount
From con_contract_cashflow ccc,
From con_contract_cashflow ccc,
...
@@ -377,7 +377,7 @@
...
@@ -377,7 +377,7 @@
nvl((Select Sum(tn.write_off_due_amount)
nvl((Select Sum(tn.write_off_due_amount)
From csh_write_off tn
From csh_write_off tn
Where tn.cashflow_id = cwo.cashflow_id
Where tn.cashflow_id = cwo.cashflow_id
And tn.creation_date
<
=
And tn.creation_date
<
=
cwo.creation_date),
cwo.creation_date),
0) + cwo.write_off_due_amount) As due_amount,
0) + cwo.write_off_due_amount) As due_amount,
--收款日
--收款日
...
@@ -389,7 +389,7 @@
...
@@ -389,7 +389,7 @@
nvl((Select Sum(tn.write_off_due_amount)
nvl((Select Sum(tn.write_off_due_amount)
From csh_write_off tn
From csh_write_off tn
Where tn.cashflow_id = cwo.cashflow_id
Where tn.cashflow_id = cwo.cashflow_id
And tn.creation_date
<
=
And tn.creation_date
<
=
cwo.creation_date),
cwo.creation_date),
0)) As unreceived_amount
0)) As unreceived_amount
From con_contract_cashflow ccc,
From con_contract_cashflow ccc,
...
@@ -531,7 +531,7 @@
...
@@ -531,7 +531,7 @@
From csh_write_off tn
From csh_write_off tn
Where tn.cashflow_id =
Where tn.cashflow_id =
cwo.cashflow_id
cwo.cashflow_id
And tn.creation_date
<
=
And tn.creation_date
<
=
cwo.creation_date),
cwo.creation_date),
0) + cwo.write_off_due_amount) As due_amount,
0) + cwo.write_off_due_amount) As due_amount,
--收款日
--收款日
...
@@ -544,7 +544,7 @@
...
@@ -544,7 +544,7 @@
From csh_write_off tn
From csh_write_off tn
Where tn.cashflow_id =
Where tn.cashflow_id =
cwo.cashflow_id
cwo.cashflow_id
And tn.creation_date
<
=
And tn.creation_date
<
=
cwo.creation_date),
cwo.creation_date),
0)) As unreceived_amount
0)) As unreceived_amount
From con_contract_cashflow ccc,
From con_contract_cashflow ccc,
...
@@ -609,7 +609,7 @@
...
@@ -609,7 +609,7 @@
From csh_write_off tn
From csh_write_off tn
Where tn.cashflow_id =
Where tn.cashflow_id =
cwo.cashflow_id
cwo.cashflow_id
And tn.creation_date
<
=
And tn.creation_date
<
=
cwo.creation_date),
cwo.creation_date),
0) + cwo.write_off_due_amount) As due_amount,
0) + cwo.write_off_due_amount) As due_amount,
--收款日
--收款日
...
@@ -622,7 +622,7 @@
...
@@ -622,7 +622,7 @@
From csh_write_off tn
From csh_write_off tn
Where tn.cashflow_id =
Where tn.cashflow_id =
cwo.cashflow_id
cwo.cashflow_id
And tn.creation_date
<
=
And tn.creation_date
<
=
cwo.creation_date),
cwo.creation_date),
0)) As unreceived_amount
0)) As unreceived_amount
From con_contract_cashflow ccc,
From con_contract_cashflow ccc,
...
@@ -785,7 +785,7 @@
...
@@ -785,7 +785,7 @@
From csh_write_off tn
From csh_write_off tn
Where tn.cashflow_id =
Where tn.cashflow_id =
cwo.cashflow_id
cwo.cashflow_id
And tn.creation_date
<
=
And tn.creation_date
<
=
cwo.creation_date),
cwo.creation_date),
0) + cwo.write_off_due_amount) As due_amount,
0) + cwo.write_off_due_amount) As due_amount,
--收款日
--收款日
...
@@ -798,7 +798,7 @@
...
@@ -798,7 +798,7 @@
From csh_write_off tn
From csh_write_off tn
Where tn.cashflow_id =
Where tn.cashflow_id =
cwo.cashflow_id
cwo.cashflow_id
And tn.creation_date
<
=
And tn.creation_date
<
=
cwo.creation_date),
cwo.creation_date),
0)) As unreceived_amount
0)) As unreceived_amount
From con_contract_cashflow ccc,
From con_contract_cashflow ccc,
...
@@ -866,7 +866,7 @@
...
@@ -866,7 +866,7 @@
From csh_write_off tn
From csh_write_off tn
Where tn.cashflow_id =
Where tn.cashflow_id =
cwo.cashflow_id
cwo.cashflow_id
And tn.creation_date
<
=
And tn.creation_date
<
=
cwo.creation_date),
cwo.creation_date),
0) + cwo.write_off_due_amount) As due_amount,
0) + cwo.write_off_due_amount) As due_amount,
--收款日
--收款日
...
@@ -879,7 +879,7 @@
...
@@ -879,7 +879,7 @@
From csh_write_off tn
From csh_write_off tn
Where tn.cashflow_id =
Where tn.cashflow_id =
cwo.cashflow_id
cwo.cashflow_id
And tn.creation_date
<
=
And tn.creation_date
<
=
cwo.creation_date),
cwo.creation_date),
0)) As unreceived_amount
0)) As unreceived_amount
From con_contract_cashflow ccc,
From con_contract_cashflow ccc,
...
@@ -1011,7 +1011,7 @@
...
@@ -1011,7 +1011,7 @@
(Select cl.machine_number
(Select cl.machine_number
From con_contract_lease_item cl
From con_contract_lease_item cl
Where cl.contract_id = c.contract_id) As machine_number,
Where cl.contract_id = c.contract_id) As machine_number,
to_char(Sysdate,
'
yyyy"年"mm"月"dd"日"
'
) As today
to_char(Sysdate,
'yyyy"年"mm"月"dd"日"'
) As today
From con_contract c, hls_bp_master hb
From con_contract c, hls_bp_master hb
Where c.bp_id_tenant = hb.bp_id
Where c.bp_id_tenant = hb.bp_id
and c.contract_id = #{contractId}
and c.contract_id = #{contractId}
...
...
src/main/resources/config.properties
View file @
a4349bf3
...
@@ -9,7 +9,7 @@ redis.sentinel=\
...
@@ -9,7 +9,7 @@ redis.sentinel=\
redis.useSentinel
=
false
redis.useSentinel
=
false
redis.ip
=
localhost
redis.ip
=
localhost
redis.port
=
7777
redis.port
=
6379
redis.db
=
10
redis.db
=
10
#db.jndiName=java:comp/env/jdbc/hap_dev
#db.jndiName=java:comp/env/jdbc/hap_dev
...
@@ -19,7 +19,7 @@ redis.db=10
...
@@ -19,7 +19,7 @@ redis.db=10
db.type
=
oracle
db.type
=
oracle
db.driverClassName
=
oracle.jdbc.driver.OracleDriver
db.driverClassName
=
oracle.jdbc.driver.OracleDriver
db.url
=
jdbc:oracle:thin:@10.200.17.
100:1521/HLS
db.url
=
jdbc:oracle:thin:@10.200.17.
70:1521/HLS.orcl
db.username
=
hl_cm_dev
db.username
=
hl_cm_dev
db.password
=
hl_cm_dev
db.password
=
hl_cm_dev
db.maxPoolSize
=
100
db.maxPoolSize
=
100
...
...
src/main/resources/profiles/dev/config.properties
View file @
a4349bf3
...
@@ -9,7 +9,7 @@ redis.sentinel=\
...
@@ -9,7 +9,7 @@ redis.sentinel=\
redis.useSentinel
=
false
redis.useSentinel
=
false
redis.ip
=
localhost
redis.ip
=
localhost
redis.port
=
7777
redis.port
=
6379
redis.db
=
2
redis.db
=
2
#db.jndiName=java:comp/env/jdbc/hap_dev
#db.jndiName=java:comp/env/jdbc/hap_dev
...
@@ -19,7 +19,7 @@ redis.db=2
...
@@ -19,7 +19,7 @@ redis.db=2
db.type
=
oracle
db.type
=
oracle
db.driverClassName
=
oracle.jdbc.driver.OracleDriver
db.driverClassName
=
oracle.jdbc.driver.OracleDriver
db.url
=
jdbc:oracle:thin:@10.200.17.
100:1521/HLS
db.url
=
jdbc:oracle:thin:@10.200.17.
70:1521/HLS.orcl
db.username
=
hl_cm_dev
db.username
=
hl_cm_dev
db.password
=
hl_cm_dev
db.password
=
hl_cm_dev
db.maxPoolSize
=
100
db.maxPoolSize
=
100
...
...
src/main/webapp/WEB-INF/classes/hls/HLS214N/hls_bp_master_req_create.lwm
0 → 100644
View file @
a4349bf3
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: wangwei
$Date: 2015-11-12 下午2:15:58
$Revision: 1.0
$Purpose:
-->
<bm:model
xmlns:bm=
"http://www.leaf-framework.org/schema/bm"
needAccessControl=
"false"
>
<bm:operations>
<bm:operation
name=
"update"
>
<bm:update-sql>
<![CDATA[
begin
hls_bp_master_change_req_pkg.hls_bp_master_req_ins(p_bp_id =>
${@bp_id},
p_company_id => ${/session/@company_id},
p_user_id => ${/session/@user_id},
p_change_type => ${@change_type},
p_change_req_id => ${@change_req_id});
end;
]]>
</bm:update-sql>
<bm:parameters>
<bm:parameter
name=
"change_req_id"
dataType=
"java.lang.Long"
output=
"true"
outputPath=
"@change_req_id"
/>
</bm:parameters>
</bm:operation>
<bm:operation
name=
"execute"
>
<bm:update-sql>
<![CDATA[
begin
hls_bp_master_change_req_pkg.hls_bp_master_basic_ins(p_bp_id =>
${@bp_id},
p_company_id => ${/session/@company_id},
p_user_id => ${/session/@user_id},
p_change_req_id => ${@change_req_id});
end;
]]>
</bm:update-sql>
<bm:parameters>
<bm:parameter
name=
"change_req_id"
dataType=
"java.lang.Long"
output=
"true"
outputPath=
"@change_req_id"
/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
src/main/webapp/WEB-INF/classes/hls/HLS214N/hls_bp_master_req_submit.lwm
0 → 100644
View file @
a4349bf3
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: wangwei
$Date: 2015-11-12 下午2:15:58
$Revision: 1.0
$Purpose:
-->
<bm:model
xmlns:bm=
"http://www.leaf-framework.org/schema/bm"
needAccessControl=
"false"
>
<bm:operations>
<bm:operation
name=
"execute"
>
<bm:update-sql>
<![CDATA[
begin
hls_bp_master_change_req_pkg.hls_bp_master_wfl_submit(p_change_req_id =>
${@change_req_id},
p_company_id => ${/session/@company_id},
p_user_id => ${/session/@user_id});
end;
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
src/main/webapp/WEB-INF/uncertain.local.xml
View file @
a4349bf3
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<uncertain-engine
defaultLogLevel=
"INFO"
>
<uncertain-engine
defaultLogLevel=
"INFO"
>
<path-config
logPath=
"D:\
install_soft\jenkins_logs"
uiPackageBasePath=
"D:\install_soft\apache-tomcat-jenkins\webapps
\hlcm\lib\LeafUI\src"
/>
<path-config
logPath=
"D:\
Users\Leauan\Logs\HLCM_Log"
uiPackageBasePath=
"D:\Users\Leauan\workspace\leaf-hlcm\target
\hlcm\lib\LeafUI\src"
/>
</uncertain-engine>
</uncertain-engine>
\ No newline at end of file
src/main/webapp/modules/hls/HLS213N/hls_bp_master_create.lview
View file @
a4349bf3
...
@@ -116,6 +116,7 @@
...
@@ -116,6 +116,7 @@
};
};
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
debugger;
if ((ds.id).indexOf('hls_bp_master') != -1) {
if ((ds.id).indexOf('hls_bp_master') != -1) {
// record.getField('cell_phone').setRequired(true);
// record.getField('cell_phone').setRequired(true);
//record.getField('cell_phone').setRequired(true);
//record.getField('cell_phone').setRequired(true);
...
@@ -128,33 +129,42 @@
...
@@ -128,33 +129,42 @@
if (ds.fields.parent_id) {
if (ds.fields.parent_id) {
record.getField('parent_id_n').setReadOnly(true);
record.getField('parent_id_n').setReadOnly(true);
}
}
if (record.get('bp_class') && record.get('bp_class') == 'ORG') {
if (record.get('taxpayer_type')) {
if (record.get('invoice_method') == 'BILLING') {
var value = record.get('taxpayer_type');
record.getField('taxpayer_type').setRequired(true);
if (value == 'SMALL_SCALE_TAXPAYER') {
record.getField('taxpayer_type_n').setRequired(true);
record.getField('invoice_bp_address').setRequired(false);
record.getField('tax_registry_num').setRequired(true);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_title').setRequired(true);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
record.getField('tax_registry_num').setRequired(false);
}
if (value == 'GENERAL_TAXPAYER') {
record.getField('invoice_bp_address').setRequired(true);
record.getField('invoice_bp_address').setRequired(true);
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(true);
record.getField('tax_registry_num').setRequired(true);
}
if (record.get('invoice_method') == 'NO_BILLING') {
record.getField('taxpayer_type').setRequired(false);
record.getField('taxpayer_type_n').setRequired(false);
record.getField('tax_registry_num').setRequired(false);
record.getField('invoice_title').setRequired(false);
record.getField('invoice_bp_address').setRequired(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
}
}
}
}
if (record.get('marital_status') && (record.get('marital_status') == '30' || record.get('marital_status') == '40')) {
if (record.get('bp_class') && record.get('bp_class') == 'NP') {
document.getElementById('${/parameter/@layout_code}_F_SPOUSE_1_component_id').style.display = 'block';
// 自然人才有配偶
record.getField('bp_name_sp').setRequired(true);
if (record.get('marital_status') && (record.get('marital_status') == '30' || record.get('marital_status') == '40')) {
record.getField('card_type_sp').setRequired(true);
document.getElementById('${/parameter/@layout_code}_F_SPOUSE_1_component_id').style.display = 'block';
record.getField('card_type_sp_n').setRequired(true);
record.getField('bp_name_sp').setRequired(true);
record.getField('id_no_sp').setRequired(true);
record.getField('card_type_sp').setRequired(true);
} else {
record.getField('card_type_sp_n').setRequired(true);
document.getElementById('${/parameter/@layout_code}_F_SPOUSE_1_component_id').style.display = 'none';
record.getField('id_no_sp').setRequired(true);
} else {
document.getElementById('${/parameter/@layout_code}_F_SPOUSE_1_component_id').style.display = 'none';
}
}
}
record.set('invoice_title', record.get('bp_name'));
}
}
...
@@ -374,6 +384,8 @@
...
@@ -374,6 +384,8 @@
scope: this
scope: this
});
});
}
}
$(ds_id).setQueryParameter('bp_id', head_record.get('bp_id'));
$(ds_id).query();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
};
};
...
@@ -469,6 +481,9 @@
...
@@ -469,6 +481,9 @@
// ds.fields.id_no_sp.pro.validator = id_card_no_validate;
// ds.fields.id_no_sp.pro.validator = id_card_no_validate;
// record.set('resident_addres_sp', get_native_place(value))
// record.set('resident_addres_sp', get_native_place(value))
}
}
if (name == 'bp_name') {
record.set('invoice_title', value);
}
}
}
var hls_bp_master_ds_id = f_bp_create_ds_id;
var hls_bp_master_ds_id = f_bp_create_ds_id;
...
@@ -486,21 +501,47 @@
...
@@ -486,21 +501,47 @@
return false;
return false;
}
}
}
}
if (name == 'social_code' && value) {
if (name == 'social_code') {
if (!CheckSocialCreditCode(value)) {
if (value) {
Leaf.showMessage('提示', '统一社会信用代码有误,请重新输入!');
if (!CheckSocialCreditCode(value)) {
Leaf.showMessage('提示', '统一社会信用代码有误,请重新输入!');
setTimeout(function () {
record.set('social_code', '');
}, 20);
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
}
record.set('tax_registry_num', value);
}
if (name == 'cell_phone' && value) {
if (!checkMobile(value)) {
Leaf.showMessage('提示', '基本信息中,请输入正确格式的手机号码!');
setTimeout(function () {
setTimeout(function () {
record.set('
social_cod
e', '');
record.set('
cell_phon
e', '');
}, 20);
}, 20);
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
return false;
}
}
}
}
if (name == 'cell_phone' && value) {
if (name == 'invoice_title') {
if (value != record.get('bp_name')) {
setTimeout(function () {
record.set('invoice_title', record.get('bp_name'));
}, 20);
}
}
if (name == 'tax_registry_num') {
if (value != record.get('social_code')) {
setTimeout(function () {
record.set('tax_registry_num', record.get('social_code'));
}, 20);
}
}
if (name == 'invoice_bp_phone_num' && value) {
if (!checkMobile(value)) {
if (!checkMobile(value)) {
Leaf.showMessage('提示', '基本信息中,请输入正确格式的手机号码!');
Leaf.showMessage('提示', '基本信息中,请输入正确格式的手机号码!');
setTimeout(function () {
setTimeout(function () {
record.set('
cell_phone
', '');
record.set('
invoice_bp_phone_num
', '');
}, 20);
}, 20);
return false;
return false;
}
}
...
@@ -537,20 +578,29 @@
...
@@ -537,20 +578,29 @@
// record.set('work_unit_name_sp', null);
// record.set('work_unit_name_sp', null);
// record.set('work_unit_address_sp', null);
// record.set('work_unit_address_sp', null);
}
}
} else if (name == 'taxpayer_type' && value) {
}
if (value == 'SMALL_SCALE_TAXPAYER') {
if (name == 'invoice_method' && value) {
record.getField('invoice_bp_address').setRequired(false);
if (record.get('bp_class') == 'ORG') {
record.getField('invoice_bp_phone_num').setRequired(false);
if (value == 'BILLING') {
record.getField('invoice_bp_bank').setRequired(false);
record.getField('taxpayer_type').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(false);
record.getField('taxpayer_type_n').setRequired(true);
record.getField('tax_registry_num').setRequired(false);
record.getField('tax_registry_num').setRequired(true);
}
record.getField('invoice_title').setRequired(true);
if (value == 'GENERAL_TAXPAYER') {
record.getField('invoice_bp_address').setRequired(true);
record.getField('invoice_bp_address').setRequired(true);
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(true);
}
record.getField('tax_registry_num').setRequired(true);
if (value == 'NO_BILLING') {
record.getField('taxpayer_type').setRequired(false);
record.getField('taxpayer_type_n').setRequired(false);
record.getField('tax_registry_num').setRequired(false);
record.getField('invoice_title').setRequired(false);
record.getField('invoice_bp_address').setRequired(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
}
}
}
}
}
}
}
...
@@ -586,7 +636,7 @@
...
@@ -586,7 +636,7 @@
//超链接渲染
//超链接渲染
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
//
debugger;
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'attachment') {
if (name == 'attachment') {
link_function = 'upload_file';
link_function = 'upload_file';
...
...
src/main/webapp/modules/hls/HLS214N/hls_bp_master_billing.lview
View file @
a4349bf3
...
@@ -3,60 +3,195 @@
...
@@ -3,60 +3,195 @@
<a:screen
xmlns:a=
"http://www.leaf-framework.org/application"
customizationEnabled=
"true"
dynamiccreateenabled=
"true"
>
<a:screen
xmlns:a=
"http://www.leaf-framework.org/application"
customizationEnabled=
"true"
dynamiccreateenabled=
"true"
>
<a:init-procedure/>
<a:init-procedure/>
<a:view>
<a:view>
<!-- <a:link id="BmLink_MainScreen_functionHit" model="sys.sys_page_function_visit" modelaction="update"/>-->
<a:link
id=
"hls214N_cdd_uploadFile_id"
url=
"${/request/@context_path}/uploadFile.lview"
/>
<a:link
id=
"hls214N_cdd_downloadFile_id"
url=
"${/request/@context_path}/downloadFile.lview"
/>
<script
src=
"${/request/@context_path}/modules/prj/PRJ500N/javascripts/input_validator.js"
type=
"text/javascript"
/>
<a:link
id=
"hls214_bp_master_req_submit_link_id"
model=
"hls.HLS214N.hls_bp_master_req_submit"
modelaction=
"execute"
/>
<script>
<![CDATA[
<script>
<![CDATA[
//退出按钮
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
$('hls_bp_master_billing').close();
};
// 加载事件(form)
// 加载事件(form)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
if(record.get('taxpayer_type')){
if (record.get('invoice_method')) {
var value = record.get('taxpayer_type');
var value = record.get('invoice_method');
if(value == 'SMALL_SCALE_TAXPAYER'){
if (record.get('bp_class') == 'ORG') {
record.getField('invoice_bp_address').setRequired(false);
if (value == 'BILLING') {
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('taxpayer_type').setRequired(true);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('taxpayer_type_n').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(false);
record.getField('tax_registry_num').setRequired(true);
record.getField('tax_registry_num').setRequired(false);
record.getField('invoice_title').setRequired(true);
}
record.getField('invoice_bp_address').setRequired(true);
if(value == 'GENERAL_TAXPAYER'){
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_address').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
}
record.getField('invoice_bp_bank_account').setRequired(true);
if (value == 'NO_BILLING') {
record.getField('tax_registry_num').setRequired(true);
record.getField('taxpayer_type').setRequired(false);
record.getField('taxpayer_type_n').setRequired(false);
record.getField('tax_registry_num').setRequired(false);
record.getField('invoice_title').setRequired(false);
record.getField('invoice_bp_address').setRequired(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
}
}
}
}
}
};
};
// 更新事件
// 更新事件
window['${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
if(name == 'taxpayer_type' && value){
if (name == 'invoice_title') {
if(value == 'SMALL_SCALE_TAXPAYER'){
if (value != record.get('bp_name')) {
record.getField('invoice_bp_address').setRequired(false);
setTimeout(function () {
record.getField('invoice_bp_phone_num').setRequired(false);
record.set('invoice_title', record.get('bp_name'));
record.getField('invoice_bp_bank').setRequired(false);
}, 20);
record.getField('invoice_bp_bank_account').setRequired(false);
}
record.getField('tax_registry_num').setRequired(false);
}
}
if (name == 'tax_registry_num') {
if(value == 'GENERAL_TAXPAYER'){
if (value != record.get('social_code')) {
record.getField('invoice_bp_address').setRequired(true);
setTimeout(function () {
record.getField('invoice_bp_phone_num').setRequired(true);
record.set('tax_registry_num', record.get('social_code'));
record.getField('invoice_bp_bank').setRequired(true);
}, 20);
record.getField('invoice_bp_bank_account').setRequired(true);
}
record.getField('tax_registry_num').setRequired(true);
}
if (name == 'invoice_bp_phone_num' && value) {
if (!checkMobile(value)) {
Leaf.showMessage('提示', '基本信息中,请输入正确格式的手机号码!');
setTimeout(function () {
record.set('invoice_bp_phone_num', '');
}, 20);
return false;
}
}
if (name == 'invoice_method' && value) {
if (record.get('bp_class') == 'ORG') {
if (value == 'BILLING') {
record.getField('taxpayer_type').setRequired(true);
record.getField('taxpayer_type_n').setRequired(true);
record.getField('tax_registry_num').setRequired(true);
record.getField('invoice_title').setRequired(true);
record.getField('invoice_bp_address').setRequired(true);
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(true);
}
if (value == 'NO_BILLING') {
record.getField('taxpayer_type').setRequired(false);
record.getField('taxpayer_type_n').setRequired(false);
record.getField('tax_registry_num').setRequired(false);
record.getField('invoice_title').setRequired(false);
record.getField('invoice_bp_address').setRequired(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
}
}
}
}
}
};
};
function 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') {
url = $('hls214N_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
} else {
url = $('hls214N_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}', '请先保存!');
}
}
Leaf.onReady(function () {
//超链接渲染
var billing_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'hls_bp_master');
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'attachment') {
link_function = 'upload_file';
if (record.get('attach_count') == 0 || !record.get('attach_count')) {
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">
' + config_record.get('prompt') + '
</a>
';
} else {
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + config_record.get('prompt') + '(' + record.get('attach_count') + ')' + '
</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') {
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;
}
} else if (name == 'description') {
if (record.get('important_flag') == 'Y') {
return '
<font
color=
"RED"
>
' + value + '
</font>
';
}
return value;
}
};
// 提交审批
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
var record = $(ds_id).getAt(0);
if(record.dirty){
Leaf.showMessage('提示','请先保存!');
return;
}
if ($(ds_id).validate()) {
var record = $(ds_id).getAt(0);
Leaf.showConfirm('${l:HLS.PROMPT}', '确定提交审批吗?', function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('hls214_bp_master_req_submit_link_id').getUrl(),
para: {
change_req_id: record.get('change_req_id')
},
success: function(res) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
});
}
};
/*Leaf.onReady(function () {
var billing_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
// console.log($(billing_ds));
// console.log($(billing_ds));
$(billing_ds).setQueryParameter("
bp_id","${/parameter/@bp
_id}");
$(billing_ds).setQueryParameter("
change_req_id", "${/parameter/@change_req
_id}");
$(billing_ds).query();
$(billing_ds).query();
}
});*/
)
]]>
</script>
]]>
</script>
<a:screen-include
screen=
"modules/cont/CON500/con_contract_get_layout_code.lview"
/>
<a:screen-include
screen=
"modules/cont/CON500/con_contract_get_layout_code.lview"
/>
</a:view>
</a:view>
...
...
src/main/webapp/modules/hls/HLS214N/hls_bp_master_modify_entrance.lview
View file @
a4349bf3
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
modelaction=
"update"
/>
modelaction=
"update"
/>
<a:link
id=
"hls_bp_master_modify_link"
<a:link
id=
"hls_bp_master_modify_link"
url=
"${/request/@context_path}/modules/hls/HLS214N/hls_bp_master_modify.lview"
/>
url=
"${/request/@context_path}/modules/hls/HLS214N/hls_bp_master_modify.lview"
/>
<a:link
id=
"hls_bp_master_req_modify_link"
url=
"${/request/@context_path}/modules/hls/HLS214N/hls_bp_master_req_modify.lview"
/>
<a:link
id=
"Identity_ccx_link"
<a:link
id=
"Identity_ccx_link"
url=
"${/request/@context_path}/modules/interface/INTERFACE_CCX/hlcm_ccxIdentity_interface.lsc"
/>
url=
"${/request/@context_path}/modules/interface/INTERFACE_CCX/hlcm_ccxIdentity_interface.lsc"
/>
<a:link
id=
"IcInfo_ccx_link"
<a:link
id=
"IcInfo_ccx_link"
...
@@ -34,60 +36,112 @@
...
@@ -34,60 +36,112 @@
//信息变更
//信息变更
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function () {
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function () {
debugger;
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 data=$(ds_id).selected[0];
var record=$(ds_id).selected[0];
var bp_class = data.get('bp_class');
var param = record.data;
var bp_class = record.get('bp_class');
if(record.get('bp_wfl_status') == 'APPROVING'){
// 展示变更信息
param['function_code'] = 'HLS214BR';
param['function_usage'] = 'QUERY';
param['bp_class'] = bp_class;
param['change_req_id'] = record.get('invoice_change_id');
param['document_id'] = record.get('invoice_change_id');
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_modify_link', ds_id);
}else {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var url = '${/request/@context_path}/autocrud/hls.HLS214N.hls_bp_master_req_create/update';
Leaf.request({
url: url,
para: {
bp_id: record.get('bp_id'),
change_type: 'INVOICE_REQ'
},
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
if (res.result.change_req_id) {
debugger;
param['winid'] = 'bp_master_invoice_detail_win';
param['function_code'] = 'HLS214B';
param['bp_class'] = bp_class;
param['url_title'] = '开票申请信息';
param['change_req_id'] = res.result.change_req_id;
param['document_id'] = res.result.change_req_id;
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'MODIFY';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_billing_link', ds_id);
}
if(bp_class == 'NP'){
Leaf.showMessage('${l:PROMPT}', '只有法人类型商业伙伴才可以修改开票信息!');
return false;
}else if(bp_class == 'ORG'){
var invoice_bp_bank_account = data.get('invoice_bp_bank_account');
var invoice_title = data.get('invoice_title');
var invoice_bp_address_phone_num = data.get('invoice_bp_address_phone_num');
var phone =data.get('phone');
var taxpayer_type =data.get('taxpayer_type');
var invoice_bp_bank =data.get('invoice_bp_bank');
var ref_v07=data.get('ref_v07');
var bp_id=data.get('bp_id');
new Leaf.Window({
id: 'hls_bp_master_billing',
url: $('hls_bp_master_billing_link').getUrl(),
params: {
function_code:'HLS214NS',
invoice_bp_bank_account:invoice_bp_bank_account,
invoice_title:invoice_title,
invoice_bp_address_phone_num:invoice_bp_address_phone_num,
phone:phone,
taxpayer_type:taxpayer_type,
invoice_bp_bank:invoice_bp_bank,
bp_id:bp_id,
ref_v07:ref_v07
},
},
title: '开票信息',
failure: function () {
fullScreen: true
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
});
}
}
};
}
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_BP_RESULT', 'hls_bp_master');
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_BP_RESULT', 'hls_bp_master');
function open_bp_modify_win(ds_id, record_id) {
function open_bp_modify_win(ds_id, record_id) {
var user_category ='${/model/default_value/record/@user_category}'
;
debugger
;
var record = $(ds_id).findById(record_id);
var record = $(ds_id).findById(record_id);
var bp_class = record.get('bp_class');
var user_category ='${/model/default_value/record/@user_category}';
var submit_flag = record.get('submit_flag');
var param = record.data;
var param = record.data;
param['function_code'] = 'HLS214D';
if(record.get('bp_wfl_status') == 'APPROVING'){
// debugger;
// 展示原始信息,后续待定
// if (record.get('bp_category') == 'AGENT') {
param['function_code'] = 'HLS215D';
// param['function_code'] = 'HLS228DL';
param['function_usage'] = 'QUERY';
// }
param['bp_class'] = bp_class;
param['function_usage'] = 'MODIFY';
param['cond_para1'] = user_category;
param['bp_class'] = record.get('bp_class');
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
param['cond_para1'] = user_category;
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_modify_link', ds_id);
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
}else{
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_modify_link', ds_id);
if(submit_flag == 'Y'){
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var url = '${/request/@context_path}/autocrud/hls.HLS214N.hls_bp_master_req_create/execute';
Leaf.request({
url: url,
para: {
bp_id: record.get('bp_id') },
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
if(res.result.change_req_id){
debugger;
param['function_code'] = 'HLS214F';
param['function_usage'] = 'MODIFY';
param['bp_class'] = bp_class;
param['change_req_id'] = res.result.change_req_id;
param['document_id'] = res.result.change_req_id;
param['cond_para1'] = user_category;
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_req_modify_link', ds_id);
}
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}else{
param['function_code'] = 'HLS214D';
param['function_usage'] = 'MODIFY';
param['bp_class'] = bp_class;
param['cond_para1'] = user_category;
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_modify_link', ds_id);
}
}
}
}
function open_ccx_detail_win(ds_id, record_id) {
function open_ccx_detail_win(ds_id, record_id) {
...
...
src/main/webapp/modules/hls/HLS214N/hls_bp_master_req_modify.lview
0 → 100644
View file @
a4349bf3
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: zhangxing5129
$Date: 2014-8-4 下午03:12:06
$Revision: 1.0
$Purpose: 商业伙伴维护
-->
<a:screen
xmlns:a=
"http://www.leaf-framework.org/application"
customizationEnabled=
"true"
dynamiccreateenabled=
"true"
trace=
"true"
>
<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:init-procedure>
<a:view>
<a:link
id=
"bank_account_num_link"
model=
"hls.HLS214.hls_bp_bank_account_num"
modelaction=
"update"
/>
<a:link
id=
"bp_agent_modify_link"
url=
"${/request/@context_path}/modules/hls/HLS303/bp_agent_create.lview"
/>
<script
src=
"${/request/@context_path}/modules/prj/PRJ500N/javascripts/input_validator.js"
type=
"text/javascript"
/>
<a:link
id=
"${/parameter/@layout_code}_downloadFile_id"
url=
"${/request/@context_path}/uploadFile.lview"
/>
<a:link
id=
"hls214N_cdd_uploadFile_id"
url=
"${/request/@context_path}/uploadFile.lview"
/>
<a:link
id=
"hls214N_cdd_downloadFile_id"
url=
"${/request/@context_path}/downloadFile.lview"
/>
<a:link
id=
"${/parameter/@layout_code}_get_layout_code_link_id"
model=
"cont.CON500.con_contract_get_layout_code"
modelaction=
"update"
/>
<a:link
id=
"hls214_bp_master_save_link_id"
model=
"hls.HLS214.hls_bp_change_agent"
modelaction=
"update"
/>
<a:link
id=
"hls214_bp_master_basic_submit_link_id"
model=
"hls.HLS214N.hls_bp_master_req_submit"
modelaction=
"execute"
/>
<!-- <a:link id="hls214_sap_eai_create_customer_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrCustomer.lsc"/>-->
<!-- <a:link id="hls214_sap_eai_create_vender_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrVender.lsc"/>-->
<!-- <script src="${/request/@context_path}/javascripts/identity_card_info_query.js"-->
<!-- type="text/javascript"></script>-->
<script
type=
"text/javascript"
>
<![CDATA[
//保存前调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
// window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
// var bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
// debugger
// var Pattern = /^[A-Za-z]+$/;
// var record=$(bp_ds_id).getCurrentRecord();
// var record_name=record.get('extra_nam');
// if(record_name=='extra_nam'){
//
// if((!Pattern.test(record_name)||(record_name.length!=3))){
// Leaf.showMessage('${l:HLS.PROMPT}', '简称不合规!');
// window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
// return;
// }
// }
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
var bp_record = $(ds_id).getCurrentRecord();
if (old_id_card != new_id_card) {
bp_record.set('id_card_no_change_flag', 'Y');
} else {
bp_record.set('id_card_no_change_flag', 'N');
}
if (old_bp_name != new_bp_name) {
bp_record.set('bp_name_change_flag', 'Y');
} else {
record.set('bp_name_change_flag', 'N');
}
if (bp_record.get('marital_status') && (bp_record.get('marital_status') !== '30' && bp_record.get('marital_status') !== '40')) {
bp_record.set('bp_name_sp', null);
bp_record.set('card_type_sp', null);
bp_record.set('card_type_sp_n', null);
bp_record.set('id_no_sp', null);
bp_record.set('date_of_birth_sp', null);
bp_record.set('cell_phone_sp', null);
bp_record.set('work_unit_phone_sp', null);
bp_record.set('work_unit_name_sp', null);
bp_record.set('work_unit_address_sp', null);
return true;
}
return true;
};
function CheckSocialCreditCode(Code) {
var patrn = /^[0-9A-Z]+$/;
//18位校验及大写校验
if ((Code.length != 18) || (patrn.test(Code) == false)) {
return false;
} else {
var Ancode;//统一社会信用代码的每一个值
var Ancodevalue;//统一社会信用代码每一个值的权重
var total = 0;
var weightedfactors = [1, 3, 9, 27, 19, 26, 16, 17, 20, 29, 25, 13, 8, 24, 10, 30, 28];//加权因子
var str = '0123456789ABCDEFGHJKLMNPQRTUWXY';
//不用I、O、S、V、Z
for (var i = 0; i < Code.length - 1; i++) {
Ancode = Code.substring(i, i + 1);
Ancodevalue = str.indexOf(Ancode);
total = total + Ancodevalue * weightedfactors[i];
//权重与加权因子相乘之和
}
var logiccheckcode = 31 - total % 31;
if (logiccheckcode == 31) {
logiccheckcode = 0;
}
var Str = "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,T,U,W,X,Y";
var Array_Str = Str.split(',');
logiccheckcode = Array_Str[logiccheckcode];
var checkcode = Code.substring(17, 18);
if (logiccheckcode != checkcode) {
return false;
} else {
return true;
}
}
}
//保存submitsuccess调用
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res, bp_seq) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
var bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
var records = $(ds_id);
if (!(records == 'undefined' || records == null)) {
$(ds_id).query();
}
// 简称校验
// debugger;
// var Pattern = /^[A-Za-z]+$/;
//
// if(record.getField('extra_nam')=='extra_nam'){
// if((!Pattern.text(extra_nam)||(extra_nam.length!=3))){
// Leaf.showMessage('${l:HLS.PROMPT}', '简称不合规!');
// return true;
// }
// }
// Leaf.request({
// url: $('hls214_sap_eai_create_customer_link').getUrl(),
// para: {
// bp_id: bp_id
// },
// scope: this,
// success: function () {
// Leaf.request({
// url: $('hls214_sap_eai_create_vender_link').getUrl(),
// para: {
// bp_id: bp_id
// },
// scope: this,
// success: function () {
// $(bp_ds_id).query();
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// failure: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// error: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// sync: true
// });
// },
// failure: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// error: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// sync: true
// });
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
};
function prj_check_bp_id(record) {
var bp_id;
if (record) {
bp_id = record.get('bp_id');
}
if (!bp_id) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
bp_id = '';
}
return bp_id;
}
//财务报表模板导入
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
var record = $(ds_id).getCurrentRecord();
bp_id = prj_check_bp_id(record);
if (!bp_id) {
return;
}
new Leaf.Window({
id: 'rsc_fin_statement_prj_import_handle_winid',
url: '${/request/@context_path}/modules/rsc/RSC303/rsc_fin_statement_prj_import_handle.lview',
params: {
bp_id: bp_id,
winid: 'rsc_fin_statement_prj_import_handle_winid'
},
title: '${l:STATEMENTS_BUSINESS_DATA_IMPORT}',
width: 950,
height: 200
});
};
//财务报表模板查看
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
var record = $(ds_id).getCurrentRecord();
var bp_id = prj_check_bp_id(record);
if (!bp_id) {
return;
}
new Leaf.Window({
id: 'rsc_fin_statement_prj_all_query_winid',
url: '${/request/@context_path}/modules/rsc/RSC303/rsc_fin_statement_prj_all_query.lview',
params: {
bp_id: bp_id,
winid: 'rsc_fin_statement_prj_all_query_winid'
},
title: '${l:STATEMENTS_BUSINESS_DATA_IMPORT}',
fullScreen: true,
draggable: true
});
};
// function fin_institution_code_validate(record, name, value) {
// if (!value) {
// return '金融机构代码不能为空';
// } else {
// if (value.length != 11) {
// return '金融机构代码长度必须为11位';
// }
// }
// return true;
// }
// function trade_type_code_validate(record, name, value) {
// var trade_type_code = record.get('trade_type_code');
// if(!trade_type_code){
// if(trade_type_code != trade_type_code.toLowerCase()){
// return '行业分类代码必须为小写字母';
// }}
// return true;
// }
var old_id_card;
var new_id_card;
var old_bp_name;
var new_bp_name;
//新增和加载时调用form
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
debugger;
// if ((ds.id).indexOf('hls_bp_master_credit') != -1 && (ds.id).indexOf('F_ORG_CREDIT') != -1) {
// if (ds.fields.fin_institution_code) {
// ds.fields.fin_institution_code.pro.validator = fin_institution_code_validate;
// }
// if (ds.fields.trade_type_code) {
// ds.fields.trade_type_code.pro.validator = trade_type_code_validate;
// }
// }
// }
if ((ds.id).indexOf('hls_bp_master_req') != -1 && (ds.id).indexOf('F_BASIC') != -1) {
var employee_type_id = '${/model/modify_user/record/@employee_type_id}';
old_bp_name = record.get('bp_name');
new_bp_name = record.get('bp_name');
if (record.get('id_type') == 'ID_CARD') {
old_id_card = record.get('id_card_no');
new_id_card = record.get('id_card_no');
}
if (record.get('bp_category') == 'VENDER') {
record.getField('unit_id_n').setReadOnly(true);
record.getField('unit_id_n').setRequired(false);
} else {
if (employee_type_id == '64') {
record.getField('unit_id_n').setReadOnly(true);
record.getField('unit_id_n').setRequired(false);
} else {
record.getField('unit_id_n').setReadOnly(true);
record.getField('unit_id_n').setRequired(false);
}
}
if(record.get('bp_class')&&record.get('bp_class')=='NP'){
if (record.get('marital_status') && (record.get('marital_status') == '30' || record.get('marital_status') == '40')) {
document.getElementById('${/parameter/@layout_code}_F_SPOUSE_1_component_id').style.display = 'block';
record.getField('bp_name_sp').setRequired(true);
record.getField('card_type_sp').setRequired(true);
record.getField('card_type_sp_n').setRequired(true);
record.getField('id_no_sp').setRequired(true);
} else {
document.getElementById('${/parameter/@layout_code}_F_SPOUSE_1_component_id').style.display = 'none';
}
}
}
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, line_record) {
var dsId = ds.id;
var base_table_temp = 'hls_bp_master_req_role_ds';
if (dsId.substring(dsId.length - base_table_temp.length, dsId.length) == base_table_temp) {
var record = ds.getCurrentRecord();
if (record) {
record.getField('bp_type_n').setReadOnly(true);
record.getField('enabled_flag').setReadOnly(true);
}
}
if (ds.fields.parent_id) {
record.getField('parent_id_n').setReadOnly(true);
}
};
//更新时调用 add by liukang
//填写银行账号时 允许银行账号相同 但是给一个提示(提示一下而已)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
var f_bp_create_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
var gird_ds_id = 'BP_NP_MODIFY_N_BP_ASSETS01_hls_bp_assets_ds';
var gird_ds_id2 = 'BP_NP_MODIFY_N_BP_ASSETS04_hls_bp_assets_ds';
var gird_ds_id3 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_bank_flow');
if (gird_ds_id == ds.id || gird_ds_id2 == ds.id) {
if (name == 'relationship_with_bp') {
if (value == 'A7501') {
record.set('owership', $(f_bp_create_ds_id).getAt(0).get('bp_name'));
} else if (value == 'A7502') {
record.set('owership', $(f_bp_create_ds_id).getAt(0).get('bp_name_sp'));
} else {
record.set('owership', '');
}
}
}
if (gird_ds_id3 == ds.id) {
if (name == 'relationship_with_bp') {
if (value == 'A7501') {
record.set('owner_name', $(f_bp_create_ds_id).getAt(0).get('bp_name'));
} else if (value == 'A7502') {
record.set('owner_name', $(f_bp_create_ds_id).getAt(0).get('bp_name_sp'));
} else {
record.set('owner_name', '');
}
}
}
var role_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role_req');
if (role_ds == ds.id) {
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');
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'));
}
}
var hls_bp_master_req_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
var hls_bank_acc_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_bank_acc_req');
var hls_bp_master_credit_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit');
var bp_record = $(hls_bp_master_req_ds_id).getCurrentRecord();
if ((ds.id).indexOf('hls_bp_master_req') != -1 && (ds.id).indexOf('F_BASIC') != -1) {
if (name == 'bp_name') {
new_bp_name = record.get('bp_name');
}
if (name == 'agent_type') {
if (value == 'AGENT_NO_REBATE' || value == 'AGENT_EE') {
record.getField('parent_id_n').setReadOnly(false);
} else {
record.getField('parent_id_n').setReadOnly(true);
}
}
if (name == 'social_code') {
if (!CheckSocialCreditCode(value)) {
Leaf.showMessage('提示', '统一社会信用代码有误,请重新输入!');
setTimeout(function () {
record.set('social_code', '');
}, 20);
return false;
}
}
}
if (ds.id == hls_bp_master_req_ds_id) {
if ($L.CmpManager.get(hls_bp_master_req_ds_id)) {
if (name == 'province_id') {
record.set('city_sp', '');
record.set('city_sp_n', '');
}
}
}
if (ds.id == hls_bank_acc_ds_id) {
var bank_account_num = record.get('bank_account_num');
if (name == 'bank_account_num') {
Leaf.request({
url: $('bank_account_num_link').getUrl(),
para: {
bank_account_num: bank_account_num
},
success: function (res) {
var number = res.result.num;
//alert(number);
if (number >
0) {
Leaf.showMessage('提示', '该银行账号在系统中已存在!');
}
},
failure: function (res) {
},
error: function () {
},
scope: this
});
}
}
if ((ds.id).indexOf('hls_bp_master_req') != -1) {
// //身份证验证
// if (ds.fields.id_card_no
&&
bp_record.get('bp_class') == 'NP'
&&
bp_record.get('id_type') == 'ID_CARD') {
// ds.fields.id_card_no.pro.validator = id_card_no_validate;
// ds.fields.id_no_sp.pro.validator = id_card_no_validate;
// }
if (name == 'cell_phone') {
if (!checkMobile(value)) {
Leaf.showMessage('提示', '基本信息中,请输入正确格式的手机号码!');
setTimeout(function () {
record.set('cell_phone', '');
}, 20);
return false;
}
}
if (name == 'leader_mobile_number') {
if (!checkMobile(value)) {
Leaf.showMessage('提示', '公司负责人中,请输入正确格式的手机号码!');
setTimeout(function () {
record.set('leader_mobile_number', '');
}, 20);
return false;
}
}
if (name == 'id_card_no'
&&
value) {
if (record.get('id_type') == 'ID_CARD') {
if (!checkCard(value)) {
Leaf.showMessage('提示', '基本信息中,请输入正确格式的身份证!');
setTimeout(function () {
record.set('id_card_no', '');
}, 20);
return false;
} else if (value.length == 18) {
new_id_card = record.get('id_card_no');
//自动带出籍贯
//record.set('resident_addres', get_native_place(value));
record.set('date_of_birth', new Date(value.substr(6, 4) + '/' + value.substr(10, 2) + '/' + value.substr(12, 2)));
record.set('age', new Date().getFullYear() - value.substr(6, 4));
if (value.substr(16, 1) % 2 == 1) {
record.set('gender', 'MALE');
record.set('gender_n', '男');
} else if (value.substr(16, 1) % 2 == 0) {
record.set('gender', 'FEMALE');
record.set('gender_n', '女');
}
}
}
}
if (name == 'id_no_sp'
&&
value) {
//
if (record.get('card_type_sp') == 'ID_CARD') {
if (!checkCard(value)) {
Leaf.showMessage('提示', '配偶信息中,请输入正确格式的身份证!');
setTimeout(function () {
record.set('id_no_sp', '');
}, 20);
return false;
} else if (value.length == 18) {
new_id_card = record.get('id_card_no_leg');
//record.set('resident_addres_sp', get_native_place(value));
record.set('date_of_birth_sp', new Date(value.substr(6, 4) + '/' + value.substr(10, 2) + '/' + value.substr(12, 2)));
record.set('age', new Date().getFullYear() - value.substr(6, 4));
if (value.substr(16, 1) % 2 == 1) {
record.set('gender', 'MALE');
record.set('gender_n', '男');
} else if (value.substr(16, 1) % 2 == 0) {
record.set('gender', 'FEMALE');
record.set('gender_n', '女');
}
}
}
}
}
var test_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC', 'hls_bp_master_req');
var test_ds_id1 = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_SPOUSE_1', 'hls_bp_master_req');
var test_ds_id2 = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_SPOUSE', 'hls_bp_master_req');
if (ds.id == f_bp_create_ds_id) {
debugger;
var hd_ds = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC', 'hls_bp_master_req');
record = $(hd_ds).getCurrentRecord();
if(record.get('bp_class')=='NP'){
if (name == 'marital_status') {
debugger;
if (value == '30' || value == '40') {
document.getElementById('${/parameter/@layout_code}_F_SPOUSE_1_component_id').style.display = 'block';
record.getField('bp_name_sp').setRequired(true);
record.getField('card_type_sp').setRequired(true);
record.getField('card_type_sp_n').setRequired(true);
record.getField('id_no_sp').setRequired(true);
if (!record.get('card_type_sp')) {
record.set('card_type_sp', 'ID_CARD');
record.set('card_type_sp_n', '身份证');
}
} else {
document.getElementById('${/parameter/@layout_code}_F_SPOUSE_1_component_id').style.display = 'none';
record.getField('bp_name_sp').setRequired(false);
record.getField('card_type_sp').setRequired(false);
record.getField('card_type_sp_n').setRequired(false);
record.getField('id_no_sp').setRequired(false);
// record.set('bp_name_sp', null);
// record.set('card_type_sp', null);
// record.set('card_type_sp_n', null);
// record.set('id_no_sp', null);
// record.set('date_of_birth_sp', null);
// record.set('cell_phone_sp', null);
// record.set('work_unit_phone_sp', null);
// record.set('work_unit_name_sp', null);
// record.set('work_unit_address_sp', null);
}
}
}
}
};
function 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') {
url = $('hls214N_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK
&
header_id=' + record.get('check_id');
} else {
url = $('hls214N_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) {
//
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'attachment') {
link_function = 'upload_file';
if (record.get('attach_count') == 0 || !record.get('attach_count')) {
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + config_record.get('prompt') + '
</a>
';
} else {
return '
<a
href=
"javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');"
>
' + config_record.get('prompt') + '(' + record.get('attach_count') + ')' + '
</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') {
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;
}
} else if (name == 'description') {
if (record.get('important_flag') == 'Y') {
return '
<font
color=
"RED"
>
' + value + '
</font>
';
}
return value;
}
};
//经销商准入
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
var record = $(ds_id).getCurrentRecord();
var agent_instance_status = record.get('agent_instance_status');
if (agent_instance_status == 'APPROVED') {
Leaf.showMessage('提示', '该商业伙伴已进行过经销商准入流程,不允许再次操作!');
return;
} else if (agent_instance_status == 'APPROVING') {
Leaf.showMessage('提示', '该商业伙伴已经在准入流程中,不允许再次操作!');
return;
} else if (agent_instance_status == 'REJECT') {
Leaf.showMessage('提示', '该商业伙伴准入流程已被拒绝,不允许再次操作!');
return;
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('hls214_bp_master_save_link_id').getUrl(),
para: {
'bp_id': record.get('bp_id')
},
success: function (res) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
var param = {};
param['function_code'] = 'HLS303';
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'MODIFY';
param['url_title'] = '经销商准入';
param['bp_id'] = record.get('bp_id');
param['bp_class'] = record.get('bp_class');
param['bp_type'] = record.get('bp_type');
param['agent_instance_flag'] = 'Y';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, 'bp_agent_modify_link', ds_id, '${/parameter/@layout_code}');
},
failure: function (res) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
};
// 提交审批
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
if ($(ds_id).validate()) {
var record = $(ds_id).getAt(0);
Leaf.showConfirm('${l:HLS.PROMPT}', '确定提交审批吗?', function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('hls214_bp_master_basic_submit_link_id').getUrl(),
para: {
change_req_id: record.get('change_req_id')
},
success: function(res) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
});
}
};
//add by zhuxianfei 20180103
// function id_card_no_validate(record, name, value) {
// if(name == 'id_card_no'
&&
record.get('id_type') != 'ID_CARD'){
// return true;
// }else if(name == 'id_no_sp'
&&
record.get('card_type_sp') != 'ID_CARD'){
// return true;
// }
// if (!checkCard(value)) {
// Leaf.showMessage('提示', '请输入正确格式的身份证!');
// return '请输入正确格式的身份证';
// }
// if (value.length == 18) {
// record.set('date_of_birth', new Date(value.substr(6, 4) + '/' + value.substr(10, 2) + '/' + value.substr(12, 2)));
// record.set('age', new Date().getFullYear() - value.substr(6, 4));
// if (value.substr(16, 1) % 2 == 1) {
// record.set('gender', 'MALE');
// record.set('gender_n', '男');
// } else if (value.substr(16, 1) % 2 == 0) {
// record.set('gender', 'FEMALE');
// record.set('gender_n', '女');
// }
// }
// return true;
// }
/*Leaf.onReady(init);
function init() {
var bp_class = '${/parameter/@bp_class}';
if (bp_class != 'ORG') {
var user_button4 = document.getElementById('${/parameter/@layout_code}' + '_user_button4');
user_button4.style.display = 'none';
}
}*/
]]>
</script>
<a:screen-include
screen=
"modules/cont/CON500/con_contract_get_layout_code.lview"
/>
</a:view>
</a:screen>
\ No newline at end of file
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