Commit e3f43592 authored by stone's avatar stone

[feat]完成收款申请功能

parent a913c671
alter table csh_payment_req_ln add (vender_bank_account_id number);
comment on column csh_payment_req_ln.vender_bank_account_id is '厂商银行账户id';
\ No newline at end of file
comment on column csh_payment_req_ln.vender_bank_account_id is '厂商银行账户id';
alter table csh_payment_req_ln add (amount_agent_paid number);
comment on column csh_payment_req_ln.amount_agent_paid is '已付我司金额';
alter table csh_payment_req_ln add (amount_vender_paid number);
comment on column csh_payment_req_ln.amount_vender_paid is '已付厂商金额';
\ No newline at end of file
......@@ -25,6 +25,12 @@
where hci.cf_item = ccc.cf_item
and hci.cf_type = ccc.cf_type
and ccc.cashflow_id = cpr.ref_doc_line_id) CF_DESCRIPTION,
(select c.transaction_num
from csh_transaction c
where c.source_doc_line_id = cpr.payment_req_ln_id
and c.source_doc_id = cpr.payment_req_id
and c.transaction_type = 'PAYMENT') transaction_num,
--bp_id 存的是哪个字段
(select bp_name
from hls_bp_master hbm
......@@ -41,6 +47,10 @@
--应付我司金额
cpr.amount_agent,
cpr.amount_vender,
--未付金额
(cpr.amount_agent-nvl(cpr.amount_agent_paid,0)) residual_agent_amount,
(cpr.amount_vender-nvl(cpr.amount_vender_paid,0)) residual_vender_amount,
(select bp_name
from hls_bp_master hbm
where hbm.bp_id =
......
......@@ -197,6 +197,7 @@
AND t.data_class = 'NORMAL'
AND t.contract_status NOT IN
('NEW', 'SIGN', 'CANCEL', 'PENDING', 'CLOSED')
--测试用,cf_itme应当为0
AND f.cf_item <> 0) t1
#WHERE_CLAUSE#
......
......@@ -55,6 +55,7 @@
<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>
<script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id"
url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id"
......@@ -74,9 +75,19 @@
<a:link id="${/parameter/@layout_code}csh511_csh_payment_req_hd_query" model="csh.CSH511.csh_payment_req_hd" modelaction="query" />
<script type="text/javascript"><![CDATA[
jQuery.noConflict();
//如果头id 不为空,就使用自在定义的ds进行查询
Leaf.onReady(function(){
var lnds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
console.log($(lnds_id));
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var payment_req_id='${/parameter/@payment_req_id}';
if(payment_req_id){
$(lnds_id).setQueryUrl('${/request/@context_path}/autocrud/csh.CSH501.csh_payment_req_ln_query_after_save/query');
$(lnds_id).setQueryParameter("payment_req_id",payment_req_id);
$(lnds_id).query();
$(hdds_id).setQueryParameter("payment_req_id",payment_req_id);
$(hdds_id).query();
}
})
Ext.ux.Lightbox.register('a[ref=img]', true);
......@@ -593,9 +604,14 @@
var payment_req_id = hd_record.get('payment_req_id');
if (line_records.length == 0) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:PROMPT}', '请先选择要支付的行明细!');
return;
}
if(line_records.length>1){
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:PROMPT}', '一次只能选择一条数据进行操作!');
return;
}
var current_bp_id;
var bp_bank_account_code;
var bp_bank_account_num;
......@@ -616,7 +632,9 @@
return;
} */
if (Ext.isEmpty(line_record.get('pay_amount'))) {
//支付金额为应付代理店
var this_pay_amount=plus(line_record.get('residual_agent_amount'),line_record.get('residual_vender_amount'));
if (this_pay_amount <=0) {
Leaf.showMessage('${l:PROMPT}', '本次支付金额为空!');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
......@@ -635,10 +653,14 @@
bp_bank_account_code_n = line_record.get('bp_bank_account_code_n');
bp_bank_account_id = line_record.get('bp_bank_account_id');
contract_id = line_record.get('contract_id');
line_record.set('loan_date',hd_record.get('loan_date'))
var data=[];
data.push(line_record);
var win = new Leaf.Window({
id: 'csh_payment_req_pay_win',
url: $('csh_payment_req_pay_win_link').getUrl(),
params: {
params:
{
payment_req_id: payment_req_id,
winid: 'csh_payment_req_pay_win',
hdds_id: hdds_id,
......
......@@ -31,6 +31,7 @@
<a:link id="con_doc_batch_create_job_link_id" url="${/request/@context_path}/modules/csh/CSH502/csh_atm_batch_download_pdf_job.lsc"/>
<a:link id="csh_atm_batch_download_pdf_link_id" url="${/request/@context_path}/modules/csh/CSH502/csh_atm_batch_download_pdf.lsc"/>
<script type="text/javascript"><![CDATA[
function csh502_pay_lock_window() {
Leaf.Masker.mask($('${/parameter/@winid}').wrap, '${l:HLS.EXECUTING}');
}
......@@ -507,6 +508,10 @@
// } else {
// ds.getField('first_payment_date').setRequired(false);
// }
console.log('${/parameter}');
// var lnds='${/parameter/@lnds_id}';
console.log($(lnds));
var date = new Date();
if ('${/parameter/@loan_date}') {
r_date = (('${/parameter/@loan_date}').match(/\d{4}.\d{1,2}.\d{1,2}/mg).toString()).replace(/[^0-9]/mg, '-');
......@@ -652,6 +657,14 @@
<a:form labelWidth="100" title="CSH502.CSH_PAYMENT_REQ_PAY">
<a:box column="4">
<a:textField name="bp_name" bindTarget="csh_payment_req_pay_ds" prompt="CSH501.CSH_PAYMENT_OBJ_NAME" readOnly="true" width="150"/>
<a:textField name="bp_bank_account_id" bindTarget="csh_payment_req_pay_ds" prompt="付款代理商对象" readOnly="true" width="150"/>
<a:textField name="vender_bank_account_id" bindTarget="csh_payment_req_pay_ds" prompt="付款厂商对象" readOnly="true" width="150"/>
<a:textField name="con_contarct_number" bindTarget="csh_payment_req_pay_ds" prompt="合同编号" readOnly="true" width="150"/>
<a:textField name="cf_item_n" bindTarget="csh_payment_req_pay_ds" prompt="应付项目" readOnly="true" width="150"/>
<a:numberField name="residual_agent_amount" bindTarget="csh_payment_req_pay_ds" prompt="未付代理店金额" readOnly="true" width="150" renderer="Leaf.formatMoney"/>
<a:numberField name="residual_vender_amount" bindTarget="csh_payment_req_pay_ds" prompt="未付厂商金额" readOnly="true" width="150" renderer="Leaf.formatMoney"/>
<a:numberField name="amount_paid" bindTarget="csh_payment_req_pay_ds" prompt="本次付款金额" readOnly="true" width="150" renderer="Leaf.formatMoney"/>
<a:textField name="period_name" bindTarget="csh_payment_req_pay_ds" prompt="HLS.ACCOUNT_PERIOD_NAME" readOnly="true"/>
<!-- <a:textField name="cf_description" bindTarget="csh_payment_req_pay_ds" prompt="CSH501.CSH_PAYMENT_PRJ" readOnly="true" width="150"/> -->
<!-- <a:numberField name="residual_amount" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_pay_ds" prompt="CSH501.CSH_RESIDUAL_AMOUNT" readOnly="true" width="150"/>-->
<!-- <a:textField name="currency_name" bindTarget="csh_payment_req_pay_ds" prompt="HLS.CURRENCY" readOnly="true" width="150"/> -->
......@@ -685,7 +698,6 @@
<a:datePicker name="transaction_date" bindTarget="csh_payment_req_pay_ds" prompt="CSH502.CSH_PAY_DATE" width="150"/>
<!-- <a:textField name="first_contract_day" bindTarget="csh_payment_req_pay_ds" prompt="首次支付表日期末位" readOnly="true"/> -->
<!-- <a:datePicker name="first_payment_date" bindTarget="csh_payment_req_pay_ds" dayRenderer="rendererDay" prompt="首期还款日" width="150"/> -->
<a:textField name="period_name" bindTarget="csh_payment_req_pay_ds" prompt="HLS.ACCOUNT_PERIOD_NAME" readOnly="true"/>
</a:box>
<!-- <a:box column="4">
<a:numberField name="transaction_amount" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_pay_ds" prompt="CSH502.CSH_PAYMENT_AMOUNT" width="150"/>
......
......@@ -343,26 +343,26 @@
<!-- <a:gridButton click="csh502_payment_close" text="HLS.CLOSE"/> -->
<!-- <a:gridButton click="csh502_payment_save" text="HLS.SAVE"/> -->
<!-- <a:gridButton click="csh502_payment_doc_print" text="汇签单打印"/> -->
<a:gridButton click="csh502_payment_doc_print_d" text="汇签单"/>
<div style="margin-left:30px;margin-top:13px"><![CDATA[注:汇签单打印之后请重新点击查询按钮以获取最新数据后进行其它操作]]></div>
<!-- <a:gridButton click="csh502_payment_doc_print_d" text="汇签单"/>-->
<!-- <div style="margin-left:30px;margin-top:13px"><![CDATA[注:汇签单打印之后请重新点击查询按钮以获取最新数据后进行其它操作]]></div>-->
</a:screenTopToolbar>
<a:form column="3" labelWidth="130" marginWidth="35" title="CSH502.CSH_PAYMENT_REQ_PAY">
<a:textField name="payment_req_number" bindTarget="csh_payment_req_query_ds" prompt="申请单号"/>
<a:textField name="bp_id_tenant_n" bindTarget="csh_payment_req_query_ds" prompt="商业伙伴名称"/>
<a:datePicker name="approval_date_from" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_APR_DATE_FROM" width="150"/>
<a:datePicker name="approval_date_to" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_APR_DATE_TO" width="150"/>
<a:textField name="contract_number" bindTarget="csh_payment_req_query_ds" prompt="支付表编号"/>
<!-- <a:textField name="bp_id_tenant_n" bindTarget="csh_payment_req_query_ds" prompt="商业伙伴名称"/>-->
<!-- <a:datePicker name="approval_date_from" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_APR_DATE_FROM" width="150"/>-->
<!-- <a:datePicker name="approval_date_to" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_APR_DATE_TO" width="150"/>-->
<a:textField name="contract_number" bindTarget="csh_payment_req_query_ds" prompt="合同编号"/>
<a:datePicker name="req_date_from" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_REQ_DATE_FROM" width="150"/>
<a:datePicker name="req_date_to" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_REQ_DATE_TO" width="150"/>
<!-- <a:lov name="user_name" bindTarget="csh_payment_req_query_ds" prompt="提交人帐号" width="150"/> -->
<!-- <a:textField name="employee_name" bindTarget="csh_payment_req_query_ds" prompt="提交人姓名" readOnly="true" width="150"/> -->
<a:textField name="user_name" bindTarget="csh_payment_req_query_ds" prompt="申请人" width="150"/>
<a:comboBox name="print_flag_des" bindTarget="csh_payment_req_query_ds" prompt="汇签单" width="150"/>
<!-- <a:comboBox name="print_flag_des" bindTarget="csh_payment_req_query_ds" prompt="汇签单" width="150"/>-->
<!-- <a:comboBox name="approval_status_desc" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_APR_STATE" width="150"/> -->
<!-- <a:textField name="submitted_flag" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_SUBMIT_STATE" width="150"/> -->
<!-- <a:checkBox name="closed_flag" bindTarget="csh_payment_req_query_ds" prompt="CSH502.CSH_CLOSED_FLAG" width="70"/> -->
<!-- <a:comboBox name="payment_bank_des" bindTarget="csh_payment_req_query_ds" prompt="付款银行" width="150"/> -->
<a:comboBox name="bp_category_n" bindTarget="csh_payment_req_query_ds" prompt="对象类型" width="150"/>
<!-- <a:comboBox name="bp_category_n" bindTarget="csh_payment_req_query_ds" prompt="对象类型" width="150"/>-->
</a:form>
<a:grid id="csh_payment_req_grid_ds" bindTarget="csh_payment_req_queryDs" marginHeight="240" marginWidth="35" navBar="true">
<a:toolBar>
......@@ -370,29 +370,37 @@
</a:toolBar>
<a:columns>
<a:column name="payment_req_number" lock="true" prompt="CSH502.CSH_REQ_NO" renderer="render_objectDs_grid" width="130"/>
<a:column name="contract_number" prompt="支付表编号" showTitle="true" width="120"/>
<a:column name="print_flag" align="center" prompt="汇签单" renderer="render_objectDs_grid" width="80"/>
<a:column name="contract_number" prompt="合同编号" showTitle="true" width="120"/>
<!-- <a:column name="print_flag" align="center" prompt="汇签单" renderer="render_objectDs_grid" width="80"/>-->
<!-- <a:column name="status_n" align="center" prompt="BPM状态" width="80"/> -->
<a:column name="user_name" prompt="CSH502.CSH_PROPOSER"/>
<a:column name="req_date" align="center" prompt="CSH502.CSH_REQ_DATE" width="80"/>
<a:column name="bp_id_tenant_n" align="center" prompt="承租人"/>
<a:column name="apply_amount" align="right" prompt="CSH501.CSH_APPLIED_TOTAL_AMOUNT" renderer="Leaf.formatMoney"/>
<a:column name="sum_act_amount" align="right" prompt="实际申请金额" renderer="Leaf.formatMoney"/>
<!-- <a:column name="user_name" prompt="CSH502.CSH_PROPOSER" width="120"/>-->
<a:column name="req_date" align="center" prompt="CSH502.CSH_REQ_DATE" width="120"/>
<a:column name="amount" align="center" prompt="应付金额" width="120" renderer="Leaf.formatMoney"/>
<a:column name="bp_id_agent_n" align="center" prompt="代理店" width="120"/>
<a:column name="amount_agent_total" align="center" prompt="应付代理店金额" width="120" renderer="Leaf.formatMoney"/>
<a:column name="residual_agent_amount" align="center" prompt="未付代理店金额" width="120" renderer="Leaf.formatMoney"/>
<a:column name="vender_name" align="center" prompt="厂商" width="120"/>
<a:column name="amount_vender_total" align="center" prompt="应付厂商金额" width="120" renderer="Leaf.formatMoney"/>
<a:column name="residual_vender_amount" align="center" prompt="未付厂商金额" width="120" renderer="Leaf.formatMoney"/>
<!-- <a:column name="bp_id_tenant_n" align="center" prompt="承租人"/>-->
<!-- <a:column name="apply_amount" align="right" prompt="CSH501.CSH_APPLIED_TOTAL_AMOUNT" renderer="Leaf.formatMoney"/>-->
<!-- <a:column name="sum_act_amount" align="right" prompt="实际申请金额" renderer="Leaf.formatMoney"/>-->
<!-- <a:column name="print_flag" align="center" prompt="汇签单" renderer="render_objectDs_grid" width="60"/> -->
<!-- <a:column name="document_type_dis" prompt="CSH502.CSH_REQ_TYPE"/> -->
<!-- <a:column name="price" align="right" prompt="指导价" renderer="Leaf.formatMoney"/> -->
<a:column name="bp_category_desc" prompt="对象类别"/>
<!-- <a:column name="bp_category_desc" prompt="对象类别"/>-->
<!-- <a:column name="bp_code" prompt="CSH501.CSH_PAYMENT_OBJ"/> -->
<a:column name="bp_name" prompt="CSH501.CSH_PAYMENT_OBJ_NAME" showTitle="true" width="180"/>
<a:column name="bp_bank_account_name" prompt="对象账户"/>
<a:column name="bp_bank_account_num" prompt="对象账号" width="150"/>
<!-- <a:column name="bp_name" prompt="CSH501.CSH_PAYMENT_OBJ_NAME" showTitle="true" width="180"/>-->
<!-- <a:column name="bp_bank_account_name" prompt="对象账户"/>-->
<!-- <a:column name="bp_bank_account_num" prompt="对象账号" width="150"/>-->
<!-- <a:column name="bank_account_num" prompt="出租方账户" showTitle="true" width="200"/>
<a:column name="bank_account_name" prompt="出租方账户名称" showTitle="true" width="200"/> -->
<!-- <a:column name="bp_category_dis" prompt="CSH502.CSH_OBJ_CATEGORY"/> -->
<!-- <a:column name="currency_name" align="center" prompt="HLS.CURRENCY" width="60"/> -->
<!-- <a:column name="submitted_flag" editor="grid_checkbox" prompt="CSH502.CSH_SUBMIT_STATE"/> -->
<a:column name="approval_status_desc" align="center" prompt="CSH502.CSH_APR_STATE" width="80"/>
<a:column name="approval_date" align="center" prompt="CSH502.CSH_APR_DATE" width="80"/>
<!-- <a:column name="approval_status_desc" align="center" prompt="CSH502.CSH_APR_STATE" width="80"/>-->
<!-- <a:column name="approval_date" align="center" prompt="CSH502.CSH_APR_DATE" width="80"/>-->
<!-- <a:column name="closed_flag" editor="grid_checkbox" prompt="CSH502.CSH_CLOSED_FLAG"/> -->
</a:columns>
<a:editors>
......
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