Commit 311737ad authored by stone's avatar stone

Merge branch 'develop' of https://hel.hand-china.com/hlcm/leaf-hlcm into develop

parents acd8bbe3 dd63640b
......@@ -18,7 +18,7 @@
AND sc.code_value = t1.contract_status) contract_status_desc
from con_contract t1
where
t1.contract_status in ('INCEPT','ET','NEW','ETING','REPURSING')
t1.contract_status in ('INCEPT','NEW','ETING','REPURSING')
and t1.data_class = 'NORMAL'
and t1.company_id in ((
select company_id
......
......@@ -3,22 +3,39 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select times,
cf_item,
cashflow_id,
(select cf_item_desc from hls_cashflow_item_v where cf_item = t.cf_item and enabled_flag = 'Y' and cf_type = t.cf_type) cf_item_desc,
contract_id,
to_char(due_date,'yyyy-mm-dd') due_date,
due_amount,
principal,
interest,
principal - nvl(received_principal,0) unreceived_principal,
interest - nvl(received_interest,0) unreceived_interest,
due_amount - nvl(received_amount,0) unreceived_amount
from con_contract_cashflow t
#WHERE_CLAUSE#
order by times, due_date
]]></bm:query-sql>
select *
from (
select times,
cf_item,
cashflow_id,
(select cf_item_desc
from hls_cashflow_item_v
where cf_item = t.cf_item
and enabled_flag = 'Y'
and cf_type = t.cf_type) cf_item_desc,
contract_id,
to_char(due_date, 'yyyy-mm-dd') due_date,
decode(cf_item, 9,
CON_OVERDUE_PENALTY_PKG.CALC_PENALTY_FOR_WRITE_OFF(p_cashflow_id=>t.cashflow_id,
p_calc_date=>to_date(${@transaction_date}, 'yyyy-mm-dd'),
p_user_id=>${/session/@user_id},
p_penalty_flag=>'Y'),
due_amount) due_amount,
principal,
interest,
principal - nvl(received_principal, 0) unreceived_principal,
interest - nvl(received_interest, 0) unreceived_interest,
decode(cf_item, 9,
CON_OVERDUE_PENALTY_PKG.CALC_PENALTY_FOR_WRITE_OFF(p_cashflow_id=>t.cashflow_id,
p_calc_date=>to_date(${@transaction_date}, 'yyyy-mm-dd'),
p_user_id=>${/session/@user_id},
p_penalty_flag=>'Y'),
due_amount) -
nvl(received_amount, 0) unreceived_amount
from con_contract_cashflow t #WHERE_CLAUSE#
order by times, due_date) t1
where unreceived_amount > 0
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
......@@ -37,16 +54,18 @@
</bm:fields>
<bm:query-fields>
<bm:query-field name="contract_id" queryExpression="t.contract_id = ${@contract_id}"/>
<!-- <bm:query-field name="due_date_from" queryExpression="t.due_date between to_date(${@due_date_from},'yyyy-mm-dd') and nvl(to_date(${@due_date_to},'yyyy-mm-dd'),t.due_date)"/>-->
<!-- <bm:query-field name="due_date_to" queryExpression="t.due_date between nvl(to_date(${@due_date_from},'yyyy-mm-dd'),t.due_date) and to_date(${@due_date_to},'yyyy-mm-dd')"/>-->
<!-- <bm:query-field name="due_date_from" queryExpression="t.due_date between to_date(${@due_date_from},'yyyy-mm-dd') and nvl(to_date(${@due_date_to},'yyyy-mm-dd'),t.due_date)"/>-->
<!-- <bm:query-field name="due_date_to" queryExpression="t.due_date between nvl(to_date(${@due_date_from},'yyyy-mm-dd'),t.due_date) and to_date(${@due_date_to},'yyyy-mm-dd')"/>-->
<bm:query-field name="cf_item" queryExpression="t.cf_item = ${@cf_item}"/>
<bm:query-field name="deposit_flag" queryExpression="((nvl(${@deposit_flag},'N') = 'Y' and cf_item in (1,9,250)) or (nvl(${@deposit_flag},'N') = 'N'))"/>
<bm:query-field name="deposit_flag"
queryExpression="((nvl(${@deposit_flag},'N') = 'Y' and cf_item in (1,9,250)) or (nvl(${@deposit_flag},'N') = 'N'))"/>
<bm:query-field name="due_date_from"
queryExpression="due_date &gt;= to_date(${@due_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="due_date_to"
queryExpression="due_date &lt;= to_date(${@due_date_to},&apos;yyyy-mm-dd&apos;)"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter name="query" expression="t.cf_status = 'RELEASE' and t.write_off_flag != 'FULL' and t.cf_direction = 'INFLOW'"/>
<bm:data-filter name="query"
expression="t.cf_status = 'RELEASE' and t.write_off_flag != 'FULL' and t.cf_direction = 'INFLOW'"/>
</bm:data-filters>
</bm:model>
......@@ -98,7 +98,12 @@
t1.WRITE_OFF_INTEREST,
(select principal from con_contract_cashflow where cashflow_id = t1.cashflow_id) principal,
(select interest from con_contract_cashflow where cashflow_id = t1.cashflow_id) interest,
(select due_amount from con_contract_cashflow where cashflow_id = t1.cashflow_id) due_amount,
(select decode(cf_item, 9,
CON_OVERDUE_PENALTY_PKG.CALC_PENALTY_FOR_WRITE_OFF(p_cashflow_id=>t1.cashflow_id,
p_calc_date=>to_date(${@transaction_date}, 'yyyy-mm-dd'),
p_user_id=>${/session/@user_id},
p_penalty_flag=>'Y'),
due_amount) from con_contract_cashflow where cashflow_id = t1.cashflow_id) due_amount,
(select bp_name from hls_bp_master h,con_contract c where h.bp_id = c.bp_id_tenant and c.contract_id = t1.contract_id) bp_tenant_name
from csh_write_off t1) t
#WHERE_CLAUSE#
......
......@@ -117,7 +117,12 @@ end;
<bm:field name="journal_date" databaseType="DATE" datatype="java.util.Date"/>
<bm:field name="principal" expression="(select principal from con_contract_cashflow where cashflow_id = t1.write_off_cashflow_id)" />
<bm:field name="interest" expression="(select interest from con_contract_cashflow where cashflow_id = t1.write_off_cashflow_id)" />
<bm:field name="due_amount" expression="(select due_amount from con_contract_cashflow where cashflow_id = t1.write_off_cashflow_id)" />
<bm:field name="due_amount" expression="(select decode(cf_item, 9,
CON_OVERDUE_PENALTY_PKG.CALC_PENALTY_FOR_WRITE_OFF(p_cashflow_id=> cashflow_id,
p_calc_date=>to_date(${@transaction_date}, 'yyyy-mm-dd'),
p_user_id=>${/session/@user_id},
p_penalty_flag=>'Y'),
due_amount) from con_contract_cashflow where cashflow_id = t1.write_off_cashflow_id)" />
</bm:fields>
<bm:features>
<f:standard-who/>
......
......@@ -18,6 +18,47 @@
fst.parent_line_id) tree_parent_field,
fsd.target_value,
CASE
when fst.score_target_code = 'HL_CM_24' then
(SELECT DECODE(sign(t.EXCAVATOR_QUANTITY), 1, t.EXCAVATOR_QUANTITY || '台挖掘机;', null) ||
DECODE(sign(t.LOADER_QUANTITY), 1, t.LOADER_QUANTITY || '台装载机;', null) ||
DECODE(sign(t.OTHER_OTHER), 1, t.OTHER_OTHER || '台其他机器;', null) target_value
FROM (SELECT SUM(DECODE(item_type, 'EXCAVATOR', 1, 0) * nvl(quantity, 1)) EXCAVATOR_QUANTITY,
SUM(DECODE(item_type, 'LOADER', 1, 0) * nvl(quantity, 1)) LOADER_QUANTITY,
SUM(DECODE(item_type, 'OTHER', 1, 0) * nvl(quantity, 1)) OTHER_OTHER
FROM bp_tenant_rate_item_device_lv t
WHERE project_id = (select project_id
from fnd_sc_score fs,
fnd_sc_score_result sr
where fs.SC_SCORE_ID = sr.SC_SCORE_ID
and sr.RESULT_ID = ${@result_id})) t)
when fst.score_target_code = 'HL_CM_25' then
(SELECT CASE
WHEN count_3 > 0 THEN
'存在机器债务情况:偿还中,有延期'
ELSE
CASE
WHEN count_2 > 0 THEN
'存在机器债务情况:偿还中,无延期'
ELSE
CASE
WHEN count_1 > 0 THEN
'机器债务情况均已偿还'
ELSE
'无工程机械设备'
END
END
END target_value
FROM (SELECT SUM(DECODE(loans_status, 'REPAID', 1, 0)) * 3 count_1,
SUM(DECODE(loans_status, 'REPAYING_NO_DELAY', 1, 0)) count_2,
SUM(DECODE(loans_status, 'REPAYING_DELAY', 1, 0)) count_3
FROM bp_tenant_rate_item_device_lv t
WHERE project_id =
(SELECT project_id
FROM fnd_sc_score fs,
fnd_sc_score_result sr
WHERE fs.SC_SCORE_ID = sr.SC_SCORE_ID
AND sr.RESULT_ID = ${@result_id})) t
)
WHEN fst.target_value_type = 'CHAR' THEN
(SELECT t.description
FROM fnd_score_target_values t
......
......@@ -21,4 +21,7 @@
<bm:data-filters>
<bm:data-filter name="query" expression="(rownum = 1)" />
</bm:data-filters>
<bm:query-fields>
<bm:query-field name="bp_id" queryExpression="bp_id = ${@bp_id}"/>
</bm:query-fields>
</bm:model>
......@@ -42,7 +42,7 @@
$('csh_write_off_grid').hideColumn('left_interest');
$('csh_write_off_grid').hideColumn('unreceived_amount');
if ('${/parameter/@interfaceQueryFlag}' == 'N') {
$('csh_write_off_interface_ds').setQueryUrl('${/request/@context_path}/autocrud/csh.CSH531N.csh_write_off/query?transaction_id=${/parameter/@transaction_id}');
$('csh_write_off_interface_ds').setQueryUrl('${/request/@context_path}/autocrud/csh.CSH531N.csh_write_off/query?transaction_id=${/parameter/@transaction_id}&transaction_date=${/parameter/@transaction_date}');
$('csh_write_off_interface_ds').query();
}
if ('${/parameter/@approval_flag}' == 'Y') {
......@@ -90,7 +90,7 @@
return 'csh_write_off_grid_nf';
}
if (name == 'write_off_date' || name == 'journal_date') {
if (write_off_type == 'RECEIPT_CREDIT') {
if (write_off_type == 'RECEIPT_CREDIT' || write_off_type == 'DEPOSIT_CREDIT') {
return 'csh_write_off_grid_dp';
}
if (write_off_type == 'RECEIPT_ADVANCE_RECEIPT') {
......@@ -275,6 +275,9 @@
record.set('left_principal', '');
record.set('left_interest', '');
}
if (name == 'wirte_off_date'){
record.set('journal_date',value);
}
}
function csh531_wf_amount_validate(record, name, value) {
......@@ -739,11 +742,11 @@
</a:dataSet>
<a:dataSet id="csh_write_off_interface_ds" autoQuery="true" fetchAll="true"
model="csh.CSH531N.csh_write_off_interface"
queryUrl="${/request/@context_path}/autocrud/csh.CSH531N.csh_write_off_interface/query?trx_interface_id=${/parameter/@transaction_id}"
queryUrl="${/request/@context_path}/autocrud/csh.CSH531N.csh_write_off_interface/query?trx_interface_id=${/parameter/@transaction_id}&amp;transaction_date=${/parameter/@transaction_date}"
selectable="true">
<a:fields>
<a:field name="company_id" defaultValue="${/parameter/@company_id}"/>
<a:field name="write_off_date" validator="write_off_date_validator" required="true"
<a:field name="write_off_date" datatype="java.util.Date" validator="write_off_date_validator" required="true"
defaultValue="${/model/sys_default_time/record/@now_date}"/>
<a:field name="journal_date" required="true"
defaultValue="${/model/sys_default_time/record/@now_date}"/>
......@@ -760,7 +763,7 @@
<a:field name="trx_interface_id" defaultValue="${/parameter/@transaction_id}"/>
<a:field name="contract_number" prompt="合同编号" autoComplete="true" lovAutoQuery="true"
lovHeight="850" required="true"
lovUrl="${/request/@context_path}/modules/csh/CSH531N/csh_write_off_ref_contract.lview?bp_id=${/model/csh_transaction_path/record/@bp_id}&amp;deposit_flag=${/parameter/@deposit_flag}"
lovUrl="${/request/@context_path}/modules/csh/CSH531N/csh_write_off_ref_contract.lview?bp_id=${/model/csh_transaction_path/record/@bp_id}&amp;deposit_flag=${/parameter/@deposit_flag}&amp;transaction_date=${/model/csh_transaction_path/record/@transaction_date}"
lovWidth="1350" title="合同号选择">
<a:mapping>
<a:map from="contract_number" to="contract_number"/>
......
......@@ -68,11 +68,17 @@
rec.set('write_off_principal', cf_recs[0].get('unreceived_principal'));
rec.set('write_off_interest', cf_recs[0].get('unreceived_interest'));
rec.set('unreceived_amount', cf_recs[0].get('unreceived_amount'));
rec.set('write_off_date',new Date().format('yyyy-mm-dd'));
rec.set('journal_date',new Date().format('yyyy-mm-dd'));
// rec.set('write_off_amount', cf_recs[0].get('unreceived_amount'));
for (var i = 1; i < cf_recs.length; i++) {
//copy...
var newRecord = new Leaf.Record({...rec.data});
// var newRecord = new Leaf.Record({...rec.data});
//IE不支持ES6扩展
var obj = JSON.parse(JSON.stringify(rec.data));
var newRecord = new Leaf.Record(obj);
newRecord.ds = rec.ds;
newRecord.set('write_off_cf_item_desc', cf_recs[i].get('cf_item_desc'));
newRecord.set('write_off_cf_item', cf_recs[i].get('cf_item'));
......@@ -88,6 +94,8 @@
newRecord.set('left_amount', cf_recs[i].get('unreceived_amount'));
newRecord.set('write_off_principal', cf_recs[i].get('unreceived_principal'));
newRecord.set('write_off_interest', cf_recs[i].get('unreceived_interest'));
newRecord.set('write_off_date',new Date().format('yyyy-mm-dd'));
newRecord.set('journal_date',new Date().format('yyyy-mm-dd'));
// newRecord.set('write_off_amount', cf_recs[i].get('unreceived_amount'));
ds.add(newRecord);
......@@ -137,7 +145,7 @@
<a:dataSet id="csh_write_off_lov_ds" fetchAll="true" bindTarget="csh_lov_con_contract_ds"
bindName="csh_con_cf" selectable="true" selectionModel="multiple"
model="csh.CSH531N.csh_con_contract_cashflow" queryDataSet="csh_query_cf_ds"
queryUrl="${/request/@context_path}/autocrud/csh.CSH531N.csh_con_contract_cashflow/query?deposit_flag=${/parameter/@deposit_flag}">
queryUrl="${/request/@context_path}/autocrud/csh.CSH531N.csh_con_contract_cashflow/query?deposit_flag=${/parameter/@deposit_flag}&amp;transaction_date=${/parameter/@transaction_date}">
<a:fields>
<a:field name="contract_id"/>
<a:field name="cashflow_id"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure>
<a:model-query autoCount="true" defaultWhereClause="enabled_flag = &apos;Y&apos;" fetchall="true" model="gld.gld_currency" queryOrderBy="currency_code" rootpath="currency_list"/>
<a:model-query autoCount="false" fetchAll="true" model="hls_acr.hls_acr5010.hls_acr_ebank_output_for_init" rootPath="hls_acr_ebank_output_for_init_list"/>
<a:model-query autoCount="true" defaultWhereClause="enabled_flag = &apos;Y&apos;" fetchall="true"
model="gld.gld_currency" queryOrderBy="currency_code" rootpath="currency_list"/>
<a:model-query autoCount="false" fetchAll="true" model="hls_acr.hls_acr5010.hls_acr_ebank_output_for_init"
rootPath="hls_acr_ebank_output_for_init_list"/>
<a:model-query model="basic.hls_sys_time_default_value" rootPath="sys_date_rp"/>
</a:init-procedure>
<a:view>
<a:link id="acr_ebank_excel_id" url="${/request/@context_path}/modules/hls_acr/HLS_ACR5010/acr_ebank_excel.lsc"/>
<a:link id="acr_ebank_excel_id"
url="${/request/@context_path}/modules/hls_acr/HLS_ACR5010/acr_ebank_excel.lsc"/>
<a:link id="pageLink_report_dl" url="${/request/@context_path}/modules/acr/ACR528/excel_report_dl.lsc"/>
<a:link id="acr_invoice_interface_excel_sheets_id" url="${/request/@context_path}/modules/hls_acr/HLS_ACR5010/acr_invoice_interface_excel_sheets.lsc"/>
<a:link id="acr_invoice_abc2_interface_excel_sheets_id" url="${/request/@context_path}/modules/hls_acr/HLS_ACR5010/acr_invoice_abc2_interface_excel_sheets.lsc"/>
<a:link id="acr_invoice_ccb_interface_excel_sheets_id" url="${/request/@context_path}/modules/hls_acr/HLS_ACR5010/acr_invoice_ccb_interface_excel_sheets.lsc"/>
<a:link id="check_bp_name_and_mark_link" model="hls_acr.hls_acr5010.hls_acr_abc_2_output_temp_for_maintain" modelaction="execute"/>
<script><![CDATA[
var file_name;
var output_id;
function amountValidator(record, name, value) {
if (typeof(value) != 'undefined' && !Ext.isEmpty(value)) {
if (value <= 0) {
return '该字段只能为正数';
} else {
return true;
}
}
return true;
}
function submit_fun() {
debugger;
if ($('hls_acr_ebank_output_ds').validate()) {
var data = $('hls_acr_ebank_output_ds').getJsonData(false);
Leaf.request({
url: 'hls_acr_ebank_output_init.lsc',
para: data,
success: function(args) {
file_name = args.result.file_name;
output_id = args.result.record.output_id;
$('hls_acr_ebank_output_temp_ds').setQueryParameter('output_id', output_id);
$('hls_acr_ebank_output_temp_ds').query();
},
scope: this
});
<a:link id="acr_invoice_interface_excel_sheets_id"
url="${/request/@context_path}/modules/hls_acr/HLS_ACR5010/acr_invoice_interface_excel_sheets.lsc"/>
<a:link id="acr_invoice_abc2_interface_excel_sheets_id"
url="${/request/@context_path}/modules/hls_acr/HLS_ACR5010/acr_invoice_abc2_interface_excel_sheets.lsc"/>
<a:link id="acr_invoice_ccb_interface_excel_sheets_id"
url="${/request/@context_path}/modules/hls_acr/HLS_ACR5010/acr_invoice_ccb_interface_excel_sheets.lsc"/>
<a:link id="check_bp_name_and_mark_link" model="hls_acr.hls_acr5010.hls_acr_abc_2_output_temp_for_maintain"
modelaction="execute"/>
<script><![CDATA[
var file_name;
var output_id;
function amountValidator(record, name, value) {
if (typeof (value) != 'undefined' && !Ext.isEmpty(value)) {
if (value <= 0) {
return '该字段只能为正数';
} else {
return true;
}
}
return true;
}
function numberRenderer(value, ds, name) {
return Leaf.formatNumber(value, 2);
function submit_fun() {
debugger;
if ($('hls_acr_ebank_output_ds').validate()) {
var data = $('hls_acr_ebank_output_ds').getJsonData(false);
Leaf.request({
url: 'hls_acr_ebank_output_init.lsc',
para: data,
success: function (args) {
file_name = args.result.file_name;
output_id = args.result.record.output_id;
$('hls_acr_ebank_output_temp_ds').setQueryParameter('output_id', output_id);
$('hls_acr_ebank_output_temp_ds').query();
},
scope: this
});
}
}
function numberRenderer(value, ds, name) {
return Leaf.formatNumber(value, 2);
}
function onUpdate(ds, record, name, value, oldvalue) {
$('hls_acr_ebank_output_temp_ds').removeAll();
file_name = null;
if (name == 'customer_type') {
record.set('customer_name_display', null);
function onUpdate(ds, record, name, value, oldvalue) {
$('hls_acr_ebank_output_temp_ds').removeAll();
file_name = null;
var customer_type = record.get("customer_type");
var customer_name_display = record.getMeta().getField('customer_name_display');
if (name == 'customer_type') {
record.set('customer_name_display', null);
customer_name_display.setTitle('${l:CUSTOMER}');
customer_name_display.setReadOnly(false);
var url = 'hls_acr.hls_acr5010.hls_prj_customer_for_lov?customer_type=' + customer_type;
customer_name_display.setLovService(url);
var mapping = [{
from: "bp_id",
to: "customer_id"
}, {
from: "bp_name",
to: "customer_name_display"
}];
customer_name_display.setMapping(mapping);
var customer_type = record.get("customer_type");
var customer_name_display = record.getMeta().getField('customer_name_display');
customer_name_display.setTitle('${l:CUSTOMER}');
customer_name_display.setReadOnly(false);
var url = 'hls_acr.hls_acr5010.hls_prj_customer_for_lov?customer_type=' + customer_type;
customer_name_display.setLovService(url);
var mapping = [{
from: "bp_id",
to: "customer_id"
}, {
from: "bp_name",
to: "customer_name_display"
}];
customer_name_display.setMapping(mapping);
}
//add by 5390 当生成规则是合并时,不能选择期数
else if (name == 'generate_rules') {
var period_number = record.getMeta().getField('period_number');
if (value == 'N') {
record.set('period_number', null);
period_number.setReadOnly(true);
return;
} else {
period_number.setReadOnly(false);
return;
}
//add by 5390 当生成规则是合并时,不能选择期数
else if(name == 'generate_rules'){
var period_number = record.getMeta().getField('period_number');
if(value == 'N'){
record.set('period_number', null);
period_number.setReadOnly(true);
return;
}else{
period_number.setReadOnly(false);
return;
}
}
}
}
function getNowFormatDate() {
var date = new Date();
var seperator1 = "-";
var seperator2 = ":";
var month = date.getMonth() + 1;
var strDate = date.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate + " " + date.getHours() + seperator2 + date.getMinutes() + seperator2 + date.getSeconds();
return currentdate;
function getNowFormatDate() {
var date = new Date();
var seperator1 = "-";
var seperator2 = ":";
var month = date.getMonth() + 1;
var strDate = date.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate + " " + date.getHours() + seperator2 + date.getMinutes() + seperator2 + date.getSeconds();
return currentdate;
}
function output_file() {
var templet= 'leaf.plugin.export.word/农行导出模板.xls';
if (!file_name) {
return;
}
function output_file() {
var templet = 'leaf.plugin.export.word/农行导出模板.xls';
if (!file_name) {
return;
}
if (!output_id) {
return;
}
if (!output_id) {
return;
}
var records = $('hls_acr_ebank_output_temp_ds').getAll();
var hd_record = $('hls_acr_ebank_output_ds').getCurrentRecord();
var records = $('hls_acr_ebank_output_temp_ds').getAll();
var hd_record = $('hls_acr_ebank_output_ds').getCurrentRecord();
if (records.length == 0) {
return;
}
if (records.length == 0) {
return;
}
//add by wdd 20180530 for HL
//导出时相同客户账号不能有多条校验
var same_dd_bank_account_num_n = '';
for (var x = 0;x < records.length;x++) {
var dd_bank_account_num_x = records[x].get('dd_bank_account_num');
if (dd_bank_account_num_x != '') {
for (var y = records.length - 1;y > x;y--) {
var dd_bank_account_num_y = records[y].get('dd_bank_account_num');
if (dd_bank_account_num_x == dd_bank_account_num_y) {
if (same_dd_bank_account_num_n.indexOf(dd_bank_account_num_x) == -1) {
if (!Ext.isEmpty(same_dd_bank_account_num_n)) {
same_dd_bank_account_num_n = same_dd_bank_account_num_n + ',' + dd_bank_account_num_x;
} else {
same_dd_bank_account_num_n = dd_bank_account_num_x;
}
//add by wdd 20180530 for HL
//导出时相同客户账号不能有多条校验
var same_dd_bank_account_num_n = '';
for (var x = 0; x < records.length; x++) {
var dd_bank_account_num_x = records[x].get('dd_bank_account_num');
if (dd_bank_account_num_x != '') {
for (var y = records.length - 1; y > x; y--) {
var dd_bank_account_num_y = records[y].get('dd_bank_account_num');
if (dd_bank_account_num_x == dd_bank_account_num_y) {
if (same_dd_bank_account_num_n.indexOf(dd_bank_account_num_x) == -1) {
if (!Ext.isEmpty(same_dd_bank_account_num_n)) {
same_dd_bank_account_num_n = same_dd_bank_account_num_n + ',' + dd_bank_account_num_x;
} else {
same_dd_bank_account_num_n = dd_bank_account_num_x;
}
}
}
}
}
if (!Ext.isEmpty(same_dd_bank_account_num_n)) {
Leaf.showMessage('提示', '客户账号 ' + same_dd_bank_account_num_n + '存在多条,不可导出,请核实!');
return;
} else {
// update panhong 新增建行代付的接口20190319
var payment_method = hd_record.get('payment_method');
// 农行(三方)
if (payment_method == 'ABC'){
url = $('acr_invoice_interface_excel_sheets_id').getUrl() + '?output_id=' + output_id+ '&templet=' + encodeURI(templet);
}
// 农行(两方)
if (payment_method == 'ABC_2'){
//校验用户和备注的长度
Leaf.request({
url: $('check_bp_name_and_mark_link').getUrl(),
para: {
output_id : output_id
},
success: function(res) {
if(res.result.data_length > 3000){
Leaf.showMessage('提示', '本批次导出数据总计'+res.result.data_length+'条,已超出3000条上限!');
}
url = $('acr_invoice_abc2_interface_excel_sheets_id').getUrl() + '?output_id=' + output_id;
window.open(url);
},
scope: this
});
}
window.open(url);
}
if (!Ext.isEmpty(same_dd_bank_account_num_n)) {
Leaf.showMessage('提示', '客户账号 ' + same_dd_bank_account_num_n + '存在多条,不可导出,请核实!');
return;
} else {
// update panhong 新增建行代付的接口20190319
var payment_method = hd_record.get('payment_method');
// 农行(三方)
if (payment_method == 'ABC') {
url = $('acr_invoice_interface_excel_sheets_id').getUrl() + '?output_id=' + output_id + '&templet=' + encodeURI(templet);
}
//end
// 农行(两方)
if (payment_method == 'ABC_2') {
//校验用户和备注的长度
Leaf.request({
url: $('check_bp_name_and_mark_link').getUrl(),
para: {
output_id: output_id
},
success: function (res) {
if (res.result.data_length > 3000) {
Leaf.showMessage('提示', '本批次导出数据总计' + res.result.data_length + '条,已超出3000条上限!');
}
url = $('acr_invoice_abc2_interface_excel_sheets_id').getUrl() + '?output_id=' + output_id;
window.open(url);
},
scope: this
});
}
window.open(url);
}
/*
function file_download(i,sql){
var separator = "|";
form = document.createElement("form");
form.target = "_blank";
form.method="post";
form.action = 'hls_acr_ebank_export_txt.lsc';
s = document.createElement("input");
s.type = 'hidden';
s.name = 'fileName';
s.value = file_name;
form.appendChild(s);
s = document.createElement("input");
s.type = 'hidden';
s.name = 'separator';
s.value = separator;
form.appendChild(s);
s = document.createElement("input");
s.type = 'hidden';
s.name = 'sql';
s.value = sql;
form.appendChild(s);
document.body.appendChild(form);
form.submit();
form.parentNode.removeChild(form);
}
*/
//end
}
/*
function file_download(i,sql){
var separator = "|";
form = document.createElement("form");
form.target = "_blank";
form.method="post";
form.action = 'hls_acr_ebank_export_txt.lsc';
s = document.createElement("input");
s.type = 'hidden';
s.name = 'fileName';
s.value = file_name;
form.appendChild(s);
s = document.createElement("input");
s.type = 'hidden';
s.name = 'separator';
s.value = separator;
form.appendChild(s);
s = document.createElement("input");
s.type = 'hidden';
s.name = 'sql';
s.value = sql;
form.appendChild(s);
document.body.appendChild(form);
form.submit();
form.parentNode.removeChild(form);
}
*/
function delete_fun() {
$('grid_id').remove();
}
function delete_fun() {
$('grid_id').remove();
}
]]></script>
<a:dataSets>
<a:dataSet id="hls_acr_payment_method_ds" lookupCode="HLS_ACR5010_WITHHOLD_WAYS"/>
......@@ -213,17 +223,32 @@
<a:dataSet id="hls_acr_ebank_output_ds" autoCreate="true">
<a:fields>
<a:field name="session_id" defaultValue="${/session/@session_id}"/>
<a:field name="deadline_date" required="true"/>
<a:field name="deadline_date_to" required="true"/>
<a:field name="deadline_date"/>
<!-- <a:field name="deadline_date" required="true"/>-->
<!-- <a:field name="deadline_date_to" required="true"/>-->
<a:field name="deadline_date_to" required="true" defaultValue="${/model/sys_date_rp/record/@now_time}"/>
<a:field name="currency_code" defaultValue="CNY"/>
<a:field name="currency_name" readOnly="true" defaultValue="人民币" displayField="currency_name" options="hls_currency_ds" required="true" returnField="currency_code" valueField="currency_code"/>
<a:field name="payment_method_display" displayField="code_value_name" options="hls_acr_payment_method_ds" required="true" returnField="payment_method" valueField="code_value"/>
<a:field name="currency_name" readOnly="true" defaultValue="人民币" displayField="currency_name"
options="hls_currency_ds" required="true" returnField="currency_code"
valueField="currency_code"/>
<a:field name="payment_method_display" displayField="code_value_name"
options="hls_acr_payment_method_ds" required="true" returnField="payment_method"
valueField="code_value"/>
<!-- <a:field name="payment_method_display" defaultValue="ABC" displayField="code_value_name" readOnly="true" options="hls_acr_payment_method_ds" required="true" returnField="payment_method" valueField="code_value"/> -->
<!-- <a:field name="payment_method_display_n" defaultValue="农行代扣" displayField="code_value_name" readOnly="true" options="hls_acr_payment_method_ds" required="true" returnField="payment_method" valueField="code_value"/> -->
<a:field name="customer_type_display" displayField="code_value_name" options="hls_customer_type_ds" required="true" returnField="customer_type" valueField="code_value"/>
<a:field name="customer_name_display" lovGridHeight="300" lovHeight="450" lovWidth="550" readOnly="true"/>
<a:field name="customer_type_display" displayField="code_value_name" options="hls_customer_type_ds"
required="true" returnField="customer_type" valueField="code_value" readOnly="true" defaultValue="个人"/>
<a:field name="customer_type" defaultValue="NP"/>
<a:field name="customer_name_display" lovService="hls_acr.hls_acr5010.hls_prj_customer_for_lov?customer_type=NP" lovGridHeight="300" lovHeight="450" lovWidth="550">
<a:mapping>
<a:map from="bp_id" to="customer_id"/>
<a:map from="bp_name" to="customer_name_display"/>
</a:mapping>
</a:field>
<a:field name="limit_amount" validator="amountValidator"/>
<a:field name="generate_rules_display" readOnly="true" defaultValue="汇总" displayField="code_value_name" options="hls_generate_rules_ds" required="true" returnField="generate_rules" valueField="code_value"/>
<a:field name="generate_rules_display" readOnly="true" defaultValue="汇总"
displayField="code_value_name" options="hls_generate_rules_ds" required="true"
returnField="generate_rules" valueField="code_value"/>
<a:field name="generate_rules" defaultValue="N"/>
<a:field name="contract_number"/>
</a:fields>
......@@ -233,20 +258,23 @@
</a:dataSet>
<!-- queryUrl="${/request/@context_path}/autocrud/hls_acr.hls_acr5010.hls_acr_ebank_output_temp_for_maintain/query?output_id=output_id"
-->
<a:dataSet id="hls_acr_ebank_output_temp_ds" fetchAll="false" model="hls_acr.hls_acr5010.hls_acr_ebank_output_temp_for_maintain" pageSize="10" queryDataSet="hls_acr_ebank_output_ds" selectable="true"/>
<a:dataSet id="hls_acr_ebank_output_temp_ds" fetchAll="false"
model="hls_acr.hls_acr5010.hls_acr_ebank_output_temp_for_maintain" pageSize="10"
queryDataSet="hls_acr_ebank_output_ds" selectable="true"/>
</a:dataSets>
<a:screenBody>
<a:form column="2" labelWidth="120" title="代扣指令生成" width="600">
<a:datePicker name="deadline_date" bindTarget="hls_acr_ebank_output_ds" prompt="截至日期从" renderer="Leaf.formatDate"/>
<a:datePicker name="deadline_date_to" bindTarget="hls_acr_ebank_output_ds" prompt="截至日期到" renderer="Leaf.formatDate"/>
<!-- <a:datePicker name="deadline_date" bindTarget="hls_acr_ebank_output_ds" prompt="截至日期从" renderer="Leaf.formatDate"/>-->
<a:datePicker name="deadline_date_to" bindTarget="hls_acr_ebank_output_ds" prompt="截至日期到" renderer="Leaf.formatDate"/>
<a:comboBox name="currency_name" bindTarget="hls_acr_ebank_output_ds" prompt="币种"/>
<a:comboBox name="customer_type_display" bindTarget="hls_acr_ebank_output_ds" prompt="客户类型"/>
<a:lov name="customer_name_display" bindTarget="hls_acr_ebank_output_ds" prompt="客户名称"/>
<a:comboBox name="payment_method_display" bindTarget="hls_acr_ebank_output_ds" prompt="租金支付方式"/>
<a:numberField name="limit_amount" bindTarget="hls_acr_ebank_output_ds" prompt="代扣指令行限额" renderer="numberRenderer"/>
<!-- <a:numberField name="limit_amount" bindTarget="hls_acr_ebank_output_ds" prompt="代扣指令行限额"-->
<!-- renderer="numberRenderer"/>-->
<a:comboBox name="generate_rules_display" bindTarget="hls_acr_ebank_output_ds" prompt="生成规则"/>
<a:textField name="contract_number" bindTarget="hls_acr_ebank_output_ds" prompt="合同编号"/>
<a:textField name="period_number" bindTarget="hls_acr_ebank_output_ds" prompt="期数"/>
<!-- <a:textField name="contract_number" bindTarget="hls_acr_ebank_output_ds" prompt="合同编号"/>-->
<!-- <a:textField name="period_number" bindTarget="hls_acr_ebank_output_ds" prompt="期数"/>-->
</a:form>
<a:hBox>
<a:button click="submit_fun" text="PROMPT.OK" width="90"/>
......@@ -255,13 +283,13 @@
<a:grid id="grid_id" bindTarget="hls_acr_ebank_output_temp_ds" height="301" navBar="true" width="1030">
<a:columns>
<a:column name="sequence_no" align="center" prompt="序号" width="60"/>
<a:column name="dd_bank_account_num" prompt="客户账号" width="100"/>
<a:column name="dd_bank_account_num" prompt="客户账号" width="150"/>
<a:column name="bp_name" prompt="客户名称" width="150"/>
<a:column name="due_amount" align="right" prompt="应扣金额" renderer="numberRenderer" width="120"/>
<a:column name="id_card_no" prompt="证件号" width="150"/>
<a:column name="contract_number" prompt="合同编号" width="150"/>
<a:column name="times" prompt="期数" width="150"/>
<a:column name="due_date" prompt="计划付款日" width="150"/>
<!-- <a:column name="contract_number" prompt="合同编号" width="150"/>-->
<!-- <a:column name="times" prompt="期数" width="150"/>-->
<!-- <a:column name="due_date" prompt="计划付款日" width="150"/>-->
</a:columns>
</a:grid>
<a:hBox>
......
......@@ -12,22 +12,28 @@
<a:model-query fetchAll="true" model="hls.HLS303.hls_bp_agentemployee_id" rootPath="employee_id_path"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.amount_check" rootPath="amount_check"/>
<s:server-script import="contract_print_path.js"><![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]>
$ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]>
</s:server-script>
</a:init-procedure>
<a:view>
<a:link id="${/parameter/@layout_code}hls_bp_master_query_link"
url="${/request/@context_path}/modules/hls/HLS215N/hls_bp_master_query.lview"/>
<a:link id="bp_tenant_detail_query_link" model="prj.PRJ500D.bp_tenant_old_r_query" modelaction="query"/>
<a:link id="${/parameter/@layout_code}_tenant_rate_query_link"
url="${/request/@context_path}/modules/prj/PRJ902/prj_project_score_result.lview"/>
<a:link id="${/parameter/@layout_code}_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<!-- <a:link id="get_special_fields_link_id" model="cont.CON500.con_contract_get_special_fields" modelaction="update"/> -->
<a:link id="get_special_fields_link_id" model="prj.PRJ500.get_new_prj_number" modelaction="update"/>
<a:link id="hls_bp_master_billing_link" model="prj.PRJ500N.hls_bp_master_billing" modelaction="query"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<script src="${/request/@context_path}/modules/prj/PRJ500N/javascripts/input_validator.js" type="text/javascript"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id"
url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id"
url="${/request/@context_path}/uploadFile.lview"/>
<script src="${/request/@context_path}/modules/prj/PRJ500N/javascripts/input_validator.js"
type="text/javascript"/>
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calc_quotation_header_link_id"
url="${/request/@context_path}/modules/hls/HLS500/hls_fin_calc_quotation_header.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id"
......@@ -44,18 +50,19 @@
<a:link id="${/parameter/@layout_code}tenant_rate_query_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_history_display.lview"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.prj_occu_object_display" rootPath="occu_object"/>
<a:link id="prj_two_secondary_lease_link_id" model="prj.PRJ501N.insert_two_secondary_lease" modelaction="update"/>
<a:link id="prj_two_secondary_lease_link_id" model="prj.PRJ501N.insert_two_secondary_lease"
modelaction="update"/>
<a:link id="${/parameter/@layout_code}contract_number_query_link"
url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
<script type="text/javascript"><![CDATA[
// alert('${/parameter/@division}')
// alert('${/parameter/@division}')
//add by zhuxianfei
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
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');
var history_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_CASHFLOW_NS', '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 head_record = $(ds_id).getAt(0);
......@@ -68,10 +75,10 @@
// Leaf.showMessage('${l:PROMPT}', '${l:HLS.CALC_TYPE_IS_NULL}');
// return;
}
if (record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if (record.dirty == true) {
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}');
......@@ -144,9 +151,9 @@
});
} else {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
var cal_hd_price_list= record.get('cal_hd_price_list');
var price_list= record.get('price_list');
if(cal_hd_price_list == price_list) {
var cal_hd_price_list = record.get('cal_hd_price_list');
var price_list = record.get('price_list');
if (cal_hd_price_list == price_list) {
//直接进入报价页面
var win = new Leaf.Window({
......@@ -173,7 +180,7 @@
$(quotation_ds_id).query();
$(history_ds_id).query();
});
}else {
} else {
record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD');
var calc_recreate_L_formula;
calc_recreate_L_formula = 'Y';
......@@ -263,11 +270,11 @@
var param = {};
param['bp_id'] = record.get('bp_id');
param['bp_class'] = record.get('bp_class');
if(record.get('bp_category') =='AGENT'){
if (record.get('bp_category') == 'AGENT') {
param['function_code'] = 'HLS303_Q';
param['function_usage'] = 'QUERY';
}else{
} else {
param['function_code'] = 'HLS215D';
param['function_usage'] = 'QUERY';
}
......@@ -276,7 +283,7 @@
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}');
}
function prj501n_project_number_renderer(id, name, query_only){
function prj501n_project_number_renderer(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};
param['bp_id'] = record.get('project_id');
......@@ -289,7 +296,8 @@
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}project_number_query_link', record.ds.id, '${/parameter/@layout_code}');
}
function prj501n_contract_number_renderer(id, name, query_only){
function prj501n_contract_number_renderer(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};
param['contract_id'] = record.get('contract_id');
......@@ -380,33 +388,32 @@
return url;
}
} else if (name == 'bp_link' && !record.isNew) {
} else if (name == 'bp_link' && !record.isNew) {
link_function = 'prj501n_bp_code_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
}else if(name=='project_number'){
} else if (name == 'project_number') {
link_function = 'prj501n_project_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value+ '</a>';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value + '</a>';
}else if(name =='contract_number'){
} 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>';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value + '</a>';
}
};
//保存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 prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var bp_ds_ids = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1','prj_project');
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP','prj_project_bp');
var prj_project_lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR','prj_project_lease_item');
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'T_HISTORY_INGO', 'hls_bp_master');
var bp_ds_ids = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project');
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP', 'prj_project_bp');
var prj_project_lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master');
var cdd_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
var virtual_ds_id = '${/parameter/@layout_code}_virtual_ds';
if (ds_id==ds.id || virtual_ds_id==ds.id) {
var virtual_ds_id = '${/parameter/@layout_code}_virtual_ds';
if (ds_id == ds.id || virtual_ds_id == ds.id) {
$(cdd_item_ds_id).query();
$(bp_ds_id).query();
$(tenant_ds_id).query();
......@@ -414,25 +421,25 @@
$(prj_quotation_ds_id).query();
}
var record=$(ds_id).getCurrentRecord();
var url='${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id='+record.get('bp_id_tenant');
var record = $(ds_id).getCurrentRecord();
var url = '${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=' + record.get('bp_id_tenant');
$(tenant_ds_id).setQueryUrl(url);
$(tenant_ds_id).query();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
};
//查询时调用(form,fieldboxcolumn)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_query'] = function(ds, qpara, bp_seq) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_query'] = function (ds, qpara, bp_seq) {
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_TENANT_INFO', 'prj_project_bp');
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_INFO', 'prj_project_bp');
var prj_project_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');
if(ds.id==tenant_ds_id){
if (ds.id == tenant_ds_id) {
var prj_record = $(prj_project_ds_id).getCurrentRecord();
qpara['project_id'] = prj_record.get('project_id');
}
if(ds.id == quotation_ds_id){
if (ds.id == quotation_ds_id) {
var prj_record = $(prj_project_ds_id).getCurrentRecord();
qpara['document_id'] = prj_record.get('project_id');
qpara['project_id'] = prj_record.get('project_id');
......@@ -456,8 +463,8 @@
};
//选择事件(grid,attach,gridbox,table)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_select'] = function(ds, record, bp_seq) {
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_BP', 'prj_project_bp');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_select'] = function (ds, record, bp_seq) {
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP', 'prj_project_bp');
if (bp_ds_id == ds.id && bp_ds_id) {
if (record.get('bp_category') == 'TENANT') {
//实际为不选中
......@@ -473,80 +480,192 @@
}
}
};
function jsGetAge(strBirthday) {
var returnAge;
var strBirthdayArr = strBirthday.split("-");
var birthYear = strBirthdayArr[0];
var birthMonth = strBirthdayArr[1];
var birthDay = strBirthdayArr[2];
var d = new Date();
var nowYear = d.getFullYear();
var nowMonth = d.getMonth() + 1;
var nowDay = d.getDate();
if (nowYear == birthYear) {
returnAge = 0;//同年 则为0岁  
} else {
var ageDiff = nowYear - birthYear; //年之差  
if (ageDiff > 0) {
if (nowMonth == birthMonth) {
var dayDiff = nowDay - birthDay;//日之差  
if (dayDiff < 0) {
returnAge = ageDiff - 1;
} else {
returnAge = ageDiff;
}
} else {
var monthDiff = nowMonth - birthMonth;//月之差  
if (monthDiff < 0) {
returnAge = ageDiff - 1;
} else {
returnAge = ageDiff;
}
}
} else {
returnAge = -1;//返回-1 表示出生日期输入错误 晚于今天  
}
}
return returnAge;//返回周岁年龄  
}
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var prj_project_history_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master');;
//选择承租人带出开票信息
if(prj_project_ds_id==ds.id &&prj_project_ds_id){
if(name=="bp_id_tenant" && value){
Leaf.Masker.mask(Ext.getBody());
Leaf.request({
url: $('hls_bp_master_billing_link').getUrl(),
para: {
bp_id:value
},
success: function(res) {
var billing_into=res.result.record;
var prj_project_bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_bp');
$(prj_project_bp_ds_id).getAt(0).set('taxpayer_type_n',billing_into.taxpayer_type_n);
$(prj_project_bp_ds_id).getAt(0).set('taxpayer_type',billing_into.taxpayer_type);
$(prj_project_bp_ds_id).getAt(0).set('invoice_title',billing_into.invoice_title);
$(prj_project_bp_ds_id).getAt(0).set('invoice_bp_address',billing_into.invoice_bp_address);
$(prj_project_bp_ds_id).getAt(0).set('invoice_bp_phone_num',billing_into.invoice_bp_phone_num);
$(prj_project_bp_ds_id).getAt(0).set('invoice_bp_bank',billing_into.invoice_bp_bank);
$(prj_project_bp_ds_id).getAt(0).set('invoice_bp_bank_account',billing_into.invoice_bp_bank_account);
$(prj_project_bp_ds_id).getAt(0).set('tax_registry_num',billing_into.tax_registry_num);
$(prj_project_bp_ds_id).getAt(0).set('ref_v07',billing_into.ref_v07);
//record.set();
Leaf.Masker.unmask(Ext.getBody());
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
//根据承租人查找该承租人的历史合同信息
$(prj_project_history_ds_id).setQueryUrl('${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query');
$(prj_project_history_ds_id).setQueryParameter("bp_id",value);
$(prj_project_history_ds_id).query();
}
}
if(name=='pay_method'){
if ( record.get('pay_method') == 'WIRE_TRANSFER') {
record.set('bank_account_id',null);
record.set('bank_account_id_n',null);
record.set('bank_branch_num','');
record.set('bank_account_name','');
record.getField('bank_account_id').setReadOnly(true);
record.getField('bank_account_id_n').setReadOnly(true);
record.getField('bank_account_id').setRequired(false);
record.getField('bank_account_id_n').setRequired(false);
} else {
record.getField('bank_account_id').setReadOnly(false);
record.getField('bank_account_id_n').setReadOnly(false);
record.getField('bank_account_id').setRequired(false);
record.getField('bank_account_id_n').setRequired(false);
var prj_project_history_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master');
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
//选择承租人带出开票信息
if (prj_project_ds_id == ds.id && prj_project_ds_id) {
if (name == "bp_id_tenant_n" && value) {
var bp_id_tenant = record.get('bp_id_tenant');
Leaf.Masker.mask(Ext.getBody());
Leaf.request({
url: $('hls_bp_master_billing_link').getUrl(),
para: {
bp_id: bp_id_tenant
},
success: function (res) {
var billing_into = res.result.record;
var prj_project_bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_bp');
$(prj_project_bp_ds_id).getAt(0).set('taxpayer_type_n', billing_into.taxpayer_type_n);
$(prj_project_bp_ds_id).getAt(0).set('taxpayer_type', billing_into.taxpayer_type);
$(prj_project_bp_ds_id).getAt(0).set('invoice_title', billing_into.invoice_title);
$(prj_project_bp_ds_id).getAt(0).set('invoice_bp_address', billing_into.invoice_bp_address);
$(prj_project_bp_ds_id).getAt(0).set('invoice_bp_phone_num', billing_into.invoice_bp_phone_num);
$(prj_project_bp_ds_id).getAt(0).set('invoice_bp_bank', billing_into.invoice_bp_bank);
$(prj_project_bp_ds_id).getAt(0).set('invoice_bp_bank_account', billing_into.invoice_bp_bank_account);
$(prj_project_bp_ds_id).getAt(0).set('tax_registry_num', billing_into.tax_registry_num);
$(prj_project_bp_ds_id).getAt(0).set('ref_v07', billing_into.ref_v07);
//record.set();
Leaf.Masker.unmask(Ext.getBody());
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
//根据承租人查找该承租人的历史合同信息
$(prj_project_history_ds_id).setQueryUrl('${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query');
$(prj_project_history_ds_id).setQueryParameter("bp_id", bp_id_tenant);
$(prj_project_history_ds_id).query();
Leaf.Masker.mask(Ext.getBody());
if ($(score_ds_id).getCurrentRecord() && !$(score_ds_id).getCurrentRecord().get('score_name')) {
var score_name = record.get('legal_person') || value;
$(score_ds_id).getCurrentRecord().set('score_name', score_name);
}
Leaf.request({
url: $('bp_tenant_detail_query_link').getUrl(),
para: {
bp_id: bp_id_tenant
},
success: function (res) {
var obj = res.result.record;
if (obj) {
var bp_tenant_detail_r = $(score_ds_id).getCurrentRecord();
if (bp_tenant_detail_r) {
for (var key in bp_tenant_detail_r.data) {
if (key != 'bp_detail_id' && key != 'score_name') {
var vl = obj[key];
if (key == 'bp_birth' && obj[key]) {
vl = new Date(obj[key].toString());
}
if (vl != "null" && vl != "undefined") {
bp_tenant_detail_r.set(key, vl);
}
}
}
}
}
Leaf.Masker.unmask(Ext.getBody());
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
if(name == 'bp_id_tenant'){
if(!value){
var bp_tenant_detail_r = $(score_ds_id).getCurrentRecord();
if (bp_tenant_detail_r) {
for (var key in bp_tenant_detail_r.data) {
bp_tenant_detail_r.set(key,'');
}
}
}
record.getField('bank_account_id').setLovPara('bp_id_tenant', record.get('bp_id_tenant'));
}
if (name == 'pay_method') {
if (record.get('pay_method') == 'WIRE_TRANSFER') {
record.set('bank_account_id', null);
record.set('bank_account_id_n', null);
record.set('bank_branch_num', '');
record.set('bank_account_name', '');
record.getField('bank_account_id').setReadOnly(true);
record.getField('bank_account_id_n').setReadOnly(true);
record.getField('bank_account_id').setRequired(false);
record.getField('bank_account_id_n').setRequired(false);
} else {
record.getField('bank_account_id').setReadOnly(false);
record.getField('bank_account_id_n').setReadOnly(false);
record.getField('bank_account_id').setRequired(false);
record.getField('bank_account_id_n').setRequired(false);
}
}
}
}if(name == 'bp_id_tenant'){
record.getField('bank_account_id').setLovPara('bp_id_tenant',record.get('bp_id_tenant'));
if (score_ds_id == ds.id) {
if (name == 'bp_birth' && value) {
if (jsGetAge(value.format('yyyy-mm-dd').toString()) == -1) {
Leaf.showInfoMessage("提示", "出生日期不能大于当前日期");
setTimeout(function () {
record.set('bp_birth', old_value);
}, 0);
} else {
record.set('bp_age', jsGetAge(value.format('yyyy-mm-dd').toString()));
}
}
}
var device_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_SCORE_DEVICE', 'bp_tenant_rate_item');
if (device_ds_id == ds.id) {
if (name == 'quantity') {
if (value <= 0) {
Leaf.showInfoMessage("提示", "数量必须大于0");
setTimeout(function () {
record.set('quantity', old_value);
}, 0);
}
}
}
};
//加载时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function(ds, record, config_records, bp_seq) {
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_BP', 'prj_project_bp');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, record, config_records, bp_seq) {
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP', 'prj_project_bp');
if (bp_ds_id == ds.id && bp_ds_id) {
if (record.get('bp_category') == 'TENANT') {
record.getField('bp_category_n').setReadOnly(true);
......@@ -560,7 +679,7 @@
};
//序号自增 add by lijingjing
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function(ds, record, config_records, bp_seq) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function (ds, record, config_records, bp_seq) {
//租赁物序号
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item');
if (ds_id == ds.id && ds_id) {
......@@ -568,7 +687,7 @@
var measure_records = ds.getAll(),
seq_num = 0;
if (measure_records.length) {
for (var j = 0;j < measure_records.length;j++) {
for (var j = 0; j < measure_records.length; j++) {
var measure_record = measure_records[j],
rk = measure_record.get('lease_item_seq');
if (seq_num <= rk) {
......@@ -579,34 +698,65 @@
var rk_value = seq_num + 1;
record.set('lease_item_seq', rk_value);
}
var device_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_SCORE_DEVICE', 'bp_tenant_rate_item');
var traffic_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_SCORE_TRAFFIC', 'bp_tenant_rate_item');
if ((device_ds_id == ds.id && device_ds_id) || (traffic_ds_id == ds.id && traffic_ds_id)) {
//设置序号
var rs = ds.getAll(),
seq_num = 0;
if (rs.length) {
for (var j = 0; j < rs.length; j++) {
var r = rs[j],
rk = r.get('seq_num');
if (seq_num <= rk) {
seq_num = rk;
}
}
}
var rk_value = seq_num + 1;
record.set('seq_num', rk_value);
}
};
//客户评分
window['${/parameter/@layout_code}_user_button9_layout_dynamic_click'] = function() {
window['${/parameter/@layout_code}_user_button9_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var record = $(ds_id).getCurrentRecord();
var param = {};
if(record.get('project_id')){
if(record.get('project_status')=='NEW'||record.get('project_status')=='APPROVE_RETURN'||record.get('project_status')=='REJECT'){
param['function_code'] = 'PRJ501TENANT';
param['function_usage'] = 'UPDATE';
}else{
param['function_code'] = 'PRJ501TENANT';
param['function_usage'] = 'QUERY';
if (record) {
var param = record.data;
if (record.get('project_id')) {
param['project_id'] = record.get('project_id');
param['winid'] = 'hl_tenant_score_rate_win_id';
param['url_title'] = '客户评分明细';
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
var r = $(score_ds_id).getCurrentRecord();
if (r.dirty) {
Leaf.showInfoMessage('提示', '评分数据发生修改,请先保存再进行评分');
return;
}
if ($(ds_id).validate()) {
var win = new Leaf.Window({
id: param['winid'],
params: param,
url: $('${/parameter/@layout_code}_tenant_rate_query_link').getUrl(),
title: param['url_title'],
fullScreen: true,
draggable: true
});
win.on('close', function () {
$(ds_id).query();
});
}
} else {
Leaf.showMessage('${l:PROMPT}', '请先保存');
return;
}
param['project_id'] = record.get('project_id');
param['winid'] = 'hl_tenant_score_rate_win_id';
param['url_title'] = '客户评分明细';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}tenant_rate_query_link', '${/parameter/@layout_code}');
}else{
Leaf.showMessage('${l:PROMPT}', '请先保存');
return;
}
}
};
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
......@@ -634,8 +784,8 @@
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if($(ds_id).validate()){
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function() {
if ($(ds_id).validate()) {
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('prj_approval_link_id').getUrl(),
......@@ -643,14 +793,14 @@
project_id: project_id
},
scope: this,
success: function() {
success: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function() {
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
......@@ -662,12 +812,12 @@
}
/* Leaf.onReady(function(){
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'T_HISTORY_INGO', 'hls_bp_master');
var url='${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=${/parameter/@bp_id}';
$(bp_ds_id).setQueryUrl(url);
$(bp_ds_id).query();
})*/
/* Leaf.onReady(function(){
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'T_HISTORY_INGO', 'hls_bp_master');
var url='${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=${/parameter/@bp_id}';
$(bp_ds_id).setQueryUrl(url);
$(bp_ds_id).query();
})*/
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
......
......@@ -15,14 +15,11 @@
$ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]>
</s:server-script>
<a:model-query model="prj.PRJ500D.bp_tenant_detail_exists_query" defaultWhereClause="t1.project_id=${/parameter/@project_id}" rootPath="bp_tenant_detail_exists"/>
<a:model-query model="prj.PRJ500D.bp_tenant_old_r_query"
defaultWhereClause="t1.bp_id=${/parameter/@bp_id_tenant}"
rootPath="bp_tenant_detail_path"/>
<!-- <a:model-query model="prj.PRJ500D.bp_tenant_detail_exists_query" defaultWhereClause="t1.project_id=${/parameter/@project_id}" rootPath="bp_tenant_detail_exists"/>-->
</a:init-procedure>
<a:view>
<a:link id="hls_bp_master_billing_link" model="prj.PRJ500N.hls_bp_master_billing" modelaction="query"/>
<a:link id="bp_tenant_detail_query_link" model="prj.PRJ500D.bp_tenant_old_r_query" modelaction="query"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}get_special_fields_link_id"
model="cont.CON500.con_contract_get_special_fields" modelaction="update"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id"
......@@ -536,15 +533,17 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var prj_project_history_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master');
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
//选择承租人带出开票信息
if(prj_project_ds_id==ds.id &&prj_project_ds_id){
if(name=="bp_id_tenant" && value){
if(name=="bp_id_tenant_n" && value){
var bp_id_tenant = record.get('bp_id_tenant');
Leaf.Masker.mask(Ext.getBody());
Leaf.request({
url: $('hls_bp_master_billing_link').getUrl(),
para: {
bp_id:value
bp_id:bp_id_tenant
},
success: function(res) {
var billing_into=res.result.record;
......@@ -573,62 +572,112 @@
});
//根据承租人查找该承租人的历史合同信息
$(prj_project_history_ds_id).setQueryUrl('${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query');
$(prj_project_history_ds_id).setQueryParameter("bp_id",value);
$(prj_project_history_ds_id).setQueryParameter("bp_id",bp_id_tenant);
$(prj_project_history_ds_id).query();
Leaf.Masker.mask(Ext.getBody());
if ($(score_ds_id).getCurrentRecord() && !$(score_ds_id).getCurrentRecord().get('score_name')) {
var score_name = record.get('legal_person') || record.get('bp_id_tenant_n');
$(score_ds_id).getCurrentRecord().set('score_name', score_name);
}
Leaf.request({
url: $('bp_tenant_detail_query_link').getUrl(),
para: {
bp_id: bp_id_tenant
},
success: function (res) {
var obj = res.result.record;
if (obj) {
var bp_tenant_detail_r = $(score_ds_id).getCurrentRecord();
if (bp_tenant_detail_r) {
for (var key in bp_tenant_detail_r.data) {
if (key != 'bp_detail_id' && key != 'score_name') {
var vl = obj[key];
if (key == 'bp_birth' && obj[key]) {
vl = new Date(obj[key].toString());
}
if (vl != "null" && vl != "undefined") {
bp_tenant_detail_r.set(key, vl);
}
}
}
}
}
Leaf.Masker.unmask(Ext.getBody());
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
}
if (name == 'pay_method') {
if (record.get('pay_method') == 'WIRE_TRANSFER') {
record.set('bank_account_id', null);
record.set('bank_account_id_n', null);
record.set('bank_branch_num', '');
record.set('bank_account_name', '');
record.getField('bank_account_id').setReadOnly(true);
record.getField('bank_account_id_n').setReadOnly(true);
record.getField('bank_account_id').setRequired(false);
record.getField('bank_account_id_n').setRequired(false);
} else {
record.getField('bank_account_id').setReadOnly(false);
record.getField('bank_account_id_n').setReadOnly(false);
record.getField('bank_account_id').setRequired(false);
record.getField('bank_account_id_n').setRequired(false);
}
if (name == 'pay_method') {
if (record.get('pay_method') == 'WIRE_TRANSFER') {
record.set('bank_account_id', null);
record.set('bank_account_id_n', null);
record.set('bank_branch_num', '');
record.set('bank_account_name', '');
record.getField('bank_account_id').setReadOnly(true);
record.getField('bank_account_id_n').setReadOnly(true);
record.getField('bank_account_id').setRequired(false);
record.getField('bank_account_id_n').setRequired(false);
} else {
record.getField('bank_account_id').setReadOnly(false);
record.getField('bank_account_id_n').setReadOnly(false);
record.getField('bank_account_id').setRequired(false);
record.getField('bank_account_id_n').setRequired(false);
}
}
if (name == 'payment_deduction') {
var quoation_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUOTATION_N', 'prj_quotation');
var quoation_record = $(quoation_ds_id).getCurrentRecord();
var down_payment = quoation_record.get('down_payment') || 0;
var calc_session_id = quoation_record.get('calc_session_id');
var other_payment2;
if (old_value && value && calc_session_id && value == 'NO_DEDUCTION') {
other_payment2 = 0;
} else if (old_value && value && calc_session_id && value != 'NO_DEDUCTION') {
other_payment2 = down_payment;
}
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('${/parameter/@layout_code}_prj_project_update_status_link_id').getUrl(),
para: {
other_payment2: other_payment2,
calc_session_id: calc_session_id
},
success: function (arg) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
if (name == 'payment_deduction') {
var quoation_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUOTATION_N', 'prj_quotation');
var quoation_record = $(quoation_ds_id).getCurrentRecord();
var down_payment = quoation_record.get('down_payment') || 0;
var calc_session_id = quoation_record.get('calc_session_id');
var other_payment2;
if (old_value && value && calc_session_id && value == 'NO_DEDUCTION') {
other_payment2 = 0;
} else if (old_value && value && calc_session_id && value != 'NO_DEDUCTION') {
other_payment2 = down_payment;
}
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('${/parameter/@layout_code}_prj_project_update_status_link_id').getUrl(),
para: {
other_payment2: other_payment2,
calc_session_id: calc_session_id
},
success: function (arg) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
});
}
if(name == 'bp_id_tenant'){
if(!value){
var bp_tenant_detail_r = $(score_ds_id).getCurrentRecord();
if (bp_tenant_detail_r) {
for (var key in bp_tenant_detail_r.data) {
bp_tenant_detail_r.set(key,'');
}
}
}
record.getField('bank_account_id').setLovPara('bp_id_tenant', record.get('bp_id_tenant'));
}
}
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
if (score_ds_id == ds.id) {
if (name == 'bp_birth') {
if (name == 'bp_birth' && value) {
if (jsGetAge(value.format('yyyy-mm-dd').toString()) == -1) {
Leaf.showInfoMessage("提示", "出生日期不能大于当前日期");
setTimeout(function () {
......@@ -643,7 +692,7 @@
if (device_ds_id == ds.id) {
if (name == 'quantity') {
if (value <= 0) {
Leaf.showInfoMessage("提示", "数量必须大于等于0");
Leaf.showInfoMessage("提示", "数量必须大于0");
setTimeout(function () {
record.set('quantity', old_value);
}, 0);
......@@ -700,22 +749,6 @@
record.set('score_name', score_name);
}
}
var str_r = String('${/model/bp_tenant_detail_path/record}').replace('{','').replace('}','');
if('${/model/bp_tenant_detail_exists/record/@list_count}' == 0){
var obj = JSON.parse('{' + str_r.replace(/(\w+)=/g, '"$1":').replace(/:([^,]*)/g,':"$1"') + '}');
for(var key in record.data){
if (key != 'bp_detail_id' && key != 'score_name') {
var vl = obj[key];
if(key == 'bp_birth' && obj[key]){
vl = new Date(obj[key].toString());
}
if(vl != "null"){
record.set(key,vl);
}
}
}
}
}
};
......
......@@ -298,7 +298,7 @@
<a:columns>
<a:column name="score_target_name" prompt="FND714.SCORE_TARGET_NAME" width="250"/>
<!-- <a:column name="target_value" prompt="指标值" width="150"/> -->
<a:column name="target_value_name" prompt="指标值" width="250"/>
<a:column name="target_value_desc" prompt="指标值" width="250"/>
<!-- <a:column name="score_value" prompt="权重" renderer="fnd714_sc_score_result_dtl_render_score_value" width="80"/> -->
<!-- <a:column name="target_score" editorFunction="fnd714_sc_score_result_dtl_grid_editorFunc" prompt="FND714.TARGET_SCORE" renderer="fnd714_sc_score_result_dtl_render_target_score"/> -->
<a:column name="target_score" prompt="得分" align="right" renderer="fnd714_sc_score_result_dtl_render_target_score" width="80"/>
......
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