Commit 7a50b42d authored by xiaochao's avatar xiaochao

【商业伙伴修改v1.0】

parent 610aba0b
......@@ -13,8 +13,14 @@
</bm:parameters>
<bm:update-sql><![CDATA[
BEGIN
prj_project_pkg.project_create_save_check(p_project_id =>${@project_id}, p_user_id =>${/session/@user_id}, p_function_code =>${@function_code}, p_function_usage =>${@function_usage}, p_save_source_type =>${@save_source_type}, p_project_status =>${@project_status}, p_cdd_list_id => ${@cdd_list_id});
prj_project_pkg.project_create_save_check(p_project_id =>${@project_id},
p_user_id =>${/session/@user_id},
p_function_code =>${@function_code},
p_function_usage =>${@function_usage},
p_save_source_type =>${@save_source_type},
p_project_status =>${@project_status},
p_bp_id_tenant =>${@bp_id_tenant},
p_cdd_list_id => ${@cdd_list_id});
END;
]]></bm:update-sql>
</bm:operation>
......
......@@ -14,7 +14,7 @@
<bm:update-sql><![CDATA[
BEGIN
-- 校验组织机构代码,身份证号,配偶身份证号
hls_bp_master_change_req_pkg.check_bp_class(p_change_req_id => ${@change_req_id}, p_user_id => ${/session/@user_id});
hls_bp_master_change_req_pkg.check_bp_class(p_change_req_id => ${@change_req_id}, p_user_id => ${/session/@user_id},p_bp_code =>${@bp_code});
hls_bp_master_change_req_pkg.bp_create_user_authority(p_change_req_id => ${@change_req_id}, p_user_id => ${/session/@user_id}, p_company_id => ${/session/@company_id});
......
......@@ -133,14 +133,14 @@
}
if (record.get('bp_class') && record.get('bp_class') == 'ORG') {
if (record.get('invoice_method') == '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);
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 (record.get('invoice_method') == 'NO_BILLING') {
record.getField('taxpayer_type').setRequired(false);
......@@ -152,6 +152,8 @@
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
}
}
if (record.get('bp_class') && record.get('bp_class') == 'NP') {
// 自然人才有配偶
......@@ -602,32 +604,90 @@
// record.set('work_unit_address_sp', null);
}
}
if (name == 'invoice_method' && value) {
if (record.get('bp_class') == 'ORG') {
//开票
if (value == 'BILLING') {
//一般纳税人
if( record.get('taxpayer_type') == 'GENERAL_TAXPAYER'){
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);
}else if(record.get('taxpayer_type') == 'SMALL_SCALE_TAXPAYER'){
//小规模纳税人
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(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
}
}else if (value == 'NO_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);
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 (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);
}
}
if (name == 'taxpayer_type' && value) {
if (record.get('bp_class') == 'ORG') {
if (value == 'SMALL_SCALE_TAXPAYER') {
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(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
}else if (value == 'GENERAL_TAXPAYER') {
if (record.get('invoice_method') == '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);
}else if ( record.get('invoice_method') == 'NO_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(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) {
......
......@@ -61,27 +61,86 @@
return false;
}
}*/
if (name == 'invoice_method' && value) {
if (record.get('bp_class') == 'ORG') {
//开票
if (value == 'BILLING') {
//一般纳税人
if( record.get('taxpayer_type') == 'GENERAL_TAXPAYER'){
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);
}else if(record.get('taxpayer_type') == 'SMALL_SCALE_TAXPAYER'){
//小规模纳税人
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(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
}
}else if (value == 'NO_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);
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 (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);
}
}
if (name == 'taxpayer_type' && value) {
if (record.get('bp_class') == 'ORG') {
if (value == 'SMALL_SCALE_TAXPAYER') {
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(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
}else if (value == 'GENERAL_TAXPAYER') {
if (record.get('invoice_method') == '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);
}else if ( record.get('invoice_method') == 'NO_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(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
}
}
}
}
......
......@@ -42,18 +42,50 @@
var param = record.data;
var bp_class = record.get('bp_class');
if(record.get('invoice_wfl_status') == 'APPROVING' || record.get('bp_wfl_status') == 'APPROVING'){
// 展示变更信息
param['function_code'] = 'HLS214BR';
param['function_usage'] = 'QUERY';
param['query_only'] = 'Y';
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_billing_link', ds_id);
//审批中调用
// 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['query_only'] = 'N';
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) {
// 展示变更信息
param['winid'] = 'bp_master_invoice_detail_win';
param['function_code'] = 'HLS214BR';
param['function_usage'] = 'MODIFY';
param['query_only'] = 'N';
param['bp_class'] = bp_class;
param['change_req_id'] = res.result.change_req_id;
param['document_id'] = res.result.change_req_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_billing_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 if (record.get('invoice_wfl_status') != 'APPROVING' && record.get('bp_wfl_status') != 'APPROVING'){
//审批通过调用
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: {
......@@ -106,6 +138,7 @@
param['query_only'] = 'Y';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_modify_link', ds_id);
}else if (record.get('invoice_wfl_status') != 'APPROVING' && record.get('bp_wfl_status') != 'APPROVING'){
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';
......
......@@ -302,9 +302,9 @@
if('${/parameter/@bp_name_updated_flag}'){
if('${/parameter/@bp_name_updated_flag}' == 'N'){
record.getField('bp_name').setReadOnly(true);
Leaf.showMessage('提示', '该商业伙伴有正在申请的发票,不能变更商业伙伴名称!');
}
}
}
};
......
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