Commit 6706a8c7 authored by 21471731's avatar 21471731

租赁物导入

parent 3bdbd814
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: SC
$Date: 2022年11月23日20:40:09
$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 li.line_id,
li.error_message,
li.status,
li.header_id,
li.line_number,
hd.created_by,
li.source_table,
li.attribute_1,
li.attribute_2,
li.attribute_3,
li.attribute_4,
li.attribute_5,
li.attribute_6,
li.attribute_7,
li.attribute_8,
li.attribute_9,
li.attribute_10,
li.attribute_11,
li.attribute_12,
li.attribute_13,
li.attribute_14,
li.attribute_15,
li.attribute_16,
li.attribute_17,
li.attribute_18,
li.attribute_19,
li.attribute_20,
li.attribute_21,
li.attribute_22,
li.attribute_23,
li.attribute_24,
li.attribute_25,
li.attribute_26
FROM fnd_interface_headers hd,
fnd_interface_lines li
WHERE hd.header_id = li.header_id
AND hd.template_code = 'PRJ_LEASE'
AND li.line_number >0
AND HD.CREATED_BY = ${/session/@user_id}
) t1
#WHERE_CLAUSE#
order by t1.line_number
]]></bm:query-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
prj_project_lease_import_pkg.prj_lease_item_list_import(p_header_id =>${/parameter/@header_id},
p_user_id =>${/session/@user_id},
p_lease_item_id=>${@lease_item_id},
p_project_lease_item_id=>${@project_lease_item_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
prj_project_lease_import_pkg.prj_lease_item_import_check(p_header_id => ${/model/header/record/@header_id},
p_user_id => ${/session/@user_id},
p_project_lease_item_id=>${/parameter/@project_lease_item_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="header_id" queryExpression="t1.header_id=${@header_id}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: SC
$Date: 2022年11月23日20:40:09
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
prj_project_lease_import_pkg.insert_lease_temp(p_header_id =>${@header_id},
p_session_id=>${/session/@session_id},
p_set_number=>${@set_number},
p_lease_item_id=>${@lease_item_id},
p_user_id=>${/session/@user_id},
p_project_lease_item_id=>${@project_lease_item_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
prj_project_lease_import_pkg.insert_lease_item_list(
p_project_lease_item_id=>${@project_lease_item_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
prj_project_lease_import_pkg.update_lease_item_data_temp(
p_prj_lease_item_list_id=>${@prj_lease_item_list_id},
p_asset_name=>${@asset_name},
p_specification=>${@specification},
p_asset_num=>${@asset_num},
p_asset_type=>${@asset_type},
p_posted_date=>${@posted_date},
p_price=>${@price},
p_manufacturer=>${@manufacturer},
p_set_number=>${@set_number},
p_lease_num=>${@lease_num}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: SC
$Date: 2022年12月6日19:08:18
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
prj_project_lease_import_pkg.delete_lease_success_after(
p_project_lease_item_id=>${@project_lease_item_id},
p_count =>${@count}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: SC
$Date: 2022年12月6日19:08:18
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
prj_project_lease_import_pkg.delete_lease_item_data_temp(
p_prj_lease_item_list_id=>${@prj_lease_item_list_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -108,6 +108,7 @@ ...@@ -108,6 +108,7 @@
//项目类layout_code //项目类layout_code
maintain_type = 'READONLY'; maintain_type = 'READONLY';
param = record.data; param = record.data;
param['hide_flag'] = 'Y';
param['document_id'] = record.get('project_id'); param['document_id'] = record.get('project_id');
param['function_code'] = 'PRJ501_WFL'; param['function_code'] = 'PRJ501_WFL';
param['function_usage'] = 'QUERY'; param['function_usage'] = 'QUERY';
......
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
function open_project_Window(record_id, ds_id) { function open_project_Window(record_id, ds_id) {
var record = $(ds_id).findById(record_id); var record = $(ds_id).findById(record_id);
var param = record.data; var param = record.data;
param['hide_flag'] = 'Y';
param['company_id'] = record.get('company_id'); param['company_id'] = record.get('company_id');
param['project_id'] = record.get('project_id'); param['project_id'] = record.get('project_id');
param['function_usage'] = 'QUERY'; param['function_usage'] = 'QUERY';
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
function open_project_Window(record_id, ds_id) { function open_project_Window(record_id, ds_id) {
var record = $(ds_id).findById(record_id); var record = $(ds_id).findById(record_id);
var param = record.data; var param = record.data;
param['hide_flag'] = 'Y';
param['company_id'] = record.get('company_id'); param['company_id'] = record.get('company_id');
param['project_id'] = record.get('project_id'); param['project_id'] = record.get('project_id');
param['function_usage'] = 'QUERY'; param['function_usage'] = 'QUERY';
......
...@@ -84,6 +84,9 @@ ...@@ -84,6 +84,9 @@
if (list_ds) { if (list_ds) {
$(list_ds).query(); $(list_ds).query();
} }
}else if(param['function_code']=='PRJ501INC'){
$('PROJECT_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_ds').query();
$('PROJECT_CREATE_NP_F_QUOTATION_N_prj_quotation_ds').query();
} }
else{ else{
if (list_ds) { if (list_ds) {
......
...@@ -15,12 +15,14 @@ ...@@ -15,12 +15,14 @@
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/> <a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.prj_project_get_description" rootPath="description"/> <a:model-query fetchAll="true" model="prj.PRJ500D.prj_project_get_description" rootPath="description"/>
<s:server-script import="contract_print_path.js"><![CDATA[ <s:server-script import="contract_print_path.js"><![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path']; $ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source']; $ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]> ]]>
</s:server-script> </s:server-script>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="${/parameter/@layout_code}lease_prj_create_query_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_lease_import_details.lview"/>
<a:link id="${/parameter/@layout_code}hls_bp_master_query_link" <a:link id="${/parameter/@layout_code}hls_bp_master_query_link"
url="${/request/@context_path}/modules/hls/HLS215N/hls_bp_master_query.lview"/> url="${/request/@context_path}/modules/hls/HLS215N/hls_bp_master_query.lview"/>
<a:link id="bp_tenant_detail_query_link" model="prj.PRJ500D.bp_tenant_old_r_query" modelaction="query"/> <a:link id="bp_tenant_detail_query_link" model="prj.PRJ500D.bp_tenant_old_r_query" modelaction="query"/>
...@@ -62,6 +64,13 @@ ...@@ -62,6 +64,13 @@
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
// alert('${/parameter/@division}') // alert('${/parameter/@division}')
//add by zhuxianfei //add by zhuxianfei
Leaf.onReady(function() {
if(division!='30' && division!='50'){
var gridId= 'PROJECT_CREATE_NP_G_LEASE_HEAD_CAR_prj_project_lease_item_layout_grid_id';
$(gridId).hideColumn('machine_number_n');
}
});
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
var url; var url;
...@@ -98,6 +107,19 @@ ...@@ -98,6 +107,19 @@
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
//首次插入 //首次插入
if (!record.get('calc_session_id')) { if (!record.get('calc_session_id')) {
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var current_red= $(ds_id).getCurrentRecord();
if(division=='30' || division=='50'){
var set_number=current_red.get('set_number');
var total_number=current_red.get('total_number');
if(total_number!=0 && set_number!=total_number){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:HLS.PROMPT}', '租赁物台数与查看明细中台数不一致,请重新维护!');
return;
}
}
record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD'); record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD');
var calc_recreate_L_formula; var calc_recreate_L_formula;
calc_recreate_L_formula = 'Y'; calc_recreate_L_formula = 'Y';
...@@ -159,6 +181,18 @@ ...@@ -159,6 +181,18 @@
}); });
} else { } else {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var current_red= $(ds_id).getCurrentRecord();
if(division=='30' || division=='50'){
var set_number=current_red.get('set_number');
var total_number=current_red.get('total_number');
if(total_number!=0 && set_number!=total_number){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:HLS.PROMPT}', '租赁物台数与查看明细中台数不一致,请重新维护!');
return;
}
}
var cal_hd_price_list = record.get('cal_hd_price_list'); var cal_hd_price_list = record.get('cal_hd_price_list');
var price_list = record.get('price_list'); var price_list = record.get('price_list');
if (cal_hd_price_list == price_list) { if (cal_hd_price_list == price_list) {
...@@ -454,6 +488,23 @@ ...@@ -454,6 +488,23 @@
}; };
function prj501n_lease_number_renderer(record_id, ds_id){
var prj_quotation_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var record = $(ds_id).findById(record_id);
var param = {};
param['project_status'] = 'NEW';
param['division'] = record.get('division');
param['project_lease_item_id'] = record.get('project_lease_item_id');
param['lease_item_id'] = record.get('lease_item_id');
param['set_number'] = record.get('set_number');
param['document_id'] = record.get('project_id');
param['function_code'] = 'PRJ501INC';
param['function_usage'] = 'UPDATE';
param['winid'] = '${/parameter/@layout_code}_project_create_win_id';
param['url_title'] = '租赁物清单';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}lease_prj_create_query_link', prj_quotation_ds, null);
}
//超链接渲染 //超链接渲染
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) { window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
var link_function = ''; var link_function = '';
...@@ -497,6 +548,9 @@ ...@@ -497,6 +548,9 @@
} else if (name == 'contract_number') { } else if (name == 'contract_number') {
link_function = 'prj501n_contract_number_renderer'; link_function = 'prj501n_contract_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value + '</a>'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value + '</a>';
}else if(name=='machine_number_n' && record.get('project_lease_item_id')!=null){
link_function = 'prj501n_lease_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + record.ds.id + '\')">' + '查看明细' + '</a>';
} }
}; };
...@@ -518,6 +572,10 @@ ...@@ -518,6 +572,10 @@
$(prj_project_lease_item_ds_id).query(); $(prj_project_lease_item_ds_id).query();
$(prj_quotation_ds_id).query(); $(prj_quotation_ds_id).query();
} }
if (prj_project_lease_item_ds_id==ds.id){
$(prj_quotation_ds_id).query();
}
var record = $(ds_id).getCurrentRecord(); var record = $(ds_id).getCurrentRecord();
var url = '${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=' + record.get('bp_id_tenant'); var url = '${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=' + record.get('bp_id_tenant');
$(tenant_ds_id).setQueryUrl(url); $(tenant_ds_id).setQueryUrl(url);
...@@ -1051,6 +1109,9 @@ ...@@ -1051,6 +1109,9 @@
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item'); var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
if(lease_item_ds_id == ds.id &&lease_item_ds_id){ if(lease_item_ds_id == ds.id &&lease_item_ds_id){
var gridId= ds.bindname+'_layout_grid_id'; var gridId= ds.bindname+'_layout_grid_id';
if(division!='30' && division!='50'){
$(gridId).hideColumn('machine_number_n');
}
if(division=='70'){ if(division=='70'){
if(record!=''){ if(record!=''){
record.getField('lease_name_n').setRequired(true); record.getField('lease_name_n').setRequired(true);
...@@ -1253,6 +1314,32 @@ ...@@ -1253,6 +1314,32 @@
if ($(ds_id).validate()) { if ($(ds_id).validate()) {
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () { Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () {
var lease_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUOTATION_N', 'prj_quotation');
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
if(division=='30'||division=='50'){
var record=$(lease_ds_id).getCurrentRecord();
var records=$(ds_id).getCurrentRecord();
var set_number=records.get('set_number');
var total_number=records.get('total_number');
var total_price=records.get('total_price');
var lease_item_amount=record.get('lease_item_amount');
var residual_value=record.get('residual_value');
var q_value=records.get('q_value');
if(total_price!=lease_item_amount &&total_price!=null){
Leaf.showMessage('${l:PROMPT}', '支付计划页面“设备价格”字段值与租赁物明细“设备单价(总)”合计不相等,无法进行提交!');
return;
}else if(q_value!=residual_value){
Leaf.showMessage('${l:PROMPT}', '支付计划中留购价与报价计算不一致,无法提交审批!');
return;
}else if(total_number!=0 && set_number!=total_number){
Leaf.showMessage('${l:HLS.PROMPT}', '租赁物台数与查看明细中台数不一致,请重新维护!');
return;
}
}
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({ Leaf.request({
url: $('prj_approval_link_id').getUrl(), url: $('prj_approval_link_id').getUrl(),
...@@ -1287,6 +1374,31 @@ ...@@ -1287,6 +1374,31 @@
}else { }else {
if ($(ds_id).validate()) { if ($(ds_id).validate()) {
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () { Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () {
var lease_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUOTATION_N', 'prj_quotation');
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
if(division=='30'||division=='50'){
var record=$(lease_ds_id).getCurrentRecord();
var records=$(ds_id).getCurrentRecord();
var set_number=records.get('set_number');
var total_number=records.get('total_number');
var total_price=records.get('total_price');
var lease_item_amount=record.get('lease_item_amount');
var residual_value=record.get('residual_value');
var q_value=records.get('q_value');
if(total_price!=lease_item_amount &&total_price!=null){
Leaf.showMessage('${l:PROMPT}', '支付计划页面“设备价格”字段值与租赁物明细“设备单价(总)”合计不相等,无法进行提交!');
return;
}else if(q_value!=residual_value){
Leaf.showMessage('${l:PROMPT}', '支付计划中留购价与报价计算不一致,无法提交审批!');
return;
}else if(total_number!=0 && set_number!=total_number){
Leaf.showMessage('${l:HLS.PROMPT}', '租赁物台数与查看明细中台数不一致,请重新维护!');
return;
}
}
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({ Leaf.request({
url: $('prj_approval_link_id').getUrl(), url: $('prj_approval_link_id').getUrl(),
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: SC
$Date: 2022年11月23日15:14:31
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure>
<a:model-query model="acr.acr_get_sys_import_head_id" rootPath="header"/>
<a:import-excel header_id="${/model/header/record/@header_id}" separator="," status_field="/parameter/@ImportSuccess" template_code="PRJ_LEASE" user_id="${/session/@user_id}"/>
<a:model-query defaultWhereClause="header_id=${/model/header/record/@header_id} and TEMPLATE_CODE = &apos;PRJ_LEASE&apos;" model="acp.ACP518.acp_import_get_status" rootPath="status"/>
<a:model-update model="prj.PRJ500N.prj_project_lease_import_list"/>
</a:init-procedure>
<a:view>
<a:link id="import_prj_lease_item_list_link_id" model="prj.PRJ500N.prj_project_lease_import_list" modelaction="insert"/>
<script><![CDATA[
function import_exit() {
parent._input_window.close();
}
var import_flag=0;
function import_btn() {
var ds = $('prj_lease_item_list_improt_ds');
var record = ds.getAll();
if(import_flag==0){
for (var i = 0;i < record.length;i++) {
if (record[i].get('status') == 'ERROR') {
Leaf.showMessage('${l:PROMPT}', '导入的数据存在错误,请查看错误信息!');
return;
}
}
Leaf.showConfirm('提示', '确定要导入信息吗?', function() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('import_prj_lease_item_list_link_id').getUrl(),
para: {
header_id: '${/model/header/record/@header_id}',
lease_item_id:'${/parameter/@lease_item_id}',
project_lease_item_id:'${/parameter/@project_lease_item_id}'
},
scope: this,
success: function () {
import_flag = import_flag + 1;
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody(), '${l:HLS.EXECUTING}');
import_exit();
}
});
});
}else{
Leaf.showMessage('${l:PROMPT}', '数据已导入不能重复导入!');
return;
}
}
]]></script>
<a:dataSets>
<a:dataSet id="prj_lease_item_list_improt_ds" autoQuery="true" fetchAll="true" model="prj.PRJ500N.prj_project_lease_import_list" queryUrl="${/request/@context_path}/autocrud/prj.PRJ500N.prj_project_lease_import_list/query?header_id=${/model/header/record/@header_id}">
<a:fields>
<a:field name="error_message" readOnly="true"/>
<a:field name="attribute_1" readOnly="true"/>
<a:field name="attribute_2" readOnly="true"/>
<a:field name="attribute_3" readOnly="true"/>
<a:field name="attribute_4" readOnly="true"/>
<a:field name="attribute_5" readOnly="true"/>
<a:field name="attribute_6" readOnly="true"/>
<a:field name="attribute_7" readOnly="true"/>
<a:field name="attribute_8" readOnly="true"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:form id="success_form" height="400" title="THE_IMPORTED_DATA" width="980">
<a:screenTopToolbar>
<a:gridButton click="import_exit" text="退出"/>
<a:gridButton click="import_btn" text="导入"/>
</a:screenTopToolbar>
<a:grid id="grid_ds_id" bindTarget="prj_lease_item_list_improt_ds" marginWidth="50" marginHeight="100" navBar="true">
<a:columns>
<a:column name="attribute_1" prompt="序号" width="120"/>
<a:column name="attribute_2" prompt="租赁物名称" width="160"/>
<a:column name="attribute_3" prompt="型号" width="160"/>
<a:column name="attribute_4" prompt="设备编号" width="160"/>
<a:column name="attribute_5" prompt="设备类型" width="160"/>
<a:column name="attribute_6" prompt="出厂日期" width="160"/>
<a:column name="attribute_7" prompt="设备单价(总)" width="160"/>
<a:column name="attribute_8" prompt="制造商(全称)" width="160"/>
<a:column name="error_message" editor="textArea_e" prompt="错误信息" width="200"/>
</a:columns>
<a:editors>
<a:textArea id="textArea_e" height="50" width="240"/>
</a:editors>
</a:grid>
</a:form>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: SC
$Date: 2022年11月22日14:22:38
$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="prj501N_lease_item_list_delete_link" model="prj.PRJ500N.prj_project_lease_item_delete" modelaction="update"/>
<a:link id="prj501N_lease_item_list_update_link" model="prj.PRJ500N.prj_project_lease_import_temp" modelaction="batch_update"/>
<a:link id="prj501N_lease_item_temp_batch_update_link" model="prj.PRJ500N.prj_project_lease_update_temp" modelaction="batch_update"/>
<a:link id="prj501N_lease_item_list_save_link" model="prj.PRJ500N.prj_project_lease_import_temp" modelaction="execute"/>
<a:link id="prj501N_lease_import_upload_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_lease_import_upload.lview"/>
<script><![CDATA[
Leaf.onReady(function() {
var status='${/parameter/@project_status}';
if ('${/parameter/@hide_flag}' == 'Y' || status=='APPROVING' || status=='CLOSED' || status=='CONTRACT_CREATED') {
$('PROJECT_LEASE_IMPORT_user_button1').hide();
$('PROJECT_LEASE_IMPORT_user_button2').hide();
$('PROJECT_LEASE_IMPORT_user_button4').hide();
}
});
//导入
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'prj_project_lease_item_list');
var win = new Leaf.Window({
id: 'cf_fee_payment_import_upload_winid',
url: $('prj501N_lease_import_upload_link').getUrl(),
title: '租赁物信息导入',
params: {
set_number: '${/parameter/@set_number}',
lease_item_id:'${/parameter/@lease_item_id}',
project_lease_item_id:'${/parameter/@project_lease_item_id}',
winid:'cf_fee_payment_import_upload_winid',
parent_ds_id:ds_id
},
width: 430,
height: 350
});
};
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, record, config_records, bp_seq) {
if('${/parameter/@project_status}'!='NEW' && record!=''){
record.getField('seq').setReadOnly(true);
record.getField('asset_num').setReadOnly(true);
record.getField('asset_type').setReadOnly(true);
record.getField('asset_type_n').setReadOnly(true);
record.getField('asset_name').setReadOnly(true);
record.getField('asset_name_n').setReadOnly(true);
record.getField('specification').setReadOnly(true);
record.getField('posted_date').setReadOnly(true);
record.getField('price').setReadOnly(true);
record.getField('manufacturer').setReadOnly(true);
}else if('${/parameter/@project_status}'=='NEW' && record!=''){
record.getField('asset_num').setRequired(true);
record.getField('asset_type').setRequired(true);
record.getField('asset_name').setRequired(true);
record.getField('specification').setRequired(true);
record.getField('posted_date').setRequired(true);
record.getField('price').setRequired(true);
record.getField('manufacturer').setRequired(true);
}
}
//加载时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) {
var gridId= ds.bindname+'_ds';
$(gridId).setQueryParameter('project_lease_item_id', '${/parameter/@project_lease_item_id}');
};
//删除
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item_list');
var record = $(ds_id);
var records = record.getSelected();
var datas= record.getAll();
var len = records.length;
var lens = datas.length;
if (len == 0) {
Leaf.showMessage('${l:PROMPT}','请选择一条记录!');
return;
}
Leaf.showConfirm('提示', '您确认删除吗', function() {
var param_list = [];
var param = {};
for (var i = 0; i < records.length; i++) {
param = records[i].data;
param['_status'] = 'update';
param_list.push(param);
}
Leaf.request({
url: $('prj501N_lease_item_temp_batch_update_link').getUrl(),
para:param_list,
success: function() {
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
var count=(lens-len);
if(count==0){
success_delete_after(count);
}else{
success_delete_after(count);
}
},
error: function() {
},
failure: function() {},
scope: this
});
});
};
function success_delete_after(count){
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item_list');
Leaf.request({
url: $('prj501N_lease_item_list_delete_link').getUrl(),
para:{
project_lease_item_id:'${/parameter/@project_lease_item_id}',
count:count
},
success: function() {
$(ds_id).query();
},
error: function() {
},
failure: function() {},
scope: this
});
}
//保存
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'prj_project_lease_item_list');
var records = $(ds_id).getAll();
var record= $(ds_id).getAt(0);
if(record==null){
Leaf.showMessage('${l:PROMPT}','您还没有导入数据,请导入!');
return false;
}
var lease_num=record.get('lease_num');
//设备编号不能重复
for (var a = 0; a < records.length; a++) {
var record_a = records[a];
var num = 0;
for (var b = 0; b < records.length; b++) {
var record_b = records[b];
if (record_a.get('asset_num') == record_b.get('asset_num') ) {
num = num + 1;
}
if (num > 1) {
Leaf.showMessage('提示信息', '设备编号不能重复,请检查!');
return false;
}
}
}
if($(ds_id).validate()){
var param_list = [];
var param = {};
for (var i = 0; i < records.length; i++) {
param = records[i].data;
param['set_number'] = '${/parameter/@set_number}';
param['lease_num'] = lease_num;
param['_status'] = 'update';
param_list.push(param);
}
Leaf.request({
url: $('prj501N_lease_item_list_update_link').getUrl(),
para: param_list,
success: function () {
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
submit_success_lease();
},
error: function () {
},
failure: function () {
},
scope: this
});
}
};
function submit_success_lease(){
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'prj_project_lease_item_list');
if($(ds_id).validate()){
Leaf.request({
url: $('prj501N_lease_item_list_save_link').getUrl(),
para:{
project_lease_item_id:'${/parameter/@project_lease_item_id}'
},
success: function() {
$(ds_id).query();
},
error: function() {
},
failure: function() {},
scope: this
});
}
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: SC
$Date: 2022年11月23日15:14:31
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:view>
<script type="text/javascript"><![CDATA[
function saveClick(){
if (document.getElementById('importFile').value){
var fileName = document.getElementById('importFile').value;
var fileType = fileName.substr(fileName.lastIndexOf("."));
if (fileType != '.xls' && fileType != '.xlsx' && fileType != '.xlsm') {
alert('请选择正确的导入文件!');
} else {
doSubmit();
}
}
}
var _input_window;
function doSubmit() {
_input_window = new $L.Window({
title: '${l:HLS.IMPORT}',
fullScreen: true
});
new Ext.Template('<iframe id ="_input_window" name="_input_window" border="0" frameborder="0" height="100%" width="100%" style="border:none;padding:0px;margin:0px;"></iframe>').insertFirst(_input_window.body.dom, {}, true);
var form = document.getElementById('importForm');
var url = '${/request/@context_path}/modules/prj/PRJ501N/prj_project_lease_import.lview?set_number=${/parameter/@set_number}&lease_item_id=${/parameter/@lease_item_id}&project_lease_item_id=${/parameter/@project_lease_item_id}&winid=${/parameter/@winid}&_csrf=${/session/@_csrf.token}';
form.action = url;
form.submit();
$('${/parameter/@winid}').close();
_input_window.on('close', function() {
// $('${/parameter/@parent_ds_id}').setQueryParameter('batch_id','${/parameter/@batch_id}');
$('${/parameter/@parent_ds_id}').query();
});
}
]]></script>
<a:dataSets>
<a:dataSet id="label_ds" autoCreate="true">
<a:fields>
<a:field name="label2" defaultValue="1、 严格按照导入模板整理数据,检查必输事项是否缺少数据。"/>
<a:field name="label3" defaultValue="2、 关闭Excel文件后,方可进行产品主数据导入。"/>
<a:field name="label4" defaultValue="3、 本导入程序只支持Office Excel。"/>
<a:field name="label5" defaultValue="仔细阅读上述事项,并检查确认无误。"/>
<a:field name="label6" defaultValue="导入完毕后,请在系统内核实数据是否导入成功。"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:fieldSet style="margin-left:10px;margin-top:10px;" title="导入注意事项" width="400">
<a:label name="label2" bindTarget="label_ds" style="margin-left:10px;" width="380"/>
<a:label name="label3" bindTarget="label_ds" style="margin-left:10px;" width="380"/>
<a:label name="label4" bindTarget="label_ds" style="margin-left:10px;" width="380"/>
<a:label name="label5" bindTarget="label_ds" style="color:#055A78;font-weight:bold;margin-left:10px;" width="380"/>
<a:label name="label6" bindTarget="label_ds" style="color:#055A78;font-weight:bold;margin-left:10px;" width="380"/>
</a:fieldSet>
<a:fieldSet style="margin-left:10px;margin-top:10px;" title="导入文件" width="400">
<form name="upload" id="importForm" enctype="multipart/form-data" method="post" target="_input_window">
<label style="margin-left:10px;margin-top:10px;"><![CDATA[请选择文件:]]></label>
<input name="CONTENT" id="importFile" style="margin-bottom:4px;width:160px;height:22px;" type="file"/>
<input onclick="saveClick()" style="margin-left:50px;margin-top:10px;width:60px;" type="button" value="导入"/>
</form>
</a:fieldSet>
</a:view>
</a:screen>
...@@ -16,12 +16,13 @@ ...@@ -16,12 +16,13 @@
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/> <a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.prj_project_get_description" rootPath="description"/> <a:model-query fetchAll="true" model="prj.PRJ500D.prj_project_get_description" rootPath="description"/>
<s:server-script import="contract_print_path.js"><![CDATA[ <s:server-script import="contract_print_path.js"><![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path']; $ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source']; $ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]> ]]>
</s:server-script> </s:server-script>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="prj501N_prj_lease_item_maintain_link" model="prj.PRJ500N.prj_project_lease_item_delete" modelaction="execute"/>
<a:link id="hls_bp_master_billing_link" model="prj.PRJ500N.hls_bp_master_billing" modelaction="query"/> <a:link id="hls_bp_master_billing_link" model="prj.PRJ500N.hls_bp_master_billing" modelaction="query"/>
<a:link id="bp_tenant_detail_query_link" model="prj.PRJ500D.bp_tenant_old_r_query" modelaction="query"/> <a:link id="bp_tenant_detail_query_link" model="prj.PRJ500D.bp_tenant_old_r_query" modelaction="query"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}get_special_fields_link_id" <a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}get_special_fields_link_id"
...@@ -52,6 +53,9 @@ ...@@ -52,6 +53,9 @@
<a:link id="${/parameter/@layout_code}_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" <a:link id="${/parameter/@layout_code}_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/> modelaction="update"/>
<a:link id="${/parameter/@layout_code}lease_number_query_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_lease_import_details.lview"/>
<!-- <script src="${/request/@context_path}/modules/prj/PRJ500N/javascripts/check_org_code.js" type="text/javascript"/> --> <!-- <script src="${/request/@context_path}/modules/prj/PRJ500N/javascripts/check_org_code.js" type="text/javascript"/> -->
<!-- <a:link id="prj_project_create_con_id" model="prj.PRJ513N.prj_peoject_create_con" modelaction="update"/> --> <!-- <a:link id="prj_project_create_con_id" model="prj.PRJ513N.prj_peoject_create_con" modelaction="update"/> -->
<a:link id="${/parameter/@layout_code}_prj_project_create_contract_link_id" <a:link id="${/parameter/@layout_code}_prj_project_create_contract_link_id"
...@@ -161,6 +165,19 @@ ...@@ -161,6 +165,19 @@
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
//首次插入 //首次插入
if (!record.get('calc_session_id')) { if (!record.get('calc_session_id')) {
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var current_red= $(ds_id).getCurrentRecord();
if(division=='30' || division=='50'){
var set_number=current_red.get('set_number');
var total_number=current_red.get('total_number');
if(total_number!=0 && set_number!=total_number){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:HLS.PROMPT}', '租赁物台数与查看明细中台数不一致,请重新维护!');
return;
}
}
record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD'); record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD');
var calc_recreate_L_formula; var calc_recreate_L_formula;
calc_recreate_L_formula = 'Y'; calc_recreate_L_formula = 'Y';
...@@ -225,6 +242,18 @@ ...@@ -225,6 +242,18 @@
}); });
} else { } else {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var current_red= $(ds_id).getCurrentRecord();
if(division=='30' || division=='50'){
var set_number=current_red.get('set_number');
var total_number=current_red.get('total_number');
if(total_number!=0 && set_number!=total_number){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:HLS.PROMPT}', '租赁物台数与查看明细中台数不一致,请重新维护!');
return;
}
}
var cal_hd_price_list = record.get('cal_hd_price_list'); var cal_hd_price_list = record.get('cal_hd_price_list');
var price_list = record.get('price_list'); var price_list = record.get('price_list');
if (cal_hd_price_list == price_list) { if (cal_hd_price_list == price_list) {
...@@ -432,6 +461,24 @@ ...@@ -432,6 +461,24 @@
} }
function prj501n_lease_number_renderer(record_id, ds_id){
var prj_quotation_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var record = $(ds_id).findById(record_id);
var param = {};
param['hide_flag'] = '${/parameter/@hide_flag}';
param['project_status'] = '${/parameter/@project_status}';
param['division'] = record.get('division');
param['project_lease_item_id'] = record.get('project_lease_item_id');
param['lease_item_id'] = record.get('lease_item_id');
param['set_number'] = record.get('set_number');
param['document_id'] = record.get('project_id');
param['function_code'] = 'PRJ501INC';
param['function_usage'] = 'UPDATE';
param['winid'] = '${/parameter/@layout_code}_project_number_win_id';
param['url_title'] = '租赁物清单';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}lease_number_query_link',prj_quotation_ds, '${/parameter/@layout_code}','${/parameter/@winid}','Y');
}
//超链接渲染 //超链接渲染
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) { window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
var link_function = ''; var link_function = '';
...@@ -504,6 +551,9 @@ ...@@ -504,6 +551,9 @@
} else if (name == 'contract_number') { } else if (name == 'contract_number') {
link_function = 'prj501n_contract_number_renderer'; link_function = 'prj501n_contract_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value + '</a>'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value + '</a>';
}else if(name=='machine_number_n' && record.get('project_lease_item_id')!=null){
link_function = 'prj501n_lease_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + record.ds.id + '\')">' + '查看明细' + '</a>';
} }
}; };
...@@ -527,6 +577,9 @@ ...@@ -527,6 +577,9 @@
$(prj_quotation_ds_id).query(); $(prj_quotation_ds_id).query();
$(score_ds_id).query(); $(score_ds_id).query();
} }
if (prj_project_lease_item_ds_id==ds.id){
$(prj_quotation_ds_id).query();
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}; };
...@@ -901,8 +954,11 @@ ...@@ -901,8 +954,11 @@
$(bp_ds_ids).query(); */ $(bp_ds_ids).query(); */
if(lease_item_ds_id == ds.id &&lease_item_ds_id){ if(lease_item_ds_id == ds.id &&lease_item_ds_id){
var gridId= ds.bindname+'_layout_grid_id'; var gridId= ds.bindname+'_layout_grid_id';
if(division!='30' && division!='50'){
$(gridId).hideColumn('machine_number_n');
}
if(division=='70'&&division!=''){ if(division=='70'&&division!=''){
//debugger; //debugger;
if(record!=''){ if(record!=''){
record.getField('lease_name_n').setRequired(true); record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true); record.getField('brand_value').setRequired(true);
...@@ -1550,6 +1606,29 @@ ...@@ -1550,6 +1606,29 @@
} }
if ($(ds_id).validate()) { if ($(ds_id).validate()) {
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () { Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () {
var lease_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUOTATION_N', 'prj_quotation');
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
if(division=='30'||division=='50'){
var record=$(lease_ds_id).getCurrentRecord();
var records=$(ds_id).getCurrentRecord();
var set_number=records.get('set_number');
var total_number=records.get('total_number');
var total_price=records.get('total_price');
var lease_item_amount=record.get('lease_item_amount');
var residual_value=record.get('residual_value');
var q_value=records.get('q_value');
if(total_price!=lease_item_amount &&total_price!=null){
Leaf.showMessage('${l:PROMPT}', '支付计划页面“设备价格”字段值与租赁物明细“设备单价(总)”合计不相等,无法进行提交!');
return;
}else if(q_value!=residual_value){
Leaf.showMessage('${l:PROMPT}', '支付计划中留购价与报价计算不一致,无法提交审批!');
return;
}else if(total_number!=0 && set_number!=total_number){
Leaf.showMessage('${l:HLS.PROMPT}', '租赁物台数与查看明细中台数不一致,请重新维护!');
return;
}
}
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({ Leaf.request({
url: $('prj_approval_link_id').getUrl(), url: $('prj_approval_link_id').getUrl(),
...@@ -1586,6 +1665,30 @@ ...@@ -1586,6 +1665,30 @@
} else { } else {
if ($(ds_id).validate()) { if ($(ds_id).validate()) {
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () { Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () {
var lease_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUOTATION_N', 'prj_quotation');
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
if(division=='30'||division=='50'){
var record=$(lease_ds_id).getCurrentRecord();
var records=$(ds_id).getCurrentRecord();
var set_number=records.get('set_number');
var total_number=records.get('total_number');
var total_price=records.get('total_price');
var lease_item_amount=record.get('lease_item_amount');
var residual_value=record.get('residual_value');
var q_value=records.get('q_value');
if(total_price!=lease_item_amount &&total_price!=null){
Leaf.showMessage('${l:PROMPT}', '支付计划页面“设备价格”字段值与租赁物明细“设备单价(总)”合计不相等,无法进行提交!');
return;
}else if(q_value!=residual_value){
Leaf.showMessage('${l:PROMPT}', '支付计划中留购价与报价计算不一致,无法提交审批!');
return;
}else if(total_number!=0 && set_number!=total_number){
Leaf.showMessage('${l:HLS.PROMPT}', '租赁物台数与查看明细中台数不一致,请重新维护!');
return;
}
}
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({ Leaf.request({
url: $('prj_approval_link_id').getUrl(), url: $('prj_approval_link_id').getUrl(),
...@@ -1709,7 +1812,7 @@ ...@@ -1709,7 +1812,7 @@
return false; return false;
} }
if (record.get('signing_city')){ if (record.get('signing_city')){
// var reg = /^([\u2E80-\u9FFF]){4,}$/; // var reg = /^([\u2E80-\u9FFF]){4,}$/;
var reg = /^(.){4,}$/; var reg = /^(.){4,}$/;
if (!reg.test(record.get('signing_city'))) { if (!reg.test(record.get('signing_city'))) {
$L.showErrorMessage('提示', '合同签订地建议格式:“xx市xx区”(也可填写详细地址)!'); $L.showErrorMessage('提示', '合同签订地建议格式:“xx市xx区”(也可填写详细地址)!');
......
...@@ -13,12 +13,14 @@ ...@@ -13,12 +13,14 @@
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/> <a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
<a:model-query fetchAll="true" model="zjwfl.ZJWFL1060.zi_wfl_approve_get_submitted" rootPath="approve_history_rp"/> <a:model-query fetchAll="true" model="zjwfl.ZJWFL1060.zi_wfl_approve_get_submitted" rootPath="approve_history_rp"/>
<s:server-script import="contract_print_path.js"><![CDATA[ <s:server-script import="contract_print_path.js"><![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path']; $ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source']; $ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]> ]]>
</s:server-script> </s:server-script>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="${/parameter/@layout_code}lease_number_query_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_lease_import_details.lview"/>
<a:link id="bp_tenant_detail_query_link" model="prj.PRJ500D.bp_tenant_old_r_query" modelaction="query"/> <a:link id="bp_tenant_detail_query_link" model="prj.PRJ500D.bp_tenant_old_r_query" modelaction="query"/>
<a:link id="${/parameter/@layout_code}_tenant_rate_query_link" <a:link id="${/parameter/@layout_code}_tenant_rate_query_link"
url="${/request/@context_path}/modules/prj/PRJ902/prj_project_score_result.lview"/> url="${/request/@context_path}/modules/prj/PRJ902/prj_project_score_result.lview"/>
...@@ -436,6 +438,22 @@ ...@@ -436,6 +438,22 @@
} }
function prj501n_lease_number_renderer(record_id, ds_id){
var record = $(ds_id).findById(record_id);
var param = {};
param['project_lease_item_id'] = record.get('project_lease_item_id');
param['lease_item_id'] = record.get('lease_item_id');
param['set_number'] = record.get('set_number');
param['document_id'] = record.get('project_id');
param['hide_flag'] ='Y';
param['function_code'] = 'PRJ501INC';
param['function_usage'] = 'QUERY';
param['winid'] = '${/parameter/@layout_code}_project_number_win_id';
param['url_title'] = '租赁物清单';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}lease_number_query_link', record.ds.id, '${/parameter/@layout_code}');
}
//超链接渲染 //超链接渲染
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) { window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
var link_function = ''; var link_function = '';
...@@ -505,6 +523,9 @@ ...@@ -505,6 +523,9 @@
} else if (name == 'contract_number') { } else if (name == 'contract_number') {
link_function = 'prj501n_contract_number_renderer'; link_function = 'prj501n_contract_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value + '</a>'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value + '</a>';
}else if(name=='machine_number_n' && record.get('project_lease_item_id')!=null){
link_function = 'prj501n_lease_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + record.ds.id + '\')">' + '查看明细' + '</a>';
} }
}; };
...@@ -559,6 +580,9 @@ ...@@ -559,6 +580,9 @@
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item'); var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
if(lease_item_ds_id == ds.id &&lease_item_ds_id){ if(lease_item_ds_id == ds.id &&lease_item_ds_id){
var gridId= ds.bindname+'_layout_grid_id'; var gridId= ds.bindname+'_layout_grid_id';
if(division!='30' && division!='50'){
$(gridId).hideColumn('machine_number_n');
}
if(division=='70'&&division!=''){ if(division=='70'&&division!=''){
debugger; debugger;
if(record!=''){ if(record!=''){
...@@ -1016,7 +1040,7 @@ ...@@ -1016,7 +1040,7 @@
} }
//更新时调用 //更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
debugger; debugger;
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project'); var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project');
if(tenant_ds_id == ds.id&&tenant_ds_id){ if(tenant_ds_id == ds.id&&tenant_ds_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