Commit d440b624 authored by 18083's avatar 18083

全电发票商业伙伴开票处改造

parent 2dd009d1
......@@ -262,8 +262,8 @@
//设置开票类型为纸质只读
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').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);
......@@ -495,6 +495,13 @@
}
}
}
//若选择开票类型为“纸质发票”,则系统校验无法选择“是否全电发票”为“是” 18083 2022/11/30
if (head_record.get('invoice_type')=='PAPER'){
if(head_record.get('full_elec_invoice_flag')=='Y'){
Leaf.showErrorMessage('${l:PROMPT}', '开票类型为纸质发票,不能选择【是否全电发票】为是');
return false;
}
}
var role_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
var role_records = $(role_ds_id).getAll();
var role_flag=true;
......@@ -944,8 +951,9 @@
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
//取消开票类型为纸质只读 18083 2022/11/30
//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);
......@@ -975,10 +983,15 @@
}
}
if(name == 'invoice_type'){
//设置是否全电发票默认值 18083 2022/11/30
if(value == 'PAPER'){
record.getField('reception_maile').setRequired(false);
record.set('full_elec_invoice_flag','N');
record.set('full_elec_invoice_flag_n','否');
}else{
record.getField('reception_maile').setRequired(true);
record.set('full_elec_invoice_flag','Y');
record.set('full_elec_invoice_flag_n','是');
}
}
}
......
......@@ -40,8 +40,9 @@
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
//取消一般纳税人开票类型为只读 18083 2022/11/30
//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);
......@@ -55,8 +56,9 @@
}
}else {
if(record.get('taxpayer_type') == 'GENERAL_TAXPAYER'){
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
//取消一般纳税人开票类型为只读 18083 2022/11/30
//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);
......@@ -156,8 +158,9 @@
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);
//设置开票类型为纸质只读 18083 2022/11/30
//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);
......@@ -187,10 +190,15 @@
}
}
if(name == 'invoice_type'){
//设置是否全电发票默认值 18083 2022/11/30
if(value == 'PAPER'){
record.getField('reception_maile').setRequired(false);
record.set('full_elec_invoice_flag','N');
record.set('full_elec_invoice_flag_n','否');
}else{
record.getField('reception_maile').setRequired(true);
record.set('full_elec_invoice_flag','Y');
record.set('full_elec_invoice_flag_n','是');
}
}
};
......@@ -271,6 +279,19 @@
return value;
}
};
//保存前调用 18083 2022/11/30
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
var head_record = $(ds_id).getCurrentRecord();
//若选择开票类型为“纸质发票”,则系统校验无法选择“是否全电发票”为“是”
if (head_record.get('invoice_type')=='PAPER'){
if(head_record.get('full_elec_invoice_flag')=='Y'){
Leaf.showErrorMessage('${l:PROMPT}', '开票类型为纸质发票,不能选择【是否全电发票】为是');
return false;
}
}
}
// 提交审批
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');
......
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