Commit cb6e934e authored by lijingjing's avatar lijingjing

Merge branch 'contract' into develop

parents f3c5b04b 2c2f1265
......@@ -17,5 +17,15 @@
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
con_contract_workflow_pkg.contract_incept_submit(
p_contract_id =>${@contract_id},
p_user_id => ${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
var add_datafilters = [
{
name:'contract_status',
expression:"t1.contract_status not in ('NEW','SIGN_RETURN')"
},
{
name : 'authority',
expression : "(exists (select 1 from aut_trx_user_authorize a1, aut_owner_user_authorize a2 where a1.trx_category = 'CONTRACT' and a1.trx_id = t1.contract_id and trunc(sysdate) between a1.start_date and nvl(a1.end_date, trunc(sysdate)) and a1.user_id = a2.owner_user_id and a1.trx_category = a2.trx_category and a2.authorized_user_id = ${/session/@user_id} and trunc(sysdate) between a2.start_date and nvl(a2.end_date, trunc(sysdate))))"
}
];
add_datafilter();
\ No newline at end of file
var add_datafilters = [
{
name: 'document_type',
expression: "t1.document_type = 'CARCON'"
},
{
name : 'authority',
expression : "(exists (select 1 from aut_trx_user_authorize a1, aut_owner_user_authorize a2 where a1.trx_category = 'CONTRACT' and a1.trx_id = t1.contract_id and trunc(sysdate) between a1.start_date and nvl(a1.end_date, trunc(sysdate)) and a1.user_id = a2.owner_user_id and a1.trx_category = a2.trx_category and a2.authorized_user_id = ${/session/@user_id} and trunc(sysdate) between a2.start_date and nvl(a2.end_date, trunc(sysdate))))"
}
];
add_datafilter();
\ No newline at end of file
......@@ -18,7 +18,7 @@
function open_contract_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
if(record.get('contract_status')=='NEW' || record.get('contract_status')=='REJECT'){
if(record.get('contract_status')=='NEW' || record.get('contract_status')=='SIGN_RETURN'){
param['function_code'] = 'CON301MM';
param['function_usage'] = 'MODIFY';
}
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: xuls
$Date: 2017-4-21 下午01:54:29
$Revision: 1.0
$Purpose: 合同维护入口界面
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:view>
<a:link id="con311_create_entrusts_link" model="cont.CON311.create_entrusts" modelaction="execute"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}zj_wfl_approve_history_check" url="${/request/@context_path}/modules/zjwfl/zj_wfl_approve_history_check.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="con_contract_modify_link" url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_modify.lview"/>
<a:link id="${/parameter/@layout_code}con_contract_query_link"
url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_modify.lview"/>
<a:link id="car_modify_special_link" url="${/request/@context_path}/modules/prj/PRJ500N/prj_project_create_special.lview"/>
<script type="text/javascript"><![CDATA[
function open_contract_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
if(record.get('contract_status')=='SIGNING' || record.get('contract_status')=='INCEPT_RETURN'||record.get('contract_status')=='SIGN'){
param['function_code'] = 'CON3200N';
param['function_usage'] = 'MODIFY';
}
else{
param['function_code'] = 'CON3200Q';
param['function_usage'] = 'QUERY';
}
param['winid'] = 'con_contract_modify_win_id';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}con_contract_query_link', ds_id);
}
function open_project_Window(record_id, ds_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
param['company_id'] = record.get('company_id');
param['project_id'] = record.get('project_id');
param['function_usage'] = 'QUERY';
param['function_code'] = 'PRJ501_WFL';
param['bp_class'] = record.get('bp_class');
param['maintain_type'] = 'QUERY';
/* param['window_open_flag'] = 'Y';
param['show_history_flag'] = 'Y'; */
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'car_modify_special_link', ds_id, '${/parameter/@layout_code}');
}
function open_bs_Window(record_id, ds_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
param['function_code'] = 'CON301BS';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'QUERY';
param['contract_id'] = record.get('contract_id');
param['url_title'] = 'BS明细';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link', ds_id);
}
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
if (name == 'contract_number' && value) {
return '<a href="javascript:open_contract_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + value + '</a>';
}
if (name == 'project_id_c' && value) {
return '<a href="javascript:open_project_Window(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
}
if (name == 'bs_link') {
return '<a href="javascript:open_bs_Window(\'' + record.id + '\',\'' + record.ds.id + '\')">明细</a>';
}
return value;
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
if (ds == $(ds_id)) {
aut_authority_list_validate_query(ds, qpara);
}
};
//单据跟踪
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() {
// var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
// var records = $('prj_project_ds_id').getSelected();
var ds = $('CONTRACT_QUERY_ENTRANCE_G_CONTRACT_RESULT_con_contract_ds');
var records = ds.getSelected();
if (records.length != 1) {
Leaf.showMessage('提示', '请选择一条数据!');
return;
}
var instance_id = records[0].get('wfl_instance_id');
var win = new Leaf.Window({
id: 'history_check',
url: $('${/parameter/@layout_code}${/parameter/@pre_layout}zj_wfl_approve_history_check').getUrl(),
params: {
instance_id: instance_id
},
title: '单据历史查看',
height: 500,
width: 860,
fullScreen: true
});
};
//合同文本打印
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var records = $(ds_id).getSelected();
for (var i = 0;i < records.length;i++) {
var param = records[i].data;
param['function_code'] = 'CON311D';
if(records[i].data.contract_status=='NEW'){
param['maintain_type'] = 'UPDATE';
param['function_usage'] = 'UPDATE';
param['query_only'] = 'N';
}
else{
param['maintain_type'] = 'QUERY';
param['function_usage'] = 'QUERY';
param['query_only'] = 'Y';
}
param['winid'] = 'con_contract_modify_link_winid';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link', ds_id);
}
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&amp;function_code=CON501"/>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
......@@ -78,13 +78,13 @@
Leaf.Masker.mask(document.documentElement, '${l:HLS.LOADING}');
function hls_hls500_save(nextStep, source_procedure) {
Leaf.request({
url: $('prj_check_prj_record_link_id').getUrl(),
para: {
'project_id': '${/parameter/@document_id}'
},
success: function(res) {
var secondary_lease = res.result.secondary_lease;
var payment_deduction = res.result.payment_deduction;
var price_list = res.result.price_list;
......@@ -106,14 +106,17 @@
return;
}
}
if(price_list=='DS_PRICE_10'){
if(payment_deduction!='TRADE_IN'){
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
var record = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0;i < temp_head_records.length;i++) {
if(temp_head_records[i].get('column_code')=='H109') {
temp_head_records[i].set('column_value',0);
// temp_head_records[i].set('column_value_c',0);
if(record[i].get('column_code')=='H109') {
record[i].set('column_value',0);
record[i].set('column_value_c',0);
var a= document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id);
console.log(a);
document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id).innerHTML=0;
document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id).title=0;
}
}
}else{
......@@ -133,6 +136,7 @@
}
}
lock_calc_current_window('${l:HLS.SAVING}');
if (!$('hls_fin_calculator_hd_ds').validate() || !$('hls_fin_calculator_ln_ds').validate()) {
unlock_calc_current_window();
......@@ -230,6 +234,7 @@
}
function calc_execute(source_procedure) {
var final_recreate_H_formula, final_recreate_L_formula;
if (source_procedure == 'RE_CALC') {
final_recreate_H_formula = 'Y';
......@@ -629,7 +634,6 @@
}
function do_hls500_head_update(ds, record, name, value, old_value) {
if (record.get('column_code') == 'H54' ) {
var sum=record.get('column_value')-4.75
if(sum<0){
......
......@@ -41,7 +41,7 @@
<a:link id="prj_approval_link_id" model="prj.PRJ501N.project_approval" modelaction="update"/>
<a:link id="check_prj_lease_item_link_id" model="prj.PRJ501N.project_approval" modelaction="execute"/>
<script type="text/javascript"><![CDATA[
alert('${/parameter/@division}')
// alert('${/parameter/@division}')
//add by zhuxianfei
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
......@@ -361,8 +361,8 @@
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var bp_ds_ids = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1','prj_project');
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP','prj_project_bp');
var prj_project_lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR','prj_project_lease_item');
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'T_HISTORY_INGO', 'hls_bp_master');
var cdd_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
var virtual_ds_id = '${/parameter/@layout_code}_virtual_ds';
......@@ -370,6 +370,7 @@
$(cdd_item_ds_id).query();
$(bp_ds_id).query();
$(tenant_ds_id).query();
$(prj_project_lease_item_ds_id).query();
}
......
......@@ -189,6 +189,7 @@
fullScreen: true,
draggable: true
});
win.on('close', function () {
$(quotation_ds_id).query();
$(history_ds_id).query();
......@@ -233,6 +234,7 @@
draggable: true
});
win.on('close', function () {
debugger;
$(quotation_ds_id).query();
$(history_ds_id).query();
});
......@@ -283,6 +285,7 @@
draggable: true
});
win.on('close', function () {
$(quotation_ds_id).query();
$(history_ds_id).query();
......@@ -439,7 +442,7 @@ function prj501n_contract_number_renderer(id, name, query_only){
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var bp_ds_ids = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1','prj_project');
var prj_project_lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR','prj_project_lease_item');
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP','prj_project_bp');
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'T_HISTORY_INGO', 'hls_bp_master');
var cdd_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
......@@ -448,6 +451,7 @@ function prj501n_contract_number_renderer(id, name, query_only){
$(cdd_item_ds_id).query();
$(bp_ds_id).query();
$(tenant_ds_id).query();
$(prj_project_lease_item_ds_id).query();
}
......
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