Commit 3b063c93 authored by stone's avatar stone

【fix】修改付款的金额查询字段

parent 946143e1
......@@ -47,7 +47,19 @@
// return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>';
// }
}
function construct_from_to() {
var config = ['amount', 'bank_slip_num', 'transaction_amount', 'currency_code', 'bank_account_code'];
var pattern = ['_from', '_to'];
var obj = {};
for (var i = 0,
j = config.length; i < j; i++) {
for (var m = 0,
n = pattern.length; m < n; m++) {
obj[config[i] + pattern[m]] = config[i] + pattern[n - 1 - m];
}
}
return obj;
}
// function openWindow(url) {
// new Leaf.Window({
......@@ -78,6 +90,18 @@
}
function onUpdate_payment_req(ds, record, name, value, oldvalue) {
/*
var from_to = construct_from_to();
var opposite_name = from_to[name];
if (!Ext.isEmpty(opposite_name)) {
var opposite_value = record.get(opposite_name);
if (!Ext.isEmpty(value) && Ext.isEmpty(opposite_value)) {
record.set(opposite_name, value);
}
}
*/
if (name == 'payment_req_number_from') {
if (record.get('payment_req_number_to') == 'undefined' || record.get('payment_req_number_to') == null || record.get('payment_req_number_to') == '') {
record.set('payment_req_number_to', value);
......@@ -95,13 +119,22 @@
record.set('approval_date_from', value);
}
} else if (name == 'amount_from') {
var formatMoney=value.replace(/\,/g, "");
if (record.get('amount_to') == 'undefined' || record.get('amount_to') == null || record.get('amount_to') == '') {
record.set('amount_to', value);
record.set('amount_to', formatMoney);
}
ds.getAt(0).set('amount_from', formatMoney)
record.set('amount_from', formatMoney);
} else if (name == 'amount_to') {
debugger
var formatMoney=value.replace(/\,/g, "");
if (record.get('amount_from') == 'undefined' || record.get('amount_from') == null || record.get('amount_from') == '') {
record.set('amount_from', value);
record.set('amount_from', formatMoney);
}
record.set('amount_to', formatMoney);
} else if (name == 'req_date_from') {
if (record.get('req_date_to') == 'undefined' || record.get('req_date_to') == null || record.get('req_date_to') == '') {
record.set('req_date_to', value);
......@@ -378,13 +411,13 @@
<!-- <a:column name="status_n" align="center" prompt="BPM状态" width="80"/> -->
<!-- <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="amount" align="right" 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="amount_agent_total" align="right" prompt="应付代理店金额" width="120" renderer="Leaf.formatMoney"/>
<a:column name="residual_agent_amount" align="right" 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="amount_vender_total" align="right" prompt="应付厂商金额" width="120" renderer="Leaf.formatMoney"/>
<a:column name="residual_vender_amount" align="right" 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"/>-->
......
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