Commit 02da46fe authored by 陆正友's avatar 陆正友

Merge remote-tracking branch 'origin/remote_dev' into remote_dev

parents 79b40b79 78d1f4fd
......@@ -112,7 +112,16 @@
p_ref_d03=>to_date(${@ref_d03},'yyyy-mm-dd hh24:mi:ss'),
p_ref_d04=>to_date(${@ref_d04},'yyyy-mm-dd hh24:mi:ss'),
p_ref_d05=>to_date(${@ref_d05},'yyyy-mm-dd hh24:mi:ss'),
p_int_rate_display=>v_int_rate_display,
p_lease_item_amount=>${@lease_item_amount},
p_insurance_fee =>${@insurance_fee},
p_int_rate_display=>${@int_rate_display},
p_deposit_ratio=>${@deposit_ratio},
p_first_pay_date=>to_date(${@first_pay_date},'yyyy-mm-dd hh24:mi:ss'),
p_pmt=>${@pmt},
p_hd_user_col_d01=>to_date(${@hd_user_col_d01},'yyyy-mm-dd hh24:mi:ss'),
p_deposit=>${@deposit},
p_lease_term_month=>${@lease_term_month},
p_total_rental=>${@total_rental},
p_btb_int_rate=>${@btb_int_rate},
p_hd_user_col_v06=>${@hd_user_col_v06}
);
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: WW
$Date: 2014-11-13 下午5:36:09
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT t1.user_id,t1.user_name FROM sys_user t1 #WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="user_id" queryExpression="t1.user_id=${@user_id}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: weiwuzhen
$Date: 2016-5-5 下午3:45:05
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select *
from prj_project_bp_operat_lv p
where p.project_id=${@project_id}
and p.bp_category='RENTER'
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023-11-1 下午04:17:01
$Revision: 1.0
$Purpose: 采购单报价信息
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[SELECT T1.* FROM (SELECT * FROM prj_quotation a) T1 #WHERE_CLAUSE#]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="document_id" queryExpression="t1.document_id=${@document_id} and t1.document_category=&apos;PROJECT&apos;"/>
</bm:query-fields>
</bm:model>
......@@ -13,6 +13,8 @@
modelaction="update"/>
<a:link id="csh501_csh_payment_req_link1_id"
url="${/request/@context_path}/modules/csh/CSH501/csh_payment_req.lview"/>
<a:link id="csh501_csh_payment_req_op_link1_id"
url="${/request/@context_path}/modules/csh/CSH501/csh_payment_op_req.lview"/>
<a:link id="delete_payment_req_link_id" model="csh.CSH501.delete_payment_req" modelaction="batch_update"/>
<script type="text/javascript"><![CDATA[
Leaf.onReady(function () {
......@@ -227,6 +229,8 @@
function detail_link(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
//跳转根据产品线区分经营性租赁 18083 2023/10/10
var division_diff = record.get('division_diff');
var param = {};
param['payment_req_id'] = record.get('payment_req_id');
param['document_category'] = record.get('document_category');
......@@ -246,7 +250,16 @@
} else if (record.get('business_type') == 'PREPAYMENT') {
param['function_code'] = 'CSH501_PRE_D';
}
if(division_diff=='95'){
if (record.get('approval_status') == 'NEW' || record.get('approval_status') == 'RETURN' || record.get('approval_status') == 'REJECT') {
param['function_usage'] = 'UPDATE';
param['function_code'] = 'CSH501H_OP';
} else {
param['function_usage'] = 'QUERY';
param['function_code'] = 'CSH501Q_OP';
param['download'] = 'Y';
}
}else{
if (record.get('approval_status') == 'NEW' || record.get('approval_status') == 'RETURN' || record.get('approval_status') == 'REJECT') {
param['function_usage'] = 'UPDATE';
param['function_code'] = 'CSH501D';
......@@ -255,6 +268,7 @@
param['function_code'] = 'CSH501Q';
param['download'] = 'Y';
}
}
param['winid'] = 'csh_payment_update_window';
param['url_title'] = '付款申请';
if (record.get('ln_cf_item') == 0) {
......@@ -262,9 +276,12 @@
} else {
param['cond_para1'] = 'OTHER';
}
if(division_diff=='95'){
hls_doc_get_layout_code('get_layout_code_link_id', param, 'csh501_csh_payment_req_op_link1_id', ds_id, '${/parameter/@layout_code}');
}else{
hls_doc_get_layout_code('get_layout_code_link_id', param, 'csh501_csh_payment_req_link1_id', ds_id, '${/parameter/@layout_code}');
}
}
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
......
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023-9-28 下午03:50:31
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select rownum, v.*
from (select
(select cc.contract_number
from con_contract cc
where cc.contract_id =
con_contract_pkg.get_first_contract_id(c.project_id)) contract_number,
(select cc.search_term_1
from con_contract cc
where cc.contract_id =
con_contract_pkg.get_first_contract_id(c.project_id)) vender_contract_number,
(select pp.project_number from prj_project pp where pp.project_id=c.project_id) project_number,
c.contract_id,
c.bp_id_tenant,
c.project_id,
(select b.bp_name
from con_contract_bp b
where b.contract_id = c.contract_id
and b.bp_category = 'TENANT') bp_id_tenant_n,
hbm.bp_name,
(select cph.payment_req_number
from csh_payment_req_hd cph
where cpr.payment_req_id = cph.payment_req_id) payment_req_number,
cpr.ref_doc_line_id cashflow_id,
(select times
from con_contract_cashflow ccc
where ccc.cashflow_id = cpr.ref_doc_line_id) times,
(select ccc.due_amount
from con_contract_cashflow ccc
where ccc.cashflow_id = cpr.ref_doc_line_id) due_amount,
(select description
from hls_cashflow_item hci, con_contract_cashflow ccc
where hci.cf_item = ccc.cf_item
and hci.cf_type = ccc.cf_type
and ccc.cashflow_id = cpr.ref_doc_line_id) CF_DESCRIPTION,
cpr.vender_name vender_name,
cpr.vender_bank_account_id,
cpr.vender_bank_account_number vender_bank_account_number,
cpr.vender_bank_account_number vender_bank_account_number_n,
cpr.vender_bank_account_name vender_bank_account_name,
cpr.vender_bank_full_name vender_bank_full_name,
cpr.amount,
c.lease_item_amount,
--发票状态
acp_invoice_pkg.return_invoice_status(p_contract_id => c.contract_id) invoice_status_n,
(SELECT gc.currency_name
FROM gld_currency_v gc
WHERE gc.currency_code = cpr.currency_code) currency_name,
cpr.payment_req_ln_id,
cpr.payment_req_id,
cpr.payment_req_ln_type,
cpr.ref_doc_id,
cpr.ref_doc_line_id,
cpr.ref_doc_category,
c.division,
(select pp.ref_d10 from prj_project pp where pp.project_id=c.project_id) due_date,
(select count(*)
from prj_project_lease_item pp
where pp.project_id=c.project_id
) lease_item_count,
(select nvl(sum(nvl(pp.ACTUAL_PRICE, 0) * nvl(pp.BALLOON_RATIO,0)),0)
from prj_project_lease_item pp
where pp.project_id=c.project_id
) insurance_fee,
cpr.insurance_fee_ddct
from csh_payment_req_ln cpr,
con_contract c,
hls_bp_master hbm,
con_contract_cashflow ccc
where cpr.ref_doc_category = 'CONTRACT'
and c.contract_id = cpr.ref_doc_id
and hbm.bp_id = c.bp_id_tenant
AND ccc.contract_id = c.contract_id
AND ccc.cf_item = 0) v
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="v.payment_req_id =${@payment_req_id}"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023-9-26 下午03:42:50
$Revision: 1.0
$Purpose: 经营性租赁付款采购单查询
-->
<bm:model xmlns:s="leaf.plugin.script" xmlns:f="leaf.database.features"
xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select *
from (SELECT t.contract_id,
--con_contract_pkg.get_first_contract_id(t.project_id) contract_id,
(select cc.contract_number
from con_contract cc
where cc.contract_id =
con_contract_pkg.get_first_contract_id(t.project_id)) contract_number,
(select cc.search_term_1
from con_contract cc
where cc.contract_id =
con_contract_pkg.get_first_contract_id(t.project_id)) vender_con_number,
(select cc.contract_status
from con_contract cc
where cc.contract_id =
con_contract_pkg.get_first_contract_id(t.project_id)) contract_status,
(select sc.code_value_name
from con_contract cc, sys_code_values_v sc
where sc.code_value = cc.contract_status
and sc.code = 'CON500_CONTRACT_STATUS'
and cc.contract_id =
con_contract_pkg.get_first_contract_id(t.project_id)) contract_status_desc,
f.cashflow_id,
f.times,
t.bp_id_tenant,
hbm.bp_id tenant_bp_id,
h.description cf_item_desc,
h.cf_item,
f.due_amount,
--发票状态
acp_invoice_pkg.return_invoice_status(p_contract_id => t.contract_id) invoice_status_n,
to_char(f.due_date, 'yyyy-mm-dd') due_date,
nvl(f.received_amount, 0) received_amount,
nvl(f.due_amount, 0) - nvl(f.received_amount, 0) residual_amount,
(nvl((SELECT SUM(l.amount_paid)
FROM csh_payment_req_ln l, csh_payment_req_hd h
WHERE l.ref_doc_line_id = f.cashflow_id
AND l.payment_req_id = h.payment_req_id
AND h.submitted_flag = 'Y'
AND h.approval_status = 'APPROVED'
AND nvl(h.closed_flag, 'N') = 'Y'),
0) +
nvl((SELECT SUM(l.amount)
FROM csh_payment_req_ln l, csh_payment_req_hd h
WHERE l.ref_doc_line_id = f.cashflow_id
AND l.payment_req_id = h.payment_req_id
AND h.submitted_flag = 'Y'
AND h.approval_status = 'APPROVED'
AND nvl(h.closed_flag, 'N') <> 'Y'),
0) +
nvl((SELECT SUM(l.amount)
FROM csh_payment_req_ln l, csh_payment_req_hd h
WHERE l.ref_doc_line_id = f.cashflow_id
AND l.payment_req_id = h.payment_req_id
AND h.submitted_flag = 'Y'
AND h.approval_status = 'APPROVING'),
0)) applied_pay_amount,
(select pp.project_number
from prj_project pp
where pp.project_id = t.project_id) project_number,
(select bp.bp_name
from hls_bp_master bp, prj_project p
where bp.bp_id = p.bp_id_tenant
and p.project_id = t.project_id) vender_name_n,
(select nvl(sum(li.ACTUAL_PRICE), 0)
from prj_project_lease_item li
where li.project_id = t.project_id) lease_item_amount,
(select count(1)
from prj_project_lease_item li
where li.project_id = t.project_id) lease_item_count,
(select to_char(p.ref_d10, 'yyyy-mm-dd')
from prj_project p
where p.project_id = t.project_id) plan_order_date,
(SELECT nvl(sum(nvl(li.ACTUAL_PRICE, 0) *
nvl(li.BALLOON_RATIO, 0)),
0)
from prj_project_lease_item li
where li.project_id = t.project_id) insurance_fee
FROM con_contract_cashflow f,
hls_cashflow_item h,
hls_bp_master hbm,
con_contract t
WHERE t.contract_id = f.contract_id
and t.bp_id_tenant = hbm.bp_id(+)
AND f.cf_item = h.cf_item(+)
AND h.cf_direction(+) = 'OUTFLOW'
AND f.write_off_flag <> 'FULL'
AND f.cf_status IN ('RELEASE', 'BLOCK')
AND f.cf_direction = 'OUTFLOW'
and t.business_type = 'OTHERS'
and t.document_type = 'PUR_ORDER'
and t.division='95'
AND nvl(t.contract_status,'NEW') = 'INCEPT'
AND NOT EXISTS(SELECT 1
FROM csh_payment_req_ln l, csh_payment_req_hd hd
WHERE l.ref_doc_line_id = f.cashflow_id
AND l.ref_doc_category = 'CONTRACT'
and l.payment_req_id = hd.payment_req_id
and hd.approval_status in
('NEW', 'REJECT', 'APPROVED', 'APPROVING', 'RETURN'))
AND t.data_class = 'NORMAL'
AND ('Y' = 'Y' AND EXISTS
(SELECT 1
FROM aut_trx_user_authorize a1, aut_owner_user_authorize a2
WHERE a1.trx_category = 'CONTRACT'
AND a1.trx_id = con_contract_pkg.get_first_contract_id(t.project_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))))
AND f.cf_item in (0)) t1
#WHERE_CLAUSE#
#ORDER_BY_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="project_number"
queryExpression="t1.project_number like &apos;%&apos;||${@project_number}||&apos;%&apos;"/>
<bm:query-field name="plan_order_date_from"
queryExpression="t1.plan_order_date &gt;= ${@plan_order_date_from}"/>
<bm:query-field name="plan_order_date_to"
queryExpression="t1.plan_order_date &lt;= ${@plan_order_date_to}"/>
<bm:query-field name="lease_item_amount"
queryExpression="t1.due_amount&gt;=${@lease_item_amount}"/>
<bm:query-field name="vender_con_number" queryExpression="t1.vender_con_number=${@vender_con_number}"/>
<bm:query-field name="invoice_status_n"
queryExpression="t1.invoice_status_n like &apos;%&apos;||${@invoice_status_n}||&apos;%&apos;"/>
<bm:query-field name="contract_number" queryExpression="t1.contract_number=${@contract_number}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<a:model-update model="hls.HLS811.hls_doc_file_templet_get_atm"/>
<s:server-script import="contract_print_path.js"><![CDATA[
importPackage(java.io);
importPackage(Packages.hls.plugin.docx4j);
importPackage(Packages.leaf.plugin.word2pdf);
importPackage(Packages.org.apache.commons.io);
//删除文件
function deleteFile(filePath) {
var file = new File(filePath);
if (file.exists()) {
file.delete();
}
}
//生成pdf
function wordToPdf(word_file_path,pdf_file_path) {
// word转pdf
var pdf_file_path_new = pdf_file_path + '.pdf';
var wordToPdf = new WordToPdf($instance('uncertain.ocm.IObjectRegistry'), "jacob-1.19-x64.dll");
wordToPdf.word2pdf(word_file_path, pdf_file_path_new);
//删除word文件
//deleteFile(word_file_path);
return pdf_file_path_new;
}
function copyFile(fOld, fNew) {
var fis = new java.io.FileInputStream(fOld);
var fos = new java.io.FileOutputStream(fNew);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 4);
var len = -1;
while ((len = fis.read(b)) != -1) {
fos.write(b, 0, len);
}
fis.close();
fos.close();
}
function transfer(file_path, os) {
println(file_path);
var fis = new FileInputStream(file_path);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 64);
var len = -1;
while ((len = fis.read(b)) != -1) {
os.write(b, 0, len);
}
fis.close();
}
function write_os_to_file(file, os) {
var fis = new FileInputStream(file);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 64);
var len = -1;
while ((len = fis.read(b)) != -1) {
os.write(b, 0, len);
}
fis.close();
}
function download_file(file_name, file_path) {
$ctx["__request_type__"] = 'file'; //to indicate this request is not a JSON_REQUEST
var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
resp.setHeader("Pragma", "No-cache");
resp.setHeader("Cache-Control", "no-cache, must-revalidate");
resp.setDateHeader("Expires", 0);
resp.setContentType("application/x-msdownload");
resp.setHeader("Content-disposition", "attachment; filename=" + encodeURI(file_name, 'UTF-8'));
var os = resp.getOutputStream();
//transfer(file_path, os);
write_os_to_file(file_path, os);
os.flush();
}
//按日期创建目录
function getDatePath() {
set_parameter_file_path();
var file_path = $ctx.parameter.pdf_path; //file_path = c:/hls_test_files/content_files/
var now = new Date()
y = now.getFullYear()
m = now.getMonth() + 1
m = m < 10 ? "0" + m : m
var datePath = file_path + y + "/" + m + "/";
return datePath; //datePath = d:/hls_test_files/fileupload/2018/04/
}
function collection_create_content() {
try {
var datePath = getDatePath();
FileUtils.forceMkdir(new File(datePath)); //根据日期创建目录
var attachment_batch_dl = $bm('hls.HLS811.hls_doc_file_templet_get_atm');
var result = attachment_batch_dl.queryAsMap({
document_id: $ctx.parameter.document_id,
document_table: $ctx.parameter.document_table,
batch_flag: $ctx.parameter.batch_flag,
content_id: $ctx.parameter.content_id
});
var from_file_data = result.getChildren();
for (var i = 0;i < from_file_data.length;i++) {
if (!$ctx.parameter.file_path) {
set_parameter_file_path();
}
var to_file_path = $ctx.parameter.file_path;
var record_data = from_file_data[i];
//if (record_data.file_exists_flag != 'Y') {
var to_file_name = record_data.to_file_name;
var from_file_path = record_data.file_path;
var guid_file_name_path = $bm('cont.CON500.con_contract_get_guid_file_name').queryAsMap();
var guid_file_name_tables = guid_file_name_path.getChildren();
to_file_path = datePath + guid_file_name_tables[0].guid_file_name + 'doc' + record_data.content_id;
copyFile(from_file_path, to_file_path);
try {
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());
brwt.replaceBookmarkFromContent(to_file_path.toString(), record_data.content_id.toString(), 'COMMON');
} catch (e) {
raise_app_error(e);
}
// word转pdf
var pdf_file_path=to_file_path;
var outputfilepath = wordToPdf(to_file_path,pdf_file_path);
//var outputfilename= record_data.to_file_name +'.pdf';
var filename_str = record_data.to_file_name;
var outputfilename= filename_str.substr(0, filename_str.length - 5) +'.pdf';
var pdf_file = new File(outputfilepath);
var file_size = 0;
if (pdf_file.exists()) {
file_size = pdf_file.length();
}
$bm('hls.HLS811.hls_file_content_copy_update').update({
table_name: 'HLS_DOC_FILE_CONTENT',
content_id: record_data.content_id,
file_name: outputfilename.toString(),
file_path: outputfilepath.toString(),
source_type: $ctx.parameter.source_type
});
//var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
//HlsFileUtil.downloadFile(encodeURI(to_file_path,'utf-8'),encodeURI(to_file_name,'utf-8'),resp);
//print(outputfilepath.toString());
//print(outputfilename.toString());
download_file(outputfilename.toString(),outputfilepath.toString());
}
$ctx.parameter.return_status = 'S';
$ctx.parameter.return_message = '执行成功';
} catch (e) {
$ctx.success = "true";
$ctx.parameter.return_status = 'E';
$ctx.parameter.return_message = $ctx.get('/error/@message') || String(e);
raise_app_error(e);
}
var result = {
result: $ctx.parameter.return_status,
message: $ctx.parameter.return_message
};
$ctx.parameter.json = JSON.stringify(result);
}
if ($ctx.parameter.return_status != 'E' && $ctx.parameter.return_status != 'TIMEOUT') {
collection_create_content();
}
]]></s:server-script>
</a:init-procedure>
<a:service-output/>
</a:service>
......@@ -16,6 +16,7 @@
<a:model-query defaultWhereClause="t1.company_id=${/session/@company_id}" fetchAll="true"
model="prj.PRJ500D.get_company_info" rootPath="company_info_path"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
<a:model-query defaultWhereClause="t.user_id=${/session/@user_id}" model="hls.HLS214N.sys_division" rootPath="user_division"/>
</a:init-procedure>
<a:view>
<a:link id="prj_chance_create_link"
......@@ -25,10 +26,11 @@
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<a:link id="prj500n_create_project_interface_link" model="prj.PRJ500N.ds_project_interface_query" modelaction="execute" />
<a:link id="prj_chance_operat_create_link"
url="${/request/@context_path}/modules/prj/PRJ500N/prj_project_create_operat.lview"/>
<script type="text/javascript"><![CDATA[
//确定
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var record = $(ds_id).getCurrentRecord();
if(record.data.division=='70'&&record.data.business_type!='LEASEBACK'){
......@@ -40,12 +42,23 @@
if(record.data.division=='92'&&record.data.business_type!='LEASEBACK'){
$L.showErrorMessage("提示", '租赁物为北京心诚的业务类型只能是售后回租!');
return false;
}
if(record.data.division=='95'&&record.data.business_type!='LEASEOPERAT'){
$L.showErrorMessage("提示", '租赁物为经租设备的业务类型只能是经营性租赁!');
return false;
}
if(record.data.division!='95'&&record.data.business_type=='LEASEOPERAT'){
$L.showErrorMessage("提示", '业务类型为经营性租赁只能选择经租设备!');
return false;
}
if ($(ds_id).validate()) {
var url;
if(record.data.is_constru_unit == 'Y' || '${/model/user_agent_description/record/@is_constru_unit}' == 'Y'){
record.set('function_code', 'PRJ500D_CONSTRU');
url = "prj_chance_constru_create_link";
}else if(record.data.division=='95'){
record.set('function_code', 'PRJ500D_OPERAT');
url = "prj_chance_operat_create_link";
}else{
record.set('function_code', 'PRJ500D');
url = "prj_chance_create_link";
......@@ -78,6 +91,17 @@
// head_record.set('invoice_agent_id_n', '${/model/prj_project_invoice_agent_id_dafault_value_path/record/@bp_id_n}');
head_record.set('invoice_agent_id', invoice_agent_id);
head_record.set('invoice_agent_id_n', invoice_agent_id_n);
//经营性租赁改造 18083 2023/8/24
if("${/model/user_division/record/@division}"==95){
head_record.set('business_type','LEASEOPERAT');
head_record.set('business_type_n','经营性租赁');
head_record.set('division','95');
head_record.set('division_n','经租设备');
head_record.getField('division').setReadOnly(true);
head_record.getField('division_n').setReadOnly(true);
head_record.set('bp_class','bp_class');
head_record.set('bp_class_n','法人');
}
if(!invoice_agent_id){
head_record.getField('invoice_agent_id_n').setReadOnly(false);
......
......@@ -9,6 +9,7 @@
trace="true">
<a:init-procedure>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="prj.PRJ501N.get_user_info" rootPath="user_name_path"/>
</a:init-procedure>
<a:view>
<a:link id="prj_project_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
......@@ -17,6 +18,7 @@
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_create_tree_n.lview"/>
<a:link id="car_modify_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain.lview"/>
<a:link id="car_modify_constru_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_constru.lview"/>
<a:link id="car_modify_operat_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_opreat.lview"/>
<a:link id="car_modify_dff_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain.lview"/>
<a:link id="car_modify_mananger_link"
......@@ -62,6 +64,9 @@
if(record.get('is_constru_unit') == 'Y'){
param['function_code'] = 'PRJ501_CONSTRU_WFL';
url = 'car_modify_constru_link';
}else if(record.get('division')=='95'){
param['function_code'] = 'PRJ501_OPERAT_WFL';
url = 'car_modify_operat_link';
}else{
param['function_code'] = 'PRJ501_WFL';
url = 'car_modify_link';
......@@ -81,6 +86,9 @@
if(record.get('is_constru_unit') == 'Y'){
param['function_code'] = 'PRJ500D_CONSTRU';
url = 'car_modify_constru_link';
}else if(record.get('division')=='95'){
param['function_code'] = 'PRJ500D_OPERAT';
url = 'car_modify_operat_link';
}else{
param['function_code'] = 'PRJ501D';
url = 'car_modify_link';
......@@ -172,6 +180,11 @@
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var project_id = $(ds_id).getSelected()[0].get('project_id');
var division = $(ds_id).getSelected()[0].get('division');
if (division=='95'){
Leaf.showMessage('提示', '经营性租赁不支持报价单打印!');
return;
}
//根据是否是代理店打印不同的文本
var templet_code='';
// if("${/model/role_info/record/@role_code}"!="0018"&&"${/model/role_info/record/@role_code}"!="0019") {
......@@ -186,6 +199,11 @@
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var project_id = $(ds_id).getSelected()[0].get('project_id');
var division = $(ds_id).getSelected()[0].get('division');
if (division=='95'){
Leaf.showMessage('提示', '经营性租赁不支持租金支付计划表打印!');
return;
}
//根据是否是代理店打印不同的文本
var templet_code='';
templet_code = 'PROJECT_QUOTATION_N';
......@@ -204,11 +222,19 @@
//上级 btn4 可见
if("${/model/role_info/record/@role_code}"=="0019") {
$('PROJECT_MODIFY_ENTRANCE_user_button4').hide();
if("${/model/user_name_path/record/@user_name}"=="ZLSY001"||"${/model/user_name_path/record/@user_name}"=="ZLSY002"){
$('PROJECT_MODIFY_ENTRANCE_user_button4').hide();
$('PROJECT_MODIFY_ENTRANCE_user_button3').hide();
}
}else if("${/model/role_info/record/@role_code}"=="0018"){
var t= document.getElementById('PROJECT_MODIFY_ENTRANCE_user_button3').style.display="none";
t.remove();
$('PROJECT_MODIFY_ENTRANCE_user_button3').hide();
if("${/model/user_name_path/record/@user_name}"=="ZLSY001"||"${/model/user_name_path/record/@user_name}"=="ZLSY002"){
$('PROJECT_MODIFY_ENTRANCE_user_button4').hide();
$('PROJECT_MODIFY_ENTRANCE_user_button3').hide();
}
}
})
function check_isload() {
......
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