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