Commit 62927ff5 authored by 38823's avatar 38823

经租开发代码增补

parent 6ababe17
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: zhangxing5129
$Date: 2014-10-13 下午01:02:37
$Revision: 1.0
$Purpose: 项目创建校验
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:parameters>
<bm:parameter name="cdd_list_id" dataType="java.lang.Long" input="true" output="true" outputPath="@cdd_list_id"/>
</bm:parameters>
<bm:update-sql><![CDATA[
BEGIN
hlcm_pur_order_pkg.pur_create_save_check(p_project_id =>${@project_id},
p_user_id =>${/session/@user_id},
p_function_code =>${@function_code},
p_function_usage =>${@function_usage},
p_project_status =>${@project_status},
p_bp_id_tenant =>${@bp_id_tenant},
p_cdd_list_id => ${@cdd_list_id});
END;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="query">
<bm:query-sql>
select bp.bp_wfl_status from hls_bp_master bp where bp.bp_id =${@bp_id_tenant}
</bm:query-sql>
</bm:operation>
</bm:operations>
</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="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 = 'PURCHASE_ORDER_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
hlcm_pur_order_pkg.purchase_order_import_lease(p_header_id =>${/parameter/@header_id},
p_project_id =>${@project_id},
p_user_id =>${/session/@user_id});
end;
]]>
</bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
hlcm_pur_order_pkg.purchase_import_lease_check(p_header_id => ${/model/header/record/@header_id},
p_project_id =>${@project_id},
p_user_id => ${/session/@user_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: wangwei
$Date: 2023-8-31 上午09:26:12
$Revision: 1.0
$Purpose: 恢复页面至最初用于经营性租赁使用
-->
<a:screen xmlns:c="leaf.application.action" xmlns:s="leaf.plugin.script" xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" customizationEnabled="true" trace="true">
<a:init-procedure participants="leaf.service.exception.ExceptionHandler">
<a:model-query defaultWhereClause="d.enabled_flag=&apos;Y&apos; and nvl(d.display_flag,&apos;N&apos;)!=&apos;N&apos;" fetchAll="true" model="hls.HLS500.hls_fin_calc_config_ln" rootPath="calc_config_ln_path"/>
<a:model-query defaultWhereClause="d.enabled_flag=&apos;Y&apos;" fetchAll="true" model="hls.HLS500.hls_fin_calc_config_ln" rootPath="calc_config_ln_all_path"/>
<a:model-query fetchAll="true" model="hls.HLS500.hls_fin_calc_button" rootPath="calc_button_path"/>
<a:model-query defaultWhereClause="t.enabled_flag=&apos;Y&apos; and (t.display_flag=&apos;Y&apos; or (t.display_flag=&apos;C&apos; and exists(select 1 from hls_fin_calc_config_quote q where q.calc_session_id=${/parameter/@calc_session_id} and q.layout_area_seq=&apos;H&apos; and q.column_name=t.column_name and q.display_flag=&apos;Y&apos;)))" fetchAll="true" model="hls.HLS500N.hls_fin_calc_config_hd_n" rootPath="calc_config_hd_path"/>
<a:model-query defaultWhereClause="t.enabled_flag=&apos;Y&apos; and (t.display_flag=&apos;N&apos; or (t.display_flag=&apos;C&apos; and not exists(select 1 from hls_fin_calc_config_quote q where q.calc_session_id=${/parameter/@calc_session_id} and q.layout_area_seq=&apos;H&apos; and q.column_name=t.column_name and q.display_flag=&apos;Y&apos;)))" fetchAll="true" model="hls.HLS500N.hls_fin_calc_config_hd_n" rootPath="temp_config_hd_path"/>
<p:set field="/parameter/@dynamic_base_table" value="HLS_FIN_CALCULATOR_LN_FORMULA"/>
<a:model-query fetchAll="true" model="hls.HLS500N.hls_fin_calculator_common" rootPath="ln_formula_path"/>
<p:set field="/parameter/@dynamic_base_table" value="HLS_FIN_CALCULATOR_HD_FORMULA"/>
<a:model-query fetchAll="true" model="hls.HLS500N.hls_fin_calculator_common" rootPath="hd_formula_path"/>
<p:set field="/parameter/@dynamic_base_table" value="null"/>
<a:model-query defaultwhereclause="(d.layout_area_seq = &apos;H&apos;)" fetchAll="true" model="hls.HLS500N.hls_parameter_value_lov_load_n" rootPath="hd_parameter_sql_value"/>
<a:model-query defaultwhereclause="(d.layout_area_seq = &apos;L&apos;)" fetchAll="true" model="hls.HLS500N.hls_parameter_value_lov_load_n" rootPath="ln_parameter_sql_value"/>
<p:exception-handles>
<p:catch Exception="*">
<p:action name="HandleException"/>
<p:action name="CreateErrorResponse"/>
</p:catch>
</p:exception-handles>
</a:init-procedure>
<a:view>
<!-- <a:link id="hls_parameter_value_lov_link" url="${/request/@context_path}/modules/hls/HLS500/hls_parameter_value_lov.lview"/> -->
<a:link id="hls_fin_calculator_price_list" url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_price_list_n.lview"/>
<a:link id="hls_fin_calc_update" url="${/request/@context_path}/modules/hls/HLS500/hls_fin_calc_update.lsc"/>
<a:link id="hls_fin_calculator_update" url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_update_n_for_ol.lview"/>
<a:link id="hls_fin_calc_formula_update" url="${/request/@context_path}/modules/hls/HLS500/hls_fin_calc_formula_update.lview"/>
<a:link id="hls_fin_calc_quotation_choose_id" url="${/request/@context_path}/modules/hls/HLS500/hls_fin_calc_quotation_choose.lview"/>
<a:link id="hls_fin_calc_import_line_link_id" url="${/request/@context_path}/modules/hls/HLS500/hls_fin_calc_import_line.lview"/>
<a:link id="hls_fin_calc_show_display_line_link_id" url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calc_show_display_line_n.lview"/>
<a:link id="con_check_con_record_link_id" model="hls.HLS500N.check_con_record" modelaction="execute"/>
<style><![CDATA[
.finGrid td[dataindex=percent]{
border-right-color:#FFF;
background-color:#FFF;
border-bottom-color:#FFF;
}
.item-options{
background:#ffffff;
}
.cell-editor{
border:none;
margin-left:3px;
}
]]></style>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<a:screen-include screen="modules/hls/HLS500/hls_fin_calcuator_dynamic_ol.lview?calc_session_id=${/parameter/@calc_session_id}&amp;calc_type=CLASSIC_CALCULATOR&amp;document_category=${/parameter/@document_category}&amp;winId=${/parameter/@winId}"/>
<script type="text/javascript"><![CDATA[
var formula_column_name = '';
var formula_column_code = '';
var formula_prompt = '';
var formula_row = '';
var formula_calc_line_id = '';
var recreate_L_formula_value = [];
var recreate_L_formula = '${/parameter/@recreate_L_formula}' || 'N';
var recreate_H_formula = '${/parameter/@recreate_H_formula}' || 'N';
var global_button_code = '';
var global_save_data_first = '';
var global_action_after_button = '';
var global_javascript = '';
var quotation_update_flag = 'N';
var errorColor = {
ERROR: 'FFFF00'
};
var hd_calc_formula_orign_value = [],
hd_calc_orign_value = [],
ln_calc_formula_orign_value = [],
ln_calc_orign_value = [];
Leaf.Masker.mask(document.documentElement, '${l:HLS.LOADING}');
function hls_hls500_save(nextStep, source_procedure) {
lock_calc_current_window('${l:HLS.SAVING}');
if (!$('hls_fin_calculator_hd_ds').validate() || !$('hls_fin_calculator_ln_ds').validate()) {
unlock_calc_current_window();
return;
}
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0;i < temp_head_records.length;i++) {
if (!$('temp_hd_attribute_ds').find('column_code', temp_head_records[i].get('column_code'))) {
$('temp_hd_attribute_ds').create(temp_head_records[i].data);
}
}
var all_records = $('temp_hd_attribute_ds').getAll();
var headRecord = $('hls_fin_cal_save_hd_ds').getAt(0);
headRecord.isNew = false;
headRecord.dirty = true;
create_record_column(all_records, headRecord);
function hls_fin_cal_save_hd_submitsuccess(ds, res) {
if (typeof(nextStep) == 'function') {
nextStep(source_procedure);
} else {
function on_ln_formula_load(ds) {
Leaf.SideBar.enable = true;
success_sidebar_show();
unlock_calc_current_window();
$('ln_formula_ds').un('load', on_ln_formula_load);
}
$('ln_formula_ds').on('load', on_ln_formula_load);
$('ln_formula_ds').query();
}
}
$('hls_fin_cal_save_hd_ds').on('submitsuccess', hls_fin_cal_save_hd_submitsuccess);
Leaf.SideBar.enable = false;
$('hls_fin_cal_save_hd_ds').submit();
}
function on_hls_fin_cal_save_hd_submitfailed(ds, res) {
unlock_calc_current_window();
}
function hls_hls500_calc() {
lock_calc_current_window('${l:HLS.CALCULATING}');
hls_hls500_save(calc_execute, 'CALC');
}
function hls_hls500_re_calc() {
lock_calc_current_window('${l:HLS.CALCULATING}');
hls_hls500_save(calc_execute, 'RE_CALC');
}
function open_after_save_execute() {
if ('${/parameter/@global_flag}' == 'Y') {
var url = $('hls_fin_calculator_update').getUrl();
var id_num = '${/parameter/@id_num}' * 1 + 1;
var winId = 'global_hls_fin_calculator_update_id' + id_num;
current_win_close();
unlock_calc_current_window();
new Leaf.Window({
id: winId,
params: {
calc_session_id: '${/parameter/@calc_session_id}',
document_id: '${/parameter/@document_id}',
quotation_id: '${/parameter/@quotation_id}',
document_category: '${/parameter/@document_category}',
calc_type: '${/parameter/@calc_type}',
dsId: '${/parameter/@dsId}',
dsId1: '${/parameter/@dsId1}',
winId: winId,
winId1: '${/parameter/@winId1}',
global_flag: 'Y',
id_num: id_num,
recreate_H_formula: recreate_H_formula,
recreate_L_formula: recreate_L_formula
},
url: url,
title: '${l:HLS.FIN_CALCULATOR}',
fullScreen: true
});
} else {
window.location.href = $('hls_fin_calculator_update').getUrl() + '?calc_session_id=' + '${/parameter/@calc_session_id}';
}
}
function calc_execute(source_procedure) {
var final_recreate_H_formula, final_recreate_L_formula;
if (source_procedure == 'RE_CALC') {
final_recreate_H_formula = 'Y';
final_recreate_L_formula = 'Y';
} else {
final_recreate_H_formula = recreate_H_formula;
final_recreate_L_formula = recreate_L_formula;
}
Leaf.request({
url: '${/request/@context_path}/autocrud/hls.HLS500.hls_fin_calculator_calc/update',
para: {
calc_session_id: '${/parameter/@calc_session_id}',
document_id: '${/parameter/@document_id}',
document_category: '${/parameter/@document_category}',
recreate_H_formula: final_recreate_H_formula,
recreate_L_formula: final_recreate_L_formula,
quotation_id: '${/parameter/@quotation_id}'
},
success: function(res) {
on_calc_success_query('${/parameter/@dsId}', '${/parameter/@document_category}');
get_warning_message(res.result.warning_message);
recreate_H_formula = 'N';
recreate_L_formula = 'N';
open_after_save_execute();
},
failure: function() {
unlock_calc_current_window();
},
error: function() {
unlock_calc_current_window();
},
scope: this
});
}
function hls_formatMoney(v, p) {
return Leaf.formatNumber(v, p);
}
function hls_formatMoney_zero_fill(v, p) {
return Leaf.formatNumber(v, p).replace(/0*$/g, '').replace(/\.$/, '');
}
function is_false_return(value) {
if (isNaN(value) && Ext.isDefined(value)) {
if (value.substring(0, 1) == '#') {
return false;
}
} else {
return true;
}
}
function setGridCellStyle(record, name, cls) {
var id = 'hls_fin_calculator_hd_grid_id_' + name + '_' + record.id,
intervalId = setInterval(function() {
var div = Ext.get(id);
if (div) {
if (!div.getBorderWidth('t r b l')) {
div = div.parent();
}
clearInterval(intervalId);
div.dom.className = '';
div.addClass(cls);
}
}, 10);
}
function seedetail_column_hd(value, record, name) {
var field = record.getField(name);
if (field.isRequired()) {
setGridCellStyle(record, name, 'item-notBlank');
} else if (!field.isRequired() && !field.isReadOnly()) {
setGridCellStyle(record, name, 'item-options');
}
if (is_false_return(value) == false) {
return "<div style='background-color:#" + errorColor['ERROR'] + "'>" + value + "</div>";
}
if (record.get('validation_type') == 'NUMBERFIELD' && (value || value === 0)) {
if (record.get('allow_format') == 'TRUE') {
if (record.get('precision')) {
if (record.get('zero_fill') == 'TRUE') {
return hls_formatMoney(value, record.get('precision'));
} else {
return hls_formatMoney_zero_fill(value, record.get('precision'));
}
} else {
return hls_formatMoney(value);
}
} else {
if (record.get('precision') && record.get('allow_decimal') == 'TRUE') {
if (record.get('zero_fill') == 'TRUE') {
return parseFloat(value).toFixed(record.get('precision'));
} else {
return parseFloat(value).toFixed(record.get('precision')).replace(/0*$/g, '').replace(/\.$/, '');
}
} else {
if (record.get('allow_decimal') == 'TRUE') {
return value;
} else {
return parseFloat(parseFloat(value).toFixed(0));
}
}
}
} else if (record.get('validation_type') == 'DATEPICKER') {
return Leaf.formatDate(value);
} else {
return value;
}
}
function wrap_render(value, record, name) {
var editor_record = $('line_attribute_ds').find('column_name', name);
if (editor_record.get('validation_type') == 'NUMBERFIELD' && editor_record.get('input_mode') != 'READONLY' && name != 'times' && editor_record.get('sys_grid_col_underline') == 'Y' && !Ext.isEmpty(value)) {
return '<u>' + seedetail_column_ln(value, record, name) + '</u>';
} else {
return seedetail_column_ln(value, record, name);
}
}
function seedetail_column_ln(value, record, name) {
if (is_false_return(value) == false) {
return "<div style='background-color:#" + errorColor['ERROR'] + "'>" + value + "</div>";
}
var editor_record = $('line_attribute_ds').find('column_name', name);
if (editor_record.get('validation_type') == 'NUMBERFIELD' && (value || value === 0)) {
if (editor_record.get('allow_format') == 'TRUE') {
if (editor_record.get('precision')) {
if (editor_record.get('zero_fill') == 'TRUE') {
return hls_formatMoney(value, editor_record.get('precision'));
} else {
return hls_formatMoney_zero_fill(value, editor_record.get('precision'));
}
} else {
return hls_formatMoney(value);
}
} else {
if (editor_record.get('precision') && editor_record.get('allow_decimal') == 'TRUE') {
if (editor_record.get('zero_fill') == 'TRUE') {
return parseFloat(value).toFixed(editor_record.get('precision'));
} else {
return parseFloat(value).toFixed(editor_record.get('precision')).replace(/0*$/g, '').replace(/\.$/, '');
}
} else {
if (editor_record.get('allow_decimal') == 'TRUE') {
return value;
} else {
return parseFloat(parseFloat(value).toFixed(0));
}
}
}
} else if (editor_record.get('validation_type') == 'DATEPICKER') {
return Leaf.formatDate(value);
} else {
return value;
}
}
function parameter_function(record, name) {
var field = record.getField(name),
ds = $('hls_fin_calculator_hd_ds'),
input_mode = record.get('input_mode');
set_field_input_mode(record, field, name, input_mode);
special_editor_function(ds, record, name);
if (record.get('alignment')) {
Ext.each($('hls_fin_calculator_hd_grid_id').columns, function(c) {
if (c.name == name) {
c.align = record.get('alignment');
}
});
}
if (record.get('validation_type') == 'NUMBERFIELD') {
if (record.get('allow_decimal') == 'TRUE') {
field.setPropertity('allowdecimals', true);
} else {
field.setPropertity('allowdecimals', false);
}
if (record.get('precision') || record.get('precision') == 0) {
field.setPropertity('decimalprecision', record.get('precision'));
}
if (record.get('zero_fill') == 'TRUE') {
field.setPropertity('allowpad', true);
} else {
field.setPropertity('allowpad', false);
}
set_field_limit(record, field);
if (field.get('readonly')) {
return '';
} else {
return 'hls500_hd_numberfield_id';
}
} else if (record.get('validation_type') == 'LOV') {
var documentMapping;
if (record.get('lov_return_vcode') == 'Y') {
documentMapping = [{
from: 'value_code',
to: name
}];
} else {
documentMapping = [{
from: 'value_name',
to: name
}, {
from: 'value_code',
to: name + '_c'
}];
}
var hd_parameter_sql_value_record = $('hd_parameter_sql_value_ds').find('column_code', record.get('column_code'));
field.setLovPara('validation_sql', hd_parameter_sql_value_record.get('validation_sql'));
field.setTitle(record.get('prompt'));
field.setMapping(documentMapping);
field.setLovModel('hls.HLS500.hls_parameters_lov');
if (field.get('readonly')) {
return '';
} else {
return 'hls500_hd_lov_id';
}
} else if (record.get('validation_type') == 'COMBOBOX') {
var combobox_ds = record.get('layout_area_seq') + '_' + record.get('column_name') + '_combobox_ds';
combobox_ds = $(combobox_ds);
field.setOptions(combobox_ds);
combobox_ds.setQueryParameter('validation_sql', record.get('validation_sql'));
var comboBoxMapping;
field.setPropertity('valuefield', 'value_code');
if (record.get('lov_return_vcode') == 'Y') {
field.setPropertity('displayfield', 'value_code');
comboBoxMapping = [{
from: 'value_code',
to: name
}];
} else {
field.setPropertity('displayfield', 'value_name');
comboBoxMapping = [{
from: 'value_code',
to: name + '_c'
}];
}
field.setMapping(comboBoxMapping);
if (field.get('readonly')) {
return '';
} else {
return 'hls500_hd_combobox_id';
}
} else if (record.get('validation_type') == 'TEXTFIELD') {
if (field.get('readonly')) {
return '';
} else {
return 'hls500_hd_textfield_id';
}
} else if (record.get('validation_type') == 'DATEPICKER') {
return 'hls500_hd_datepicker_id';
} else if (record.get('validation_type') == 'CHECKBOX') {
field.setPropertity('checkedvalue', 'Y');
field.setPropertity('uncheckedvalue', 'N');
if (field.get('readonly')) {
return '';
} else {
return 'hls500_hd_checkbox_id';
}
} else if (record.get('validation_type') == 'BOOLEAN_CHECKBOX') {
field.setPropertity('checkedvalue', '1');
field.setPropertity('uncheckedvalue', '0');
if (field.get('readonly')) {
return '';
} else {
return 'hls500_hd_checkbox_id';
}
} else {
return '';
}
}
function do_hls500_column_name(record, name) {
var editor_record = $('line_attribute_ds').find('column_name', name),
field = record.getField(name),
input_mode = editor_record.get('input_mode');
set_field_input_mode(record, field, name, input_mode);
if (editor_record.get('validation_type') == 'NUMBERFIELD') {
if (editor_record.get('allow_decimal') == 'TRUE') {
field.setPropertity('allowdecimals', true);
} else {
field.setPropertity('allowdecimals', false);
}
if (editor_record.get('precision') || editor_record.get('precision') == 0) {
field.setPropertity('decimalprecision', editor_record.get('precision'));
}
if (editor_record.get('zero_fill') == 'TRUE') {
field.setPropertity('allowpad', true);
} else {
field.setPropertity('allowpad', false);
}
set_field_limit(editor_record, field);
if (field.get('readonly')) {
return '';
} else {
if (name == 'times' && (!record.isNew)) {
return '';
}
return 'hls500_ln_numberfield_id';
}
} else if (editor_record.get('validation_type') == 'LOV') {
var documentMapping = [{
from: 'value_code',
to: name
}];
var ln_parameter_sql_value_record = $('ln_parameter_sql_value_ds').find('column_code', editor_record.get('column_code'));
field.setLovPara('validation_sql', ln_parameter_sql_value_record.get('validation_sql'));
field.setTitle(editor_record.get('prompt'));
field.setMapping(documentMapping);
field.setLovModel('hls.HLS500.hls_parameters_lov');
if (field.get('readonly')) {
return '';
} else {
return 'hls500_ln_lov_id';
}
} else if (editor_record.get('validation_type') == 'TEXTFIELD') {
if (field.get('readonly')) {
return '';
} else {
return 'hls500_ln_textfield_id';
}
} else if (editor_record.get('validation_type') == 'DATEPICKER') {
return 'hls500_ln_datepicker_id';
} else if (editor_record.get('validation_type') == 'CHECKBOX') {
field.setPropertity('checkedvalue', 'Y');
field.setPropertity('uncheckedvalue', 'N');
if (field.get('readonly')) {
return '';
} else {
return 'hls500_ln_checkbox_id';
}
} else if (editor_record.get('validation_type') == 'BOOLEAN_CHECKBOX') {
field.setPropertity('checkedvalue', '1');
field.setPropertity('uncheckedvalue', '0');
if (field.get('readonly')) {
return '';
} else {
return 'hls500_ln_checkbox_id';
}
} else {
return '';
}
}
function hls_hls500_add() {
$('hls_fin_calculator_ln_grid_id').showEditorByRecord($('hls_fin_calculator_ln_ds').create(0));
}
function hls_hls500_return() {
if ('${/parameter/@global_flag}' == 'Y') {
current_win_close();
} else {
var url = $('hls_fin_calculator_price_list').getUrl();
window.location.href = url;
}
}
function do_hls500_line_load(ds) {
var lineRecords = ds.getAll();
var attribute_records = $('line_attribute_ds').getAll();
if (!lineRecords) {
return;
}
if ('${/model/calc_config_hd_path/record/@show_column_code}' == 'Y') {
for (var i = 0;i < lineRecords.length;i++) {
var ln_formula_record = $('ln_formula_ds').find('calc_line_id', lineRecords[i].get('calc_line_id'));
for (var j = 0;j < attribute_records.length;j++) {
var column_name = attribute_records[j].get('column_name');
var tooltip_ln_formula = escapeHtml(appendBr(ln_formula_record.get(column_name), 60));
lineRecords[i].getField(column_name).setPropertity('tooltip', tooltip_ln_formula);
}
}
}
}
function do_hls500_line_update(ds, record, name, value, old_value) {
if (quotation_update_flag == 'N') {
quotation_update_flag = 'Y';
}
if (Ext.isEmpty(ln_calc_orign_value[name])) {
ln_calc_orign_value[name] = old_value;
}
var formula_record = $('ln_formula_ds').find('calc_line_id', record.get('calc_line_id'));
if (formula_record) {
if (Ext.isEmpty(ln_calc_formula_orign_value[name])) {
ln_calc_formula_orign_value[name] = formula_record.get(name);
}
if (value == ln_calc_orign_value[name]) {
formula_record.set(name, ln_calc_formula_orign_value[name]);
} else {
formula_record.set(name, value);
}
}
onLineupdate_setEmpty(ds, record, name, value, old_value);
}
function do_hls500_head_update(ds, record, name, value, old_value) {
if (record.get('lov_return_vcode') == 'N' && (record.get('validation_type') == 'COMBOBOX' || record.get('validation_type') == 'LOV')) {
value = record.get('column_value_c');
} else {
if (name == 'column_value') {
record.set('column_value_c', value);
}
}
var column_name = record.get('column_name');
if (Ext.isEmpty(hd_calc_orign_value[column_name])) {
hd_calc_orign_value[column_name] = old_value;
}
if (quotation_update_flag == 'N') {
quotation_update_flag = 'Y';
}
var formula_record = $('hd_formula_ds').getAt(0);
if (Ext.isEmpty(hd_calc_formula_orign_value[column_name])) {
hd_calc_formula_orign_value[column_name] = formula_record.get(column_name);
}
if (value == hd_calc_orign_value[column_name]) {
formula_record.set(column_name, hd_calc_formula_orign_value[column_name]);
} else {
if (record.get('percent') == '%' && !Ext.isEmpty(value)) {
formula_record.set(column_name, div(value, 100));
} else {
formula_record.set(column_name, value);
}
}
if (column_name == 'lease_times' || column_name == 'ccr_outstanding_times') {
if (!recreate_L_formula_value[column_name]) {
recreate_L_formula_value[column_name] = old_value;
}
if (value != recreate_L_formula_value[column_name]) {
recreate_L_formula = 'Y';
} else {
recreate_L_formula = 'N';
}
}
onEditorupdate(ds, record, name, value, old_value);
}
function hls_hls500_formula_change() {
if (!formula_column_name) {
Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS500.CHANGE_FORMULA_FIELD}');
return;
}
if (!formula_calc_line_id) {
Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS500.CHANGE_HD_FIELD}' + formula_prompt, function() {
openWindow();
}, function() {
return;
}, null, null);
} else {
Leaf.request({
url: '${/request/@context_path}/autocrud/hls.HLS500.hls_fin_calc_config_ln/query',
para: {
calc_session_id: '${/parameter/@calc_session_id}',
column_name: formula_column_name
},
success: function(res) {
formula_column_code = res.result.record.column_code;
Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS500.CHANGE_LN_FIELD}' + formula_row + '${l:HLS500.LN_FIELD}' + formula_prompt, function() {
openWindow();
}, function() {
return;
}, null, null);
},
scope: this
});
}
}
function hls500_hd_cellcick(grid, row, name, record) {
formula_column_name = record.get('column_name');
formula_column_code = record.get('column_code');
formula_prompt = record.get('prompt');
formula_calc_line_id = '';
formula_row = row;
}
function hls500_ln_cellcick(grid, row, name, record) {
var ln_formula_record = $('line_attribute_ds').find('column_name', name);
formula_column_name = name;
formula_column_code = '';
formula_prompt = ln_formula_record.get('prompt');
formula_calc_line_id = record.get('calc_line_id');
formula_row = row;
}
function openWindow() {
var url = $('hls_fin_calc_formula_update').getUrl();
new Leaf.Window({
id: 'hd_formula_update_winid',
url: url,
params: {
calc_session_id: '${/parameter/@calc_session_id}',
document_id: '${/parameter/@document_id}',
document_category: '${/parameter/@document_category}',
column_name: formula_column_name,
column_code: formula_column_code,
prompt: formula_prompt,
calc_line_id: formula_calc_line_id,
winid: 'hd_formula_update_winid'
},
title: '${l:HLS500.FORMULA_UPDATE}',
height: 300,
width: 400
});
}
function escapeHtml(str) {
if (Ext.isEmpty(str) || !Ext.isString(str)) {
return str;
}
return $L.escapeHtml(str).replace(/&lt;br\/&gt;/gm, '<br/>');
}
function appendBr(s, max) {
if (s) {
for (var i = max || 10;i < s.length;i += max + 5) {
s = s.substr(0, i) + '<br/>' + s.substr(i);
}
return s;
} else {
return '';
}
}
function on_hd_load_last_deal(ds, each_record) {
var value;
if (each_record.get('lov_return_vcode') == 'N' && (each_record.get('validation_type') == 'COMBOBOX' || each_record.get('validation_type') == 'LOV')) {
value = each_record.get('column_value_c');
} else {
value = each_record.get('column_value');
}
onEditor_load_fire(ds, each_record, each_record.get('column_name'), value, null);
}
function onEditorHdload(ds) {
var headRecords = ds.getAll();
if ('${/parameter/@document_category}' == 'CONTRACT') {
Leaf.request({
url: $('con_check_con_record_link_id').getUrl(),
para: {
'contract_id': '${/parameter/@document_id}'
},
success: function (res) {
var contract_status = res.result.contract_status;
var sign_contract_status = res.result.sign_contract_status;
if (sign_contract_status == 'SIGN' || sign_contract_status == 'SIGNING' || contract_status == 'NEW' || contract_status == 'INCEPT_RETURN') {
//签约前合同变更才放开部分字段,其他维持原合同起租时租赁日调整逻辑
/*if('${/parameter/@layout_code}'!='CCR_BEFORE_SIGN'){*/
for (var i = 0; i < headRecords.length; i++) {
var column_name = headRecords[i].get('column_name');
if (column_name != "lease_start_date" && column_name !="first_pay_date") {
headRecords[i].set('input_mode', 'READONLY');
headRecords[i].set('readonly_input_mode', 'TRUE');
headRecords[i].getField('column_value').setReadOnly(true);
headRecords[i].getField('column_value_c').setReadOnly(true);
}
}
} else {
for (var i = 0; i < headRecords.length; i++) {
headRecords[i].set('input_mode', 'READONLY');
headRecords[i].set('readonly_input_mode', 'TRUE');
headRecords[i].getField('column_value').setReadOnly(true);
headRecords[i].getField('column_value_c').setReadOnly(true);
}
}
},
failure: function () {
unlock_calc_current_window('${l:HLS.SAVING}');
},
error: function () {
unlock_calc_current_window('${l:HLS.SAVING}');
},
scope: this
});
}
if (headRecords[0].get('show_column_code') == 'N') {
$('hls_fin_calculator_hd_grid_id').hideColumn('column_code');
$('hls_fin_calculator_export_grid_id').hideColumn('column_code');
} else {
var hd_formula_record = $('hd_formula_ds').getAt(0);
for (var i = 0;i < headRecords.length;i++) {
var column_name = headRecords[i].get('column_name');
var tooltip_hd_formula = escapeHtml(appendBr(hd_formula_record.get(column_name), 60));
headRecords[i].getField('column_code').setPropertity('tooltip', tooltip_hd_formula);
headRecords[i].getField('prompt').setPropertity('tooltip', tooltip_hd_formula);
headRecords[i].getField('column_value').setPropertity('tooltip', tooltip_hd_formula);
}
}
Ext.each(ds.getAll(), function(each_record) {
each_record.isNew = true;
Ext.iterate(ds.fields, function(key) {
key == 'column_value' && parameter_function(each_record, key);
})
});
Ext.each(ds.getAll(), function(each_record) {
on_hd_load_last_deal(ds, each_record);
});
Ext.each($('temp_hd_attribute_ds').getAll(), function(each_record) {
on_hd_load_last_deal($('temp_hd_attribute_ds'), each_record);
});
Leaf.Masker.unmask(document.documentElement);
}
function hls500_define_button(btn) {
lock_calc_current_window();
global_button_code = btn.id.substring(7);
var button_record = $('calc_button_ds').find('button_code', global_button_code);
global_save_data_first = button_record.get('save_data_first');
global_action_after_button = button_record.get('action_after_button');
global_javascript = button_record.get('javascript');
if (Ext.isDefined(global_javascript)) {
if (global_save_data_first == 'Y') {
hls_hls500_save(hls500_define_button_js);
} else {
hls500_define_button_js();
}
} else {
if (global_save_data_first == 'Y') {
hls_hls500_save(hls500_define_button_execute);
} else {
hls500_define_button_execute();
}
}
}
function hls500_action_after_button() {
if (global_action_after_button == 'EXIT') {
hls_hls500_return();
} else if (global_action_after_button == 'QUERY') {
open_after_save_execute();
}
}
function hls500_define_button_js() {
// if (window.execScript) {
// window.execScript(global_javascript);
// } else {
eval(global_javascript);
// }
unlock_calc_current_window();
hls500_action_after_button();
}
function hls500_define_button_execute() {
Leaf.request({
url: '${/request/@context_path}/autocrud/hls.HLS500.hls_fin_calc_user_define_btn/update',
para: {
calc_session_id: '${/parameter/@calc_session_id}',
button_code: global_button_code,
document_id: '${/parameter/@document_id}',
document_category: '${/parameter/@document_category}'
},
success: function(res) {
parent.Leaf.SideBar.show({
html: '<div style="background-color:#ccfbd5;position:absolute;padding:3px;border:1px solid #009900">' + res.result.return_value + '</div>',
duration: 5000
});
unlock_calc_current_window();
hls500_action_after_button();
},
failure: function() {
unlock_calc_current_window();
},
error: function() {
unlock_calc_current_window();
},
scope: this
});
}
function hls500_hd_process(datas) {
for (var i = 0;i < datas.length;i++) {
var temp = datas[i];
if (temp.data['validation_type'] == 'NUMBERFIELD') {
temp.data['column_value'] = isNaN(temp.data['column_value']) == true ? temp.data['column_value'] : parseFloat(parseFloat(temp.data['column_value']).toFixed(temp.data['precision']));
}
}
return datas;
}
function hls500_hd_formula_process(datas) {
for (var i = 0;i < datas.length;i++) {
var temp = datas[i];
if (Ext.isDefined(temp.data)) {
temp = temp.data;
}
for (var name in temp) {
var temp_record = $('hd_attribute_ds').find('column_name', name);
if (temp_record) {
if (temp_record.get('validation_type') == 'NUMBERFIELD') {
temp[name] = isNaN(temp[name]) == true ? temp[name] : parseFloat(parseFloat(temp[name]).toFixed(temp_record.get('precision')));
}
}
}
}
return datas;
}
function hls500_ln_process(datas) {
for (var i = 0;i < datas.length;i++) {
var temp = datas[i];
for (var name in temp.data) {
var temp_record = $('line_attribute_ds').find('column_name', name);
if (temp_record) {
if (temp_record.get('validation_type') == 'NUMBERFIELD') {
temp.data[name] = isNaN(temp.data[name]) == true ? temp.data[name] : parseFloat(parseFloat(temp.data[name]).toFixed(temp_record.get('precision')));
}
}
}
}
return datas;
}
function hls500_ln_formula_process(datas) {
for (var i = 0;i < datas.length;i++) {
var temp = datas[i];
if (Ext.isDefined(temp.data)) {
temp = temp.data;
}
for (var name in temp) {
var temp_record = $('line_attribute_ds').find('column_name', name);
if (temp_record) {
if (temp_record.get('validation_type') == 'NUMBERFIELD') {
temp[name] = isNaN(temp[name]) == true ? temp[name] : parseFloat(parseFloat(temp[name]).toFixed(temp_record.get('precision')));
}
}
}
}
return datas;
}
function hls_hls500_delete() {
$('hls_hls500_delete_id').disable();
var records = $('hls_fin_calculator_ln_ds').getSelected();
if (!records.length) {
Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.SELECT_RECORD}');
$('hls_hls500_delete_id').enable();
return;
}
var saveData = [];
for (var i = 0;i < records.length;i++) {
records[i].set('_status', 'delete');
records[i].set('document_id', '${/parameter/@document_id}');
records[i].set('document_category', '${/parameter/@document_category}');
saveData.push(records[i].data);
}
Leaf.request({
url: '${/request/@context_path}/autocrud/hls.HLS500.hls_fin_calc_delete_ln/batch_update',
para: saveData,
success: function() {
success_sidebar_show();
$('hls_fin_calculator_ln_grid_id').clear();
$('hls_hls500_delete_id').enable();
},
failure: function() {
$('hls_hls500_delete_id').enable();
},
error: function() {
$('hls_hls500_delete_id').enable();
},
scope: this
});
}
function hls_hls500_quotation() {
if (quotation_update_flag == 'Y') {
Leaf.showMessage('${l:PROMPT}', '${l:HLS500.QUOTATION_CALC_FIRST}');
return;
}
if ('${/parameter/@global_flag}' == 'Y') {
lock_calc_current_window('${l:HLS.SAVING}');
Leaf.request({
url: '${/request/@context_path}/autocrud/hls.HLS500.hls_quotation_save/insert',
para: {
calc_session_id: '${/parameter/@calc_session_id}',
document_id: '${/parameter/@document_id}',
document_category: '${/parameter/@document_category}'
},
success: function() {
$('${/parameter/@dsId}').query();
if ('${/parameter/@quotation_id}') {
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_choose_winid',
params: {
quotation_id: '${/parameter/@quotation_id}',
document_id: '${/parameter/@document_id}',
document_category: '${/parameter/@document_category}',
dsId: '${/parameter/@dsId}',
dsId1: '${/parameter/@dsId1}',
winId: '${/parameter/@winId}',
winId1: '${/parameter/@winId1}'
},
url: $('hls_fin_calc_quotation_choose_id').getUrl(),
title: '${l:PROMPT}',
height: 200,
width: 400
});
win.on('close', function() {
unlock_calc_current_window();
});
} else {
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
}
unlock_calc_current_window();
},
failure: function() {
unlock_calc_current_window();
},
error: function() {
unlock_calc_current_window();
},
scope: this
});
}
}
function hls_hls500_export() {
$('hls_fin_calculator_export_ds').query();
function on_hls_fin_calculator_export_load() {
$('hls_fin_calculator_export_grid_id')._export();
$('hls_fin_calculator_export_ds').un('load', on_hls_fin_calculator_export_load);
}
$('hls_fin_calculator_export_ds').on('load', on_hls_fin_calculator_export_load);
}
function hd_grid_rowrenderer() {
return 'background-color:#f3f3f3';
}
function do_hls500_line_remove(ds, record, index) {
var formula_record = $('ln_formula_ds').find('calc_line_id', record.get('calc_line_id'));
$('ln_formula_ds').remove(formula_record);
}
function hls_hls500_restructure() {
lock_calc_current_window('${l:HLS.CALCULATING}');
var win = Leaf.showConfirm('${l:PROMPT}', '${l:HLS.SAVE_FIRST}', function() {
hls_hls500_save(hls_hls500_restructure_execute);
}, function() {
hls_hls500_restructure_execute()
}, null, null);
win.on('close', function() {
unlock_calc_current_window();
});
}
function hls_hls500_restructure_execute() {
Leaf.request({
url: '${/request/@context_path}/autocrud/hls.HLS500.hls_fin_calc_structure_execute/update',
para: {
calc_session_id: '${/parameter/@calc_session_id}'
},
success: function() {
open_after_save_execute();
},
failure: function() {
unlock_calc_current_window();
},
error: function() {
unlock_calc_current_window();
},
scope: this
});
}
Leaf.onReady(function() {
Ext.fly('hls_fin_calculator_export_grid_id_wrap').setStyle({
display: 'none'
});
});
function hls_hls500_import() {
$('hls_hls500_import_id').disable();
hls_hls500_save(hls_hls500_import_detail);
}
function hls_hls500_import_detail() {
$('hls_hls500_import_id').disable();
unlock_calc_current_window();
var win = new Leaf.Window({
id: 'upload_handle_window',
params: {
calc_session_id: '${/parameter/@calc_session_id}',
parent_winId: '${/parameter/@winId}',
winId: 'upload_handle_window',
document_id: '${/parameter/@document_id}',
document_category: '${/parameter/@document_category}',
calc_type: '${/parameter/@calc_type}',
global_flag: '${/parameter/@global_flag}'
},
url: $('hls_fin_calc_import_line_link_id').getUrl(),
title: '${l:HLS.IMPORT}',
width: 420,
height: 275
});
win.on('close', function() {
$('hls_hls500_import_id').enable();
});
}
function hls_hls500_show_col(btn) {
$('hls_hls500_show_col_id').disable();
var win = new Leaf.Window({
id: 'show_col_window_id',
params: {
calc_session_id: '${/parameter/@calc_session_id}',
calc_grid_id: 'hls_fin_calculator_ln_grid_id',
calc_export_grid_id: 'hls_fin_calculator_export_grid_id',
winid: 'show_col_window_id'
},
url: $('hls_fin_calc_show_display_line_link_id').getUrl(),
title: btn.el.dom['innerText'],
width: 530,
height: 500
});
win.on('close', function() {
$('hls_hls500_show_col_id').enable();
});
}
function sum_name_in(name) {
var config = ['rental', 'principal', 'interest', 'vat_interest', 'ln_user_col_n03', 'btb_repayment', 'btb_principal', 'btb_interest', 'ln_user_col_n05', 'btb_vat_interest', 'btb_fee', 'btb_fee_pv', 'ln_user_col_n06', 'other_payment', 'other_payment2'];
for (var i = 0;i < config.length;i++) {
if (config[i] == name) {
return true;
}
}
return false;
}
function sum_zero_time_in(name) {
var config = ['ln_user_col_n03', 'ln_user_col_n06', 'other_payment', 'other_payment2'];
for (var i = 0;i < config.length;i++) {
if (config[i] == name) {
return true;
}
}
return false;
}
function calc_sumfunction(datas, name) {
if (sum_name_in(name)) {
var sum = 0;
for (var i = 0;i < datas.length;i++) {
var r = datas[i];
var d = r.get(name);
if (r.get('times') === 0 && !sum_zero_time_in(name)) {
d = 0;
}
var n = parseFloat(d);
if (!isNaN(n)) {
sum = plus(sum, n);
}
}
var total = (typeof(sum) == 'undefined' ? '' : parseFloat(sum));
return '<font>' + Leaf.formatNumber(total) + '</font>';
} else {
return '';
}
}
]]></script>
<a:dataSets>
<a:placeHolder id="dynamicDataSet_left_id"/>
<a:dataSet id="hls_dynamiclinefields_ds" autoCreate="true">
<a:fields>
<a:placeHolder id="dynamicLineFields"/>
</a:fields>
</a:dataSet>
<a:dataSet id="line_attribute_ds">
<a:datas dataSource="/model/calc_config_ln_path"/>
</a:dataSet>
<a:dataSet id="line_field_ds">
<a:datas dataSource="/model/calc_config_ln_all_path"/>
</a:dataSet>
<a:dataSet id="temp_hd_attribute_ds">
<a:datas dataSource="/model/temp_config_hd_path"/>
<a:events>
<a:event name="update" handler="do_hls500_head_update"/>
</a:events>
</a:dataSet>
<a:dataSet id="hd_parameter_sql_value_ds">
<a:datas dataSource="/model/hd_parameter_sql_value"/>
</a:dataSet>
<a:dataSet id="ln_parameter_sql_value_ds">
<a:datas dataSource="/model/ln_parameter_sql_value"/>
</a:dataSet>
<a:dataSet id="hd_attribute_ds">
<a:datas dataSource="/model/calc_config_hd_path"/>
</a:dataSet>
<a:dataSet id="hls_fin_cal_save_hd_ds" autoCreate="true" submitUrl="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calc_save_n.lsc?base_table=HLS_FIN_CALCULATOR_HD&amp;calc_session_id=${/parameter/@calc_session_id}">
<a:fields>
<a:field name="calc_session_id" defaultValue="${/parameter/@calc_session_id}"/>
</a:fields>
</a:dataSet>
<a:dataSet id="ln_formula_ds" bindName="ln_calc_formula_bind_name" bindTarget="hls_fin_cal_save_hd_ds" processfunction="hls500_ln_formula_process" queryUrl="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_base_query.lsc?calc_session_id=${/parameter/@calc_session_id}&amp;ln_formula_table_flag=Y">
<a:datas dataSource="/model/ln_formula_path"/>
</a:dataSet>
<a:dataSet id="hd_formula_ds" bindName="hd_calc_formula_bind_name" bindTarget="hls_fin_cal_save_hd_ds" processfunction="hls500_hd_formula_process">
<a:datas dataSource="/model/hd_formula_path"/>
</a:dataSet>
<a:dataSet id="calc_button_ds">
<a:datas dataSource="/model/calc_button_path"/>
</a:dataSet>
<a:dataSet id="hls_fin_calculator_hd_ds" autoQuery="true" fetchAll="true" model="hls.HLS500N.hls_fin_calc_config_hd_n" processfunction="hls500_hd_process" queryUrl="${/request/@context_path}/autocrud/hls.HLS500N.hls_fin_calc_config_hd_n/query?calc_session_id=${/parameter/@calc_session_id}&amp;enabled_flag=Y&amp;display_flag=Y">
<a:fields>
<a:field name="column_value" lovGridHeight="350" lovHeight="500" lovWidth="500"/>
<a:field name="column_value_c"/>
</a:fields>
<a:events>
<a:event name="update" handler="do_hls500_head_update"/>
<a:event name="load" handler="onEditorHdload"/>
</a:events>
</a:dataSet>
<a:dataSet id="hls_fin_calculator_ln_ds" autoQuery="true" bindName="ln_calc_bind_name" bindTarget="hls_fin_cal_save_hd_ds" fetchAll="true" processfunction="hls500_ln_process" queryUrl="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_base_query.lsc?calc_session_id=${/parameter/@calc_session_id}&amp;ln_table_flag=Y" selectable="true">
<a:events>
<a:event name="load" handler="do_hls500_line_load"/>
<a:event name="update" handler="do_hls500_line_update"/>
<a:event name="remove" handler="do_hls500_line_remove"/>
</a:events>
</a:dataSet>
<a:dataSet id="hls_fin_calculator_export_ds" fetchAll="true" queryUrl="${/request/@context_path}/autocrud/hls.HLS500.hls_fin_calculator_export/query?calc_session_id=${/parameter/@calc_session_id}"/>
</a:dataSets>
<a:screenBody padding="0" style="margin:3px">
<a:vBox padding="0" style="border:1px solid #ccc;">
<a:screenTopToolbar style="height:40px;padding:0;border-bottom-color:#000;">
<div style="font-size:15px;margin:10px 5px 0 5px"><![CDATA[${l:HLS.FIN_CALCULATOR}]]></div>
<a:placeHolder id="hls500_button_ds"/>
</a:screenTopToolbar>
<a:hBox padding="0" style="padding:3px">
<a:grid id="hls_fin_calculator_hd_grid_id" bindTarget="hls_fin_calculator_hd_ds" marginHeight="140" rowRenderer="hd_grid_rowrenderer" style="margin-right:3px" width="${/model/calc_config_hd_path/record/@grid_left_width}">
<a:columns>
<a:column name="column_code" align="left" autoAdjust="false" prompt="HLS050.HLS_FIN_CALC_CONFIG.COLUMN_CODE" width="40"/>
<a:column name="prompt" align="right" autoAdjust="false" prompt="HLS500.PROMPT" width="110"/>
<a:column name="column_value" autoAdjust="false" editorFunction="parameter_function" prompt="HLS500.PROMPT_VALUE" renderer="seedetail_column_hd" showtitle="${/model/calc_config_hd_path/record/@sys_grid_show_title}" width="110"/>
<a:column name="percent" autoAdjust="false" width="19"/>
</a:columns>
<a:editors>
<a:numberField id="hls500_hd_numberfield_id"/>
<a:lov id="hls500_hd_lov_id">
<a:events>
<a:event name="beforecommit" handler="on_object_hd_calc_beforecommit"/>
<a:event name="focus" handler="on_object_hd_calc_focus"/>
</a:events>
</a:lov>
<a:textField id="hls500_hd_textfield_id"/>
<a:datePicker id="hls500_hd_datepicker_id"/>
<a:checkBox id="hls500_hd_checkbox_id"/>
<a:comboBox id="hls500_hd_combobox_id">
<a:events>
<a:event name="focus" handler="on_object_hd_calc_focus"/>
</a:events>
</a:comboBox>
</a:editors>
<a:events>
<a:event name="cellclick" handler="hls500_hd_cellcick"/>
</a:events>
</a:grid>
<a:grid id="hls_fin_calculator_ln_grid_id" bindTarget="hls_fin_calculator_ln_ds" marginHeight="140" marginWidth="${/model/calc_config_hd_path/record/@grid_margin_width}">
<a:columns>
<a:placeHolder id="dynamicLineColumn_id"/>
</a:columns>
<a:editors>
<a:numberField id="hls500_ln_numberfield_id"/>
<a:lov id="hls500_ln_lov_id">
<a:events>
<a:event name="beforecommit" handler="on_object_ln_calc_beforecommit"/>
<a:event name="focus" handler="on_object_ln_calc_focus"/>
</a:events>
</a:lov>
<a:textField id="hls500_ln_textfield_id"/>
<a:datePicker id="hls500_ln_datepicker_id"/>
<a:checkBox id="hls500_ln_checkbox_id"/>
</a:editors>
<a:events>
<a:event name="cellclick" handler="hls500_ln_cellcick"/>
</a:events>
</a:grid>
<script type="text/javascript"><![CDATA[
Leaf.onReady(function(){
var records=$('line_field_ds').getAll();
if(records.length){
for(var i=0;i<records.length;i++){
var record=records[i],column_name=record.get('column_name');
if(record.get('display_flag')=='C'){
$('hls_fin_calculator_ln_grid_id').hideColumn(column_name);
$('hls_fin_calculator_export_grid_id').hideColumn(column_name);
}
}
}
});
]]></script>
</a:hBox>
</a:vBox>
<a:grid id="hls_fin_calculator_export_grid_id" bindTarget="hls_fin_calculator_export_ds" height="350" width="900">
<a:columns>
<a:column name="prompt" align="right" autoAdjust="false" lock="true" prompt="HLS500.PROMPT" width="100"/>
<a:column name="column_value" autoAdjust="false" editorFunction="parameter_function" lock="true" prompt="HLS500.PROMPT_VALUE" renderer="seedetail_column_hd" showtitle="true"/>
<a:column name="percent" autoAdjust="false" lock="true" prompt=" " width="19"/>
<a:placeHolder id="dynamicLineColumn_export_id"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
<a:view-config>
<c:create-config targetId="dynamicDataSet_left_id">
<p:loop source="/model/calc_config_hd_path">
<p:switch test="@validation_type">
<p:case value="COMBOBOX">
<c:process-config>
<a:dataSet id="${@layout_area_seq}_${@column_name}_combobox_ds" queryUrl="${/request/@context_path}/autocrud/hls.HLS500.hls_parameters_lov/query"/>
</c:process-config>
</p:case>
</p:switch>
</p:loop>
</c:create-config>
<c:create-config targetId="hls500_button_ds">
<p:loop source="/model/calc_button_path">
<p:switch test="@button_code">
<p:case value="EXIT">
<c:process-config>
<a:gridButton click="hls_hls500_return" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="ADD_LN">
<c:process-config>
<a:gridButton id="hls_hls500_add_id" click="hls_hls500_add" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="DEL_LN">
<c:process-config>
<a:gridButton id="hls_hls500_delete_id" click="hls_hls500_delete" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="SAVE">
<c:process-config>
<a:gridButton id="hls_hls500_save_id" click="hls_hls500_save" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="MODF_FORMULA">
<c:process-config>
<a:gridButton id="hls_hls500_formula_id" click="hls_hls500_formula_change" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="CALC">
<c:process-config>
<a:gridButton id="hls_hls500_calc_id" click="hls_hls500_calc" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="RE_CALC">
<c:process-config>
<a:gridButton id="hls_hls500_re_calc_id" click="hls_hls500_re_calc" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="SAVE_QUOTATION">
<c:process-config>
<a:gridButton id="hls_hls500_quotation_id" click="hls_hls500_quotation" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="EXPORT">
<c:process-config>
<a:gridButton id="hls_hls500_export_id" click="hls_hls500_export" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="IMPORT">
<c:process-config>
<a:gridButton id="hls_hls500_import_id" click="hls_hls500_import" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="RESTRUCTURE">
<c:process-config>
<a:gridButton id="hls_hls500_restructure_id" click="hls_hls500_restructure" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="SHOW_COL">
<c:process-config>
<a:gridButton id="hls_hls500_show_col_id" click="hls_hls500_show_col" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
<p:case value="*">
<c:process-config>
<a:gridButton id="hls500_${@button_code}" click="hls500_define_button" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
</c:process-config>
</p:case>
</p:switch>
</p:loop>
</c:create-config>
<c:create-config targetId="dynamicLineColumn_id">
<p:loop source="/model/calc_config_ln_path">
<p:switch test="@show_column_code">
<p:case value="Y">
<c:process-config>
<a:column lock="${@lock_column}" prompt="${@column_code}" width="${@width}">
<a:column name="${@column_name}" align="${@alignment}" editorFunction="do_hls500_column_name" exportDatatype="${@data_type}" footerRenderer="calc_sumfunction" lock="${@lock_column}" prompt="${@prompt}" renderer="wrap_render" showtitle="${@sys_grid_show_title}" width="${@width}"/>
</a:column>
</c:process-config>
</p:case>
<p:case value="N">
<c:process-config>
<a:column name="${@column_name}" align="${@alignment}" editorFunction="do_hls500_column_name" exportDatatype="${@data_type}" footerRenderer="calc_sumfunction" lock="${@lock_column}" prompt="${@prompt}" renderer="wrap_render" showtitle="${@sys_grid_show_title}" width="${@width}"/>
</c:process-config>
</p:case>
</p:switch>
</p:loop>
</c:create-config>
<c:create-config targetId="dynamicLineColumn_export_id">
<p:loop source="/model/calc_config_ln_path">
<c:process-config>
<a:column lock="${@lock_column}" prompt="${@upper_column_name}" width="${@width}">
<a:column name="${@column_name}" align="${@alignment}" editorFunction="do_hls500_column_name" exportDatatype="${@data_type}" lock="${@lock_column}" prompt="${@prompt}" renderer="wrap_render" showtitle="${@sys_grid_show_title}" sortable="true" width="${@width}"/>
</a:column>
</c:process-config>
</p:loop>
</c:create-config>
<c:create-config targetId="dynamicLineFields">
<p:loop source="/model/calc_config_ln_all_path">
<c:process-config>
<a:field name="${@column_name}" defaultValue="${@default_value}" lovGridHeight="350" lovHeight="500" lovWidth="500"/>
</c:process-config>
</p:loop>
</c:create-config>
</a:view-config>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: wangwei
$Date: 2023-8-27 下午01:54:29
$Revision: 1.0
$Purpose: 租赁物维护(经营性租赁)明细
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure>
<a:view>
<a:link id="get_special_fields_link_id" model="prj.PRJ500.get_two_prj_number" modelaction="update"/>
<a:link id="get_bp_name_link_id" model="prj.PRJ2000.pur_order_create_check" modelaction="query"/>
<a:link id="${/parameter/@layout_code}prj2000_cdd_downloadFile_id"
url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="${/parameter/@layout_code}prj2000_cdd_uploadFile_id"
url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="${/parameter/@layout_code}prj2000d_hls_fin_calculator_update_link_id"
url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_update_n_for_ol.lview"/>
<a:link id="${/parameter/@layout_code}prj2000d_hls_fin_doc_quotation_link_id"
url="${/request/@context_path}/modules/hls/HLS500/hls_fin_doc_quotation.lsc"/>
<a:link id="prj2000_lease_import_upload_link"
url="${/request/@context_path}/modules/prj/PRJ2000/purchase_order_import.lview"/>
<a:link id="pur_approval_link_id" model="prj.PRJ2000.pur_order_wfl" modelaction="update"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[
$L.onReady(function () {
debugger;
if("${/parameter/@function_usage}" == 'QUERY'){
if(document.getElementById('${/parameter/@layout_code}_exit')){
$jq('#${/parameter/@layout_code}_exit').hide();
}
if(document.getElementById('${/parameter/@layout_code}_save')){
$jq('#${/parameter/@layout_code}_save').hide();
}
if(document.getElementById('${/parameter/@layout_code}_quote')){
$jq('#${/parameter/@layout_code}_quote').hide();
}
if(document.getElementById('${/parameter/@layout_code}_submit_approval')){
$jq('#${/parameter/@layout_code}_submit_approval').hide();
}
}
});
/*保存前调用,生成项目编号*/
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
debugger;
var check_flag = true;
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var lease_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item');
var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'prj_quotation');
var record_item = $(lease_item_ds_id).getAll();
var prj_record = $(prj_project_ds_id).getAt(0);
var quotation_record = $(prj_quotation_ds_id).getAt(0);
if(record_item == ''){
prj_record.set('lease_item_amount',0);
quotation_record.set('insurance_fee',0);
quotation_record.set('lease_item_amount',0);
}else {
var priceSum=0;
var ballonSum=0;
for(var i=0;i<record_item.length;i++){
var balloonPrice = record_item[i].get('balloon');
var price = record_item[i].get('actual_price');
priceSum = price + priceSum;
ballonSum = balloonPrice + ballonSum;
}
prj_record.set('lease_item_amount',priceSum);
quotation_record.set('insurance_fee',ballonSum);
quotation_record.set('lease_item_amount',priceSum);
}
var bp_id_tenant = prj_record.get('bp_id_tenant');
var project_number = prj_record.get('project_number');
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('get_bp_name_link_id').getUrl(),
para: {
bp_id_tenant:bp_id_tenant
},
success: function (res) {
var bp_wfl_status = res.result.record.bp_wfl_status;
if(bp_wfl_status == 'APPROVING'){
Leaf.showErrorMessage('提示','此商业伙伴还在审核中,审核通过才可以创建!');
check_flag = false;
return check_flag;
}
if(prj_record.isNew==true && bp_wfl_status !='APPROVING' && project_number == undefined){
Leaf.request({
url: $('get_special_fields_link_id').getUrl(),
para: {
document_category: record.get('document_category'),
document_type: record.get('document_type'),
business_type:'',
function_code: '${/parameter/@function_code}',
function_usage: '${/parameter/@function_usage}',
lease_channel: '',
first_flag: '',
ka_prj_id: '',
quotation_ds_id: ''
},
success: function (res) {
var document_number = res.result.document_number;
prj_record.set('project_number', document_number);
check_flag = true;
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true,
scope: this
});
return check_flag;
}
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true,
scope: this
});
return check_flag;
}
/*查询前调用*/
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
if (ds.id == prj_project_ds_id) {
var prj_record = $(prj_project_ds_id).getCurrentRecord();
qpara.project_id = prj_record.get('project_id');
}
var cdd_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
if (ds.id == prj_project_ds_id) {
var prj_record = $(prj_project_ds_id).getCurrentRecord();
qpara['cdd_list_id'] = prj_record.get('cdd_list_id');
}
};
//新增时调用(grid,table,gridBox)
window['${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function(ds, record, config_records, bp_seq) {
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item');
if(ds.id==ds_id){
record.set('balloon_ratio',0.15);
}
};
//超链接渲染
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
var link_function = '';
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'attachment') {
link_function = 'prj2000d_upload_file_new';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'attach_file_name') {
if (value != null) {
var link = '${/request/@context_path}/atm_download.lsc?attachment_id=';
var str = value.split(';;');
var url = '';
for (var i = 0; i < str.length; i++) {
//
var temp = str[i].split('--');
if (!Leaf.isEmpty(temp[0])) {
var file_name = temp[0].toUpperCase();
var file_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase();
if (file_name.indexOf('.PDF') >= 0) {
url = url + '<a href=javascript:view_pdf(\'' + temp[1] + '\')>' + temp[0] + '</a>' + ',';
} else if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
url = url + '<a href=' + link + temp[1] + ' ref="img">' + temp[0] + '</a>' + ',';
} else {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
}
return url;
}
}
};
function prj2000d_upload_file_new(id, name, query_only) {
debugger;
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if (record.get('check_id')) {
var url;
if (query_only == 'Y' && '${/parameter/@function_usage}' == 'QUERY') {
url = $('${/parameter/@layout_code}prj2000_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}else{
url = $('${/parameter/@layout_code}prj2000_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'prj500_cdd_uploadFile_screen_id',
width: 850,
height: 400
});
win.on('close', function () {
record.ds.query();
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
}
}
//保存submitsuccess调用
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
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';
if (ds_id == ds.id || virtual_ds_id == ds.id) {
$(cdd_item_ds_id).query();
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
};
//租赁物导出
// window['${/parameter/@layout_code}_G_LEASE_ITEM_USER_BUTTON1_layout_dynamic_tab_click'] = function () {
// var lease_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item');
// var grid_id = ds_id.replace('ds', 'layout_grid_id');
// $(grid_id)._export();
//
// };
//租赁物导入
window['${/parameter/@layout_code}_G_LEASE_ITEM_USER_BUTTON2_layout_dynamic_tab_click'] = function () {
debugger;
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');
var record=$(ds_id).getCurrentRecord();
var quotation_record=$(quotation_ds_id).getCurrentRecord();
var project_id = record.data.project_id;
var lease_item_amount = quotation_record.get('lease_item_amount');
var quotation_id = quotation_record.get('quotation_id');
if(Ext.isEmpty(project_id)){
Leaf.showMessage('${l:HLS.PROMPT}', '导入清单前,请先保存其他信息!');
return false;
}
var win = new Leaf.Window({
id: 'prj2000_lease_import_winid',
url: $('prj2000_lease_import_upload_link').getUrl(),
title: '租赁物信息导入(经租)',
params: {
project_id:project_id,
winid:'prj2000_lease_import_winid',
parent_ds_id:ds_id
},
width: 430,
height: 350
});
};
/* 时间戳转换为时间 */
function timestampToTime(timestamp) {
timestamp = timestamp ? timestamp : null;
var date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
var Y = date.getFullYear() + '-';
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate());
// var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
// var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
// var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
return Y + M + D;
};
//报价按钮
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 lease_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item');
var record_item = $(lease_item_ds_id).getAll();
var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var history_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CASHFLOW_NS', 'prj_quotation');
var record = $(quotation_ds_id).getCurrentRecord();
var projectId=record.get('project_id');
var head_record = $(ds_id).getAt(0);
url = $('${/parameter/@layout_code}prj2000d_hls_fin_calculator_update_link_id').getUrl();
if (record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
var leaseAmount = head_record.get('lease_item_amount');
var feeAmount = record.get('insurance_fee');
var priceSum=0;
var ballonSum=0;
for(var i=0;i<record_item.length;i++){
var balloonPrice = record_item[i].get('balloon');
var price = record_item[i].get('actual_price');
priceSum = price + priceSum;
ballonSum = balloonPrice + ballonSum;
}
if(leaseAmount != priceSum || feeAmount != ballonSum){
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if ($(quotation_ds_id).validate()) {
/*if (!record.get('price_list') || !record.get('currency') || !record.get('lease_times')) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.QUOTATION_EXECUTE_AFTER_SAVE}');
return;
}*/
var parent_pk_value = head_record.get('project_id');
record.set('function_code', 'PRJ505_QUOTATION');
record.set('function_usage', 'UPDATE');
record.set('project_id', parent_pk_value);
//拆分合同可维护
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
//首次插入
if (!record.get('calc_session_id')) {
record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD');
var calc_recreate_L_formula;
calc_recreate_L_formula = 'Y';
record.set('_status', 'update');
record.set('from_doc_table', 'PRJ_QUOTATION');
record.set('from_doc_pk', record.get('quotation_id'));
record.set('calculate_flag', 'N');
if (!'${/parameter/@document_id}') {
record.set('document_id', parent_pk_value);
}
var saveData = [];
saveData.push(record.data);
console.log(saveData);
Leaf.request({
url: $('${/parameter/@layout_code}prj2000d_hls_fin_doc_quotation_link_id').getUrl(),
para: saveData,
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$(quotation_ds_id).setQueryParameter('project_id', projectId);
$(quotation_ds_id).query();
$(history_ds_id).setQueryParameter('project_id', projectId);
$(history_ds_id).query();
var quotation_id = record.get('quotation_id') || res.result.record.quotation_id;
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_link_winid',
params: {
layout_code:'${/parameter/@layout_code}',
document_id: parent_pk_value,
document_category: 'PROJECT',
maintain_type: 'MODIFY',
business_type: head_record.get('business_type'),
calc_session_id: res.result.record.calc_session_id,
quotation_id: quotation_id,
dsId: quotation_ds_id,
winId: 'hls_fin_calc_quotation_link_winid',
global_flag: 'Y',
id_num: 0,
calc_type: '${/parameter/@calc_type}' || 'CLASSIC_CALCULATOR',
recreate_L_formula: calc_recreate_L_formula
},
url: url,
fullScreen: true,
draggable: true
});
debugger;
win.on('close', function () {
$(quotation_ds_id).setQueryParameter('project_id', projectId);
$(quotation_ds_id).query();
$(history_ds_id).setQueryParameter('project_id', projectId);
$(history_ds_id).query();
});
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
} else {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
var prjLeaseItemAmount =record.get('lease_item_amount');
var hdLeaseItemAmount = record.get('hd_lease_item_amount');
var prjLeaseStartDate = timestampToTime(Date.parse(record.get('lease_start_date')));
var hdLeaseStartDate = record.get('hd_lease_start_date');
var prjIntRateDisplay = record.get('int_rate_display');
var hdIntRateDisplay = record.get('hd_int_rate_display');
var intDepositRatio = record.get('deposit_ratio');
var hdDepositRatio = record.get('hd_deposit_ratio');
var firstPayDate = timestampToTime(Date.parse(record.get('first_pay_date')));
var hd_first_pay_date = record.get('hd_first_pay_date');
var annualPayTimes = record.get('annual_pay_times');
var hdAnnualPayTimes = record.get('hd_annual_pay_times');
var depositDate = timestampToTime(Date.parse(record.get('hd_user_col_d01')));
var hdDepositDate = record.get('hd_deposit_date');
var contractInceptionDate = timestampToTime(Date.parse(record.get('contract_inception_date')));
var hdContractInceptionDate = record.get('hd_contract_inception_date');
var insuranceFee = record.get('insurance_fee');
var hdInsuranceFee = record.get('hd_insurance_fee');
var leaseTermMonth = record.get('lease_term_month');
var hdLeaseTermMonth = record.get('hd_lease_term_month');
var balloonRatio = record.get('balloon_ratio');
var hdBalloonRation = record.get('hd_balloon_ratio');
var hdUserColN12 = record.get('hd_user_col_n12');
var pjHdUserColN12 = record.get('pj_hd_user_col_n12');
if (prjLeaseItemAmount==hdLeaseItemAmount && prjLeaseStartDate==hdLeaseStartDate && prjIntRateDisplay==hdIntRateDisplay && intDepositRatio==hdDepositRatio && firstPayDate==hd_first_pay_date && annualPayTimes==hdAnnualPayTimes && depositDate==hdDepositDate && contractInceptionDate==hdContractInceptionDate && insuranceFee==hdInsuranceFee && leaseTermMonth==hdLeaseTermMonth && balloonRatio==hdBalloonRation && hdUserColN12==pjHdUserColN12) {
//直接进入报价页面
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_update_link_winid',
params: {
layout_code:'${/parameter/@layout_code}',
document_id: parent_pk_value,
document_category: 'PROJECT',
maintain_type: 'MODIFY',
business_type: head_record.get('business_type'),
calc_session_id: record.get('calc_session_id'),
quotation_id: record.get('quotation_id'),
lease_item_amount:record.get('lease_item_amount'),
dsId: quotation_ds_id,
winId: 'hls_fin_calc_quotation_update_link_winid',
global_flag: 'Y',
id_num: 0,
calc_type: '${/parameter/@calc_type}',
recreate_L_formula: 'N',
division:'${/parameter/@division}'
},
url: url,
fullScreen: true,
draggable: true
});
win.on('close', function () {
$(quotation_ds_id).setQueryParameter('project_id', projectId);
$(quotation_ds_id).query();
$(history_ds_id).setQueryParameter('project_id', projectId);
$(history_ds_id).query();
});
} else {
record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD');
var calc_recreate_L_formula;
calc_recreate_L_formula = 'Y';
record.set('_status', 'update');
record.set('from_doc_table', 'PRJ_QUOTATION');
record.set('from_doc_pk', record.get('quotation_id'));
record.set('calculate_flag', 'N');
record.set('lease_item_amount',prjLeaseItemAmount);
record.set('insurance_fee',record.get('insurance_fee'));
if (!'${/parameter/@document_id}') {
record.set('document_id', parent_pk_value);
}
var saveData = [];
saveData.push(record.data);
console.log(saveData);
Leaf.request({
url: $('${/parameter/@layout_code}prj2000d_hls_fin_doc_quotation_link_id').getUrl(),
para: saveData,
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$(quotation_ds_id).query();
var quotation_id = record.get('quotation_id') || res.result.record.quotation_id;
var win = new Leaf.Window({
id: 'hls_fin_calc_quotation_link_winid',
params: {
document_id: parent_pk_value,
document_category: 'PROJECT',
maintain_type: 'MODIFY',
business_type: head_record.get('business_type'),
calc_session_id: res.result.record.calc_session_id,
quotation_id: quotation_id,
lease_item_amount:prjLeaseItemAmount,
dsId: quotation_ds_id,
winId: 'hls_fin_calc_quotation_link_winid',
global_flag: 'Y',
id_num: 0,
calc_type: '${/parameter/@calc_type}' || 'CLASSIC_CALCULATOR',
recreate_L_formula: calc_recreate_L_formula,
division:'${/parameter/@division}'
},
url: url,
fullScreen: true,
draggable: true
});
win.on('close', function () {
$(quotation_ds_id).setQueryParameter('project_id', projectId);
$(quotation_ds_id).query();
$(history_ds_id).setQueryParameter('project_id', projectId);
$(history_ds_id).query();
});
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}
}
}
};
//提交审批
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function() {
debugger;
if("${/model/role_info/record/@role_code}"!="0033" && "${/model/role_info/record/@role_code}"!="HAND"){
Leaf.showErrorMessage("提示",'当前权限仅开放给营业担当,请联系管理员!');
return false;
}
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');
var record=$(ds_id).getCurrentRecord();
var quo_record=$(quotation_ds_id).getCurrentRecord();
var projectId=record.get('project_id');
var irr=quo_record.get('irr');
var irrAfterTax=quo_record.get('irr_after_tax');
if(record.dirty==true){
Leaf.showMessage('${l:PROMPT}','${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if($(ds_id).validate()){
if(irr >0 && irrAfterTax >0){
Leaf.showConfirm('${HLS.PROMPT}','确认要提交工作流吗?',function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('pur_approval_link_id').getUrl(),
para:{
project_id:projectId
},
scope:this,
success: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
}else {
Leaf.showConfirm('${HLS.PROMPT}','XIRR为负数,请确认是否继续!',function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('pur_approval_link_id').getUrl(),
para:{
project_id:projectId
},
scope:this,
success: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
}
}
}
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
var lease_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item');
var record_item = $(lease_item_ds_id).getAll();
var base_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'prj_quotation');
if(lease_item_ds_id == ds.id&&lease_item_ds_id){
debugger;
if(name == 'actual_price'&& value){
//更新质保金金额
if(typeof(record.get('balloon_ratio')) !== 'undefined' &&! Ext.isEmpty(record.get('balloon_ratio'))){
var balloon=parseFloat(mul(value,record.get('balloon_ratio')));
record.set('balloon',balloon);
var ballonSum=0;
for(var i=0;i<record_item.length;i++){
var balloonPrice = record_item[i].get('balloon');
ballonSum = balloonPrice + ballonSum;
}
var record_quotation = $(prj_quotation_ds_id).getCurrentRecord();
record_quotation.set('insurance_fee',ballonSum);
}
//更新采购总额
if(typeof(record.get('actual_price'))!=='undefined' &&! Ext.isEmpty(record.get('actual_price'))){
var priceSum=0;
for(var i = 0;i<record_item.length;i++){
var price = record_item[i].get('actual_price');
priceSum = price + priceSum;
}
var record_base = $(base_ds_id).getCurrentRecord();
var record_quotation = $(prj_quotation_ds_id).getCurrentRecord();
record_base.set('lease_item_amount',priceSum);
record_quotation.set('lease_item_amount',priceSum);
}
//更新不含税金额
var futurePrices=parseFloat(div(value,1.13));
record.set('future_prices',futurePrices);
}
if(name == 'balloon_ratio'&& value){
if(typeof(record.get('actual_price')) !== 'undefined' &&! Ext.isEmpty(record.get('actual_price'))){
var balloon=parseFloat(mul(value,record.get('actual_price')));
record.set('balloon',balloon);
var ballonSum=0;
for(var i=0;i<record_item.length;i++){
var balloonPrice = record_item[i].get('balloon');
ballonSum = balloonPrice + ballonSum;
}
var record_quotation = $(prj_quotation_ds_id).getCurrentRecord();
record_quotation.set('insurance_fee',ballonSum);
}
}
}
if(prj_quotation_ds_id == ds.id&&prj_quotation_ds_id){
if(name == 'lease_term_month'&&value){
//更新还款期数
var record_quotation = $(prj_quotation_ds_id).getCurrentRecord();
var leaseTermMonth = record_quotation.get('lease_term_month');
record_quotation.set('lease_times',leaseTermMonth);
}
}
//将申请信息中的预计采购日期同步到报价信息
if(base_ds_id == ds.id&&base_ds_id){
if(name == 'ref_d10'&&value){
var record_quotation = $(prj_quotation_ds_id).getCurrentRecord();
record_quotation.set('contract_inception_date',value);
}
}
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<!--<a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CON501&amp;function_code=PRJ501N"/>-->
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: wangwei
$Date: 2023-8-27 下午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="prj2000_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="prj_project_link" model="prj.PRJ2000.pur_order_wfl" modelaction="execute"/>
<a:link id="prj2000_pur_order_deteail_link_id" url="${/request/@context_path}/modules/prj/PRJ2000/purchase_order_deteail.lview"></a:link>
<script type="text/javascript"><![CDATA[
//查询时调用(grid)
/* 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_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var param = {};
param['function_code'] = 'PRJ2000D';
param['function_usage'] = 'CREATE';
param['url_title'] = '采购申请单维护';
//param['default_value_dsid']=ds_id;
hls_doc_get_layout_code('prj2000_get_layout_code_link_id', param, 'prj2000_pur_order_deteail_link_id', ds_id, '${/parameter/@layout_code}');
};
//取消
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var records = $(ds_id).getSelected();
var projectId = records[0].data.project_id;
if(records[0].data.project_status=='APPROVING' || records[0].data.project_status=='APPROVED' || records[0].data.project_status=='CANCEL'){
Leaf.showMessage('${l:PROMPT}', '请选择新建或审批退回的采购单进行取消操作!');
return;
};
Leaf.showConfirm('${l:PROMPT}', '是否确定取消该单据?', function () {
Leaf.request({
url: $('prj_project_link').getUrl(),
para:{project_id:projectId},
success: function () {
Leaf.SideBar.show({
msg: '取消成功',
duration: 2000
});
$(ds_id).query();
},
scope: this
});
}, function () {
}, null, null);
};
//租赁物导出
window['${/parameter/@layout_code}_G_PUR_ORDER_USER_BUTTON1_layout_dynamic_tab_click'] = function () {
var lease_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var grid_id = lease_item_ds_id.replace('ds', 'layout_grid_id');
$(grid_id)._export();
};
function prj2000d_get_detail(id, name, query_only){
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var project_id=record.get('project_id');
var projectStatus=record.get('project_status');
var param = {};
if(projectStatus=='NEW' || projectStatus=='APPROVED_RETURN'){
param['function_code'] = 'PRJ2000D';
param['function_usage'] = 'MODIFY';
param['url_title'] = '采购申请单维护';
param['project_id'] = project_id;
}
if(projectStatus=='APPROVING' || projectStatus=='CANCEL' || projectStatus=='APPROVED'){
param['function_code'] = 'PRJ2000D_WFL';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY'
param['url_title'] = '采购申请单维护';
param['project_id'] = project_id;
}
hls_doc_get_layout_code('prj2000_get_layout_code_link_id', param, 'prj2000_pur_order_deteail_link_id', ds_id, '${/parameter/@layout_code}');
}
//超链接渲染
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
var link_function = '';
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'project_number') {
link_function = 'prj2000d_get_detail';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' +value + '</a>';
}
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<!--<a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CON501&amp;function_code=PRJ501N"/>-->
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luzhengyou
$Date: 2023年9月5日
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.code = &apos;PUR_ORDER_TEMPLATE&apos;" model="sys.SYS120.hls_attachment_module" rootPath="template_path"/>
</a:init-procedure>
<a:view>
<a:link id="downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<script type="text/javascript"><![CDATA[
function downloadFile() {
new Leaf.Window({
url: $('downloadFile_id').getUrl(),
title: '${l:HLS.SUPPORTING_DOCUMENT}',
params: {
'table_name': 'HLS_ATTACHMENT_MODULE',
'header_id': '${/model/template_path/record/@attachment_module_id}'
},
width: 850,
height: 400
});
}
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
});
debugger;
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/PRJ2000/purchase_order_import_info.lview?project_id=${/parameter/@project_id}';
//var url = '${/request/@context_path}/modules/prj/PRJ2000/purchase_order_import_info.lview?session_id=${/parameter/@session_id}&winid=${/parameter/@winid}&batch_id=${/parameter/@batch_id}&_csrf=${/session/@_csrf.token}';
form.action = url;
form.submit();
$('${/parameter/@winid}').close();
_input_window.on('close', function() {
$('${/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="downloadFile()" style="margin-left:10px;margin-top:10px;width:60px;height:23px" type="button" value="模板下载"/>
<input onclick="saveClick()" style="margin-left:25px;margin-top:10px;width:60px;height:23px" type="button" value="导入"/>
</form>
</a:fieldSet>
</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: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="PURCHASE_ORDER_LEASE" user_id="${/session/@user_id}"/>
<a:model-query defaultWhereClause="header_id=${/model/header/record/@header_id} and TEMPLATE_CODE = &apos;PURCHASE_ORDER_LEASE&apos;" model="acp.ACP518.acp_import_get_status" rootPath="status"/>
<a:model-update model="prj.PRJ2000.purchase_order_import_list"/>
</a:init-procedure>
<a:view>
<a:link id="import_prj_lease_item_list_link_id" model="prj.PRJ2000.purchase_order_import_list" modelaction="insert"/>
<script><![CDATA[
function import_exit() {
parent._input_window.close();
}
var import_flag=0;
function import_btn() {
var ds = $('purchase_order_import_list_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() {
debugger;
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}',
project_id:'${/parameter/@project_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="purchase_order_import_list_ds" autoQuery="true" fetchAll="true" model="prj.PRJ2000.purchase_order_import_list"
queryUrl="${/request/@context_path}/autocrud/prj.PRJ2000.purchase_order_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: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="purchase_order_import_list_ds" marginWidth="50" marginHeight="100" navBar="true">
<a:columns>
<a:column name="attribute_1" prompt="品牌" width="120" align="center"/>
<a:column name="attribute_2" prompt="商品种类" width="160" align="center"/>
<a:column name="attribute_3" prompt="机型种类" width="160" align="center"/>
<a:column name="attribute_4" prompt="单位" width="160" align="center"/>
<a:column name="attribute_5" prompt="机型" width="160" align="center"/>
<a:column name="attribute_6" prompt="机号" width="160" align="center"/>
<a:column name="attribute_7" prompt="金额" width="160" align="center"/>
<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>
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