Commit 4eed7c43 authored by lijingjing's avatar lijingjing

[fix] 销项发票创建修改

parent 06a6904f
Pipeline #3729 canceled with stages
...@@ -18,10 +18,30 @@ ...@@ -18,10 +18,30 @@
var win = $('acr_invoice_create_invoice'); var win = $('acr_invoice_create_invoice');
win.close(); win.close();
} }
function colum_caculateTotal(data, name) {
var total = 0;
var length = data.length;
var value = 0;
for (var i = 0;i < length;i++) {
if (Ext.isEmpty(data[i].get(name))) {
value = 0;
} else {
value = data[i].get(name);
}
total = plus(total, value);
}
return '<font color=red>' + Leaf.formatMoney(total) + '</font>';
}
function sum_foot(data, name) {
if (name == 'billing_amount') {
return colum_caculateTotal(data, name);
}
}
function createScreen_create() function createScreen_create()
{ {
debugger;
var win = $('acr_invoice_create_invoice'); var win = $('acr_invoice_create_invoice');
var ds=$('headDs'); var ds=$('headDs');
if(!ds.validate(true)) if(!ds.validate(true))
...@@ -36,7 +56,6 @@ ...@@ -36,7 +56,6 @@
url: $('svcLink_create_invoice').getUrl(), url: $('svcLink_create_invoice').getUrl(),
para: datas, para: datas,
success: function(res) { success: function(res) {
debugger;
createScreen_close(); createScreen_close();
contractDs_grid_query(); contractDs_grid_query();
}, },
...@@ -130,7 +149,7 @@ ...@@ -130,7 +149,7 @@
<a:column name="due_amount" align="right" renderer="Leaf.formatMoney"/> <a:column name="due_amount" align="right" renderer="Leaf.formatMoney"/>
<a:column name="received_amount" align="right" renderer="Leaf.formatMoney"/> <a:column name="received_amount" align="right" renderer="Leaf.formatMoney"/>
<a:column name="cf_billing_amount" align="right" renderer="Leaf.formatMoney"/> <a:column name="cf_billing_amount" align="right" renderer="Leaf.formatMoney"/>
<a:column name="billing_amount" align="right" editor="selectedDs_grid_editor_nf" renderer="Leaf.formatMoney"/> <a:column name="billing_amount" align="right" editor="selectedDs_grid_editor_nf" renderer="Leaf.formatMoney" footerRenderer="sum_foot"/>
</a:columns> </a:columns>
<a:editors> <a:editors>
<a:comboBox id="selectedDs_grid_editor_comb"/> <a:comboBox id="selectedDs_grid_editor_comb"/>
...@@ -149,8 +168,8 @@ ...@@ -149,8 +168,8 @@
<a:column name="project_number" width="150"/> <a:column name="project_number" width="150"/>
<a:column name="project_name" width="200"/> <a:column name="project_name" width="200"/>
<a:column name="last_received_date" renderer="Leaf.formatDate" width="80"/> <a:column name="last_received_date" renderer="Leaf.formatDate" width="80"/>
<a:column name="exchange_rate" align="right"/> <!-- <a:column name="exchange_rate" align="right"/>
<a:column name="exchange_rate_type_desc"/> <a:column name="exchange_rate_type_desc"/>-->
</a:columns> </a:columns>
</a:grid> </a:grid>
</a:tab> </a:tab>
......
...@@ -186,7 +186,13 @@ ...@@ -186,7 +186,13 @@
<a:field name="project_name_from" readOnly="true"/> <a:field name="project_name_from" readOnly="true"/>
<a:field name="project_name_to" readOnly="true"/> <a:field name="project_name_to" readOnly="true"/>
<a:field name="contract_number"/> <a:field name="contract_number"/>
<a:field name="invoice_title"/> <!-- <a:field name="invoice_title"/>-->
<a:field name="invoice_title" lovGridHeight="300" lovHeight="450" lovLabelWidth="100" lovService="basic.hls_bp_master_v_for_lov" lovWidth="600" title="承租人">
<a:mapping>
<a:map from="bp_code" to="invoice_title"/>
<a:map from="bp_name" to="invoice_title"/>
</a:mapping>
</a:field>
<a:field name="bp_code_tenant_from" lovGridHeight="300" lovHeight="450" lovLabelWidth="100" lovService="basic.hls_bp_master_v_for_lov" lovWidth="600" title="ACR510.FIELD.BP_CODE_TENANT_FROM"> <a:field name="bp_code_tenant_from" lovGridHeight="300" lovHeight="450" lovLabelWidth="100" lovService="basic.hls_bp_master_v_for_lov" lovWidth="600" title="ACR510.FIELD.BP_CODE_TENANT_FROM">
<a:mapping> <a:mapping>
<a:map from="bp_code" to="bp_code_tenant_from"/> <a:map from="bp_code" to="bp_code_tenant_from"/>
...@@ -274,13 +280,19 @@ ...@@ -274,13 +280,19 @@
</a:screenTopToolbar>- </a:screenTopToolbar>-
<a:queryForm id="condition_queryForm" bindTarget="allConditionDs" createSearchButton="false" resultTarget="contractDs"> <a:queryForm id="condition_queryForm" bindTarget="allConditionDs" createSearchButton="false" resultTarget="contractDs">
<a:formToolBar labelWidth="100"> <a:formToolBar labelWidth="100">
<a:lov name="invoice_title" bindTarget="allConditionDs" prompt="承租人"/>
<!--
<a:comboBox name="bill_object_bp_class_desc" bindTarget="allConditionDs" prompt="客户类型"/> <a:comboBox name="bill_object_bp_class_desc" bindTarget="allConditionDs" prompt="客户类型"/>
-->
<a:textField name="contract_number" bindTarget="allConditionDs" prompt="合同号"/> <a:textField name="contract_number" bindTarget="allConditionDs" prompt="合同号"/>
<!--
<a:comboBox name="invoice_type_desc" bindTarget="allConditionDs" prompt="发票类型"/> <a:comboBox name="invoice_type_desc" bindTarget="allConditionDs" prompt="发票类型"/>
-->
<a:comboBox name="contract_status_desc" bindTarget="allConditionDs" prompt="合同状态"/> <a:comboBox name="contract_status_desc" bindTarget="allConditionDs" prompt="合同状态"/>
<a:comboBox name="bp_id_agent_level1" bindTarget="allConditionDs" prompt="代理店"/> <a:comboBox name="bp_id_agent_level1" bindTarget="allConditionDs" prompt="代理店"/>
</a:formToolBar> </a:formToolBar>
<a:formBody column="4" labelWidth="400"> <!-- <a:formBody column="4" labelWidth="400">
<a:lov name="contract_number_from" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_FROM"/> <a:lov name="contract_number_from" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_FROM"/>
<a:lov name="contract_number_to" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_TO_LANG"/> <a:lov name="contract_number_to" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_TO_LANG"/>
<a:textField name="contract_name" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NAME"/> <a:textField name="contract_name" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NAME"/>
...@@ -290,8 +302,8 @@ ...@@ -290,8 +302,8 @@
<a:textField name="bp_name" bindTarget="allConditionDs" prompt="HLS.TENANT_NAME"/> <a:textField name="bp_name" bindTarget="allConditionDs" prompt="HLS.TENANT_NAME"/>
<a:textField name="con_search_term_1" bindTarget="allConditionDs" prompt="合同号"/> <a:textField name="con_search_term_1" bindTarget="allConditionDs" prompt="合同号"/>
<a:textField name="project_number" bindTarget="allConditionDs" prompt="HLS.PROJECT_NUMBER"/> <a:textField name="project_number" bindTarget="allConditionDs" prompt="HLS.PROJECT_NUMBER"/>
<!-- <a:lov name="project_number_from" bindTarget="allConditionDs" prompt="HLS.PROJECT_NUMBER_FROM"/> &lt;!&ndash; <a:lov name="project_number_from" bindTarget="allConditionDs" prompt="HLS.PROJECT_NUMBER_FROM"/>
<a:lov name="project_number_to" bindTarget="allConditionDs" prompt="HLS.PROJECT_NUMBER_TO_LANG"/> --> <a:lov name="project_number_to" bindTarget="allConditionDs" prompt="HLS.PROJECT_NUMBER_TO_LANG"/> &ndash;&gt;
<a:comboBox name="billing_method_desc" bindTarget="allConditionDs" prompt="HLS.BILLING_RULE"/> <a:comboBox name="billing_method_desc" bindTarget="allConditionDs" prompt="HLS.BILLING_RULE"/>
<a:textField name="con_search_term_2" bindTarget="allConditionDs" prompt="ACR.CONTRACT_NUM_CHECK_CODE"/> <a:textField name="con_search_term_2" bindTarget="allConditionDs" prompt="ACR.CONTRACT_NUM_CHECK_CODE"/>
<a:comboBox name="document_type_desc" bindTarget="allConditionDs" prompt="HLS.CONTRACT_TYPE"/> <a:comboBox name="document_type_desc" bindTarget="allConditionDs" prompt="HLS.CONTRACT_TYPE"/>
...@@ -300,9 +312,9 @@ ...@@ -300,9 +312,9 @@
<a:datePicker name="lease_start_date_to" bindTarget="allConditionDs" prompt="HLS.LEASE_START_DATE_TO"/> <a:datePicker name="lease_start_date_to" bindTarget="allConditionDs" prompt="HLS.LEASE_START_DATE_TO"/>
<a:comboBox name="division_n" bindTarget="allConditionDs" prompt="产品线"/> <a:comboBox name="division_n" bindTarget="allConditionDs" prompt="产品线"/>
<a:textField name="invoice_title" bindTarget="allConditionDs" prompt="承租人"/> <a:textField name="invoice_title" bindTarget="allConditionDs" prompt="承租人"/>
<!-- <a:datePicker name="termination_date_from" bindTarget="allConditionDs" prompt="结清日期从"/> &lt;!&ndash; <a:datePicker name="termination_date_from" bindTarget="allConditionDs" prompt="结清日期从"/>
<a:datePicker name="termination_date_to" bindTarget="allConditionDs" prompt="结清日期到"/>--> <a:datePicker name="termination_date_to" bindTarget="allConditionDs" prompt="结清日期到"/>&ndash;&gt;
</a:formBody> </a:formBody>-->
</a:queryForm> </a:queryForm>
<a:tabPanel id="acr510n_detail_tabpanel_id" marginHeight="140" marginWidth="50"> <a:tabPanel id="acr510n_detail_tabpanel_id" marginHeight="140" marginWidth="50">
<a:tabs> <a:tabs>
......
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