Commit eecd9ccb authored by Darming's avatar Darming

[fix]核销\农行代扣\评分改动

parent 2cbd800c
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
AND sc.code_value = t1.contract_status) contract_status_desc AND sc.code_value = t1.contract_status) contract_status_desc
from con_contract t1 from con_contract t1
where 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.data_class = 'NORMAL'
and t1.company_id in (( and t1.company_id in ((
select company_id select company_id
......
...@@ -3,21 +3,38 @@ ...@@ -3,21 +3,38 @@
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
select *
from (
select times, select times,
cf_item, cf_item,
cashflow_id, 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, (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, contract_id,
to_char(due_date,'yyyy-mm-dd') due_date, to_char(due_date, 'yyyy-mm-dd') due_date,
due_amount, 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, principal,
interest, interest,
principal - nvl(received_principal,0) unreceived_principal, principal - nvl(received_principal, 0) unreceived_principal,
interest - nvl(received_interest,0) unreceived_interest, interest - nvl(received_interest, 0) unreceived_interest,
due_amount - nvl(received_amount,0) unreceived_amount decode(cf_item, 9,
from con_contract_cashflow t CON_OVERDUE_PENALTY_PKG.CALC_PENALTY_FOR_WRITE_OFF(p_cashflow_id=>t.cashflow_id,
#WHERE_CLAUSE# p_calc_date=>to_date(${@transaction_date}, 'yyyy-mm-dd'),
order by times, due_date 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:query-sql>
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
...@@ -37,16 +54,18 @@ ...@@ -37,16 +54,18 @@
</bm:fields> </bm:fields>
<bm:query-fields> <bm:query-fields>
<bm:query-field name="contract_id" queryExpression="t.contract_id = ${@contract_id}"/> <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_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_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="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" <bm:query-field name="due_date_from"
queryExpression="due_date &gt;= to_date(${@due_date_from},&apos;yyyy-mm-dd&apos;)"/> queryExpression="due_date &gt;= to_date(${@due_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="due_date_to" <bm:query-field name="due_date_to"
queryExpression="due_date &lt;= to_date(${@due_date_to},&apos;yyyy-mm-dd&apos;)"/> queryExpression="due_date &lt;= to_date(${@due_date_to},&apos;yyyy-mm-dd&apos;)"/>
</bm:query-fields> </bm:query-fields>
<bm:data-filters> <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:data-filters>
</bm:model> </bm:model>
...@@ -98,7 +98,12 @@ ...@@ -98,7 +98,12 @@
t1.WRITE_OFF_INTEREST, t1.WRITE_OFF_INTEREST,
(select principal from con_contract_cashflow where cashflow_id = t1.cashflow_id) principal, (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 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 (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 from csh_write_off t1) t
#WHERE_CLAUSE# #WHERE_CLAUSE#
......
...@@ -117,7 +117,12 @@ end; ...@@ -117,7 +117,12 @@ end;
<bm:field name="journal_date" databaseType="DATE" datatype="java.util.Date"/> <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="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="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:fields>
<bm:features> <bm:features>
<f:standard-who/> <f:standard-who/>
......
...@@ -18,6 +18,47 @@ ...@@ -18,6 +18,47 @@
fst.parent_line_id) tree_parent_field, fst.parent_line_id) tree_parent_field,
fsd.target_value, fsd.target_value,
CASE 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 WHEN fst.target_value_type = 'CHAR' THEN
(SELECT t.description (SELECT t.description
FROM fnd_score_target_values t FROM fnd_score_target_values t
......
...@@ -21,4 +21,7 @@ ...@@ -21,4 +21,7 @@
<bm:data-filters> <bm:data-filters>
<bm:data-filter name="query" expression="(rownum = 1)" /> <bm:data-filter name="query" expression="(rownum = 1)" />
</bm:data-filters> </bm:data-filters>
<bm:query-fields>
<bm:query-field name="bp_id" queryExpression="bp_id = ${@bp_id}"/>
</bm:query-fields>
</bm:model> </bm:model>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
$('csh_write_off_grid').hideColumn('left_interest'); $('csh_write_off_grid').hideColumn('left_interest');
$('csh_write_off_grid').hideColumn('unreceived_amount'); $('csh_write_off_grid').hideColumn('unreceived_amount');
if ('${/parameter/@interfaceQueryFlag}' == 'N') { 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(); $('csh_write_off_interface_ds').query();
} }
if ('${/parameter/@approval_flag}' == 'Y') { if ('${/parameter/@approval_flag}' == 'Y') {
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
return 'csh_write_off_grid_nf'; return 'csh_write_off_grid_nf';
} }
if (name == 'write_off_date' || name == 'journal_date') { 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'; return 'csh_write_off_grid_dp';
} }
if (write_off_type == 'RECEIPT_ADVANCE_RECEIPT') { if (write_off_type == 'RECEIPT_ADVANCE_RECEIPT') {
...@@ -275,6 +275,9 @@ ...@@ -275,6 +275,9 @@
record.set('left_principal', ''); record.set('left_principal', '');
record.set('left_interest', ''); record.set('left_interest', '');
} }
if (name == 'wirte_off_date'){
record.set('journal_date',value);
}
} }
function csh531_wf_amount_validate(record, name, value) { function csh531_wf_amount_validate(record, name, value) {
...@@ -739,11 +742,11 @@ ...@@ -739,11 +742,11 @@
</a:dataSet> </a:dataSet>
<a:dataSet id="csh_write_off_interface_ds" autoQuery="true" fetchAll="true" <a:dataSet id="csh_write_off_interface_ds" autoQuery="true" fetchAll="true"
model="csh.CSH531N.csh_write_off_interface" 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"> selectable="true">
<a:fields> <a:fields>
<a:field name="company_id" defaultValue="${/parameter/@company_id}"/> <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}"/> defaultValue="${/model/sys_default_time/record/@now_date}"/>
<a:field name="journal_date" required="true" <a:field name="journal_date" required="true"
defaultValue="${/model/sys_default_time/record/@now_date}"/> defaultValue="${/model/sys_default_time/record/@now_date}"/>
...@@ -760,7 +763,7 @@ ...@@ -760,7 +763,7 @@
<a:field name="trx_interface_id" defaultValue="${/parameter/@transaction_id}"/> <a:field name="trx_interface_id" defaultValue="${/parameter/@transaction_id}"/>
<a:field name="contract_number" prompt="合同编号" autoComplete="true" lovAutoQuery="true" <a:field name="contract_number" prompt="合同编号" autoComplete="true" lovAutoQuery="true"
lovHeight="850" required="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="合同号选择"> lovWidth="1350" title="合同号选择">
<a:mapping> <a:mapping>
<a:map from="contract_number" to="contract_number"/> <a:map from="contract_number" to="contract_number"/>
......
...@@ -68,11 +68,17 @@ ...@@ -68,11 +68,17 @@
rec.set('write_off_principal', cf_recs[0].get('unreceived_principal')); rec.set('write_off_principal', cf_recs[0].get('unreceived_principal'));
rec.set('write_off_interest', cf_recs[0].get('unreceived_interest')); rec.set('write_off_interest', cf_recs[0].get('unreceived_interest'));
rec.set('unreceived_amount', cf_recs[0].get('unreceived_amount')); 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')); // rec.set('write_off_amount', cf_recs[0].get('unreceived_amount'));
for (var i = 1; i < cf_recs.length; i++) { for (var i = 1; i < cf_recs.length; i++) {
//copy... //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.ds = rec.ds;
newRecord.set('write_off_cf_item_desc', cf_recs[i].get('cf_item_desc')); 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')); newRecord.set('write_off_cf_item', cf_recs[i].get('cf_item'));
...@@ -88,6 +94,8 @@ ...@@ -88,6 +94,8 @@
newRecord.set('left_amount', cf_recs[i].get('unreceived_amount')); 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_principal', cf_recs[i].get('unreceived_principal'));
newRecord.set('write_off_interest', cf_recs[i].get('unreceived_interest')); 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')); // newRecord.set('write_off_amount', cf_recs[i].get('unreceived_amount'));
ds.add(newRecord); ds.add(newRecord);
...@@ -137,7 +145,7 @@ ...@@ -137,7 +145,7 @@
<a:dataSet id="csh_write_off_lov_ds" fetchAll="true" bindTarget="csh_lov_con_contract_ds" <a:dataSet id="csh_write_off_lov_ds" fetchAll="true" bindTarget="csh_lov_con_contract_ds"
bindName="csh_con_cf" selectable="true" selectionModel="multiple" bindName="csh_con_cf" selectable="true" selectionModel="multiple"
model="csh.CSH531N.csh_con_contract_cashflow" queryDataSet="csh_query_cf_ds" 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:fields>
<a:field name="contract_id"/> <a:field name="contract_id"/>
<a:field name="cashflow_id"/> <a:field name="cashflow_id"/>
......
...@@ -15,14 +15,11 @@ ...@@ -15,14 +15,11 @@
$ctx.parameter.tomcat_source = con_print_path['tomcat_source']; $ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]> ]]>
</s:server-script> </s:server-script>
<a: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_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:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="hls_bp_master_billing_link" model="prj.PRJ500N.hls_bp_master_billing" modelaction="query"/> <a:link id="hls_bp_master_billing_link" model="prj.PRJ500N.hls_bp_master_billing" modelaction="query"/>
<a:link id="bp_tenant_detail_query_link" model="prj.PRJ500D.bp_tenant_old_r_query" modelaction="query"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}get_special_fields_link_id" <a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}get_special_fields_link_id"
model="cont.CON500.con_contract_get_special_fields" modelaction="update"/> model="cont.CON500.con_contract_get_special_fields" modelaction="update"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id" <a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id"
...@@ -536,15 +533,17 @@ ...@@ -536,15 +533,17 @@
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_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 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(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.Masker.mask(Ext.getBody());
Leaf.request({ Leaf.request({
url: $('hls_bp_master_billing_link').getUrl(), url: $('hls_bp_master_billing_link').getUrl(),
para: { para: {
bp_id:value bp_id:bp_id_tenant
}, },
success: function(res) { success: function(res) {
var billing_into=res.result.record; var billing_into=res.result.record;
...@@ -573,10 +572,48 @@ ...@@ -573,10 +572,48 @@
}); });
//根据承租人查找该承租人的历史合同信息 //根据承租人查找该承租人的历史合同信息
$(prj_project_history_ds_id).setQueryUrl('${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query'); $(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(); $(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 (name == 'pay_method') {
if (record.get('pay_method') == 'WIRE_TRANSFER') { if (record.get('pay_method') == 'WIRE_TRANSFER') {
record.set('bank_account_id', null); record.set('bank_account_id', null);
...@@ -626,9 +663,21 @@ ...@@ -626,9 +663,21 @@
}); });
} }
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail'); 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 (score_ds_id == ds.id) { if (score_ds_id == ds.id) {
if (name == 'bp_birth') { if (name == 'bp_birth' && value) {
if (jsGetAge(value.format('yyyy-mm-dd').toString()) == -1) { if (jsGetAge(value.format('yyyy-mm-dd').toString()) == -1) {
Leaf.showInfoMessage("提示", "出生日期不能大于当前日期"); Leaf.showInfoMessage("提示", "出生日期不能大于当前日期");
setTimeout(function () { setTimeout(function () {
...@@ -643,7 +692,7 @@ ...@@ -643,7 +692,7 @@
if (device_ds_id == ds.id) { if (device_ds_id == ds.id) {
if (name == 'quantity') { if (name == 'quantity') {
if (value <= 0) { if (value <= 0) {
Leaf.showInfoMessage("提示", "数量必须大于等于0"); Leaf.showInfoMessage("提示", "数量必须大于0");
setTimeout(function () { setTimeout(function () {
record.set('quantity', old_value); record.set('quantity', old_value);
}, 0); }, 0);
...@@ -700,22 +749,6 @@ ...@@ -700,22 +749,6 @@
record.set('score_name', score_name); 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 @@ ...@@ -298,7 +298,7 @@
<a:columns> <a:columns>
<a:column name="score_target_name" prompt="FND714.SCORE_TARGET_NAME" width="250"/> <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" 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="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" 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"/> <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