Commit da6ab3f7 authored by 38823's avatar 38823

商业伙伴创建将生成编码规则的逻辑放到保存前

parent f7f8c93a
......@@ -13,7 +13,7 @@
</bm:parameters>
<bm:update-sql><![CDATA[
begin
hls_bp_master_pkg.update_bp_master_code(p_bp_id => ${@bp_id},
hls_bp_master_pkg.update_bp_master_code(p_bp_type => ${@bp_type},
p_user_id =>${/session/@user_id},
p_document_number =>${@document_number});
end;
......
......@@ -505,6 +505,7 @@
//
// };
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
debugger;
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var head_record = $(ds_id).getCurrentRecord();
......@@ -513,6 +514,31 @@
var file_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
var file_record = $(file_ds_id).getAll();
var bank_flag=true;
var check_flag=true;
//保存前生成商业伙伴编码
if(Ext.isEmpty(head_record.get('bp_code'))){
Leaf.request({
url: $('get_special_fields_link_id').getUrl(),
para: {
bp_type: head_record.get('bp_type')
},
success: function (res) {
var document_number = res.result.document_number;
head_record.set('bp_code', document_number);
check_flag = true;
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true,
scope: this
});
}
//校验银行账户必须与商业伙伴名称一致 18083 2023/9/5
var bp_name=head_record.get('bp_name');
var bank_flag1=true;
......@@ -715,31 +741,31 @@
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var head_record = $(ds_id).getCurrentRecord();
if (!head_record.get('bp_code')) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('get_special_fields_link_id').getUrl(),
para: {
bp_id: head_record.get('bp_id')
},
success: function (res) {
var document_number = res.result.document_number;
head_record.set('bp_code', document_number);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true,
scope: this
});
}
$(ds_id).setQueryParameter('bp_id', head_record.get('bp_id'));
$(ds_id).query();
// if (!head_record.get('bp_code')) {
// window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
// Leaf.request({
// url: $('get_special_fields_link_id').getUrl(),
// para: {
// bp_id: head_record.get('bp_id')
// },
// success: function (res) {
// var document_number = res.result.document_number;
// head_record.set('bp_code', document_number);
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
//
// },
// error: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// failure: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// sync: true,
// scope: this
// });
// }
// $(ds_id).setQueryParameter('bp_id', head_record.get('bp_id'));
// $(ds_id).query();
//add by zc
var signer_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_signer');
if(head_record.get('bp_id')){
......
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