Commit e288bd6b authored by stone's avatar stone

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

parents 2a9f8e25 3471c2a2
...@@ -35,8 +35,20 @@ ...@@ -35,8 +35,20 @@
FROM hls_cashflow_item FROM hls_cashflow_item
WHERE cf_item = ccc.cf_item) cf_item_desc, WHERE cf_item = ccc.cf_item) cf_item_desc,
c.pay_method, c.pay_method,
(ccc.due_amount - nvl(ccc.received_amount, 0)) due_amount, (select decode(cf_item, 9,
(ccc.due_amount - nvl(ccc.received_amount, 0)) manual_amount CON_OVERDUE_PENALTY_PKG.CALC_PENALTY_FOR_WRITE_OFF(p_cashflow_id=> cashflow_id,
p_calc_date=>to_date(${@due_date_to}, 'yyyy-mm-dd'),
p_user_id=>${/session/@user_id},
p_penalty_flag=>'Y'),
due_amount) from con_contract_cashflow where cashflow_id = ccc.cashflow_id) - nvl(ccc.received_amount, 0) due_amount,
(select decode(cf_item, 9,
CON_OVERDUE_PENALTY_PKG.CALC_PENALTY_FOR_WRITE_OFF(p_cashflow_id=> cashflow_id,
p_calc_date=>to_date(${@due_date_to}, 'yyyy-mm-dd'),
p_user_id=>${/session/@user_id},
p_penalty_flag=>'Y'),
due_amount) from con_contract_cashflow where cashflow_id = ccc.cashflow_id) - nvl(ccc.received_amount, 0) manual_amount
--(ccc.due_amount - nvl(ccc.received_amount, 0)) due_amount,
--(ccc.due_amount - nvl(ccc.received_amount, 0)) manual_amount
FROM con_contract c, FROM con_contract c,
con_contract_cashflow ccc #WHERE_CLAUSE#) t con_contract_cashflow ccc #WHERE_CLAUSE#) t
where not exists(select 1 where not exists(select 1
...@@ -45,16 +57,30 @@ ...@@ -45,16 +57,30 @@
where g.status in ('NEW', 'DEAL') where g.status in ('NEW', 'DEAL')
and g.group_id = l.group_id and g.group_id = l.group_id
and l.cashflow_id = t.cashflow_id) and l.cashflow_id = t.cashflow_id)
ORDER BY t.due_date_ORDER, t.contract_id, t.times, t.cf_item DESC ORDER BY t.due_date_ORDER, t.contract_id, t.times, decode(t.cf_item,1,2,8,3,9,1)
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
<bm:query-fields> <bm:query-fields>
<bm:query-field name="pay_method" queryExpression="(c.pay_method = ${@pay_method})"/> <bm:query-field name="pay_method" queryExpression="(c.pay_method = ${@pay_method})"/>
<bm:query-field name="due_date_from" <bm:query-field name="due_date_from"
queryExpression="(ccc.due_date &gt;= to_date(${@due_date_from},'yyyy-mm-dd'))"/> queryExpression="(decode(ccc.cf_item,
9,
(SELECT due_date
FROM con_contract_cashflow
WHERE cf_item = 1
AND times = ccc.times
AND contract_id = ccc.contract_id),
due_date) &gt;= to_date(${@due_date_from},'yyyy-mm-dd'))"/>
<bm:query-field name="due_date_to" <bm:query-field name="due_date_to"
queryExpression="(ccc.due_date &lt;= to_date(${@due_date_to},'yyyy-mm-dd'))"/> queryExpression="(decode(ccc.cf_item,
9,
(SELECT due_date
FROM con_contract_cashflow
WHERE cf_item = 1
AND times = ccc.times
AND contract_id = ccc.contract_id),
due_date) &lt;= to_date(${@due_date_to},'yyyy-mm-dd'))"/>
<bm:query-field name="contract_id" queryExpression="(ccc.contract_id = ${@contract_id})"/> <bm:query-field name="contract_id" queryExpression="(ccc.contract_id = ${@contract_id})"/>
<bm:query-field name="cf_item" queryExpression="(ccc.cf_item = ${@cf_item})"/> <bm:query-field name="cf_item" queryExpression="(ccc.cf_item = ${@cf_item})"/>
<bm:query-field name="bp_id_tenant" queryExpression="(bp_id_tenant = ${@bp_id_tenant})"/> <bm:query-field name="bp_id_tenant" queryExpression="(bp_id_tenant = ${@bp_id_tenant})"/>
......
...@@ -32,7 +32,18 @@ ...@@ -32,7 +32,18 @@
<bm:field name="bp_tenant_name" forInsert="false" forceUpdate="false" expression="(select h.bp_name from hls_bp_master h,con_contract c,con_contract_cashflow cf where c.contract_id = cf.contract_id and cf.cashflow_id = t1.cashflow_id and c.bp_id_tenant = h.bp_id)"/> <bm:field name="bp_tenant_name" forInsert="false" forceUpdate="false" expression="(select h.bp_name from hls_bp_master h,con_contract c,con_contract_cashflow cf where c.contract_id = cf.contract_id and cf.cashflow_id = t1.cashflow_id and c.bp_id_tenant = h.bp_id)"/>
<bm:field name="times" forceUpdate="false" forInsert="false" expression="(select times from con_contract_cashflow where cashflow_id = t1.cashflow_id)"/> <bm:field name="times" forceUpdate="false" forInsert="false" expression="(select times from con_contract_cashflow where cashflow_id = t1.cashflow_id)"/>
<bm:field name="due_date" forceUpdate="false" forInsert="false" expression="(select to_char(due_date,'yyyy-mm-dd') from con_contract_cashflow where cashflow_id = t1.cashflow_id)"/> <bm:field name="due_date" forceUpdate="false" forInsert="false" expression="(select to_char(due_date,'yyyy-mm-dd') from con_contract_cashflow where cashflow_id = t1.cashflow_id)"/>
<bm:field name="due_amount" forceUpdate="false" forInsert="false" expression="(select due_amount - nvl(received_amount,0) from con_contract_cashflow where cashflow_id = t1.cashflow_id)"/> <!-- <bm:field name="due_amount" forceUpdate="false" forInsert="false" expression="(select due_amount - nvl(received_amount,0) from con_contract_cashflow where cashflow_id = t1.cashflow_id)"/>-->
<bm:field name="due_amount" forceUpdate="false" forInsert="false" expression="((select decode(cf_item, 9,
CON_OVERDUE_PENALTY_PKG.CALC_PENALTY_FOR_WRITE_OFF(p_cashflow_id=> cashflow_id,
p_calc_date=>(select due_date from hls_ebank_batch where batch_id = t1.batch_id),
p_user_id=>${/session/@user_id},
p_penalty_flag=>'Y'),
due_amount)
from con_contract_cashflow
where cashflow_id = t1.cashflow_id) - nvl((select sum(CSH_WRITE_OFF_AMOUNT)
from csh_write_off
where cashflow_id = t1.cashflow_id and reversed_flag = 'N'
and write_off_date &lt; (select due_date from hls_ebank_batch where batch_id = t1.batch_id)),0))"/>
</bm:fields> </bm:fields>
<bm:query-fields> <bm:query-fields>
<bm:query-field name="batch_id" queryExpression="t1.batch_id = ${@batch_id}"/> <bm:query-field name="batch_id" queryExpression="t1.batch_id = ${@batch_id}"/>
......
...@@ -18,13 +18,16 @@ ...@@ -18,13 +18,16 @@
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 in ('HL_CM_10','HL_CM_11','HL_CM_14') then
to_char(fsd.target_value,'FM999,999,999,990.00')
when fst.score_target_code = 'HL_CM_24' then when fst.score_target_code = 'HL_CM_24' then
(SELECT DECODE(sign(t.EXCAVATOR_QUANTITY), 1, t.EXCAVATOR_QUANTITY || '台挖掘机;', null) || (SELECT DECODE(sign(t.EXCAVATOR_QUANTITY), 1, t.EXCAVATOR_QUANTITY || '台挖掘机;', null) ||
DECODE(sign(t.LOADER_QUANTITY), 1, t.LOADER_QUANTITY || '台装载机;', null) || DECODE(sign(t.LOADER_QUANTITY), 1, t.LOADER_QUANTITY || '台装载机;', null) ||
DECODE(sign(t.OTHER_OTHER), 1, t.OTHER_OTHER || '台其他机器;', null) target_value DECODE(sign(t.OTHER_OTHER), 1, t.OTHER_OTHER || '台其他机器;', null) ||
FROM (SELECT SUM(DECODE(item_type, 'EXCAVATOR', 1, 0) * nvl(quantity, 1)) EXCAVATOR_QUANTITY, decode(t.EXCAVATOR_QUANTITY + t.LOADER_QUANTITY + t.OTHER_OTHER, 0 , '无工程机械设备') target_value
SUM(DECODE(item_type, 'LOADER', 1, 0) * nvl(quantity, 1)) LOADER_QUANTITY, FROM (SELECT nvl(SUM(DECODE(item_type, 'EXCAVATOR', 1, 0) * nvl(quantity, 1)),0) EXCAVATOR_QUANTITY,
SUM(DECODE(item_type, 'OTHER', 1, 0) * nvl(quantity, 1)) OTHER_OTHER nvl(SUM(DECODE(item_type, 'LOADER', 1, 0) * nvl(quantity, 1)) ,0) LOADER_QUANTITY,
nvl(SUM(DECODE(item_type, 'OTHER', 1, 0) * nvl(quantity, 1)),0) OTHER_OTHER
FROM bp_tenant_rate_item_device_lv t FROM bp_tenant_rate_item_device_lv t
WHERE project_id = (select project_id WHERE project_id = (select project_id
from fnd_sc_score fs, from fnd_sc_score fs,
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
params.bank_account_id = record.get('bank_account_id'); params.bank_account_id = record.get('bank_account_id');
params.merger_rules = record.get('merger_rules'); params.merger_rules = record.get('merger_rules');
params.pay_method = record.get('pay_method'); params.pay_method = record.get('pay_method');
// params.due_date = record.get('due_date'); params.due_date = record.get('due_date');
//处理行 //处理行
var details = []; var details = [];
...@@ -139,6 +139,16 @@ ...@@ -139,6 +139,16 @@
} }
return true; return true;
} }
function hls_ccb_form_update(ds,record,name,value,oldvalue){
if(name == 'due_date_to'){
var r =$('hls_ccb_form_create_ds').getCurrentRecord();
if(r){
r.set('due_date',value);
}
}
}
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:dataSet id="pay_methods_ds"> <a:dataSet id="pay_methods_ds">
...@@ -187,6 +197,9 @@ ...@@ -187,6 +197,9 @@
</a:field> </a:field>
<a:field name="cf_item"/> <a:field name="cf_item"/>
</a:fields> </a:fields>
<a:events>
<a:event name="update" handler="hls_ccb_form_update"/>
</a:events>
</a:dataSet> </a:dataSet>
<a:dataSet id="hls_ccb_form_create_ds" autoCreate="true"> <a:dataSet id="hls_ccb_form_create_ds" autoCreate="true">
<a:fields> <a:fields>
......
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
var status = records[0].get('status'); var status = records[0].get('status');
var batch_id = records[0].get('batch_id'); var batch_id = records[0].get('batch_id');
if (status != 'NEW' && status != 'POST_FAIL') { if (status != 'NEW' && status != 'POST_FAIL') {
Leaf.showMessage('${l:HLS.PROMPT}', '只有新建或推送失败的数据才能删除!'); Leaf.showMessage('${l:HLS.PROMPT}', '只有新建的数据才能删除!');
return; return;
} else { } else {
Leaf.Masker.mask(Ext.getBody(), '删除中...'); //锁屏 Leaf.Masker.mask(Ext.getBody(), '删除中...'); //锁屏
...@@ -298,6 +298,10 @@ ...@@ -298,6 +298,10 @@
}); });
} }
function query_reset(){
$('hls_ccb_batch_query_ds').reset();
}
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:dataSet id="bank_name_combobox_ds"> <a:dataSet id="bank_name_combobox_ds">
...@@ -331,6 +335,7 @@ ...@@ -331,6 +335,7 @@
<a:screenTopToolbar height="29"> <a:screenTopToolbar height="29">
<a:screenTitle/> <a:screenTitle/>
<a:gridButton click="query_batch" text="查询"/> <a:gridButton click="query_batch" text="查询"/>
<a:gridButton click="query_reset" text="重置"/>
<a:gridButton click="open_batch" text="生成代扣指令"/> <a:gridButton click="open_batch" text="生成代扣指令"/>
<a:gridButton click="delete_batch" text="删除代扣指令"/> <a:gridButton click="delete_batch" text="删除代扣指令"/>
<a:gridButton click="export_batch" text="导出划扣单"/> <a:gridButton click="export_batch" text="导出划扣单"/>
...@@ -340,7 +345,7 @@ ...@@ -340,7 +345,7 @@
<!-- <a:gridButton click="withhold_list" text="手工代扣单"/>--> <!-- <a:gridButton click="withhold_list" text="手工代扣单"/>-->
</a:screenTopToolbar> </a:screenTopToolbar>
<a:form column="3"> <a:form column="3">
<a:comboBox name="bank_name" bindTarget="hls_ccb_batch_query_ds" prompt="银行名称"/> <!-- <a:comboBox name="bank_name" bindTarget="hls_ccb_batch_query_ds" prompt="银行名称"/>-->
<a:comboBox name="status_desc" bindTarget="hls_ccb_batch_query_ds" prompt="状态"/> <a:comboBox name="status_desc" bindTarget="hls_ccb_batch_query_ds" prompt="状态"/>
<a:datePicker name="batch_date" bindTarget="hls_ccb_batch_query_ds" prompt="创建日期"/> <a:datePicker name="batch_date" bindTarget="hls_ccb_batch_query_ds" prompt="创建日期"/>
</a:form> </a:form>
...@@ -358,7 +363,7 @@ ...@@ -358,7 +363,7 @@
<a:column name="created_by_n" align="center" prompt="制单人" width="150"/> <a:column name="created_by_n" align="center" prompt="制单人" width="150"/>
<a:column name="total_real_amount" align="right" prompt="实扣总金额" renderer="Leaf.formatMoney" <a:column name="total_real_amount" align="right" prompt="实扣总金额" renderer="Leaf.formatMoney"
width="100"/> width="100"/>
<a:column name="total_success_count" align="right" prompt="扣款成功合同" width="100"/> <a:column name="total_success_count" align="right" prompt="扣款成功账号数" width="100"/>
<a:column name="message" align="right" prompt="错误消息" width="150"/> <a:column name="message" align="right" prompt="错误消息" width="150"/>
</a:columns> </a:columns>
</a:grid> </a:grid>
......
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