Commit 637de337 authored by 李贺贺's avatar 李贺贺

商业伙伴创建及维护开票信息默认值维护

parent 13498439
......@@ -216,6 +216,23 @@
}
record.set('invoice_title', record.get('bp_name'));
if(record.get('taxpayer_type') == 'GENERAL_TAXPAYER'){
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('invoice_type').setRequired(false);
record.getField('invoice_type_n').setRequired(false);
record.getField('reception_maile').setRequired(false);
}else if(record.get('taxpayer_type') == 'SMALL_SCALE_TAXPAYER'){
record.set('invoice_type','ECT');
record.set('invoice_type_n','电子发票');
record.getField('invoice_type').setRequired(true);
record.getField('invoice_type_n').setRequired(true);
record.getField('invoice_type').setReadOnly(false);
record.getField('invoice_type_n').setReadOnly(false);
}
}
......@@ -722,12 +739,6 @@
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(true);
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}else if(record.get('taxpayer_type') == 'SMALL_SCALE_TAXPAYER'){
//小规模纳税人
record.getField('taxpayer_type').setRequired(true);
......@@ -739,13 +750,6 @@
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
record.set('invoice_type','');
record.set('invoice_type_n','');
record.getField('invoice_type').setReadOnly(false);
record.getField('invoice_type_n').setReadOnly(false);
record.getField('invoice_type').setRequired(true);
record.getField('invoice_type_n').setRequired(true);
record.getField('reception_maile').setRequired(true);
}
}else if (value == 'NO_BILLING'){//暂时不开票
......@@ -759,88 +763,39 @@
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}
}
if (record.get('bp_class') == 'NP') {
//开票
if (value == 'BILLING') {
//一般纳税人
if( record.get('taxpayer_type') == 'GENERAL_TAXPAYER'){
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}
if(record.get('taxpayer_type') == 'SMALL_SCALE_TAXPAYER'){
//小规模纳税人
record.set('invoice_type','');
record.set('invoice_type_n','');
record.getField('invoice_type').setReadOnly(false);
record.getField('invoice_type_n').setReadOnly(false);
record.getField('invoice_type').setRequired(true);
record.getField('invoice_type_n').setRequired(true);
record.getField('reception_maile').setRequired(true);
}
}else if (value == 'NO_BILLING'){//暂时不开票
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}
}
}
//纳税人类型
if (name == 'taxpayer_type' && value) {
if (record.get('bp_class') == 'ORG') {
if (value == 'SMALL_SCALE_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(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
record.set('invoice_type','');
record.set('invoice_type_n','');
record.getField('invoice_type').setReadOnly(false);
record.getField('invoice_type_n').setReadOnly(false);
record.getField('invoice_type').setRequired(true);
record.getField('invoice_type_n').setRequired(true);
record.getField('reception_maile').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('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);
record.set('invoice_type','ECT');
record.set('invoice_type_n','电子发票');
record.getField('invoice_type').setRequired(true);
record.getField('invoice_type_n').setRequired(true);
record.getField('invoice_type').setReadOnly(false);
record.getField('invoice_type_n').setReadOnly(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);
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}
}else if (value == 'GENERAL_TAXPAYER') {
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('invoice_type').setRequired(false);
record.getField('invoice_type_n').setRequired(false);
record.getField('reception_maile').setRequired(false);
if (record.get('invoice_method') == 'BILLING'){
record.getField('taxpayer_type').setRequired(true);
record.getField('taxpayer_type_n').setRequired(true);
......@@ -851,12 +806,6 @@
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(true);
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}else if ( record.get('invoice_method') == 'NO_BILLING'){
record.getField('taxpayer_type').setRequired(true);
......@@ -868,12 +817,6 @@
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}
}
}
......
......@@ -32,36 +32,40 @@
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('taxpayer_type') != 'GENERAL_TAXPAYER'){
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}
}
}
if (record.get('bp_class') == 'NP') {
if (value == 'NO_BILLING') {
if (record.get('taxpayer_type') != 'GENERAL_TAXPAYER') {
//设置开票类型为纸质只读
record.set('invoice_type', 'PAPER');
record.set('invoice_type_n', '纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}
}
}
}
if(record.get('taxpayer_type') == 'GENERAL_TAXPAYER'){
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
if(!record.get('invoice_type')){
if(record.get('taxpayer_type') == 'GENERAL_TAXPAYER'){
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('invoice_type').setRequired(false);
record.getField('invoice_type_n').setRequired(false);
record.getField('reception_maile').setRequired(false);
}else if(record.get('taxpayer_type') == 'SMALL_SCALE_TAXPAYER'){
record.set('invoice_type','ECT');
record.set('invoice_type_n','电子发票');
record.getField('invoice_type').setRequired(true);
record.getField('invoice_type_n').setRequired(true);
record.getField('invoice_type').setReadOnly(false);
record.getField('invoice_type_n').setReadOnly(false);
}
}else {
if(record.get('taxpayer_type') == 'GENERAL_TAXPAYER'){
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('invoice_type').setRequired(false);
record.getField('invoice_type_n').setRequired(false);
record.getField('reception_maile').setRequired(false);
}else if(record.get('taxpayer_type') == 'SMALL_SCALE_TAXPAYER'){
record.getField('invoice_type').setRequired(true);
record.getField('invoice_type_n').setRequired(true);
record.getField('invoice_type').setReadOnly(false);
record.getField('invoice_type_n').setReadOnly(false);
}
}
if(record.get('bp_class') == 'NP'){
document.getElementById('${/parameter/@layout_code}_submit_approval').style.display = "none";
......@@ -108,12 +112,6 @@
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(true);
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}else if(record.get('taxpayer_type') == 'SMALL_SCALE_TAXPAYER'){
//小规模纳税人
record.getField('taxpayer_type').setRequired(true);
......@@ -125,13 +123,6 @@
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
record.set('invoice_type','');
record.set('invoice_type_n','');
record.getField('invoice_type').setReadOnly(false);
record.getField('invoice_type_n').setReadOnly(false);
record.getField('invoice_type').setRequired(true);
record.getField('invoice_type_n').setRequired(true);
record.getField('reception_maile').setRequired(true);
}
}else if (value == 'NO_BILLING'){//暂时不开票
......@@ -145,89 +136,31 @@
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}
}
//add by lihh 20210408 开票类型取值逻辑
if (record.get('bp_class') == 'NP') {
//开票
if (value == 'BILLING') {
//一般纳税人
if( record.get('taxpayer_type') == 'GENERAL_TAXPAYER'){
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}
if(record.get('taxpayer_type') == 'SMALL_SCALE_TAXPAYER'){
//小规模纳税人
record.set('invoice_type','');
record.set('invoice_type_n','');
record.getField('invoice_type').setReadOnly(false);
record.getField('invoice_type_n').setReadOnly(false);
record.getField('invoice_type').setRequired(true);
record.getField('invoice_type_n').setRequired(true);
record.getField('reception_maile').setRequired(true);
}
}else if (value == 'NO_BILLING'){//暂时不开票
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}
}
}
if (name == 'taxpayer_type' && value) {
if (record.get('bp_class') == 'ORG') {
if (value == 'SMALL_SCALE_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(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
record.set('invoice_type','');
record.set('invoice_type_n','');
record.getField('invoice_type').setReadOnly(false);
record.getField('invoice_type_n').setReadOnly(false);
record.getField('invoice_type').setRequired(true);
record.getField('invoice_type_n').setRequired(true);
record.getField('reception_maile').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);
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}
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);
record.getField('invoice_type').setRequired(true);
record.getField('invoice_type_n').setRequired(true);
record.getField('invoice_type').setReadOnly(false);
record.getField('invoice_type_n').setReadOnly(false);
}else if (value == 'GENERAL_TAXPAYER') {
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('invoice_type').setRequired(false);
record.getField('invoice_type_n').setRequired(false);
record.getField('reception_maile').setRequired(false);
if (record.get('invoice_method') == 'BILLING'){
record.getField('taxpayer_type').setRequired(true);
record.getField('taxpayer_type_n').setRequired(true);
......@@ -238,12 +171,6 @@
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(true);
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}else if ( record.get('invoice_method') == 'NO_BILLING'){
record.getField('taxpayer_type').setRequired(true);
......@@ -255,12 +182,6 @@
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}
}
}
......
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