Commit 7d49b1e5 authored by 21471731's avatar 21471731

租赁物导入调整09

parent 04cc7262
......@@ -73,7 +73,7 @@
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_set_number=>${/parameter/@set_number});
p_project_lease_item_id=>${/parameter/@project_lease_item_id});
end;
]]></bm:update-sql>
</bm:operation>
......
......@@ -23,8 +23,6 @@
<bm:update-sql><![CDATA[
begin
prj_project_lease_import_pkg.insert_lease_item_list(
p_session_id=>${/session/@session_id},
p_user_id=>${/session/@user_id},
p_project_lease_item_id=>${@project_lease_item_id});
end;
]]></bm:update-sql>
......
<?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}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -35,10 +35,10 @@
}
}
Leaf.showConfirm('提示', '确定要导入信息吗?', function() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('import_prj_lease_item_list_link_id').getUrl(),
para: {
batch_id: '${/parameter/@batch_id}',
header_id: '${/model/header/record/@header_id}',
lease_item_id:'${/parameter/@lease_item_id}',
project_lease_item_id:'${/parameter/@project_lease_item_id}'
......@@ -50,6 +50,7 @@
msg: '操作成功',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody(), '${l:HLS.EXECUTING}');
import_exit();
}
});
......@@ -82,17 +83,17 @@
<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" height="340" navBar="true" width="980">
<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="80"/>
<a:column name="attribute_2" prompt="租赁物名称" width="80"/>
<a:column name="attribute_3" prompt="型号" width="80"/>
<a:column name="attribute_4" prompt="设备编号" width="80"/>
<a:column name="attribute_5" prompt="设备类型" width="80"/>
<a:column name="attribute_6" prompt="出厂日期" width="80"/>
<a:column name="attribute_7" prompt="设备单价(总)" width="80"/>
<a:column name="attribute_8" prompt="制造商(全称)" width="80"/>
<a:column name="error_message" editor="textArea_e" prompt="错误信息" width="120"/>
<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"/>
......
......@@ -7,13 +7,22 @@
-->
<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"/>
<a:link id="prj501N_lease_exit_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain.lview"/>
<script><![CDATA[
Leaf.onReady(function() {
if ('${/parameter/@hide_flag}' == 'Y') {
$('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');
......@@ -35,7 +44,8 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, record, config_records, bp_seq) {
if(record!=''){
if('${/parameter/@hide_flag}' != 'Y' && record!=''){
record.getField('seq').setReadOnly(true);
record.getField('asset_num').setReadOnly(false);
record.getField('asset_type').setReadOnly(false);
record.getField('asset_name').setReadOnly(false);
......@@ -57,6 +67,7 @@
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;
if (len == 0) {
Leaf.showMessage('${l:PROMPT}','请选择一条记录!');
......@@ -78,7 +89,12 @@
msg: '操作成功',
duration: 2000
});
$(ds_id).query();
if(datas.length==1){
$(ds_id).query();
}else{
success_delete_after();
}
},
error: function() {
},
......@@ -88,6 +104,27 @@
});
};
function success_delete_after(){
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item_list');
var record = $(ds_id);
var data= record.getAt(0);
if(data!=null){
Leaf.request({
url: $('prj501N_lease_item_list_delete_link').getUrl(),
para:{
project_lease_item_id:'${/parameter/@project_lease_item_id}'
},
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');
......@@ -144,14 +181,12 @@
function submit_success_lease(){
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'prj_project_lease_item_list');
var param = {};
param['session_id'] = '${/session/@session_id}';
param['user_id'] = '${/session/@user_id}';
param['project_lease_item_id']='${/parameter/@project_lease_item_id}';
if($(ds_id).validate()){
Leaf.request({
url: $('prj501N_lease_item_list_save_link').getUrl(),
para:param,
para:{
project_lease_item_id:'${/parameter/@project_lease_item_id}'
},
success: function() {
$(ds_id).query();
},
......
......@@ -126,7 +126,7 @@
//add by zhuxianfei
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
debugger;
var url;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
......@@ -444,6 +444,7 @@
}
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_lease_item_id'] = record.get('project_lease_item_id');
......@@ -454,7 +455,7 @@
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','PROJECT_CREATE_NP_F_QUOTATION_N_prj_quotation_ds', '${/parameter/@layout_code}','${/parameter/@winid}','Y');
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');
}
//超链接渲染
......
......@@ -38,6 +38,9 @@
url="${/request/@context_path}/modules/hls/HLS500/hls_fin_doc_quotation.lsc"/>
<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="${/parameter/@layout_code}hls_bp_master_query_link"
url="${/request/@context_path}/modules/hls/HLS215N/hls_bp_master_query.lview"/>
......@@ -436,6 +439,21 @@
}
function prj501n_lease_number_renderer(record_id, ds_id){
debugger;
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}');
}
//超链接渲染
......@@ -507,6 +525,9 @@
} else if (name == 'contract_number') {
link_function = 'prj501n_contract_number_renderer';
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>';
}
};
......@@ -561,8 +582,10 @@
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){
var gridId= ds.bindname+'_layout_grid_id';
if(division!='30' && division!='50'){
$(gridId).hideColumn('machine_number_n');
}
if(division=='70'&&division!=''){
debugger;
if(record!=''){
record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true);
......
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