Commit bacffc18 authored by Darming's avatar Darming

Merge branch 'develop' of https://hel.hand-china.com/hlcm/leaf-hlcm into feature/csh_write_off

parents 6a06e2ff 2ba5c2f8
......@@ -22,16 +22,8 @@
<script type="text/javascript"><![CDATA[
jQuery.noConflict();
// Leaf.onReady(function () {
// if ('${/parameter/@function_code}' == 'CON1020_C_R' && ('${/parameter/@status}' == 'APPROVED' || '${/parameter/@status}' == 'APPROVING')) {
// $('${/parameter/@layout_code}_user_button3').hide();
// }
// });
var save_flag=false;
Leaf.onReady(function(){
var ds_id1 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_case_record');
console.log(ds_id1)
})
function open_detail_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
if (record.dirty || !record.data.contract_id) {
......@@ -75,6 +67,12 @@
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id1 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_case_record');
if(!$(ds_id1).validate()){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
var record1 = $(ds_id1).getCurrentRecord();
if (!record1.get('penalty_batch_number')) {
Leaf.request({
......@@ -83,6 +81,11 @@
success: function (res) {
var penalty_batch_number = res.result.penalty_batch_number;
record1.set('penalty_batch_number', penalty_batch_number);
save_flag=true;
var root_ds = $('${/parameter/@layout_code}_virtual_ds');
if (root_ds) {
root_ds.submit();
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// var root_ds = $('${/parameter/@layout_code}_virtual_ds');
// if (root_ds) {
......@@ -113,21 +116,25 @@
getXml();
$('${/parameter/@layout_code}_user_button1').disable();
/* $('${/parameter/@layout_code}_user_button1').disable();
$('${/parameter/@layout_code}_user_button2').disable();
$('${/parameter/@layout_code}_user_button3').disable();
$('${/parameter/@layout_code}_user_button4').disable();
$('${/parameter/@layout_code}_user_button4').disable();*/
};
function getXml() {
var req_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_case_record');
var req_record = $(req_ds_id).getCurrentRecord();
var record_id = req_record.get('record_id');
if (req_record.dirty) {
Leaf.showMessage('${l:HLS.PROMPT}', '页面数据存在修改,请先保存再发起起案!');
var req_record = $(req_ds_id).getAt(0);
console.log(req_record)
var record_id = req_record.data.record_id;
debugger
if (!record_id) {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存再提交数据!');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
//检验必须字段
/*小额不用审批直接通过*/
//将小额审批改为工作工作流审批
//所有的单据都默认为小额审批
......@@ -139,7 +146,10 @@
success: function (res) {
// var v_status = res.result.v_status;
//if (v_status == 1) {
Leaf.showMessage('${l:PROMPT}', '提交成功');
Leaf.SideBar.show({
msg: '取消成功',
duration: 2000
});
//}
/*else {
Leaf.request({
......@@ -161,6 +171,7 @@
});
}*/
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']();
......@@ -232,7 +243,7 @@
duration: 2000
});
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
},
failure: function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
......@@ -278,7 +289,8 @@
duration: 2000
});
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']();
},
......
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